OSDN Git Service

(complemented_arith_operand): New function.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Jan 1997 02:10:52 +0000 (02:10 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Jan 1997 02:10:52 +0000 (02:10 +0000)
(print_operand): Handle `e' for CONST_INT.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13486 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/mips/mips.c

index eaf24c2..ffc254a 100644 (file)
@@ -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)