diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2023-08-15 06:35:43 +0200 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2023-08-15 12:53:59 +0200 |
commit | eef192b181b8777d708671e2541896e7e31293aa (patch) | |
tree | 96d4debfd2b6afb65c0a441476cb4a3fcb2bba8c /gcc | |
parent | 4d6132e59327e809a4d4e39fb9465dbd43775b7c (diff) | |
download | gcc-eef192b181b8777d708671e2541896e7e31293aa.zip gcc-eef192b181b8777d708671e2541896e7e31293aa.tar.gz gcc-eef192b181b8777d708671e2541896e7e31293aa.tar.bz2 |
CRIS: Don't include tree.h in cris-protos.h, PR bootstrap/111021
While there's another patch that fixes the immediate error
in the PR by other means, the include of tree.h here is
something I prefer to avoid.
PR bootstrap/111021
* config/cris/cris-protos.h: Revert recent change.
* config/cris/cris.cc (cris_legitimate_address_p): Remove
code_helper unused parameter.
(cris_legitimate_address_p_hook): New wrapper function.
(TARGET_LEGITIMATE_ADDRESS_P): Change to
cris_legitimate_address_p_hook.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/cris/cris-protos.h | 5 | ||||
-rw-r--r-- | gcc/config/cris/cris.cc | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/config/cris/cris-protos.h b/gcc/config/cris/cris-protos.h index 5855594..666e04f 100644 --- a/gcc/config/cris/cris-protos.h +++ b/gcc/config/cris/cris-protos.h @@ -20,8 +20,6 @@ along with GCC; see the file COPYING3. If not see /* Prototypes for the CRIS port. */ -#include "tree.h" /* For ERROR_MARK. */ - extern bool cris_simple_epilogue (void); #ifdef RTX_CODE extern const char *cris_op_str (rtx); @@ -36,8 +34,7 @@ extern bool cris_base_or_autoincr_p (const_rtx, bool); extern bool cris_bdap_index_p (const_rtx, bool); extern void cris_reduce_compare (rtx *, rtx *, rtx *); extern bool cris_biap_index_p (const_rtx, bool); -extern bool cris_legitimate_address_p (machine_mode, rtx, bool, - code_helper = ERROR_MARK); +extern bool cris_legitimate_address_p (machine_mode, rtx, bool); extern bool cris_store_multiple_op_p (rtx); extern bool cris_movem_load_rest_p (rtx); extern void cris_asm_output_symbol_ref (FILE *, rtx); diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc index 853c079..8b0f82e 100644 --- a/gcc/config/cris/cris.cc +++ b/gcc/config/cris/cris.cc @@ -168,6 +168,8 @@ static unsigned int cris_hard_regno_nregs (unsigned int, machine_mode); static bool cris_hard_regno_mode_ok (unsigned int, machine_mode); static HOST_WIDE_INT cris_static_rtx_alignment (machine_mode); static HOST_WIDE_INT cris_constant_alignment (const_tree, HOST_WIDE_INT); +static bool cris_legitimate_address_p_hook (machine_mode, rtx, bool, + code_helper); /* This is the parsed result of the "-max-stack-stackframe=" option. If it (still) is zero, then there was no such option given. */ @@ -217,7 +219,7 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION; #define TARGET_INIT_LIBFUNCS cris_init_libfuncs #undef TARGET_LEGITIMATE_ADDRESS_P -#define TARGET_LEGITIMATE_ADDRESS_P cris_legitimate_address_p +#define TARGET_LEGITIMATE_ADDRESS_P cris_legitimate_address_p_hook #undef TARGET_PREFERRED_RELOAD_CLASS #define TARGET_PREFERRED_RELOAD_CLASS cris_preferred_reload_class @@ -1536,8 +1538,15 @@ cris_biap_index_p (const_rtx x, bool strict) /* Worker function for TARGET_LEGITIMATE_ADDRESS_P. */ +static bool +cris_legitimate_address_p_hook (machine_mode mode, rtx x, bool strict, + code_helper) +{ + return cris_legitimate_address_p (mode, x, strict); +} + bool -cris_legitimate_address_p (machine_mode mode, rtx x, bool strict, code_helper) +cris_legitimate_address_p (machine_mode mode, rtx x, bool strict) { const_rtx x1, x2; |