diff options
author | Anatoly Sokolov <aesok@post.ru> | 2010-04-20 20:33:46 +0400 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2010-04-20 20:33:46 +0400 |
commit | 54fb1ae03e7eda76d322545955cd128412887d23 (patch) | |
tree | fc2fe7aa9ff67f2d7f7bb70f4b04a3ccb15037d4 /gcc/builtins.c | |
parent | e4ba7a600e70bce0065a2fde0f2f85cdee746cfb (diff) | |
download | gcc-54fb1ae03e7eda76d322545955cd128412887d23.zip gcc-54fb1ae03e7eda76d322545955cd128412887d23.tar.gz gcc-54fb1ae03e7eda76d322545955cd128412887d23.tar.bz2 |
double-int.h (double_int_setbit): Declare.
* double-int.h (double_int_setbit): Declare.
* double-int.c (double_int_setbit): New function.
* rtl.h (immed_double_int_const): Declare.
* emit-rtl.c (immed_double_int_const): New function.
* builtins.c (expand_builtin_signbit): Clean up, use double_int_*
and immed_double_int_const functions.
* optabs.c (expand_absneg_bit, expand_copysign_absneg,
expand_copysign_bit): (Ditto.).
* simplify-rtx.c (simplify_binary_operation_1): (Ditto.).
* tree-ssa-address.c (addr_for_mem_ref): (Ditto.).
* dojump.c (prefer_and_bit_test): (Ditto.).
* expr.c (convert_modes, reduce_to_bit_field_precision,
const_vector_from_tree): (Ditto.).
* expmed.c (mask_rtx, lshift_value): (Ditto.).
From-SVN: r158566
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index dbab484..65940dd 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5279,7 +5279,6 @@ expand_builtin_signbit (tree exp, rtx target) { const struct real_format *fmt; enum machine_mode fmode, imode, rmode; - HOST_WIDE_INT hi, lo; tree arg; int word, bitpos; enum insn_code icode; @@ -5355,21 +5354,12 @@ expand_builtin_signbit (tree exp, rtx target) if (bitpos < GET_MODE_BITSIZE (rmode)) { - if (bitpos < HOST_BITS_PER_WIDE_INT) - { - hi = 0; - lo = (HOST_WIDE_INT) 1 << bitpos; - } - else - { - hi = (HOST_WIDE_INT) 1 << (bitpos - HOST_BITS_PER_WIDE_INT); - lo = 0; - } + double_int mask = double_int_setbit (double_int_zero, bitpos); if (GET_MODE_SIZE (imode) > GET_MODE_SIZE (rmode)) temp = gen_lowpart (rmode, temp); temp = expand_binop (rmode, and_optab, temp, - immed_double_const (lo, hi, rmode), + immed_double_int_const (mask, rmode), NULL_RTX, 1, OPTAB_LIB_WIDEN); } else |