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] | |
2009/2/26 Joern Rennecke <amylaar@spamcop.net>:the address label "common_reg " used many times. I think it will load one time. But after optimized with '-Os' or '-O2', it still loads the label "common_reg " six times..
Previously, you could define LEGITIMIZE_ADDRESS and LEGITIMIZE_RELOAD_ADDRESS to get reasonable code. ÂHowever, that no longer works in gcc 4.4, see PR38785.
I have a patch set; if you like, I can it to you. ÂNote, however, that it is not known if the FSF have a relevant valid Copyright assignment on file.
I port the gcc with 4.0.2 version. But How to add the code in LEGITIMIZE_RELOAD_ADDRESS. Do you have any example? Thank you very much.
Yes, there are a number of examples in config/*/*.h - just doing a grep should give you a goo selection. The port where this macro has been added first, in order to avoid unnecessary repetition of stack slot address additions, was the SH port. The SFmode part is a later addition, which is different because the SH3E (and the later 32 bit SH family members with hardware floating point) don't have REG+offset addressing for floating point registers, but they have REG+index addressing. The basic operation of the macro is explained in doc/tm.texi . In order to handle pseudos that are equivalent to a constant, you need to allow registers that are not suitable as a base for REG_OK_STRICT_P (because pseudos aren't), which have reg_equiv_constant set. You'll have to take the value in reg_equiv_constant and do necessary arithmetic with plus_constant in order to compute the value to be used in push_reload.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |