aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-09 16:41:47 +0000
committerRichard Stallman <rms@gnu.org>1993-05-09 16:41:47 +0000
commit322dce453ac05ed5da517eb09acef12196f87ecc (patch)
treefaa17aa5129165a679af356877b936c09d2a9e8a
parent50c0000cab7ccd3ab9d80db214e7e8b1986c39db (diff)
downloadgcc-322dce453ac05ed5da517eb09acef12196f87ecc.zip
gcc-322dce453ac05ed5da517eb09acef12196f87ecc.tar.gz
gcc-322dce453ac05ed5da517eb09acef12196f87ecc.tar.bz2
(call_internal1, call_value_internal1): Use call_insn_operand.
(call, call_value): Copy fn address to safe reg if necessary. From-SVN: r4399
-rw-r--r--gcc/config/mips/mips.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 884464f..2da9db7 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -4054,8 +4054,9 @@ move\\t%0,%z4\\n\\
if (operands[0]) /* eliminate unused code warnings */
{
addr = XEXP (operands[0], 0);
- if (GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr) || TARGET_LONG_CALLS))
- XEXP (operands[0], 0) = force_reg (FUNCTION_MODE, addr);
+ if ((GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr) || TARGET_LONG_CALLS))
+ || ! call_insn_operand (operands[0], VOIDmode))
+ XEXP (operands[0], 0) = copy_to_mode_reg (Pmode, addr);
/* In order to pass small structures by value in registers
compatibly with the MIPS compiler, we need to shift the value
@@ -4081,7 +4082,7 @@ move\\t%0,%z4\\n\\
}")
(define_insn "call_internal1"
- [(call (match_operand 0 "memory_operand" "m")
+ [(call (match_operand 0 "call_insn_operand" "m")
(match_operand 1 "" "i"))
(clobber (match_operand:SI 2 "register_operand" "=d"))]
"!TARGET_LONG_CALLS"
@@ -4135,8 +4136,9 @@ move\\t%0,%z4\\n\\
if (operands[0]) /* eliminate unused code warning */
{
addr = XEXP (operands[1], 0);
- if (GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr) || TARGET_LONG_CALLS))
- XEXP (operands[1], 0) = force_reg (FUNCTION_MODE, addr);
+ if ((GET_CODE (addr) != REG && (!CONSTANT_ADDRESS_P (addr) || TARGET_LONG_CALLS))
+ || ! call_insn_operand (operands[1], VOIDmode))
+ XEXP (operands[1], 0) = copy_to_mode_reg (Pmode, addr);
/* In order to pass small structures by value in registers
compatibly with the MIPS compiler, we need to shift the value
@@ -4165,7 +4167,7 @@ move\\t%0,%z4\\n\\
(define_insn "call_value_internal1"
[(set (match_operand 0 "register_operand" "=df")
- (call (match_operand 1 "memory_operand" "m")
+ (call (match_operand 1 "call_insn_operand" "m")
(match_operand 2 "" "i")))
(clobber (match_operand:SI 3 "register_operand" "=d"))]
"!TARGET_LONG_CALLS"