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]

Re: Reloading failes


andersa@tiscali.no wrote:
(set (reg:SI 2 r3)
     (mem/s:SI (plus:SI (mem:SI (plus:SI (reg/f:SI 6 r7)
                                         (const_int -16)))
                        (const_int 4))))

This looks like a REG_OK_STRICT bug in your port.


Normally, pseudo registers can be treated just like a hard register. However, during reload, any pseudo register remaining will be converted to a stack slot, so they must be treated like a MEM instead of like a REG. This is handled via REG_OK_STRICT. When REG_OK_STRICT is true, we don't accept pseudo registers. When REG_OK_STRICT is false, we do accept pseudo registers.

This is handled for you if you things like GO_IF_LEGITIMATE_ADDRESS are macros in the tm.h file. However, if this calls a function in the target .c file, then you need to manually pass the value of REG_OK_STRICT to the function in the target .c file, and then check the value in that function. There are many ports that do this already. I suggest you look at one of them to see how this is done.

Jim



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