diff options
Diffstat (limited to 'gcc/config/sparc/sparc.h')
-rw-r--r-- | gcc/config/sparc/sparc.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 2cbe0d9b7fa..a447940c4e2 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -736,6 +736,12 @@ extern int sparc_mode_class[]; register window instruction in the prologue. */ #define HARD_REGNO_RENAME_OK(FROM, TO) ((FROM) != 1) +/* Select a register mode required for caller save of hard regno REGNO. */ +#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ + (((MODE) == VOIDmode) ? \ + choose_hard_reg_mode ((REGNO), (NREGS), false) : \ + (MODE)) + #define MODES_TIEABLE_P(MODE1, MODE2) sparc_modes_tieable_p (MODE1, MODE2) /* Specify the registers used for certain standard purposes. @@ -1033,12 +1039,10 @@ extern char leaf_reg_remap[]; (SPARC_SETHI_P ((unsigned HOST_WIDE_INT) (X) & GET_MODE_MASK (SImode))) /* On SPARC when not VIS3 it is not possible to directly move data - between GENERAL_REGS and FP_REGS. */ + between GENERAL_REGS and FP_REGS. We also cannot move 4-byte values + between FP_REGS and EXTRA_FP_REGS. */ #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \ - ((FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2)) \ - && (! TARGET_VIS3 \ - || GET_MODE_SIZE (MODE) > 8 \ - || GET_MODE_SIZE (MODE) < 4)) + sparc_secondary_memory_needed (CLASS1, CLASS2, MODE) /* Get_secondary_mem widens its argument to BITS_PER_WORD which loses on v9 because the movsi and movsf patterns don't handle r/f moves. |