------- Comment #9 from hjl at lucon dot org 2005-10-18 17:50 -------
We only run into the problem with red zone enabled, which is x86-64. We have
2 issues:
1. When prologue uses mov, memory shouldn't be clobbered. But
ix86_expand_prologue calls pro_epilogue_adjust_stack which clobbers
memory.
2. We convert stack pointer subtractions to push even when memory isn't
clobbered with patterns like
;; Convert esp subtractions to push.
(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))])]
"optimize_size || !TARGET_SUB_ESP_4"
[(clobber (match_dup 0))
(set (mem:SI (pre_dec:SI (reg:SI SP_REG))) (match_dup 0))])
I don't think we can do that since push will clobber memory.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24419