Georg-Johann Lay wrote: > Does it make sense to extend LEGITIMIZE_RELOAD_ADDRESS, too? > > For the target that needs your extension (AVR) there are different addressing > capabilities depending on AS and there is an implementation of L_R_A.
I'd say that it is an independent issue. LEGITIMIZE_RELOAD_ADDRESS is supposed to used for performance improvements only, it should never be necessary for correctness. With the current code, the target just doesn't get the opportunity to optimize address reloads for non-generic address spaces -- so far, this has never come up as requirement. If you'd like to add such optimizations for AVR, it would be straightforward to pass the address space argument to LEGITIMIZE_RELOAD_ADDRESS. But that can certainly be done as an independent patch. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@de.ibm.com