diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-01 16:14:58 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-01 16:14:58 +0000 |
commit | 1ac3dc37c00cc057c1e9e23025708199d4730678 (patch) | |
tree | 5aabdc2c0749cc2bdd4aee71e4a65c91d31a84ec /gcc/unroll.c | |
parent | 21b005edccf01c883a6f989f701c2273a774dc3e (diff) | |
download | gcc-1ac3dc37c00cc057c1e9e23025708199d4730678.tar.gz |
* config/rs6000/rs6000.c (num_insns_constant_wide): Correct
for type promotion.
(add_operand): Get test correct for 64-bit HOST_WIDE_INT.
(non_add_cint_operand): Likewise.
(logical_operand): Likewise.
(non_logical_cint_operand): Likewise.
(print_operand): Correct printf()s for 64-bit HOST_WIDE_INT.
(print_operand_address): Correct printf() for 64-bit HOST_WIDE_INT.
(rs6000_select_rtx_section): Suppress warning.
(small_data_operand): Suppress warning.
(rs6000_got_register): Suppress warning.
* config/rs6000/rs6000.md (andsi3): HOST_WIDE_INT is a signed
type, so `J' is generally the wrong constraint for a SImode value;
use `L' instead.
(andsi3_internal2): Likewise.
(andsi3_internal3): Likewise.
(iorsi3_internal1): Likewise.
(xorsi3_internal1): Likewise.
(movsi): Likewise.
(movsf_softfloat): Likewise.
various unnamed compare insns: Likewise.
(movsi+2): Preserve sign bits of SImode constant.
(floatsidf2_internal+1): Sign-extend SImode constant correctly.
(movdf+1): Preserve high bits of DFmode constant.
(movdi_32+1): Sign-extend properly.
various unnamed compare insns: Sign-extend properly.
* unroll.c (loop_iterations): Convert HOST_WIDE_INT to unsigned
properly for mode.
* expmed.c (expand_mult_highpart): Convert HOST_WIDE_INT from unsigned
properly for mode.
(expand_divmod): Likewise.
* optabs.c (expand_fix): Keep HOST_WIDE_INT constants properly signed.
(expand_binop): Sometimes there is work to do when changing
the mode of a CONST_INT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28375 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index d6dbcf0fbc1..7ce3a38d6b3 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -3588,6 +3588,7 @@ loop_iterations (loop_start, loop_end, loop_info) rtx comparison, comparison_value; rtx iteration_var, initial_value, increment, final_value; enum rtx_code comparison_code; + enum machine_mode comparison_mode; HOST_WIDE_INT abs_inc; unsigned HOST_WIDE_INT abs_diff; int off_by_one; @@ -3652,6 +3653,7 @@ loop_iterations (loop_start, loop_end, loop_info) invariant register when it canonicalizes the comparison. */ comparison_code = GET_CODE (comparison); + comparison_mode = GET_MODE (comparison); iteration_var = XEXP (comparison, 0); comparison_value = XEXP (comparison, 1); @@ -3991,6 +3993,10 @@ loop_iterations (loop_start, loop_end, loop_info) else abort (); + /* It may be that comparison_mode is smaller than a HOST_WIDE_INT, + for instance on a 64-bit host when comparison_mode is SImode. */ + abs_diff &= GET_MODE_MASK (comparison_mode); + /* For NE tests, make sure that the iteration variable won't miss the final value. If abs_diff mod abs_incr is not zero, then the iteration variable will overflow before the loop exits, and we |