Commit cf277499 by Steven Bosscher

sh.c, [...]: Convert to ISO C90 function declarations and definitions.

	* config/sh/sh.c, config/sh/sh-protos.h: Convert to
	ISO C90 function declarations and definitions.

From-SVN: r72424
parent 269e3795
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* config/avr/avr.c, config/avr/avr-protos.h: Convert to * config/avr/avr.c, config/avr/avr-protos.h: Convert to
ISO C90 function declarations and definitions. ISO C90 function declarations and definitions.
* config/sh/sh.c, config/sh/sh-protos.h: Likewise.
2003-10-12 Nathanael Nerode <neroden@gcc.gnu.org> 2003-10-12 Nathanael Nerode <neroden@gcc.gnu.org>
......
...@@ -25,117 +25,117 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,117 +25,117 @@ Boston, MA 02111-1307, USA. */
#define GCC_SH_PROTOS_H #define GCC_SH_PROTOS_H
#ifdef RTX_CODE #ifdef RTX_CODE
extern struct rtx_def *prepare_scc_operands PARAMS ((enum rtx_code)); extern struct rtx_def *prepare_scc_operands (enum rtx_code);
/* Declare functions defined in sh.c and used in templates. */ /* Declare functions defined in sh.c and used in templates. */
extern const char *output_branch PARAMS ((int, rtx, rtx *)); extern const char *output_branch (int, rtx, rtx *);
extern const char *output_ieee_ccmpeq PARAMS ((rtx, rtx *)); extern const char *output_ieee_ccmpeq (rtx, rtx *);
extern const char *output_branchy_insn PARAMS ((enum rtx_code, const char *, rtx, rtx *)); extern const char *output_branchy_insn (enum rtx_code, const char *, rtx, rtx *);
extern const char *output_movedouble PARAMS ((rtx, rtx[], enum machine_mode)); extern const char *output_movedouble (rtx, rtx[], enum machine_mode);
extern const char *output_movepcrel PARAMS ((rtx, rtx[], enum machine_mode)); extern const char *output_movepcrel (rtx, rtx[], enum machine_mode);
extern const char *output_far_jump PARAMS ((rtx, rtx)); extern const char *output_far_jump (rtx, rtx);
extern struct rtx_def *sfunc_uses_reg PARAMS ((rtx)); extern struct rtx_def *sfunc_uses_reg (rtx);
extern int barrier_align PARAMS ((rtx)); extern int barrier_align (rtx);
extern int sh_loop_align PARAMS ((rtx)); extern int sh_loop_align (rtx);
extern int fp_zero_operand PARAMS ((rtx)); extern int fp_zero_operand (rtx);
extern int fp_one_operand PARAMS ((rtx)); extern int fp_one_operand (rtx);
extern int fp_int_operand PARAMS ((rtx)); extern int fp_int_operand (rtx);
extern rtx get_fpscr_rtx PARAMS ((void)); extern rtx get_fpscr_rtx (void);
extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx)); extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
extern int nonpic_symbol_mentioned_p PARAMS ((rtx)); extern int nonpic_symbol_mentioned_p (rtx);
extern void emit_sf_insn PARAMS ((rtx)); extern void emit_sf_insn (rtx);
extern void emit_df_insn PARAMS ((rtx)); extern void emit_df_insn (rtx);
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address (FILE *, rtx);
extern void print_operand PARAMS ((FILE *, rtx, int)); extern void print_operand (FILE *, rtx, int);
extern void output_pic_addr_const PARAMS ((FILE *, rtx)); extern void output_pic_addr_const (FILE *, rtx);
extern int expand_block_move PARAMS ((rtx *)); extern int expand_block_move (rtx *);
extern int prepare_move_operands PARAMS ((rtx[], enum machine_mode mode)); extern int prepare_move_operands (rtx[], enum machine_mode mode);
extern void from_compare PARAMS ((rtx *, int)); extern void from_compare (rtx *, int);
extern int shift_insns_rtx PARAMS ((rtx)); extern int shift_insns_rtx (rtx);
extern void gen_ashift PARAMS ((int, int, rtx)); extern void gen_ashift (int, int, rtx);
extern void gen_ashift_hi PARAMS ((int, int, rtx)); extern void gen_ashift_hi (int, int, rtx);
extern void gen_shifty_op PARAMS ((int, rtx *)); extern void gen_shifty_op (int, rtx *);
extern void gen_shifty_hi_op PARAMS ((int, rtx *)); extern void gen_shifty_hi_op (int, rtx *);
extern int expand_ashiftrt PARAMS ((rtx *)); extern int expand_ashiftrt (rtx *);
extern int sh_dynamicalize_shift_p PARAMS ((rtx)); extern int sh_dynamicalize_shift_p (rtx);
extern int shl_and_kind PARAMS ((rtx, rtx, int *)); extern int shl_and_kind (rtx, rtx, int *);
extern int shl_and_length PARAMS ((rtx)); extern int shl_and_length (rtx);
extern int shl_and_scr_length PARAMS ((rtx)); extern int shl_and_scr_length (rtx);
extern int gen_shl_and PARAMS ((rtx, rtx, rtx, rtx)); extern int gen_shl_and (rtx, rtx, rtx, rtx);
extern int shl_sext_kind PARAMS ((rtx, rtx, int *)); extern int shl_sext_kind (rtx, rtx, int *);
extern int shl_sext_length PARAMS ((rtx)); extern int shl_sext_length (rtx);
extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx)); extern int gen_shl_sext (rtx, rtx, rtx, rtx);
extern rtx gen_datalabel_ref PARAMS ((rtx)); extern rtx gen_datalabel_ref (rtx);
extern int regs_used PARAMS ((rtx, int)); extern int regs_used (rtx, int);
extern void fixup_addr_diff_vecs PARAMS ((rtx)); extern void fixup_addr_diff_vecs (rtx);
extern int get_dest_uid PARAMS ((rtx, int)); extern int get_dest_uid (rtx, int);
extern void final_prescan_insn PARAMS ((rtx, rtx *, int)); extern void final_prescan_insn (rtx, rtx *, int);
extern int symbol_ref_operand PARAMS ((rtx, enum machine_mode)); extern int symbol_ref_operand (rtx, enum machine_mode);
extern int tls_symbolic_operand PARAMS ((rtx, enum machine_mode)); extern int tls_symbolic_operand (rtx, enum machine_mode);
extern int system_reg_operand PARAMS ((rtx, enum machine_mode)); extern int system_reg_operand (rtx, enum machine_mode);
extern int general_movsrc_operand PARAMS ((rtx, enum machine_mode)); extern int general_movsrc_operand (rtx, enum machine_mode);
extern int general_movdst_operand PARAMS ((rtx, enum machine_mode)); extern int general_movdst_operand (rtx, enum machine_mode);
extern int arith_reg_operand PARAMS ((rtx, enum machine_mode)); extern int arith_reg_operand (rtx, enum machine_mode);
extern int fp_arith_reg_operand PARAMS ((rtx, enum machine_mode)); extern int fp_arith_reg_operand (rtx, enum machine_mode);
extern int arith_operand PARAMS ((rtx, enum machine_mode)); extern int arith_operand (rtx, enum machine_mode);
extern int arith_reg_or_0_operand PARAMS ((rtx, enum machine_mode)); extern int arith_reg_or_0_operand (rtx, enum machine_mode);
extern int logical_operand PARAMS ((rtx, enum machine_mode)); extern int logical_operand (rtx, enum machine_mode);
extern int tertiary_reload_operand PARAMS ((rtx, enum machine_mode)); extern int tertiary_reload_operand (rtx, enum machine_mode);
extern int fpscr_operand PARAMS ((rtx, enum machine_mode)); extern int fpscr_operand (rtx, enum machine_mode);
extern int fpul_operand PARAMS ((rtx, enum machine_mode)); extern int fpul_operand (rtx, enum machine_mode);
extern int commutative_float_operator PARAMS ((rtx, enum machine_mode)); extern int commutative_float_operator (rtx, enum machine_mode);
extern int noncommutative_float_operator PARAMS ((rtx, enum machine_mode)); extern int noncommutative_float_operator (rtx, enum machine_mode);
extern int reg_unused_after PARAMS ((rtx, rtx)); extern int reg_unused_after (rtx, rtx);
extern void expand_sf_unop PARAMS ((rtx (*)(rtx, rtx, rtx), rtx *)); extern void expand_sf_unop (rtx (*)(rtx, rtx, rtx), rtx *);
extern void expand_sf_binop PARAMS ((rtx (*)(rtx, rtx, rtx, rtx), rtx *)); extern void expand_sf_binop (rtx (*)(rtx, rtx, rtx, rtx), rtx *);
extern void expand_df_unop PARAMS ((rtx (*)(rtx, rtx, rtx), rtx *)); extern void expand_df_unop (rtx (*)(rtx, rtx, rtx), rtx *);
extern void expand_df_binop PARAMS ((rtx (*)(rtx, rtx, rtx, rtx), rtx *)); extern void expand_df_binop (rtx (*)(rtx, rtx, rtx, rtx), rtx *);
extern void expand_fp_branch PARAMS ((rtx (*)(void), rtx (*)(void))); extern void expand_fp_branch (rtx (*)(void), rtx (*)(void));
extern int sh_insn_length_adjustment PARAMS ((rtx)); extern int sh_insn_length_adjustment (rtx);
extern int sh_can_redirect_branch PARAMS ((rtx, rtx)); extern int sh_can_redirect_branch (rtx, rtx);
extern void sh_expand_unop_v2sf PARAMS ((enum rtx_code, rtx, rtx)); extern void sh_expand_unop_v2sf (enum rtx_code, rtx, rtx);
extern void sh_expand_binop_v2sf PARAMS ((enum rtx_code, rtx, rtx, rtx)); extern void sh_expand_binop_v2sf (enum rtx_code, rtx, rtx, rtx);
#ifdef TREE_CODE #ifdef TREE_CODE
extern void sh_va_start PARAMS ((tree, rtx)); extern void sh_va_start (tree, rtx);
extern rtx sh_va_arg PARAMS ((tree, tree)); extern rtx sh_va_arg (tree, tree);
#endif /* TREE_CODE */ #endif /* TREE_CODE */
#endif /* RTX_CODE */ #endif /* RTX_CODE */
#ifdef TREE_CODE #ifdef TREE_CODE
extern tree sh_build_va_list PARAMS ((void)); extern tree sh_build_va_list (void);
#endif /* TREE_CODE */ #endif /* TREE_CODE */
extern const char *output_jump_label_table PARAMS ((void)); extern const char *output_jump_label_table (void);
extern int sh_handle_pragma PARAMS ((int (*)(void), void (*)(int), const char *)); extern int sh_handle_pragma (int (*)(void), void (*)(int), const char *);
extern struct rtx_def *get_fpscr_rtx PARAMS ((void)); extern struct rtx_def *get_fpscr_rtx (void);
extern int sh_media_register_for_return PARAMS ((void)); extern int sh_media_register_for_return (void);
extern void sh_expand_prologue PARAMS ((void)); extern void sh_expand_prologue (void);
extern void sh_expand_epilogue PARAMS ((void)); extern void sh_expand_epilogue (void);
extern int sh_need_epilogue PARAMS ((void)); extern int sh_need_epilogue (void);
extern void sh_set_return_address PARAMS ((rtx, rtx)); extern void sh_set_return_address (rtx, rtx);
extern int initial_elimination_offset PARAMS ((int, int)); extern int initial_elimination_offset (int, int);
extern int fldi_ok PARAMS ((void)); extern int fldi_ok (void);
extern int sh_pr_n_sets PARAMS ((void)); extern int sh_pr_n_sets (void);
extern int sh_hard_regno_rename_ok PARAMS ((unsigned int, unsigned int)); extern int sh_hard_regno_rename_ok (unsigned int, unsigned int);
extern int sh_cfun_interrupt_handler_p PARAMS ((void)); extern int sh_cfun_interrupt_handler_p (void);
extern int sh_attr_renesas_p PARAMS ((tree)); extern int sh_attr_renesas_p (tree);
extern int sh_cfun_attr_renesas_p PARAMS ((void)); extern int sh_cfun_attr_renesas_p (void);
extern void sh_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern void sh_initialize_trampoline (rtx, rtx, rtx);
extern bool sh_cannot_change_mode_class extern bool sh_cannot_change_mode_class
PARAMS ((enum machine_mode, enum machine_mode, enum reg_class)); (enum machine_mode, enum machine_mode, enum reg_class);
extern void sh_mark_label PARAMS ((rtx, int)); extern void sh_mark_label (rtx, int);
extern int sh_register_move_cost extern int sh_register_move_cost
PARAMS ((enum machine_mode mode, enum reg_class, enum reg_class)); (enum machine_mode mode, enum reg_class, enum reg_class);
#ifdef HARD_CONST #ifdef HARD_CONST
extern void fpscr_set_from_mem PARAMS ((int, HARD_REG_SET)); extern void fpscr_set_from_mem (int, HARD_REG_SET);
#endif #endif
extern void sh_pr_interrupt PARAMS ((struct cpp_reader *)); extern void sh_pr_interrupt (struct cpp_reader *);
extern void sh_pr_trapa PARAMS ((struct cpp_reader *)); extern void sh_pr_trapa (struct cpp_reader *);
extern void sh_pr_nosave_low_regs PARAMS ((struct cpp_reader *)); extern void sh_pr_nosave_low_regs (struct cpp_reader *);
extern rtx function_symbol (const char *); extern rtx function_symbol (const char *);
extern rtx sh_get_pr_initial_val (void); extern rtx sh_get_pr_initial_val (void);
......
...@@ -177,61 +177,60 @@ int assembler_dialect; ...@@ -177,61 +177,60 @@ int assembler_dialect;
static bool shmedia_space_reserved_for_target_registers; static bool shmedia_space_reserved_for_target_registers;
static void split_branches PARAMS ((rtx)); static void split_branches (rtx);
static int branch_dest PARAMS ((rtx)); static int branch_dest (rtx);
static void force_into PARAMS ((rtx, rtx)); static void force_into (rtx, rtx);
static void print_slot PARAMS ((rtx)); static void print_slot (rtx);
static rtx add_constant PARAMS ((rtx, enum machine_mode, rtx)); static rtx add_constant (rtx, enum machine_mode, rtx);
static void dump_table PARAMS ((rtx)); static void dump_table (rtx);
static int hi_const PARAMS ((rtx)); static int hi_const (rtx);
static int broken_move PARAMS ((rtx)); static int broken_move (rtx);
static int mova_p PARAMS ((rtx)); static int mova_p (rtx);
static rtx find_barrier PARAMS ((int, rtx, rtx)); static rtx find_barrier (int, rtx, rtx);
static int noncall_uses_reg PARAMS ((rtx, rtx, rtx *)); static int noncall_uses_reg (rtx, rtx, rtx *);
static rtx gen_block_redirect PARAMS ((rtx, int, int)); static rtx gen_block_redirect (rtx, int, int);
static void sh_reorg PARAMS ((void)); static void sh_reorg (void);
static void output_stack_adjust (int, rtx, int, HARD_REG_SET *); static void output_stack_adjust (int, rtx, int, HARD_REG_SET *);
static rtx frame_insn PARAMS ((rtx)); static rtx frame_insn (rtx);
static rtx push PARAMS ((int)); static rtx push (int);
static void pop PARAMS ((int)); static void pop (int);
static void push_regs PARAMS ((HARD_REG_SET *, int)); static void push_regs (HARD_REG_SET *, int);
static int calc_live_regs PARAMS ((HARD_REG_SET *)); static int calc_live_regs (HARD_REG_SET *);
static void mark_use PARAMS ((rtx, rtx *)); static void mark_use (rtx, rtx *);
static HOST_WIDE_INT rounded_frame_size PARAMS ((int)); static HOST_WIDE_INT rounded_frame_size (int);
static rtx mark_constant_pool_use PARAMS ((rtx)); static rtx mark_constant_pool_use (rtx);
const struct attribute_spec sh_attribute_table[]; const struct attribute_spec sh_attribute_table[];
static tree sh_handle_interrupt_handler_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree sh_handle_interrupt_handler_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_sp_switch_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree sh_handle_sp_switch_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_trap_exit_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree sh_handle_trap_exit_attribute (tree *, tree, tree, int, bool *);
static tree sh_handle_renesas_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree sh_handle_renesas_attribute (tree *, tree, tree, int, bool *);
static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT);
static void sh_insert_attributes PARAMS ((tree, tree *)); static void sh_insert_attributes (tree, tree *);
static int sh_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int sh_adjust_cost (rtx, rtx, rtx, int);
static int sh_use_dfa_interface PARAMS ((void)); static int sh_use_dfa_interface (void);
static int sh_issue_rate PARAMS ((void)); static int sh_issue_rate (void);
static bool sh_function_ok_for_sibcall PARAMS ((tree, tree)); static bool sh_function_ok_for_sibcall (tree, tree);
static bool sh_cannot_modify_jumps_p PARAMS ((void)); static bool sh_cannot_modify_jumps_p (void);
static int sh_target_reg_class (void); static int sh_target_reg_class (void);
static bool sh_optimize_target_register_callee_saved (bool); static bool sh_optimize_target_register_callee_saved (bool);
static bool sh_ms_bitfield_layout_p PARAMS ((tree)); static bool sh_ms_bitfield_layout_p (tree);
static void sh_init_builtins PARAMS ((void)); static void sh_init_builtins (void);
static void sh_media_init_builtins PARAMS ((void)); static void sh_media_init_builtins (void);
static rtx sh_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); static rtx sh_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
static void sh_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, static void sh_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
HOST_WIDE_INT, tree)); static void sh_file_start (void);
static void sh_file_start PARAMS ((void)); static int flow_dependent_p (rtx, rtx);
static int flow_dependent_p PARAMS ((rtx, rtx)); static void flow_dependent_p_1 (rtx, rtx, void *);
static void flow_dependent_p_1 PARAMS ((rtx, rtx, void *)); static int shiftcosts (rtx);
static int shiftcosts PARAMS ((rtx)); static int andcosts (rtx);
static int andcosts PARAMS ((rtx)); static int addsubcosts (rtx);
static int addsubcosts PARAMS ((rtx)); static int multcosts (rtx);
static int multcosts PARAMS ((rtx)); static bool unspec_caller_rtx_p (rtx);
static bool unspec_caller_rtx_p PARAMS ((rtx)); static bool sh_cannot_copy_insn_p (rtx);
static bool sh_cannot_copy_insn_p PARAMS ((rtx)); static bool sh_rtx_costs (rtx, int, int, int *);
static bool sh_rtx_costs PARAMS ((rtx, int, int, int *)); static int sh_address_cost (rtx);
static int sh_address_cost PARAMS ((rtx));
static int shmedia_target_regs_stack_space (HARD_REG_SET *); static int shmedia_target_regs_stack_space (HARD_REG_SET *);
static int shmedia_reserve_space_for_target_registers_p (int, HARD_REG_SET *); static int shmedia_reserve_space_for_target_registers_p (int, HARD_REG_SET *);
static int shmedia_target_regs_stack_adjust (HARD_REG_SET *); static int shmedia_target_regs_stack_adjust (HARD_REG_SET *);
...@@ -240,13 +239,13 @@ struct save_schedule_s; ...@@ -240,13 +239,13 @@ struct save_schedule_s;
static struct save_entry_s *sh5_schedule_saves (HARD_REG_SET *, static struct save_entry_s *sh5_schedule_saves (HARD_REG_SET *,
struct save_schedule_s *, int); struct save_schedule_s *, int);
static bool sh_promote_prototypes PARAMS ((tree)); static bool sh_promote_prototypes (tree);
static rtx sh_struct_value_rtx PARAMS ((tree, int)); static rtx sh_struct_value_rtx (tree, int);
static bool sh_return_in_memory PARAMS ((tree, tree)); static bool sh_return_in_memory (tree, tree);
static rtx sh_builtin_saveregs PARAMS ((void)); static rtx sh_builtin_saveregs (void);
static void sh_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int)); static void sh_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
static bool sh_strict_argument_naming PARAMS ((CUMULATIVE_ARGS *)); static bool sh_strict_argument_naming (CUMULATIVE_ARGS *);
static bool sh_pretend_outgoing_varargs_named PARAMS ((CUMULATIVE_ARGS *)); static bool sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *);
/* Initialize the GCC target structure. */ /* Initialize the GCC target structure. */
...@@ -351,9 +350,7 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -351,9 +350,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
/* Print the operand address in x to the stream. */ /* Print the operand address in x to the stream. */
void void
print_operand_address (stream, x) print_operand_address (FILE *stream, rtx x)
FILE *stream;
rtx x;
{ {
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -426,10 +423,7 @@ print_operand_address (stream, x) ...@@ -426,10 +423,7 @@ print_operand_address (stream, x)
'o' output an operator. */ 'o' output an operator. */
void void
print_operand (stream, x, code) print_operand (FILE *stream, rtx x, int code)
FILE *stream;
rtx x;
int code;
{ {
switch (code) switch (code)
{ {
...@@ -638,8 +632,7 @@ print_operand (stream, x, code) ...@@ -638,8 +632,7 @@ print_operand (stream, x, code)
/* Like force_operand, but guarantees that VALUE ends up in TARGET. */ /* Like force_operand, but guarantees that VALUE ends up in TARGET. */
static void static void
force_into (value, target) force_into (rtx value, rtx target)
rtx value, target;
{ {
value = force_operand (value, target); value = force_operand (value, target);
if (! rtx_equal_p (value, target)) if (! rtx_equal_p (value, target))
...@@ -654,8 +647,7 @@ force_into (value, target) ...@@ -654,8 +647,7 @@ force_into (value, target)
OPERANDS[3] is the alignment safe to use. */ OPERANDS[3] is the alignment safe to use. */
int int
expand_block_move (operands) expand_block_move (rtx *operands)
rtx *operands;
{ {
int align = INTVAL (operands[3]); int align = INTVAL (operands[3]);
int constp = (GET_CODE (operands[2]) == CONST_INT); int constp = (GET_CODE (operands[2]) == CONST_INT);
...@@ -770,9 +762,7 @@ expand_block_move (operands) ...@@ -770,9 +762,7 @@ expand_block_move (operands)
operands must be in a register. */ operands must be in a register. */
int int
prepare_move_operands (operands, mode) prepare_move_operands (rtx operands[], enum machine_mode mode)
rtx operands[];
enum machine_mode mode;
{ {
if ((mode == SImode || mode == DImode) if ((mode == SImode || mode == DImode)
&& flag_pic && flag_pic
...@@ -909,8 +899,7 @@ prepare_move_operands (operands, mode) ...@@ -909,8 +899,7 @@ prepare_move_operands (operands, mode)
/* Prepare the operands for an scc instruction; make sure that the /* Prepare the operands for an scc instruction; make sure that the
compare has been done. */ compare has been done. */
rtx rtx
prepare_scc_operands (code) prepare_scc_operands (enum rtx_code code)
enum rtx_code code;
{ {
rtx t_reg = gen_rtx_REG (SImode, T_REG); rtx t_reg = gen_rtx_REG (SImode, T_REG);
enum rtx_code oldcode = code; enum rtx_code oldcode = code;
...@@ -974,9 +963,7 @@ prepare_scc_operands (code) ...@@ -974,9 +963,7 @@ prepare_scc_operands (code)
/* Called from the md file, set up the operands of a compare instruction. */ /* Called from the md file, set up the operands of a compare instruction. */
void void
from_compare (operands, code) from_compare (rtx *operands, int code)
rtx *operands;
int code;
{ {
enum machine_mode mode = GET_MODE (sh_compare_op0); enum machine_mode mode = GET_MODE (sh_compare_op0);
rtx insn; rtx insn;
...@@ -1022,10 +1009,8 @@ from_compare (operands, code) ...@@ -1022,10 +1009,8 @@ from_compare (operands, code)
to take care when we see overlapping source and dest registers. */ to take care when we see overlapping source and dest registers. */
const char * const char *
output_movedouble (insn, operands, mode) output_movedouble (rtx insn ATTRIBUTE_UNUSED, rtx operands[],
rtx insn ATTRIBUTE_UNUSED; enum machine_mode mode)
rtx operands[];
enum machine_mode mode;
{ {
rtx dst = operands[0]; rtx dst = operands[0];
rtx src = operands[1]; rtx src = operands[1];
...@@ -1100,8 +1085,7 @@ output_movedouble (insn, operands, mode) ...@@ -1100,8 +1085,7 @@ output_movedouble (insn, operands, mode)
into a sequence where putting the slot insn at the end wouldn't work. */ into a sequence where putting the slot insn at the end wouldn't work. */
static void static void
print_slot (insn) print_slot (rtx insn)
rtx insn;
{ {
final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1); final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1);
...@@ -1109,9 +1093,7 @@ print_slot (insn) ...@@ -1109,9 +1093,7 @@ print_slot (insn)
} }
const char * const char *
output_far_jump (insn, op) output_far_jump (rtx insn, rtx op)
rtx insn;
rtx op;
{ {
struct { rtx lab, reg, op; } this; struct { rtx lab, reg, op; } this;
rtx braf_base_lab = NULL_RTX; rtx braf_base_lab = NULL_RTX;
...@@ -1205,10 +1187,7 @@ static int lf = 100; ...@@ -1205,10 +1187,7 @@ static int lf = 100;
/* Output code for ordinary branches. */ /* Output code for ordinary branches. */
const char * const char *
output_branch (logic, insn, operands) output_branch (int logic, rtx insn, rtx *operands)
int logic;
rtx insn;
rtx *operands;
{ {
switch (get_attr_length (insn)) switch (get_attr_length (insn))
{ {
...@@ -1293,11 +1272,8 @@ output_branch (logic, insn, operands) ...@@ -1293,11 +1272,8 @@ output_branch (logic, insn, operands)
} }
const char * const char *
output_branchy_insn (code, template, insn, operands) output_branchy_insn (enum rtx_code code, const char *template,
enum rtx_code code; rtx insn, rtx *operands)
const char *template;
rtx insn;
rtx *operands;
{ {
rtx next_insn = NEXT_INSN (insn); rtx next_insn = NEXT_INSN (insn);
...@@ -1337,8 +1313,7 @@ output_branchy_insn (code, template, insn, operands) ...@@ -1337,8 +1313,7 @@ output_branchy_insn (code, template, insn, operands)
} }
const char * const char *
output_ieee_ccmpeq (insn, operands) output_ieee_ccmpeq (rtx insn, rtx *operands)
rtx insn, *operands;
{ {
return output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands); return output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands);
} }
...@@ -1346,7 +1321,7 @@ output_ieee_ccmpeq (insn, operands) ...@@ -1346,7 +1321,7 @@ output_ieee_ccmpeq (insn, operands)
/* Output the start of the assembler file. */ /* Output the start of the assembler file. */
static void static void
sh_file_start () sh_file_start (void)
{ {
default_file_start (); default_file_start ();
...@@ -1380,8 +1355,7 @@ sh_file_start () ...@@ -1380,8 +1355,7 @@ sh_file_start ()
/* Check if PAT includes UNSPEC_CALLER unspec pattern. */ /* Check if PAT includes UNSPEC_CALLER unspec pattern. */
static bool static bool
unspec_caller_rtx_p (pat) unspec_caller_rtx_p (rtx pat)
rtx pat;
{ {
switch (GET_CODE (pat)) switch (GET_CODE (pat))
{ {
...@@ -1406,8 +1380,7 @@ unspec_caller_rtx_p (pat) ...@@ -1406,8 +1380,7 @@ unspec_caller_rtx_p (pat)
that generates an unique label. */ that generates an unique label. */
static bool static bool
sh_cannot_copy_insn_p (insn) sh_cannot_copy_insn_p (rtx insn)
rtx insn;
{ {
rtx pat; rtx pat;
...@@ -1478,8 +1451,7 @@ static const short ext_shift_amounts[32][4] = { ...@@ -1478,8 +1451,7 @@ static const short ext_shift_amounts[32][4] = {
of arbitrary constant shift instructions. */ of arbitrary constant shift instructions. */
int int
shift_insns_rtx (insn) shift_insns_rtx (rtx insn)
rtx insn;
{ {
rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0)); rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
int shift_count = INTVAL (XEXP (set_src, 1)); int shift_count = INTVAL (XEXP (set_src, 1));
...@@ -1500,8 +1472,7 @@ shift_insns_rtx (insn) ...@@ -1500,8 +1472,7 @@ shift_insns_rtx (insn)
/* Return the cost of a shift. */ /* Return the cost of a shift. */
static inline int static inline int
shiftcosts (x) shiftcosts (rtx x)
rtx x;
{ {
int value; int value;
...@@ -1540,8 +1511,7 @@ shiftcosts (x) ...@@ -1540,8 +1511,7 @@ shiftcosts (x)
/* Return the cost of an AND operation. */ /* Return the cost of an AND operation. */
static inline int static inline int
andcosts (x) andcosts (rtx x)
rtx x;
{ {
int i; int i;
...@@ -1580,8 +1550,7 @@ andcosts (x) ...@@ -1580,8 +1550,7 @@ andcosts (x)
/* Return the cost of an addition or a subtraction. */ /* Return the cost of an addition or a subtraction. */
static inline int static inline int
addsubcosts (x) addsubcosts (rtx x)
rtx x;
{ {
/* Adding a register is a single cycle insn. */ /* Adding a register is a single cycle insn. */
if (GET_CODE (XEXP (x, 1)) == REG if (GET_CODE (XEXP (x, 1)) == REG
...@@ -1621,8 +1590,7 @@ addsubcosts (x) ...@@ -1621,8 +1590,7 @@ addsubcosts (x)
/* Return the cost of a multiply. */ /* Return the cost of a multiply. */
static inline int static inline int
multcosts (x) multcosts (rtx x ATTRIBUTE_UNUSED)
rtx x ATTRIBUTE_UNUSED;
{ {
if (TARGET_SHMEDIA) if (TARGET_SHMEDIA)
return 3; return 3;
...@@ -1651,9 +1619,7 @@ multcosts (x) ...@@ -1651,9 +1619,7 @@ multcosts (x)
scanned. In either case, *TOTAL contains the cost result. */ scanned. In either case, *TOTAL contains the cost result. */
static bool static bool
sh_rtx_costs (x, code, outer_code, total) sh_rtx_costs (rtx x, int code, int outer_code, int *total)
rtx x;
int code, outer_code, *total;
{ {
switch (code) switch (code)
{ {
...@@ -1745,8 +1711,7 @@ sh_rtx_costs (x, code, outer_code, total) ...@@ -1745,8 +1711,7 @@ sh_rtx_costs (x, code, outer_code, total)
since it increases pressure on r0. */ since it increases pressure on r0. */
static int static int
sh_address_cost (X) sh_address_cost (rtx X)
rtx X;
{ {
return (GET_CODE (X) == PLUS return (GET_CODE (X) == PLUS
&& ! CONSTANT_P (XEXP (X, 1)) && ! CONSTANT_P (XEXP (X, 1))
...@@ -1756,10 +1721,7 @@ sh_address_cost (X) ...@@ -1756,10 +1721,7 @@ sh_address_cost (X)
/* Code to expand a shift. */ /* Code to expand a shift. */
void void
gen_ashift (type, n, reg) gen_ashift (int type, int n, rtx reg)
int type;
int n;
rtx reg;
{ {
/* Negative values here come from the shift_amounts array. */ /* Negative values here come from the shift_amounts array. */
if (n < 0) if (n < 0)
...@@ -1791,10 +1753,7 @@ gen_ashift (type, n, reg) ...@@ -1791,10 +1753,7 @@ gen_ashift (type, n, reg)
/* Same for HImode */ /* Same for HImode */
void void
gen_ashift_hi (type, n, reg) gen_ashift_hi (int type, int n, rtx reg)
int type;
int n;
rtx reg;
{ {
/* Negative values here come from the shift_amounts array. */ /* Negative values here come from the shift_amounts array. */
if (n < 0) if (n < 0)
...@@ -1835,9 +1794,7 @@ gen_ashift_hi (type, n, reg) ...@@ -1835,9 +1794,7 @@ gen_ashift_hi (type, n, reg)
shift instructions. */ shift instructions. */
void void
gen_shifty_op (code, operands) gen_shifty_op (int code, rtx *operands)
int code;
rtx *operands;
{ {
int value = INTVAL (operands[2]); int value = INTVAL (operands[2]);
int max, i; int max, i;
...@@ -1883,13 +1840,11 @@ gen_shifty_op (code, operands) ...@@ -1883,13 +1840,11 @@ gen_shifty_op (code, operands)
matter. */ matter. */
void void
gen_shifty_hi_op (code, operands) gen_shifty_hi_op (int code, rtx *operands)
int code;
rtx *operands;
{ {
int value = INTVAL (operands[2]); int value = INTVAL (operands[2]);
int max, i; int max, i;
void (*gen_fun) PARAMS ((int, int, rtx)); void (*gen_fun) (int, int, rtx);
/* This operation is used by and_shl for SImode values with a few /* This operation is used by and_shl for SImode values with a few
high bits known to be cleared. */ high bits known to be cleared. */
...@@ -1919,8 +1874,7 @@ gen_shifty_hi_op (code, operands) ...@@ -1919,8 +1874,7 @@ gen_shifty_hi_op (code, operands)
/* ??? Rewrite to use super-optimizer sequences. */ /* ??? Rewrite to use super-optimizer sequences. */
int int
expand_ashiftrt (operands) expand_ashiftrt (rtx *operands)
rtx *operands;
{ {
rtx sym; rtx sym;
rtx wrk; rtx wrk;
...@@ -1991,8 +1945,7 @@ expand_ashiftrt (operands) ...@@ -1991,8 +1945,7 @@ expand_ashiftrt (operands)
} }
int int
sh_dynamicalize_shift_p (count) sh_dynamicalize_shift_p (rtx count)
rtx count;
{ {
return shift_insns[INTVAL (count)] > 1 + SH_DYNAMIC_SHIFT_COST; return shift_insns[INTVAL (count)] > 1 + SH_DYNAMIC_SHIFT_COST;
} }
...@@ -2018,9 +1971,7 @@ sh_dynamicalize_shift_p (count) ...@@ -2018,9 +1971,7 @@ sh_dynamicalize_shift_p (count)
shift_amounts for the last shift value that is to be used before the shift_amounts for the last shift value that is to be used before the
sign extend. */ sign extend. */
int int
shl_and_kind (left_rtx, mask_rtx, attrp) shl_and_kind (rtx left_rtx, rtx mask_rtx, int *attrp)
rtx left_rtx, mask_rtx;
int *attrp;
{ {
unsigned HOST_WIDE_INT mask, lsb, mask2, lsb2; unsigned HOST_WIDE_INT mask, lsb, mask2, lsb2;
int left = INTVAL (left_rtx), right; int left = INTVAL (left_rtx), right;
...@@ -2138,8 +2089,7 @@ shl_and_kind (left_rtx, mask_rtx, attrp) ...@@ -2138,8 +2089,7 @@ shl_and_kind (left_rtx, mask_rtx, attrp)
/* This is used in length attributes of the unnamed instructions /* This is used in length attributes of the unnamed instructions
corresponding to shl_and_kind return values of 1 and 2. */ corresponding to shl_and_kind return values of 1 and 2. */
int int
shl_and_length (insn) shl_and_length (rtx insn)
rtx insn;
{ {
rtx set_src, left_rtx, mask_rtx; rtx set_src, left_rtx, mask_rtx;
int attributes[3]; int attributes[3];
...@@ -2154,8 +2104,7 @@ shl_and_length (insn) ...@@ -2154,8 +2104,7 @@ shl_and_length (insn)
/* This is used in length attribute of the and_shl_scratch instruction. */ /* This is used in length attribute of the and_shl_scratch instruction. */
int int
shl_and_scr_length (insn) shl_and_scr_length (rtx insn)
rtx insn;
{ {
rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0)); rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
int len = shift_insns[INTVAL (XEXP (set_src, 1))]; int len = shift_insns[INTVAL (XEXP (set_src, 1))];
...@@ -2172,14 +2121,13 @@ extern int rtx_equal_function_value_matters; ...@@ -2172,14 +2121,13 @@ extern int rtx_equal_function_value_matters;
method of generating them, i.e. returned zero. */ method of generating them, i.e. returned zero. */
int int
gen_shl_and (dest, left_rtx, mask_rtx, source) gen_shl_and (rtx dest, rtx left_rtx, rtx mask_rtx, rtx source)
rtx dest, left_rtx, mask_rtx, source;
{ {
int attributes[3]; int attributes[3];
unsigned HOST_WIDE_INT mask; unsigned HOST_WIDE_INT mask;
int kind = shl_and_kind (left_rtx, mask_rtx, attributes); int kind = shl_and_kind (left_rtx, mask_rtx, attributes);
int right, total_shift; int right, total_shift;
void (*shift_gen_fun) PARAMS ((int, rtx*)) = gen_shifty_hi_op; void (*shift_gen_fun) (int, rtx*) = gen_shifty_hi_op;
right = attributes[0]; right = attributes[0];
total_shift = INTVAL (left_rtx) + right; total_shift = INTVAL (left_rtx) + right;
...@@ -2305,9 +2253,7 @@ gen_shl_and (dest, left_rtx, mask_rtx, source) ...@@ -2305,9 +2253,7 @@ gen_shl_and (dest, left_rtx, mask_rtx, source)
If COSTP is nonzero, assign the calculated cost to *COSTP. */ If COSTP is nonzero, assign the calculated cost to *COSTP. */
int int
shl_sext_kind (left_rtx, size_rtx, costp) shl_sext_kind (rtx left_rtx, rtx size_rtx, int *costp)
rtx left_rtx, size_rtx;
int *costp;
{ {
int left, size, insize, ext; int left, size, insize, ext;
int cost = 0, best_cost; int cost = 0, best_cost;
...@@ -2401,8 +2347,7 @@ shl_sext_kind (left_rtx, size_rtx, costp) ...@@ -2401,8 +2347,7 @@ shl_sext_kind (left_rtx, size_rtx, costp)
implementing this pattern. */ implementing this pattern. */
int int
shl_sext_length (insn) shl_sext_length (rtx insn)
rtx insn;
{ {
rtx set_src, left_rtx, size_rtx; rtx set_src, left_rtx, size_rtx;
int cost; int cost;
...@@ -2417,8 +2362,7 @@ shl_sext_length (insn) ...@@ -2417,8 +2362,7 @@ shl_sext_length (insn)
/* Generate rtl for this pattern */ /* Generate rtl for this pattern */
int int
gen_shl_sext (dest, left_rtx, size_rtx, source) gen_shl_sext (rtx dest, rtx left_rtx, rtx size_rtx, rtx source)
rtx dest, left_rtx, size_rtx, source;
{ {
int kind; int kind;
int left, size, insize, cost; int left, size, insize, cost;
...@@ -2539,8 +2483,7 @@ gen_shl_sext (dest, left_rtx, size_rtx, source) ...@@ -2539,8 +2483,7 @@ gen_shl_sext (dest, left_rtx, size_rtx, source)
/* Prefix a symbol_ref name with "datalabel". */ /* Prefix a symbol_ref name with "datalabel". */
rtx rtx
gen_datalabel_ref (sym) gen_datalabel_ref (rtx sym)
rtx sym;
{ {
if (GET_CODE (sym) == LABEL_REF) if (GET_CODE (sym) == LABEL_REF)
return gen_rtx_CONST (GET_MODE (sym), return gen_rtx_CONST (GET_MODE (sym),
...@@ -2643,10 +2586,7 @@ static int pool_window_last; ...@@ -2643,10 +2586,7 @@ static int pool_window_last;
/* Add a constant to the pool and return its label. */ /* Add a constant to the pool and return its label. */
static rtx static rtx
add_constant (x, mode, last_value) add_constant (rtx x, enum machine_mode mode, rtx last_value)
rtx x;
enum machine_mode mode;
rtx last_value;
{ {
int i; int i;
rtx lab, new, ref, newref; rtx lab, new, ref, newref;
...@@ -2718,8 +2658,7 @@ add_constant (x, mode, last_value) ...@@ -2718,8 +2658,7 @@ add_constant (x, mode, last_value)
/* Output the literal table. */ /* Output the literal table. */
static void static void
dump_table (scan) dump_table (rtx scan)
rtx scan;
{ {
int i; int i;
int need_align = 1; int need_align = 1;
...@@ -2890,8 +2829,7 @@ dump_table (scan) ...@@ -2890,8 +2829,7 @@ dump_table (scan)
mov.w instead of a mov.l. */ mov.w instead of a mov.l. */
static int static int
hi_const (src) hi_const (rtx src)
rtx src;
{ {
return (GET_CODE (src) == CONST_INT return (GET_CODE (src) == CONST_INT
&& INTVAL (src) >= -32768 && INTVAL (src) >= -32768
...@@ -2905,8 +2843,7 @@ hi_const (src) ...@@ -2905,8 +2843,7 @@ hi_const (src)
need to fix it if the input value is CONST_OK_FOR_I08. */ need to fix it if the input value is CONST_OK_FOR_I08. */
static int static int
broken_move (insn) broken_move (rtx insn)
rtx insn;
{ {
if (GET_CODE (insn) == INSN) if (GET_CODE (insn) == INSN)
{ {
...@@ -2947,8 +2884,7 @@ broken_move (insn) ...@@ -2947,8 +2884,7 @@ broken_move (insn)
} }
static int static int
mova_p (insn) mova_p (rtx insn)
rtx insn;
{ {
return (GET_CODE (insn) == INSN return (GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == SET && GET_CODE (PATTERN (insn)) == SET
...@@ -2963,9 +2899,7 @@ mova_p (insn) ...@@ -2963,9 +2899,7 @@ mova_p (insn)
the range. */ the range. */
static rtx static rtx
find_barrier (num_mova, mova, from) find_barrier (int num_mova, rtx mova, rtx from)
int num_mova;
rtx mova, from;
{ {
int count_si = 0; int count_si = 0;
int count_hi = 0; int count_hi = 0;
...@@ -3207,8 +3141,7 @@ find_barrier (num_mova, mova, from) ...@@ -3207,8 +3141,7 @@ find_barrier (num_mova, mova, from)
register is not used anywhere else in this instruction - except as the register is not used anywhere else in this instruction - except as the
destination of a set, return this register; else, return 0. */ destination of a set, return this register; else, return 0. */
rtx rtx
sfunc_uses_reg (insn) sfunc_uses_reg (rtx insn)
rtx insn;
{ {
int i; int i;
rtx pattern, part, reg_part, reg; rtx pattern, part, reg_part, reg;
...@@ -3246,10 +3179,7 @@ sfunc_uses_reg (insn) ...@@ -3246,10 +3179,7 @@ sfunc_uses_reg (insn)
is set by INSN. */ is set by INSN. */
static int static int
noncall_uses_reg (reg, insn, set) noncall_uses_reg (rtx reg, rtx insn, rtx *set)
rtx reg;
rtx insn;
rtx *set;
{ {
rtx pattern, reg2; rtx pattern, reg2;
...@@ -3334,8 +3264,7 @@ noncall_uses_reg (reg, insn, set) ...@@ -3334,8 +3264,7 @@ noncall_uses_reg (reg, insn, set)
registers 0..15, respectively, are used as outputs, or are clobbered. registers 0..15, respectively, are used as outputs, or are clobbered.
IS_DEST should be set to 16 if X is the destination of a SET, else to 0. */ IS_DEST should be set to 16 if X is the destination of a SET, else to 0. */
int int
regs_used (x, is_dest) regs_used (rtx x, int is_dest)
rtx x; int is_dest;
{ {
enum rtx_code code; enum rtx_code code;
const char *fmt; const char *fmt;
...@@ -3411,9 +3340,7 @@ regs_used (x, is_dest) ...@@ -3411,9 +3340,7 @@ regs_used (x, is_dest)
If a blocking instruction is made or recognized, return it. */ If a blocking instruction is made or recognized, return it. */
static rtx static rtx
gen_block_redirect (jump, addr, need_block) gen_block_redirect (rtx jump, int addr, int need_block)
rtx jump;
int addr, need_block;
{ {
int dead = 0; int dead = 0;
rtx prev = prev_nonnote_insn (jump); rtx prev = prev_nonnote_insn (jump);
...@@ -3572,11 +3499,10 @@ struct far_branch ...@@ -3572,11 +3499,10 @@ struct far_branch
int address; int address;
}; };
static void gen_far_branch PARAMS ((struct far_branch *)); static void gen_far_branch (struct far_branch *);
enum mdep_reorg_phase_e mdep_reorg_phase; enum mdep_reorg_phase_e mdep_reorg_phase;
static void static void
gen_far_branch (bp) gen_far_branch (struct far_branch *bp)
struct far_branch *bp;
{ {
rtx insn = bp->insert_place; rtx insn = bp->insert_place;
rtx jump; rtx jump;
...@@ -3612,8 +3538,7 @@ gen_far_branch (bp) ...@@ -3612,8 +3538,7 @@ gen_far_branch (bp)
/* Fix up ADDR_DIFF_VECs. */ /* Fix up ADDR_DIFF_VECs. */
void void
fixup_addr_diff_vecs (first) fixup_addr_diff_vecs (rtx first)
rtx first;
{ {
rtx insn; rtx insn;
...@@ -3657,8 +3582,7 @@ fixup_addr_diff_vecs (first) ...@@ -3657,8 +3582,7 @@ fixup_addr_diff_vecs (first)
/* BARRIER_OR_LABEL is either a BARRIER or a CODE_LABEL immediately following /* BARRIER_OR_LABEL is either a BARRIER or a CODE_LABEL immediately following
a barrier. Return the base 2 logarithm of the desired alignment. */ a barrier. Return the base 2 logarithm of the desired alignment. */
int int
barrier_align (barrier_or_label) barrier_align (rtx barrier_or_label)
rtx barrier_or_label;
{ {
rtx next = next_real_insn (barrier_or_label), pat, prev; rtx next = next_real_insn (barrier_or_label), pat, prev;
int slot, credit, jump_to_next = 0; int slot, credit, jump_to_next = 0;
...@@ -3778,8 +3702,7 @@ barrier_align (barrier_or_label) ...@@ -3778,8 +3702,7 @@ barrier_align (barrier_or_label)
Applying loop alignment to small constant or switch tables is a waste Applying loop alignment to small constant or switch tables is a waste
of space, so we suppress this too. */ of space, so we suppress this too. */
int int
sh_loop_align (label) sh_loop_align (rtx label)
rtx label;
{ {
rtx next = label; rtx next = label;
...@@ -3800,7 +3723,7 @@ sh_loop_align (label) ...@@ -3800,7 +3723,7 @@ sh_loop_align (label)
scheduling. */ scheduling. */
static void static void
sh_reorg () sh_reorg (void)
{ {
rtx first, insn, mova = NULL_RTX; rtx first, insn, mova = NULL_RTX;
int num_mova; int num_mova;
...@@ -4253,9 +4176,7 @@ sh_reorg () ...@@ -4253,9 +4176,7 @@ sh_reorg ()
} }
int int
get_dest_uid (label, max_uid) get_dest_uid (rtx label, int max_uid)
rtx label;
int max_uid;
{ {
rtx dest = next_real_insn (label); rtx dest = next_real_insn (label);
int dest_uid; int dest_uid;
...@@ -4284,8 +4205,7 @@ get_dest_uid (label, max_uid) ...@@ -4284,8 +4205,7 @@ get_dest_uid (label, max_uid)
find branches with common targets more easily. */ find branches with common targets more easily. */
static void static void
split_branches (first) split_branches (rtx first)
rtx first;
{ {
rtx insn; rtx insn;
struct far_branch **uid_branch, *far_branch_list = 0; struct far_branch **uid_branch, *far_branch_list = 0;
...@@ -4509,10 +4429,8 @@ split_branches (first) ...@@ -4509,10 +4429,8 @@ split_branches (first)
does not bother to update them. */ does not bother to update them. */
void void
final_prescan_insn (insn, opvec, noperands) final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED,
rtx insn; int noperands ATTRIBUTE_UNUSED)
rtx *opvec ATTRIBUTE_UNUSED;
int noperands ATTRIBUTE_UNUSED;
{ {
if (TARGET_DUMPISIZE) if (TARGET_DUMPISIZE)
fprintf (asm_out_file, "\n! at %04x\n", INSN_ADDRESSES (INSN_UID (insn))); fprintf (asm_out_file, "\n! at %04x\n", INSN_ADDRESSES (INSN_UID (insn)));
...@@ -4548,7 +4466,7 @@ final_prescan_insn (insn, opvec, noperands) ...@@ -4548,7 +4466,7 @@ final_prescan_insn (insn, opvec, noperands)
only be labels. */ only be labels. */
const char * const char *
output_jump_label_table () output_jump_label_table (void)
{ {
int i; int i;
...@@ -4691,8 +4609,7 @@ output_stack_adjust (int size, rtx reg, int epilogue_p, ...@@ -4691,8 +4609,7 @@ output_stack_adjust (int size, rtx reg, int epilogue_p,
} }
static rtx static rtx
frame_insn (x) frame_insn (rtx x)
rtx x;
{ {
x = emit_insn (x); x = emit_insn (x);
RTX_FRAME_RELATED_P (x) = 1; RTX_FRAME_RELATED_P (x) = 1;
...@@ -4702,8 +4619,7 @@ frame_insn (x) ...@@ -4702,8 +4619,7 @@ frame_insn (x)
/* Output RTL to push register RN onto the stack. */ /* Output RTL to push register RN onto the stack. */
static rtx static rtx
push (rn) push (int rn)
int rn;
{ {
rtx x; rtx x;
if (rn == FPUL_REG) if (rn == FPUL_REG)
...@@ -4732,8 +4648,7 @@ push (rn) ...@@ -4732,8 +4648,7 @@ push (rn)
/* Output RTL to pop register RN from the stack. */ /* Output RTL to pop register RN from the stack. */
static void static void
pop (rn) pop (int rn)
int rn;
{ {
rtx x; rtx x;
if (rn == FPUL_REG) if (rn == FPUL_REG)
...@@ -4761,9 +4676,7 @@ pop (rn) ...@@ -4761,9 +4676,7 @@ pop (rn)
/* Generate code to push the regs specified in the mask. */ /* Generate code to push the regs specified in the mask. */
static void static void
push_regs (mask, interrupt_handler) push_regs (HARD_REG_SET *mask, int interrupt_handler)
HARD_REG_SET *mask;
int interrupt_handler;
{ {
int i; int i;
int skip_fpscr = 0; int skip_fpscr = 0;
...@@ -4850,8 +4763,7 @@ shmedia_target_regs_stack_adjust (HARD_REG_SET *live_regs_mask) ...@@ -4850,8 +4763,7 @@ shmedia_target_regs_stack_adjust (HARD_REG_SET *live_regs_mask)
make sure that all the regs it clobbers are safe too. */ make sure that all the regs it clobbers are safe too. */
static int static int
calc_live_regs (live_regs_mask) calc_live_regs (HARD_REG_SET *live_regs_mask)
HARD_REG_SET *live_regs_mask;
{ {
int reg; int reg;
int count; int count;
...@@ -4993,8 +4905,7 @@ calc_live_regs (live_regs_mask) ...@@ -4993,8 +4905,7 @@ calc_live_regs (live_regs_mask)
stack for register saves. Return the frame size, padded stack for register saves. Return the frame size, padded
appropriately so that the stack stays properly aligned. */ appropriately so that the stack stays properly aligned. */
static HOST_WIDE_INT static HOST_WIDE_INT
rounded_frame_size (pushed) rounded_frame_size (int pushed)
int pushed;
{ {
HOST_WIDE_INT size = get_frame_size (); HOST_WIDE_INT size = get_frame_size ();
HOST_WIDE_INT align = STACK_BOUNDARY / BITS_PER_UNIT; HOST_WIDE_INT align = STACK_BOUNDARY / BITS_PER_UNIT;
...@@ -5006,7 +4917,7 @@ rounded_frame_size (pushed) ...@@ -5006,7 +4917,7 @@ rounded_frame_size (pushed)
unchanged along the whole function. We set it up as the return unchanged along the whole function. We set it up as the return
value in the prologue. */ value in the prologue. */
int int
sh_media_register_for_return () sh_media_register_for_return (void)
{ {
int regno; int regno;
int tr0_used; int tr0_used;
...@@ -5151,7 +5062,7 @@ sh5_schedule_saves (HARD_REG_SET *live_regs_mask, save_schedule *schedule, ...@@ -5151,7 +5062,7 @@ sh5_schedule_saves (HARD_REG_SET *live_regs_mask, save_schedule *schedule,
} }
void void
sh_expand_prologue () sh_expand_prologue (void)
{ {
HARD_REG_SET live_regs_mask; HARD_REG_SET live_regs_mask;
int d, i; int d, i;
...@@ -5510,7 +5421,7 @@ sh_expand_prologue () ...@@ -5510,7 +5421,7 @@ sh_expand_prologue ()
} }
void void
sh_expand_epilogue () sh_expand_epilogue (void)
{ {
HARD_REG_SET live_regs_mask; HARD_REG_SET live_regs_mask;
int d, i; int d, i;
...@@ -5763,7 +5674,7 @@ sh_expand_epilogue () ...@@ -5763,7 +5674,7 @@ sh_expand_epilogue ()
static int sh_need_epilogue_known = 0; static int sh_need_epilogue_known = 0;
int int
sh_need_epilogue () sh_need_epilogue (void)
{ {
if (! sh_need_epilogue_known) if (! sh_need_epilogue_known)
{ {
...@@ -5782,8 +5693,7 @@ sh_need_epilogue () ...@@ -5782,8 +5693,7 @@ sh_need_epilogue ()
TEMP is available as a scratch register, if needed. */ TEMP is available as a scratch register, if needed. */
void void
sh_set_return_address (ra, tmp) sh_set_return_address (rtx ra, rtx tmp)
rtx ra, tmp;
{ {
HARD_REG_SET live_regs_mask; HARD_REG_SET live_regs_mask;
int d; int d;
...@@ -5849,9 +5759,8 @@ sh_set_return_address (ra, tmp) ...@@ -5849,9 +5759,8 @@ sh_set_return_address (ra, tmp)
/* Clear variables at function end. */ /* Clear variables at function end. */
static void static void
sh_output_function_epilogue (file, size) sh_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
FILE *file ATTRIBUTE_UNUSED; HOST_WIDE_INT size ATTRIBUTE_UNUSED)
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{ {
trap_exit = pragma_interrupt = pragma_trapa = pragma_nosave_low_regs = 0; trap_exit = pragma_interrupt = pragma_trapa = pragma_nosave_low_regs = 0;
sh_need_epilogue_known = 0; sh_need_epilogue_known = 0;
...@@ -5859,7 +5768,7 @@ sh_output_function_epilogue (file, size) ...@@ -5859,7 +5768,7 @@ sh_output_function_epilogue (file, size)
} }
static rtx static rtx
sh_builtin_saveregs () sh_builtin_saveregs (void)
{ {
/* First unnamed integer register. */ /* First unnamed integer register. */
int first_intreg = current_function_args_info.arg_count[(int) SH_ARG_INT]; int first_intreg = current_function_args_info.arg_count[(int) SH_ARG_INT];
...@@ -6003,7 +5912,7 @@ sh_builtin_saveregs () ...@@ -6003,7 +5912,7 @@ sh_builtin_saveregs ()
/* Define the `__builtin_va_list' type for the ABI. */ /* Define the `__builtin_va_list' type for the ABI. */
tree tree
sh_build_va_list () sh_build_va_list (void)
{ {
tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack; tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
tree record; tree record;
...@@ -6047,9 +5956,7 @@ sh_build_va_list () ...@@ -6047,9 +5956,7 @@ sh_build_va_list ()
/* Implement `va_start' for varargs and stdarg. */ /* Implement `va_start' for varargs and stdarg. */
void void
sh_va_start (valist, nextarg) sh_va_start (tree valist, rtx nextarg)
tree valist;
rtx nextarg;
{ {
tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack; tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack; tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
...@@ -6126,8 +6033,7 @@ sh_va_start (valist, nextarg) ...@@ -6126,8 +6033,7 @@ sh_va_start (valist, nextarg)
/* Implement `va_arg'. */ /* Implement `va_arg'. */
rtx rtx
sh_va_arg (valist, type) sh_va_arg (tree valist, tree type)
tree valist, type;
{ {
HOST_WIDE_INT size, rsize; HOST_WIDE_INT size, rsize;
tree tmp, pptr_type_node; tree tmp, pptr_type_node;
...@@ -6329,8 +6235,7 @@ sh_va_arg (valist, type) ...@@ -6329,8 +6235,7 @@ sh_va_arg (valist, type)
} }
static bool static bool
sh_promote_prototypes (type) sh_promote_prototypes (tree type)
tree type;
{ {
if (TARGET_HITACHI) if (TARGET_HITACHI)
return 0; return 0;
...@@ -6359,11 +6264,8 @@ sh_promote_prototypes (type) ...@@ -6359,11 +6264,8 @@ sh_promote_prototypes (type)
rtx rtx
sh_function_arg (ca, mode, type, named) sh_function_arg (CUMULATIVE_ARGS *ca, enum machine_mode mode,
CUMULATIVE_ARGS *ca; tree type, int named)
enum machine_mode mode;
tree type;
int named;
{ {
if (! TARGET_SH5 && mode == VOIDmode) if (! TARGET_SH5 && mode == VOIDmode)
return GEN_INT (ca->renesas_abi ? 1 : 0); return GEN_INT (ca->renesas_abi ? 1 : 0);
...@@ -6450,11 +6352,8 @@ sh_function_arg (ca, mode, type, named) ...@@ -6450,11 +6352,8 @@ sh_function_arg (ca, mode, type, named)
available.) */ available.) */
void void
sh_function_arg_advance (ca, mode, type, named) sh_function_arg_advance (CUMULATIVE_ARGS *ca, enum machine_mode mode,
CUMULATIVE_ARGS *ca; tree type, int named)
enum machine_mode mode;
tree type;
int named;
{ {
if (ca->force_mem) if (ca->force_mem)
ca->force_mem = 0; ca->force_mem = 0;
...@@ -6604,9 +6503,7 @@ sh_function_arg_advance (ca, mode, type, named) ...@@ -6604,9 +6503,7 @@ sh_function_arg_advance (ca, mode, type, named)
the address is passed like an invisible argument, but one that is always the address is passed like an invisible argument, but one that is always
passed in memory. */ passed in memory. */
static rtx static rtx
sh_struct_value_rtx (fndecl, incoming) sh_struct_value_rtx (tree fndecl, int incoming ATTRIBUTE_UNUSED)
tree fndecl;
int incoming ATTRIBUTE_UNUSED;
{ {
if (TARGET_HITACHI || sh_attr_renesas_p (fndecl)) if (TARGET_HITACHI || sh_attr_renesas_p (fndecl))
return 0; return 0;
...@@ -6614,9 +6511,7 @@ sh_struct_value_rtx (fndecl, incoming) ...@@ -6614,9 +6511,7 @@ sh_struct_value_rtx (fndecl, incoming)
} }
static bool static bool
sh_return_in_memory (type, fndecl) sh_return_in_memory (tree type, tree fndecl)
tree type;
tree fndecl;
{ {
if (TARGET_SH5) if (TARGET_SH5)
{ {
...@@ -6639,27 +6534,24 @@ sh_return_in_memory (type, fndecl) ...@@ -6639,27 +6534,24 @@ sh_return_in_memory (type, fndecl)
later. Fortunately, we already have two flags that are part of struct later. Fortunately, we already have two flags that are part of struct
function that tell if a function uses varargs or stdarg. */ function that tell if a function uses varargs or stdarg. */
static void static void
sh_setup_incoming_varargs (ca, mode, type, pretend_arg_size, second_time) sh_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; tree type ATTRIBUTE_UNUSED,
tree type ATTRIBUTE_UNUSED; int *pretend_arg_size ATTRIBUTE_UNUSED,
int *pretend_arg_size ATTRIBUTE_UNUSED; int second_time ATTRIBUTE_UNUSED)
int second_time ATTRIBUTE_UNUSED;
{ {
if (! current_function_stdarg) if (! current_function_stdarg)
abort (); abort ();
} }
static bool static bool
sh_strict_argument_naming (ca) sh_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED;
{ {
return TARGET_SH5; return TARGET_SH5;
} }
static bool static bool
sh_pretend_outgoing_varargs_named (ca) sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *ca)
CUMULATIVE_ARGS *ca;
{ {
return ! (TARGET_HITACHI || ca->renesas_abi) && ! TARGET_SH5; return ! (TARGET_HITACHI || ca->renesas_abi) && ! TARGET_SH5;
} }
...@@ -6669,9 +6561,7 @@ sh_pretend_outgoing_varargs_named (ca) ...@@ -6669,9 +6561,7 @@ sh_pretend_outgoing_varargs_named (ca)
the other its replacement, at the start of a routine. */ the other its replacement, at the start of a routine. */
int int
initial_elimination_offset (from, to) initial_elimination_offset (int from, int to)
int from;
int to;
{ {
int regs_saved; int regs_saved;
int regs_saved_rounding = 0; int regs_saved_rounding = 0;
...@@ -6751,22 +6641,19 @@ initial_elimination_offset (from, to) ...@@ -6751,22 +6641,19 @@ initial_elimination_offset (from, to)
compiler. */ compiler. */
void void
sh_pr_interrupt (pfile) sh_pr_interrupt (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
struct cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
pragma_interrupt = 1; pragma_interrupt = 1;
} }
void void
sh_pr_trapa (pfile) sh_pr_trapa (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
struct cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
pragma_interrupt = pragma_trapa = 1; pragma_interrupt = pragma_trapa = 1;
} }
void void
sh_pr_nosave_low_regs (pfile) sh_pr_nosave_low_regs (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
struct cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
pragma_nosave_low_regs = 1; pragma_nosave_low_regs = 1;
} }
...@@ -6774,9 +6661,7 @@ sh_pr_nosave_low_regs (pfile) ...@@ -6774,9 +6661,7 @@ sh_pr_nosave_low_regs (pfile)
/* Generate 'handle_interrupt' attribute for decls */ /* Generate 'handle_interrupt' attribute for decls */
static void static void
sh_insert_attributes (node, attributes) sh_insert_attributes (tree node, tree *attributes)
tree node;
tree * attributes;
{ {
if (! pragma_interrupt if (! pragma_interrupt
|| TREE_CODE (node) != FUNCTION_DECL) || TREE_CODE (node) != FUNCTION_DECL)
...@@ -6820,12 +6705,10 @@ const struct attribute_spec sh_attribute_table[] = ...@@ -6820,12 +6705,10 @@ const struct attribute_spec sh_attribute_table[] =
/* Handle an "interrupt_handler" attribute; arguments as in /* Handle an "interrupt_handler" attribute; arguments as in
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
sh_handle_interrupt_handler_attribute (node, name, args, flags, no_add_attrs) sh_handle_interrupt_handler_attribute (tree *node, tree name,
tree *node; tree args ATTRIBUTE_UNUSED,
tree name; int flags ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED; bool *no_add_attrs)
int flags ATTRIBUTE_UNUSED;
bool *no_add_attrs;
{ {
if (TREE_CODE (*node) != FUNCTION_DECL) if (TREE_CODE (*node) != FUNCTION_DECL)
{ {
...@@ -6845,12 +6728,8 @@ sh_handle_interrupt_handler_attribute (node, name, args, flags, no_add_attrs) ...@@ -6845,12 +6728,8 @@ sh_handle_interrupt_handler_attribute (node, name, args, flags, no_add_attrs)
/* Handle an "sp_switch" attribute; arguments as in /* Handle an "sp_switch" attribute; arguments as in
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
sh_handle_sp_switch_attribute (node, name, args, flags, no_add_attrs) sh_handle_sp_switch_attribute (tree *node, tree name, tree args,
tree *node; int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
tree name;
tree args;
int flags ATTRIBUTE_UNUSED;
bool *no_add_attrs;
{ {
if (TREE_CODE (*node) != FUNCTION_DECL) if (TREE_CODE (*node) != FUNCTION_DECL)
{ {
...@@ -6884,12 +6763,8 @@ sh_handle_sp_switch_attribute (node, name, args, flags, no_add_attrs) ...@@ -6884,12 +6763,8 @@ sh_handle_sp_switch_attribute (node, name, args, flags, no_add_attrs)
/* Handle an "trap_exit" attribute; arguments as in /* Handle an "trap_exit" attribute; arguments as in
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
sh_handle_trap_exit_attribute (node, name, args, flags, no_add_attrs) sh_handle_trap_exit_attribute (tree *node, tree name, tree args,
tree *node; int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
tree name;
tree args;
int flags ATTRIBUTE_UNUSED;
bool *no_add_attrs;
{ {
if (TREE_CODE (*node) != FUNCTION_DECL) if (TREE_CODE (*node) != FUNCTION_DECL)
{ {
...@@ -6920,20 +6795,18 @@ sh_handle_trap_exit_attribute (node, name, args, flags, no_add_attrs) ...@@ -6920,20 +6795,18 @@ sh_handle_trap_exit_attribute (node, name, args, flags, no_add_attrs)
} }
static tree static tree
sh_handle_renesas_attribute (node, name, args, flags, no_add_attrs) sh_handle_renesas_attribute (tree *node ATTRIBUTE_UNUSED,
tree *node ATTRIBUTE_UNUSED; tree name ATTRIBUTE_UNUSED,
tree name ATTRIBUTE_UNUSED; tree args ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED; int flags ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED; bool *no_add_attrs ATTRIBUTE_UNUSED)
bool *no_add_attrs ATTRIBUTE_UNUSED;
{ {
return NULL_TREE; return NULL_TREE;
} }
/* True if __attribute__((renesas)) or -mrenesas. */ /* True if __attribute__((renesas)) or -mrenesas. */
int int
sh_attr_renesas_p (td) sh_attr_renesas_p (tree td)
tree td;
{ {
if (TARGET_HITACHI) if (TARGET_HITACHI)
return 1; return 1;
...@@ -6948,13 +6821,13 @@ sh_attr_renesas_p (td) ...@@ -6948,13 +6821,13 @@ sh_attr_renesas_p (td)
/* True if __attribute__((renesas)) or -mrenesas, for the current /* True if __attribute__((renesas)) or -mrenesas, for the current
function. */ function. */
int int
sh_cfun_attr_renesas_p () sh_cfun_attr_renesas_p (void)
{ {
return sh_attr_renesas_p (current_function_decl); return sh_attr_renesas_p (current_function_decl);
} }
int int
sh_cfun_interrupt_handler_p () sh_cfun_interrupt_handler_p (void)
{ {
return (lookup_attribute ("interrupt_handler", return (lookup_attribute ("interrupt_handler",
DECL_ATTRIBUTES (current_function_decl)) DECL_ATTRIBUTES (current_function_decl))
...@@ -6967,9 +6840,7 @@ sh_cfun_interrupt_handler_p () ...@@ -6967,9 +6840,7 @@ sh_cfun_interrupt_handler_p ()
Used only in general_movsrc_operand. */ Used only in general_movsrc_operand. */
int int
system_reg_operand (op, mode) system_reg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (REGNO (op)) switch (REGNO (op))
{ {
...@@ -6986,9 +6857,7 @@ system_reg_operand (op, mode) ...@@ -6986,9 +6857,7 @@ system_reg_operand (op, mode)
invalid as are subregs of system registers. */ invalid as are subregs of system registers. */
int int
general_movsrc_operand (op, mode) general_movsrc_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == MEM) if (GET_CODE (op) == MEM)
{ {
...@@ -7022,9 +6891,7 @@ general_movsrc_operand (op, mode) ...@@ -7022,9 +6891,7 @@ general_movsrc_operand (op, mode)
Same as general_operand, but no preinc allowed. */ Same as general_operand, but no preinc allowed. */
int int
general_movdst_operand (op, mode) general_movdst_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
/* Only pre dec allowed. */ /* Only pre dec allowed. */
if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == POST_INC) if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == POST_INC)
...@@ -7036,9 +6903,7 @@ general_movdst_operand (op, mode) ...@@ -7036,9 +6903,7 @@ general_movdst_operand (op, mode)
/* Returns 1 if OP is a normal arithmetic register. */ /* Returns 1 if OP is a normal arithmetic register. */
int int
arith_reg_operand (op, mode) arith_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (register_operand (op, mode)) if (register_operand (op, mode))
{ {
...@@ -7063,9 +6928,7 @@ arith_reg_operand (op, mode) ...@@ -7063,9 +6928,7 @@ arith_reg_operand (op, mode)
because this would lead to missing sign extensions when truncating from because this would lead to missing sign extensions when truncating from
DImode to SImode. */ DImode to SImode. */
int int
arith_reg_dest (op, mode) arith_reg_dest (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode == DImode && GET_CODE (op) == SUBREG if (mode == DImode && GET_CODE (op) == SUBREG
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (op))) < 8) && GET_MODE_SIZE (GET_MODE (SUBREG_REG (op))) < 8)
...@@ -7074,9 +6937,7 @@ arith_reg_dest (op, mode) ...@@ -7074,9 +6937,7 @@ arith_reg_dest (op, mode)
} }
int int
int_gpr_dest (op, mode) int_gpr_dest (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
enum machine_mode op_mode = GET_MODE (op); enum machine_mode op_mode = GET_MODE (op);
...@@ -7089,9 +6950,7 @@ int_gpr_dest (op, mode) ...@@ -7089,9 +6950,7 @@ int_gpr_dest (op, mode)
} }
int int
fp_arith_reg_operand (op, mode) fp_arith_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (register_operand (op, mode)) if (register_operand (op, mode))
{ {
...@@ -7113,9 +6972,7 @@ fp_arith_reg_operand (op, mode) ...@@ -7113,9 +6972,7 @@ fp_arith_reg_operand (op, mode)
/* Returns 1 if OP is a valid source operand for an arithmetic insn. */ /* Returns 1 if OP is a valid source operand for an arithmetic insn. */
int int
arith_operand (op, mode) arith_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (arith_reg_operand (op, mode)) if (arith_reg_operand (op, mode))
return 1; return 1;
...@@ -7142,9 +6999,7 @@ arith_operand (op, mode) ...@@ -7142,9 +6999,7 @@ arith_operand (op, mode)
/* Returns 1 if OP is a valid source operand for a compare insn. */ /* Returns 1 if OP is a valid source operand for a compare insn. */
int int
arith_reg_or_0_operand (op, mode) arith_reg_or_0_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (arith_reg_operand (op, mode)) if (arith_reg_operand (op, mode))
return 1; return 1;
...@@ -7159,9 +7014,7 @@ arith_reg_or_0_operand (op, mode) ...@@ -7159,9 +7014,7 @@ arith_reg_or_0_operand (op, mode)
that takes either a register or a 6-bit immediate. */ that takes either a register or a 6-bit immediate. */
int int
shmedia_6bit_operand (op, mode) shmedia_6bit_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (arith_reg_operand (op, mode) return (arith_reg_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && CONST_OK_FOR_I06 (INTVAL (op)))); || (GET_CODE (op) == CONST_INT && CONST_OK_FOR_I06 (INTVAL (op))));
...@@ -7170,9 +7023,7 @@ shmedia_6bit_operand (op, mode) ...@@ -7170,9 +7023,7 @@ shmedia_6bit_operand (op, mode)
/* Returns 1 if OP is a valid source operand for a logical operation. */ /* Returns 1 if OP is a valid source operand for a logical operation. */
int int
logical_operand (op, mode) logical_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (arith_reg_operand (op, mode)) if (arith_reg_operand (op, mode))
return 1; return 1;
...@@ -7191,9 +7042,7 @@ logical_operand (op, mode) ...@@ -7191,9 +7042,7 @@ logical_operand (op, mode)
} }
int int
and_operand (op, mode) and_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (logical_operand (op, mode)) if (logical_operand (op, mode))
return 1; return 1;
...@@ -7211,8 +7060,7 @@ and_operand (op, mode) ...@@ -7211,8 +7060,7 @@ and_operand (op, mode)
/* Nonzero if OP is a floating point value with value 0.0. */ /* Nonzero if OP is a floating point value with value 0.0. */
int int
fp_zero_operand (op) fp_zero_operand (rtx op)
rtx op;
{ {
REAL_VALUE_TYPE r; REAL_VALUE_TYPE r;
...@@ -7226,8 +7074,7 @@ fp_zero_operand (op) ...@@ -7226,8 +7074,7 @@ fp_zero_operand (op)
/* Nonzero if OP is a floating point value with value 1.0. */ /* Nonzero if OP is a floating point value with value 1.0. */
int int
fp_one_operand (op) fp_one_operand (rtx op)
rtx op;
{ {
REAL_VALUE_TYPE r; REAL_VALUE_TYPE r;
...@@ -7246,33 +7093,27 @@ fp_one_operand (op) ...@@ -7246,33 +7093,27 @@ fp_one_operand (op)
choosing an fldi alternative during reload and thus failing to choosing an fldi alternative during reload and thus failing to
allocate a scratch register for the constant loading. */ allocate a scratch register for the constant loading. */
int int
fldi_ok () fldi_ok (void)
{ {
return ! TARGET_SH4 || TARGET_FMOVD || reload_completed; return ! TARGET_SH4 || TARGET_FMOVD || reload_completed;
} }
int int
tertiary_reload_operand (op, mode) tertiary_reload_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
return code == MEM || (TARGET_SH4 && code == CONST_DOUBLE); return code == MEM || (TARGET_SH4 && code == CONST_DOUBLE);
} }
int int
fpscr_operand (op, mode) fpscr_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == REG && REGNO (op) == FPSCR_REG return (GET_CODE (op) == REG && REGNO (op) == FPSCR_REG
&& GET_MODE (op) == PSImode); && GET_MODE (op) == PSImode);
} }
int int
fpul_operand (op, mode) fpul_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (TARGET_SHMEDIA) if (TARGET_SHMEDIA)
return fp_arith_reg_operand (op, mode); return fp_arith_reg_operand (op, mode);
...@@ -7283,18 +7124,14 @@ fpul_operand (op, mode) ...@@ -7283,18 +7124,14 @@ fpul_operand (op, mode)
} }
int int
symbol_ref_operand (op, mode) symbol_ref_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == SYMBOL_REF); return (GET_CODE (op) == SYMBOL_REF);
} }
/* Return the TLS type for TLS symbols, 0 for otherwise. */ /* Return the TLS type for TLS symbols, 0 for otherwise. */
int int
tls_symbolic_operand (op, mode) tls_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) != SYMBOL_REF) if (GET_CODE (op) != SYMBOL_REF)
return 0; return 0;
...@@ -7302,9 +7139,7 @@ tls_symbolic_operand (op, mode) ...@@ -7302,9 +7139,7 @@ tls_symbolic_operand (op, mode)
} }
int int
commutative_float_operator (op, mode) commutative_float_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_MODE (op) != mode) if (GET_MODE (op) != mode)
return 0; return 0;
...@@ -7320,9 +7155,7 @@ commutative_float_operator (op, mode) ...@@ -7320,9 +7155,7 @@ commutative_float_operator (op, mode)
} }
int int
noncommutative_float_operator (op, mode) noncommutative_float_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_MODE (op) != mode) if (GET_MODE (op) != mode)
return 0; return 0;
...@@ -7338,9 +7171,7 @@ noncommutative_float_operator (op, mode) ...@@ -7338,9 +7171,7 @@ noncommutative_float_operator (op, mode)
} }
int int
unary_float_operator (op, mode) unary_float_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_MODE (op) != mode) if (GET_MODE (op) != mode)
return 0; return 0;
...@@ -7357,9 +7188,7 @@ unary_float_operator (op, mode) ...@@ -7357,9 +7188,7 @@ unary_float_operator (op, mode)
} }
int int
binary_float_operator (op, mode) binary_float_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_MODE (op) != mode) if (GET_MODE (op) != mode)
return 0; return 0;
...@@ -7377,9 +7206,7 @@ binary_float_operator (op, mode) ...@@ -7377,9 +7206,7 @@ binary_float_operator (op, mode)
} }
int int
binary_logical_operator (op, mode) binary_logical_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_MODE (op) != mode) if (GET_MODE (op) != mode)
return 0; return 0;
...@@ -7396,17 +7223,13 @@ binary_logical_operator (op, mode) ...@@ -7396,17 +7223,13 @@ binary_logical_operator (op, mode)
} }
int int
equality_comparison_operator (op, mode) equality_comparison_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((mode == VOIDmode || GET_MODE (op) == mode) return ((mode == VOIDmode || GET_MODE (op) == mode)
&& (GET_CODE (op) == EQ || GET_CODE (op) == NE)); && (GET_CODE (op) == EQ || GET_CODE (op) == NE));
} }
int greater_comparison_operator (op, mode) int greater_comparison_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != VOIDmode && GET_MODE (op) == mode) if (mode != VOIDmode && GET_MODE (op) == mode)
return 0; return 0;
...@@ -7422,9 +7245,7 @@ int greater_comparison_operator (op, mode) ...@@ -7422,9 +7245,7 @@ int greater_comparison_operator (op, mode)
} }
} }
int less_comparison_operator (op, mode) int less_comparison_operator (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != VOIDmode && GET_MODE (op) == mode) if (mode != VOIDmode && GET_MODE (op) == mode)
return 0; return 0;
...@@ -7442,9 +7263,7 @@ int less_comparison_operator (op, mode) ...@@ -7442,9 +7263,7 @@ int less_comparison_operator (op, mode)
/* Accept pseudos and branch target registers. */ /* Accept pseudos and branch target registers. */
int int
target_reg_operand (op, mode) target_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != DImode if (mode != DImode
|| GET_MODE (op) != DImode) || GET_MODE (op) != DImode)
...@@ -7469,9 +7288,7 @@ target_reg_operand (op, mode) ...@@ -7469,9 +7288,7 @@ target_reg_operand (op, mode)
/* Same as target_reg_operand, except that label_refs and symbol_refs /* Same as target_reg_operand, except that label_refs and symbol_refs
are accepted before reload. */ are accepted before reload. */
int int
target_operand (op, mode) target_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != DImode) if (mode != DImode)
return 0; return 0;
...@@ -7484,9 +7301,7 @@ target_operand (op, mode) ...@@ -7484,9 +7301,7 @@ target_operand (op, mode)
} }
int int
mextr_bit_offset (op, mode) mextr_bit_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
HOST_WIDE_INT i; HOST_WIDE_INT i;
...@@ -7497,9 +7312,7 @@ mextr_bit_offset (op, mode) ...@@ -7497,9 +7312,7 @@ mextr_bit_offset (op, mode)
} }
int int
extend_reg_operand (op, mode) extend_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (GET_CODE (op) == TRUNCATE return (GET_CODE (op) == TRUNCATE
? arith_operand ? arith_operand
...@@ -7507,9 +7320,7 @@ extend_reg_operand (op, mode) ...@@ -7507,9 +7320,7 @@ extend_reg_operand (op, mode)
} }
int int
trunc_hi_operand (op, mode) trunc_hi_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
enum machine_mode op_mode = GET_MODE (op); enum machine_mode op_mode = GET_MODE (op);
...@@ -7520,9 +7331,7 @@ trunc_hi_operand (op, mode) ...@@ -7520,9 +7331,7 @@ trunc_hi_operand (op, mode)
} }
int int
extend_reg_or_0_operand (op, mode) extend_reg_or_0_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (GET_CODE (op) == TRUNCATE return (GET_CODE (op) == TRUNCATE
? arith_operand ? arith_operand
...@@ -7530,9 +7339,7 @@ extend_reg_or_0_operand (op, mode) ...@@ -7530,9 +7339,7 @@ extend_reg_or_0_operand (op, mode)
} }
int int
general_extend_operand (op, mode) general_extend_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (GET_CODE (op) == TRUNCATE return (GET_CODE (op) == TRUNCATE
? arith_operand ? arith_operand
...@@ -7540,9 +7347,7 @@ general_extend_operand (op, mode) ...@@ -7540,9 +7347,7 @@ general_extend_operand (op, mode)
} }
int int
inqhi_operand (op, mode) inqhi_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) != TRUNCATE || mode != GET_MODE (op)) if (GET_CODE (op) != TRUNCATE || mode != GET_MODE (op))
return 0; return 0;
...@@ -7553,9 +7358,7 @@ inqhi_operand (op, mode) ...@@ -7553,9 +7358,7 @@ inqhi_operand (op, mode)
} }
int int
sh_rep_vec (v, mode) sh_rep_vec (rtx v, enum machine_mode mode)
rtx v;
enum machine_mode mode;
{ {
int i; int i;
rtx x, y; rtx x, y;
...@@ -7583,9 +7386,7 @@ sh_rep_vec (v, mode) ...@@ -7583,9 +7386,7 @@ sh_rep_vec (v, mode)
/* Determine if V is a constant vector matching MODE with only one element /* Determine if V is a constant vector matching MODE with only one element
that is not a sign extension. Two byte-sized elements count as one. */ that is not a sign extension. Two byte-sized elements count as one. */
int int
sh_1el_vec (v, mode) sh_1el_vec (rtx v, enum machine_mode mode)
rtx v;
enum machine_mode mode;
{ {
int unit_size; int unit_size;
int i, last, least, sign_ix; int i, last, least, sign_ix;
...@@ -7616,9 +7417,7 @@ sh_1el_vec (v, mode) ...@@ -7616,9 +7417,7 @@ sh_1el_vec (v, mode)
} }
int int
sh_const_vec (v, mode) sh_const_vec (rtx v, enum machine_mode mode)
rtx v;
enum machine_mode mode;
{ {
int i; int i;
...@@ -7635,8 +7434,7 @@ sh_const_vec (v, mode) ...@@ -7635,8 +7434,7 @@ sh_const_vec (v, mode)
/* Return the destination address of a branch. */ /* Return the destination address of a branch. */
static int static int
branch_dest (branch) branch_dest (rtx branch)
rtx branch;
{ {
rtx dest = SET_SRC (PATTERN (branch)); rtx dest = SET_SRC (PATTERN (branch));
int dest_uid; int dest_uid;
...@@ -7652,9 +7450,7 @@ branch_dest (branch) ...@@ -7652,9 +7450,7 @@ branch_dest (branch)
We assume REG is a reload reg, and therefore does We assume REG is a reload reg, and therefore does
not live past labels. It may live past calls or jumps though. */ not live past labels. It may live past calls or jumps though. */
int int
reg_unused_after (reg, insn) reg_unused_after (rtx reg, rtx insn)
rtx reg;
rtx insn;
{ {
enum rtx_code code; enum rtx_code code;
rtx set; rtx set;
...@@ -7747,7 +7543,7 @@ reg_unused_after (reg, insn) ...@@ -7747,7 +7543,7 @@ reg_unused_after (reg, insn)
static GTY(()) rtx fpscr_rtx; static GTY(()) rtx fpscr_rtx;
rtx rtx
get_fpscr_rtx () get_fpscr_rtx (void)
{ {
if (! fpscr_rtx) if (! fpscr_rtx)
{ {
...@@ -7761,48 +7557,38 @@ get_fpscr_rtx () ...@@ -7761,48 +7557,38 @@ get_fpscr_rtx ()
} }
void void
emit_sf_insn (pat) emit_sf_insn (rtx pat)
rtx pat;
{ {
emit_insn (pat); emit_insn (pat);
} }
void void
emit_df_insn (pat) emit_df_insn (rtx pat)
rtx pat;
{ {
emit_insn (pat); emit_insn (pat);
} }
void void
expand_sf_unop (fun, operands) expand_sf_unop (rtx (*fun) (rtx, rtx, rtx), rtx *operands)
rtx (*fun) PARAMS ((rtx, rtx, rtx));
rtx *operands;
{ {
emit_sf_insn ((*fun) (operands[0], operands[1], get_fpscr_rtx ())); emit_sf_insn ((*fun) (operands[0], operands[1], get_fpscr_rtx ()));
} }
void void
expand_sf_binop (fun, operands) expand_sf_binop (rtx (*fun) (rtx, rtx, rtx, rtx), rtx *operands)
rtx (*fun) PARAMS ((rtx, rtx, rtx, rtx));
rtx *operands;
{ {
emit_sf_insn ((*fun) (operands[0], operands[1], operands[2], emit_sf_insn ((*fun) (operands[0], operands[1], operands[2],
get_fpscr_rtx ())); get_fpscr_rtx ()));
} }
void void
expand_df_unop (fun, operands) expand_df_unop (rtx (*fun) (rtx, rtx, rtx), rtx *operands)
rtx (*fun) PARAMS ((rtx, rtx, rtx));
rtx *operands;
{ {
emit_df_insn ((*fun) (operands[0], operands[1], get_fpscr_rtx ())); emit_df_insn ((*fun) (operands[0], operands[1], get_fpscr_rtx ()));
} }
void void
expand_df_binop (fun, operands) expand_df_binop (rtx (*fun) (rtx, rtx, rtx, rtx), rtx *operands)
rtx (*fun) PARAMS ((rtx, rtx, rtx, rtx));
rtx *operands;
{ {
emit_df_insn ((*fun) (operands[0], operands[1], operands[2], emit_df_insn ((*fun) (operands[0], operands[1], operands[2],
get_fpscr_rtx ())); get_fpscr_rtx ()));
...@@ -7836,8 +7622,7 @@ f(double a) ...@@ -7836,8 +7622,7 @@ f(double a)
same basic block. */ same basic block. */
static void static void
mark_use (x, reg_set_block) mark_use (rtx x, rtx *reg_set_block)
rtx x, *reg_set_block;
{ {
enum rtx_code code; enum rtx_code code;
...@@ -7889,7 +7674,7 @@ mark_use (x, reg_set_block) ...@@ -7889,7 +7674,7 @@ mark_use (x, reg_set_block)
} }
} }
static rtx get_free_reg PARAMS ((HARD_REG_SET)); static rtx get_free_reg (HARD_REG_SET);
/* This function returns a register to use to load the address to load /* This function returns a register to use to load the address to load
the fpscr from. Currently it always returns r1 or r7, but when we are the fpscr from. Currently it always returns r1 or r7, but when we are
...@@ -7906,8 +7691,7 @@ __complex__ long long f (double d) { if (d == 0) return 2; else return 3; } ...@@ -7906,8 +7691,7 @@ __complex__ long long f (double d) { if (d == 0) return 2; else return 3; }
the middle. */ the middle. */
static rtx static rtx
get_free_reg (regs_live) get_free_reg (HARD_REG_SET regs_live)
HARD_REG_SET regs_live;
{ {
if (! TEST_HARD_REG_BIT (regs_live, 1)) if (! TEST_HARD_REG_BIT (regs_live, 1))
return gen_rtx_REG (Pmode, 1); return gen_rtx_REG (Pmode, 1);
...@@ -7923,9 +7707,7 @@ get_free_reg (regs_live) ...@@ -7923,9 +7707,7 @@ get_free_reg (regs_live)
/* This function will set the fpscr from memory. /* This function will set the fpscr from memory.
MODE is the mode we are setting it to. */ MODE is the mode we are setting it to. */
void void
fpscr_set_from_mem (mode, regs_live) fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
int mode;
HARD_REG_SET regs_live;
{ {
enum attr_fp_mode fp_mode = mode; enum attr_fp_mode fp_mode = mode;
rtx addr_reg = get_free_reg (regs_live); rtx addr_reg = get_free_reg (regs_live);
...@@ -7942,8 +7724,7 @@ fpscr_set_from_mem (mode, regs_live) ...@@ -7942,8 +7724,7 @@ fpscr_set_from_mem (mode, regs_live)
#endif #endif
int int
sh_insn_length_adjustment (insn) sh_insn_length_adjustment (rtx insn)
rtx insn;
{ {
/* Instructions with unfilled delay slots take up an extra two bytes for /* Instructions with unfilled delay slots take up an extra two bytes for
the nop in the delay slot. */ the nop in the delay slot. */
...@@ -8026,8 +7807,7 @@ sh_insn_length_adjustment (insn) ...@@ -8026,8 +7807,7 @@ sh_insn_length_adjustment (insn)
/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol /* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol
isn't protected by a PIC unspec. */ isn't protected by a PIC unspec. */
int int
nonpic_symbol_mentioned_p (x) nonpic_symbol_mentioned_p (rtx x)
rtx x;
{ {
register const char *fmt; register const char *fmt;
register int i; register int i;
...@@ -8072,10 +7852,8 @@ nonpic_symbol_mentioned_p (x) ...@@ -8072,10 +7852,8 @@ nonpic_symbol_mentioned_p (x)
/* Convert a non-PIC address in `orig' to a PIC address using @GOT or /* Convert a non-PIC address in `orig' to a PIC address using @GOT or
@GOTOFF in `reg'. */ @GOTOFF in `reg'. */
rtx rtx
legitimize_pic_address (orig, mode, reg) legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
rtx orig; rtx reg)
enum machine_mode mode ATTRIBUTE_UNUSED;
rtx reg;
{ {
if (tls_symbolic_operand (orig, Pmode)) if (tls_symbolic_operand (orig, Pmode))
return orig; return orig;
...@@ -8103,8 +7881,7 @@ legitimize_pic_address (orig, mode, reg) ...@@ -8103,8 +7881,7 @@ legitimize_pic_address (orig, mode, reg)
/* Mark the use of a constant in the literal table. If the constant /* Mark the use of a constant in the literal table. If the constant
has multiple labels, make it unique. */ has multiple labels, make it unique. */
static rtx static rtx
mark_constant_pool_use (x) mark_constant_pool_use (rtx x)
rtx x;
{ {
rtx insn, lab, pattern; rtx insn, lab, pattern;
...@@ -8170,9 +7947,7 @@ mark_constant_pool_use (x) ...@@ -8170,9 +7947,7 @@ mark_constant_pool_use (x)
of an unconditional jump BRANCH2. We only want to do this if the of an unconditional jump BRANCH2. We only want to do this if the
resulting branch will have a short displacement. */ resulting branch will have a short displacement. */
int int
sh_can_redirect_branch (branch1, branch2) sh_can_redirect_branch (rtx branch1, rtx branch2)
rtx branch1;
rtx branch2;
{ {
if (flag_expensive_optimizations && simplejump_p (branch2)) if (flag_expensive_optimizations && simplejump_p (branch2))
{ {
...@@ -8204,9 +7979,8 @@ sh_can_redirect_branch (branch1, branch2) ...@@ -8204,9 +7979,8 @@ sh_can_redirect_branch (branch1, branch2)
/* Return nonzero if register old_reg can be renamed to register new_reg. */ /* Return nonzero if register old_reg can be renamed to register new_reg. */
int int
sh_hard_regno_rename_ok (old_reg, new_reg) sh_hard_regno_rename_ok (unsigned int old_reg ATTRIBUTE_UNUSED,
unsigned int old_reg ATTRIBUTE_UNUSED; unsigned int new_reg)
unsigned int new_reg;
{ {
/* Interrupt functions can only use registers that have already been /* Interrupt functions can only use registers that have already been
...@@ -8227,11 +8001,7 @@ sh_hard_regno_rename_ok (old_reg, new_reg) ...@@ -8227,11 +8001,7 @@ sh_hard_regno_rename_ok (old_reg, new_reg)
the same cost as a data-dependence. The return value should be the same cost as a data-dependence. The return value should be
the new value for COST. */ the new value for COST. */
static int static int
sh_adjust_cost (insn, link, dep_insn, cost) sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost)
rtx insn;
rtx link ATTRIBUTE_UNUSED;
rtx dep_insn;
int cost;
{ {
rtx reg, use_pat; rtx reg, use_pat;
...@@ -8337,8 +8107,7 @@ sh_adjust_cost (insn, link, dep_insn, cost) ...@@ -8337,8 +8107,7 @@ sh_adjust_cost (insn, link, dep_insn, cost)
/* Check if INSN is flow-dependent on DEP_INSN. Can also be used to check /* Check if INSN is flow-dependent on DEP_INSN. Can also be used to check
if DEP_INSN is anti-flow dependent on INSN. */ if DEP_INSN is anti-flow dependent on INSN. */
static int static int
flow_dependent_p (insn, dep_insn) flow_dependent_p (rtx insn, rtx dep_insn)
rtx insn, dep_insn;
{ {
rtx tmp = PATTERN (insn); rtx tmp = PATTERN (insn);
...@@ -8348,10 +8117,7 @@ flow_dependent_p (insn, dep_insn) ...@@ -8348,10 +8117,7 @@ flow_dependent_p (insn, dep_insn)
/* A helper function for flow_dependent_p called through note_stores. */ /* A helper function for flow_dependent_p called through note_stores. */
static void static void
flow_dependent_p_1 (x, pat, data) flow_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
rtx x;
rtx pat ATTRIBUTE_UNUSED;
void *data;
{ {
rtx * pinsn = (rtx *) data; rtx * pinsn = (rtx *) data;
...@@ -8364,7 +8130,7 @@ flow_dependent_p_1 (x, pat, data) ...@@ -8364,7 +8130,7 @@ flow_dependent_p_1 (x, pat, data)
do not look like function calls to leaf_function_p. Hence we must do not look like function calls to leaf_function_p. Hence we must
do this extra check. */ do this extra check. */
int int
sh_pr_n_sets () sh_pr_n_sets (void)
{ {
return REG_N_SETS (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG); return REG_N_SETS (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG);
} }
...@@ -8372,7 +8138,7 @@ sh_pr_n_sets () ...@@ -8372,7 +8138,7 @@ sh_pr_n_sets ()
/* This Function returns nonzero if the DFA based scheduler interface /* This Function returns nonzero if the DFA based scheduler interface
is to be used. At present this is supported for the SH4 only. */ is to be used. At present this is supported for the SH4 only. */
static int static int
sh_use_dfa_interface() sh_use_dfa_interface(void)
{ {
if (TARGET_HARD_SH4) if (TARGET_HARD_SH4)
return 1; return 1;
...@@ -8383,7 +8149,7 @@ sh_use_dfa_interface() ...@@ -8383,7 +8149,7 @@ sh_use_dfa_interface()
/* This function returns "2" to indicate dual issue for the SH4 /* This function returns "2" to indicate dual issue for the SH4
processor. To be used by the DFA pipeline description. */ processor. To be used by the DFA pipeline description. */
static int static int
sh_issue_rate() sh_issue_rate(void)
{ {
if (TARGET_SUPERSCALAR) if (TARGET_SUPERSCALAR)
return 2; return 2;
...@@ -8394,7 +8160,7 @@ sh_issue_rate() ...@@ -8394,7 +8160,7 @@ sh_issue_rate()
/* SHmedia requires registers for branches, so we can't generate new /* SHmedia requires registers for branches, so we can't generate new
branches past reload. */ branches past reload. */
static bool static bool
sh_cannot_modify_jumps_p () sh_cannot_modify_jumps_p (void)
{ {
return (TARGET_SHMEDIA && (reload_in_progress || reload_completed)); return (TARGET_SHMEDIA && (reload_in_progress || reload_completed));
} }
...@@ -8436,8 +8202,7 @@ sh_ms_bitfield_layout_p (record_type) ...@@ -8436,8 +8202,7 @@ sh_ms_bitfield_layout_p (record_type)
CXT is an RTX for the static chain value for the function. */ CXT is an RTX for the static chain value for the function. */
void void
sh_initialize_trampoline (tramp, fnaddr, cxt) sh_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
rtx tramp, fnaddr, cxt;
{ {
if (TARGET_SHMEDIA64) if (TARGET_SHMEDIA64)
{ {
...@@ -8594,9 +8359,7 @@ sh_initialize_trampoline (tramp, fnaddr, cxt) ...@@ -8594,9 +8359,7 @@ sh_initialize_trampoline (tramp, fnaddr, cxt)
own stack frame, so it must not pass pointers or references to own stack frame, so it must not pass pointers or references to
these arguments to other functions by means of sibling calls. */ these arguments to other functions by means of sibling calls. */
static bool static bool
sh_function_ok_for_sibcall (decl, exp) sh_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
tree decl;
tree exp ATTRIBUTE_UNUSED;
{ {
return (decl return (decl
&& (! TARGET_SHCOMPACT && (! TARGET_SHCOMPACT
...@@ -8764,7 +8527,7 @@ static const struct builtin_description bdesc[] = ...@@ -8764,7 +8527,7 @@ static const struct builtin_description bdesc[] =
}; };
static void static void
sh_media_init_builtins () sh_media_init_builtins (void)
{ {
tree shared[SH_BLTIN_NUM_SHARED_SIGNATURES]; tree shared[SH_BLTIN_NUM_SHARED_SIGNATURES];
const struct builtin_description *d; const struct builtin_description *d;
...@@ -8818,7 +8581,7 @@ sh_media_init_builtins () ...@@ -8818,7 +8581,7 @@ sh_media_init_builtins ()
} }
static void static void
sh_init_builtins () sh_init_builtins (void)
{ {
if (TARGET_SHMEDIA) if (TARGET_SHMEDIA)
sh_media_init_builtins (); sh_media_init_builtins ();
...@@ -8831,12 +8594,8 @@ sh_init_builtins () ...@@ -8831,12 +8594,8 @@ sh_init_builtins ()
IGNORE is nonzero if the value is to be ignored. */ IGNORE is nonzero if the value is to be ignored. */
static rtx static rtx
sh_expand_builtin (exp, target, subtarget, mode, ignore) sh_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
tree exp; enum machine_mode mode ATTRIBUTE_UNUSED, int ignore)
rtx target;
rtx subtarget ATTRIBUTE_UNUSED;
enum machine_mode mode ATTRIBUTE_UNUSED;
int ignore;
{ {
tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
tree arglist = TREE_OPERAND (exp, 1); tree arglist = TREE_OPERAND (exp, 1);
...@@ -8909,13 +8668,11 @@ sh_expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -8909,13 +8668,11 @@ sh_expand_builtin (exp, target, subtarget, mode, ignore)
} }
void void
sh_expand_unop_v2sf (code, op0, op1) sh_expand_unop_v2sf (enum rtx_code code, rtx op0, rtx op1)
enum rtx_code code;
rtx op0, op1;
{ {
rtx sel0 = const0_rtx; rtx sel0 = const0_rtx;
rtx sel1 = const1_rtx; rtx sel1 = const1_rtx;
rtx (*fn) PARAMS ((rtx, rtx, rtx, rtx, rtx)) = gen_unary_sf_op; rtx (*fn) (rtx, rtx, rtx, rtx, rtx) = gen_unary_sf_op;
rtx op = gen_rtx_fmt_e (code, SFmode, op1); rtx op = gen_rtx_fmt_e (code, SFmode, op1);
emit_insn ((*fn) (op0, op1, op, sel0, sel0)); emit_insn ((*fn) (op0, op1, op, sel0, sel0));
...@@ -8923,13 +8680,11 @@ sh_expand_unop_v2sf (code, op0, op1) ...@@ -8923,13 +8680,11 @@ sh_expand_unop_v2sf (code, op0, op1)
} }
void void
sh_expand_binop_v2sf (code, op0, op1, op2) sh_expand_binop_v2sf (enum rtx_code code, rtx op0, rtx op1, rtx op2)
enum rtx_code code;
rtx op0, op1, op2;
{ {
rtx sel0 = const0_rtx; rtx sel0 = const0_rtx;
rtx sel1 = const1_rtx; rtx sel1 = const1_rtx;
rtx (*fn) PARAMS ((rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx)) rtx (*fn) (rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx)
= gen_binary_sf_op; = gen_binary_sf_op;
rtx op = gen_rtx_fmt_ee (code, SFmode, op1, op2); rtx op = gen_rtx_fmt_ee (code, SFmode, op1, op2);
...@@ -8940,9 +8695,8 @@ sh_expand_binop_v2sf (code, op0, op1, op2) ...@@ -8940,9 +8695,8 @@ sh_expand_binop_v2sf (code, op0, op1, op2)
/* Return the class of registers for which a mode change from FROM to TO /* Return the class of registers for which a mode change from FROM to TO
is invalid. */ is invalid. */
bool bool
sh_cannot_change_mode_class (from, to, class) sh_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
enum machine_mode from, to; enum reg_class class)
enum reg_class class;
{ {
if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to)) if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to))
{ {
...@@ -8965,9 +8719,7 @@ sh_cannot_change_mode_class (from, to, class) ...@@ -8965,9 +8719,7 @@ sh_cannot_change_mode_class (from, to, class)
that label is used. */ that label is used. */
void void
sh_mark_label (address, nuses) sh_mark_label (rtx address, int nuses)
rtx address;
int nuses;
{ {
if (GOTOFF_P (address)) if (GOTOFF_P (address))
{ {
...@@ -8990,9 +8742,8 @@ sh_mark_label (address, nuses) ...@@ -8990,9 +8742,8 @@ sh_mark_label (address, nuses)
register information here is not used for SFmode. */ register information here is not used for SFmode. */
int int
sh_register_move_cost (mode, srcclass, dstclass) sh_register_move_cost (enum machine_mode mode,
enum machine_mode mode; enum reg_class srcclass, enum reg_class dstclass)
enum reg_class srcclass, dstclass;
{ {
if (dstclass == T_REGS || dstclass == PR_REGS) if (dstclass == T_REGS || dstclass == PR_REGS)
return 10; return 10;
...@@ -9048,20 +8799,17 @@ sh_register_move_cost (mode, srcclass, dstclass) ...@@ -9048,20 +8799,17 @@ sh_register_move_cost (mode, srcclass, dstclass)
/* Like register_operand, but take into account that SHMEDIA can use /* Like register_operand, but take into account that SHMEDIA can use
the constant zero like a general register. */ the constant zero like a general register. */
int int
sh_register_operand (op, mode) sh_register_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (op == CONST0_RTX (mode) && TARGET_SHMEDIA) if (op == CONST0_RTX (mode) && TARGET_SHMEDIA)
return 1; return 1;
return register_operand (op, mode); return register_operand (op, mode);
} }
static rtx emit_load_ptr PARAMS ((rtx, rtx)); static rtx emit_load_ptr (rtx, rtx);
static rtx static rtx
emit_load_ptr (reg, addr) emit_load_ptr (rtx reg, rtx addr)
rtx reg, addr;
{ {
rtx mem = gen_rtx_MEM (ptr_mode, addr); rtx mem = gen_rtx_MEM (ptr_mode, addr);
...@@ -9071,12 +8819,9 @@ emit_load_ptr (reg, addr) ...@@ -9071,12 +8819,9 @@ emit_load_ptr (reg, addr)
} }
void void
sh_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
FILE *file; HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree thunk_fndecl ATTRIBUTE_UNUSED; tree function)
HOST_WIDE_INT delta;
HOST_WIDE_INT vcall_offset;
tree function;
{ {
CUMULATIVE_ARGS cum; CUMULATIVE_ARGS cum;
int structure_value_byref = 0; int structure_value_byref = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment