diff options
author | Geoff Keating <geoffk@cygnus.com> | 1999-08-01 16:14:58 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 1999-08-01 16:14:58 +0000 |
commit | 465e27163d08d2e8b1d962fb2892ffd3eaf5dd90 (patch) | |
tree | 5aabdc2c0749cc2bdd4aee71e4a65c91d31a84ec /gcc/optabs.c | |
parent | 3f1d071b7b4c15eb5f5eae95bcbab3e57e3a51c8 (diff) | |
download | gcc-465e27163d08d2e8b1d962fb2892ffd3eaf5dd90.zip gcc-465e27163d08d2e8b1d962fb2892ffd3eaf5dd90.tar.gz gcc-465e27163d08d2e8b1d962fb2892ffd3eaf5dd90.tar.bz2 |
rs6000.c (num_insns_constant_wide): Correct for type promotion.
* 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.
From-SVN: r28375
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 2b9091b..bad2776 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -857,12 +857,12 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods) /* In case the insn wants input operands in modes different from the result, convert the operands. */ - if (GET_MODE (op0) != VOIDmode + if ((GET_MODE (op0) != VOIDmode || GET_CODE (op0) == CONST_INT) && GET_MODE (op0) != mode0 && mode0 != VOIDmode) xop0 = convert_to_mode (mode0, xop0, unsignedp); - if (GET_MODE (xop1) != VOIDmode + if ((GET_MODE (xop1) != VOIDmode || GET_CODE (xop1) == CONST_INT) && GET_MODE (xop1) != mode1 && mode1 != VOIDmode) xop1 = convert_to_mode (mode1, xop1, unsignedp); @@ -4231,7 +4231,7 @@ expand_fix (to, from, unsignedp) NULL_RTX, 0, OPTAB_LIB_WIDEN); expand_fix (to, target, 0); target = expand_binop (GET_MODE (to), xor_optab, to, - GEN_INT ((HOST_WIDE_INT) 1 << (bitsize - 1)), + GEN_INT ((HOST_WIDE_INT) -1 << (bitsize - 1)), to, 1, OPTAB_LIB_WIDEN); if (target != to) |