(clobbers_to): Deleted.

(call_internal, call_value_internal): New patterns.
(call, call_value): Just call new patterns and a29k_clobbers_to.

From-SVN: r7277
This commit is contained in:
Richard Kenner 1994-05-11 16:50:50 -04:00
parent f5fa450784
commit c5bd3be879

View File

@ -111,39 +111,28 @@
;; CALLI
;;
;; Start with a subroutine to write out CLOBBERs starting at lr2 up to,
;; but not including, the next parameter register. If operand[0] is null,
;; it means that all the argument registers have been used.
(define_expand "clobbers_to"
[(clobber (match_operand:SI 0 "" ""))]
""
"
{
int i;
int high_regno;
if (operands[0] == 0)
high_regno = R_LR (18);
else if (GET_CODE (operands[0]) != REG || REGNO (operands[0]) < R_LR (0)
|| REGNO (operands[0]) > R_LR (18))
abort ();
else
high_regno = REGNO (operands[0]);
for (i = R_LR (2); i < high_regno; i++)
emit_insn (gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, i)));
DONE;
}")
;; Each call pattern is duplicated so that we can add CLOBBERs to the
;; resulting insn.
;;
;; We indicate that LR0 is clobbered in the CALL_INSN itself. Otherwise,
;; reorg will think it is just clobbered by the called function.
(define_expand "call"
[(use (match_operand:SI 0 "" ""))
(use (match_operand 1 "" ""))
(use (match_operand 2 "" ""))]
""
"
{ rtx insn = emit_call_insn (gen_call_internal (operands[0], operands[1]));
a29k_clobbers_to (insn, operands[2]);
DONE;
}")
(define_expand "call_internal"
[(parallel [(call (match_operand:SI 0 "" "")
(match_operand 1 "" ""))
(clobber (scratch:SI))])
(match_operand 2 "" "")]
(clobber (scratch:SI))])]
""
"
{
@ -156,16 +145,27 @@
&& GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
operands[0] = gen_rtx (MEM, SImode,
force_reg (Pmode, XEXP (operands[0], 0)));
operands[2] = gen_clobbers_to (operands[2]);
}")
(define_expand "call_value"
[(use (match_operand:SI 0 "gpc_reg_operand" ""))
(use (match_operand:SI 1 "" ""))
(use (match_operand 2 "" ""))
(use (match_operand 3 "" ""))]
""
"
{ rtx insn = emit_call_insn (gen_call_value_internal (operands[0], operands[1],
operands[2]));
a29k_clobbers_to (insn, operands[3]);
DONE;
}")
(define_expand "call_value_internal"
[(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "")
(call (match_operand:SI 1 "" "")
(match_operand 2 "" "")))
(clobber (scratch:SI))])
(match_operand 3 "" "")]
(clobber (scratch:SI))])]
""
"
{
@ -179,7 +179,6 @@
operands[1] = gen_rtx (MEM, SImode,
force_reg (Pmode, XEXP (operands[1], 0)));
operands[3] = gen_clobbers_to (operands[3]);
}")
(define_insn ""