diff options
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index a787a29f9f8..9c6beb1839a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1962,6 +1962,9 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_OPTION_FUNCTION_VERSIONS #define TARGET_OPTION_FUNCTION_VERSIONS common_function_versions +#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED +#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \ + rs6000_hard_regno_call_part_clobbered /* Processor table. */ @@ -2124,6 +2127,26 @@ rs6000_hard_regno_mode_ok (int regno, machine_mode mode) return GET_MODE_SIZE (mode) <= UNITS_PER_WORD; } +/* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. */ + +static bool +rs6000_hard_regno_call_part_clobbered (unsigned int regno, machine_mode mode) +{ + if (TARGET_32BIT + && TARGET_POWERPC64 + && GET_MODE_SIZE (mode) > 4 + && INT_REGNO_P (regno)) + return true; + + if (TARGET_VSX + && FP_REGNO_P (regno) + && GET_MODE_SIZE (mode) > 8 + && !FLOAT128_2REG_P (mode)) + return true; + + return false; +} + /* Print interesting facts about registers. */ static void rs6000_debug_reg_print (int first_regno, int last_regno, const char *reg_name) |