[RS6000] e500 part of pr71680
authorAlan Modra <amodra@gmail.com>
Wed, 10 Aug 2016 05:43:36 +0000 (15:13 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Wed, 10 Aug 2016 05:43:36 +0000 (15:13 +0930)
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.

PR target/71680
* config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Return
SImode for TARGET_E500_DOUBLE when given SImode.

From-SVN: r239317

gcc/ChangeLog
gcc/config/rs6000/rs6000.h

index dba02c53cae38258c3e2bd4cceeddc23e478963c..7b8cbc7ad2fde9102adfb6f6d49c391ab327ecd8 100644 (file)
@@ -1,3 +1,9 @@
+2016-08-10  Alan Modra  <amodra@gmail.com>
+
+       PR target/71680
+       * config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Return
+       SImode for TARGET_E500_DOUBLE when given SImode.
+
 2016-08-09  David Wohlferd  <dw@LimeGreenSocks.com>
 
        * config/i3836/avx512fintrin.h (_mm512_cvtsepi64_epi32): Remove
index af77258f1e36c61dbaff2e53efd617c1ba873003..353f388d770abbaf08a5cf1ccbca1252a382202c 100644 (file)
@@ -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)        \