Message ID | 20160809090446.GB13182@bubble.grove.modra.org |
---|---|
State | New |
Headers | show |
On Tue, Aug 09, 2016 at 06:34:46PM +0930, Alan Modra wrote: > The fallback part of HARD_REGNO_CALLER_SAVE_MODE, choose_hard_reg_mode, > returns DFmode for SImode when TARGET_E500_DOUBLE. This confuses > lra when attempting to save ctr around a call. > > Arseny, the bug reporter, has regression tested this patch. > OK to apply? Okay for trunk, thanks, Segher > PR target/71680 > * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Return > SImode for TARGET_E500_DOUBLE when given SImode. > > diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h > index af77258..353f388 100644 > --- a/gcc/config/rs6000/rs6000.h > +++ b/gcc/config/rs6000/rs6000.h > @@ -1273,6 +1273,8 @@ enum data_align { align_abi, align_opt, align_both }; > && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \ > && FP_REGNO_P (REGNO) \ > ? V2DFmode \ > + : TARGET_E500_DOUBLE && (MODE) == SImode \ > + ? SImode \ > : TARGET_E500_DOUBLE && ((MODE) == VOIDmode || (MODE) == DFmode) \ > ? DFmode \ > : !TARGET_E500_DOUBLE && FLOAT128_IBM_P (MODE) && FP_REGNO_P (REGNO) \
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index af77258..353f388 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1273,6 +1273,8 @@ enum data_align { align_abi, align_opt, align_both }; && ((MODE) == VOIDmode || ALTIVEC_OR_VSX_VECTOR_MODE (MODE)) \ && FP_REGNO_P (REGNO) \ ? V2DFmode \ + : TARGET_E500_DOUBLE && (MODE) == SImode \ + ? SImode \ : TARGET_E500_DOUBLE && ((MODE) == VOIDmode || (MODE) == DFmode) \ ? DFmode \ : !TARGET_E500_DOUBLE && FLOAT128_IBM_P (MODE) && FP_REGNO_P (REGNO) \