diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-12-16 14:13:03 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-12-16 14:13:03 +0000 |
commit | 05210ba63707fd3dc120f0f5a76add5ca172881e (patch) | |
tree | 0932d4f8ba3dd51e383d00346fdcab38cc45d073 /gcc/addresses.h | |
parent | 8fcc61f8964aa9aa2e6fc08cb961f9dc2a5add77 (diff) | |
download | gcc-05210ba63707fd3dc120f0f5a76add5ca172881e.tar.gz |
poly_int: MACRO_MODE
This patch uses a MACRO_MODE wrapper for the target macro invocations
in targhooks.c and address.h, so that macros for non-AArch64 targets
can continue to treat modes as fixed-size.
It didn't seem worth converting the address macros to hooks since
(a) they're heavily used, (b) they should be probably be replaced
with a different interface rather than converted to hooks as-is,
and most importantly (c) addresses.h already localises the problem.
2017-12-16 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* machmode.h (MACRO_MODE): New macro.
* addresses.h (base_reg_class, ok_for_base_p_1): Use it.
* targhooks.c (default_libcall_value, default_secondary_reload)
(default_memory_move_cost, default_register_move_cost)
(default_class_max_nregs): Likewise.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255744
Diffstat (limited to 'gcc/addresses.h')
-rw-r--r-- | gcc/addresses.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/addresses.h b/gcc/addresses.h index d4749fce8c4..b0103d2a3ba 100644 --- a/gcc/addresses.h +++ b/gcc/addresses.h @@ -31,14 +31,15 @@ base_reg_class (machine_mode mode ATTRIBUTE_UNUSED, enum rtx_code index_code ATTRIBUTE_UNUSED) { #ifdef MODE_CODE_BASE_REG_CLASS - return MODE_CODE_BASE_REG_CLASS (mode, as, outer_code, index_code); + return MODE_CODE_BASE_REG_CLASS (MACRO_MODE (mode), as, outer_code, + index_code); #else #ifdef MODE_BASE_REG_REG_CLASS if (index_code == REG) - return MODE_BASE_REG_REG_CLASS (mode); + return MODE_BASE_REG_REG_CLASS (MACRO_MODE (mode)); #endif #ifdef MODE_BASE_REG_CLASS - return MODE_BASE_REG_CLASS (mode); + return MODE_BASE_REG_CLASS (MACRO_MODE (mode)); #else return BASE_REG_CLASS; #endif @@ -58,15 +59,15 @@ ok_for_base_p_1 (unsigned regno ATTRIBUTE_UNUSED, enum rtx_code index_code ATTRIBUTE_UNUSED) { #ifdef REGNO_MODE_CODE_OK_FOR_BASE_P - return REGNO_MODE_CODE_OK_FOR_BASE_P (regno, mode, as, + return REGNO_MODE_CODE_OK_FOR_BASE_P (regno, MACRO_MODE (mode), as, outer_code, index_code); #else #ifdef REGNO_MODE_OK_FOR_REG_BASE_P if (index_code == REG) - return REGNO_MODE_OK_FOR_REG_BASE_P (regno, mode); + return REGNO_MODE_OK_FOR_REG_BASE_P (regno, MACRO_MODE (mode)); #endif #ifdef REGNO_MODE_OK_FOR_BASE_P - return REGNO_MODE_OK_FOR_BASE_P (regno, mode); + return REGNO_MODE_OK_FOR_BASE_P (regno, MACRO_MODE (mode)); #else return REGNO_OK_FOR_BASE_P (regno); #endif |