Patch: Bug in reload.c
Ulrich Weigand
Ulrich.Weigand@de.ibm.com
Thu Feb 14 07:36:00 GMT 2002
Bernd Schmidt wrote:
>On Thu, 14 Feb 2002, Hartmut Penner wrote:
>
>> find_reloads_address_part calls find_reloads_address, passing a the
address to
>> a local variable tem. The changes done on this variable are useless. The
changes
>> should be done directly on x.
>
>Do you have a testcase for this?
Not with the current s390 backend because this always accepts a literal
pool address as legitimate; however we are experimenting with changing
this to declaring them illegitimate and replacing them by base register
+ offset in LEGITIMIZE_RELOAD_ADDRESS (the goal of this is to avoid the
need for a fixed base register and instead having reload allocate one
when needed...).
With this experimental backend changes we are running into the problem
Hartmut has described. find_reloads_address has properly replaced the
literal pool address, but this change is promptly forgotten ...
>The code looks like this was done
>intentionally, although at the moment I can't think of a good reason why.
It could also look like a copy-and-paste mistake; if you look a couple
of lines below, where the case of <something> + <constant> is handled,
the identical find_reload_address call is done, but this time the
change *is* preserved, because 'tem' is actually an XEXP of the 'x'
that is returned here ...
I really cannot see why the cases of <constant> and <sth.> + <constant>
should be handled differently.
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com
More information about the Gcc-patches
mailing list