diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-30 16:20:04 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-30 16:20:04 +0000 |
commit | 737d6a1a1745bdd4041e73800a842a1086967d5d (patch) | |
tree | 1347aa114cf2ffddae7f64d2e90f4d8389e1aba9 /gcc/config | |
parent | 6ee2cc70024253d2670a4a317158b2a65251a1d1 (diff) | |
download | gcc-737d6a1a1745bdd4041e73800a842a1086967d5d.zip gcc-737d6a1a1745bdd4041e73800a842a1086967d5d.tar.gz gcc-737d6a1a1745bdd4041e73800a842a1086967d5d.tar.bz2 |
Pass an ABI to choose_hard_reg_mode
choose_hard_reg_mode previously took a boolean saying whether the
mode needed to be call-preserved. This patch replaces it with an
optional ABI pointer instead, so that the function can use that
to test whether a value is call-saved.
default_dwarf_frame_reg_mode uses eh_edge_abi because that's the
ABI that matters for unwinding. Targets need to override the hook
if they want something different.
2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* rtl.h (predefined_function_abi): Declare.
(choose_hard_reg_mode): Take a pointer to a predefined_function_abi
instead of a boolean call_save flag.
* config/gcn/gcn.c (gcn_hard_regno_caller_save_mode): Update call
accordingly.
* config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise.
* config/ia64/ia64.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise.
* config/mips/mips.c (mips_hard_regno_caller_save_mode): Likewise.
* config/msp430/msp430.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise.
* config/rs6000/rs6000.h (HARD_REGNO_CALLER_SAVE_MODE): Likewise.
* config/sh/sh.c (sh_hard_regno_caller_save_mode): Likewise.
* reginfo.c (init_reg_modes_target): Likewise.
(choose_hard_reg_mode): Take a pointer to a predefined_function_abi
instead of a boolean call_save flag.
* targhooks.c: Include function-abi.h.
(default_dwarf_frame_reg_mode): Update call to choose_hard_reg_mode,
using eh_edge_abi to choose the mode.
From-SVN: r276312
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/gcn/gcn.c | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 2 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.h | 2 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 2 | ||||
-rw-r--r-- | gcc/config/msp430/msp430.h | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 2 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index 50ae8e1..b5f09da 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -3017,7 +3017,7 @@ machine_mode gcn_hard_regno_caller_save_mode (unsigned int regno, unsigned int nregs, machine_mode regmode) { - machine_mode result = choose_hard_reg_mode (regno, nregs, false); + machine_mode result = choose_hard_reg_mode (regno, nregs, NULL); if (VECTOR_MODE_P (result) && !VECTOR_MODE_P (regmode)) result = (nregs == 1 ? SImode : DImode); diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 885846e..9fe1f45 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1258,7 +1258,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ (CC_REGNO_P (REGNO) ? VOIDmode \ : (MODE) == VOIDmode && (NREGS) != 1 ? VOIDmode \ - : (MODE) == VOIDmode ? choose_hard_reg_mode ((REGNO), (NREGS), false) \ + : (MODE) == VOIDmode ? choose_hard_reg_mode ((REGNO), (NREGS), NULL) \ : (MODE) == HImode && !((GENERAL_REGNO_P (REGNO) \ && TARGET_PARTIAL_REG_STALL) \ || MASK_REGNO_P (REGNO)) ? SImode \ diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index d9d78fd..fc985b4 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -562,7 +562,7 @@ while (0) #define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ ((FR_REGNO_P (REGNO) && (NREGS) == 1) ? RFmode \ - : choose_hard_reg_mode ((REGNO), (NREGS), false)) + : choose_hard_reg_mode ((REGNO), (NREGS), NULL)) /* Handling Leaf Functions */ diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 91dd94b..648d95f 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -22174,7 +22174,7 @@ mips_hard_regno_caller_save_mode (unsigned int regno, /* For performance, avoid saving/restoring upper parts of a register by returning MODE as save mode when the mode is known. */ if (mode == VOIDmode) - return choose_hard_reg_mode (regno, nregs, false); + return choose_hard_reg_mode (regno, nregs, NULL); else return mode; } diff --git a/gcc/config/msp430/msp430.h b/gcc/config/msp430/msp430.h index 36b715d..3449bd4 100644 --- a/gcc/config/msp430/msp430.h +++ b/gcc/config/msp430/msp430.h @@ -467,7 +467,7 @@ typedef struct when spilling hard registers when they may contain PSImode values. */ #define HARD_REGNO_CALLER_SAVE_MODE(REGNO,NREGS,MODE) \ ((TARGET_LARGE && ((NREGS) <= 2)) ? PSImode \ - : choose_hard_reg_mode ((REGNO), (NREGS), false)) + : choose_hard_reg_mode ((REGNO), (NREGS), NULL)) #define ACCUMULATE_OUTGOING_ARGS 1 diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 0156448..27373c5 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1038,7 +1038,7 @@ enum data_align { align_abi, align_opt, align_both }; ? DFmode \ : (MODE) == TDmode && FP_REGNO_P (REGNO) \ ? DImode \ - : choose_hard_reg_mode ((REGNO), (NREGS), false)) + : choose_hard_reg_mode ((REGNO), (NREGS), NULL)) #define VSX_VECTOR_MODE(MODE) \ ((MODE) == V4SFmode \ diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 34c4c8f..9917f2b 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -10637,7 +10637,7 @@ sh_hard_regno_caller_save_mode (unsigned int regno, unsigned int nregs, && ((regno - FIRST_FP_REG) & 1) == 0))) return mode; - return choose_hard_reg_mode (regno, nregs, false); + return choose_hard_reg_mode (regno, nregs, NULL); } /* Implement TARGET_CAN_CHANGE_MODE_CLASS. */ |