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]

reload produces invalid address


Hello,

I'm working on a new backend, and I have noticed that in some
circumstances, the reload pass can produce invalid addresses.  Here's
an example:

Before reload:
  (insn 12 11 92 (set (reg/v:SI 24)
          (mem/s:SI (plus:SI (reg/v/f:SI 23)
                  (const_int 4 [0x4])) 1)) 43 {movsi} (nil)
      (nil))

After reload:
  (insn 12 11 92 (set (reg/v:SI 9 11 [25])
          (mem/s:SI (plus:SI (mem:SI (reg/f:SI 15 17) 0)
                  (const_int 4 [0x4])) 1)) 43 {movsi} (nil)
      (nil))

The old address (plus:SI (reg:SI 23) (const_int 4)) was a valid address,
but the new address (plus:SI (mem:SI (reg:SI 15)) (const_int 4)) is not
a valid address according to GO_LEGITIMATE_ADDRESS_P in my backend.

How do I avoid this?

-- 
http://lars.nocrew.org/


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