This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, avr] Relax LDS/STS to IN/OUT if symbol is in I/O address range

2014-09-29 14:45 GMT+04:00 Senthil Kumar Selvaraj
> The patch below adds linker relaxation support for rewriting LDS/STS
> instructions to IN/OUT where appropriate. The IN/OUT instruction is
> shorter by a couple of bytes, and executes a cycle quicker. The
> compiler already does this optimization for addresses known at
> compile time - this linker patch does it for the rest.
> The patch looks for R_AVR_16 relocations, and if it finds an
> LDS/STS instruction with the symbol value (i.e. address) in I/O range,
> rewrites it to use IN/OUT instead, adjusting the address for SFR offsets.
> The patch also includes a couple of test cases to verify that it works
> for tiny, mega and xmega archs, and to ensure I/O range check is
> implemented correctly.
> If ok, could someone commit please? I don't have commit access.

Generally, I don't like this.
The compiler already does this optimization.
May be somebody want to have LDS/STS instead of IN/OUT.
(Calc delay)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]