===================================================================
@@ -127,8 +127,6 @@ static void cris_init_libfuncs (void);
static reg_class_t cris_preferred_reload_class (rtx, reg_class_t);
-static bool cris_legitimate_address_p (enum machine_mode, rtx, bool);
-
static int cris_register_move_cost (enum machine_mode, reg_class_t, reg_class_t);
static int cris_memory_move_cost (enum machine_mode, reg_class_t, bool);
static bool cris_rtx_costs (rtx, int, int, int, int *, bool);
@@ -1414,7 +1412,7 @@ cris_biap_index_p (const_rtx x, bool str
here (but is thankfully a general_operand in itself). A local PIC
symbol is valid for the plain "symbol + offset" case. */
-static bool
+bool
cris_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
{
const_rtx x1, x2;
===================================================================
@@ -778,6 +778,9 @@ struct cum_args {int regs;};
#define HAVE_POST_INCREMENT 1
+#define CONSTANT_ADDRESS_P(X) \
+ (CONSTANT_P (X) && cris_legitimate_address_p (QImode, X, false))
+
/* Must be a compile-time constant, so we go with the highest value
among all CRIS variants. */
#define MAX_REGS_PER_ADDRESS 2
===================================================================
@@ -40,6 +40,7 @@ extern bool cris_base_p (const_rtx, bool
extern bool cris_base_or_autoincr_p (const_rtx, bool);
extern bool cris_bdap_index_p (const_rtx, bool);
extern bool cris_biap_index_p (const_rtx, bool);
+extern bool cris_legitimate_address_p (enum machine_mode, rtx, bool);
extern bool cris_store_multiple_op_p (rtx);
extern bool cris_movem_load_rest_p (rtx, int);
extern void cris_asm_output_symbol_ref (FILE *, rtx);