diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1997-01-12 18:10:52 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1997-01-12 18:10:52 -0800 |
commit | 10f144412d05e3f1effffb6ddeb79c64f2f84705 (patch) | |
tree | 129755f37aa2f2e6cf6fdb4a9798fb91f901ce74 | |
parent | 77a8368ea3251a9f331100de6c077f0c783c473d (diff) | |
download | gcc-10f144412d05e3f1effffb6ddeb79c64f2f84705.zip gcc-10f144412d05e3f1effffb6ddeb79c64f2f84705.tar.gz gcc-10f144412d05e3f1effffb6ddeb79c64f2f84705.tar.bz2 |
(complemented_arith_operand): New function.
(print_operand): Handle `e' for CONST_INT.
From-SVN: r13486
-rw-r--r-- | gcc/config/mips/mips.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index eaf24c2..ffc254a 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -386,6 +386,21 @@ uns_arith_operand (op, mode) } /* Return truth value of whether OP can be used as an operands + where a register or complemented 16 bit unsigned integer is needed. */ + +int +complemented_arith_operand (op, mode) + rtx op; + enum machine_mode mode; +{ + if (GET_CODE (op) == CONST_INT + && (~ (unsigned HOST_WIDE_INT) INTVAL (op) < 0x10000)) + return TRUE; + + return register_operand (op, mode); +} + +/* Return truth value of whether OP can be used as an operands where a 16 bit integer is needed */ int @@ -4130,6 +4145,9 @@ print_operand (file, op, letter) else if ((letter == 'd') && (GET_CODE(op) == CONST_INT)) fprintf (file, "%d", (INTVAL(op))); + else if ((letter == 'e') && (GET_CODE(op) == CONST_INT)) + fprintf (file, "%d", ~(INTVAL(op))); + else if (letter == 'z' && (GET_CODE (op) == CONST_INT) && INTVAL (op) == 0) |