[Bug target/59929] [4.8/4.9 regression] -mno-accumulate-outgoing-args doesn't work with x32

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 23 22:43:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59929

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-23
     Ever confirmed|0                           |1

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
The bug is in

;; %%% Kill this when call knows how to work this out.
(define_split
  [(set (match_operand:SF 0 "push_operand")
        (match_operand:SF 1 "any_fp_register_operand"))]
  "reload_completed"
  [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2)))
   (set (mem:SF (reg:P SP_REG)) (match_dup 1))]
  "operands[2] = GEN_INT (-<P:MODE_SIZE>);")

For

(insn 54 53 55 2 (set (mem:SF (pre_modify:SI (reg/f:SI 7 sp)
                (plus:SI (reg/f:SI 7 sp)
                    (const_int -8 [0xfffffffffffffff8]))) [0  S4 A32])
        (reg:SF 22 xmm1 [orig:84 D.1790 ] [84])) x.i:27 124 {*pushsf_rex64}
     (expr_list:REG_ARGS_SIZE (const_int 16 [0x10])
        (nil)))

we generate the wrong operands[2].  It is better just use

  rtx op = XEXP (XEXP (XEXP (operands[0], 0), 1), 1);
  gcc_assert (CONST_INT_P (op));
  operands[2] = op;

instead.



More information about the Gcc-bugs mailing list