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: Cleanups for the m68k backend


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


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