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/machmode.h | |
parent | 8fcc61f8964aa9aa2e6fc08cb961f9dc2a5add77 (diff) | |
download | gcc-05210ba63707fd3dc120f0f5a76add5ca172881e.zip gcc-05210ba63707fd3dc120f0f5a76add5ca172881e.tar.gz gcc-05210ba63707fd3dc120f0f5a76add5ca172881e.tar.bz2 |
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/machmode.h')
-rw-r--r-- | gcc/machmode.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/machmode.h b/gcc/machmode.h index f53e7b3..0c5c01c0a 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -685,6 +685,17 @@ fixed_size_mode::includes_p (machine_mode) return true; } +/* Wrapper for mode arguments to target macros, so that if a target + doesn't need polynomial-sized modes, its header file can continue + to treat everything as fixed_size_mode. This should go away once + macros are moved to target hooks. It shouldn't be used in other + contexts. */ +#if NUM_POLY_INT_COEFFS == 1 +#define MACRO_MODE(MODE) (as_a <fixed_size_mode> (MODE)) +#else +#define MACRO_MODE(MODE) (MODE) +#endif + extern opt_machine_mode mode_for_size (unsigned int, enum mode_class, int); /* Return the machine mode to use for a MODE_INT of SIZE bits, if one |