+2010-11-16 Joern Rennecke <amylaar@spamcop.net>
+
+ PR target/44762
+ * config/score/score3.c (score3_return_in_memory): Constify arguments.
+ (score3_in_small_data_p, score3_function_value): Likewise.
+ (score3_trampoline_init): Use LCT_NORMAL.
+ (score3_print_operand): Initialize code as UNKNOWN.
+ * config/score/predicates.md (score_load_multiple_operation):
+ Remove unused variable.
+ (score_store_multiple_operation): Likewise.
+ * config/score/score7.c (score7_return_in_memory): Constify arguments.
+ (score7_in_small_data_p, score7_function_value): Likewise.
+ (score7_trampoline_init): Use LCT_NORMAL.
+ (score7_print_operand): Initialize code as UNKNOWN.
+ * config/score/score3.h (score3_return_in_memory): Update prototype.
+ (score3_in_small_data_p, score3_function_value): Likewise.
+ * config/score/score-protos.h (score_function_value): Likewise.
+ * config/score/score7.h (score7_return_in_memory): Update prototype.
+ (score7_in_small_data_p, score7_function_value): Likewise.
+ * config/score/score.c (TARGET_PROMOTE_PROTOTYPES): Constify.
+ (score_return_in_memory, score_pass_by_reference): Constify arguments.
+ (score_output_mi_thunk, score_function_prologue): Don't return a value.
+ (score_function_epilogue, score_in_small_data_p): Likewise.
+ (score_option_override, score_asm_trampoline_template): Likewise.
+ (score_trampoline_init, score_print_operand): Likewise.
+ (score_print_operand_address, score_prologue): Likewise.
+ (score_epilogue, score_call, score_call_value): Likewise.
+ (score_movsicc, score_movdi, score_zero_extract_andi): Likewise.
+ (score_function_arg_advance): Likewise. Make static.
+ (score_asm_file_end): Mark parameter value with ATTRIBUTE_UNUSED.
+ (score_function_arg, score_legitimate_address_p): Make static.
+ (score_function_value): Mark parameter func with ATTRIBUTE_UNUSED.
+ * config/score/score.h (REGNO_REG_CLASS): Cast value to enum reg_class.
+ * config/score/score-conv.h (UIMM_IN_RANGE, SIMM_IN_RANGE):
+ Allow (W) == HOST_BITS_PER_WIDE_INT.
+
2010-11-16 Nathan Froyd <froydnj@codesourcery.com>
* config/arc/arc.c: Delete pasto.
#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
#undef TARGET_PROMOTE_PROTOTYPES
-#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
#undef TARGET_MUST_PASS_IN_STACK
#define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
small structures are returned in a register.
Objects with varying size must still be returned in memory. */
static bool
-score_return_in_memory (tree type, tree fndecl ATTRIBUTE_UNUSED)
+score_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
return score7_return_in_memory (type, fndecl);
/* Return nonzero when an argument must be passed by reference. */
static bool
score_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
- enum machine_mode mode, tree type,
+ enum machine_mode mode, const_tree type,
bool named ATTRIBUTE_UNUSED)
{
/* If we have a variable-sized parameter, we have no choice. */
tree function)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_output_mi_thunk (file, thunk_fndecl, delta,
- vcall_offset, function);
+ score7_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function);
else if (TARGET_SCORE3)
- return score3_output_mi_thunk (file, thunk_fndecl, delta,
- vcall_offset, function);
- gcc_unreachable ();
+ score3_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function);
+ else
+ gcc_unreachable ();
}
/* Implement TARGET_FUNCTION_OK_FOR_SIBCALL. */
score_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_function_prologue (file, size);
+ score7_function_prologue (file, size);
else if (TARGET_SCORE3)
- return score3_function_prologue (file, size);
-
- gcc_unreachable ();
+ score3_function_prologue (file, size);
+ else
+ gcc_unreachable ();
}
/* Do any necessary cleanup after a function to restore stack, frame,
HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_function_epilogue (file, size);
+ score7_function_epilogue (file, size);
else if (TARGET_SCORE3)
- return score3_function_epilogue (file, size);
-
- gcc_unreachable ();
+ score3_function_epilogue (file, size);
+ else
+ gcc_unreachable ();
}
/* Implement TARGET_SCHED_ISSUE_RATE. */
/* Implement TARGET_IN_SMALL_DATA_P. */
static bool
-score_in_small_data_p (tree decl)
+score_in_small_data_p (const_tree decl)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
return score7_in_small_data_p (decl);
score_asm_file_end (void)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_asm_file_end ();
+ score7_asm_file_end ();
else if (TARGET_SCORE3)
- return score3_asm_file_end ();
-
- gcc_unreachable ();
+ score3_asm_file_end ();
+ else
+ gcc_unreachable ();
}
#define MASK_ALL_CPU_BITS \
/* Implement TARGET_HANDLE_OPTION. */
static bool
-score_handle_option (size_t code, const char *arg, int value)
+score_handle_option (size_t code, const char *arg, int value ATTRIBUTE_UNUSED)
{
switch (code)
{
score_option_override (void)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_option_override ();
+ score7_option_override ();
else if (TARGET_SCORE3)
- return score3_option_override ();
-
- return score7_option_override ();
+ score3_option_override ();
+ else
+ score7_option_override ();
}
/* Implement REGNO_REG_CLASS macro. */
}
/* Implement TARGET_FUNCTION_ARG_ADVANCE hook. */
-void
+static void
score_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_function_arg_advance (cum, mode, type, named);
+ score7_function_arg_advance (cum, mode, type, named);
else if (TARGET_SCORE3)
- return score3_function_arg_advance (cum, mode, type, named);
-
- gcc_unreachable ();
+ score3_function_arg_advance (cum, mode, type, named);
+ else
+ gcc_unreachable ();
}
/* Implement TARGET_ARG_PARTIAL_BYTES macro. */
}
/* Implement TARGET_FUNCTION_ARG hook. */
-rtx
+static rtx
score_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named)
{
VALTYPE is the return type and MODE is VOIDmode. For libcalls,
VALTYPE is null and MODE is the mode of the return value. */
rtx
-score_function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
+score_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
score_asm_trampoline_template (FILE *f)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_asm_trampoline_template (f);
+ score7_asm_trampoline_template (f);
else if (TARGET_SCORE3)
- return score3_asm_trampoline_template (f);
-
- gcc_unreachable ();
+ score3_asm_trampoline_template (f);
+ else
+ gcc_unreachable ();
}
/* Implement TARGET_TRAMPOLINE_INIT. */
{
/* ??? These two routines are identical. */
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_trampoline_init (m_tramp, fndecl, chain_value);
+ score7_trampoline_init (m_tramp, fndecl, chain_value);
else if (TARGET_SCORE3)
- return score3_trampoline_init (m_tramp, fndecl, chain_value);
-
- gcc_unreachable ();
+ score3_trampoline_init (m_tramp, fndecl, chain_value);
+ else
+ gcc_unreachable ();
}
/* This function is used to implement REG_MODE_OK_FOR_BASE_P macro. */
}
/* Implement TARGET_LEGITIMIZE_ADDRESS_P. */
-bool
+static bool
score_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
score_print_operand (FILE *file, rtx op, int c)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_print_operand (file, op, c);
+ score7_print_operand (file, op, c);
else if (TARGET_SCORE3)
- return score3_print_operand (file, op, c);
-
- gcc_unreachable ();
+ score3_print_operand (file, op, c);
+ else
+ gcc_unreachable ();
}
/* Implement PRINT_OPERAND_ADDRESS macro. */
score_print_operand_address (FILE *file, rtx x)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_print_operand_address (file, x);
+ score7_print_operand_address (file, x);
else if (TARGET_SCORE3)
- return score3_print_operand_address (file, x);
-
- gcc_unreachable ();
+ score3_print_operand_address (file, x);
+ else
+ gcc_unreachable ();
}
/* Implement SELECT_CC_MODE macro. */
score_prologue (void)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_prologue ();
+ score7_prologue ();
else if (TARGET_SCORE3)
- return score3_prologue ();
-
- gcc_unreachable ();
+ score3_prologue ();
+ else
+ gcc_unreachable ();
}
/* Generate the epilogue instructions in a S+core function. */
score_epilogue (int sibcall_p)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_epilogue (sibcall_p);
+ score7_epilogue (sibcall_p);
else if (TARGET_SCORE3)
- return score3_epilogue (sibcall_p);
-
- gcc_unreachable ();
+ score3_epilogue (sibcall_p);
+ else
+ gcc_unreachable ();
}
/* Call and sibcall pattern all need call this function. */
score_call (rtx *ops, bool sib)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_call (ops, sib);
+ score7_call (ops, sib);
else if (TARGET_SCORE3)
- return score3_call (ops, sib);
-
- gcc_unreachable ();
+ score3_call (ops, sib);
+ else
+ gcc_unreachable ();
}
/* Call value and sibcall value pattern all need call this function. */
score_call_value (rtx *ops, bool sib)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_call_value (ops, sib);
+ score7_call_value (ops, sib);
else if (TARGET_SCORE3)
- return score3_call_value (ops, sib);
-
- gcc_unreachable ();
+ score3_call_value (ops, sib);
+ else
+ gcc_unreachable ();
}
void
score_movsicc (rtx *ops)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_movsicc (ops);
+ score7_movsicc (ops);
else if (TARGET_SCORE3)
- return score3_movsicc (ops);
-
- gcc_unreachable ();
+ score3_movsicc (ops);
+ else
+ gcc_unreachable ();
}
/* Machine Split */
score_movdi (rtx *ops)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_movdi (ops);
+ score7_movdi (ops);
else if (TARGET_SCORE3)
- return score3_movdi (ops);
-
- gcc_unreachable ();
+ score3_movdi (ops);
+ else
+ gcc_unreachable ();
}
void
score_zero_extract_andi (rtx *ops)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_zero_extract_andi (ops);
+ score7_zero_extract_andi (ops);
else if (TARGET_SCORE3)
- return score3_zero_extract_andi (ops);
-
- gcc_unreachable ();
+ score3_zero_extract_andi (ops);
+ else
+ gcc_unreachable ();
}
/* Output asm insn for move. */