This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

How to handle address which contain SUBREG


I'm am fixing some reload bugs for AVR.

In a couple of situations an address is formed which included a SUBREG expression.
I am not sure how I should be handling these. Initial attempts produce sub-optimal code - and/or reload failures, so thought is a good idea to get some advise!


Either

(Subreg (Rx,0))

or

PLUS ((Subreg (Rx,0)) 5)

If I reject subreg expression, the code produced is sub-optimal.(since address is then calculated into register)

For the non-strict case I believe the address should be accepted as legitimate - on the basis that a SUBREG of psuedo is just as valid as REG.

For the strict case (hard register) - I could either accept if the simplified form is valid - or reject and then make Legitimize simplify the SUBREG expression. (I guess I might also have to handle it in legitimize_reload_address.)

What is the right way?






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