diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1996-10-06 18:13:02 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1996-10-06 18:13:02 +0000 |
commit | a651f22233b5d950f4ba26d20c1c7b1d54b201c0 (patch) | |
tree | b5a61d56db0294506331e90cf74f88fc9a46a6cc /gcc | |
parent | f508963359e6f3c084f2288e9359f48d4c7970bc (diff) | |
download | gcc-a651f22233b5d950f4ba26d20c1c7b1d54b201c0.zip gcc-a651f22233b5d950f4ba26d20c1c7b1d54b201c0.tar.gz gcc-a651f22233b5d950f4ba26d20c1c7b1d54b201c0.tar.bz2 |
Use split_double to break apart CONST_DOUBLEs
From-SVN: r12907
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 7f9d6a9..e80f66e 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5583,8 +5583,7 @@ { operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); - operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); - operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); + split_double (operands[1], &operands[4], &operands[5]); }") (define_split @@ -5596,11 +5595,16 @@ (set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))] " { - HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); - HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); + rtx high_rtx, low_rtx; + HOST_WIDE_INT high; + HOST_WIDE_INT low; rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); rtx low_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); + split_double (operands[1], &high_rtx, &low_rtx); + high = INTVAL (high_rtx); + low = INTVAL (low_rtx); + if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000) || (low & 0xffff) == 0) { @@ -5630,8 +5634,13 @@ (set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))] " { - HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); - HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); + rtx high_rtx, low_rtx; + HOST_WIDE_INT high; + HOST_WIDE_INT low; + + split_double (operands[1], &high_rtx, &low_rtx); + high = INTVAL (high_rtx); + low = INTVAL (low_rtx); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); @@ -5793,8 +5802,10 @@ if (GET_CODE (operands[1]) == CONST_DOUBLE) { - low = CONST_DOUBLE_LOW (operands[1]); - high = CONST_DOUBLE_HIGH (operands[1]); + rtx high_rtx, low_rtx; + split_double (operands[1], &high_rtx, &low_rtx); + high = INTVAL (high_rtx); + low = INTVAL (low_rtx); } else #if HOST_BITS_PER_WIDE_INT == 32 @@ -5932,8 +5943,7 @@ { operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); - operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); - operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); + split_double (operands[1], &operands[4], &operands[5]); }") (define_split @@ -5945,11 +5955,16 @@ (set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))] " { - HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); - HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); + rtx high_rtx, low_rtx; + HOST_WIDE_INT high; + HOST_WIDE_INT low; rtx high_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); rtx low_reg = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); + split_double (operands[1], &high_rtx, &low_rtx); + high = INTVAL (high_rtx); + low = INTVAL (low_rtx); + if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000) || (low & 0xffff) == 0) { @@ -5979,8 +5994,13 @@ (set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))] " { - HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); - HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); + rtx high_rtx, low_rtx; + HOST_WIDE_INT high; + HOST_WIDE_INT low; + + split_double (operands[1], &high_rtx, &low_rtx); + high = INTVAL (high_rtx); + low = INTVAL (low_rtx); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); @@ -6042,8 +6062,10 @@ if (GET_CODE (operands[1]) == CONST_DOUBLE) { - low = CONST_DOUBLE_LOW (operands[1]); - high = CONST_DOUBLE_HIGH (operands[1]); + rtx high_rtx, low_rtx; + split_double (operands[1], &high_rtx, &low_rtx); + high = INTVAL (high_rtx); + low = INTVAL (low_rtx); } else #if HOST_BITS_PER_WIDE_INT == 32 |