From 50c0000cab7ccd3ab9d80db214e7e8b1986c39db Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 9 May 1993 16:41:22 +0000 Subject: (call_insn_operand): New function. From-SVN: r4398 --- gcc/config/mips/mips.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'gcc') 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 -- cgit v1.1