diff options
author | Richard Stallman <rms@gnu.org> | 1993-05-09 04:56:08 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-05-09 04:56:08 +0000 |
commit | fee2770d39a87ebacc4537e7536e8a05f6f54f7b (patch) | |
tree | ea758c0c12b909432eb1af0e0b185c7e8f77bf62 /gcc | |
parent | 6b7e6ce457116a624b5645e0a523d12cddc3c2b6 (diff) | |
download | gcc-fee2770d39a87ebacc4537e7536e8a05f6f54f7b.zip gcc-fee2770d39a87ebacc4537e7536e8a05f6f54f7b.tar.gz gcc-fee2770d39a87ebacc4537e7536e8a05f6f54f7b.tar.bz2 |
(call_insn_operand): New function.
From-SVN: r4393
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/i386.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index fe85584..7aecf5c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -514,6 +514,26 @@ symbolic_operand (op, mode) return 0; } } + +/* 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; +} /* Returns 1 if OP contains a symbol reference */ |