From bd96cb7805f5674f8c582908b43a6a98c2b7f72c Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 12 May 1993 04:55:12 +0000 Subject: [PATCH] (call, call_value): Copy fn address to safe reg if necessary. (call, call_value matchers): Use call_insn_operand as predicate. From-SVN: r4429 --- gcc/config/i860/i860.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/config/i860/i860.md b/gcc/config/i860/i860.md index e7226cbdf6c..f53b9ce5797 100644 --- a/gcc/config/i860/i860.md +++ b/gcc/config/i860/i860.md @@ -2116,6 +2116,11 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; "" " { + /* Make sure the address is just one reg and will stay that way. */ + if (! call_insn_operand (operands[0], QImode)) + operands[0] + = change_address (operands[0], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); if (INTVAL (operands[1]) > 0) { emit_move_insn (arg_pointer_rtx, stack_pointer_rtx); @@ -2125,7 +2130,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; ;;- jump to subroutine (define_insn "" - [(call (match_operand:SI 0 "memory_operand" "m") + [(call (match_operand:SI 0 "call_insn_operand" "m") (match_operand 1 "" "i"))] ;; operand[2] is next_arg_register "" @@ -2158,7 +2163,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; (define_peephole [(set (match_operand:SI 0 "memory_operand" "=m") (match_operand:SI 1 "reg_or_0_operand" "rfJ")) - (call (match_operand:SI 2 "memory_operand" "m") + (call (match_operand:SI 2 "call_insn_operand" "m") (match_operand 3 "" "i"))] ;;- Don't use operand 1 for most machines. "" @@ -2179,6 +2184,11 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; "" " { + /* Make sure the address is just one reg and will stay that way. */ + if (! call_insn_operand (operands[1], QImode)) + operands[1] + = change_address (operands[1], VOIDmode, + copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); if (INTVAL (operands[2]) > 0) { emit_move_insn (arg_pointer_rtx, stack_pointer_rtx); @@ -2188,7 +2198,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; (define_insn "" [(set (match_operand 0 "register_operand" "=rf") - (call (match_operand:SI 1 "memory_operand" "m") + (call (match_operand:SI 1 "call_insn_operand" "m") (match_operand 2 "" "i")))] ;; operand 3 is next_arg_register "" @@ -2206,7 +2216,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; [(set (match_operand:SI 0 "register_operand" "=rf") (match_operand:SI 1 "single_insn_src_p" "gfG")) (set (match_operand 2 "" "=rf") - (call (match_operand:SI 3 "memory_operand" "m") + (call (match_operand:SI 3 "call_insn_operand" "m") (match_operand 4 "" "i")))] ;;- Don't use operand 4 for most machines. "! reg_mentioned_p (operands[0], operands[3])" @@ -2223,7 +2233,7 @@ fmul.ss %1,%0,%4\;fmul.ss %3,%4,%0\"; [(set (match_operand:SI 0 "memory_operand" "=m") (match_operand:SI 1 "reg_or_0_operand" "rJf")) (set (match_operand 2 "" "=rf") - (call (match_operand:SI 3 "memory_operand" "m") + (call (match_operand:SI 3 "call_insn_operand" "m") (match_operand 4 "" "i")))] ;;- Don't use operand 4 for most machines. "" -- 2.30.2