Commit 50c0000c by Richard Stallman

(call_insn_operand): New function.

From-SVN: r4398
parent 008660af
...@@ -690,6 +690,25 @@ pc_or_label_operand (op, mode) ...@@ -690,6 +690,25 @@ pc_or_label_operand (op, mode)
return FALSE; 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 /* Return an operand string if the given instruction's delay slot or
wrap it in a .set noreorder section. This is for filling delay wrap it in a .set noreorder section. This is for filling delay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment