summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-09-04 10:49:21 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-09-04 10:49:21 +0000
commit80ec73f4ee2bcf4b2338eefe3521940ab0fd6dc4 (patch)
tree0d5d88cd2bf9a5c1f0f18848ddc0092b0884a2d7 /gcc/config
parent3d09ba95c150d9676f9a2585fb61315e86fa644a (diff)
downloadgcc-80ec73f4ee2bcf4b2338eefe3521940ab0fd6dc4.tar.gz
Turn HARD_REGNO_CALL_PART_CLOBBERED into a target hook
The SVE patches change the size of a machine_mode from a compile-time constant to a runtime invariant. However, target-specific code can continue to treat the modes as constant-sized if the target only has constant-sized modes. The main snag with this approach is that target-independent code still uses macros from the target .h file. This patch is one of several that converts a target macro to a hook. 2017-09-04 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * target.def (hard_regno_call_part_clobbered): New hook. * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with... (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook. * doc/tm.texi: Regenerate. * hooks.h (hook_bool_uint_mode_false): Declare. * hooks.c (hook_bool_uint_mode_false): New function. * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * cselib.c (cselib_process_insn): Use targetm.hard_regno_call_part_clobbered instead of HARD_REGNO_CALL_PART_CLOBBERED. * ira-conflicts.c (ira_build_conflicts): Likewise. * ira-costs.c (ira_tune_allocno_costs): Likewise. * lra-constraints.c (need_for_call_save_p): Likewise. * lra-lives.c: Include target.h. (check_pseudos_live_through_calls): Use targetm.hard_regno_call_part_clobbered instead of HARD_REGNO_CALL_PART_CLOBBERED. * regcprop.c: Include target.h. (copyprop_hardreg_forward_1): Use targetm.hard_regno_call_part_clobbered instead of HARD_REGNO_CALL_PART_CLOBBERED. * reginfo.c (choose_hard_reg_mode): Likewise. * regrename.c (check_new_reg_p): Likewise. * reload.c (find_equiv_reg): Likewise. * reload1.c (emit_reload_insns): Likewise. * sched-deps.c (deps_analyze_insn): Likewise. * sel-sched.c (init_regs_for_mode): Likewise. (mark_unavailable_hard_regs): Likewise. * targhooks.c (default_dwarf_frame_reg_mode): Likewise. * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered): New function. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered): Delete. * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static and return a bool. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New function. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New function. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_call_part_clobbered): New function. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered): New function. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New function. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine. * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete. * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r251645
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64.c14
-rw-r--r--gcc/config/aarch64/aarch64.h6
-rw-r--r--gcc/config/avr/avr-protos.h1
-rw-r--r--gcc/config/avr/avr.c8
-rw-r--r--gcc/config/avr/avr.h3
-rw-r--r--gcc/config/i386/i386.c15
-rw-r--r--gcc/config/i386/i386.h6
-rw-r--r--gcc/config/mips/mips.c24
-rw-r--r--gcc/config/mips/mips.h8
-rw-r--r--gcc/config/powerpcspe/powerpcspe.c24
-rw-r--r--gcc/config/powerpcspe/powerpcspe.h7
-rw-r--r--gcc/config/rs6000/rs6000.c23
-rw-r--r--gcc/config/rs6000/rs6000.h7
-rw-r--r--gcc/config/s390/s390.c27
-rw-r--r--gcc/config/s390/s390.h13
-rw-r--r--gcc/config/sh/sh.h2
16 files changed, 133 insertions, 55 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index fe5b59c3a70..ba48b28d1d5 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -1115,6 +1115,16 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode)
return 0;
}
+/* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. The callee only saves
+ the lower 64 bits of a 128-bit register. Tell the compiler the callee
+ clobbers the top 64 bits when restoring the bottom 64 bits. */
+
+static bool
+aarch64_hard_regno_call_part_clobbered (unsigned int regno, machine_mode mode)
+{
+ return FP_REGNUM_P (regno) && GET_MODE_SIZE (mode) > 8;
+}
+
/* Implement HARD_REGNO_CALLER_SAVE_MODE. */
machine_mode
aarch64_hard_regno_caller_save_mode (unsigned regno, unsigned nregs,
@@ -15659,6 +15669,10 @@ aarch64_libgcc_floating_mode_supported_p
#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 4
+#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED
+#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \
+ aarch64_hard_regno_call_part_clobbered
+
#if CHECKING_P
#undef TARGET_RUN_TARGET_SELFTESTS
#define TARGET_RUN_TARGET_SELFTESTS selftest::aarch64_run_selftests
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index a6e0479cd09..fd5d53d51b2 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -888,12 +888,6 @@ typedef struct
#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
aarch64_hard_regno_caller_save_mode ((REGNO), (NREGS), (MODE))
-/* Callee only saves lower 64-bits of a 128-bit register. Tell the
- compiler the callee clobbers the top 64-bits when restoring the
- bottom 64-bits. */
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- (FP_REGNUM_P (REGNO) && GET_MODE_SIZE (MODE) > 8)
-
#undef SWITCHABLE_TARGET
#define SWITCHABLE_TARGET 1
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h
index 5d5524b2e65..f9116e6bf30 100644
--- a/gcc/config/avr/avr-protos.h
+++ b/gcc/config/avr/avr-protos.h
@@ -46,7 +46,6 @@ extern void avr_init_cumulative_args (CUMULATIVE_ARGS*, tree, rtx, tree);
#endif /* TREE_CODE */
#ifdef RTX_CODE
-extern int avr_hard_regno_call_part_clobbered (unsigned, machine_mode);
extern const char *output_movqi (rtx_insn *insn, rtx operands[], int *l);
extern const char *output_movhi (rtx_insn *insn, rtx operands[], int *l);
extern const char *output_movsisf (rtx_insn *insn, rtx operands[], int *l);
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 09bf5eedbde..df4cbf343b4 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -12186,9 +12186,9 @@ avr_hard_regno_mode_ok (int regno, machine_mode mode)
}
-/* Implement `HARD_REGNO_CALL_PART_CLOBBERED'. */
+/* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. */
-int
+static bool
avr_hard_regno_call_part_clobbered (unsigned regno, machine_mode mode)
{
/* FIXME: This hook gets called with MODE:REGNO combinations that don't
@@ -14693,6 +14693,10 @@ avr_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tree *arg,
#undef TARGET_HARD_REGNO_SCRATCH_OK
#define TARGET_HARD_REGNO_SCRATCH_OK avr_hard_regno_scratch_ok
+#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED
+#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \
+ avr_hard_regno_call_part_clobbered
+
#undef TARGET_CASE_VALUES_THRESHOLD
#define TARGET_CASE_VALUES_THRESHOLD avr_case_values_threshold
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 579c8faa0b5..212ca695ad5 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -285,9 +285,6 @@ enum reg_class {
#define REGNO_OK_FOR_INDEX_P(NUM) 0
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- avr_hard_regno_call_part_clobbered (REGNO, MODE)
-
#define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
#define STACK_PUSH_CODE POST_DEC
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 68cb32bc9cf..6c1057fba59 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -41407,6 +41407,17 @@ ix86_hard_regno_mode_ok (int regno, machine_mode mode)
return false;
}
+/* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. The only ABI that
+ saves SSE registers across calls is Win64 (thus no need to check the
+ current ABI here), and with AVX enabled Win64 only guarantees that
+ the low 16 bytes are saved. */
+
+static bool
+ix86_hard_regno_call_part_clobbered (unsigned int regno, machine_mode mode)
+{
+ return SSE_REGNO_P (regno) && GET_MODE_SIZE (mode) > 16;
+}
+
/* A subroutine of ix86_modes_tieable_p. Return true if MODE is a
tieable integer mode. */
@@ -53250,6 +53261,10 @@ ix86_run_selftests (void)
#undef TARGET_NOCE_CONVERSION_PROFITABLE_P
#define TARGET_NOCE_CONVERSION_PROFITABLE_P ix86_noce_conversion_profitable_p
+#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED
+#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \
+ ix86_hard_regno_call_part_clobbered
+
#if CHECKING_P
#undef TARGET_RUN_TARGET_SELFTESTS
#define TARGET_RUN_TARGET_SELFTESTS selftest::ix86_run_selftests
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index dad6499ca1d..05dabf273e2 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1214,12 +1214,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
|| MASK_REGNO_P (REGNO)) ? SImode \
: (MODE))
-/* The only ABI that saves SSE registers across calls is Win64 (thus no
- need to check the current ABI here), and with AVX enabled Win64 only
- guarantees that the low 16 bytes are saved. */
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- (SSE_REGNO_P (REGNO) && GET_MODE_SIZE (MODE) > 16)
-
/* Specify the registers used for certain standard purposes.
The values of these macros are register numbers. */
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index c80686e31bf..0ee6a31a8ca 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -12857,6 +12857,26 @@ mips_hard_regno_scratch_ok (unsigned int regno)
return true;
}
+/* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. Odd-numbered
+ single-precision registers are not considered callee-saved for o32
+ FPXX as they will be clobbered when run on an FR=1 FPU. MSA vector
+ registers with MODE > 64 bits are part clobbered too. */
+
+static bool
+mips_hard_regno_call_part_clobbered (unsigned int regno, machine_mode mode)
+{
+ if (TARGET_FLOATXX
+ && hard_regno_nregs[regno][mode] == 1
+ && FP_REG_P (regno)
+ && (regno & 1) != 0)
+ return true;
+
+ if (ISA_HAS_MSA && FP_REG_P (regno) && GET_MODE_SIZE (mode) > 8)
+ return true;
+
+ return false;
+}
+
/* Implement HARD_REGNO_NREGS. */
unsigned int
@@ -22558,6 +22578,10 @@ mips_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
#undef TARGET_HARD_REGNO_SCRATCH_OK
#define TARGET_HARD_REGNO_SCRATCH_OK mips_hard_regno_scratch_ok
+#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED
+#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \
+ mips_hard_regno_call_part_clobbered
+
/* The architecture reserves bit 0 for MIPS16 so use bit 1 for descriptors. */
#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 3016ce0bb8e..4358b92f637 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -1971,14 +1971,6 @@ FP_ASM_SPEC "\
#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
mips_hard_regno_caller_save_mode (REGNO, NREGS, MODE)
-/* Odd-numbered single-precision registers are not considered callee-saved
- for o32 FPXX as they will be clobbered when run on an FR=1 FPU.
- MSA vector registers with MODE > 64 bits are part clobbered too. */
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- ((TARGET_FLOATXX && hard_regno_nregs[REGNO][MODE] == 1 \
- && FP_REG_P (REGNO) && ((REGNO) & 1)) \
- || (ISA_HAS_MSA && FP_REG_P (REGNO) && GET_MODE_SIZE (MODE) > 8))
-
#define MODES_TIEABLE_P mips_modes_tieable_p
/* Register to use for pushing function arguments. */
diff --git a/gcc/config/powerpcspe/powerpcspe.c b/gcc/config/powerpcspe/powerpcspe.c
index 0df373dbe0f..4c37be79a50 100644
--- a/gcc/config/powerpcspe/powerpcspe.c
+++ b/gcc/config/powerpcspe/powerpcspe.c
@@ -1971,6 +1971,10 @@ static const struct attribute_spec rs6000_attribute_table[] =
#undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS
#define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 1
+
+#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED
+#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \
+ rs6000_hard_regno_call_part_clobbered
/* Processor table. */
@@ -2156,6 +2160,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)
diff --git a/gcc/config/powerpcspe/powerpcspe.h b/gcc/config/powerpcspe/powerpcspe.h
index f805f9b32ef..4e4078f3377 100644
--- a/gcc/config/powerpcspe/powerpcspe.h
+++ b/gcc/config/powerpcspe/powerpcspe.h
@@ -1302,13 +1302,6 @@ enum data_align { align_abi, align_opt, align_both };
? DImode \
: choose_hard_reg_mode ((REGNO), (NREGS), false))
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- (((TARGET_32BIT && TARGET_POWERPC64 \
- && (GET_MODE_SIZE (MODE) > 4) \
- && INT_REGNO_P (REGNO)) ? 1 : 0) \
- || (TARGET_VSX && FP_REGNO_P (REGNO) \
- && GET_MODE_SIZE (MODE) > 8 && !FLOAT128_2REG_P (MODE)))
-
#define VSX_VECTOR_MODE(MODE) \
((MODE) == V4SFmode \
|| (MODE) == V2DFmode) \
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)
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index d668c9b8f50..9114b35e46f 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1236,13 +1236,6 @@ enum data_align { align_abi, align_opt, align_both };
? DImode \
: choose_hard_reg_mode ((REGNO), (NREGS), false))
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- (((TARGET_32BIT && TARGET_POWERPC64 \
- && (GET_MODE_SIZE (MODE) > 4) \
- && INT_REGNO_P (REGNO)) ? 1 : 0) \
- || (TARGET_VSX && FP_REGNO_P (REGNO) \
- && GET_MODE_SIZE (MODE) > 8 && !FLOAT128_2REG_P (MODE)))
-
#define VSX_VECTOR_MODE(MODE) \
((MODE) == V4SFmode \
|| (MODE) == V2DFmode) \
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 8b6991adef9..86b77138d0a 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -10491,6 +10491,29 @@ s390_hard_regno_scratch_ok (unsigned int regno)
return true;
}
+/* Implement TARGET_HARD_REGNO_CALL_PART_CLOBBERED. When generating
+ code that runs in z/Architecture mode, but conforms to the 31-bit
+ ABI, GPRs can hold 8 bytes; the ABI guarantees only that the lower 4
+ bytes are saved across calls, however. */
+
+static bool
+s390_hard_regno_call_part_clobbered (unsigned int regno, machine_mode mode)
+{
+ if (!TARGET_64BIT
+ && TARGET_ZARCH
+ && GET_MODE_SIZE (mode) > 4
+ && ((regno >= 6 && regno <= 15) || regno == 32))
+ return true;
+
+ if (TARGET_VX
+ && GET_MODE_SIZE (mode) > 8
+ && (((TARGET_64BIT && regno >= 24 && regno <= 31))
+ || (!TARGET_64BIT && (regno == 18 || regno == 19))))
+ return true;
+
+ return false;
+}
+
/* Maximum number of registers to represent a value of mode MODE
in a register of class RCLASS. */
@@ -15938,6 +15961,10 @@ s390_asan_shadow_offset (void)
#undef TARGET_HARD_REGNO_SCRATCH_OK
#define TARGET_HARD_REGNO_SCRATCH_OK s390_hard_regno_scratch_ok
+#undef TARGET_HARD_REGNO_CALL_PART_CLOBBERED
+#define TARGET_HARD_REGNO_CALL_PART_CLOBBERED \
+ s390_hard_regno_call_part_clobbered
+
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE s390_attribute_table
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 917aa293073..bdeba1e8676 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -509,19 +509,6 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
(((MODE1) == SFmode || (MODE1) == DFmode) \
== ((MODE2) == SFmode || (MODE2) == DFmode))
-/* When generating code that runs in z/Architecture mode,
- but conforms to the 31-bit ABI, GPRs can hold 8 bytes;
- the ABI guarantees only that the lower 4 bytes are
- saved across calls, however. */
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO, MODE) \
- ((!TARGET_64BIT && TARGET_ZARCH \
- && GET_MODE_SIZE (MODE) > 4 \
- && (((REGNO) >= 6 && (REGNO) <= 15) || (REGNO) == 32)) \
- || (TARGET_VX \
- && GET_MODE_SIZE (MODE) > 8 \
- && (((TARGET_64BIT && (REGNO) >= 24 && (REGNO) <= 31)) \
- || (!TARGET_64BIT && ((REGNO) == 18 || (REGNO) == 19)))))
-
/* Maximum number of registers to represent a value of mode MODE
in a register of class CLASS. */
#define CLASS_MAX_NREGS(CLASS, MODE) \
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index da0c354e1d3..195f5041978 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -812,8 +812,6 @@ extern char sh_additional_register_names[ADDREGNAMES_SIZE] \
1, 1, 0, 0, \
}
-#define HARD_REGNO_CALL_PART_CLOBBERED(REGNO,MODE) (false)
-
/* Return number of consecutive hard regs needed starting at reg REGNO
to hold something of mode MODE.
This is ordinarily the length in words of a value of mode MODE