#define GCC_SH_PROTOS_H
#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. */
-extern const char *output_branch PARAMS ((int, rtx, rtx *));
-extern const char *output_ieee_ccmpeq PARAMS ((rtx, rtx *));
-extern const char *output_branchy_insn PARAMS ((enum rtx_code, const char *, rtx, rtx *));
-extern const char *output_movedouble PARAMS ((rtx, rtx[], enum machine_mode));
-extern const char *output_movepcrel PARAMS ((rtx, rtx[], enum machine_mode));
-extern const char *output_far_jump PARAMS ((rtx, rtx));
+extern const char *output_branch (int, rtx, rtx *);
+extern const char *output_ieee_ccmpeq (rtx, rtx *);
+extern const char *output_branchy_insn (enum rtx_code, const char *, rtx, rtx *);
+extern const char *output_movedouble (rtx, rtx[], enum machine_mode);
+extern const char *output_movepcrel (rtx, rtx[], enum machine_mode);
+extern const char *output_far_jump (rtx, rtx);
-extern struct rtx_def *sfunc_uses_reg PARAMS ((rtx));
-extern int barrier_align PARAMS ((rtx));
-extern int sh_loop_align PARAMS ((rtx));
-extern int fp_zero_operand PARAMS ((rtx));
-extern int fp_one_operand PARAMS ((rtx));
-extern int fp_int_operand PARAMS ((rtx));
-extern rtx get_fpscr_rtx PARAMS ((void));
-extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx));
-extern int nonpic_symbol_mentioned_p PARAMS ((rtx));
-extern void emit_sf_insn PARAMS ((rtx));
-extern void emit_df_insn PARAMS ((rtx));
-extern void print_operand_address PARAMS ((FILE *, rtx));
-extern void print_operand PARAMS ((FILE *, rtx, int));
-extern void output_pic_addr_const PARAMS ((FILE *, rtx));
-extern int expand_block_move PARAMS ((rtx *));
-extern int prepare_move_operands PARAMS ((rtx[], enum machine_mode mode));
-extern void from_compare PARAMS ((rtx *, int));
-extern int shift_insns_rtx PARAMS ((rtx));
-extern void gen_ashift PARAMS ((int, int, rtx));
-extern void gen_ashift_hi PARAMS ((int, int, rtx));
-extern void gen_shifty_op PARAMS ((int, rtx *));
-extern void gen_shifty_hi_op PARAMS ((int, rtx *));
-extern int expand_ashiftrt PARAMS ((rtx *));
-extern int sh_dynamicalize_shift_p PARAMS ((rtx));
-extern int shl_and_kind PARAMS ((rtx, rtx, int *));
-extern int shl_and_length PARAMS ((rtx));
-extern int shl_and_scr_length PARAMS ((rtx));
-extern int gen_shl_and PARAMS ((rtx, rtx, rtx, rtx));
-extern int shl_sext_kind PARAMS ((rtx, rtx, int *));
-extern int shl_sext_length PARAMS ((rtx));
-extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
-extern rtx gen_datalabel_ref PARAMS ((rtx));
-extern int regs_used PARAMS ((rtx, int));
-extern void fixup_addr_diff_vecs PARAMS ((rtx));
-extern int get_dest_uid PARAMS ((rtx, int));
-extern void final_prescan_insn PARAMS ((rtx, rtx *, int));
-extern int symbol_ref_operand PARAMS ((rtx, enum machine_mode));
-extern int tls_symbolic_operand PARAMS ((rtx, enum machine_mode));
-extern int system_reg_operand PARAMS ((rtx, enum machine_mode));
-extern int general_movsrc_operand PARAMS ((rtx, enum machine_mode));
-extern int general_movdst_operand PARAMS ((rtx, enum machine_mode));
-extern int arith_reg_operand PARAMS ((rtx, enum machine_mode));
-extern int fp_arith_reg_operand PARAMS ((rtx, enum machine_mode));
-extern int arith_operand PARAMS ((rtx, enum machine_mode));
-extern int arith_reg_or_0_operand PARAMS ((rtx, enum machine_mode));
-extern int logical_operand PARAMS ((rtx, enum machine_mode));
-extern int tertiary_reload_operand PARAMS ((rtx, enum machine_mode));
-extern int fpscr_operand PARAMS ((rtx, enum machine_mode));
-extern int fpul_operand PARAMS ((rtx, enum machine_mode));
-extern int commutative_float_operator PARAMS ((rtx, enum machine_mode));
-extern int noncommutative_float_operator PARAMS ((rtx, enum machine_mode));
-extern int reg_unused_after PARAMS ((rtx, rtx));
-extern void expand_sf_unop PARAMS ((rtx (*)(rtx, rtx, rtx), rtx *));
-extern void expand_sf_binop PARAMS ((rtx (*)(rtx, rtx, rtx, rtx), rtx *));
-extern void expand_df_unop PARAMS ((rtx (*)(rtx, rtx, rtx), rtx *));
-extern void expand_df_binop PARAMS ((rtx (*)(rtx, rtx, rtx, rtx), rtx *));
-extern void expand_fp_branch PARAMS ((rtx (*)(void), rtx (*)(void)));
-extern int sh_insn_length_adjustment PARAMS ((rtx));
-extern int sh_can_redirect_branch PARAMS ((rtx, rtx));
-extern void sh_expand_unop_v2sf PARAMS ((enum rtx_code, rtx, rtx));
-extern void sh_expand_binop_v2sf PARAMS ((enum rtx_code, rtx, rtx, rtx));
+extern struct rtx_def *sfunc_uses_reg (rtx);
+extern int barrier_align (rtx);
+extern int sh_loop_align (rtx);
+extern int fp_zero_operand (rtx);
+extern int fp_one_operand (rtx);
+extern int fp_int_operand (rtx);
+extern rtx get_fpscr_rtx (void);
+extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
+extern int nonpic_symbol_mentioned_p (rtx);
+extern void emit_sf_insn (rtx);
+extern void emit_df_insn (rtx);
+extern void print_operand_address (FILE *, rtx);
+extern void print_operand (FILE *, rtx, int);
+extern void output_pic_addr_const (FILE *, rtx);
+extern int expand_block_move (rtx *);
+extern int prepare_move_operands (rtx[], enum machine_mode mode);
+extern void from_compare (rtx *, int);
+extern int shift_insns_rtx (rtx);
+extern void gen_ashift (int, int, rtx);
+extern void gen_ashift_hi (int, int, rtx);
+extern void gen_shifty_op (int, rtx *);
+extern void gen_shifty_hi_op (int, rtx *);
+extern int expand_ashiftrt (rtx *);
+extern int sh_dynamicalize_shift_p (rtx);
+extern int shl_and_kind (rtx, rtx, int *);
+extern int shl_and_length (rtx);
+extern int shl_and_scr_length (rtx);
+extern int gen_shl_and (rtx, rtx, rtx, rtx);
+extern int shl_sext_kind (rtx, rtx, int *);
+extern int shl_sext_length (rtx);
+extern int gen_shl_sext (rtx, rtx, rtx, rtx);
+extern rtx gen_datalabel_ref (rtx);
+extern int regs_used (rtx, int);
+extern void fixup_addr_diff_vecs (rtx);
+extern int get_dest_uid (rtx, int);
+extern void final_prescan_insn (rtx, rtx *, int);
+extern int symbol_ref_operand (rtx, enum machine_mode);
+extern int tls_symbolic_operand (rtx, enum machine_mode);
+extern int system_reg_operand (rtx, enum machine_mode);
+extern int general_movsrc_operand (rtx, enum machine_mode);
+extern int general_movdst_operand (rtx, enum machine_mode);
+extern int arith_reg_operand (rtx, enum machine_mode);
+extern int fp_arith_reg_operand (rtx, enum machine_mode);
+extern int arith_operand (rtx, enum machine_mode);
+extern int arith_reg_or_0_operand (rtx, enum machine_mode);
+extern int logical_operand (rtx, enum machine_mode);
+extern int tertiary_reload_operand (rtx, enum machine_mode);
+extern int fpscr_operand (rtx, enum machine_mode);
+extern int fpul_operand (rtx, enum machine_mode);
+extern int commutative_float_operator (rtx, enum machine_mode);
+extern int noncommutative_float_operator (rtx, enum machine_mode);
+extern int reg_unused_after (rtx, rtx);
+extern void expand_sf_unop (rtx (*)(rtx, rtx, rtx), rtx *);
+extern void expand_sf_binop (rtx (*)(rtx, rtx, rtx, rtx), rtx *);
+extern void expand_df_unop (rtx (*)(rtx, rtx, rtx), rtx *);
+extern void expand_df_binop (rtx (*)(rtx, rtx, rtx, rtx), rtx *);
+extern void expand_fp_branch (rtx (*)(void), rtx (*)(void));
+extern int sh_insn_length_adjustment (rtx);
+extern int sh_can_redirect_branch (rtx, rtx);
+extern void sh_expand_unop_v2sf (enum rtx_code, rtx, rtx);
+extern void sh_expand_binop_v2sf (enum rtx_code, rtx, rtx, rtx);
#ifdef TREE_CODE
-extern void sh_va_start PARAMS ((tree, rtx));
-extern rtx sh_va_arg PARAMS ((tree, tree));
+extern void sh_va_start (tree, rtx);
+extern rtx sh_va_arg (tree, tree);
#endif /* TREE_CODE */
#endif /* RTX_CODE */
#ifdef TREE_CODE
-extern tree sh_build_va_list PARAMS ((void));
+extern tree sh_build_va_list (void);
#endif /* TREE_CODE */
-extern const char *output_jump_label_table PARAMS ((void));
-extern int sh_handle_pragma PARAMS ((int (*)(void), void (*)(int), const char *));
-extern struct rtx_def *get_fpscr_rtx PARAMS ((void));
-extern int sh_media_register_for_return PARAMS ((void));
-extern void sh_expand_prologue PARAMS ((void));
-extern void sh_expand_epilogue PARAMS ((void));
-extern int sh_need_epilogue PARAMS ((void));
-extern void sh_set_return_address PARAMS ((rtx, rtx));
-extern int initial_elimination_offset PARAMS ((int, int));
-extern int fldi_ok PARAMS ((void));
-extern int sh_pr_n_sets PARAMS ((void));
-extern int sh_hard_regno_rename_ok PARAMS ((unsigned int, unsigned int));
-extern int sh_cfun_interrupt_handler_p PARAMS ((void));
-extern int sh_attr_renesas_p PARAMS ((tree));
-extern int sh_cfun_attr_renesas_p PARAMS ((void));
-extern void sh_initialize_trampoline PARAMS ((rtx, rtx, rtx));
+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);
+extern int sh_media_register_for_return (void);
+extern void sh_expand_prologue (void);
+extern void sh_expand_epilogue (void);
+extern int sh_need_epilogue (void);
+extern void sh_set_return_address (rtx, rtx);
+extern int initial_elimination_offset (int, int);
+extern int fldi_ok (void);
+extern int sh_pr_n_sets (void);
+extern int sh_hard_regno_rename_ok (unsigned int, unsigned int);
+extern int sh_cfun_interrupt_handler_p (void);
+extern int sh_attr_renesas_p (tree);
+extern int sh_cfun_attr_renesas_p (void);
+extern void sh_initialize_trampoline (rtx, rtx, rtx);
extern bool sh_cannot_change_mode_class
- PARAMS ((enum machine_mode, enum machine_mode, enum reg_class));
-extern void sh_mark_label PARAMS ((rtx, int));
+ (enum machine_mode, enum machine_mode, enum reg_class);
+extern void sh_mark_label (rtx, int);
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
-extern void fpscr_set_from_mem PARAMS ((int, HARD_REG_SET));
+extern void fpscr_set_from_mem (int, HARD_REG_SET);
#endif
-extern void sh_pr_interrupt PARAMS ((struct cpp_reader *));
-extern void sh_pr_trapa PARAMS ((struct cpp_reader *));
-extern void sh_pr_nosave_low_regs PARAMS ((struct cpp_reader *));
+extern void sh_pr_interrupt (struct cpp_reader *);
+extern void sh_pr_trapa (struct cpp_reader *);
+extern void sh_pr_nosave_low_regs (struct cpp_reader *);
extern rtx function_symbol (const char *);
extern rtx sh_get_pr_initial_val (void);
static bool shmedia_space_reserved_for_target_registers;
-static void split_branches PARAMS ((rtx));
-static int branch_dest PARAMS ((rtx));
-static void force_into PARAMS ((rtx, rtx));
-static void print_slot PARAMS ((rtx));
-static rtx add_constant PARAMS ((rtx, enum machine_mode, rtx));
-static void dump_table PARAMS ((rtx));
-static int hi_const PARAMS ((rtx));
-static int broken_move PARAMS ((rtx));
-static int mova_p PARAMS ((rtx));
-static rtx find_barrier PARAMS ((int, rtx, rtx));
-static int noncall_uses_reg PARAMS ((rtx, rtx, rtx *));
-static rtx gen_block_redirect PARAMS ((rtx, int, int));
-static void sh_reorg PARAMS ((void));
+static void split_branches (rtx);
+static int branch_dest (rtx);
+static void force_into (rtx, rtx);
+static void print_slot (rtx);
+static rtx add_constant (rtx, enum machine_mode, rtx);
+static void dump_table (rtx);
+static int hi_const (rtx);
+static int broken_move (rtx);
+static int mova_p (rtx);
+static rtx find_barrier (int, rtx, rtx);
+static int noncall_uses_reg (rtx, rtx, rtx *);
+static rtx gen_block_redirect (rtx, int, int);
+static void sh_reorg (void);
static void output_stack_adjust (int, rtx, int, HARD_REG_SET *);
-static rtx frame_insn PARAMS ((rtx));
-static rtx push PARAMS ((int));
-static void pop PARAMS ((int));
-static void push_regs PARAMS ((HARD_REG_SET *, int));
-static int calc_live_regs PARAMS ((HARD_REG_SET *));
-static void mark_use PARAMS ((rtx, rtx *));
-static HOST_WIDE_INT rounded_frame_size PARAMS ((int));
-static rtx mark_constant_pool_use PARAMS ((rtx));
+static rtx frame_insn (rtx);
+static rtx push (int);
+static void pop (int);
+static void push_regs (HARD_REG_SET *, int);
+static int calc_live_regs (HARD_REG_SET *);
+static void mark_use (rtx, rtx *);
+static HOST_WIDE_INT rounded_frame_size (int);
+static rtx mark_constant_pool_use (rtx);
const struct attribute_spec sh_attribute_table[];
-static tree sh_handle_interrupt_handler_attribute PARAMS ((tree *, tree, tree, int, bool *));
-static tree sh_handle_sp_switch_attribute PARAMS ((tree *, tree, tree, int, bool *));
-static tree sh_handle_trap_exit_attribute PARAMS ((tree *, tree, tree, int, bool *));
-static tree sh_handle_renesas_attribute PARAMS ((tree *, tree, tree, int, bool *));
-static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void sh_insert_attributes PARAMS ((tree, tree *));
-static int sh_adjust_cost PARAMS ((rtx, rtx, rtx, int));
-static int sh_use_dfa_interface PARAMS ((void));
-static int sh_issue_rate PARAMS ((void));
-static bool sh_function_ok_for_sibcall PARAMS ((tree, tree));
-
-static bool sh_cannot_modify_jumps_p PARAMS ((void));
+static tree sh_handle_interrupt_handler_attribute (tree *, tree, tree, int, bool *);
+static tree sh_handle_sp_switch_attribute (tree *, tree, tree, int, bool *);
+static tree sh_handle_trap_exit_attribute (tree *, tree, tree, int, bool *);
+static tree sh_handle_renesas_attribute (tree *, tree, tree, int, bool *);
+static void sh_output_function_epilogue (FILE *, HOST_WIDE_INT);
+static void sh_insert_attributes (tree, tree *);
+static int sh_adjust_cost (rtx, rtx, rtx, int);
+static int sh_use_dfa_interface (void);
+static int sh_issue_rate (void);
+static bool sh_function_ok_for_sibcall (tree, tree);
+
+static bool sh_cannot_modify_jumps_p (void);
static int sh_target_reg_class (void);
static bool sh_optimize_target_register_callee_saved (bool);
-static bool sh_ms_bitfield_layout_p PARAMS ((tree));
-
-static void sh_init_builtins PARAMS ((void));
-static void sh_media_init_builtins PARAMS ((void));
-static rtx sh_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int));
-static void sh_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
- HOST_WIDE_INT, tree));
-static void sh_file_start PARAMS ((void));
-static int flow_dependent_p PARAMS ((rtx, rtx));
-static void flow_dependent_p_1 PARAMS ((rtx, rtx, void *));
-static int shiftcosts PARAMS ((rtx));
-static int andcosts PARAMS ((rtx));
-static int addsubcosts PARAMS ((rtx));
-static int multcosts PARAMS ((rtx));
-static bool unspec_caller_rtx_p PARAMS ((rtx));
-static bool sh_cannot_copy_insn_p PARAMS ((rtx));
-static bool sh_rtx_costs PARAMS ((rtx, int, int, int *));
-static int sh_address_cost PARAMS ((rtx));
+static bool sh_ms_bitfield_layout_p (tree);
+
+static void sh_init_builtins (void);
+static void sh_media_init_builtins (void);
+static rtx sh_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
+static void sh_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
+static void sh_file_start (void);
+static int flow_dependent_p (rtx, rtx);
+static void flow_dependent_p_1 (rtx, rtx, void *);
+static int shiftcosts (rtx);
+static int andcosts (rtx);
+static int addsubcosts (rtx);
+static int multcosts (rtx);
+static bool unspec_caller_rtx_p (rtx);
+static bool sh_cannot_copy_insn_p (rtx);
+static bool sh_rtx_costs (rtx, int, int, int *);
+static int sh_address_cost (rtx);
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_target_regs_stack_adjust (HARD_REG_SET *);
static struct save_entry_s *sh5_schedule_saves (HARD_REG_SET *,
struct save_schedule_s *, int);
-static bool sh_promote_prototypes PARAMS ((tree));
-static rtx sh_struct_value_rtx PARAMS ((tree, int));
-static bool sh_return_in_memory PARAMS ((tree, tree));
-static rtx sh_builtin_saveregs PARAMS ((void));
-static void sh_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int));
-static bool sh_strict_argument_naming PARAMS ((CUMULATIVE_ARGS *));
-static bool sh_pretend_outgoing_varargs_named PARAMS ((CUMULATIVE_ARGS *));
+static bool sh_promote_prototypes (tree);
+static rtx sh_struct_value_rtx (tree, int);
+static bool sh_return_in_memory (tree, tree);
+static rtx sh_builtin_saveregs (void);
+static void sh_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
+static bool sh_strict_argument_naming (CUMULATIVE_ARGS *);
+static bool sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *);
\f
/* Initialize the GCC target structure. */
/* Print the operand address in x to the stream. */
void
-print_operand_address (stream, x)
- FILE *stream;
- rtx x;
+print_operand_address (FILE *stream, rtx x)
{
switch (GET_CODE (x))
{
'o' output an operator. */
void
-print_operand (stream, x, code)
- FILE *stream;
- rtx x;
- int code;
+print_operand (FILE *stream, rtx x, int code)
{
switch (code)
{
\f
/* Like force_operand, but guarantees that VALUE ends up in TARGET. */
static void
-force_into (value, target)
- rtx value, target;
+force_into (rtx value, rtx target)
{
value = force_operand (value, target);
if (! rtx_equal_p (value, target))
OPERANDS[3] is the alignment safe to use. */
int
-expand_block_move (operands)
- rtx *operands;
+expand_block_move (rtx *operands)
{
int align = INTVAL (operands[3]);
int constp = (GET_CODE (operands[2]) == CONST_INT);
operands must be in a register. */
int
-prepare_move_operands (operands, mode)
- rtx operands[];
- enum machine_mode mode;
+prepare_move_operands (rtx operands[], enum machine_mode mode)
{
if ((mode == SImode || mode == DImode)
&& flag_pic
/* Prepare the operands for an scc instruction; make sure that the
compare has been done. */
rtx
-prepare_scc_operands (code)
- enum rtx_code code;
+prepare_scc_operands (enum rtx_code code)
{
rtx t_reg = gen_rtx_REG (SImode, T_REG);
enum rtx_code oldcode = code;
/* Called from the md file, set up the operands of a compare instruction. */
void
-from_compare (operands, code)
- rtx *operands;
- int code;
+from_compare (rtx *operands, int code)
{
enum machine_mode mode = GET_MODE (sh_compare_op0);
rtx insn;
to take care when we see overlapping source and dest registers. */
const char *
-output_movedouble (insn, operands, mode)
- rtx insn ATTRIBUTE_UNUSED;
- rtx operands[];
- enum machine_mode mode;
+output_movedouble (rtx insn ATTRIBUTE_UNUSED, rtx operands[],
+ enum machine_mode mode)
{
rtx dst = operands[0];
rtx src = operands[1];
into a sequence where putting the slot insn at the end wouldn't work. */
static void
-print_slot (insn)
- rtx insn;
+print_slot (rtx insn)
{
final_scan_insn (XVECEXP (insn, 0, 1), asm_out_file, optimize, 0, 1);
}
const char *
-output_far_jump (insn, op)
- rtx insn;
- rtx op;
+output_far_jump (rtx insn, rtx op)
{
struct { rtx lab, reg, op; } this;
rtx braf_base_lab = NULL_RTX;
/* Output code for ordinary branches. */
const char *
-output_branch (logic, insn, operands)
- int logic;
- rtx insn;
- rtx *operands;
+output_branch (int logic, rtx insn, rtx *operands)
{
switch (get_attr_length (insn))
{
}
const char *
-output_branchy_insn (code, template, insn, operands)
- enum rtx_code code;
- const char *template;
- rtx insn;
- rtx *operands;
+output_branchy_insn (enum rtx_code code, const char *template,
+ rtx insn, rtx *operands)
{
rtx next_insn = NEXT_INSN (insn);
}
const char *
-output_ieee_ccmpeq (insn, operands)
- rtx insn, *operands;
+output_ieee_ccmpeq (rtx insn, rtx *operands)
{
return output_branchy_insn (NE, "bt\t%l9\\;fcmp/eq\t%1,%0", insn, operands);
}
/* Output the start of the assembler file. */
static void
-sh_file_start ()
+sh_file_start (void)
{
default_file_start ();
/* Check if PAT includes UNSPEC_CALLER unspec pattern. */
static bool
-unspec_caller_rtx_p (pat)
- rtx pat;
+unspec_caller_rtx_p (rtx pat)
{
switch (GET_CODE (pat))
{
that generates an unique label. */
static bool
-sh_cannot_copy_insn_p (insn)
- rtx insn;
+sh_cannot_copy_insn_p (rtx insn)
{
rtx pat;
of arbitrary constant shift instructions. */
int
-shift_insns_rtx (insn)
- rtx insn;
+shift_insns_rtx (rtx insn)
{
rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
int shift_count = INTVAL (XEXP (set_src, 1));
/* Return the cost of a shift. */
static inline int
-shiftcosts (x)
- rtx x;
+shiftcosts (rtx x)
{
int value;
/* Return the cost of an AND operation. */
static inline int
-andcosts (x)
- rtx x;
+andcosts (rtx x)
{
int i;
/* Return the cost of an addition or a subtraction. */
static inline int
-addsubcosts (x)
- rtx x;
+addsubcosts (rtx x)
{
/* Adding a register is a single cycle insn. */
if (GET_CODE (XEXP (x, 1)) == REG
/* Return the cost of a multiply. */
static inline int
-multcosts (x)
- rtx x ATTRIBUTE_UNUSED;
+multcosts (rtx x ATTRIBUTE_UNUSED)
{
if (TARGET_SHMEDIA)
return 3;
scanned. In either case, *TOTAL contains the cost result. */
static bool
-sh_rtx_costs (x, code, outer_code, total)
- rtx x;
- int code, outer_code, *total;
+sh_rtx_costs (rtx x, int code, int outer_code, int *total)
{
switch (code)
{
since it increases pressure on r0. */
static int
-sh_address_cost (X)
- rtx X;
+sh_address_cost (rtx X)
{
return (GET_CODE (X) == PLUS
&& ! CONSTANT_P (XEXP (X, 1))
/* Code to expand a shift. */
void
-gen_ashift (type, n, reg)
- int type;
- int n;
- rtx reg;
+gen_ashift (int type, int n, rtx reg)
{
/* Negative values here come from the shift_amounts array. */
if (n < 0)
/* Same for HImode */
void
-gen_ashift_hi (type, n, reg)
- int type;
- int n;
- rtx reg;
+gen_ashift_hi (int type, int n, rtx reg)
{
/* Negative values here come from the shift_amounts array. */
if (n < 0)
shift instructions. */
void
-gen_shifty_op (code, operands)
- int code;
- rtx *operands;
+gen_shifty_op (int code, rtx *operands)
{
int value = INTVAL (operands[2]);
int max, i;
matter. */
void
-gen_shifty_hi_op (code, operands)
- int code;
- rtx *operands;
+gen_shifty_hi_op (int code, rtx *operands)
{
int value = INTVAL (operands[2]);
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
high bits known to be cleared. */
/* ??? Rewrite to use super-optimizer sequences. */
int
-expand_ashiftrt (operands)
- rtx *operands;
+expand_ashiftrt (rtx *operands)
{
rtx sym;
rtx wrk;
}
int
-sh_dynamicalize_shift_p (count)
- rtx count;
+sh_dynamicalize_shift_p (rtx count)
{
return shift_insns[INTVAL (count)] > 1 + SH_DYNAMIC_SHIFT_COST;
}
shift_amounts for the last shift value that is to be used before the
sign extend. */
int
-shl_and_kind (left_rtx, mask_rtx, attrp)
- rtx left_rtx, mask_rtx;
- int *attrp;
+shl_and_kind (rtx left_rtx, rtx mask_rtx, int *attrp)
{
unsigned HOST_WIDE_INT mask, lsb, mask2, lsb2;
int left = INTVAL (left_rtx), right;
/* This is used in length attributes of the unnamed instructions
corresponding to shl_and_kind return values of 1 and 2. */
int
-shl_and_length (insn)
- rtx insn;
+shl_and_length (rtx insn)
{
rtx set_src, left_rtx, mask_rtx;
int attributes[3];
/* This is used in length attribute of the and_shl_scratch instruction. */
int
-shl_and_scr_length (insn)
- rtx insn;
+shl_and_scr_length (rtx insn)
{
rtx set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
int len = shift_insns[INTVAL (XEXP (set_src, 1))];
method of generating them, i.e. returned zero. */
int
-gen_shl_and (dest, left_rtx, mask_rtx, source)
- rtx dest, left_rtx, mask_rtx, source;
+gen_shl_and (rtx dest, rtx left_rtx, rtx mask_rtx, rtx source)
{
int attributes[3];
unsigned HOST_WIDE_INT mask;
int kind = shl_and_kind (left_rtx, mask_rtx, attributes);
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];
total_shift = INTVAL (left_rtx) + right;
If COSTP is nonzero, assign the calculated cost to *COSTP. */
int
-shl_sext_kind (left_rtx, size_rtx, costp)
- rtx left_rtx, size_rtx;
- int *costp;
+shl_sext_kind (rtx left_rtx, rtx size_rtx, int *costp)
{
int left, size, insize, ext;
int cost = 0, best_cost;
implementing this pattern. */
int
-shl_sext_length (insn)
- rtx insn;
+shl_sext_length (rtx insn)
{
rtx set_src, left_rtx, size_rtx;
int cost;
/* Generate rtl for this pattern */
int
-gen_shl_sext (dest, left_rtx, size_rtx, source)
- rtx dest, left_rtx, size_rtx, source;
+gen_shl_sext (rtx dest, rtx left_rtx, rtx size_rtx, rtx source)
{
int kind;
int left, size, insize, cost;
/* Prefix a symbol_ref name with "datalabel". */
rtx
-gen_datalabel_ref (sym)
- rtx sym;
+gen_datalabel_ref (rtx sym)
{
if (GET_CODE (sym) == LABEL_REF)
return gen_rtx_CONST (GET_MODE (sym),
/* Add a constant to the pool and return its label. */
static rtx
-add_constant (x, mode, last_value)
- rtx x;
- enum machine_mode mode;
- rtx last_value;
+add_constant (rtx x, enum machine_mode mode, rtx last_value)
{
int i;
rtx lab, new, ref, newref;
/* Output the literal table. */
static void
-dump_table (scan)
- rtx scan;
+dump_table (rtx scan)
{
int i;
int need_align = 1;
mov.w instead of a mov.l. */
static int
-hi_const (src)
- rtx src;
+hi_const (rtx src)
{
return (GET_CODE (src) == CONST_INT
&& INTVAL (src) >= -32768
need to fix it if the input value is CONST_OK_FOR_I08. */
static int
-broken_move (insn)
- rtx insn;
+broken_move (rtx insn)
{
if (GET_CODE (insn) == INSN)
{
}
static int
-mova_p (insn)
- rtx insn;
+mova_p (rtx insn)
{
return (GET_CODE (insn) == INSN
&& GET_CODE (PATTERN (insn)) == SET
the range. */
static rtx
-find_barrier (num_mova, mova, from)
- int num_mova;
- rtx mova, from;
+find_barrier (int num_mova, rtx mova, rtx from)
{
int count_si = 0;
int count_hi = 0;
register is not used anywhere else in this instruction - except as the
destination of a set, return this register; else, return 0. */
rtx
-sfunc_uses_reg (insn)
- rtx insn;
+sfunc_uses_reg (rtx insn)
{
int i;
rtx pattern, part, reg_part, reg;
is set by INSN. */
static int
-noncall_uses_reg (reg, insn, set)
- rtx reg;
- rtx insn;
- rtx *set;
+noncall_uses_reg (rtx reg, rtx insn, rtx *set)
{
rtx pattern, reg2;
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. */
int
-regs_used (x, is_dest)
- rtx x; int is_dest;
+regs_used (rtx x, int is_dest)
{
enum rtx_code code;
const char *fmt;
If a blocking instruction is made or recognized, return it. */
static rtx
-gen_block_redirect (jump, addr, need_block)
- rtx jump;
- int addr, need_block;
+gen_block_redirect (rtx jump, int addr, int need_block)
{
int dead = 0;
rtx prev = prev_nonnote_insn (jump);
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;
static void
-gen_far_branch (bp)
- struct far_branch *bp;
+gen_far_branch (struct far_branch *bp)
{
rtx insn = bp->insert_place;
rtx jump;
/* Fix up ADDR_DIFF_VECs. */
void
-fixup_addr_diff_vecs (first)
- rtx first;
+fixup_addr_diff_vecs (rtx first)
{
rtx insn;
/* BARRIER_OR_LABEL is either a BARRIER or a CODE_LABEL immediately following
a barrier. Return the base 2 logarithm of the desired alignment. */
int
-barrier_align (barrier_or_label)
- rtx barrier_or_label;
+barrier_align (rtx barrier_or_label)
{
rtx next = next_real_insn (barrier_or_label), pat, prev;
int slot, credit, jump_to_next = 0;
Applying loop alignment to small constant or switch tables is a waste
of space, so we suppress this too. */
int
-sh_loop_align (label)
- rtx label;
+sh_loop_align (rtx label)
{
rtx next = label;
scheduling. */
static void
-sh_reorg ()
+sh_reorg (void)
{
rtx first, insn, mova = NULL_RTX;
int num_mova;
}
int
-get_dest_uid (label, max_uid)
- rtx label;
- int max_uid;
+get_dest_uid (rtx label, int max_uid)
{
rtx dest = next_real_insn (label);
int dest_uid;
find branches with common targets more easily. */
static void
-split_branches (first)
- rtx first;
+split_branches (rtx first)
{
rtx insn;
struct far_branch **uid_branch, *far_branch_list = 0;
does not bother to update them. */
void
-final_prescan_insn (insn, opvec, noperands)
- rtx insn;
- rtx *opvec ATTRIBUTE_UNUSED;
- int noperands ATTRIBUTE_UNUSED;
+final_prescan_insn (rtx insn, rtx *opvec ATTRIBUTE_UNUSED,
+ int noperands ATTRIBUTE_UNUSED)
{
if (TARGET_DUMPISIZE)
fprintf (asm_out_file, "\n! at %04x\n", INSN_ADDRESSES (INSN_UID (insn)));
only be labels. */
const char *
-output_jump_label_table ()
+output_jump_label_table (void)
{
int i;
}
static rtx
-frame_insn (x)
- rtx x;
+frame_insn (rtx x)
{
x = emit_insn (x);
RTX_FRAME_RELATED_P (x) = 1;
/* Output RTL to push register RN onto the stack. */
static rtx
-push (rn)
- int rn;
+push (int rn)
{
rtx x;
if (rn == FPUL_REG)
/* Output RTL to pop register RN from the stack. */
static void
-pop (rn)
- int rn;
+pop (int rn)
{
rtx x;
if (rn == FPUL_REG)
/* Generate code to push the regs specified in the mask. */
static void
-push_regs (mask, interrupt_handler)
- HARD_REG_SET *mask;
- int interrupt_handler;
+push_regs (HARD_REG_SET *mask, int interrupt_handler)
{
int i;
int skip_fpscr = 0;
make sure that all the regs it clobbers are safe too. */
static int
-calc_live_regs (live_regs_mask)
- HARD_REG_SET *live_regs_mask;
+calc_live_regs (HARD_REG_SET *live_regs_mask)
{
int reg;
int count;
stack for register saves. Return the frame size, padded
appropriately so that the stack stays properly aligned. */
static HOST_WIDE_INT
-rounded_frame_size (pushed)
- int pushed;
+rounded_frame_size (int pushed)
{
HOST_WIDE_INT size = get_frame_size ();
HOST_WIDE_INT align = STACK_BOUNDARY / BITS_PER_UNIT;
unchanged along the whole function. We set it up as the return
value in the prologue. */
int
-sh_media_register_for_return ()
+sh_media_register_for_return (void)
{
int regno;
int tr0_used;
}
void
-sh_expand_prologue ()
+sh_expand_prologue (void)
{
HARD_REG_SET live_regs_mask;
int d, i;
}
void
-sh_expand_epilogue ()
+sh_expand_epilogue (void)
{
HARD_REG_SET live_regs_mask;
int d, i;
static int sh_need_epilogue_known = 0;
int
-sh_need_epilogue ()
+sh_need_epilogue (void)
{
if (! sh_need_epilogue_known)
{
TEMP is available as a scratch register, if needed. */
void
-sh_set_return_address (ra, tmp)
- rtx ra, tmp;
+sh_set_return_address (rtx ra, rtx tmp)
{
HARD_REG_SET live_regs_mask;
int d;
/* Clear variables at function end. */
static void
-sh_output_function_epilogue (file, size)
- FILE *file ATTRIBUTE_UNUSED;
- HOST_WIDE_INT size ATTRIBUTE_UNUSED;
+sh_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
+ HOST_WIDE_INT size ATTRIBUTE_UNUSED)
{
trap_exit = pragma_interrupt = pragma_trapa = pragma_nosave_low_regs = 0;
sh_need_epilogue_known = 0;
}
static rtx
-sh_builtin_saveregs ()
+sh_builtin_saveregs (void)
{
/* First unnamed integer register. */
int first_intreg = current_function_args_info.arg_count[(int) SH_ARG_INT];
/* Define the `__builtin_va_list' type for the ABI. */
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 record;
/* Implement `va_start' for varargs and stdarg. */
void
-sh_va_start (valist, nextarg)
- tree valist;
- rtx nextarg;
+sh_va_start (tree valist, rtx nextarg)
{
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;
/* Implement `va_arg'. */
rtx
-sh_va_arg (valist, type)
- tree valist, type;
+sh_va_arg (tree valist, tree type)
{
HOST_WIDE_INT size, rsize;
tree tmp, pptr_type_node;
}
static bool
-sh_promote_prototypes (type)
- tree type;
+sh_promote_prototypes (tree type)
{
if (TARGET_HITACHI)
return 0;
rtx
-sh_function_arg (ca, mode, type, named)
- CUMULATIVE_ARGS *ca;
- enum machine_mode mode;
- tree type;
- int named;
+sh_function_arg (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ tree type, int named)
{
if (! TARGET_SH5 && mode == VOIDmode)
return GEN_INT (ca->renesas_abi ? 1 : 0);
available.) */
void
-sh_function_arg_advance (ca, mode, type, named)
- CUMULATIVE_ARGS *ca;
- enum machine_mode mode;
- tree type;
- int named;
+sh_function_arg_advance (CUMULATIVE_ARGS *ca, enum machine_mode mode,
+ tree type, int named)
{
if (ca->force_mem)
ca->force_mem = 0;
the address is passed like an invisible argument, but one that is always
passed in memory. */
static rtx
-sh_struct_value_rtx (fndecl, incoming)
- tree fndecl;
- int incoming ATTRIBUTE_UNUSED;
+sh_struct_value_rtx (tree fndecl, int incoming ATTRIBUTE_UNUSED)
{
if (TARGET_HITACHI || sh_attr_renesas_p (fndecl))
return 0;
}
static bool
-sh_return_in_memory (type, fndecl)
- tree type;
- tree fndecl;
+sh_return_in_memory (tree type, tree fndecl)
{
if (TARGET_SH5)
{
later. Fortunately, we already have two flags that are part of struct
function that tell if a function uses varargs or stdarg. */
static void
-sh_setup_incoming_varargs (ca, mode, type, pretend_arg_size, second_time)
- CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED;
- enum machine_mode mode ATTRIBUTE_UNUSED;
- tree type ATTRIBUTE_UNUSED;
- int *pretend_arg_size ATTRIBUTE_UNUSED;
- int second_time ATTRIBUTE_UNUSED;
+sh_setup_incoming_varargs (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED,
+ tree type ATTRIBUTE_UNUSED,
+ int *pretend_arg_size ATTRIBUTE_UNUSED,
+ int second_time ATTRIBUTE_UNUSED)
{
if (! current_function_stdarg)
abort ();
}
static bool
-sh_strict_argument_naming (ca)
- CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED;
+sh_strict_argument_naming (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED)
{
return TARGET_SH5;
}
static bool
-sh_pretend_outgoing_varargs_named (ca)
- CUMULATIVE_ARGS *ca;
+sh_pretend_outgoing_varargs_named (CUMULATIVE_ARGS *ca)
{
return ! (TARGET_HITACHI || ca->renesas_abi) && ! TARGET_SH5;
}
the other its replacement, at the start of a routine. */
int
-initial_elimination_offset (from, to)
- int from;
- int to;
+initial_elimination_offset (int from, int to)
{
int regs_saved;
int regs_saved_rounding = 0;
compiler. */
void
-sh_pr_interrupt (pfile)
- struct cpp_reader *pfile ATTRIBUTE_UNUSED;
+sh_pr_interrupt (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
{
pragma_interrupt = 1;
}
void
-sh_pr_trapa (pfile)
- struct cpp_reader *pfile ATTRIBUTE_UNUSED;
+sh_pr_trapa (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
{
pragma_interrupt = pragma_trapa = 1;
}
void
-sh_pr_nosave_low_regs (pfile)
- struct cpp_reader *pfile ATTRIBUTE_UNUSED;
+sh_pr_nosave_low_regs (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
{
pragma_nosave_low_regs = 1;
}
/* Generate 'handle_interrupt' attribute for decls */
static void
-sh_insert_attributes (node, attributes)
- tree node;
- tree * attributes;
+sh_insert_attributes (tree node, tree *attributes)
{
if (! pragma_interrupt
|| TREE_CODE (node) != FUNCTION_DECL)
/* Handle an "interrupt_handler" attribute; arguments as in
struct attribute_spec.handler. */
static tree
-sh_handle_interrupt_handler_attribute (node, name, args, flags, no_add_attrs)
- tree *node;
- tree name;
- tree args ATTRIBUTE_UNUSED;
- int flags ATTRIBUTE_UNUSED;
- bool *no_add_attrs;
+sh_handle_interrupt_handler_attribute (tree *node, tree name,
+ tree args ATTRIBUTE_UNUSED,
+ int flags ATTRIBUTE_UNUSED,
+ bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
/* Handle an "sp_switch" attribute; arguments as in
struct attribute_spec.handler. */
static tree
-sh_handle_sp_switch_attribute (node, name, args, flags, no_add_attrs)
- tree *node;
- tree name;
- tree args;
- int flags ATTRIBUTE_UNUSED;
- bool *no_add_attrs;
+sh_handle_sp_switch_attribute (tree *node, tree name, tree args,
+ int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
/* Handle an "trap_exit" attribute; arguments as in
struct attribute_spec.handler. */
static tree
-sh_handle_trap_exit_attribute (node, name, args, flags, no_add_attrs)
- tree *node;
- tree name;
- tree args;
- int flags ATTRIBUTE_UNUSED;
- bool *no_add_attrs;
+sh_handle_trap_exit_attribute (tree *node, tree name, tree args,
+ int flags ATTRIBUTE_UNUSED, bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
}
static tree
-sh_handle_renesas_attribute (node, name, args, flags, no_add_attrs)
- tree *node ATTRIBUTE_UNUSED;
- tree name ATTRIBUTE_UNUSED;
- tree args ATTRIBUTE_UNUSED;
- int flags ATTRIBUTE_UNUSED;
- bool *no_add_attrs ATTRIBUTE_UNUSED;
+sh_handle_renesas_attribute (tree *node ATTRIBUTE_UNUSED,
+ tree name ATTRIBUTE_UNUSED,
+ tree args ATTRIBUTE_UNUSED,
+ int flags ATTRIBUTE_UNUSED,
+ bool *no_add_attrs ATTRIBUTE_UNUSED)
{
return NULL_TREE;
}
/* True if __attribute__((renesas)) or -mrenesas. */
int
-sh_attr_renesas_p (td)
- tree td;
+sh_attr_renesas_p (tree td)
{
if (TARGET_HITACHI)
return 1;
/* True if __attribute__((renesas)) or -mrenesas, for the current
function. */
int
-sh_cfun_attr_renesas_p ()
+sh_cfun_attr_renesas_p (void)
{
return sh_attr_renesas_p (current_function_decl);
}
int
-sh_cfun_interrupt_handler_p ()
+sh_cfun_interrupt_handler_p (void)
{
return (lookup_attribute ("interrupt_handler",
DECL_ATTRIBUTES (current_function_decl))
Used only in general_movsrc_operand. */
int
-system_reg_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+system_reg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (REGNO (op))
{
invalid as are subregs of system registers. */
int
-general_movsrc_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+general_movsrc_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == MEM)
{
Same as general_operand, but no preinc allowed. */
int
-general_movdst_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+general_movdst_operand (rtx op, enum machine_mode mode)
{
/* Only pre dec allowed. */
if (GET_CODE (op) == MEM && GET_CODE (XEXP (op, 0)) == POST_INC)
/* Returns 1 if OP is a normal arithmetic register. */
int
-arith_reg_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+arith_reg_operand (rtx op, enum machine_mode mode)
{
if (register_operand (op, mode))
{
because this would lead to missing sign extensions when truncating from
DImode to SImode. */
int
-arith_reg_dest (op, mode)
- rtx op;
- enum machine_mode mode;
+arith_reg_dest (rtx op, enum machine_mode mode)
{
if (mode == DImode && GET_CODE (op) == SUBREG
&& GET_MODE_SIZE (GET_MODE (SUBREG_REG (op))) < 8)
}
int
-int_gpr_dest (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+int_gpr_dest (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
enum machine_mode op_mode = GET_MODE (op);
}
int
-fp_arith_reg_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+fp_arith_reg_operand (rtx op, enum machine_mode mode)
{
if (register_operand (op, mode))
{
/* Returns 1 if OP is a valid source operand for an arithmetic insn. */
int
-arith_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+arith_operand (rtx op, enum machine_mode mode)
{
if (arith_reg_operand (op, mode))
return 1;
/* Returns 1 if OP is a valid source operand for a compare insn. */
int
-arith_reg_or_0_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+arith_reg_or_0_operand (rtx op, enum machine_mode mode)
{
if (arith_reg_operand (op, mode))
return 1;
that takes either a register or a 6-bit immediate. */
int
-shmedia_6bit_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+shmedia_6bit_operand (rtx op, enum machine_mode mode)
{
return (arith_reg_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && CONST_OK_FOR_I06 (INTVAL (op))));
/* Returns 1 if OP is a valid source operand for a logical operation. */
int
-logical_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+logical_operand (rtx op, enum machine_mode mode)
{
if (arith_reg_operand (op, mode))
return 1;
}
int
-and_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+and_operand (rtx op, enum machine_mode mode)
{
if (logical_operand (op, mode))
return 1;
/* Nonzero if OP is a floating point value with value 0.0. */
int
-fp_zero_operand (op)
- rtx op;
+fp_zero_operand (rtx op)
{
REAL_VALUE_TYPE r;
/* Nonzero if OP is a floating point value with value 1.0. */
int
-fp_one_operand (op)
- rtx op;
+fp_one_operand (rtx op)
{
REAL_VALUE_TYPE r;
choosing an fldi alternative during reload and thus failing to
allocate a scratch register for the constant loading. */
int
-fldi_ok ()
+fldi_ok (void)
{
return ! TARGET_SH4 || TARGET_FMOVD || reload_completed;
}
int
-tertiary_reload_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+tertiary_reload_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
enum rtx_code code = GET_CODE (op);
return code == MEM || (TARGET_SH4 && code == CONST_DOUBLE);
}
int
-fpscr_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+fpscr_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return (GET_CODE (op) == REG && REGNO (op) == FPSCR_REG
&& GET_MODE (op) == PSImode);
}
int
-fpul_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+fpul_operand (rtx op, enum machine_mode mode)
{
if (TARGET_SHMEDIA)
return fp_arith_reg_operand (op, mode);
}
int
-symbol_ref_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+symbol_ref_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
return (GET_CODE (op) == SYMBOL_REF);
}
/* Return the TLS type for TLS symbols, 0 for otherwise. */
int
-tls_symbolic_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+tls_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) != SYMBOL_REF)
return 0;
}
int
-commutative_float_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+commutative_float_operator (rtx op, enum machine_mode mode)
{
if (GET_MODE (op) != mode)
return 0;
}
int
-noncommutative_float_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+noncommutative_float_operator (rtx op, enum machine_mode mode)
{
if (GET_MODE (op) != mode)
return 0;
}
int
-unary_float_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+unary_float_operator (rtx op, enum machine_mode mode)
{
if (GET_MODE (op) != mode)
return 0;
}
int
-binary_float_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+binary_float_operator (rtx op, enum machine_mode mode)
{
if (GET_MODE (op) != mode)
return 0;
}
int
-binary_logical_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+binary_logical_operator (rtx op, enum machine_mode mode)
{
if (GET_MODE (op) != mode)
return 0;
}
int
-equality_comparison_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+equality_comparison_operator (rtx op, enum machine_mode mode)
{
return ((mode == VOIDmode || GET_MODE (op) == mode)
&& (GET_CODE (op) == EQ || GET_CODE (op) == NE));
}
-int greater_comparison_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+int greater_comparison_operator (rtx op, enum machine_mode mode)
{
if (mode != VOIDmode && GET_MODE (op) == mode)
return 0;
}
}
-int less_comparison_operator (op, mode)
- rtx op;
- enum machine_mode mode;
+int less_comparison_operator (rtx op, enum machine_mode mode)
{
if (mode != VOIDmode && GET_MODE (op) == mode)
return 0;
/* Accept pseudos and branch target registers. */
int
-target_reg_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+target_reg_operand (rtx op, enum machine_mode mode)
{
if (mode != DImode
|| GET_MODE (op) != DImode)
/* Same as target_reg_operand, except that label_refs and symbol_refs
are accepted before reload. */
int
-target_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+target_operand (rtx op, enum machine_mode mode)
{
if (mode != DImode)
return 0;
}
int
-mextr_bit_offset (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+mextr_bit_offset (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
HOST_WIDE_INT i;
}
int
-extend_reg_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+extend_reg_operand (rtx op, enum machine_mode mode)
{
return (GET_CODE (op) == TRUNCATE
? arith_operand
}
int
-trunc_hi_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+trunc_hi_operand (rtx op, enum machine_mode mode)
{
enum machine_mode op_mode = GET_MODE (op);
}
int
-extend_reg_or_0_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+extend_reg_or_0_operand (rtx op, enum machine_mode mode)
{
return (GET_CODE (op) == TRUNCATE
? arith_operand
}
int
-general_extend_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+general_extend_operand (rtx op, enum machine_mode mode)
{
return (GET_CODE (op) == TRUNCATE
? arith_operand
}
int
-inqhi_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+inqhi_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != TRUNCATE || mode != GET_MODE (op))
return 0;
}
int
-sh_rep_vec (v, mode)
- rtx v;
- enum machine_mode mode;
+sh_rep_vec (rtx v, enum machine_mode mode)
{
int i;
rtx x, y;
/* 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. */
int
-sh_1el_vec (v, mode)
- rtx v;
- enum machine_mode mode;
+sh_1el_vec (rtx v, enum machine_mode mode)
{
int unit_size;
int i, last, least, sign_ix;
}
int
-sh_const_vec (v, mode)
- rtx v;
- enum machine_mode mode;
+sh_const_vec (rtx v, enum machine_mode mode)
{
int i;
/* Return the destination address of a branch. */
static int
-branch_dest (branch)
- rtx branch;
+branch_dest (rtx branch)
{
rtx dest = SET_SRC (PATTERN (branch));
int dest_uid;
We assume REG is a reload reg, and therefore does
not live past labels. It may live past calls or jumps though. */
int
-reg_unused_after (reg, insn)
- rtx reg;
- rtx insn;
+reg_unused_after (rtx reg, rtx insn)
{
enum rtx_code code;
rtx set;
static GTY(()) rtx fpscr_rtx;
rtx
-get_fpscr_rtx ()
+get_fpscr_rtx (void)
{
if (! fpscr_rtx)
{
}
void
-emit_sf_insn (pat)
- rtx pat;
+emit_sf_insn (rtx pat)
{
emit_insn (pat);
}
void
-emit_df_insn (pat)
- rtx pat;
+emit_df_insn (rtx pat)
{
emit_insn (pat);
}
void
-expand_sf_unop (fun, operands)
- rtx (*fun) PARAMS ((rtx, rtx, rtx));
- rtx *operands;
+expand_sf_unop (rtx (*fun) (rtx, rtx, rtx), rtx *operands)
{
emit_sf_insn ((*fun) (operands[0], operands[1], get_fpscr_rtx ()));
}
void
-expand_sf_binop (fun, operands)
- rtx (*fun) PARAMS ((rtx, rtx, rtx, rtx));
- rtx *operands;
+expand_sf_binop (rtx (*fun) (rtx, rtx, rtx, rtx), rtx *operands)
{
emit_sf_insn ((*fun) (operands[0], operands[1], operands[2],
get_fpscr_rtx ()));
}
void
-expand_df_unop (fun, operands)
- rtx (*fun) PARAMS ((rtx, rtx, rtx));
- rtx *operands;
+expand_df_unop (rtx (*fun) (rtx, rtx, rtx), rtx *operands)
{
emit_df_insn ((*fun) (operands[0], operands[1], get_fpscr_rtx ()));
}
void
-expand_df_binop (fun, operands)
- rtx (*fun) PARAMS ((rtx, rtx, rtx, rtx));
- rtx *operands;
+expand_df_binop (rtx (*fun) (rtx, rtx, rtx, rtx), rtx *operands)
{
emit_df_insn ((*fun) (operands[0], operands[1], operands[2],
get_fpscr_rtx ()));
same basic block. */
static void
-mark_use (x, reg_set_block)
- rtx x, *reg_set_block;
+mark_use (rtx x, rtx *reg_set_block)
{
enum rtx_code code;
}
}
\f
-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
the fpscr from. Currently it always returns r1 or r7, but when we are
the middle. */
static rtx
-get_free_reg (regs_live)
- HARD_REG_SET regs_live;
+get_free_reg (HARD_REG_SET regs_live)
{
if (! TEST_HARD_REG_BIT (regs_live, 1))
return gen_rtx_REG (Pmode, 1);
/* This function will set the fpscr from memory.
MODE is the mode we are setting it to. */
void
-fpscr_set_from_mem (mode, regs_live)
- int mode;
- HARD_REG_SET regs_live;
+fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
{
enum attr_fp_mode fp_mode = mode;
rtx addr_reg = get_free_reg (regs_live);
#endif
int
-sh_insn_length_adjustment (insn)
- rtx insn;
+sh_insn_length_adjustment (rtx insn)
{
/* Instructions with unfilled delay slots take up an extra two bytes for
the nop in the delay slot. */
/* Return TRUE if X references a SYMBOL_REF or LABEL_REF whose symbol
isn't protected by a PIC unspec. */
int
-nonpic_symbol_mentioned_p (x)
- rtx x;
+nonpic_symbol_mentioned_p (rtx x)
{
register const char *fmt;
register int i;
/* Convert a non-PIC address in `orig' to a PIC address using @GOT or
@GOTOFF in `reg'. */
rtx
-legitimize_pic_address (orig, mode, reg)
- rtx orig;
- enum machine_mode mode ATTRIBUTE_UNUSED;
- rtx reg;
+legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
+ rtx reg)
{
if (tls_symbolic_operand (orig, Pmode))
return orig;
/* Mark the use of a constant in the literal table. If the constant
has multiple labels, make it unique. */
static rtx
-mark_constant_pool_use (x)
- rtx x;
+mark_constant_pool_use (rtx x)
{
rtx insn, lab, pattern;
of an unconditional jump BRANCH2. We only want to do this if the
resulting branch will have a short displacement. */
int
-sh_can_redirect_branch (branch1, branch2)
- rtx branch1;
- rtx branch2;
+sh_can_redirect_branch (rtx branch1, rtx branch2)
{
if (flag_expensive_optimizations && simplejump_p (branch2))
{
/* Return nonzero if register old_reg can be renamed to register new_reg. */
int
-sh_hard_regno_rename_ok (old_reg, new_reg)
- unsigned int old_reg ATTRIBUTE_UNUSED;
- unsigned int new_reg;
+sh_hard_regno_rename_ok (unsigned int old_reg ATTRIBUTE_UNUSED,
+ unsigned int new_reg)
{
/* Interrupt functions can only use registers that have already been
the same cost as a data-dependence. The return value should be
the new value for COST. */
static int
-sh_adjust_cost (insn, link, dep_insn, cost)
- rtx insn;
- rtx link ATTRIBUTE_UNUSED;
- rtx dep_insn;
- int cost;
+sh_adjust_cost (rtx insn, rtx link ATTRIBUTE_UNUSED, rtx dep_insn, int cost)
{
rtx reg, use_pat;
/* Check if INSN is flow-dependent on DEP_INSN. Can also be used to check
if DEP_INSN is anti-flow dependent on INSN. */
static int
-flow_dependent_p (insn, dep_insn)
- rtx insn, dep_insn;
+flow_dependent_p (rtx insn, rtx dep_insn)
{
rtx tmp = PATTERN (insn);
/* A helper function for flow_dependent_p called through note_stores. */
static void
-flow_dependent_p_1 (x, pat, data)
- rtx x;
- rtx pat ATTRIBUTE_UNUSED;
- void *data;
+flow_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
{
rtx * pinsn = (rtx *) data;
do not look like function calls to leaf_function_p. Hence we must
do this extra check. */
int
-sh_pr_n_sets ()
+sh_pr_n_sets (void)
{
return REG_N_SETS (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG);
}
/* This Function returns nonzero if the DFA based scheduler interface
is to be used. At present this is supported for the SH4 only. */
static int
-sh_use_dfa_interface()
+sh_use_dfa_interface(void)
{
if (TARGET_HARD_SH4)
return 1;
/* This function returns "2" to indicate dual issue for the SH4
processor. To be used by the DFA pipeline description. */
static int
-sh_issue_rate()
+sh_issue_rate(void)
{
if (TARGET_SUPERSCALAR)
return 2;
/* SHmedia requires registers for branches, so we can't generate new
branches past reload. */
static bool
-sh_cannot_modify_jumps_p ()
+sh_cannot_modify_jumps_p (void)
{
return (TARGET_SHMEDIA && (reload_in_progress || reload_completed));
}
CXT is an RTX for the static chain value for the function. */
void
-sh_initialize_trampoline (tramp, fnaddr, cxt)
- rtx tramp, fnaddr, cxt;
+sh_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
{
if (TARGET_SHMEDIA64)
{
own stack frame, so it must not pass pointers or references to
these arguments to other functions by means of sibling calls. */
static bool
-sh_function_ok_for_sibcall (decl, exp)
- tree decl;
- tree exp ATTRIBUTE_UNUSED;
+sh_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
{
return (decl
&& (! TARGET_SHCOMPACT
};
static void
-sh_media_init_builtins ()
+sh_media_init_builtins (void)
{
tree shared[SH_BLTIN_NUM_SHARED_SIGNATURES];
const struct builtin_description *d;
}
static void
-sh_init_builtins ()
+sh_init_builtins (void)
{
if (TARGET_SHMEDIA)
sh_media_init_builtins ();
IGNORE is nonzero if the value is to be ignored. */
static rtx
-sh_expand_builtin (exp, target, subtarget, mode, ignore)
- tree exp;
- rtx target;
- rtx subtarget ATTRIBUTE_UNUSED;
- enum machine_mode mode ATTRIBUTE_UNUSED;
- int ignore;
+sh_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
+ enum machine_mode mode ATTRIBUTE_UNUSED, int ignore)
{
tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
tree arglist = TREE_OPERAND (exp, 1);
}
void
-sh_expand_unop_v2sf (code, op0, op1)
- enum rtx_code code;
- rtx op0, op1;
+sh_expand_unop_v2sf (enum rtx_code code, rtx op0, rtx op1)
{
rtx sel0 = const0_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);
emit_insn ((*fn) (op0, op1, op, sel0, sel0));
}
void
-sh_expand_binop_v2sf (code, op0, op1, op2)
- enum rtx_code code;
- rtx op0, op1, op2;
+sh_expand_binop_v2sf (enum rtx_code code, rtx op0, rtx op1, rtx op2)
{
rtx sel0 = const0_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;
rtx op = gen_rtx_fmt_ee (code, SFmode, op1, op2);
/* Return the class of registers for which a mode change from FROM to TO
is invalid. */
bool
-sh_cannot_change_mode_class (from, to, class)
- enum machine_mode from, to;
- enum reg_class class;
+sh_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
+ enum reg_class class)
{
if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to))
{
that label is used. */
void
-sh_mark_label (address, nuses)
- rtx address;
- int nuses;
+sh_mark_label (rtx address, int nuses)
{
if (GOTOFF_P (address))
{
register information here is not used for SFmode. */
int
-sh_register_move_cost (mode, srcclass, dstclass)
- enum machine_mode mode;
- enum reg_class srcclass, dstclass;
+sh_register_move_cost (enum machine_mode mode,
+ enum reg_class srcclass, enum reg_class dstclass)
{
if (dstclass == T_REGS || dstclass == PR_REGS)
return 10;
/* Like register_operand, but take into account that SHMEDIA can use
the constant zero like a general register. */
int
-sh_register_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+sh_register_operand (rtx op, enum machine_mode mode)
{
if (op == CONST0_RTX (mode) && TARGET_SHMEDIA)
return 1;
return register_operand (op, mode);
}
-static rtx emit_load_ptr PARAMS ((rtx, rtx));
+static rtx emit_load_ptr (rtx, rtx);
static rtx
-emit_load_ptr (reg, addr)
- rtx reg, addr;
+emit_load_ptr (rtx reg, rtx addr)
{
rtx mem = gen_rtx_MEM (ptr_mode, addr);
}
void
-sh_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function)
- FILE *file;
- tree thunk_fndecl ATTRIBUTE_UNUSED;
- HOST_WIDE_INT delta;
- HOST_WIDE_INT vcall_offset;
- tree function;
+sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
+ HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
+ tree function)
{
CUMULATIVE_ARGS cum;
int structure_value_byref = 0;