Cleanups for the m68k backend

Jim Wilson wilson@tuliptree.org
Tue Jul 8 19:20:00 GMT 2003


Peter Barada wrote:
> [(set (mem:SI (pre_dec:SI (reg:SI 15)) (match_operand:SI 0 "address_operand" "a")))
>  (set (match_dup 0) (reg:SI 15))
>  (set (reg:SI 15) (add:SI (reg:SI 15) (match_operand:SI 1 "const_int_operand" "n")))]

You are assuming sequential semantics here, however, the compiler 
implements this with a PARALLEL which implies that everything happens at 
once.  Thus you can't write it this way.  You need to do something more like
   (set (mem (plus (reg 15) (const_int -4)) operand0)
   (set operand0 (plus (reg 15) (const_int -4))
   (set (reg 15) (plus (reg 15) operand1))

Similarly for unlink.

Jim



More information about the Gcc mailing list