diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/400.perlbench/src/regcomp.c cpu2006-1.2/benchspec/CPU2006/400.perlbench/src/regcomp.c *** cpu2006-1.2-orig/benchspec/CPU2006/400.perlbench/src/regcomp.c 2005-06-06 21:30:24.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/400.perlbench/src/regcomp.c 2016-03-29 07:53:42.232895112 -0600 *************** *** 861,867 **** next, &data_fake, f); if (min1 > minnext) min1 = minnext; ! if (max1 < minnext + deltanext) max1 = minnext + deltanext; if (deltanext == I32_MAX) is_inf = is_inf_internal = 1; --- 861,867 ---- next, &data_fake, f); if (min1 > minnext) min1 = minnext; ! if (max1 < (int)((unsigned long)minnext + deltanext)) max1 = minnext + deltanext; if (deltanext == I32_MAX) is_inf = is_inf_internal = 1; *************** *** 881,892 **** min1 = 0; if (flags & SCF_DO_SUBSTR) { data->pos_min += min1; ! data->pos_delta += max1 - min1; if (max1 != min1 || is_inf) data->longest = &(data->longest_float); } min += min1; ! delta += max1 - min1; if (flags & SCF_DO_STCLASS_OR) { cl_or(pRExC_state, data->start_class, &accum); if (min1) { --- 881,892 ---- min1 = 0; if (flags & SCF_DO_SUBSTR) { data->pos_min += min1; ! data->pos_delta += (unsigned long)(max1 - min1); if (max1 != min1 || is_inf) data->longest = &(data->longest_float); } min += min1; ! delta += (unsigned long)(max1 - min1); if (flags & SCF_DO_STCLASS_OR) { cl_or(pRExC_state, data->start_class, &accum); if (min1) { *************** *** 1152,1161 **** min += minnext * mincount; is_inf_internal |= ((maxcount == REG_INFTY ! && (minnext + deltanext) > 0) || deltanext == I32_MAX); is_inf |= is_inf_internal; ! delta += (minnext + deltanext) * maxcount - minnext * mincount; /* Try powerful optimization CURLYX => CURLYN. */ if ( OP(oscan) == CURLYX && data --- 1152,1161 ---- min += minnext * mincount; is_inf_internal |= ((maxcount == REG_INFTY ! && ((long)((unsigned long)minnext + deltanext)) > 0) || deltanext == I32_MAX); is_inf |= is_inf_internal; ! delta += (unsigned long)((minnext + (unsigned long)deltanext) * (unsigned long)maxcount - (unsigned long)minnext * (unsigned long)mincount); /* Try powerful optimization CURLYX => CURLYN. */ if ( OP(oscan) == CURLYX && data *************** *** 1329,1342 **** } else { /* start offset must point into the last copy */ data->last_start_min += minnext * (mincount - 1); ! data->last_start_max += is_inf ? I32_MAX ! : (maxcount - 1) * (minnext + data->pos_delta); } } /* It is counted once already... */ ! data->pos_min += minnext * (mincount - counted); ! data->pos_delta += - counted * deltanext + ! (minnext + deltanext) * maxcount - minnext * mincount; if (mincount != maxcount) { /* Cannot extend fixed substrings found inside the group. */ --- 1329,1342 ---- } else { /* start offset must point into the last copy */ data->last_start_min += minnext * (mincount - 1); ! data->last_start_max += (unsigned long)(is_inf ? I32_MAX ! : (maxcount - 1) * (minnext + data->pos_delta)); } } /* It is counted once already... */ ! data->pos_min += (unsigned long)(minnext * (mincount - counted)); ! data->pos_delta += (unsigned long)(- counted * (unsigned long)deltanext + ! (minnext + (unsigned long)deltanext) * (unsigned long)maxcount - minnext * (unsigned long)mincount); if (mincount != maxcount) { /* Cannot extend fixed substrings found inside the group. */ diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/combine.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/combine.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/combine.c 2005-10-17 23:39:38.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/combine.c 2016-03-29 07:37:36.440105706 -0600 *************** *** 6301,6307 **** /* If we can safely shift this constant and we find the inner shift, make a new operation. */ if (GET_CODE (XEXP (x,1)) == CONST_INT ! && (INTVAL (XEXP (x, 1)) & ((((HOST_WIDE_INT) 1 << count)) - 1)) == 0 && (tem = extract_left_shift (XEXP (x, 0), count)) != 0) return gen_binary (code, mode, tem, GEN_INT (INTVAL (XEXP (x, 1)) >> count)); --- 6301,6307 ---- /* If we can safely shift this constant and we find the inner shift, make a new operation. */ if (GET_CODE (XEXP (x,1)) == CONST_INT ! && (INTVAL (XEXP (x, 1)) & ((((unsigned HOST_WIDE_INT) 1 << count)) - 1)) == 0 && (tem = extract_left_shift (XEXP (x, 0), count)) != 0) return gen_binary (code, mode, tem, GEN_INT (INTVAL (XEXP (x, 1)) >> count)); *************** *** 8355,8361 **** need to mark all the places it could have been copied to by the shift as possibly nonzero. */ if (inner & ((HOST_WIDE_INT) 1 << (width - 1 - count))) ! inner |= (((HOST_WIDE_INT) 1 << count) - 1) << (width - count); } else if (code == ASHIFT) inner <<= count; --- 8355,8361 ---- need to mark all the places it could have been copied to by the shift as possibly nonzero. */ if (inner & ((HOST_WIDE_INT) 1 << (width - 1 - count))) ! inner |= (((unsigned HOST_WIDE_INT) 1 << count) - 1) << (width - count); } else if (code == ASHIFT) inner <<= count; *************** *** 10238,10244 **** /* (unsigned) <= 0x7fffffff is equivalent to >= 0. */ else if ((mode_width <= HOST_BITS_PER_WIDE_INT) ! && (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)) { const_op = 0, op1 = const0_rtx; code = GE; --- 10238,10244 ---- /* (unsigned) <= 0x7fffffff is equivalent to >= 0. */ else if ((mode_width <= HOST_BITS_PER_WIDE_INT) ! && (const_op == ((unsigned long) 1 << (mode_width - 1)) - 1)) { const_op = 0, op1 = const0_rtx; code = GE; *************** *** 10273,10279 **** /* (unsigned) > 0x7fffffff is equivalent to < 0. */ else if ((mode_width <= HOST_BITS_PER_WIDE_INT) ! && (const_op == ((HOST_WIDE_INT) 1 << (mode_width - 1)) - 1)) { const_op = 0, op1 = const0_rtx; code = LT; --- 10273,10279 ---- /* (unsigned) > 0x7fffffff is equivalent to < 0. */ else if ((mode_width <= HOST_BITS_PER_WIDE_INT) ! && (const_op == ((unsigned long) 1 << (mode_width - 1)) - 1)) { const_op = 0, op1 = const0_rtx; code = LT; *************** *** 10901,10907 **** && INTVAL (XEXP (op0, 1)) < HOST_BITS_PER_WIDE_INT && mode_width <= HOST_BITS_PER_WIDE_INT && (nonzero_bits (XEXP (op0, 0), mode) ! & (((HOST_WIDE_INT) 1 << INTVAL (XEXP (op0, 1))) - 1)) == 0 && (((unsigned HOST_WIDE_INT) const_op + (GET_CODE (op0) != LSHIFTRT ? ((GET_MODE_MASK (mode) >> INTVAL (XEXP (op0, 1)) >> 1) --- 10901,10907 ---- && INTVAL (XEXP (op0, 1)) < HOST_BITS_PER_WIDE_INT && mode_width <= HOST_BITS_PER_WIDE_INT && (nonzero_bits (XEXP (op0, 0), mode) ! & (((unsigned long) 1 << INTVAL (XEXP (op0, 1))) - 1)) == 0 && (((unsigned HOST_WIDE_INT) const_op + (GET_CODE (op0) != LSHIFTRT ? ((GET_MODE_MASK (mode) >> INTVAL (XEXP (op0, 1)) >> 1) diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/conflict.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/conflict.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/conflict.c 2005-06-02 20:43:52.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/conflict.c 2016-03-29 07:39:04.636544800 -0600 *************** *** 114,120 **** /* Computes the hash value of the conflict graph arc connecting regs R1 and R2. R1 is assumed to be smaller or equal to R2. */ ! #define CONFLICT_HASH_FN(R1, R2) ((R2) * ((R2) - 1) / 2 + (R1)) static unsigned arc_hash PARAMS ((const void *)); static int arc_eq PARAMS ((const void *, const void *)); --- 114,120 ---- /* Computes the hash value of the conflict graph arc connecting regs R1 and R2. R1 is assumed to be smaller or equal to R2. */ ! #define CONFLICT_HASH_FN(R1, R2) (((unsigned long)R2) * (((unsigned long)R2) - 1) / 2 + (R1)) static unsigned arc_hash PARAMS ((const void *)); static int arc_eq PARAMS ((const void *, const void *)); diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/final.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/final.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/final.c 2005-06-02 20:43:52.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/final.c 2016-03-29 07:39:55.020794881 -0600 *************** *** 721,727 **** int align_addr, new_align; uid = INSN_UID (align_label); ! align_addr = INSN_ADDRESSES (uid) - insn_lengths[uid]; if (uid_shuid[uid] > end_shuid) break; known_align_log = LABEL_TO_ALIGNMENT (align_label); --- 721,727 ---- int align_addr, new_align; uid = INSN_UID (align_label); ! align_addr = (unsigned long)(INSN_ADDRESSES (uid)) - insn_lengths[uid]; if (uid_shuid[uid] > end_shuid) break; known_align_log = LABEL_TO_ALIGNMENT (align_label); diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/local-alloc.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/local-alloc.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/local-alloc.c 2005-06-02 20:43:52.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/local-alloc.c 2016-03-29 07:43:05.265736641 -0600 *************** *** 1012,1018 **** { /* Note that the statement below does not affect the priority in local-alloc! */ ! REG_LIVE_LENGTH (regno) *= 2; /* If the register is referenced exactly twice, meaning it is --- 1012,1018 ---- { /* Note that the statement below does not affect the priority in local-alloc! */ ! REG_LIVE_LENGTH (regno) *= 2U; /* If the register is referenced exactly twice, meaning it is diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/real.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/real.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/real.c 2005-06-02 20:43:52.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/real.c 2016-03-30 02:18:03.937465025 -0600 *************** *** 875,881 **** /* complement and add 1 */ high = ~high; if (low) ! low = -low; else high += 1; } --- 875,881 ---- /* complement and add 1 */ high = ~high; if (low) ! low = -((unsigned long)low); else high += 1; } diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/regclass.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/regclass.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/regclass.c 2005-06-02 20:43:52.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/regclass.c 2016-03-29 07:45:19.958402272 -0600 *************** *** 1167,1173 **** p->mem_cost += q->mem_cost * frequency; for (j = 0; j < N_REG_CLASSES; j++) ! p->cost[j] += q->cost[j] * frequency; } return insn; --- 1167,1173 ---- p->mem_cost += q->mem_cost * frequency; for (j = 0; j < N_REG_CLASSES; j++) ! p->cost[j] += (unsigned long)(q->cost[j] * frequency); } return insn; *************** *** 2127,2133 **** pp->mem_cost += (MEMORY_MOVE_COST (Pmode, class, 1) * scale) / 2; for (i = 0; i < N_REG_CLASSES; i++) ! pp->cost[i] += (may_move_in_cost[Pmode][i][(int) class] * scale) / 2; } break; --- 2127,2133 ---- pp->mem_cost += (MEMORY_MOVE_COST (Pmode, class, 1) * scale) / 2; for (i = 0; i < N_REG_CLASSES; i++) ! pp->cost[i] += (unsigned long)((may_move_in_cost[Pmode][i][(int) class] * scale) / 2); } break; diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/stor-layout.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/stor-layout.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/stor-layout.c 2005-06-02 20:43:52.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/stor-layout.c 2016-03-29 07:55:49.861528831 -0600 *************** *** 1892,1900 **** : 0)))); TYPE_MAX_VALUE (type) = build_int_2 ((precision - HOST_BITS_PER_WIDE_INT > 0 ! ? -1 : ((HOST_WIDE_INT) 1 << (precision - 1)) - 1), (precision - HOST_BITS_PER_WIDE_INT - 1 > 0 ! ? (((HOST_WIDE_INT) 1 << (precision - HOST_BITS_PER_WIDE_INT - 1))) - 1 : 0)); --- 1892,1900 ---- : 0)))); TYPE_MAX_VALUE (type) = build_int_2 ((precision - HOST_BITS_PER_WIDE_INT > 0 ! ? -1 : ((unsigned HOST_WIDE_INT) 1 << (precision - 1)) - 1), (precision - HOST_BITS_PER_WIDE_INT - 1 > 0 ! ? (((unsigned HOST_WIDE_INT) 1 << (precision - HOST_BITS_PER_WIDE_INT - 1))) - 1 : 0)); diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/varasm.c cpu2006-1.2/benchspec/CPU2006/403.gcc/src/varasm.c *** cpu2006-1.2-orig/benchspec/CPU2006/403.gcc/src/varasm.c 2005-10-18 00:10:32.000000000 -0600 --- cpu2006-1.2/benchspec/CPU2006/403.gcc/src/varasm.c 2016-03-29 08:09:35.049620208 -0600 *************** *** 2603,2609 **** /* Compute hashing function */ hi = len; for (i = 0; i < len; i++) ! hi = ((hi * 613) + (unsigned) (p[i])); hi &= (1 << HASHBITS) - 1; hi %= MAX_HASH_TABLE; --- 2603,2609 ---- /* Compute hashing function */ hi = len; for (i = 0; i < len; i++) ! hi = ((hi * 613U) + (unsigned) (p[i])); hi &= (1 << HASHBITS) - 1; hi %= MAX_HASH_TABLE; *************** *** 3702,3708 **** /* Compute hashing function */ hi = 0; for (i = 0; i < sizeof value / sizeof (int); i++) ! hi += ((int *) &value)[i]; hi &= (1 << HASHBITS) - 1; hi %= MAX_RTX_HASH_TABLE; --- 3702,3708 ---- /* Compute hashing function */ hi = 0; for (i = 0; i < sizeof value / sizeof (int); i++) ! hi += (unsigned long)(((int *) &value)[i]); hi &= (1 << HASHBITS) - 1; hi %= MAX_RTX_HASH_TABLE; diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/464.h264ref/build/build_base_jdr.0000/rdopt.c cpu2006-1.2/benchspec/CPU2006/464.h264ref/build/build_base_jdr.0000/rdopt.c *** cpu2006-1.2-orig/benchspec/CPU2006/464.h264ref/build/build_base_jdr.0000/rdopt.c 2005-11-11 10:55:24.000000000 -0700 --- cpu2006-1.2/benchspec/CPU2006/464.h264ref/build/build_base_jdr.0000/rdopt.c 2016-03-29 07:44:02.000000000 -0600 *************** *** 922,928 **** { nonzero = 1; } ! *cost += cost4x4; } return nonzero; --- 922,928 ---- { nonzero = 1; } ! *cost += (unsigned long)cost4x4; } return nonzero; diff -rcbw cpu2006-1.2-orig/benchspec/CPU2006/464.h264ref/src/rdopt.c cpu2006-1.2/benchspec/CPU2006/464.h264ref/src/rdopt.c *** cpu2006-1.2-orig/benchspec/CPU2006/464.h264ref/src/rdopt.c 2005-11-11 10:55:24.000000000 -0700 --- cpu2006-1.2/benchspec/CPU2006/464.h264ref/src/rdopt.c 2016-03-29 07:44:02.674015180 -0600 *************** *** 922,928 **** { nonzero = 1; } ! *cost += cost4x4; } return nonzero; --- 922,928 ---- { nonzero = 1; } ! *cost += (unsigned long)cost4x4; } return nonzero;