aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-05-09 16:41:22 +0000
committerRichard Stallman <rms@gnu.org>1993-05-09 16:41:22 +0000
commit50c0000cab7ccd3ab9d80db214e7e8b1986c39db (patch)
tree3b64e05c54e1738d828310d8f622b75877876cff
parent008660af801c9598d7cda9204feebbee4324473a (diff)
downloadgcc-50c0000cab7ccd3ab9d80db214e7e8b1986c39db.zip
gcc-50c0000cab7ccd3ab9d80db214e7e8b1986c39db.tar.gz
gcc-50c0000cab7ccd3ab9d80db214e7e8b1986c39db.tar.bz2
(call_insn_operand): New function.
From-SVN: r4398
-rw-r--r--gcc/config/mips/mips.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 1bf3d2d..89c3403 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -690,6 +690,25 @@ pc_or_label_operand (op, mode)
return FALSE;
}
+/* Test for a valid operand for a call instruction.
+ Don't allow the arg pointer register or virtual regs
+ since they may change into reg + const, which the patterns
+ can't handle yet. */
+
+int
+call_insn_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ if (GET_CODE (op) == MEM
+ && (CONSTANT_ADDRESS_P (XEXP (op, 0))
+ || (GET_CODE (XEXP (op, 0)) == REG
+ && XEXP (op, 0) != arg_pointer_rtx
+ && !(REGNO (XEXP (op, 0)) >= FIRST_PSEUDO_REGISTER
+ && REGNO (XEXP (op, 0)) <= LAST_VIRTUAL_REGISTER))))
+ return 1;
+ return 0;
+}
/* Return an operand string if the given instruction's delay slot or
wrap it in a .set noreorder section. This is for filling delay