diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-04-28 15:58:53 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-04-28 15:58:53 -0700 |
commit | 23b8a89f2f966d75111f507c9ff7d8897f0b3763 (patch) | |
tree | f6236f90d4b03873cf2408a24f02dcac1383d25e /gcc | |
parent | 39211cd56bd4dde4a79daeb140c66d1a0b06e0aa (diff) | |
download | gcc-23b8a89f2f966d75111f507c9ff7d8897f0b3763.zip gcc-23b8a89f2f966d75111f507c9ff7d8897f0b3763.tar.gz gcc-23b8a89f2f966d75111f507c9ff7d8897f0b3763.tar.bz2 |
(arith_double_operand): Modify to accept all possible constants.
From-SVN: r7172
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/sparc/sparc.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 7b90997..0780085 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 |