From 10f144412d05e3f1effffb6ddeb79c64f2f84705 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Sun, 12 Jan 1997 18:10:52 -0800 Subject: (complemented_arith_operand): New function. (print_operand): Handle `e' for CONST_INT. From-SVN: r13486 --- gcc/config/mips/mips.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gcc') 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) -- cgit v1.1