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?





Reply via email to