On Mon, Sep 1, 2014 at 10:22 AM, Maciej W. Rozycki <ma...@codesourcery.com> wrote: > Hi, > > This fixes an issue with the mode used for register save slots on the > stack where e500 processor support is enabled along non-e500 multilibs. > In that case the HARD_REGNO_CALLER_SAVE_MODE macro definition from > gcc/config/rs6000/e500.h overrides one in gcc/config/rs6000/rs6000.h even > for non-e500 multilibs. I think the ABI for a given multilib must not > change with other multilibs being enabled or disabled. > > I have therefore rewritten the generic macro to take both e500 and > non-e500 cases into account, following the preexisting case of > TARGET_DF_SPE -- there's no run-time performance hit for purely non-e500 > targets as TARGET_E500_DOUBLE then expands to 0 and the extra e500 support > code is optimised away. The change doesn't make the TARGET_VSX case check > for TARGET_E500_DOUBLE being clear, as the two are mutually exclusive and > guarded by CHECK_E500_OPTIONS already. > > This fixes: > > FAIL: gcc.target/powerpc/pr47862.c scan-assembler-not stfd > > failures on non-e500 multilibs. > > Regression-tested with the following powerpc-gnu-linux multilibs: > > -mcpu=603e > -mcpu=603e -msoft-float > -mcpu=8540 -mfloat-gprs=single -mspe=yes -mabi=spe > -mcpu=8548 -mfloat-gprs=double -mspe=yes -mabi=spe > -mcpu=7400 -maltivec -mabi=altivec > -mcpu=e6500 -maltivec -mabi=altivec > -mcpu=e5500 -m64 > -mcpu=e6500 -m64 -maltivec -mabi=altivec > > OK to apply? > > 2014-09-01 Maciej W. Rozycki <ma...@codesourcery.com> > > gcc/ > * config/rs6000/e500.h (HARD_REGNO_CALLER_SAVE_MODE): Remove > macro. > * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Handle > TARGET_E500_DOUBLE case here.
This patch is okay. The repeated testing of E500 seems like it could have been refactored. The macro is becoming a little overly complicated as a CASE statement. Are you avoiding the special cases for TFmode and TDmode on e500 for a specific reason or simply matching current behavior? Thanks, David