+2010-09-05 Naveen H.S <naveen.S@kpitcummins.com>
+
+ * config/sh/sh.c (sh_option_override): Make static.
+ Adjust comments. Declare.
+ (sh_function_value_regno_p): Likewise.
+ (sh_register_move_cost): Modify the arguments, make static.
+ Adjust comments. Declare.
+ (TARGET_OPTION_OVERRIDE, TARGET_REGISTER_MOVE_COST
+ TARGET_FUNCTION_VALUE_REGNO_P): Define.
+ * config/sh/sh.h (OVERRIDE_OPTIONS, FUNCTION_VALUE_REGNO_P
+ REGISTER_MOVE_COST): Delete.
+ * config/sh/sh-protos.h (sh_override_options): Delete.
+ (sh_register_move_cost): Delete.
+ (sh_function_value_regno_p): Delete.
+
2010-09-04 Anatoly Sokolov <aesok@post.ru>
* config/m32r/m32r.c (m32r_function_value, m32r_libcall_value,
#endif /* RTX_CODE */
extern void sh_optimization_options (int, int);
-extern void sh_override_options (void);
extern const char *output_jump_label_table (void);
extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
extern struct rtx_def *get_fpscr_rtx (void);
(enum machine_mode, enum machine_mode, enum reg_class);
extern bool sh_small_register_classes_for_mode_p (enum machine_mode);
extern void sh_mark_label (rtx, int);
-extern int sh_register_move_cost
- (enum machine_mode mode, enum reg_class, enum reg_class);
extern int check_use_sfunc_addr (rtx, rtx);
#ifdef HARD_CONST
extern int sh_pass_in_reg_p (CUMULATIVE_ARGS *, enum machine_mode, tree);
extern void sh_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, signed int, enum machine_mode);
-extern bool sh_function_value_regno_p (const unsigned int);
extern rtx sh_dwarf_register_span (rtx);
extern rtx replace_n_hard_rtx (rtx, rtx *, int , int);
static int noncall_uses_reg (rtx, rtx, rtx *);
static rtx gen_block_redirect (rtx, int, int);
static void sh_reorg (void);
+static void sh_option_override (void);
static void output_stack_adjust (int, rtx, int, HARD_REG_SET *, bool);
static rtx frame_insn (rtx);
static rtx push (int);
static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT);
static void sh_insert_attributes (tree, tree *);
static const char *sh_check_pch_target_flags (int);
+static int sh_register_move_cost (enum machine_mode, reg_class_t, reg_class_t);
static int sh_adjust_cost (rtx, rtx, rtx, int);
static int sh_issue_rate (void);
static int sh_dfa_new_cycle (FILE *, int, rtx, int, int, int *sort_p);
static rtx sh_struct_value_rtx (tree, int);
static rtx sh_function_value (const_tree, const_tree, bool);
+static bool sh_function_value_regno_p (const unsigned int);
static rtx sh_libcall_value (enum machine_mode, const_rtx);
static bool sh_return_in_memory (const_tree, const_tree);
static rtx sh_builtin_saveregs (void);
#undef TARGET_ASM_ALIGNED_DI_OP
#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t"
+#undef TARGET_OPTION_OVERRIDE
+#define TARGET_OPTION_OVERRIDE sh_option_override
+
#undef TARGET_PRINT_OPERAND
#define TARGET_PRINT_OPERAND sh_print_operand
#undef TARGET_PRINT_OPERAND_ADDRESS
#undef TARGET_HANDLE_OPTION
#define TARGET_HANDLE_OPTION sh_handle_option
+#undef TARGET_REGISTER_MOVE_COST
+#define TARGET_REGISTER_MOVE_COST sh_register_move_cost
+
#undef TARGET_INSERT_ATTRIBUTES
#define TARGET_INSERT_ATTRIBUTES sh_insert_attributes
#undef TARGET_FUNCTION_VALUE
#define TARGET_FUNCTION_VALUE sh_function_value
+#undef TARGET_FUNCTION_VALUE_REGNO_P
+#define TARGET_FUNCTION_VALUE_REGNO_P sh_function_value_regno_p
#undef TARGET_LIBCALL_VALUE
#define TARGET_LIBCALL_VALUE sh_libcall_value
#undef TARGET_STRUCT_VALUE_RTX
set_param_value ("simultaneous-prefetches", 2);
}
-/* Implement OVERRIDE_OPTIONS macro. Validate and override various
- options, and do some machine dependent initialization. */
-void
-sh_override_options (void)
+/* Implement TARGET_OPTION_OVERRIDE macro. Validate and override
+ various options, and do some machine dependent initialization. */
+static void
+sh_option_override (void)
{
int regno;
return gen_rtx_REG (mode, BASE_RETURN_VALUE_REG (mode));
}
-/* Worker function for FUNCTION_VALUE_REGNO_P. */
+/* Return true if N is a possible register number of function value. */
-bool
+static bool
sh_function_value_regno_p (const unsigned int regno)
{
return ((regno) == FIRST_RET_REG
uses this information. Hence, the general register <-> floating point
register information here is not used for SFmode. */
-int
+static int
sh_register_move_cost (enum machine_mode mode,
- enum reg_class srcclass, enum reg_class dstclass)
+ reg_class_t srcclass, reg_class_t dstclass)
{
if (dstclass == T_REGS || dstclass == PR_REGS)
return 10;
extern const char *sh_fixed_range_str;
-#define OVERRIDE_OPTIONS sh_override_options ()
-
\f
/* Target machine storage layout. */
? FIRST_FP_PARM_REG \
: FIRST_PARM_REG)
-#define FUNCTION_VALUE_REGNO_P(REGNO) sh_function_value_regno_p (REGNO)
-
/* 1 if N is a possible register number for function argument passing. */
/* ??? There are some callers that pass REGNO as int, and others that pass
it as unsigned. We get warnings unless we do casts everywhere. */
((CLASS) == FP0_REGS || (CLASS) == FP_REGS \
|| (CLASS) == DF_REGS || (CLASS) == DF_HI_REGS)
-#define REGISTER_MOVE_COST(MODE, SRCCLASS, DSTCLASS) \
- sh_register_move_cost ((MODE), (SRCCLASS), (DSTCLASS))
-
/* ??? Perhaps make MEMORY_MOVE_COST depend on compiler option? This
would be so that people with slow memory systems could generate
different code that does fewer memory accesses. */