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: CLOBBER MEM in stack ops on x86


On Wed, Nov 21, 2001 at 06:32:29PM -0500, Richard Kenner wrote:
> Why do stack pops on x86 have CLOBBERs for MEM?
> They don't actually affect MEM at all ...

Not all stack pops do this.  I presume you mean

(define_insn "*popsi1_epilogue"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=r*m")
        (mem:SI (reg:SI 7)))
   (set (reg:SI 7)
        (plus:SI (reg:SI 7) (const_int 4)))
   (clobber (mem:BLK (scratch)))]
  "!TARGET_64BIT"
  "pop{l}\t%0"
  [(set_attr "type" "pop")
   (set_attr "mode" "SI")])

It's to keep insns with stack frame memory operands from
being scheduled past the stack frame deallocation.


r~


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