From c4e9cff61cfdad1a86927019df6bf27abef2709f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 10 Aug 2016 15:13:36 +0930 Subject: [PATCH] [RS6000] e500 part of pr71680 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 | 6 ++++++ gcc/config/rs6000/rs6000.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dba02c53cae..7b8cbc7ad2f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-08-10 Alan Modra + + 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 * config/i3836/avx512fintrin.h (_mm512_cvtsepi64_epi32): Remove diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index af77258f1e3..353f388d770 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) \ -- 2.30.2