From: Jim Wilson Date: Thu, 28 Apr 1994 22:58:53 +0000 (-0700) Subject: (arith_double_operand): Modify to accept all possible constants. X-Git-Tag: misc/cutover-egcs-0~6771 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23b8a89f2f966d75111f507c9ff7d8897f0b3763;p=thirdparty%2Fgcc.git (arith_double_operand): Modify to accept all possible constants. From-SVN: r7172 --- diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 7b909974b97e..07800853fdcf 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -387,9 +387,9 @@ arith_operand (op, mode) || (GET_CODE (op) == CONST_INT && SMALL_INT (op))); } -/* Return true if OP is a register, or is a CONST_INT or CONST_DOUBLE that - can fit in a 13 bit immediate field. This is an acceptable DImode operand - for most 3 address instructions. */ +/* Return true if OP is a register, is a CONST_INT that fits in a 13 bit + immediate field, or is a CONST_DOUBLE whose both parts fit in a 13 bit + immediate field. */ int arith_double_operand (op, mode) @@ -397,16 +397,10 @@ arith_double_operand (op, mode) enum machine_mode mode; { return (register_operand (op, mode) + || (GET_CODE (op) == CONST_INT && SMALL_INT (op)) || (GET_CODE (op) == CONST_DOUBLE - && (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode) && (unsigned) (CONST_DOUBLE_LOW (op) + 0x1000) < 0x2000 - && ((CONST_DOUBLE_HIGH (op) == -1 - && (CONST_DOUBLE_LOW (op) & 0x1000) == 0x1000) - || (CONST_DOUBLE_HIGH (op) == 0 - && (CONST_DOUBLE_LOW (op) & 0x1000) == 0))) - || (GET_CODE (op) == CONST_INT - && (GET_MODE (op) == mode || GET_MODE (op) == VOIDmode) - && (unsigned) (INTVAL (op) + 0x1000) < 0x2000)); + && (unsigned) (CONST_DOUBLE_HIGH (op) + 0x1000) < 0x2000)); } /* Return truth value of whether OP is a integer which fits the