Message ID | 56064B8B.5030305@redhat.com |
---|---|
State | New |
Headers | show |
Jeff Law <law@redhat.com> writes: > Another instance of left shifting a negative value. Fixed in an obvious > way. Verified all the mips configurations in config-list.mk build now > using a trunk compiler. > > Installed on the trunk, Thanks Jeff. Matthew
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 98c1bd9..6887b14 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2015-09-26 Jeff Law <law@redhat.com> + * config/mips/mips.c (mips_compute_frame_info): Fix left shift + undefined behaviour. + * config/cris/cris.md (asrandb): Fix left shift undefined behaviour. (asrandw): Likewise. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 0e0ecf2..456db08 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -10572,7 +10572,7 @@ mips_compute_frame_info (void) if (mips_save_reg_p (regno)) { frame->num_fp += MAX_FPRS_PER_FMT; - frame->fmask |= ~(~0 << MAX_FPRS_PER_FMT) << (regno - FP_REG_FIRST); + frame->fmask |= ~(~0U << MAX_FPRS_PER_FMT) << (regno - FP_REG_FIRST); } /* Move above the FPR save area. */