This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/24419] ix86 prologue clobbers memory when it shouldn't
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2005 18:26:21 -0000
- Subject: [Bug target/24419] ix86 prologue clobbers memory when it shouldn't
- References: <bug-24419-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from hjl at lucon dot org 2005-10-18 18:26 -------
There is another issue when converting stack additions to pop:
(define_peephole2
[(match_scratch:SI 0 "r")
(parallel [(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int 4)))
(clobber (reg:CC FLAGS_REG))])]
""
[(parallel [(set (match_dup 0) (mem:SI (reg:SI SP_REG)))
(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG) (const_int 4)))])]
"")
Is that 100% safe with red zone? In theory, compiler can adjust stack, but not
clobber memory since there is a red zone.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24419