re PR target/40718 (Invalid code produced with -foptimize-sibling-calls)
PR target/40718 * config/i386/i386.c (*call_pop_1): Disable for sibling calls. (*call_value_pop_1): Ditto. (*sibcall_pop_1): New insn pattern. (*sibcall_value_pop_1): Ditto. From-SVN: r151029
This commit is contained in:
parent
8c40d061ec
commit
fe62197bed
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
PR target/40718
|
PR target/40718
|
||||||
* config/i386/i386.c (*call_pop_1): Disable for sibling calls.
|
* config/i386/i386.c (*call_pop_1): Disable for sibling calls.
|
||||||
|
(*call_value_pop_1): Ditto.
|
||||||
(*sibcall_pop_1): New insn pattern.
|
(*sibcall_pop_1): New insn pattern.
|
||||||
|
(*sibcall_value_pop_1): Ditto.
|
||||||
|
|
||||||
2009-08-23 Alan Modra <amodra@bigpond.net.au>
|
2009-08-23 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
|
|
@ -22095,22 +22095,26 @@
|
||||||
(match_operand:SI 2 "" "")))
|
(match_operand:SI 2 "" "")))
|
||||||
(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
|
(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
|
||||||
(match_operand:SI 3 "immediate_operand" "i")))]
|
(match_operand:SI 3 "immediate_operand" "i")))]
|
||||||
"!TARGET_64BIT"
|
"!SIBLING_CALL_P (insn) && !TARGET_64BIT"
|
||||||
{
|
{
|
||||||
if (constant_call_address_operand (operands[1], Pmode))
|
if (constant_call_address_operand (operands[1], Pmode))
|
||||||
{
|
return "call\t%P1";
|
||||||
if (SIBLING_CALL_P (insn))
|
return "call\t%A1";
|
||||||
return "jmp\t%P1";
|
|
||||||
else
|
|
||||||
return "call\t%P1";
|
|
||||||
}
|
|
||||||
if (SIBLING_CALL_P (insn))
|
|
||||||
return "jmp\t%A1";
|
|
||||||
else
|
|
||||||
return "call\t%A1";
|
|
||||||
}
|
}
|
||||||
[(set_attr "type" "callv")])
|
[(set_attr "type" "callv")])
|
||||||
|
|
||||||
|
(define_insn "*sibcall_value_pop_1"
|
||||||
|
[(set (match_operand 0 "" "")
|
||||||
|
(call (mem:QI (match_operand:SI 1 "call_insn_operand" "s,U"))
|
||||||
|
(match_operand:SI 2 "" "")))
|
||||||
|
(set (reg:SI SP_REG) (plus:SI (reg:SI SP_REG)
|
||||||
|
(match_operand:SI 3 "immediate_operand" "i,i")))]
|
||||||
|
"SIBLING_CALL_P (insn) && !TARGET_64BIT"
|
||||||
|
"@
|
||||||
|
jmp\t%P1
|
||||||
|
jmp\t%A1"
|
||||||
|
[(set_attr "type" "callv")])
|
||||||
|
|
||||||
(define_insn "*call_value_0"
|
(define_insn "*call_value_0"
|
||||||
[(set (match_operand 0 "" "")
|
[(set (match_operand 0 "" "")
|
||||||
(call (mem:QI (match_operand:SI 1 "constant_call_address_operand" ""))
|
(call (mem:QI (match_operand:SI 1 "constant_call_address_operand" ""))
|
||||||
|
|
Loading…
Reference in New Issue