diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1996-10-10 19:33:48 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1996-10-10 19:33:48 +0000 |
commit | f6968f594933500e3edde4d445146894796ea2d9 (patch) | |
tree | 1f94cfb6eb0f7fc0b3ed4e10e781a0e65a8a5de9 | |
parent | 2eaa1d7ed6aa7a0b287d225c5176404b412b5264 (diff) | |
download | gcc-f6968f594933500e3edde4d445146894796ea2d9.zip gcc-f6968f594933500e3edde4d445146894796ea2d9.tar.gz gcc-f6968f594933500e3edde4d445146894796ea2d9.tar.bz2 |
Fix last change; fix large stack frames and int->double conversion
From-SVN: r12944
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 97 |
1 files changed, 35 insertions, 62 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 795afca..b24704e 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -3741,18 +3741,20 @@ "* { rtx indx; + HOST_WIDE_INT offset = rs6000_fpmem_offset; if (rs6000_fpmem_offset > 32760) - indx = operands[1]; + { + indx = operands[1]; + offset &= 0xffff; + } else if (frame_pointer_needed) indx = frame_pointer_rtx; else indx = stack_pointer_rtx; operands[2] = gen_rtx (MEM, SImode, - gen_rtx (PLUS, Pmode, - indx, - GEN_INT (rs6000_fpmem_offset))); + gen_rtx (PLUS, Pmode, indx, GEN_INT (offset))); return \"lfd %0,%2\"; }" @@ -5583,7 +5585,14 @@ { operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); - split_double (operands[1], &operands[4], &operands[5]); + +#ifdef HOST_WORDS_BIG_ENDIAN + operands[4] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); + operands[5] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); +#else + operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); + operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); +#endif }") (define_split @@ -5595,15 +5604,18 @@ (set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))] " { - 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); +#ifdef HOST_WORDS_BIG_ENDIAN + high = CONST_DOUBLE_LOW (operands[1]); + low = CONST_DOUBLE_HIGH (operands[1]); +#else + high = CONST_DOUBLE_HIGH (operands[1]); + low = CONST_DOUBLE_LOW (operands[1]); +#endif if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000) || (low & 0xffff) == 0) @@ -5634,13 +5646,8 @@ (set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))] " { - 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); + HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); + HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); @@ -5802,10 +5809,8 @@ if (GET_CODE (operands[1]) == CONST_DOUBLE) { - rtx high_rtx, low_rtx; - split_double (operands[1], &high_rtx, &low_rtx); - high = INTVAL (high_rtx); - low = INTVAL (low_rtx); + low = CONST_DOUBLE_LOW (operands[1]); + high = CONST_DOUBLE_HIGH (operands[1]); } else #if HOST_BITS_PER_WIDE_INT == 32 @@ -5943,7 +5948,8 @@ { operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); - split_double (operands[1], &operands[4], &operands[5]); + operands[4] = GEN_INT (CONST_DOUBLE_HIGH (operands[1])); + operands[5] = GEN_INT (CONST_DOUBLE_LOW (operands[1])); }") (define_split @@ -5955,26 +5961,10 @@ (set (match_dup 2) (ior:SI (match_dup 2) (match_dup 6)))] " { - rtx high_rtx, low_rtx; - HOST_WIDE_INT high; - HOST_WIDE_INT low; - rtx high_reg, low_reg; - - if (WORDS_BIG_ENDIAN) - { - high_reg = gen_rtx (SUBREG, SImode, operands[0], 0); - low_reg = gen_rtx (SUBREG, SImode, operands[0], 1); - split_double (operands[1], &high_rtx, &low_rtx); - } - else - { - high_reg = gen_rtx (SUBREG, SImode, operands[0], 1); - low_reg = gen_rtx (SUBREG, SImode, operands[0], 0); - split_double (operands[1], &low_rtx, &high_rtx); - } - - high = INTVAL (high_rtx); - low = INTVAL (low_rtx); + HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); + HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); + 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); if (((unsigned HOST_WIDE_INT) (low + 0x8000) < 0x10000) || (low & 0xffff) == 0) @@ -6005,23 +5995,8 @@ (set (match_dup 3) (ior:SI (match_dup 3) (match_dup 7)))] " { - rtx high_rtx, low_rtx; - HOST_WIDE_INT high; - HOST_WIDE_INT low; - rtx high_reg, low_reg; - - if (WORDS_BIG_ENDIAN) - { - high_reg = gen_rtx (SUBREG, SImode, operands[0], 0); - low_reg = gen_rtx (SUBREG, SImode, operands[0], 1); - split_double (operands[1], &high_rtx, &low_rtx); - } - else - { - high_reg = gen_rtx (SUBREG, SImode, operands[0], 1); - low_reg = gen_rtx (SUBREG, SImode, operands[0], 0); - split_double (operands[1], &low_rtx, &high_rtx); - } + HOST_WIDE_INT high = CONST_DOUBLE_HIGH (operands[1]); + HOST_WIDE_INT low = CONST_DOUBLE_LOW (operands[1]); operands[2] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN == 0); operands[3] = gen_rtx (SUBREG, SImode, operands[0], WORDS_BIG_ENDIAN != 0); @@ -6083,10 +6058,8 @@ if (GET_CODE (operands[1]) == CONST_DOUBLE) { - rtx high_rtx, low_rtx; - split_double (operands[1], &high_rtx, &low_rtx); - high = INTVAL (high_rtx); - low = INTVAL (low_rtx); + low = CONST_DOUBLE_LOW (operands[1]); + high = CONST_DOUBLE_HIGH (operands[1]); } else #if HOST_BITS_PER_WIDE_INT == 32 |