summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rwxr-xr-xgcc/bitmap.c22
-rwxr-xr-xgcc/bitmap.h20
-rwxr-xr-xgcc/c-decl.c2
-rwxr-xr-xgcc/c-lex.c24
-rwxr-xr-xgcc/c-typeck.c6
-rwxr-xr-xgcc/combine.c110
-rwxr-xr-xgcc/config/arm/thumb.c6
-rwxr-xr-xgcc/config/arm/thumb.h28
-rwxr-xr-xgcc/config/arm/thumb.md10
-rwxr-xr-xgcc/cppexp.c2
-rwxr-xr-xgcc/cse.c58
-rwxr-xr-xgcc/expmed.c104
-rwxr-xr-xgcc/expr.c6
-rwxr-xr-xgcc/fold-const.c76
-rwxr-xr-xgcc/gcse.c2
-rwxr-xr-xgcc/hard-reg-set.h2
-rwxr-xr-xgcc/hwint.h96
-rwxr-xr-xgcc/jump.c4
-rwxr-xr-xgcc/libgcc2.c221
-rwxr-xr-xgcc/loop.c24
-rwxr-xr-xgcc/loop.h8
-rwxr-xr-xgcc/machmode.h79
-rwxr-xr-xgcc/real.c54
-rwxr-xr-xgcc/real.h6
-rwxr-xr-xgcc/regmove.c2
-rwxr-xr-xgcc/rtl.c6
-rwxr-xr-xgcc/rtl.h12
-rwxr-xr-xgcc/sbitmap.h2
-rwxr-xr-xgcc/stmt.c2
-rwxr-xr-xgcc/stor-layout.c2
-rwxr-xr-xgcc/toplev.c4
-rwxr-xr-xgcc/tree.c14
-rwxr-xr-xgcc/tree.h32
-rwxr-xr-xgcc/unroll.c22
-rwxr-xr-xgcc/varray.h4
35 files changed, 347 insertions, 725 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 10bad84..e6bd84a 100755
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -290,7 +290,7 @@ bitmap_find_bit (head, bit)
unsigned int bit;
{
bitmap_element *element;
- unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS;
+ HOST_WIDE_UINT indx = bit / BITMAP_ELEMENT_ALL_BITS;
if (head->current == 0)
return 0;
@@ -331,7 +331,7 @@ bitmap_clear_bit (head, bit)
unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT;
unsigned word_num = ((bit / (unsigned) HOST_BITS_PER_WIDE_INT)
% BITMAP_ELEMENT_WORDS);
- ptr->bits[word_num] &= ~ (((unsigned HOST_WIDE_INT) 1) << bit_num);
+ ptr->bits[word_num] &= ~ (((HOST_WIDE_UINT) 1) << bit_num);
/* If we cleared the entire word, free up the element */
if (bitmap_element_zerop (ptr))
@@ -351,7 +351,7 @@ bitmap_set_bit (head, bit)
unsigned word_num
= ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS);
unsigned bit_num = bit % (unsigned) HOST_BITS_PER_WIDE_INT;
- unsigned HOST_WIDE_INT bit_val = ((unsigned HOST_WIDE_INT) 1) << bit_num;
+ HOST_WIDE_UINT bit_val = ((HOST_WIDE_UINT) 1) << bit_num;
if (ptr == 0)
{
@@ -384,7 +384,7 @@ bitmap_bit_p (head, bit)
= ((bit / (unsigned) HOST_BITS_PER_WIDE_INT) % BITMAP_ELEMENT_WORDS);
return
- (ptr->bits[word_num] & (((unsigned HOST_WIDE_INT) 1) << bit_num)) != 0;
+ (ptr->bits[word_num] & (((HOST_WIDE_UINT) 1) << bit_num)) != 0;
}
/* Store in bitmap TO the result of combining bitmap FROM1 and
@@ -401,9 +401,9 @@ bitmap_operation (to, from1, from2, operation)
bitmap_element *from1_ptr = from1->first;
bitmap_element *from2_ptr = from2->first;
unsigned int indx1
- = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
+ = (from1_ptr) ? from1_ptr->indx : ~ (HOST_WIDE_UINT) 0;
unsigned int indx2
- = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
+ = (from2_ptr) ? from2_ptr->indx : ~ (HOST_WIDE_UINT) 0;
bitmap_element *to_ptr = 0;
bitmap_element *from1_tmp;
bitmap_element *from2_tmp;
@@ -432,9 +432,9 @@ bitmap_operation (to, from1, from2, operation)
from1_tmp = from1_ptr;
from2_tmp = from2_ptr;
from1_ptr = from1_ptr->next;
- indx1 = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
+ indx1 = (from1_ptr) ? from1_ptr->indx : ~ (HOST_WIDE_UINT) 0;
from2_ptr = from2_ptr->next;
- indx2 = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
+ indx2 = (from2_ptr) ? from2_ptr->indx : ~ (HOST_WIDE_UINT) 0;
}
else if (indx1 < indx2)
{
@@ -442,7 +442,7 @@ bitmap_operation (to, from1, from2, operation)
from1_tmp = from1_ptr;
from2_tmp = &bitmap_zero;
from1_ptr = from1_ptr->next;
- indx1 = (from1_ptr) ? from1_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
+ indx1 = (from1_ptr) ? from1_ptr->indx : ~ (HOST_WIDE_UINT) 0;
}
else
{
@@ -450,7 +450,7 @@ bitmap_operation (to, from1, from2, operation)
from1_tmp = &bitmap_zero;
from2_tmp = from2_ptr;
from2_ptr = from2_ptr->next;
- indx2 = (from2_ptr) ? from2_ptr->indx : ~ (unsigned HOST_WIDE_INT) 0;
+ indx2 = (from2_ptr) ? from2_ptr->indx : ~ (HOST_WIDE_UINT) 0;
}
if (to_ptr == 0)
@@ -569,7 +569,7 @@ bitmap_debug_file (file, head)
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)
for (j = 0; j < HOST_BITS_PER_WIDE_INT; j++)
- if ((ptr->bits[i] & (((unsigned HOST_WIDE_INT) 1) << j)) != 0)
+ if ((ptr->bits[i] & (((HOST_WIDE_UINT) 1) << j)) != 0)
{
if (col > 70)
{
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 7f838f1..1db35e2 100755
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -41,7 +41,7 @@ typedef struct bitmap_element_def
struct bitmap_element_def *next; /* Next element. */
struct bitmap_element_def *prev; /* Previous element. */
unsigned int indx; /* regno/BITMAP_ELEMENT_ALL_BITS. */
- unsigned HOST_WIDE_INT bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */
+ HOST_WIDE_UINT bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set. */
} bitmap_element;
/* Head of bitmap linked list. */
@@ -146,14 +146,14 @@ do { \
{ \
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
- unsigned HOST_WIDE_INT word_ = ptr_->bits[word_num_]; \
+ HOST_WIDE_UINT word_ = ptr_->bits[word_num_]; \
\
if (word_ != 0) \
{ \
for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \
{ \
- unsigned HOST_WIDE_INT mask_ \
- = ((unsigned HOST_WIDE_INT) 1) << bit_num_; \
+ HOST_WIDE_UINT mask_ \
+ = ((HOST_WIDE_UINT) 1) << bit_num_; \
\
if ((word_ & mask_) != 0) \
{ \
@@ -213,14 +213,14 @@ do { \
\
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
- unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \
+ HOST_WIDE_UINT word_ = (ptr1_->bits[word_num_] \
& ~ tmp2_->bits[word_num_]); \
if (word_ != 0) \
{ \
for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \
{ \
- unsigned HOST_WIDE_INT mask_ \
- = ((unsigned HOST_WIDE_INT)1) << bit_num_; \
+ HOST_WIDE_UINT mask_ \
+ = ((HOST_WIDE_UINT)1) << bit_num_; \
\
if ((word_ & mask_) != 0) \
{ \
@@ -286,14 +286,14 @@ do { \
\
for (; word_num_ < BITMAP_ELEMENT_WORDS; word_num_++) \
{ \
- unsigned HOST_WIDE_INT word_ = (ptr1_->bits[word_num_] \
+ HOST_WIDE_UINT word_ = (ptr1_->bits[word_num_] \
& ptr2_->bits[word_num_]); \
if (word_ != 0) \
{ \
for (; bit_num_ < HOST_BITS_PER_WIDE_INT; bit_num_++) \
{ \
- unsigned HOST_WIDE_INT mask_ \
- = ((unsigned HOST_WIDE_INT)1) << bit_num_; \
+ HOST_WIDE_UINT mask_ \
+ = ((HOST_WIDE_UINT)1) << bit_num_; \
\
if ((word_ & mask_) != 0) \
{ \
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 9c0a33e..d431f59 100755
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5914,7 +5914,7 @@ finish_struct (t, fieldlist, attributes)
/* Detect and ignore out of range field width. */
if (DECL_INITIAL (x))
{
- unsigned HOST_WIDE_INT width = TREE_INT_CST_LOW (DECL_INITIAL (x));
+ HOST_WIDE_UINT width = TREE_INT_CST_LOW (DECL_INITIAL (x));
if (tree_int_cst_sgn (DECL_INITIAL (x)) < 0)
{
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index f1e1473..895163f 100755
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -286,25 +286,7 @@ yyprint (file, yychar, yylval)
case CONSTANT:
t = yylval.ttype;
if (TREE_CODE (t) == INTEGER_CST)
- fprintf (file,
-#if HOST_BITS_PER_WIDE_INT == 64
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
- " 0x%x%016x",
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
- " 0x%lx%016lx",
-#else
- " 0x%llx%016llx",
-#endif
-#endif
-#else
-#if HOST_BITS_PER_WIDE_INT != HOST_BITS_PER_INT
- " 0x%lx%08lx",
-#else
- " 0x%x%08x",
-#endif
-#endif
- TREE_INT_CST_HIGH (t), TREE_INT_CST_LOW (t));
+ fprintf (file, " " HOST_WIDE_INT_PRINT_DOUBLE_HEX, TREE_INT_CST_HIGH (t), TREE_INT_CST_LOW (t));
break;
}
}
@@ -1887,12 +1869,12 @@ yylex ()
else if (TREE_UNSIGNED (char_type_node)
|| ((result >> (num_bits - 1)) & 1) == 0)
yylval.ttype
- = build_int_2 (result & (~(unsigned HOST_WIDE_INT) 0
+ = build_int_2 (result & (~(HOST_WIDE_UINT) 0
>> (HOST_BITS_PER_WIDE_INT - num_bits)),
0);
else
yylval.ttype
- = build_int_2 (result | ~(~(unsigned HOST_WIDE_INT) 0
+ = build_int_2 (result | ~(~(HOST_WIDE_UINT) 0
>> (HOST_BITS_PER_WIDE_INT - num_bits)),
-1);
TREE_TYPE (yylval.ttype) = integer_type_node;
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 616d7ab..b351ffb 100755
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -2133,7 +2133,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
if (TREE_INT_CST_LOW (op1) | TREE_INT_CST_HIGH (op1))
short_shift = 1;
if (TREE_INT_CST_HIGH (op1) != 0
- || ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (op1)
+ || ((HOST_WIDE_UINT) TREE_INT_CST_LOW (op1)
>= TYPE_PRECISION (type0)))
warning ("right shift count >= width of type");
}
@@ -2161,7 +2161,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
if (tree_int_cst_sgn (op1) < 0)
warning ("left shift count is negative");
else if (TREE_INT_CST_HIGH (op1) != 0
- || ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (op1)
+ || ((HOST_WIDE_UINT) TREE_INT_CST_LOW (op1)
>= TYPE_PRECISION (type0)))
warning ("left shift count >= width of type");
}
@@ -2189,7 +2189,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
if (tree_int_cst_sgn (op1) < 0)
warning ("shift count is negative");
else if (TREE_INT_CST_HIGH (op1) != 0
- || ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (op1)
+ || ((HOST_WIDE_UINT) TREE_INT_CST_LOW (op1)
>= TYPE_PRECISION (type0)))
warning ("shift count >= width of type");
}
diff --git a/gcc/combine.c b/gcc/combine.c
index e8a202d..5bc62d9 100755
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -272,7 +272,7 @@ static int label_tick;
If an entry is zero, it means that we don't know anything special. */
-static unsigned HOST_WIDE_INT *reg_nonzero_bits;
+static HOST_WIDE_UINT *reg_nonzero_bits;
/* Mode used to compute significance in reg_nonzero_bits. It is the largest
integer mode that can fit in HOST_BITS_PER_WIDE_INT. */
@@ -297,7 +297,7 @@ static int nonzero_sign_valid;
number of sign bits copies it was known to have when it was last set. */
static enum machine_mode *reg_last_set_mode;
-static unsigned HOST_WIDE_INT *reg_last_set_nonzero_bits;
+static HOST_WIDE_UINT *reg_last_set_nonzero_bits;
static char *reg_last_set_sign_bit_copies;
/* Record one modification to rtl structure
@@ -409,17 +409,17 @@ static rtx make_extraction (enum machine_mode, rtx, int, rtx, int,
int, int, int);
static rtx extract_left_shift (rtx, int);
static rtx make_compound_operation (rtx, enum rtx_code);
-static int get_pos_from_mask (unsigned HOST_WIDE_INT, int *);
+static int get_pos_from_mask (HOST_WIDE_UINT, int *);
static rtx force_to_mode (rtx, enum machine_mode,
- unsigned HOST_WIDE_INT, rtx, int);
+ HOST_WIDE_UINT, rtx, int);
static rtx if_then_else_cond (rtx, rtx *, rtx *);
static rtx known_cond (rtx, enum rtx_code, rtx, rtx);
static int rtx_equal_for_field_assignment_p (rtx, rtx);
static rtx make_field_assignment (rtx);
static rtx apply_distributive_law (rtx);
static rtx simplify_and_const_int (rtx, enum machine_mode, rtx,
- unsigned HOST_WIDE_INT);
-static unsigned HOST_WIDE_INT nonzero_bits (rtx, enum machine_mode);
+ HOST_WIDE_UINT);
+static HOST_WIDE_UINT nonzero_bits (rtx, enum machine_mode);
static int num_sign_bit_copies (rtx, enum machine_mode);
static int merge_outer_ops (enum rtx_code *, HOST_WIDE_INT *,
enum rtx_code, HOST_WIDE_INT,
@@ -476,7 +476,7 @@ combine_instructions (f, nregs)
combine_max_regno = nregs;
reg_nonzero_bits
- = (unsigned HOST_WIDE_INT *) alloca (nregs * sizeof (HOST_WIDE_INT));
+ = (HOST_WIDE_UINT *) alloca (nregs * sizeof (HOST_WIDE_INT));
reg_sign_bit_copies = (char *) alloca (nregs * sizeof (char));
zero_memory ((char *) reg_nonzero_bits, nregs * sizeof (HOST_WIDE_INT));
@@ -491,7 +491,7 @@ combine_instructions (f, nregs)
reg_last_set_mode
= (enum machine_mode *) alloca (nregs * sizeof (enum machine_mode));
reg_last_set_nonzero_bits
- = (unsigned HOST_WIDE_INT *) alloca (nregs * sizeof (HOST_WIDE_INT));
+ = (HOST_WIDE_UINT *) alloca (nregs * sizeof (HOST_WIDE_INT));
reg_last_set_sign_bit_copies
= (char *) alloca (nregs * sizeof (char));
@@ -1658,8 +1658,8 @@ try_combine (i3, i2, i1)
{
HOST_WIDE_INT cmp_value = INTVAL (XEXP (expect, 1));
HOST_WIDE_INT exp_value = INTVAL (expint);
- unsigned HOST_WIDE_INT ucmp_value = cmp_value;
- unsigned HOST_WIDE_INT uexp_value = exp_value;
+ HOST_WIDE_UINT ucmp_value = cmp_value;
+ HOST_WIDE_UINT uexp_value = exp_value;
HOST_WIDE_INT value;
if (cmp_value == exp_value)
@@ -2819,12 +2819,12 @@ find_split_point (loc, insn)
int src = INTVAL (SET_SRC (x));
rtx dest = XEXP (SET_DEST (x), 0);
enum machine_mode mode = GET_MODE (dest);
- unsigned HOST_WIDE_INT mask = ((HOST_WIDE_INT) 1 << len) - 1;
+ HOST_WIDE_UINT mask = ((HOST_WIDE_INT) 1 << len) - 1;
if (BITS_BIG_ENDIAN)
pos = GET_MODE_BITSIZE (mode) - len - pos;
- if ((unsigned HOST_WIDE_INT) src == mask)
+ if ((HOST_WIDE_UINT) src == mask)
SUBST (SET_SRC (x),
gen_binary (IOR, mode, dest, GEN_INT (src << pos)));
else
@@ -4238,7 +4238,7 @@ simplify_rtx (x, op0_mode, last, in_dest)
if (new_code == NE && GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
- == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE(mode)-1))
+ == (HOST_WIDE_UINT) 1 << (GET_MODE_BITSIZE(mode)-1))
&& op1 == const0_rtx
&& mode == GET_MODE (op0)
&& (i = exact_log2 (nonzero_bits (op0, mode))) >= 0)
@@ -4748,7 +4748,7 @@ simplify_set (x)
undobuf.other_insn. */
if (new_code != old_code)
{
- unsigned HOST_WIDE_INT mask;
+ HOST_WIDE_UINT mask;
SUBST (*cc_use, gen_rtx_combine (new_code, GET_MODE (*cc_use),
dest, const0_rtx));
@@ -5200,7 +5200,7 @@ simplify_logical (x, last)
when STORE_FLAG_VALUE is the sign bit. */
if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
- == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1))
+ == (HOST_WIDE_UINT) 1 << (GET_MODE_BITSIZE (mode) - 1))
&& op1 == const_true_rtx
&& GET_RTX_CLASS (GET_CODE (op0)) == '<'
&& reversible_comparison_p (op0))
@@ -5356,7 +5356,7 @@ expand_compound_operation (x)
if (flag_expensive_optimizations
&& ((GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT
&& ((nonzero_bits (XEXP (x, 0), GET_MODE (x))
- & ~ (((unsigned HOST_WIDE_INT)
+ & ~ (((HOST_WIDE_UINT)
GET_MODE_MASK (GET_MODE (XEXP (x, 0))))
>> 1))
== 0))
@@ -5364,7 +5364,7 @@ expand_compound_operation (x)
&& (GET_MODE_BITSIZE (GET_MODE (XEXP (x, 0)))
<= HOST_BITS_PER_WIDE_INT)
&& (((HOST_WIDE_INT) STORE_FLAG_VALUE
- & ~ (((unsigned HOST_WIDE_INT)
+ & ~ (((HOST_WIDE_UINT)
GET_MODE_MASK (GET_MODE (XEXP (x, 0))))
>> 1))
== 0))))
@@ -6097,7 +6097,7 @@ make_compound_operation (x, in_code)
&& INTVAL (XEXP (XEXP (x, 0), 1)) < HOST_BITS_PER_WIDE_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT)
{
- unsigned HOST_WIDE_INT mask = GET_MODE_MASK (mode);
+ HOST_WIDE_UINT mask = GET_MODE_MASK (mode);
mask >>= INTVAL (XEXP (XEXP (x, 0), 1));
if ((INTVAL (XEXP (x, 1)) & ~mask) == 0)
@@ -6251,7 +6251,7 @@ make_compound_operation (x, in_code)
static int
get_pos_from_mask (m, plen)
- unsigned HOST_WIDE_INT m;
+ HOST_WIDE_UINT m;
int *plen;
{
/* Get the bit number of the first 1 bit from the right, -1 if none. */
@@ -6290,14 +6290,14 @@ static rtx
force_to_mode (x, mode, mask, reg, just_select)
rtx x;
enum machine_mode mode;
- unsigned HOST_WIDE_INT mask;
+ HOST_WIDE_UINT mask;
rtx reg;
int just_select;
{
enum rtx_code code = GET_CODE (x);
int next_select = just_select || code == XOR || code == NOT || code == NEG;
enum machine_mode op_mode;
- unsigned HOST_WIDE_INT fuller_mask, nonzero;
+ HOST_WIDE_UINT fuller_mask, nonzero;
rtx op0, op1, temp;
/* If this is a CALL or ASM_OPERANDS, don't do anything. Some of the
@@ -6431,7 +6431,7 @@ force_to_mode (x, mode, mask, reg, just_select)
need it. */
if (GET_CODE (x) == AND && GET_CODE (XEXP (x, 1)) == CONST_INT
- && (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) == mask)
+ && (HOST_WIDE_UINT) INTVAL (XEXP (x, 1)) == mask)
x = XEXP (x, 0);
/* If it remains an AND, try making another AND with the bits
@@ -6472,7 +6472,7 @@ force_to_mode (x, mode, mask, reg, just_select)
{
int width = GET_MODE_BITSIZE (mode);
- unsigned HOST_WIDE_INT smask = mask;
+ HOST_WIDE_UINT smask = mask;
/* If MODE is narrower than HOST_WIDE_INT and mask is a negative
number, sign extend it. */
@@ -6490,7 +6490,7 @@ force_to_mode (x, mode, mask, reg, just_select)
|| XEXP (x, 0) == frame_pointer_rtx))
{
int sp_alignment = STACK_BOUNDARY / BITS_PER_UNIT;
- unsigned HOST_WIDE_INT sp_mask = GET_MODE_MASK (mode);
+ HOST_WIDE_UINT sp_mask = GET_MODE_MASK (mode);
sp_mask &= ~ (sp_alignment - 1);
if ((sp_mask & ~ mask) == 0
@@ -6582,7 +6582,7 @@ force_to_mode (x, mode, mask, reg, just_select)
&& INTVAL (XEXP (x, 1)) < GET_MODE_BITSIZE (mode))
&& ! (GET_MODE (XEXP (x, 1)) != VOIDmode
&& (nonzero_bits (XEXP (x, 1), GET_MODE (XEXP (x, 1)))
- < (unsigned HOST_WIDE_INT) GET_MODE_BITSIZE (mode))))
+ < (HOST_WIDE_UINT) GET_MODE_BITSIZE (mode))))
break;
/* If the shift count is a constant and we can do arithmetic in
@@ -6652,7 +6652,7 @@ force_to_mode (x, mode, mask, reg, just_select)
/* If we are just looking for the sign bit, we don't need this shift at
all, even if it has a variable count. */
if (GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT
- && (mask == ((unsigned HOST_WIDE_INT) 1
+ && (mask == ((HOST_WIDE_UINT) 1
<< (GET_MODE_BITSIZE (GET_MODE (x)) - 1))))
return force_to_mode (XEXP (x, 0), mode, mask, reg, next_select);
@@ -6839,7 +6839,7 @@ if_then_else_cond (x, ptrue, pfalse)
enum rtx_code code = GET_CODE (x);
int size = GET_MODE_BITSIZE (mode);
rtx cond0, cond1, true0, true1, false0, false1;
- unsigned HOST_WIDE_INT nz;
+ HOST_WIDE_UINT nz;
/* If this is a unary operation whose operand has one of two values, apply
our opcode to compute those values. */
@@ -7388,9 +7388,9 @@ simplify_and_const_int (x, mode, varop, constop)
rtx x;
enum machine_mode mode;
rtx varop;
- unsigned HOST_WIDE_INT constop;
+ HOST_WIDE_UINT constop;
{
- unsigned HOST_WIDE_INT nonzero;
+ HOST_WIDE_UINT nonzero;
int width = GET_MODE_BITSIZE (mode);
int i;
@@ -7479,7 +7479,7 @@ simplify_and_const_int (x, mode, varop, constop)
else
{
if (GET_CODE (XEXP (x, 1)) != CONST_INT
- || (unsigned HOST_WIDE_INT) INTVAL (XEXP (x, 1)) != constop)
+ || (HOST_WIDE_UINT) INTVAL (XEXP (x, 1)) != constop)
SUBST (XEXP (x, 1), GEN_INT (constop));
SUBST (XEXP (x, 0), varop);
@@ -7501,13 +7501,13 @@ simplify_and_const_int (x, mode, varop, constop)
For most X this is simply GET_MODE_MASK (GET_MODE (MODE)), but if X is
a shift, AND, or zero_extract, we can do better. */
-static unsigned HOST_WIDE_INT
+static HOST_WIDE_UINT
nonzero_bits (x, mode)
rtx x;
enum machine_mode mode;
{
- unsigned HOST_WIDE_INT nonzero = GET_MODE_MASK (mode);
- unsigned HOST_WIDE_INT inner_nz;
+ HOST_WIDE_UINT nonzero = GET_MODE_MASK (mode);
+ HOST_WIDE_UINT inner_nz;
enum rtx_code code;
int mode_width = GET_MODE_BITSIZE (mode);
rtx tem;
@@ -7721,8 +7721,8 @@ nonzero_bits (x, mode)
computing the width (position of the highest-order non-zero bit)
and the number of low-order zero bits for each value. */
{
- unsigned HOST_WIDE_INT nz0 = nonzero_bits (XEXP (x, 0), mode);
- unsigned HOST_WIDE_INT nz1 = nonzero_bits (XEXP (x, 1), mode);
+ HOST_WIDE_UINT nz0 = nonzero_bits (XEXP (x, 0), mode);
+ HOST_WIDE_UINT nz1 = nonzero_bits (XEXP (x, 1), mode);
int width0 = floor_log2 (nz0) + 1;
int width1 = floor_log2 (nz1) + 1;
int low0 = floor_log2 (nz0 & -nz0);
@@ -7852,10 +7852,10 @@ nonzero_bits (x, mode)
enum machine_mode inner_mode = GET_MODE (x);
int width = GET_MODE_BITSIZE (inner_mode);
int count = INTVAL (XEXP (x, 1));
- unsigned HOST_WIDE_INT mode_mask = GET_MODE_MASK (inner_mode);
- unsigned HOST_WIDE_INT op_nonzero = nonzero_bits (XEXP (x, 0), mode);
- unsigned HOST_WIDE_INT inner = op_nonzero & mode_mask;
- unsigned HOST_WIDE_INT outer = 0;
+ HOST_WIDE_UINT mode_mask = GET_MODE_MASK (inner_mode);
+ HOST_WIDE_UINT op_nonzero = nonzero_bits (XEXP (x, 0), mode);
+ HOST_WIDE_UINT inner = op_nonzero & mode_mask;
+ HOST_WIDE_UINT outer = 0;
if (mode_width > width)
outer = (op_nonzero & nonzero & ~ mode_mask);
@@ -7915,7 +7915,7 @@ num_sign_bit_copies (x, mode)
enum rtx_code code = GET_CODE (x);
int bitwidth;
int num0, num1, result;
- unsigned HOST_WIDE_INT nonzero;
+ HOST_WIDE_UINT nonzero;
rtx tem;
/* If we weren't given a mode, use the mode of X. If the mode is still
@@ -8363,7 +8363,7 @@ merge_outer_ops (pop0, pconst0, op1, const1, mode, pcomp_p)
op0 = NIL;
else if (const0 == 0 && op0 == AND)
op0 = SET;
- else if ((unsigned HOST_WIDE_INT) const0 == GET_MODE_MASK (mode)
+ else if ((HOST_WIDE_UINT) const0 == GET_MODE_MASK (mode)
&& op0 == AND)
op0 = NIL;
@@ -8648,7 +8648,7 @@ simplify_shift_const (x, code, result_mode, varop, count)
{
enum rtx_code first_code = GET_CODE (varop);
int first_count = INTVAL (XEXP (varop, 1));
- unsigned HOST_WIDE_INT mask;
+ HOST_WIDE_UINT mask;
rtx mask_rtx;
/* We have one common special case. We can't do any merging if
@@ -9516,7 +9516,7 @@ simplify_comparison (code, pop0, pop1)
&& XEXP (op0, 1) == XEXP (op1, 1))
{
enum machine_mode mode = GET_MODE (op0);
- unsigned HOST_WIDE_INT mask = GET_MODE_MASK (mode);
+ HOST_WIDE_UINT mask = GET_MODE_MASK (mode);
int shift_count = INTVAL (XEXP (op0, 1));
if (GET_CODE (op0) == LSHIFTRT || GET_CODE (op0) == ASHIFTRT)
@@ -9580,7 +9580,7 @@ simplify_comparison (code, pop0, pop1)
for (tmode = GET_CLASS_NARROWEST_MODE
(GET_MODE_CLASS (GET_MODE (op0)));
tmode != GET_MODE (op0); tmode = GET_MODE_WIDER_MODE (tmode))
- if ((unsigned HOST_WIDE_INT) c0 == GET_MODE_MASK (tmode))
+ if ((HOST_WIDE_UINT) c0 == GET_MODE_MASK (tmode))
{
op0 = gen_lowpart_for_combine (tmode, inner_op0);
op1 = gen_lowpart_for_combine (tmode, inner_op1);
@@ -9623,7 +9623,7 @@ simplify_comparison (code, pop0, pop1)
{
enum machine_mode mode = GET_MODE (op0);
int mode_width = GET_MODE_BITSIZE (mode);
- unsigned HOST_WIDE_INT mask = GET_MODE_MASK (mode);
+ HOST_WIDE_UINT mask = GET_MODE_MASK (mode);
int equality_comparison_p;
int sign_bit_comparison_p;
int unsigned_comparison_p;
@@ -9655,7 +9655,7 @@ simplify_comparison (code, pop0, pop1)
|| code == LT || code == LTU)
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& exact_log2 (const_op) >= 0
- && nonzero_bits (op0, mode) == (unsigned HOST_WIDE_INT) const_op)
+ && nonzero_bits (op0, mode) == (HOST_WIDE_UINT) const_op)
{
code = (code == EQ || code == GE || code == GEU ? NE : EQ);
op1 = const0_rtx, const_op = 0;
@@ -9983,8 +9983,8 @@ simplify_comparison (code, pop0, pop1)
if (! unsigned_comparison_p
&& (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
<= HOST_BITS_PER_WIDE_INT)
- && ((unsigned HOST_WIDE_INT) const_op
- < (((unsigned HOST_WIDE_INT) 1
+ && ((HOST_WIDE_UINT) const_op
+ < (((HOST_WIDE_UINT) 1
<< (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0))) - 1)))))
{
op0 = XEXP (op0, 0);
@@ -10009,7 +10009,7 @@ simplify_comparison (code, pop0, pop1)
&& INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0
&& (- INTVAL (XEXP (SUBREG_REG (op0), 1))
< (HOST_WIDE_INT)(GET_MODE_MASK (mode) / 2))
- && (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2
+ && (HOST_WIDE_UINT) const_op < GET_MODE_MASK (mode) / 2
&& (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0),
GET_MODE (SUBREG_REG (op0)))
& ~ GET_MODE_MASK (mode))
@@ -10036,7 +10036,7 @@ simplify_comparison (code, pop0, pop1)
if ((unsigned_comparison_p || equality_comparison_p)
&& (GET_MODE_BITSIZE (GET_MODE (XEXP (op0, 0)))
<= HOST_BITS_PER_WIDE_INT)
- && ((unsigned HOST_WIDE_INT) const_op
+ && ((HOST_WIDE_UINT) const_op
< GET_MODE_MASK (GET_MODE (XEXP (op0, 0)))))
{
op0 = XEXP (op0, 0);
@@ -10212,7 +10212,7 @@ simplify_comparison (code, pop0, pop1)
&& GET_CODE (XEXP (op0, 1)) == CONST_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& ((INTVAL (XEXP (op0, 1)) & GET_MODE_MASK (mode))
- == (unsigned HOST_WIDE_INT) 1 << (mode_width - 1)))
+ == (HOST_WIDE_UINT) 1 << (mode_width - 1)))
{
op0 = XEXP (op0, 0);
code = (code == EQ ? GE : LT);
@@ -10251,8 +10251,8 @@ simplify_comparison (code, pop0, pop1)
&& (INTVAL (XEXP (op0, 1)) & ~ mask) == 0
&& 0 == (~ GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
& INTVAL (XEXP (op0, 1)))
- && (unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1)) != mask
- && ((unsigned HOST_WIDE_INT) INTVAL (XEXP (op0, 1))
+ && (HOST_WIDE_UINT) INTVAL (XEXP (op0, 1)) != mask
+ && ((HOST_WIDE_UINT) INTVAL (XEXP (op0, 1))
!= GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))))
{
@@ -10335,8 +10335,8 @@ simplify_comparison (code, pop0, pop1)
&& XEXP (op0, 1) == XEXP (XEXP (op0, 0), 1)
&& (tmode = mode_for_size (mode_width - INTVAL (XEXP (op0, 1)),
MODE_INT, 1)) != BLKmode
- && ((unsigned HOST_WIDE_INT) const_op <= GET_MODE_MASK (tmode)
- || ((unsigned HOST_WIDE_INT) - const_op
+ && ((HOST_WIDE_UINT) const_op <= GET_MODE_MASK (tmode)
+ || ((HOST_WIDE_UINT) - const_op
<= GET_MODE_MASK (tmode))))
{
op0 = gen_lowpart_for_combine (tmode, XEXP (XEXP (op0, 0), 0));
diff --git a/gcc/config/arm/thumb.c b/gcc/config/arm/thumb.c
index 1e03a05..84b922a 100755
--- a/gcc/config/arm/thumb.c
+++ b/gcc/config/arm/thumb.c
@@ -57,15 +57,15 @@ int
thumb_cmp_operand(rtx op, enum machine_mode mode)
{
return ((GET_CODE(op) == CONST_INT
- && (unsigned HOST_WIDE_INT) (INTVAL(op)) < 256)
+ && (HOST_WIDE_UINT) (INTVAL(op)) < 256)
|| register_operand(op, mode));
}
int
thumb_shiftable_const(HOST_WIDE_INT val)
{
- unsigned HOST_WIDE_INT x = val;
- unsigned HOST_WIDE_INT mask = 0xff;
+ HOST_WIDE_UINT x = val;
+ HOST_WIDE_UINT mask = 0xff;
int i;
for (i = 0; i < 25; i++)
diff --git a/gcc/config/arm/thumb.h b/gcc/config/arm/thumb.h
index 1933489..325374c 100755
--- a/gcc/config/arm/thumb.h
+++ b/gcc/config/arm/thumb.h
@@ -369,14 +369,6 @@ do { \
#define WORDS_BIG_ENDIAN (BYTES_BIG_ENDIAN)
-/* LIBGCC2_WORDS_BIG_ENDIAN has to be a constant, so we define this based
- on processor pre-defineds when compiling libgcc2.c. */
-#if defined(__THUMBEB__) && !defined(__THUMBEL__)
-#define LIBGCC2_WORDS_BIG_ENDIAN 1
-#else
-#define LIBGCC2_WORDS_BIG_ENDIAN 0
-#endif
-
#define FLOAT_WORDS_BIG_ENDIAN 1
#define BITS_PER_UNIT 8
@@ -576,7 +568,7 @@ enum reg_class
((CONSTANT_P ((X)) && GET_CODE ((X)) != CONST_INT \
&& ! CONSTANT_POOL_ADDRESS_P((X))) ? NO_REGS \
: (GET_CODE ((X)) == CONST_INT \
- && (unsigned HOST_WIDE_INT) INTVAL ((X)) > 255) ? NO_REGS \
+ && (HOST_WIDE_UINT) INTVAL ((X)) > 255) ? NO_REGS \
: LO_REGS) */
/* Must leave BASE_REGS and NONARG_LO_REGS reloads alone, see comment
@@ -593,13 +585,13 @@ enum reg_class
int thumb_shiftable_const ();
#define CONST_OK_FOR_LETTER_P(VAL,C) \
- ((C) == 'I' ? (unsigned HOST_WIDE_INT) (VAL) < 256 \
+ ((C) == 'I' ? (HOST_WIDE_UINT) (VAL) < 256 \
: (C) == 'J' ? (VAL) > -256 && (VAL) <= 0 \
: (C) == 'K' ? thumb_shiftable_const (VAL) \
: (C) == 'L' ? (VAL) > -8 && (VAL) < 8 \
- : (C) == 'M' ? ((unsigned HOST_WIDE_INT) (VAL) < 1024 \
+ : (C) == 'M' ? ((HOST_WIDE_UINT) (VAL) < 1024 \
&& ((VAL) & 3) == 0) \
- : (C) == 'N' ? ((unsigned HOST_WIDE_INT) (VAL) < 32) \
+ : (C) == 'N' ? ((HOST_WIDE_UINT) (VAL) < 32) \
: (C) == 'O' ? ((VAL) >= -508 && (VAL) <= 508) \
: 0)
@@ -831,8 +823,8 @@ int thumb_shiftable_const ();
#define REG_OK_FOR_INDEXED_BASE_P(X) REG_OK_FOR_INDEX_P(X)
#define LEGITIMATE_OFFSET(MODE,VAL) \
-(GET_MODE_SIZE (MODE) == 1 ? ((unsigned HOST_WIDE_INT) (VAL) < 32) \
- : GET_MODE_SIZE (MODE) == 2 ? ((unsigned HOST_WIDE_INT) (VAL) < 64 \
+(GET_MODE_SIZE (MODE) == 1 ? ((HOST_WIDE_UINT) (VAL) < 32) \
+ : GET_MODE_SIZE (MODE) == 2 ? ((HOST_WIDE_UINT) (VAL) < 64 \
&& ((VAL) & 1) == 0) \
: ((VAL) >= 0 && ((VAL) + GET_MODE_SIZE (MODE)) <= 128 \
&& ((VAL) & 3) == 0))
@@ -936,7 +928,7 @@ int thumb_shiftable_const ();
&& REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM \
&& GET_MODE_SIZE (MODE) >= 4 \
&& GET_CODE (XEXP (X, 1)) == CONST_INT \
- && (unsigned HOST_WIDE_INT) INTVAL (XEXP (X, 1)) < 1024 \
+ && (HOST_WIDE_UINT) INTVAL (XEXP (X, 1)) < 1024 \
&& (INTVAL (XEXP (X, 1)) & 3) == 0) \
goto WIN; \
} \
@@ -1011,7 +1003,7 @@ int thumb_shiftable_const ();
if (GET_CODE (XEXP (X, 1)) == CONST_INT) \
{ \
int cycles = 0; \
- unsigned HOST_WIDE_INT i = INTVAL (XEXP (X, 1)); \
+ HOST_WIDE_UINT i = INTVAL (XEXP (X, 1)); \
while (i) \
{ \
i >>= 2; \
@@ -1032,7 +1024,7 @@ int thumb_shiftable_const ();
case CONST_INT: \
if ((OUTER) == SET) \
{ \
- if ((unsigned HOST_WIDE_INT) INTVAL (X) < 256) \
+ if ((HOST_WIDE_UINT) INTVAL (X) < 256) \
return 0; \
if (thumb_shiftable_const (INTVAL (X))) \
return COSTS_N_INSNS (2); \
@@ -1042,7 +1034,7 @@ int thumb_shiftable_const ();
&& INTVAL (X) < 256 && INTVAL (X) > -256) \
return 0; \
else if (OUTER == COMPARE \
- && (unsigned HOST_WIDE_INT) INTVAL (X) < 256) \
+ && (HOST_WIDE_UINT) INTVAL (X) < 256) \
return 0; \
else if (OUTER == ASHIFT || OUTER == ASHIFTRT \
|| OUTER == LSHIFTRT) \
diff --git a/gcc/config/arm/thumb.md b/gcc/config/arm/thumb.md
index ea4fa9c..d37d677 100755
--- a/gcc/config/arm/thumb.md
+++ b/gcc/config/arm/thumb.md
@@ -71,8 +71,8 @@
(set (match_dup 0) (ashift:SI (match_dup 0) (match_dup 2)))]
"
{
- unsigned HOST_WIDE_INT val = INTVAL (operands[1]);
- unsigned HOST_WIDE_INT mask = 0xff;
+ HOST_WIDE_UINT val = INTVAL (operands[1]);
+ HOST_WIDE_UINT mask = 0xff;
int i;
for (i = 0; i < 25; i++)
if ((val & (mask << i)) == val)
@@ -633,7 +633,7 @@
(set (match_dup 0)
(plus:SI (match_dup 0) (match_operand:SI 2 "register_operand" "k")))]
"REGNO (operands[2]) == STACK_POINTER_REGNUM
- && (unsigned HOST_WIDE_INT) (INTVAL (operands[1])) < 1024
+ && (HOST_WIDE_UINT) (INTVAL (operands[1])) < 1024
&& (INTVAL (operands[1]) & 3) == 0"
"add\\t%0, %2, %1")
@@ -693,7 +693,7 @@
else
{
int i;
- if (((unsigned HOST_WIDE_INT) ~ INTVAL (operands[2])) < 256)
+ if (((HOST_WIDE_UINT) ~ INTVAL (operands[2])) < 256)
{
operands[2] = force_reg (SImode, GEN_INT (~INTVAL (operands[2])));
emit_insn (gen_bicsi3 (operands[0], operands[2], operands[1]));
@@ -800,7 +800,7 @@
if (GET_CODE (operands[1]) != REG && GET_CODE (operands[1]) != SUBREG)
{
if (GET_CODE (operands[1]) != CONST_INT
- || (unsigned HOST_WIDE_INT) (INTVAL (operands[1])) >= 256)
+ || (HOST_WIDE_UINT) (INTVAL (operands[1])) >= 256)
{
if (GET_CODE (operands[1]) != CONST_INT
|| INTVAL (operands[1]) < -255
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index 1f241da..8b3f287 100755
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -547,7 +547,7 @@ cpp_parse_escape (pfile, string_ptr, result_mask)
}
case 'x':
{
- register unsigned HOST_WIDE_INT i = 0, overflow = 0;
+ register HOST_WIDE_UINT i = 0, overflow = 0;
register int digits_found = 0, digit;
for (;;)
{
diff --git a/gcc/cse.c b/gcc/cse.c
index 15b6e0b..b091166 100755
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2012,7 +2012,7 @@ canon_hash (x, mode)
case CONST_INT:
{
- unsigned HOST_WIDE_INT tem = INTVAL (x);
+ HOST_WIDE_UINT tem = INTVAL (x);
hash += ((unsigned) CONST_INT << 7) + (unsigned) mode + tem;
return hash;
}
@@ -3085,7 +3085,7 @@ simplify_unary_operation (code, mode, op, op_mode)
d = (double) (~ hv);
d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
* (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d += (double) (unsigned HOST_WIDE_INT) (~ lv);
+ d += (double) (HOST_WIDE_UINT) (~ lv);
d = (- d - 1.0);
}
else
@@ -3093,7 +3093,7 @@ simplify_unary_operation (code, mode, op, op_mode)
d = (double) hv;
d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
* (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d += (double) (unsigned HOST_WIDE_INT) lv;
+ d += (double) (HOST_WIDE_UINT) lv;
}
#endif /* REAL_ARITHMETIC */
d = real_value_truncate (mode, d);
@@ -3126,10 +3126,10 @@ simplify_unary_operation (code, mode, op, op_mode)
REAL_VALUE_FROM_UNSIGNED_INT (d, lv, hv, mode);
#else
- d = (double) (unsigned HOST_WIDE_INT) hv;
+ d = (double) (HOST_WIDE_UINT) hv;
d *= ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
* (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
- d += (double) (unsigned HOST_WIDE_INT) lv;
+ d += (double) (HOST_WIDE_UINT) lv;
#endif /* REAL_ARITHMETIC */
d = real_value_truncate (mode, d);
return CONST_DOUBLE_FROM_REAL_VALUE (d, mode);
@@ -3625,8 +3625,8 @@ simplify_binary_operation (code, mode, op0, op1)
case SMIN:
if (h1 < h2
|| (h1 == h2
- && ((unsigned HOST_WIDE_INT) l1
- < (unsigned HOST_WIDE_INT) l2)))
+ && ((HOST_WIDE_UINT) l1
+ < (HOST_WIDE_UINT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
@@ -3635,28 +3635,28 @@ simplify_binary_operation (code, mode, op0, op1)
case SMAX:
if (h1 > h2
|| (h1 == h2
- && ((unsigned HOST_WIDE_INT) l1
- > (unsigned HOST_WIDE_INT) l2)))
+ && ((HOST_WIDE_UINT) l1
+ > (HOST_WIDE_UINT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
break;
case UMIN:
- if ((unsigned HOST_WIDE_INT) h1 < (unsigned HOST_WIDE_INT) h2
+ if ((HOST_WIDE_UINT) h1 < (HOST_WIDE_UINT) h2
|| (h1 == h2
- && ((unsigned HOST_WIDE_INT) l1
- < (unsigned HOST_WIDE_INT) l2)))
+ && ((HOST_WIDE_UINT) l1
+ < (HOST_WIDE_UINT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
break;
case UMAX:
- if ((unsigned HOST_WIDE_INT) h1 > (unsigned HOST_WIDE_INT) h2
+ if ((HOST_WIDE_UINT) h1 > (HOST_WIDE_UINT) h2
|| (h1 == h2
- && ((unsigned HOST_WIDE_INT) l1
- > (unsigned HOST_WIDE_INT) l2)))
+ && ((HOST_WIDE_UINT) l1
+ > (HOST_WIDE_UINT) l2)))
lv = l1, hv = h1;
else
lv = l2, hv = h2;
@@ -4117,7 +4117,7 @@ simplify_binary_operation (code, mode, op0, op1)
case SMAX:
if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (op1) == CONST_INT
&& (INTVAL (op1)
- == (unsigned HOST_WIDE_INT) GET_MODE_MASK (mode) >> 1)
+ == (HOST_WIDE_UINT) GET_MODE_MASK (mode) >> 1)
&& ! side_effects_p (op0))
return op1;
else if (rtx_equal_p (op0, op1) && ! side_effects_p (op0))
@@ -4201,13 +4201,13 @@ simplify_binary_operation (code, mode, op0, op1)
case UDIV:
if (arg1 == 0)
return 0;
- val = (unsigned HOST_WIDE_INT) arg0 / arg1;
+ val = (HOST_WIDE_UINT) arg0 / arg1;
break;
case UMOD:
if (arg1 == 0)
return 0;
- val = (unsigned HOST_WIDE_INT) arg0 % arg1;
+ val = (HOST_WIDE_UINT) arg0 % arg1;
break;
case AND:
@@ -4233,7 +4233,7 @@ simplify_binary_operation (code, mode, op0, op1)
arg1 %= width;
#endif
- val = ((unsigned HOST_WIDE_INT) arg0) >> arg1;
+ val = ((HOST_WIDE_UINT) arg0) >> arg1;
break;
case ASHIFT:
@@ -4245,7 +4245,7 @@ simplify_binary_operation (code, mode, op0, op1)
arg1 %= width;
#endif
- val = ((unsigned HOST_WIDE_INT) arg0) << arg1;
+ val = ((HOST_WIDE_UINT) arg0) << arg1;
break;
case ASHIFTRT:
@@ -4271,8 +4271,8 @@ simplify_binary_operation (code, mode, op0, op1)
return 0;
arg1 %= width;
- val = ((((unsigned HOST_WIDE_INT) arg0) << (width - arg1))
- | (((unsigned HOST_WIDE_INT) arg0) >> arg1));
+ val = ((((HOST_WIDE_UINT) arg0) << (width - arg1))
+ | (((HOST_WIDE_UINT) arg0) >> arg1));
break;
case ROTATE:
@@ -4280,8 +4280,8 @@ simplify_binary_operation (code, mode, op0, op1)
return 0;
arg1 %= width;
- val = ((((unsigned HOST_WIDE_INT) arg0) << arg1)
- | (((unsigned HOST_WIDE_INT) arg0) >> (width - arg1)));
+ val = ((((HOST_WIDE_UINT) arg0) << arg1)
+ | (((HOST_WIDE_UINT) arg0) >> (width - arg1)));
break;
case COMPARE:
@@ -4293,8 +4293,8 @@ simplify_binary_operation (code, mode, op0, op1)
break;
case UMIN:
- val = ((unsigned HOST_WIDE_INT) arg0
- <= (unsigned HOST_WIDE_INT) arg1 ? arg0 : arg1);
+ val = ((HOST_WIDE_UINT) arg0
+ <= (HOST_WIDE_UINT) arg1 ? arg0 : arg1);
break;
case SMAX:
@@ -4302,8 +4302,8 @@ simplify_binary_operation (code, mode, op0, op1)
break;
case UMAX:
- val = ((unsigned HOST_WIDE_INT) arg0
- > (unsigned HOST_WIDE_INT) arg1 ? arg0 : arg1);
+ val = ((HOST_WIDE_UINT) arg0
+ > (HOST_WIDE_UINT) arg1 ? arg0 : arg1);
break;
default:
@@ -4635,7 +4635,7 @@ simplify_relational_operation (code, mode, op0, op1)
{
int width = GET_MODE_BITSIZE (mode);
HOST_WIDE_INT l0s, h0s, l1s, h1s;
- unsigned HOST_WIDE_INT l0u, h0u, l1u, h1u;
+ HOST_WIDE_UINT l0u, h0u, l1u, h1u;
/* Get the two words comprising each integer constant. */
if (GET_CODE (op0) == CONST_DOUBLE)
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 8599fc2..c9b716a 100755
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -855,7 +855,7 @@ store_split_bit_field (op0, bitsize, bitpos, value, align)
/* Fetch successively less significant portions. */
if (GET_CODE (value) == CONST_INT)
- part = GEN_INT (((unsigned HOST_WIDE_INT) (INTVAL (value))
+ part = GEN_INT (((HOST_WIDE_UINT) (INTVAL (value))
>> (bitsize - bitsdone - thissize))
& (((HOST_WIDE_INT) 1 << thissize) - 1));
else
@@ -879,7 +879,7 @@ store_split_bit_field (op0, bitsize, bitpos, value, align)
{
/* Fetch successively more significant portions. */
if (GET_CODE (value) == CONST_INT)
- part = GEN_INT (((unsigned HOST_WIDE_INT) (INTVAL (value))
+ part = GEN_INT (((HOST_WIDE_UINT) (INTVAL (value))
>> bitsdone)
& (((HOST_WIDE_INT) 1 << thissize) - 1));
else
@@ -1673,7 +1673,7 @@ mask_rtx (mode, bitpos, bitsize, complement)
masklow = 0;
if (bitpos + bitsize < HOST_BITS_PER_WIDE_INT)
- masklow &= ((unsigned HOST_WIDE_INT) -1
+ masklow &= ((HOST_WIDE_UINT) -1
>> (HOST_BITS_PER_WIDE_INT - bitpos - bitsize));
if (bitpos <= HOST_BITS_PER_WIDE_INT)
@@ -1682,7 +1682,7 @@ mask_rtx (mode, bitpos, bitsize, complement)
maskhigh = (HOST_WIDE_INT) -1 << (bitpos - HOST_BITS_PER_WIDE_INT);
if (bitpos + bitsize > HOST_BITS_PER_WIDE_INT)
- maskhigh &= ((unsigned HOST_WIDE_INT) -1
+ maskhigh &= ((HOST_WIDE_UINT) -1
>> (2 * HOST_BITS_PER_WIDE_INT - bitpos - bitsize));
else
maskhigh = 0;
@@ -1705,7 +1705,7 @@ lshift_value (mode, value, bitpos, bitsize)
rtx value;
int bitpos, bitsize;
{
- unsigned HOST_WIDE_INT v = INTVAL (value);
+ HOST_WIDE_UINT v = INTVAL (value);
HOST_WIDE_INT low, high;
if (bitsize < HOST_BITS_PER_WIDE_INT)
@@ -1891,9 +1891,9 @@ expand_shift (code, mode, shifted, amount, target, unsignedp)
if (SHIFT_COUNT_TRUNCATED)
{
if (GET_CODE (op1) == CONST_INT
- && ((unsigned HOST_WIDE_INT) INTVAL (op1) >=
- (unsigned HOST_WIDE_INT) GET_MODE_BITSIZE (mode)))
- op1 = GEN_INT ((unsigned HOST_WIDE_INT) INTVAL (op1)
+ && ((HOST_WIDE_UINT) INTVAL (op1) >=
+ (HOST_WIDE_UINT) GET_MODE_BITSIZE (mode)))
+ op1 = GEN_INT ((HOST_WIDE_UINT) INTVAL (op1)
% GET_MODE_BITSIZE (mode));
else if (GET_CODE (op1) == SUBREG
&& SUBREG_WORD (op1) == 0)
@@ -2046,13 +2046,13 @@ struct algorithm
};
static void synth_mult (struct algorithm *,
- unsigned HOST_WIDE_INT,
+ HOST_WIDE_UINT,
int);
-static unsigned HOST_WIDE_INT choose_multiplier (unsigned HOST_WIDE_INT,
+static HOST_WIDE_UINT choose_multiplier (HOST_WIDE_UINT,
int, int,
- unsigned HOST_WIDE_INT *,
+ HOST_WIDE_UINT *,
int *, int *);
-static unsigned HOST_WIDE_INT invert_mod2n (unsigned HOST_WIDE_INT,
+static HOST_WIDE_UINT invert_mod2n (HOST_WIDE_UINT,
int);
/* Compute and return the best algorithm for multiplying by T.
The algorithm must cost less than cost_limit
@@ -2062,13 +2062,13 @@ static unsigned HOST_WIDE_INT invert_mod2n (unsigned HOST_WIDE_INT,
static void
synth_mult (alg_out, t, cost_limit)
struct algorithm *alg_out;
- unsigned HOST_WIDE_INT t;
+ HOST_WIDE_UINT t;
int cost_limit;
{
int m;
struct algorithm *alg_in, *best_alg;
int cost;
- unsigned HOST_WIDE_INT q;
+ HOST_WIDE_UINT q;
/* Indicate that no algorithm is yet found. If no algorithm
is found, this value will be returned and indicate failure. */
@@ -2130,7 +2130,7 @@ synth_mult (alg_out, t, cost_limit)
/* If we have an odd number, add or subtract one. */
if ((t & 1) != 0)
{
- unsigned HOST_WIDE_INT w;
+ HOST_WIDE_UINT w;
for (w = 1; (w & t) != 0; w <<= 1)
;
@@ -2191,9 +2191,9 @@ synth_mult (alg_out, t, cost_limit)
for (m = floor_log2 (t - 1); m >= 2; m--)
{
- unsigned HOST_WIDE_INT d;
+ HOST_WIDE_UINT d;
- d = ((unsigned HOST_WIDE_INT) 1 << m) + 1;
+ d = ((HOST_WIDE_UINT) 1 << m) + 1;
if (t % d == 0 && t > d)
{
cost = MIN (shiftadd_cost[m], add_cost + shift_cost[m]);
@@ -2212,7 +2212,7 @@ synth_mult (alg_out, t, cost_limit)
break;
}
- d = ((unsigned HOST_WIDE_INT) 1 << m) - 1;
+ d = ((HOST_WIDE_UINT) 1 << m) - 1;
if (t % d == 0 && t > d)
{
cost = MIN (shiftsub_cost[m], add_cost + shift_cost[m]);
@@ -2514,7 +2514,7 @@ expand_mult (mode, op0, op1, target, unsignedp)
int
ceil_log2 (x)
- unsigned HOST_WIDE_INT x;
+ HOST_WIDE_UINT x;
{
return floor_log2 (x - 1) + 1;
}
@@ -2536,20 +2536,20 @@ ceil_log2 (x)
where m is the full HOST_BITS_PER_WIDE_INT + 1 bit multiplier. */
static
-unsigned HOST_WIDE_INT
+HOST_WIDE_UINT
choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr)
- unsigned HOST_WIDE_INT d;
+ HOST_WIDE_UINT d;
int n;
int precision;
- unsigned HOST_WIDE_INT *multiplier_ptr;
+ HOST_WIDE_UINT *multiplier_ptr;
int *post_shift_ptr;
int *lgup_ptr;
{
- unsigned HOST_WIDE_INT mhigh_hi, mhigh_lo;
- unsigned HOST_WIDE_INT mlow_hi, mlow_lo;
+ HOST_WIDE_UINT mhigh_hi, mhigh_lo;
+ HOST_WIDE_UINT mlow_hi, mlow_lo;
int lgup, post_shift;
int pow, pow2;
- unsigned HOST_WIDE_INT nh, nl, dummy1, dummy2;
+ HOST_WIDE_UINT nh, nl, dummy1, dummy2;
/* lgup = ceil(log2(divisor)); */
lgup = ceil_log2 (d);
@@ -2570,22 +2570,22 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr)
/* mlow = 2^(N + lgup)/d */
if (pow >= HOST_BITS_PER_WIDE_INT)
{
- nh = (unsigned HOST_WIDE_INT) 1 << (pow - HOST_BITS_PER_WIDE_INT);
+ nh = (HOST_WIDE_UINT) 1 << (pow - HOST_BITS_PER_WIDE_INT);
nl = 0;
}
else
{
nh = 0;
- nl = (unsigned HOST_WIDE_INT) 1 << pow;
+ nl = (HOST_WIDE_UINT) 1 << pow;
}
div_and_round_double (TRUNC_DIV_EXPR, 1, nl, nh, d, (HOST_WIDE_INT) 0,
&mlow_lo, &mlow_hi, &dummy1, &dummy2);
/* mhigh = (2^(N + lgup) + 2^N + lgup - precision)/d */
if (pow2 >= HOST_BITS_PER_WIDE_INT)
- nh |= (unsigned HOST_WIDE_INT) 1 << (pow2 - HOST_BITS_PER_WIDE_INT);
+ nh |= (HOST_WIDE_UINT) 1 << (pow2 - HOST_BITS_PER_WIDE_INT);
else
- nl |= (unsigned HOST_WIDE_INT) 1 << pow2;
+ nl |= (HOST_WIDE_UINT) 1 << pow2;
div_and_round_double (TRUNC_DIV_EXPR, 1, nl, nh, d, (HOST_WIDE_INT) 0,
&mhigh_lo, &mhigh_hi, &dummy1, &dummy2);
@@ -2603,8 +2603,8 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr)
/* Reduce to lowest terms */
for (post_shift = lgup; post_shift > 0; post_shift--)
{
- unsigned HOST_WIDE_INT ml_lo = (mlow_hi << (HOST_BITS_PER_WIDE_INT - 1)) | (mlow_lo >> 1);
- unsigned HOST_WIDE_INT mh_lo = (mhigh_hi << (HOST_BITS_PER_WIDE_INT - 1)) | (mhigh_lo >> 1);
+ HOST_WIDE_UINT ml_lo = (mlow_hi << (HOST_BITS_PER_WIDE_INT - 1)) | (mlow_lo >> 1);
+ HOST_WIDE_UINT mh_lo = (mhigh_hi << (HOST_BITS_PER_WIDE_INT - 1)) | (mhigh_lo >> 1);
if (ml_lo >= mh_lo)
break;
@@ -2618,7 +2618,7 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr)
*lgup_ptr = lgup;
if (n < HOST_BITS_PER_WIDE_INT)
{
- unsigned HOST_WIDE_INT mask = ((unsigned HOST_WIDE_INT) 1 << n) - 1;
+ HOST_WIDE_UINT mask = ((HOST_WIDE_UINT) 1 << n) - 1;
*multiplier_ptr = mhigh_lo & mask;
return mhigh_lo >= mask;
}
@@ -2632,9 +2632,9 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr)
/* Compute the inverse of X mod 2**n, i.e., find Y such that X * Y is
congruent to 1 (mod 2**N). */
-static unsigned HOST_WIDE_INT
+static HOST_WIDE_UINT
invert_mod2n (x, n)
- unsigned HOST_WIDE_INT x;
+ HOST_WIDE_UINT x;
int n;
{
/* Solve x*y == 1 (mod 2^n), where x is odd. Return y. */
@@ -2643,13 +2643,13 @@ invert_mod2n (x, n)
x*y == 1 mod 2^3, since x is assumed odd.
Each iteration doubles the number of bits of significance in y. */
- unsigned HOST_WIDE_INT mask;
- unsigned HOST_WIDE_INT y = x;
+ HOST_WIDE_UINT mask;
+ HOST_WIDE_UINT y = x;
int nbit = 3;
mask = (n == HOST_BITS_PER_WIDE_INT
- ? ~(unsigned HOST_WIDE_INT) 0
- : ((unsigned HOST_WIDE_INT) 1 << n) - 1);
+ ? ~(HOST_WIDE_UINT) 0
+ : ((HOST_WIDE_UINT) 1 << n) - 1);
while (nbit < n)
{
@@ -2710,7 +2710,7 @@ rtx
expand_mult_highpart (mode, op0, cnst1, target, unsignedp, max_cost)
enum machine_mode mode;
register rtx op0, target;
- unsigned HOST_WIDE_INT cnst1;
+ HOST_WIDE_UINT cnst1;
int unsignedp;
int max_cost;
{
@@ -3066,10 +3066,10 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
{
if (unsignedp)
{
- unsigned HOST_WIDE_INT mh, ml;
+ HOST_WIDE_UINT mh, ml;
int pre_shift, post_shift;
int dummy;
- unsigned HOST_WIDE_INT d = INTVAL (op1);
+ HOST_WIDE_UINT d = INTVAL (op1);
if (EXACT_POWER_OF_2_OR_ZERO_P (d))
{
@@ -3090,7 +3090,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
}
else if (size <= HOST_BITS_PER_WIDE_INT)
{
- if (d >= ((unsigned HOST_WIDE_INT) 1 << (size - 1)))
+ if (d >= ((HOST_WIDE_UINT) 1 << (size - 1)))
{
/* Most significant bit of divisor is set; emit an scc
insn. */
@@ -3181,10 +3181,10 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
}
else /* TRUNC_DIV, signed */
{
- unsigned HOST_WIDE_INT ml;
+ HOST_WIDE_UINT ml;
int lgup, post_shift;
HOST_WIDE_INT d = INTVAL (op1);
- unsigned HOST_WIDE_INT abs_d = d >= 0 ? d : -d;
+ HOST_WIDE_UINT abs_d = d >= 0 ? d : -d;
/* n rem d = n rem -d */
if (rem_flag && d < 0)
@@ -3198,7 +3198,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
else if (d == -1)
quotient = expand_unop (compute_mode, neg_optab, op0,
tquotient, 0);
- else if (abs_d == (unsigned HOST_WIDE_INT) 1 << (size - 1))
+ else if (abs_d == (HOST_WIDE_UINT) 1 << (size - 1))
{
/* This case is not handled correctly below. */
quotient = emit_store_flag (tquotient, EQ, op0, op1,
@@ -3266,7 +3266,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
{
choose_multiplier (abs_d, size, size - 1,
&ml, &post_shift, &lgup);
- if (ml < (unsigned HOST_WIDE_INT) 1 << (size - 1))
+ if (ml < (HOST_WIDE_UINT) 1 << (size - 1))
{
rtx t1, t2, t3;
@@ -3292,7 +3292,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
{
rtx t1, t2, t3, t4;
- ml |= (~(unsigned HOST_WIDE_INT) 0) << (size - 1);
+ ml |= (~(HOST_WIDE_UINT) 0) << (size - 1);
extra_cost = (shift_cost[post_shift]
+ shift_cost[size - 1] + 2 * add_cost);
t1 = expand_mult_highpart (compute_mode, op0, ml,
@@ -3337,7 +3337,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
/* We will come here only for signed operations. */
if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size)
{
- unsigned HOST_WIDE_INT mh, ml;
+ HOST_WIDE_UINT mh, ml;
int pre_shift, lgup, post_shift;
HOST_WIDE_INT d = INTVAL (op1);
@@ -3509,7 +3509,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
if (op1_is_constant && EXACT_POWER_OF_2_OR_ZERO_P (INTVAL (op1)))
{
rtx t1, t2, t3;
- unsigned HOST_WIDE_INT d = INTVAL (op1);
+ HOST_WIDE_UINT d = INTVAL (op1);
t1 = expand_shift (RSHIFT_EXPR, compute_mode, op0,
build_int_2 (floor_log2 (d), 0),
tquotient, 1);
@@ -3607,7 +3607,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
languages (Ada). */
rtx t1, t2, t3;
- unsigned HOST_WIDE_INT d = INTVAL (op1);
+ HOST_WIDE_UINT d = INTVAL (op1);
t1 = expand_shift (RSHIFT_EXPR, compute_mode, op0,
build_int_2 (floor_log2 (d), 0),
tquotient, 0);
@@ -3724,7 +3724,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
if (op1_is_constant && HOST_BITS_PER_WIDE_INT >= size)
{
HOST_WIDE_INT d = INTVAL (op1);
- unsigned HOST_WIDE_INT ml;
+ HOST_WIDE_UINT ml;
int post_shift;
rtx t1;
@@ -4351,7 +4351,7 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
else if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
&& ((STORE_FLAG_VALUE & GET_MODE_MASK (mode))
- == (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)))
+ == (HOST_WIDE_UINT) 1 << (GET_MODE_BITSIZE (mode) - 1)))
;
else
return 0;
diff --git a/gcc/expr.c b/gcc/expr.c
index 225b410..7bf1cb0 100755
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1687,7 +1687,7 @@ emit_block_move (x, y, size, align)
returned by the macro, it will definitely be less than the
actual mode mask. */
&& ((GET_CODE (size) == CONST_INT
- && ((unsigned HOST_WIDE_INT) INTVAL (size)
+ && ((HOST_WIDE_UINT) INTVAL (size)
<= (GET_MODE_MASK (mode) >> 1)))
|| GET_MODE_BITSIZE (mode) >= BITS_PER_WORD)
&& (insn_operand_predicate[(int) code][0] == 0
@@ -2410,7 +2410,7 @@ clear_storage (object, size, align)
the mode mask, as it is returned by the macro, it will
definitely be less than the actual mode mask. */
&& ((GET_CODE (size) == CONST_INT
- && ((unsigned HOST_WIDE_INT) INTVAL (size)
+ && ((HOST_WIDE_UINT) INTVAL (size)
<= (GET_MODE_MASK (mode) >> 1)))
|| GET_MODE_BITSIZE (mode) >= BITS_PER_WORD)
&& (insn_operand_predicate[(int) code][0] == 0
@@ -2947,7 +2947,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
if (code != CODE_FOR_nothing
&& ((GET_CODE (size) == CONST_INT
- && ((unsigned HOST_WIDE_INT) INTVAL (size)
+ && ((HOST_WIDE_UINT) INTVAL (size)
<= (GET_MODE_MASK (mode) >> 1)))
|| GET_MODE_BITSIZE (mode) >= BITS_PER_WORD)
&& (insn_operand_predicate[(int) code][0] == 0
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 289de73..a603413 100755
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -116,10 +116,10 @@ static tree constant_boolean_node (int, tree);
HOST_BITS_PER_WIDE_INT/2 bits stored in each word, as a positive number. */
#define LOWPART(x) \
- ((x) & (((unsigned HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT/2)) - 1))
+ ((x) & (((HOST_WIDE_UINT) 1 << (HOST_BITS_PER_WIDE_INT/2)) - 1))
#define HIGHPART(x) \
- ((unsigned HOST_WIDE_INT) (x) >> HOST_BITS_PER_WIDE_INT/2)
-#define BASE ((unsigned HOST_WIDE_INT) 1 << HOST_BITS_PER_WIDE_INT/2)
+ ((HOST_WIDE_UINT) (x) >> HOST_BITS_PER_WIDE_INT/2)
+#define BASE ((HOST_WIDE_UINT) 1 << HOST_BITS_PER_WIDE_INT/2)
/* Unpack a two-word integer into 4 words.
LOW and HI are the integer, as two `HOST_WIDE_INT' pieces.
@@ -248,7 +248,7 @@ add_double (l1, h1, l2, h2, lv, hv)
HOST_WIDE_INT l, h;
l = l1 + l2;
- h = h1 + h2 + ((unsigned HOST_WIDE_INT) l < l1);
+ h = h1 + h2 + ((HOST_WIDE_UINT) l < l1);
*lv = l;
*hv = h;
@@ -293,7 +293,7 @@ mul_double (l1, h1, l2, h2, lv, hv)
HOST_WIDE_INT arg1[4];
HOST_WIDE_INT arg2[4];
HOST_WIDE_INT prod[4 * 2];
- register unsigned HOST_WIDE_INT carry;
+ register HOST_WIDE_UINT carry;
register int i, j, k;
HOST_WIDE_INT toplow, tophigh, neglow, neghigh;
@@ -362,14 +362,14 @@ lshift_double (l1, h1, count, prec, lv, hv, arith)
if (count >= HOST_BITS_PER_WIDE_INT)
{
- *hv = (unsigned HOST_WIDE_INT) l1 << (count - HOST_BITS_PER_WIDE_INT);
+ *hv = (HOST_WIDE_UINT) l1 << (count - HOST_BITS_PER_WIDE_INT);
*lv = 0;
}
else
{
- *hv = (((unsigned HOST_WIDE_INT) h1 << count)
- | ((unsigned HOST_WIDE_INT) l1 >> (HOST_BITS_PER_WIDE_INT - count - 1) >> 1));
- *lv = (unsigned HOST_WIDE_INT) l1 << count;
+ *hv = (((HOST_WIDE_UINT) h1 << count)
+ | ((HOST_WIDE_UINT) l1 >> (HOST_BITS_PER_WIDE_INT - count - 1) >> 1));
+ *lv = (HOST_WIDE_UINT) l1 << count;
}
}
@@ -385,9 +385,9 @@ rshift_double (l1, h1, count, prec, lv, hv, arith)
HOST_WIDE_INT *lv, *hv;
int arith;
{
- unsigned HOST_WIDE_INT signmask;
+ HOST_WIDE_UINT signmask;
signmask = (arith
- ? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1))
+ ? -((HOST_WIDE_UINT) h1 >> (HOST_BITS_PER_WIDE_INT - 1))
: 0);
#ifdef SHIFT_COUNT_TRUNCATED
@@ -399,14 +399,14 @@ rshift_double (l1, h1, count, prec, lv, hv, arith)
{
*hv = signmask;
*lv = ((signmask << (2 * HOST_BITS_PER_WIDE_INT - count - 1) << 1)
- | ((unsigned HOST_WIDE_INT) h1 >> (count - HOST_BITS_PER_WIDE_INT)));
+ | ((HOST_WIDE_UINT) h1 >> (count - HOST_BITS_PER_WIDE_INT)));
}
else
{
- *lv = (((unsigned HOST_WIDE_INT) l1 >> count)
- | ((unsigned HOST_WIDE_INT) h1 << (HOST_BITS_PER_WIDE_INT - count - 1) << 1));
+ *lv = (((HOST_WIDE_UINT) l1 >> count)
+ | ((HOST_WIDE_UINT) h1 << (HOST_BITS_PER_WIDE_INT - count - 1) << 1));
*hv = ((signmask << (HOST_BITS_PER_WIDE_INT - count))
- | ((unsigned HOST_WIDE_INT) h1 >> count));
+ | ((HOST_WIDE_UINT) h1 >> count));
}
}
@@ -478,8 +478,8 @@ div_and_round_double (code, uns,
HOST_WIDE_INT num[4 + 1]; /* extra element for scaling. */
HOST_WIDE_INT den[4], quo[4];
register int i, j;
- unsigned HOST_WIDE_INT work;
- register unsigned HOST_WIDE_INT carry = 0;
+ HOST_WIDE_UINT work;
+ register HOST_WIDE_UINT carry = 0;
HOST_WIDE_INT lnum = lnum_orig;
HOST_WIDE_INT hnum = hnum_orig;
HOST_WIDE_INT lden = lden_orig;
@@ -510,7 +510,7 @@ div_and_round_double (code, uns,
{ /* single precision */
*hquo = *hrem = 0;
/* This unsigned division rounds toward zero. */
- *lquo = lnum / (unsigned HOST_WIDE_INT) lden;
+ *lquo = lnum / (HOST_WIDE_UINT) lden;
goto finish_up;
}
@@ -538,8 +538,8 @@ div_and_round_double (code, uns,
for (i = 4 - 1; i >= 0; i--)
{
work = num[i] + carry * BASE;
- quo[i] = work / (unsigned HOST_WIDE_INT) lden;
- carry = work % (unsigned HOST_WIDE_INT) lden;
+ quo[i] = work / (HOST_WIDE_UINT) lden;
+ carry = work % (HOST_WIDE_UINT) lden;
}
}
else
@@ -547,7 +547,7 @@ div_and_round_double (code, uns,
/* Full double precision division,
with thanks to Don Knuth's "Seminumerical Algorithms". */
int num_hi_sig, den_hi_sig;
- unsigned HOST_WIDE_INT quo_est, scale;
+ HOST_WIDE_UINT quo_est, scale;
/* Find the highest non-zero divisor digit. */
for (i = 4 - 1; ; i--)
@@ -583,7 +583,7 @@ div_and_round_double (code, uns,
/* guess the next quotient digit, quo_est, by dividing the first
two remaining dividend digits by the high order quotient digit.
quo_est is never low and is at most 2 high. */
- unsigned HOST_WIDE_INT tmp;
+ HOST_WIDE_UINT tmp;
num_hi_sig = i + den_hi_sig + 1;
work = num[num_hi_sig] * BASE + num[num_hi_sig - 1];
@@ -686,12 +686,12 @@ div_and_round_double (code, uns,
/* if (2 * abs (lrem) >= abs (lden)) */
mul_double ((HOST_WIDE_INT) 2, (HOST_WIDE_INT) 0,
labs_rem, habs_rem, &ltwice, &htwice);
- if (((unsigned HOST_WIDE_INT) habs_den
- < (unsigned HOST_WIDE_INT) htwice)
- || (((unsigned HOST_WIDE_INT) habs_den
- == (unsigned HOST_WIDE_INT) htwice)
- && ((HOST_WIDE_INT unsigned) labs_den
- < (unsigned HOST_WIDE_INT) ltwice)))
+ if (((HOST_WIDE_UINT) habs_den
+ < (HOST_WIDE_UINT) htwice)
+ || (((HOST_WIDE_UINT) habs_den
+ == (HOST_WIDE_UINT) htwice)
+ && ((HOST_WIDE_UINT) labs_den
+ < (HOST_WIDE_UINT) ltwice)))
{
if (*hquo < 0)
/* quo = quo - 1; */
@@ -980,7 +980,7 @@ real_hex_to_f (s, mode)
{
REAL_VALUE_TYPE ip;
char *p = s;
- unsigned HOST_WIDE_INT low, high;
+ HOST_WIDE_UINT low, high;
int frexpon, expon, shcount, nrmcount, k;
int sign, expsign, decpt, isfloat, isldouble, gotp, lost;
char c;
@@ -1425,19 +1425,19 @@ int_const_binop (code, arg1, arg2, notrunc, forsize)
case MAX_EXPR:
if (uns)
{
- low = (((unsigned HOST_WIDE_INT) int1h
- < (unsigned HOST_WIDE_INT) int2h)
- || (((unsigned HOST_WIDE_INT) int1h
- == (unsigned HOST_WIDE_INT) int2h)
- && ((unsigned HOST_WIDE_INT) int1l
- < (unsigned HOST_WIDE_INT) int2l)));
+ low = (((HOST_WIDE_UINT) int1h
+ < (HOST_WIDE_UINT) int2h)
+ || (((HOST_WIDE_UINT) int1h
+ == (HOST_WIDE_UINT) int2h)
+ && ((HOST_WIDE_UINT) int1l
+ < (HOST_WIDE_UINT) int2l)));
}
else
{
low = ((int1h < int2h)
|| ((int1h == int2h)
- && ((unsigned HOST_WIDE_INT) int1l
- < (unsigned HOST_WIDE_INT) int2l)));
+ && ((HOST_WIDE_UINT) int1l
+ < (HOST_WIDE_UINT) int2l)));
}
if (low == (code == MIN_EXPR))
low = int1l, hi = int1h;
@@ -1663,7 +1663,7 @@ const_binop (code, arg1, arg2, notrunc)
tree
size_int_wide (number, high, bit_p)
- unsigned HOST_WIDE_INT number, high;
+ HOST_WIDE_UINT number, high;
int bit_p;
{
register tree t;
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 2854efe..b5b07e8 100755
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -1471,7 +1471,7 @@ hash_expr_1 (x, mode, do_not_record_p)
case CONST_INT:
{
- unsigned HOST_WIDE_INT tem = INTVAL (x);
+ HOST_WIDE_UINT tem = INTVAL (x);
hash += ((unsigned) CONST_INT << 7) + (unsigned) mode + tem;
return hash;
}
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h
index b97ea1c..a7da19b 100755
--- a/gcc/hard-reg-set.h
+++ b/gcc/hard-reg-set.h
@@ -34,7 +34,7 @@ Boston, MA 02111-1307, USA. */
registers and then only in the few cases where we have an array of
HARD_REG_SETs, so it needn't be as complex as it used to be. */
-typedef unsigned HOST_WIDE_INT HARD_REG_ELT_TYPE;
+typedef HOST_WIDE_UINT HARD_REG_ELT_TYPE;
#define HARD_REG_SET HARD_REG_ELT_TYPE
diff --git a/gcc/hwint.h b/gcc/hwint.h
deleted file mode 100755
index 91973b8..0000000
--- a/gcc/hwint.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* HOST_WIDE_INT definitions for the GNU compiler.
- Copyright (C) 1998 Free Software Foundation, Inc.
-
- This file is part of GNU CC.
-
- Provide definitions for macros which depend on HOST_BITS_PER_INT
- and HOST_BITS_PER_LONG. */
-
-#ifndef __HWINT_H__
-#define __HWINT_H__
-
-/* Only do all of this if both of these macros are defined, otherwise
- they'll evaluate to zero, which is not what you want. */
-#if defined (HOST_BITS_PER_LONG) && defined (HOST_BITS_PER_INT)
-
-/* Find the largest host integer type and set its size and type. */
-
-#ifndef HOST_BITS_PER_WIDE_INT
-
-# if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
-# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
-# define HOST_WIDE_INT long
-# else
-# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
-# define HOST_WIDE_INT int
-# endif
-
-#endif /* ! HOST_BITS_PER_WIDE_INT */
-
-
-/* Provide defaults for the way to print a HOST_WIDE_INT
- in various manners. */
-
-#ifndef HOST_WIDE_INT_PRINT_DEC
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-# define HOST_WIDE_INT_PRINT_DEC "%d"
-# else
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-# define HOST_WIDE_INT_PRINT_DEC "%ld"
-# else
-# define HOST_WIDE_INT_PRINT_DEC "%lld"
-# endif
-# endif
-#endif /* ! HOST_WIDE_INT_PRINT_DEC */
-
-#ifndef HOST_WIDE_INT_PRINT_UNSIGNED
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-# define HOST_WIDE_INT_PRINT_UNSIGNED "%u"
-# else
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-# define HOST_WIDE_INT_PRINT_UNSIGNED "%lu"
-# else
-# define HOST_WIDE_INT_PRINT_UNSIGNED "%llu"
-# endif
-# endif
-#endif /* ! HOST_WIDE_INT_PRINT_UNSIGNED */
-
-#ifndef HOST_WIDE_INT_PRINT_HEX
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-# define HOST_WIDE_INT_PRINT_HEX "0x%x"
-# else
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-# define HOST_WIDE_INT_PRINT_HEX "0x%lx"
-# else
-# define HOST_WIDE_INT_PRINT_HEX "0x%llx"
-# endif
-# endif
-#endif /* ! HOST_WIDE_INT_PRINT_HEX */
-
-#ifndef HOST_WIDE_INT_PRINT_DOUBLE_HEX
-# if HOST_BITS_PER_WIDE_INT == 64
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%x%016x"
-# else
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%016lx"
-# else
-# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%llx%016llx"
-# endif
-# endif
-# else
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%x%08x"
-# else
-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx"
-# else
-# define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%llx%08llx"
-# endif
-# endif
-# endif
-#endif /* ! HOST_WIDE_INT_PRINT_DOUBLE_HEX */
-
-#endif /* HOST_BITS_PER_LONG && HOST_BITS_PER_INT */
-
-#endif /* __HWINT_H__ */
diff --git a/gcc/jump.c b/gcc/jump.c
index 12c90f5..471160d 100755
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -4946,8 +4946,8 @@ condjump_expect_p (insn)
int retval;
HOST_WIDE_INT exp_value;
HOST_WIDE_INT cmp_value;
- unsigned HOST_WIDE_INT exp_uns;
- unsigned HOST_WIDE_INT cmp_uns;
+ HOST_WIDE_UINT exp_uns;
+ HOST_WIDE_UINT cmp_uns;
if (GET_CODE (insn) != JUMP_INSN)
return 0;
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index c4c48f9..cf7231f 100755
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -26,19 +26,6 @@ Boston, MA 02111-1307, USA. */
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
-/* It is incorrect to include config.h here, because this file is being
- compiled for the target, and hence definitions concerning only the host
- do not apply. */
-
-#include "tconfig.h"
-
-/* We disable this when inhibit_libc, so that gcc can still be built without
- needing header files first. */
-/* ??? This is not a good solution, since prototypes may be required in
- some cases for correct code. See also frame.c. */
-
-#include "machmode.h"
-#include "defaults.h"
#include <stddef.h>
/* Don't use `fancy_abort' here even if config.h says to use it. */
@@ -46,26 +33,6 @@ Boston, MA 02111-1307, USA. */
#undef abort
#endif
-#if (SUPPORTS_WEAK == 1) && (defined (ASM_OUTPUT_DEF) || defined (ASM_OUTPUT_WEAK_ALIAS))
-#define WEAK_ALIAS
-#endif
-
-/* In a cross-compilation situation, default to inhibiting compilation
- of routines that use libc. */
-
-
-/* Permit the tm.h file to select the endianness to use just for this
- file. This is used when the endianness is determined when the
- compiler is run. */
-
-#ifndef LIBGCC2_WORDS_BIG_ENDIAN
-#define LIBGCC2_WORDS_BIG_ENDIAN WORDS_BIG_ENDIAN
-#endif
-
-#ifndef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
-#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE LONG_DOUBLE_TYPE_SIZE
-#endif
-
/* In the first part of this file, we are interfacing to calls generated
by the compiler itself. These calls pass values into these routines
which have very specific modes (rather than very specific types), and
@@ -84,13 +51,6 @@ typedef unsigned int UDItype __attribute__ ((mode (DI)));
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
-#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
-typedef float XFtype __attribute__ ((mode (XF)));
-#endif
-#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
-typedef float TFtype __attribute__ ((mode (TF)));
-#endif
-
typedef int word_type __attribute__ ((mode (__word__)));
/* Make sure that we don't accidentally use any normal C language built-in
@@ -107,16 +67,9 @@ typedef int word_type __attribute__ ((mode (__word__)));
#define float bogus_type
#define double bogus_type
-#define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+#define SI_TYPE_SIZE (sizeof (SItype) * 8)
-/* DIstructs are pairs of SItype values in the order determined by
- LIBGCC2_WORDS_BIG_ENDIAN. */
-
-#if LIBGCC2_WORDS_BIG_ENDIAN
- struct DIstruct {SItype high, low;};
-#else
- struct DIstruct {SItype low, high;};
-#endif
+struct DIstruct {SItype low, high;};
/* We need this union to unpack/pack DImode values, since we don't have
any arithmetic yet. Incoming DImode parameters are stored into the
@@ -138,12 +91,6 @@ typedef union
extern DItype __fixunssfdi (SFtype a);
extern DItype __fixunsdfdi (DFtype a);
-#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
-extern DItype __fixunsxfdi (XFtype a);
-#endif
-#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
-extern DItype __fixunstfdi (TFtype a);
-#endif
#if defined (L_negdi2) || defined (L_divdi3) || defined (L_moddi3)
#if defined (L_divdi3) || defined (L_moddi3)
@@ -179,7 +126,7 @@ __lshrdi3 (DItype u, word_type b)
uu.ll = u;
- bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
+ bm = (sizeof (SItype) * 8) - b;
if (bm <= 0)
{
w.s.high = 0;
@@ -209,7 +156,7 @@ __ashldi3 (DItype u, word_type b)
uu.ll = u;
- bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
+ bm = (sizeof (SItype) * 8) - b;
if (bm <= 0)
{
w.s.low = 0;
@@ -239,11 +186,11 @@ __ashrdi3 (DItype u, word_type b)
uu.ll = u;
- bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
+ bm = (sizeof (SItype) * 8) - b;
if (bm <= 0)
{
/* w.s.high = 1..1 or 0..0 */
- w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1);
+ w.s.high = uu.s.high >> (sizeof (SItype) * 8 - 1);
w.s.low = uu.s.high >> -bm;
}
else
@@ -270,7 +217,7 @@ __ffsdi2 (DItype u)
w.s.low = ffs (uu.s.high);
if (w.s.low != 0)
{
- w.s.low += BITS_PER_UNIT * sizeof (SItype);
+ w.s.low += 8 * sizeof (SItype);
return w.ll;
}
return w.ll;
@@ -762,92 +709,8 @@ __ucmpdi2 (DItype a, DItype b)
}
#endif
-#if defined(L_fixunstfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
-#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
-
-DItype
-__fixunstfdi (TFtype a)
-{
- TFtype b;
- UDItype v;
-
- if (a < 0)
- return 0;
-
- /* Compute high word of result, as a flonum. */
- b = (a / HIGH_WORD_COEFF);
- /* Convert that to fixed (but not to DItype!),
- and shift it into the high word. */
- v = (USItype) b;
- v <<= WORD_SIZE;
- /* Remove high part from the TFtype, leaving the low part as flonum. */
- a -= (TFtype)v;
- /* Convert that to fixed (but not to DItype!) and add it in.
- Sometimes A comes out negative. This is significant, since
- A has more bits than a long int does. */
- if (a < 0)
- v -= (USItype) (- a);
- else
- v += (USItype) a;
- return v;
-}
-#endif
-
-#if defined(L_fixtfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
-DItype
-__fixtfdi (TFtype a)
-{
- if (a < 0)
- return - __fixunstfdi (-a);
- return __fixunstfdi (a);
-}
-#endif
-
-#if defined(L_fixunsxfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96)
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
-#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
-
-DItype
-__fixunsxfdi (XFtype a)
-{
- XFtype b;
- UDItype v;
-
- if (a < 0)
- return 0;
-
- /* Compute high word of result, as a flonum. */
- b = (a / HIGH_WORD_COEFF);
- /* Convert that to fixed (but not to DItype!),
- and shift it into the high word. */
- v = (USItype) b;
- v <<= WORD_SIZE;
- /* Remove high part from the XFtype, leaving the low part as flonum. */
- a -= (XFtype)v;
- /* Convert that to fixed (but not to DItype!) and add it in.
- Sometimes A comes out negative. This is significant, since
- A has more bits than a long int does. */
- if (a < 0)
- v -= (USItype) (- a);
- else
- v += (USItype) a;
- return v;
-}
-#endif
-
-#if defined(L_fixxfdi) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96)
-DItype
-__fixxfdi (XFtype a)
-{
- if (a < 0)
- return - __fixunsxfdi (-a);
- return __fixunsxfdi (a);
-}
-#endif
-
#ifdef L_fixunsdfdi
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+#define WORD_SIZE (sizeof (SItype) * 8)
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
DItype
@@ -889,7 +752,7 @@ __fixdfdi (DFtype a)
#endif
#ifdef L_fixunssfdi
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+#define WORD_SIZE (sizeof (SItype) * 8)
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
DItype
@@ -934,46 +797,8 @@ __fixsfdi (SFtype a)
}
#endif
-#if defined(L_floatdixf) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96)
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
-#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
-#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
-
-XFtype
-__floatdixf (DItype u)
-{
- XFtype d;
-
- d = (SItype) (u >> WORD_SIZE);
- d *= HIGH_HALFWORD_COEFF;
- d *= HIGH_HALFWORD_COEFF;
- d += (USItype) (u & (HIGH_WORD_COEFF - 1));
-
- return d;
-}
-#endif
-
-#if defined(L_floatditf) && (LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128)
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
-#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
-#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
-
-TFtype
-__floatditf (DItype u)
-{
- TFtype d;
-
- d = (SItype) (u >> WORD_SIZE);
- d *= HIGH_HALFWORD_COEFF;
- d *= HIGH_HALFWORD_COEFF;
- d += (USItype) (u & (HIGH_WORD_COEFF - 1));
-
- return d;
-}
-#endif
-
#ifdef L_floatdidf
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+#define WORD_SIZE (sizeof (SItype) * 8)
#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
@@ -992,10 +817,10 @@ __floatdidf (DItype u)
#endif
#ifdef L_floatdisf
-#define WORD_SIZE (sizeof (SItype) * BITS_PER_UNIT)
+#define WORD_SIZE (sizeof (SItype) * 8)
#define HIGH_HALFWORD_COEFF (((UDItype) 1) << (WORD_SIZE / 2))
#define HIGH_WORD_COEFF (((UDItype) 1) << WORD_SIZE)
-#define DI_SIZE (sizeof (DItype) * BITS_PER_UNIT)
+#define DI_SIZE (sizeof (DItype) * 8)
/* Define codes for all the float formats that we know of. Note
that this is copied from real.h. */
@@ -1059,28 +884,6 @@ __floatdisf (DItype u)
}
#endif
-#if defined(L_fixunsxfsi) && LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
-/* Reenable the normal types, in case limits.h needs them. */
-#undef char
-#undef short
-#undef int
-#undef long
-#undef unsigned
-#undef float
-#undef double
-#undef MIN
-#undef MAX
-#include <limits.h>
-
-USItype
-__fixunsxfsi (XFtype a)
-{
- if (a >= - (DFtype) LONG_MIN)
- return (SItype) (a + LONG_MIN) - LONG_MIN;
- return (SItype) a;
-}
-#endif
-
#ifdef L_fixunsdfsi
/* Reenable the normal types, in case limits.h needs them. */
#undef char
diff --git a/gcc/loop.c b/gcc/loop.c
index c7680b4..17bf814 100755
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -314,7 +314,7 @@ static int valid_initial_value_p (rtx, rtx, int, rtx);
static void find_mem_givs (rtx, rtx, int, rtx, rtx);
static void record_biv (struct induction *, rtx, rtx, rtx, rtx, rtx *, int, int);
static void check_final_value (struct induction *, rtx, rtx,
- unsigned HOST_WIDE_INT);
+ HOST_WIDE_UINT);
static void record_giv (struct induction *, rtx, rtx, rtx, rtx, rtx, int, enum g_types, int, rtx *, rtx, rtx);
static void update_giv_derive (rtx);
static int basic_induction_var (rtx, enum machine_mode, rtx, rtx, rtx *, rtx *, rtx **);
@@ -5519,7 +5519,7 @@ static void
check_final_value (v, loop_start, loop_end, n_iterations)
struct induction *v;
rtx loop_start, loop_end;
- unsigned HOST_WIDE_INT n_iterations;
+ HOST_WIDE_UINT n_iterations;
{
struct iv_class *bl;
rtx final_value = 0;
@@ -7768,7 +7768,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
int nonneg = 0;
enum rtx_code cmp_code;
int comparison_const_width;
- unsigned HOST_WIDE_INT comparison_sign_mask;
+ HOST_WIDE_UINT comparison_sign_mask;
add_val = INTVAL (bl->biv->add_val);
comparison_value = XEXP (comparison, 1);
@@ -7781,7 +7781,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
if (comparison_const_width > HOST_BITS_PER_WIDE_INT)
comparison_const_width = HOST_BITS_PER_WIDE_INT;
comparison_sign_mask
- = (unsigned HOST_WIDE_INT)1 << (comparison_const_width - 1);
+ = (HOST_WIDE_UINT)1 << (comparison_const_width - 1);
/* If the comparison value is not a loop invariant, then we
can not reverse this loop.
@@ -7811,7 +7811,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
current comparison code is LT. */
comparison_val = comparison_val + add_val - 1;
comparison_val
- -= (unsigned HOST_WIDE_INT) comparison_val % add_val;
+ -= (HOST_WIDE_UINT) comparison_val % add_val;
/* We postpone overflow checks for COMPARISON_VAL here;
even if there is an overflow, we might still be able to
reverse the loop, if converting the loop exit test to
@@ -7861,7 +7861,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
if (initial_value == const0_rtx
&& GET_CODE (comparison_value) == CONST_INT)
{
- if (((unsigned HOST_WIDE_INT) comparison_val % add_val) != 0)
+ if (((HOST_WIDE_UINT) comparison_val % add_val) != 0)
return 0;
}
else
@@ -8779,14 +8779,14 @@ get_condition (jump, earliest)
&& GET_MODE_BITSIZE (GET_MODE (op0)) <= HOST_BITS_PER_WIDE_INT)
{
HOST_WIDE_INT const_val = INTVAL (op1);
- unsigned HOST_WIDE_INT uconst_val = const_val;
- unsigned HOST_WIDE_INT max_val
- = (unsigned HOST_WIDE_INT) GET_MODE_MASK (GET_MODE (op0));
+ HOST_WIDE_UINT uconst_val = const_val;
+ HOST_WIDE_UINT max_val
+ = (HOST_WIDE_UINT) GET_MODE_MASK (GET_MODE (op0));
switch (code)
{
case LE:
- if ((unsigned HOST_WIDE_INT) const_val != max_val >> 1)
+ if ((HOST_WIDE_UINT) const_val != max_val >> 1)
code = LT, op1 = GEN_INT (const_val + 1);
break;
@@ -8862,7 +8862,7 @@ insert_bct (loop_start, loop_end, loop_info)
struct loop_info *loop_info;
{
int i;
- unsigned HOST_WIDE_INT n_iterations;
+ HOST_WIDE_UINT n_iterations;
int increment_direction, compare_direction;
@@ -9001,7 +9001,7 @@ insert_bct (loop_start, loop_end, loop_info)
rtx sequence;
rtx iterations_num_reg;
- unsigned HOST_WIDE_INT increment_value_abs
+ HOST_WIDE_UINT increment_value_abs
= INTVAL (increment) * increment_direction;
/* make sure that the increment is a power of two, otherwise (an
diff --git a/gcc/loop.h b/gcc/loop.h
index 548dc3e..ed70e30 100755
--- a/gcc/loop.h
+++ b/gcc/loop.h
@@ -180,7 +180,7 @@ struct loop_info
iterations can be as high as 2^wordsize - 1. For loops with a
wider iterator, this number will be zero if the number of loop
iterations is too large for an unsigned integer to hold. */
- unsigned HOST_WIDE_INT n_iterations;
+ HOST_WIDE_UINT n_iterations;
/* The loop unrolling factor.
Potential values:
0: unrolled
@@ -234,14 +234,14 @@ void unroll_block_trees (void);
void unroll_loop (rtx, int, rtx, rtx, struct loop_info *, int);
rtx biv_total_increment (struct iv_class *, rtx, rtx);
-unsigned HOST_WIDE_INT loop_iterations (rtx, rtx, struct loop_info *);
+HOST_WIDE_UINT loop_iterations (rtx, rtx, struct loop_info *);
int precondition_loop_p (rtx, struct loop_info *,
rtx *, rtx *, rtx *,
enum machine_mode *mode);
rtx final_biv_value (struct iv_class *, rtx, rtx,
- unsigned HOST_WIDE_INT);
+ HOST_WIDE_UINT);
rtx final_giv_value (struct induction *, rtx, rtx,
- unsigned HOST_WIDE_INT);
+ HOST_WIDE_UINT);
void emit_unrolled_add (rtx, rtx, rtx);
int back_branch_in_range_p (rtx, rtx, rtx);
diff --git a/gcc/machmode.h b/gcc/machmode.h
index e9d1519..bf6b888 100755
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -24,82 +24,23 @@ Boston, MA 02111-1307, USA. */
/* Strictly speaking, this isn't the proper place to include these definitions,
but this file is included by every GCC file. */
-/* Find the largest host integer type and set its size and type. */
+#include <stdint.h>
+#include <inttypes.h>
-#ifndef HOST_BITS_PER_WIDE_INT
-
-#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
-#define HOST_WIDE_INT long
-#else
-#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
-#define HOST_WIDE_INT int
-#endif
-
-#endif
+#define HOST_BITS_PER_WIDE_INT 32
+#define HOST_WIDE_INT int32_t
+#define HOST_WIDE_UINT uint32_t
/* Provide defaults for the way to print a HOST_WIDE_INT
in various manners. */
-#ifndef HOST_WIDE_INT_PRINT_DEC
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_DEC "%d"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_DEC "%ld"
-#else
-#define HOST_WIDE_INT_PRINT_DEC "%lld"
-#endif
-#endif
-#endif
+#define HOST_WIDE_INT_PRINT_DEC "%" PRId32
-#ifndef HOST_WIDE_INT_PRINT_UNSIGNED
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_UNSIGNED "%u"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_UNSIGNED "%lu"
-#else
-#define HOST_WIDE_INT_PRINT_UNSIGNED "%llu"
-#endif
-#endif
-#endif
+#define HOST_WIDE_INT_PRINT_UNSIGNED "%" PRIu32
-#ifndef HOST_WIDE_INT_PRINT_HEX
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_HEX "0x%x"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_HEX "0x%lx"
-#else
-#define HOST_WIDE_INT_PRINT_HEX "0x%llx"
-#endif
-#endif
-#endif
+#define HOST_WIDE_INT_PRINT_HEX "0x%" PRIx32
-#ifndef HOST_WIDE_INT_PRINT_DOUBLE_HEX
-#if HOST_BITS_PER_WIDE_INT == 64
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%x%016x"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%016lx"
-#else
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%llx%016llx"
-#endif
-#endif
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_INT
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%x%08x"
-#else
-#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%lx%08lx"
-#else
-#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%llx%08llx"
-#endif
-#endif
-#endif
-#endif
+#define HOST_WIDE_INT_PRINT_DOUBLE_HEX "0x%" PRIx32 "%08" PRIx32
/* Make an enum class that gives all the machine modes. */
@@ -172,7 +113,7 @@ extern int mode_unit_size[];
/* Get a bitmask containing 1 for all bits in a word
that fit within mode MODE. */
-extern unsigned HOST_WIDE_INT mode_mask_array[];
+extern HOST_WIDE_UINT mode_mask_array[];
#define GET_MODE_MASK(MODE) mode_mask_array[(int) (MODE)]
diff --git a/gcc/real.c b/gcc/real.c
index c86cbaf..32d3153 100755
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -313,10 +313,10 @@ static void etoe24 (unsigned EMUSHORT *, unsigned EMUSHORT *);
static void toe24 (unsigned EMUSHORT *, unsigned EMUSHORT *);
static int ecmp (unsigned EMUSHORT *, unsigned EMUSHORT *);
static void ltoe (HOST_WIDE_INT *, unsigned EMUSHORT *);
-static void ultoe (unsigned HOST_WIDE_INT *, unsigned EMUSHORT *);
+static void ultoe (HOST_WIDE_UINT *, unsigned EMUSHORT *);
static void eifrac (unsigned EMUSHORT *, HOST_WIDE_INT *,
unsigned EMUSHORT *);
-static void euifrac (unsigned EMUSHORT *, unsigned HOST_WIDE_INT *,
+static void euifrac (unsigned EMUSHORT *, HOST_WIDE_UINT *,
unsigned EMUSHORT *);
static int eshift (unsigned EMUSHORT *, int);
static int enormlz (unsigned EMUSHORT *);
@@ -571,7 +571,7 @@ etrunci (x)
}
-/* Truncate REAL_VALUE_TYPE toward zero to unsigned HOST_WIDE_INT;
+/* Truncate REAL_VALUE_TYPE toward zero to HOST_WIDE_UINT;
implements REAL_VALUE_UNSIGNED_RNDZINT (x) (etruncui (x)). */
REAL_VALUE_TYPE
@@ -580,7 +580,7 @@ etruncui (x)
{
unsigned EMUSHORT f[NE], g[NE];
REAL_VALUE_TYPE r;
- unsigned HOST_WIDE_INT l;
+ HOST_WIDE_UINT l;
GET_REAL (&x, g);
#ifdef NANS
@@ -684,16 +684,16 @@ efixi (x)
return l;
}
-/* Round real toward zero to unsigned HOST_WIDE_INT
+/* Round real toward zero to HOST_WIDE_UINT
implements REAL_VALUE_UNSIGNED_FIX (x).
Negative input returns zero. */
-unsigned HOST_WIDE_INT
+HOST_WIDE_UINT
efixui (x)
REAL_VALUE_TYPE x;
{
unsigned EMUSHORT f[NE], g[NE];
- unsigned HOST_WIDE_INT l;
+ HOST_WIDE_UINT l;
GET_REAL (&x, f);
#ifdef NANS
@@ -735,9 +735,9 @@ ereal_from_int (d, i, j, mode)
high += 1;
}
eldexp (eone, HOST_BITS_PER_WIDE_INT, df);
- ultoe ((unsigned HOST_WIDE_INT *) &high, dg);
+ ultoe ((HOST_WIDE_UINT *) &high, dg);
emul (dg, df, dg);
- ultoe ((unsigned HOST_WIDE_INT *) &low, df);
+ ultoe ((HOST_WIDE_UINT *) &low, df);
eadd (df, dg, dg);
if (sign)
eneg (dg);
@@ -780,11 +780,11 @@ ereal_from_int (d, i, j, mode)
void
ereal_from_uint (d, i, j, mode)
REAL_VALUE_TYPE *d;
- unsigned HOST_WIDE_INT i, j;
+ HOST_WIDE_UINT i, j;
enum machine_mode mode;
{
unsigned EMUSHORT df[NE], dg[NE];
- unsigned HOST_WIDE_INT low, high;
+ HOST_WIDE_UINT low, high;
if (GET_MODE_CLASS (mode) != MODE_FLOAT)
abort ();
@@ -858,9 +858,9 @@ ereal_to_int (low, high, rr)
}
eldexp (eone, HOST_BITS_PER_WIDE_INT, df);
ediv (df, d, dg); /* dg = d / 2^32 is the high word */
- euifrac (dg, (unsigned HOST_WIDE_INT *) high, dh);
+ euifrac (dg, (HOST_WIDE_UINT *) high, dh);
emul (df, dh, dg); /* fractional part is the low word */
- euifrac (dg, (unsigned HOST_WIDE_INT *)low, dh);
+ euifrac (dg, (HOST_WIDE_UINT *)low, dh);
if (s)
{
/* complement and add 1 */
@@ -1250,7 +1250,7 @@ ereal_isneg (x)
efloor (a, b) truncate to integer, toward -infinity
efrexp (a, exp, s) extract exponent and significand
eifrac (e, &l, frac) e to HOST_WIDE_INT and e type fraction
- euifrac (e, &l, frac) e to unsigned HOST_WIDE_INT and e type fraction
+ euifrac (e, &l, frac) e to HOST_WIDE_UINT and e type fraction
einfin (e) set e to infinity, leaving its sign alone
eldexp (a, n, b) multiply by 2**n
emov (a, b) b = a
@@ -1271,7 +1271,7 @@ ereal_isneg (x)
etoe53 (e, &d) convert e type to IEEE double precision
etoe64 (e, &d) convert e type to IEEE long double precision
ltoe (&l, e) HOST_WIDE_INT to e type
- ultoe (&l, e) unsigned HOST_WIDE_INT to e type
+ ultoe (&l, e) HOST_WIDE_UINT to e type
eisneg (e) 1 if sign bit of e != 0, else 0
eisinf (e) 1 if e has maximum exponent (non-IEEE)
or is infinite (IEEE)
@@ -3789,19 +3789,19 @@ ltoe (lp, y)
unsigned EMUSHORT *y;
{
unsigned EMUSHORT yi[NI];
- unsigned HOST_WIDE_INT ll;
+ HOST_WIDE_UINT ll;
int k;
ecleaz (yi);
if (*lp < 0)
{
/* make it positive */
- ll = (unsigned HOST_WIDE_INT) (-(*lp));
+ ll = (HOST_WIDE_UINT) (-(*lp));
yi[0] = 0xffff; /* put correct sign in the e type number */
}
else
{
- ll = (unsigned HOST_WIDE_INT) (*lp);
+ ll = (HOST_WIDE_UINT) (*lp);
}
/* move the long integer to yi significand area */
#if HOST_BITS_PER_WIDE_INT == 64
@@ -3823,15 +3823,15 @@ ltoe (lp, y)
emovo (yi, y); /* output the answer */
}
-/* Convert unsigned HOST_WIDE_INT LP to e type Y. */
+/* Convert HOST_WIDE_UINT LP to e type Y. */
static void
ultoe (lp, y)
- unsigned HOST_WIDE_INT *lp;
+ HOST_WIDE_UINT *lp;
unsigned EMUSHORT *y;
{
unsigned EMUSHORT yi[NI];
- unsigned HOST_WIDE_INT ll;
+ HOST_WIDE_UINT ll;
int k;
ecleaz (yi);
@@ -3873,7 +3873,7 @@ eifrac (x, i, frac)
{
unsigned EMUSHORT xi[NI];
int j, k;
- unsigned HOST_WIDE_INT ll;
+ HOST_WIDE_UINT ll;
emovi (x, xi);
k = (int) xi[E] - (EXONE - 1);
@@ -3889,7 +3889,7 @@ eifrac (x, i, frac)
/* long integer overflow: output large integer
and correct fraction */
if (xi[0])
- *i = ((unsigned HOST_WIDE_INT) 1) << (HOST_BITS_PER_WIDE_INT - 1);
+ *i = ((HOST_WIDE_UINT) 1) << (HOST_BITS_PER_WIDE_INT - 1);
else
{
#ifdef FIXUNS_TRUNC_LIKE_FIX_TRUNC
@@ -3899,7 +3899,7 @@ eifrac (x, i, frac)
return;
#else
/* In other cases, return the largest positive integer. */
- *i = (((unsigned HOST_WIDE_INT) 1) << (HOST_BITS_PER_WIDE_INT - 1)) - 1;
+ *i = (((HOST_WIDE_UINT) 1) << (HOST_BITS_PER_WIDE_INT - 1)) - 1;
#endif
}
eshift (xi, k);
@@ -3944,17 +3944,17 @@ eifrac (x, i, frac)
}
-/* Find unsigned HOST_WIDE_INT integer I and floating point fractional part
+/* Find HOST_WIDE_UINT integer I and floating point fractional part
FRAC of e-type X. A negative input yields integer output = 0 but
correct fraction. */
static void
euifrac (x, i, frac)
unsigned EMUSHORT *x;
- unsigned HOST_WIDE_INT *i;
+ HOST_WIDE_UINT *i;
unsigned EMUSHORT *frac;
{
- unsigned HOST_WIDE_INT ll;
+ HOST_WIDE_UINT ll;
unsigned EMUSHORT xi[NI];
int j, k;
diff --git a/gcc/real.h b/gcc/real.h
index 3bbcc26..9b3537c 100755
--- a/gcc/real.h
+++ b/gcc/real.h
@@ -85,13 +85,13 @@ extern REAL_VALUE_TYPE etruncui (REAL_VALUE_TYPE);
extern REAL_VALUE_TYPE ereal_atof (char *, enum machine_mode);
extern REAL_VALUE_TYPE ereal_negate (REAL_VALUE_TYPE);
extern HOST_WIDE_INT efixi (REAL_VALUE_TYPE);
-extern unsigned HOST_WIDE_INT efixui (REAL_VALUE_TYPE);
+extern HOST_WIDE_UINT efixui (REAL_VALUE_TYPE);
extern void ereal_from_int (REAL_VALUE_TYPE *,
HOST_WIDE_INT, HOST_WIDE_INT,
enum machine_mode);
extern void ereal_from_uint (REAL_VALUE_TYPE *,
- unsigned HOST_WIDE_INT,
- unsigned HOST_WIDE_INT,
+ HOST_WIDE_UINT,
+ HOST_WIDE_UINT,
enum machine_mode);
extern void ereal_to_int (HOST_WIDE_INT *, HOST_WIDE_INT *,
REAL_VALUE_TYPE);
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 020df98..7d6764d 100755
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -222,7 +222,7 @@ try_auto_increment (insn, inc_insn, inc_insn_set, reg, increment, pre)
execution of the instruction.
Here we define the size of the hash table, and the hash function to use. */
#define REL_USE_HASH_SIZE 43
-#define REL_USE_HASH(I) ((I) % (unsigned HOST_WIDE_INT) REL_USE_HASH_SIZE)
+#define REL_USE_HASH(I) ((I) % (HOST_WIDE_UINT) REL_USE_HASH_SIZE)
/* For each register in a set of registers that are related, we keep a
struct related.
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 7097239..e23e6ae 100755
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -118,11 +118,11 @@ unsigned char mode_wider_mode[(int) MAX_MACHINE_MODE] = {
#undef DEF_MACHMODE
#define DEF_MACHMODE(SYM, NAME, CLASS, SIZE, UNIT, WIDER) \
- ((SIZE) * BITS_PER_UNIT >= HOST_BITS_PER_WIDE_INT) ? ~(unsigned HOST_WIDE_INT)0 : ((unsigned HOST_WIDE_INT) 1 << (SIZE) * BITS_PER_UNIT) - 1,
+ ((SIZE) * BITS_PER_UNIT >= HOST_BITS_PER_WIDE_INT) ? ~(HOST_WIDE_UINT)0 : ((HOST_WIDE_UINT) 1 << (SIZE) * BITS_PER_UNIT) - 1,
/* Indexed by machine mode, gives mask of significant bits in mode. */
-unsigned HOST_WIDE_INT mode_mask_array[(int) MAX_MACHINE_MODE] = {
+HOST_WIDE_UINT mode_mask_array[(int) MAX_MACHINE_MODE] = {
#include "machmode.def"
};
@@ -602,7 +602,7 @@ atoll(p)
if (new_wide < tmp_wide)
{
/* Return INT_MAX equiv on overflow. */
- tmp_wide = (~(unsigned HOST_WIDE_INT)0) >> 1;
+ tmp_wide = (~(HOST_WIDE_UINT)0) >> 1;
break;
}
tmp_wide = new_wide;
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 40f047f..3ec2144 100755
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -836,14 +836,14 @@ extern char *note_insn_name[];
defined here and in tree.h. */
#ifndef exact_log2
-#define exact_log2(N) exact_log2_wide ((unsigned HOST_WIDE_INT) (N))
-#define floor_log2(N) floor_log2_wide ((unsigned HOST_WIDE_INT) (N))
+#define exact_log2(N) exact_log2_wide ((HOST_WIDE_UINT) (N))
+#define floor_log2(N) floor_log2_wide ((HOST_WIDE_UINT) (N))
#endif
-extern int exact_log2_wide (unsigned HOST_WIDE_INT);
-extern int floor_log2_wide (unsigned HOST_WIDE_INT);
+extern int exact_log2_wide (HOST_WIDE_UINT);
+extern int floor_log2_wide (HOST_WIDE_UINT);
/* In expmed.c */
-extern int ceil_log2 (unsigned HOST_WIDE_INT);
+extern int ceil_log2 (HOST_WIDE_UINT);
#define plus_constant(X,C) plus_constant_wide (X, (HOST_WIDE_INT) (C))
@@ -1389,7 +1389,7 @@ extern void init_expmed (void);
extern void expand_inc (rtx, rtx);
extern void expand_dec (rtx, rtx);
extern rtx expand_mult_highpart (enum machine_mode, rtx,
- unsigned HOST_WIDE_INT, rtx,
+ HOST_WIDE_UINT, rtx,
int, int);
/* In gcse.c */
diff --git a/gcc/sbitmap.h b/gcc/sbitmap.h
index 73fffbc..06a57b1 100755
--- a/gcc/sbitmap.h
+++ b/gcc/sbitmap.h
@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
while more important issues are dealt with. */
#define SBITMAP_ELT_BITS HOST_BITS_PER_WIDE_INT
-#define SBITMAP_ELT_TYPE unsigned HOST_WIDE_INT
+#define SBITMAP_ELT_TYPE HOST_WIDE_UINT
typedef struct simple_bitmap_def {
/* Number of bits. */
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 7665fcb..d167b85 100755
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -4936,7 +4936,7 @@ expand_end_case (orig_index)
else if (TREE_INT_CST_HIGH (range) != 0
|| count < (unsigned int) CASE_VALUES_THRESHOLD
- || ((unsigned HOST_WIDE_INT) (TREE_INT_CST_LOW (range))
+ || ((HOST_WIDE_UINT) (TREE_INT_CST_LOW (range))
> 10 * count)
|| TREE_CODE (index_expr) == INTEGER_CST
/* These will reduce to a constant. */
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index fac444c..4af5943 100755
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1333,7 +1333,7 @@ fixup_unsigned_type (type)
= build_int_2 (precision - HOST_BITS_PER_WIDE_INT >= 0
? -1 : ((HOST_WIDE_INT) 1 << precision) - 1,
precision - HOST_BITS_PER_WIDE_INT > 0
- ? ((unsigned HOST_WIDE_INT) ~0
+ ? ((HOST_WIDE_UINT) ~0
>> (HOST_BITS_PER_WIDE_INT
- (precision - HOST_BITS_PER_WIDE_INT)))
: 0);
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 5b7a4dc..a4c9fdc 100755
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1973,7 +1973,7 @@ xstrdup (s)
int
exact_log2_wide (x)
- register unsigned HOST_WIDE_INT x;
+ register HOST_WIDE_UINT x;
{
register int log = 0;
/* Test for 0 or a power of 2. */
@@ -1991,7 +1991,7 @@ exact_log2_wide (x)
int
floor_log2_wide (x)
- register unsigned HOST_WIDE_INT x;
+ register HOST_WIDE_UINT x;
{
register int log = -1;
while (x != 0)
diff --git a/gcc/tree.c b/gcc/tree.c
index c84a165..0a5fb12 100755
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1428,7 +1428,7 @@ real_value_from_int_cst (type, i)
e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
* (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
d *= e;
- e = (double) (unsigned HOST_WIDE_INT) (~ TREE_INT_CST_LOW (i));
+ e = (double) (HOST_WIDE_UINT) (~ TREE_INT_CST_LOW (i));
d += e;
d = (- d - 1.0);
}
@@ -1436,11 +1436,11 @@ real_value_from_int_cst (type, i)
{
REAL_VALUE_TYPE e;
- d = (double) (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (i);
+ d = (double) (HOST_WIDE_UINT) TREE_INT_CST_HIGH (i);
e = ((double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2))
* (double) ((HOST_WIDE_INT) 1 << (HOST_BITS_PER_WIDE_INT / 2)));
d *= e;
- e = (double) (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (i);
+ e = (double) (HOST_WIDE_UINT) TREE_INT_CST_LOW (i);
d += e;
}
#endif /* not REAL_ARITHMETIC */
@@ -4147,7 +4147,7 @@ build_range_type (type, lowval, highval)
if (highval && TREE_CODE (highval) == INTEGER_CST)
highint = TREE_INT_CST_LOW (highval);
else
- highint = (~(unsigned HOST_WIDE_INT)0) >> 1;
+ highint = (~(HOST_WIDE_UINT)0) >> 1;
maxint = (int) (highint - lowint);
return type_hash_canon (maxint < 0 ? ~maxint : maxint, itype);
@@ -4792,8 +4792,8 @@ append_random_chars (template)
{
static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- static unsigned HOST_WIDE_INT value;
- unsigned HOST_WIDE_INT v;
+ static HOST_WIDE_UINT value;
+ HOST_WIDE_UINT v;
#ifdef HAVE_GETTIMEOFDAY
struct timeval tv;
@@ -4804,7 +4804,7 @@ append_random_chars (template)
#ifdef HAVE_GETTIMEOFDAY
/* Get some more or less random data. */
gettimeofday (&tv, NULL);
- value += ((unsigned HOST_WIDE_INT) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
+ value += ((HOST_WIDE_UINT) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
#else
value += getpid ();
#endif
diff --git a/gcc/tree.h b/gcc/tree.h
index aa6a008..9dc6b96 100755
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -562,16 +562,16 @@ struct tree_common
#define INT_CST_LT(A, B) \
(TREE_INT_CST_HIGH (A) < TREE_INT_CST_HIGH (B) \
|| (TREE_INT_CST_HIGH (A) == TREE_INT_CST_HIGH (B) \
- && ((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \
- < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B))))
+ && ((HOST_WIDE_UINT) TREE_INT_CST_LOW (A) \
+ < (HOST_WIDE_UINT) TREE_INT_CST_LOW (B))))
#define INT_CST_LT_UNSIGNED(A, B) \
-(((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
- < (unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (B)) \
- || (((unsigned HOST_WIDE_INT) TREE_INT_CST_HIGH (A) \
- == (unsigned HOST_WIDE_INT ) TREE_INT_CST_HIGH (B)) \
- && (((unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (A) \
- < (unsigned HOST_WIDE_INT) TREE_INT_CST_LOW (B)))))
+(((HOST_WIDE_UINT) TREE_INT_CST_HIGH (A) \
+ < (HOST_WIDE_UINT) TREE_INT_CST_HIGH (B)) \
+ || (((HOST_WIDE_UINT) TREE_INT_CST_HIGH (A) \
+ == (HOST_WIDE_UINT ) TREE_INT_CST_HIGH (B)) \
+ && (((HOST_WIDE_UINT) TREE_INT_CST_LOW (A) \
+ < (HOST_WIDE_UINT) TREE_INT_CST_LOW (B)))))
struct tree_int_cst
{
@@ -1370,11 +1370,11 @@ union tree_node
defined here and in rtl.h. */
#ifndef exact_log2
-#define exact_log2(N) exact_log2_wide ((unsigned HOST_WIDE_INT) (N))
-#define floor_log2(N) floor_log2_wide ((unsigned HOST_WIDE_INT) (N))
+#define exact_log2(N) exact_log2_wide ((HOST_WIDE_UINT) (N))
+#define floor_log2(N) floor_log2_wide ((HOST_WIDE_UINT) (N))
#endif
-extern int exact_log2_wide (unsigned HOST_WIDE_INT);
-extern int floor_log2_wide (unsigned HOST_WIDE_INT);
+extern int exact_log2_wide (HOST_WIDE_UINT);
+extern int floor_log2_wide (HOST_WIDE_UINT);
extern char *oballoc (int);
extern char *permalloc (int);
@@ -1565,13 +1565,13 @@ extern tree size_in_bytes (tree);
extern HOST_WIDE_INT int_size_in_bytes (tree);
extern tree size_binop (enum tree_code, tree, tree);
extern tree ssize_binop (enum tree_code, tree, tree);
-extern tree size_int_wide (unsigned HOST_WIDE_INT,
- unsigned HOST_WIDE_INT, int);
+extern tree size_int_wide (HOST_WIDE_UINT,
+ HOST_WIDE_UINT, int);
#define size_int(L) size_int_2 ((L), 0, 0)
#define bitsize_int(L, H) size_int_2 ((L), (H), 1)
#define size_int_2(L, H, T) \
- size_int_wide ((unsigned HOST_WIDE_INT) (L), \
- (unsigned HOST_WIDE_INT) (H), (T))
+ size_int_wide ((HOST_WIDE_UINT) (L), \
+ (HOST_WIDE_UINT) (H), (T))
extern tree round_up (tree, int);
extern tree get_pending_sizes (void);
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 163e30d..5ffb7d1 100755
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -200,7 +200,7 @@ static void copy_loop_body (rtx, rtx, struct inline_remap *, rtx, int,
enum unroll_types, rtx, rtx, rtx, rtx);
static void iteration_info (rtx, rtx *, rtx *, rtx, rtx);
static int find_splittable_regs (enum unroll_types, rtx, rtx, rtx, int,
- unsigned HOST_WIDE_INT);
+ HOST_WIDE_UINT);
static int find_splittable_givs (struct iv_class *, enum unroll_types,
rtx, rtx, rtx, int);
static int reg_dead_after_loop (rtx, rtx, rtx);
@@ -2387,7 +2387,7 @@ iteration_info (iteration_var, initial_value, increment, loop_start, loop_end)
/* Reject iteration variables larger than the host wide int size, since they
could result in a number of iterations greater than the range of our
- `unsigned HOST_WIDE_INT' variable loop_info->n_iterations. */
+ `HOST_WIDE_UINT' variable loop_info->n_iterations. */
else if ((GET_MODE_BITSIZE (GET_MODE (iteration_var))
> HOST_BITS_PER_WIDE_INT))
{
@@ -2483,7 +2483,7 @@ find_splittable_regs (unroll_type, loop_start, loop_end, end_insert_before,
rtx loop_start, loop_end;
rtx end_insert_before;
int unroll_number;
- unsigned HOST_WIDE_INT n_iterations;
+ HOST_WIDE_UINT n_iterations;
{
struct iv_class *bl;
struct induction *v;
@@ -3224,7 +3224,7 @@ rtx
final_biv_value (bl, loop_start, loop_end, n_iterations)
struct iv_class *bl;
rtx loop_start, loop_end;
- unsigned HOST_WIDE_INT n_iterations;
+ HOST_WIDE_UINT n_iterations;
{
rtx increment, tem;
@@ -3301,7 +3301,7 @@ rtx
final_giv_value (v, loop_start, loop_end, n_iterations)
struct induction *v;
rtx loop_start, loop_end;
- unsigned HOST_WIDE_INT n_iterations;
+ HOST_WIDE_UINT n_iterations;
{
struct iv_class *bl;
rtx insn;
@@ -3534,7 +3534,7 @@ find_common_reg_term (op0, op1)
/* Calculate the number of loop iterations. Returns the exact number of loop
iterations if it can be calculated, otherwise returns zero. */
-unsigned HOST_WIDE_INT
+HOST_WIDE_UINT
loop_iterations (loop_start, loop_end, loop_info)
rtx loop_start, loop_end;
struct loop_info *loop_info;
@@ -3543,7 +3543,7 @@ loop_iterations (loop_start, loop_end, loop_info)
rtx iteration_var, initial_value, increment, final_value;
enum rtx_code comparison_code;
HOST_WIDE_INT abs_inc;
- unsigned HOST_WIDE_INT abs_diff;
+ HOST_WIDE_UINT abs_diff;
int off_by_one;
int increment_dir;
int unsigned_p, compare_dir, final_larger;
@@ -3845,10 +3845,10 @@ loop_iterations (loop_start, loop_end, loop_info)
/* Final_larger is 1 if final larger, 0 if they are equal, otherwise -1. */
if (unsigned_p)
final_larger
- = ((unsigned HOST_WIDE_INT) INTVAL (final_value)
- > (unsigned HOST_WIDE_INT) INTVAL (initial_value))
- - ((unsigned HOST_WIDE_INT) INTVAL (final_value)
- < (unsigned HOST_WIDE_INT) INTVAL (initial_value));
+ = ((HOST_WIDE_UINT) INTVAL (final_value)
+ > (HOST_WIDE_UINT) INTVAL (initial_value))
+ - ((HOST_WIDE_UINT) INTVAL (final_value)
+ < (HOST_WIDE_UINT) INTVAL (initial_value));
else
final_larger = (INTVAL (final_value) > INTVAL (initial_value))
- (INTVAL (final_value) < INTVAL (initial_value));
diff --git a/gcc/varray.h b/gcc/varray.h
index bfbc3a8..54e32a4 100755
--- a/gcc/varray.h
+++ b/gcc/varray.h
@@ -41,7 +41,7 @@ typedef union varray_data_tag {
long l[1];
unsigned long ul[1];
HOST_WIDE_INT hint[1];
- unsigned HOST_WIDE_INT uhint[1];
+ HOST_WIDE_UINT uhint[1];
void * generic[1];
char *cptr[1];
struct rtx_def *rtx[1];
@@ -92,7 +92,7 @@ extern varray_type varray_init (size_t, size_t, const char *);
va = varray_init (num, sizeof (HOST_WIDE_INT), name)
#define VARRAY_UWIDE_INT_INIT(va, num, name) \
- va = varray_init (num, sizeof (unsigned HOST_WIDE_INT), name)
+ va = varray_init (num, sizeof (HOST_WIDE_UINT), name)
#define VARRAY_GENERIC_PTR_INIT(va, num, name) \
va = varray_init (num, sizeof (void *), name)