Commit e1ffc70a by Stephane Carrez Committed by Stephane Carrez

m68hc11.c: Convert to ISO C90.

	* config/m68hc11/m68hc11.c: Convert to ISO C90.
	* config/m68hc11/m68hc11-protos.h: Likewise.

From-SVN: r72981
parent 65b19349
2003-10-27 Stephane Carrez <stcarrez@nerim.fr>
* config/m68hc11/m68hc11.c: Convert to ISO C90.
* config/m68hc11/m68hc11-protos.h: Likewise.
2003-10-27 Jan Hubicka <jh@suse.cz> 2003-10-27 Jan Hubicka <jh@suse.cz>
Eric Botcazou <ebotcazou@libertysurf.fr> Eric Botcazou <ebotcazou@libertysurf.fr>
......
...@@ -20,126 +20,118 @@ the Free Software Foundation, 59 Temple Place - Suite 330, ...@@ -20,126 +20,118 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
extern int m68hc11_override_options PARAMS((void)); extern int m68hc11_override_options (void);
extern int m68hc11_optimization_options PARAMS((int,int)); extern int m68hc11_optimization_options (int,int);
extern void m68hc11_conditional_register_usage PARAMS((void)); extern void m68hc11_conditional_register_usage (void);
extern int hard_regno_mode_ok PARAMS((int, enum machine_mode)); extern int hard_regno_mode_ok (int, enum machine_mode);
extern int m68hc11_hard_regno_rename_ok PARAMS((int, int)); extern int m68hc11_hard_regno_rename_ok (int, int);
extern int m68hc11_total_frame_size PARAMS((void)); extern int m68hc11_total_frame_size (void);
extern int m68hc11_initial_frame_pointer_offset PARAMS((void)); extern int m68hc11_initial_frame_pointer_offset (void);
extern int m68hc11_initial_elimination_offset PARAMS((int, int)); extern int m68hc11_initial_elimination_offset (int, int);
extern void expand_prologue PARAMS((void)); extern void expand_prologue (void);
extern void expand_epilogue PARAMS((void)); extern void expand_epilogue (void);
#ifdef TREE_CODE #ifdef TREE_CODE
extern void m68hc11_function_arg_advance PARAMS((CUMULATIVE_ARGS*, extern void m68hc11_function_arg_advance (CUMULATIVE_ARGS*,
enum machine_mode, enum machine_mode,
tree, tree,
int)); int);
#endif #endif
#ifdef RTX_CODE #ifdef RTX_CODE
extern void m68hc11_initialize_trampoline PARAMS((rtx, rtx, rtx)); extern void m68hc11_initialize_trampoline (rtx, rtx, rtx);
extern rtx m68hc11_expand_compare_and_branch PARAMS((enum rtx_code, extern rtx m68hc11_expand_compare_and_branch (enum rtx_code, rtx, rtx, rtx);
rtx, rtx, rtx)); extern enum reg_class preferred_reload_class (rtx, enum reg_class);
extern enum reg_class preferred_reload_class PARAMS((rtx, enum reg_class));
extern int m68hc11_go_if_legitimate_address PARAMS((rtx, extern int m68hc11_go_if_legitimate_address (rtx, enum machine_mode, int);
enum machine_mode,
int));
extern int m68hc11_legitimize_address PARAMS((rtx*, rtx, enum machine_mode)); extern int m68hc11_legitimize_address (rtx*, rtx, enum machine_mode);
extern void m68hc11_notice_update_cc PARAMS((rtx, rtx)); extern void m68hc11_notice_update_cc (rtx, rtx);
extern void m68hc11_notice_keep_cc PARAMS((rtx)); extern void m68hc11_notice_keep_cc (rtx);
extern void m68hc11_gen_movqi PARAMS((rtx, rtx*)); extern void m68hc11_gen_movqi (rtx, rtx*);
extern void m68hc11_gen_movhi PARAMS((rtx, rtx*)); extern void m68hc11_gen_movhi (rtx, rtx*);
extern void m68hc11_gen_rotate PARAMS((enum rtx_code, rtx, rtx*)); extern void m68hc11_gen_rotate (enum rtx_code, rtx, rtx*);
extern void m68hc11_output_swap PARAMS((rtx,rtx*)); extern void m68hc11_output_swap (rtx, rtx*);
extern int next_insn_test_reg PARAMS((rtx,rtx)); extern int next_insn_test_reg (rtx, rtx);
extern void print_operand PARAMS((FILE*,rtx,int)); extern void print_operand (FILE*, rtx, int);
extern void print_operand_address PARAMS((FILE*,rtx)); extern void print_operand_address (FILE*, rtx);
extern int m68hc11_reload_operands PARAMS((rtx*)); extern int m68hc11_reload_operands (rtx*);
extern int dead_register_here PARAMS((rtx, rtx)); extern int dead_register_here (rtx, rtx);
extern int push_pop_operand_p PARAMS((rtx)); extern int push_pop_operand_p (rtx);
extern void m68hc11_split_move PARAMS((rtx, rtx, rtx)); extern void m68hc11_split_move (rtx, rtx, rtx);
extern void m68hc11_split_compare_and_branch PARAMS((enum rtx_code, extern void m68hc11_split_compare_and_branch (enum rtx_code,
rtx, rtx, rtx)); rtx, rtx, rtx);
extern void aux_restore_IX_IY PARAMS((rtx));
extern void aux_validate_IX_IY PARAMS((rtx));
extern rtx m68hc11_gen_lowpart PARAMS((enum machine_mode, rtx)); extern rtx m68hc11_gen_lowpart (enum machine_mode, rtx);
extern rtx m68hc11_gen_highpart PARAMS((enum machine_mode, rtx)); extern rtx m68hc11_gen_highpart (enum machine_mode, rtx);
#ifdef HAVE_MACHINE_MODES #ifdef HAVE_MACHINE_MODES
extern int m68hc11_memory_move_cost PARAMS((enum machine_mode, enum reg_class, extern int m68hc11_memory_move_cost (enum machine_mode, enum reg_class, int);
int)); extern int m68hc11_register_move_cost (enum machine_mode,
extern int m68hc11_register_move_cost PARAMS((enum machine_mode, enum reg_class, enum reg_class);
enum reg_class, enum reg_class));
extern void m68hc11_emit_libcall PARAMS((const char*, enum rtx_code, extern void m68hc11_emit_libcall (const char*, enum rtx_code,
enum machine_mode, enum machine_mode, enum machine_mode, enum machine_mode,
int, rtx*)); int, rtx*);
extern int m68hc11_small_indexed_indirect_p PARAMS((rtx, enum machine_mode)); extern int m68hc11_small_indexed_indirect_p (rtx, enum machine_mode);
extern int m68hc11_symbolic_p PARAMS((rtx, enum machine_mode)); extern int m68hc11_symbolic_p (rtx, enum machine_mode);
extern int m68hc11_indirect_p PARAMS((rtx, enum machine_mode)); extern int m68hc11_indirect_p (rtx, enum machine_mode);
extern int go_if_legitimate_address2 PARAMS((rtx, enum machine_mode, int)); extern int go_if_legitimate_address2 (rtx, enum machine_mode, int);
extern int reg_or_indexed_operand PARAMS((rtx,enum machine_mode)); extern int reg_or_indexed_operand (rtx,enum machine_mode);
extern int tst_operand PARAMS((rtx,enum machine_mode)); extern int tst_operand (rtx,enum machine_mode);
extern int cmp_operand PARAMS((rtx,enum machine_mode)); extern int cmp_operand (rtx,enum machine_mode);
extern int memory_indexed_operand PARAMS((rtx, enum machine_mode)); extern int memory_indexed_operand (rtx, enum machine_mode);
extern void m68hc11_split_logical PARAMS((enum machine_mode, int, rtx*)); extern void m68hc11_split_logical (enum machine_mode, int, rtx*);
extern int m68hc11_register_indirect_p PARAMS((rtx, enum machine_mode)); extern int m68hc11_register_indirect_p (rtx, enum machine_mode);
extern int symbolic_memory_operand PARAMS((rtx, enum machine_mode)); extern int symbolic_memory_operand (rtx, enum machine_mode);
extern int memory_reload_operand PARAMS((rtx, enum machine_mode)); extern int memory_reload_operand (rtx, enum machine_mode);
extern int stack_register_operand PARAMS((rtx, enum machine_mode)); extern int stack_register_operand (rtx, enum machine_mode);
extern int d_register_operand PARAMS((rtx, enum machine_mode)); extern int d_register_operand (rtx, enum machine_mode);
extern int hard_addr_reg_operand PARAMS((rtx, enum machine_mode)); extern int hard_addr_reg_operand (rtx, enum machine_mode);
extern int arith_src_operand PARAMS((rtx, enum machine_mode)); extern int arith_src_operand (rtx, enum machine_mode);
extern int m68hc11_logical_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_logical_operator (rtx, enum machine_mode);
extern int m68hc11_arith_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_arith_operator (rtx, enum machine_mode);
extern int m68hc11_non_shift_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_non_shift_operator (rtx, enum machine_mode);
extern int m68hc11_shift_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_shift_operator (rtx, enum machine_mode);
extern int m68hc11_unary_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_unary_operator (rtx, enum machine_mode);
extern int m68hc11_eq_compare_operator PARAMS((rtx, enum machine_mode)); extern int m68hc11_eq_compare_operator (rtx, enum machine_mode);
extern int non_push_operand PARAMS((rtx, enum machine_mode)); extern int non_push_operand (rtx, enum machine_mode);
extern int hard_reg_operand PARAMS((rtx, enum machine_mode)); extern int hard_reg_operand (rtx, enum machine_mode);
extern int soft_reg_operand PARAMS((rtx, enum machine_mode)); extern int soft_reg_operand (rtx, enum machine_mode);
extern int reg_or_some_mem_operand PARAMS((rtx, enum machine_mode)); extern int reg_or_some_mem_operand (rtx, enum machine_mode);
#if defined TREE_CODE #if defined TREE_CODE
extern void m68hc11_init_cumulative_args PARAMS((CUMULATIVE_ARGS*, extern void m68hc11_init_cumulative_args (CUMULATIVE_ARGS*, tree, rtx);
tree,
rtx));
extern rtx m68hc11_function_arg PARAMS((const CUMULATIVE_ARGS* , extern rtx m68hc11_function_arg (const CUMULATIVE_ARGS* ,
enum machine_mode, enum machine_mode,
tree, int)); tree, int);
extern int m68hc11_function_arg_pass_by_reference PARAMS((const CUMULATIVE_ARGS*, extern int m68hc11_function_arg_pass_by_reference (const CUMULATIVE_ARGS*,
enum machine_mode, enum machine_mode,
tree, tree,
int)); int);
extern int m68hc11_function_arg_padding PARAMS((enum machine_mode, tree)); extern int m68hc11_function_arg_padding (enum machine_mode, tree);
extern void m68hc11_function_epilogue PARAMS((FILE*,int)); extern void m68hc11_function_epilogue (FILE*,int);
extern int m68hc11_is_far_symbol PARAMS((rtx)); extern int m68hc11_is_far_symbol (rtx);
extern int m68hc11_is_trap_symbol PARAMS((rtx)); extern int m68hc11_is_trap_symbol (rtx);
#endif /* TREE_CODE */ #endif /* TREE_CODE */
......
...@@ -59,34 +59,34 @@ Note: ...@@ -59,34 +59,34 @@ Note:
#include "target.h" #include "target.h"
#include "target-def.h" #include "target-def.h"
static void emit_move_after_reload PARAMS ((rtx, rtx, rtx)); static void emit_move_after_reload (rtx, rtx, rtx);
static rtx simplify_logical PARAMS ((enum machine_mode, int, rtx, rtx *)); static rtx simplify_logical (enum machine_mode, int, rtx, rtx *);
static void m68hc11_emit_logical PARAMS ((enum machine_mode, int, rtx *)); static void m68hc11_emit_logical (enum machine_mode, int, rtx *);
static void m68hc11_reorg PARAMS ((void)); static void m68hc11_reorg (void);
static int go_if_legitimate_address_internal PARAMS((rtx, enum machine_mode, static int go_if_legitimate_address_internal (rtx, enum machine_mode, int);
int)); static int register_indirect_p (rtx, enum machine_mode, int);
static int register_indirect_p PARAMS((rtx, enum machine_mode, int)); static rtx m68hc11_expand_compare (enum rtx_code, rtx, rtx);
static rtx m68hc11_expand_compare PARAMS((enum rtx_code, rtx, rtx)); static int must_parenthesize (rtx);
static int must_parenthesize PARAMS ((rtx)); static int m68hc11_address_cost (rtx);
static int m68hc11_address_cost PARAMS ((rtx)); static int m68hc11_shift_cost (enum machine_mode, rtx, int);
static int m68hc11_shift_cost PARAMS ((enum machine_mode, rtx, int)); static int m68hc11_rtx_costs_1 (rtx, enum rtx_code, enum rtx_code);
static int m68hc11_rtx_costs_1 PARAMS ((rtx, enum rtx_code, enum rtx_code)); static bool m68hc11_rtx_costs (rtx, int, int, int *);
static bool m68hc11_rtx_costs PARAMS ((rtx, int, int, int *)); static int m68hc11_auto_inc_p (rtx);
static int m68hc11_auto_inc_p PARAMS ((rtx)); static tree m68hc11_handle_fntype_attribute (tree *, tree, tree, int, bool *);
static tree m68hc11_handle_fntype_attribute PARAMS ((tree *, tree, tree, int, bool *));
const struct attribute_spec m68hc11_attribute_table[]; const struct attribute_spec m68hc11_attribute_table[];
void create_regs_rtx PARAMS ((void)); void create_regs_rtx (void);
static void asm_print_register PARAMS ((FILE *, int)); static void asm_print_register (FILE *, int);
static void m68hc11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void m68hc11_output_function_epilogue (FILE *, HOST_WIDE_INT);
static void m68hc11_asm_out_constructor PARAMS ((rtx, int)); static void m68hc11_asm_out_constructor (rtx, int);
static void m68hc11_asm_out_destructor PARAMS ((rtx, int)); static void m68hc11_asm_out_destructor (rtx, int);
static void m68hc11_file_start PARAMS ((void)); static void m68hc11_file_start (void);
static void m68hc11_encode_section_info PARAMS((tree, rtx, int)); static void m68hc11_encode_section_info (tree, rtx, int);
static int autoinc_mode PARAMS((rtx)); static unsigned int m68hc11_section_type_flags (tree, const char*, int);
static int m68hc11_make_autoinc_notes PARAMS((rtx *, void *)); static int autoinc_mode (rtx);
static void m68hc11_init_libfuncs PARAMS ((void)); static int m68hc11_make_autoinc_notes (rtx *, void *);
static void m68hc11_init_libfuncs (void);
/* Must be set to 1 to produce debug messages. */ /* Must be set to 1 to produce debug messages. */
int debug_m6811 = 0; int debug_m6811 = 0;
...@@ -240,6 +240,9 @@ static int nb_soft_regs; ...@@ -240,6 +240,9 @@ static int nb_soft_regs;
#undef TARGET_ENCODE_SECTION_INFO #undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO m68hc11_encode_section_info #define TARGET_ENCODE_SECTION_INFO m68hc11_encode_section_info
#undef TARGET_SECTION_TYPE_FLAGS
#define TARGET_SECTION_TYPE_FLAGS m68hc11_section_type_flags
#undef TARGET_RTX_COSTS #undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS m68hc11_rtx_costs #define TARGET_RTX_COSTS m68hc11_rtx_costs
#undef TARGET_ADDRESS_COST #undef TARGET_ADDRESS_COST
...@@ -254,7 +257,7 @@ static int nb_soft_regs; ...@@ -254,7 +257,7 @@ static int nb_soft_regs;
struct gcc_target targetm = TARGET_INITIALIZER; struct gcc_target targetm = TARGET_INITIALIZER;
int int
m68hc11_override_options () m68hc11_override_options (void)
{ {
memset (m68hc11_reg_valid_for_index, 0, memset (m68hc11_reg_valid_for_index, 0,
sizeof (m68hc11_reg_valid_for_index)); sizeof (m68hc11_reg_valid_for_index));
...@@ -320,7 +323,7 @@ m68hc11_override_options () ...@@ -320,7 +323,7 @@ m68hc11_override_options ()
void void
m68hc11_conditional_register_usage () m68hc11_conditional_register_usage (void)
{ {
int i; int i;
int cnt = atoi (m68hc11_soft_reg_count); int cnt = atoi (m68hc11_soft_reg_count);
...@@ -353,7 +356,7 @@ static const char *const reg_class_names[] = REG_CLASS_NAMES; ...@@ -353,7 +356,7 @@ static const char *const reg_class_names[] = REG_CLASS_NAMES;
void void
create_regs_rtx () create_regs_rtx (void)
{ {
/* regs_inited = 1; */ /* regs_inited = 1; */
ix_reg = gen_rtx (REG, HImode, HARD_X_REGNUM); ix_reg = gen_rtx (REG, HImode, HARD_X_REGNUM);
...@@ -379,9 +382,7 @@ create_regs_rtx () ...@@ -379,9 +382,7 @@ create_regs_rtx ()
registers. They may be stored in soft registers if there are registers. They may be stored in soft registers if there are
enough of them. */ enough of them. */
int int
hard_regno_mode_ok (regno, mode) hard_regno_mode_ok (int regno, enum machine_mode mode)
int regno;
enum machine_mode mode;
{ {
switch (GET_MODE_SIZE (mode)) switch (GET_MODE_SIZE (mode))
{ {
...@@ -409,8 +410,7 @@ hard_regno_mode_ok (regno, mode) ...@@ -409,8 +410,7 @@ hard_regno_mode_ok (regno, mode)
} }
int int
m68hc11_hard_regno_rename_ok (reg1, reg2) m68hc11_hard_regno_rename_ok (int reg1, int reg2)
int reg1, reg2;
{ {
/* Don't accept renaming to Z register. We will replace it to /* Don't accept renaming to Z register. We will replace it to
X,Y or D during machine reorg pass. */ X,Y or D during machine reorg pass. */
...@@ -426,9 +426,7 @@ m68hc11_hard_regno_rename_ok (reg1, reg2) ...@@ -426,9 +426,7 @@ m68hc11_hard_regno_rename_ok (reg1, reg2)
} }
enum reg_class enum reg_class
preferred_reload_class (operand, class) preferred_reload_class (rtx operand, enum reg_class class)
rtx operand;
enum reg_class class;
{ {
enum machine_mode mode; enum machine_mode mode;
...@@ -546,10 +544,7 @@ preferred_reload_class (operand, class) ...@@ -546,10 +544,7 @@ preferred_reload_class (operand, class)
For 68hc11: n,r with n in [0..255] and r in A_REGS class For 68hc11: n,r with n in [0..255] and r in A_REGS class
For 68hc12: n,r no constraint on the constant, r in A_REGS class. */ For 68hc12: n,r no constraint on the constant, r in A_REGS class. */
static int static int
register_indirect_p (operand, mode, strict) register_indirect_p (rtx operand, enum machine_mode mode, int strict)
rtx operand;
enum machine_mode mode;
int strict;
{ {
rtx base, offset; rtx base, offset;
...@@ -611,9 +606,7 @@ register_indirect_p (operand, mode, strict) ...@@ -611,9 +606,7 @@ register_indirect_p (operand, mode, strict)
/* Returns 1 if the operand fits in a 68HC11 indirect mode or in /* Returns 1 if the operand fits in a 68HC11 indirect mode or in
a 68HC12 1-byte index addressing mode. */ a 68HC12 1-byte index addressing mode. */
int int
m68hc11_small_indexed_indirect_p (operand, mode) m68hc11_small_indexed_indirect_p (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
rtx base, offset; rtx base, offset;
...@@ -674,9 +667,7 @@ m68hc11_small_indexed_indirect_p (operand, mode) ...@@ -674,9 +667,7 @@ m68hc11_small_indexed_indirect_p (operand, mode)
} }
int int
m68hc11_register_indirect_p (operand, mode) m68hc11_register_indirect_p (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_CODE (operand) != MEM) if (GET_CODE (operand) != MEM)
return 0; return 0;
...@@ -687,10 +678,8 @@ m68hc11_register_indirect_p (operand, mode) ...@@ -687,10 +678,8 @@ m68hc11_register_indirect_p (operand, mode)
} }
static int static int
go_if_legitimate_address_internal (operand, mode, strict) go_if_legitimate_address_internal (rtx operand, enum machine_mode mode,
rtx operand; int strict)
enum machine_mode mode;
int strict;
{ {
if (CONSTANT_ADDRESS_P (operand) && TARGET_M6812) if (CONSTANT_ADDRESS_P (operand) && TARGET_M6812)
{ {
...@@ -717,10 +706,8 @@ go_if_legitimate_address_internal (operand, mode, strict) ...@@ -717,10 +706,8 @@ go_if_legitimate_address_internal (operand, mode, strict)
} }
int int
m68hc11_go_if_legitimate_address (operand, mode, strict) m68hc11_go_if_legitimate_address (rtx operand, enum machine_mode mode,
rtx operand; int strict)
enum machine_mode mode;
int strict;
{ {
int result; int result;
...@@ -752,18 +739,16 @@ m68hc11_go_if_legitimate_address (operand, mode, strict) ...@@ -752,18 +739,16 @@ m68hc11_go_if_legitimate_address (operand, mode, strict)
} }
int int
m68hc11_legitimize_address (operand, old_operand, mode) m68hc11_legitimize_address (rtx *operand ATTRIBUTE_UNUSED,
rtx *operand ATTRIBUTE_UNUSED; rtx old_operand ATTRIBUTE_UNUSED,
rtx old_operand ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
int int
m68hc11_reload_operands (operands) m68hc11_reload_operands (rtx operands[])
rtx operands[];
{ {
enum machine_mode mode; enum machine_mode mode;
...@@ -858,13 +843,9 @@ m68hc11_reload_operands (operands) ...@@ -858,13 +843,9 @@ m68hc11_reload_operands (operands)
} }
void void
m68hc11_emit_libcall (name, code, dmode, smode, noperands, operands) m68hc11_emit_libcall (const char *name, enum rtx_code code,
const char *name; enum machine_mode dmode, enum machine_mode smode,
enum rtx_code code; int noperands, rtx *operands)
enum machine_mode dmode;
enum machine_mode smode;
int noperands;
rtx *operands;
{ {
rtx ret; rtx ret;
rtx insns; rtx insns;
...@@ -902,8 +883,7 @@ m68hc11_emit_libcall (name, code, dmode, smode, noperands, operands) ...@@ -902,8 +883,7 @@ m68hc11_emit_libcall (name, code, dmode, smode, noperands, operands)
(same as auto_inc_p() in rtlanal.c but do not take into (same as auto_inc_p() in rtlanal.c but do not take into
account the stack). */ account the stack). */
static int static int
m68hc11_auto_inc_p (x) m68hc11_auto_inc_p (rtx x)
rtx x;
{ {
return GET_CODE (x) == PRE_DEC return GET_CODE (x) == PRE_DEC
|| GET_CODE (x) == POST_INC || GET_CODE (x) == POST_INC
...@@ -914,9 +894,7 @@ m68hc11_auto_inc_p (x) ...@@ -914,9 +894,7 @@ m68hc11_auto_inc_p (x)
/* Predicates for machine description. */ /* Predicates for machine description. */
int int
memory_reload_operand (operand, mode) memory_reload_operand (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx operand;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (operand) == MEM return GET_CODE (operand) == MEM
&& GET_CODE (XEXP (operand, 0)) == PLUS && GET_CODE (XEXP (operand, 0)) == PLUS
...@@ -927,9 +905,7 @@ memory_reload_operand (operand, mode) ...@@ -927,9 +905,7 @@ memory_reload_operand (operand, mode)
} }
int int
tst_operand (operand, mode) tst_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_CODE (operand) == MEM && reload_completed == 0) if (GET_CODE (operand) == MEM && reload_completed == 0)
{ {
...@@ -941,9 +917,7 @@ tst_operand (operand, mode) ...@@ -941,9 +917,7 @@ tst_operand (operand, mode)
} }
int int
cmp_operand (operand, mode) cmp_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_CODE (operand) == MEM) if (GET_CODE (operand) == MEM)
{ {
...@@ -955,9 +929,7 @@ cmp_operand (operand, mode) ...@@ -955,9 +929,7 @@ cmp_operand (operand, mode)
} }
int int
non_push_operand (operand, mode) non_push_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (general_operand (operand, mode) == 0) if (general_operand (operand, mode) == 0)
return 0; return 0;
...@@ -968,9 +940,7 @@ non_push_operand (operand, mode) ...@@ -968,9 +940,7 @@ non_push_operand (operand, mode)
} }
int int
reg_or_some_mem_operand (operand, mode) reg_or_some_mem_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_CODE (operand) == MEM) if (GET_CODE (operand) == MEM)
{ {
...@@ -992,9 +962,7 @@ reg_or_some_mem_operand (operand, mode) ...@@ -992,9 +962,7 @@ reg_or_some_mem_operand (operand, mode)
} }
int int
m68hc11_symbolic_p (operand, mode) m68hc11_symbolic_p (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_CODE (operand) == MEM) if (GET_CODE (operand) == MEM)
{ {
...@@ -1007,9 +975,7 @@ m68hc11_symbolic_p (operand, mode) ...@@ -1007,9 +975,7 @@ m68hc11_symbolic_p (operand, mode)
} }
int int
m68hc11_indirect_p (operand, mode) m68hc11_indirect_p (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_CODE (operand) == MEM) if (GET_CODE (operand) == MEM)
{ {
...@@ -1028,17 +994,13 @@ m68hc11_indirect_p (operand, mode) ...@@ -1028,17 +994,13 @@ m68hc11_indirect_p (operand, mode)
} }
int int
stack_register_operand (operand, mode) stack_register_operand (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx operand;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return SP_REG_P (operand); return SP_REG_P (operand);
} }
int int
d_register_operand (operand, mode) d_register_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_MODE (operand) != mode && mode != VOIDmode) if (GET_MODE (operand) != mode && mode != VOIDmode)
return 0; return 0;
...@@ -1053,9 +1015,7 @@ d_register_operand (operand, mode) ...@@ -1053,9 +1015,7 @@ d_register_operand (operand, mode)
} }
int int
hard_addr_reg_operand (operand, mode) hard_addr_reg_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_MODE (operand) != mode && mode != VOIDmode) if (GET_MODE (operand) != mode && mode != VOIDmode)
return 0; return 0;
...@@ -1070,9 +1030,7 @@ hard_addr_reg_operand (operand, mode) ...@@ -1070,9 +1030,7 @@ hard_addr_reg_operand (operand, mode)
} }
int int
hard_reg_operand (operand, mode) hard_reg_operand (rtx operand, enum machine_mode mode)
rtx operand;
enum machine_mode mode;
{ {
if (GET_MODE (operand) != mode && mode != VOIDmode) if (GET_MODE (operand) != mode && mode != VOIDmode)
return 0; return 0;
...@@ -1086,9 +1044,7 @@ hard_reg_operand (operand, mode) ...@@ -1086,9 +1044,7 @@ hard_reg_operand (operand, mode)
} }
int int
memory_indexed_operand (operand, mode) memory_indexed_operand (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx operand;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (operand) != MEM) if (GET_CODE (operand) != MEM)
return 0; return 0;
...@@ -1107,8 +1063,7 @@ memory_indexed_operand (operand, mode) ...@@ -1107,8 +1063,7 @@ memory_indexed_operand (operand, mode)
} }
int int
push_pop_operand_p (operand) push_pop_operand_p (rtx operand)
rtx operand;
{ {
if (GET_CODE (operand) != MEM) if (GET_CODE (operand) != MEM)
{ {
...@@ -1122,9 +1077,7 @@ push_pop_operand_p (operand) ...@@ -1122,9 +1077,7 @@ push_pop_operand_p (operand)
reference and a constant. */ reference and a constant. */
int int
symbolic_memory_operand (op, mode) symbolic_memory_operand (rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -1152,25 +1105,19 @@ symbolic_memory_operand (op, mode) ...@@ -1152,25 +1105,19 @@ symbolic_memory_operand (op, mode)
} }
int int
m68hc11_eq_compare_operator (op, mode) m68hc11_eq_compare_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == EQ || GET_CODE (op) == NE; return GET_CODE (op) == EQ || GET_CODE (op) == NE;
} }
int int
m68hc11_logical_operator (op, mode) m68hc11_logical_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR; return GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR;
} }
int int
m68hc11_arith_operator (op, mode) m68hc11_arith_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR return GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR
|| GET_CODE (op) == PLUS || GET_CODE (op) == MINUS || GET_CODE (op) == PLUS || GET_CODE (op) == MINUS
...@@ -1180,9 +1127,7 @@ m68hc11_arith_operator (op, mode) ...@@ -1180,9 +1127,7 @@ m68hc11_arith_operator (op, mode)
} }
int int
m68hc11_non_shift_operator (op, mode) m68hc11_non_shift_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR return GET_CODE (op) == AND || GET_CODE (op) == IOR || GET_CODE (op) == XOR
|| GET_CODE (op) == PLUS || GET_CODE (op) == MINUS; || GET_CODE (op) == PLUS || GET_CODE (op) == MINUS;
...@@ -1190,9 +1135,7 @@ m68hc11_non_shift_operator (op, mode) ...@@ -1190,9 +1135,7 @@ m68hc11_non_shift_operator (op, mode)
/* Return true if op is a shift operator. */ /* Return true if op is a shift operator. */
int int
m68hc11_shift_operator (op, mode) m68hc11_shift_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == ROTATE || GET_CODE (op) == ROTATERT return GET_CODE (op) == ROTATE || GET_CODE (op) == ROTATERT
|| GET_CODE (op) == LSHIFTRT || GET_CODE (op) == ASHIFT || GET_CODE (op) == LSHIFTRT || GET_CODE (op) == ASHIFT
...@@ -1200,9 +1143,7 @@ m68hc11_shift_operator (op, mode) ...@@ -1200,9 +1143,7 @@ m68hc11_shift_operator (op, mode)
} }
int int
m68hc11_unary_operator (op, mode) m68hc11_unary_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == NEG || GET_CODE (op) == NOT return GET_CODE (op) == NEG || GET_CODE (op) == NOT
|| GET_CODE (op) == SIGN_EXTEND || GET_CODE (op) == ZERO_EXTEND; || GET_CODE (op) == SIGN_EXTEND || GET_CODE (op) == ZERO_EXTEND;
...@@ -1218,10 +1159,7 @@ m68hc11_unary_operator (op, mode) ...@@ -1218,10 +1159,7 @@ m68hc11_unary_operator (op, mode)
*/ */
void void
m68hc11_initialize_trampoline (tramp, fnaddr, cxt) m68hc11_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
rtx tramp;
rtx fnaddr;
rtx cxt;
{ {
const char *static_chain_reg = reg_names[STATIC_CHAIN_REGNUM]; const char *static_chain_reg = reg_names[STATIC_CHAIN_REGNUM];
...@@ -1276,12 +1214,10 @@ static rtx trap_handler_symbol = 0; ...@@ -1276,12 +1214,10 @@ static rtx trap_handler_symbol = 0;
/* Handle an attribute requiring a FUNCTION_TYPE, FIELD_DECL or TYPE_DECL; /* Handle an attribute requiring a FUNCTION_TYPE, FIELD_DECL or TYPE_DECL;
arguments as in struct attribute_spec.handler. */ arguments as in struct attribute_spec.handler. */
static tree static tree
m68hc11_handle_fntype_attribute (node, name, args, flags, no_add_attrs) m68hc11_handle_fntype_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_TYPE if (TREE_CODE (*node) != FUNCTION_TYPE
&& TREE_CODE (*node) != METHOD_TYPE && TREE_CODE (*node) != METHOD_TYPE
...@@ -1301,10 +1237,7 @@ m68hc11_handle_fntype_attribute (node, name, args, flags, no_add_attrs) ...@@ -1301,10 +1237,7 @@ m68hc11_handle_fntype_attribute (node, name, args, flags, no_add_attrs)
in SYMBOL_REF_FLAG. */ in SYMBOL_REF_FLAG. */
static void static void
m68hc11_encode_section_info (decl, rtl, first) m68hc11_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
tree decl;
rtx rtl;
int first ATTRIBUTE_UNUSED;
{ {
tree func_attr; tree func_attr;
int trap_handler; int trap_handler;
...@@ -1337,9 +1270,21 @@ m68hc11_encode_section_info (decl, rtl, first) ...@@ -1337,9 +1270,21 @@ m68hc11_encode_section_info (decl, rtl, first)
SYMBOL_REF_FLAG (XEXP (rtl, 0)) = is_far; SYMBOL_REF_FLAG (XEXP (rtl, 0)) = is_far;
} }
static unsigned int
m68hc11_section_type_flags (tree decl, const char *name, int reloc)
{
unsigned int flags = default_section_type_flags (decl, name, reloc);
if (strncmp (name, ".eeprom", 7) == 0)
{
flags |= SECTION_WRITE | SECTION_CODE | SECTION_OVERRIDE;
}
return flags;
}
int int
m68hc11_is_far_symbol (sym) m68hc11_is_far_symbol (rtx sym)
rtx sym;
{ {
if (GET_CODE (sym) == MEM) if (GET_CODE (sym) == MEM)
sym = XEXP (sym, 0); sym = XEXP (sym, 0);
...@@ -1348,8 +1293,7 @@ m68hc11_is_far_symbol (sym) ...@@ -1348,8 +1293,7 @@ m68hc11_is_far_symbol (sym)
} }
int int
m68hc11_is_trap_symbol (sym) m68hc11_is_trap_symbol (rtx sym)
rtx sym;
{ {
if (GET_CODE (sym) == MEM) if (GET_CODE (sym) == MEM)
sym = XEXP (sym, 0); sym = XEXP (sym, 0);
...@@ -1366,11 +1310,10 @@ m68hc11_is_trap_symbol (sym) ...@@ -1366,11 +1310,10 @@ m68hc11_is_trap_symbol (sym)
SCz: I tried to pass DImode by reference but it seems that this SCz: I tried to pass DImode by reference but it seems that this
does not work very well. */ does not work very well. */
int int
m68hc11_function_arg_pass_by_reference (cum, mode, type, named) m68hc11_function_arg_pass_by_reference (const CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
const CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; tree type,
tree type; int named ATTRIBUTE_UNUSED)
int named ATTRIBUTE_UNUSED;
{ {
return ((type && TREE_CODE (type) == ARRAY_TYPE) return ((type && TREE_CODE (type) == ARRAY_TYPE)
/* Consider complex values as aggregates, so care for TCmode. */ /* Consider complex values as aggregates, so care for TCmode. */
...@@ -1382,9 +1325,7 @@ m68hc11_function_arg_pass_by_reference (cum, mode, type, named) ...@@ -1382,9 +1325,7 @@ m68hc11_function_arg_pass_by_reference (cum, mode, type, named)
/* Define the offset between two registers, one to be eliminated, and the /* Define the offset between two registers, one to be eliminated, and the
other its replacement, at the start of a routine. */ other its replacement, at the start of a routine. */
int int
m68hc11_initial_elimination_offset (from, to) m68hc11_initial_elimination_offset (int from, int to)
int from;
int to;
{ {
int trap_handler; int trap_handler;
tree func_attr; tree func_attr;
...@@ -1451,10 +1392,7 @@ m68hc11_initial_elimination_offset (from, to) ...@@ -1451,10 +1392,7 @@ m68hc11_initial_elimination_offset (from, to)
For a library call, FNTYPE is 0. */ For a library call, FNTYPE is 0. */
void void
m68hc11_init_cumulative_args (cum, fntype, libname) m68hc11_init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, rtx libname)
CUMULATIVE_ARGS *cum;
tree fntype;
rtx libname;
{ {
tree ret_type; tree ret_type;
...@@ -1507,11 +1445,8 @@ m68hc11_init_cumulative_args (cum, fntype, libname) ...@@ -1507,11 +1445,8 @@ m68hc11_init_cumulative_args (cum, fntype, libname)
(TYPE is null for libcalls where that information may not be available.) */ (TYPE is null for libcalls where that information may not be available.) */
void void
m68hc11_function_arg_advance (cum, mode, type, named) m68hc11_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; tree type, int named ATTRIBUTE_UNUSED)
enum machine_mode mode;
tree type;
int named ATTRIBUTE_UNUSED;
{ {
if (mode != BLKmode) if (mode != BLKmode)
{ {
...@@ -1548,11 +1483,8 @@ m68hc11_function_arg_advance (cum, mode, type, named) ...@@ -1548,11 +1483,8 @@ m68hc11_function_arg_advance (cum, mode, type, named)
(otherwise it is an extra parameter matching an ellipsis). */ (otherwise it is an extra parameter matching an ellipsis). */
struct rtx_def * struct rtx_def *
m68hc11_function_arg (cum, mode, type, named) m68hc11_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode,
const CUMULATIVE_ARGS *cum; tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED)
enum machine_mode mode;
tree type ATTRIBUTE_UNUSED;
int named ATTRIBUTE_UNUSED;
{ {
if (cum->words != 0) if (cum->words != 0)
{ {
...@@ -1580,9 +1512,7 @@ m68hc11_function_arg (cum, mode, type, named) ...@@ -1580,9 +1512,7 @@ m68hc11_function_arg (cum, mode, type, named)
Structures are stored left shifted in their argument slot. */ Structures are stored left shifted in their argument slot. */
int int
m68hc11_function_arg_padding (mode, type) m68hc11_function_arg_padding (enum machine_mode mode, tree type)
enum machine_mode mode;
tree type;
{ {
if (type != 0 && AGGREGATE_TYPE_P (type)) if (type != 0 && AGGREGATE_TYPE_P (type))
return upward; return upward;
...@@ -1597,8 +1527,7 @@ m68hc11_function_arg_padding (mode, type) ...@@ -1597,8 +1527,7 @@ m68hc11_function_arg_padding (mode, type)
/* Emit a move after the reload pass has completed. This is used to /* Emit a move after the reload pass has completed. This is used to
emit the prologue and epilogue. */ emit the prologue and epilogue. */
static void static void
emit_move_after_reload (to, from, scratch) emit_move_after_reload (rtx to, rtx from, rtx scratch)
rtx to, from, scratch;
{ {
rtx insn; rtx insn;
...@@ -1640,7 +1569,7 @@ emit_move_after_reload (to, from, scratch) ...@@ -1640,7 +1569,7 @@ emit_move_after_reload (to, from, scratch)
} }
int int
m68hc11_total_frame_size () m68hc11_total_frame_size (void)
{ {
int size; int size;
int regno; int regno;
...@@ -1661,9 +1590,8 @@ m68hc11_total_frame_size () ...@@ -1661,9 +1590,8 @@ m68hc11_total_frame_size ()
} }
static void static void
m68hc11_output_function_epilogue (out, size) m68hc11_output_function_epilogue (FILE *out ATTRIBUTE_UNUSED,
FILE *out ATTRIBUTE_UNUSED; HOST_WIDE_INT size ATTRIBUTE_UNUSED)
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{ {
/* We catch the function epilogue generation to have a chance /* We catch the function epilogue generation to have a chance
to clear the z_replacement_completed flag. */ to clear the z_replacement_completed flag. */
...@@ -1671,7 +1599,7 @@ m68hc11_output_function_epilogue (out, size) ...@@ -1671,7 +1599,7 @@ m68hc11_output_function_epilogue (out, size)
} }
void void
expand_prologue () expand_prologue (void)
{ {
tree func_attr; tree func_attr;
int size; int size;
...@@ -1775,7 +1703,7 @@ expand_prologue () ...@@ -1775,7 +1703,7 @@ expand_prologue ()
} }
void void
expand_epilogue () expand_epilogue (void)
{ {
int size; int size;
register int regno; register int regno;
...@@ -1888,9 +1816,7 @@ expand_epilogue () ...@@ -1888,9 +1816,7 @@ expand_epilogue ()
fixed to work for constants and 68HC11 specific registers. */ fixed to work for constants and 68HC11 specific registers. */
rtx rtx
m68hc11_gen_lowpart (mode, x) m68hc11_gen_lowpart (enum machine_mode mode, rtx x)
enum machine_mode mode;
rtx x;
{ {
/* We assume that the low part of an auto-inc mode is the same with /* We assume that the low part of an auto-inc mode is the same with
the mode changed and that the caller split the larger mode in the the mode changed and that the caller split the larger mode in the
...@@ -1965,9 +1891,7 @@ m68hc11_gen_lowpart (mode, x) ...@@ -1965,9 +1891,7 @@ m68hc11_gen_lowpart (mode, x)
} }
rtx rtx
m68hc11_gen_highpart (mode, x) m68hc11_gen_highpart (enum machine_mode mode, rtx x)
enum machine_mode mode;
rtx x;
{ {
/* We assume that the high part of an auto-inc mode is the same with /* We assume that the high part of an auto-inc mode is the same with
the mode changed and that the caller split the larger mode in the the mode changed and that the caller split the larger mode in the
...@@ -2086,9 +2010,7 @@ m68hc11_gen_highpart (mode, x) ...@@ -2086,9 +2010,7 @@ m68hc11_gen_highpart (mode, x)
of code when we know that some register dies or can be clobbered. */ of code when we know that some register dies or can be clobbered. */
int int
dead_register_here (x, reg) dead_register_here (rtx x, rtx reg)
rtx x;
rtx reg;
{ {
rtx x_reg; rtx x_reg;
rtx p; rtx p;
...@@ -2166,9 +2088,7 @@ dead_register_here (x, reg) ...@@ -2166,9 +2088,7 @@ dead_register_here (x, reg)
/* Print the name of register 'regno' in the assembly file. */ /* Print the name of register 'regno' in the assembly file. */
static void static void
asm_print_register (file, regno) asm_print_register (FILE *file, int regno)
FILE *file;
int regno;
{ {
const char *name = reg_names[regno]; const char *name = reg_names[regno];
...@@ -2211,10 +2131,7 @@ asm_print_register (file, regno) ...@@ -2211,10 +2131,7 @@ asm_print_register (file, regno)
ignored. */ ignored. */
void void
print_operand (file, op, letter) print_operand (FILE *file, rtx op, int letter)
FILE *file;
rtx op;
int letter;
{ {
if (letter == 't') if (letter == 't')
{ {
...@@ -2367,8 +2284,7 @@ print_operand (file, op, letter) ...@@ -2367,8 +2284,7 @@ print_operand (file, op, letter)
around it. This must be done only if there is a symbol whose name around it. This must be done only if there is a symbol whose name
is a processor register. */ is a processor register. */
static int static int
must_parenthesize (op) must_parenthesize (rtx op)
rtx op;
{ {
const char *name; const char *name;
...@@ -2414,9 +2330,7 @@ must_parenthesize (op) ...@@ -2414,9 +2330,7 @@ must_parenthesize (op)
reference whose address is ADDR. ADDR is an RTL expression. */ reference whose address is ADDR. ADDR is an RTL expression. */
void void
print_operand_address (file, addr) print_operand_address (FILE *file, rtx addr)
FILE *file;
rtx addr;
{ {
rtx base; rtx base;
rtx offset; rtx offset;
...@@ -2567,9 +2481,7 @@ print_operand_address (file, addr) ...@@ -2567,9 +2481,7 @@ print_operand_address (file, addr)
/* Splitting of some instructions. */ /* Splitting of some instructions. */
static rtx static rtx
m68hc11_expand_compare (code, op0, op1) m68hc11_expand_compare (enum rtx_code code, rtx op0, rtx op1)
enum rtx_code code;
rtx op0, op1;
{ {
rtx ret = 0; rtx ret = 0;
...@@ -2586,9 +2498,8 @@ m68hc11_expand_compare (code, op0, op1) ...@@ -2586,9 +2498,8 @@ m68hc11_expand_compare (code, op0, op1)
} }
rtx rtx
m68hc11_expand_compare_and_branch (code, op0, op1, label) m68hc11_expand_compare_and_branch (enum rtx_code code, rtx op0, rtx op1,
enum rtx_code code; rtx label)
rtx op0, op1, label;
{ {
rtx tmp; rtx tmp;
...@@ -2740,8 +2651,7 @@ m68hc11_expand_compare_and_branch (code, op0, op1, label) ...@@ -2740,8 +2651,7 @@ m68hc11_expand_compare_and_branch (code, op0, op1, label)
/* Return the increment/decrement mode of a MEM if it is such. /* Return the increment/decrement mode of a MEM if it is such.
Return CONST if it is anything else. */ Return CONST if it is anything else. */
static int static int
autoinc_mode (x) autoinc_mode (rtx x)
rtx x;
{ {
if (GET_CODE (x) != MEM) if (GET_CODE (x) != MEM)
return CONST; return CONST;
...@@ -2757,9 +2667,7 @@ autoinc_mode (x) ...@@ -2757,9 +2667,7 @@ autoinc_mode (x)
} }
static int static int
m68hc11_make_autoinc_notes (x, data) m68hc11_make_autoinc_notes (rtx *x, void *data)
rtx *x;
void *data;
{ {
rtx insn; rtx insn;
...@@ -2783,8 +2691,7 @@ m68hc11_make_autoinc_notes (x, data) ...@@ -2783,8 +2691,7 @@ m68hc11_make_autoinc_notes (x, data)
The scratch register 'scratch' is used as a temporary to load The scratch register 'scratch' is used as a temporary to load
store intermediate values. It must be a hard register. */ store intermediate values. It must be a hard register. */
void void
m68hc11_split_move (to, from, scratch) m68hc11_split_move (rtx to, rtx from, rtx scratch)
rtx to, from, scratch;
{ {
rtx low_to, low_from; rtx low_to, low_from;
rtx high_to, high_from; rtx high_to, high_from;
...@@ -2990,11 +2897,7 @@ m68hc11_split_move (to, from, scratch) ...@@ -2990,11 +2897,7 @@ m68hc11_split_move (to, from, scratch)
} }
static rtx static rtx
simplify_logical (mode, code, operand, result) simplify_logical (enum machine_mode mode, int code, rtx operand, rtx *result)
enum machine_mode mode;
int code;
rtx operand;
rtx *result;
{ {
int val; int val;
int mask; int mask;
...@@ -3034,10 +2937,7 @@ simplify_logical (mode, code, operand, result) ...@@ -3034,10 +2937,7 @@ simplify_logical (mode, code, operand, result)
} }
static void static void
m68hc11_emit_logical (mode, code, operands) m68hc11_emit_logical (enum machine_mode mode, int code, rtx *operands)
enum machine_mode mode;
int code;
rtx *operands;
{ {
rtx result; rtx result;
int need_copy; int need_copy;
...@@ -3106,10 +3006,7 @@ m68hc11_emit_logical (mode, code, operands) ...@@ -3106,10 +3006,7 @@ m68hc11_emit_logical (mode, code, operands)
} }
void void
m68hc11_split_logical (mode, code, operands) m68hc11_split_logical (enum machine_mode mode, int code, rtx *operands)
enum machine_mode mode;
int code;
rtx *operands;
{ {
rtx low[4]; rtx low[4];
rtx high[4]; rtx high[4];
...@@ -3157,9 +3054,7 @@ m68hc11_split_logical (mode, code, operands) ...@@ -3157,9 +3054,7 @@ m68hc11_split_logical (mode, code, operands)
/* Code generation. */ /* Code generation. */
void void
m68hc11_output_swap (insn, operands) m68hc11_output_swap (rtx insn ATTRIBUTE_UNUSED, rtx operands[])
rtx insn ATTRIBUTE_UNUSED;
rtx operands[];
{ {
/* We have to be careful with the cc_status. An address register swap /* We have to be careful with the cc_status. An address register swap
is generated for some comparison. The comparison is made with D is generated for some comparison. The comparison is made with D
...@@ -3211,9 +3106,7 @@ m68hc11_output_swap (insn, operands) ...@@ -3211,9 +3106,7 @@ m68hc11_output_swap (insn, operands)
This is used to decide whether a move that set flags should be used This is used to decide whether a move that set flags should be used
instead. */ instead. */
int int
next_insn_test_reg (insn, reg) next_insn_test_reg (rtx insn, rtx reg)
rtx insn;
rtx reg;
{ {
rtx body; rtx body;
...@@ -3234,9 +3127,7 @@ next_insn_test_reg (insn, reg) ...@@ -3234,9 +3127,7 @@ next_insn_test_reg (insn, reg)
/* Generate the code to move a 16-bit operand into another one. */ /* Generate the code to move a 16-bit operand into another one. */
void void
m68hc11_gen_movhi (insn, operands) m68hc11_gen_movhi (rtx insn, rtx *operands)
rtx insn;
rtx *operands;
{ {
int reg; int reg;
...@@ -3650,9 +3541,7 @@ m68hc11_gen_movhi (insn, operands) ...@@ -3650,9 +3541,7 @@ m68hc11_gen_movhi (insn, operands)
} }
void void
m68hc11_gen_movqi (insn, operands) m68hc11_gen_movqi (rtx insn, rtx *operands)
rtx insn;
rtx *operands;
{ {
/* Move a register or memory to the same location. /* Move a register or memory to the same location.
This is possible because such insn can appear This is possible because such insn can appear
...@@ -3932,10 +3821,7 @@ m68hc11_gen_movqi (insn, operands) ...@@ -3932,10 +3821,7 @@ m68hc11_gen_movqi (insn, operands)
The source and destination must be D or A and the shift must The source and destination must be D or A and the shift must
be a constant. */ be a constant. */
void void
m68hc11_gen_rotate (code, insn, operands) m68hc11_gen_rotate (enum rtx_code code, rtx insn, rtx operands[])
enum rtx_code code;
rtx insn;
rtx operands[];
{ {
int val; int val;
...@@ -4014,9 +3900,7 @@ m68hc11_gen_rotate (code, insn, operands) ...@@ -4014,9 +3900,7 @@ m68hc11_gen_rotate (code, insn, operands)
Do not alter them if the instruction would not alter the cc's. */ Do not alter them if the instruction would not alter the cc's. */
void void
m68hc11_notice_update_cc (exp, insn) m68hc11_notice_update_cc (rtx exp, rtx insn ATTRIBUTE_UNUSED)
rtx exp;
rtx insn ATTRIBUTE_UNUSED;
{ {
/* recognize SET insn's. */ /* recognize SET insn's. */
if (GET_CODE (exp) == SET) if (GET_CODE (exp) == SET)
...@@ -4116,8 +4000,7 @@ m68hc11_notice_update_cc (exp, insn) ...@@ -4116,8 +4000,7 @@ m68hc11_notice_update_cc (exp, insn)
the register 'reg'. See if the previous flags can be kept for the the register 'reg'. See if the previous flags can be kept for the
next instruction to avoid a comparison. */ next instruction to avoid a comparison. */
void void
m68hc11_notice_keep_cc (reg) m68hc11_notice_keep_cc (rtx reg)
rtx reg;
{ {
if (reg == 0 if (reg == 0
|| cc_prev_status.value1 == 0 || cc_prev_status.value1 == 0
...@@ -4192,10 +4075,10 @@ struct replace_info ...@@ -4192,10 +4075,10 @@ struct replace_info
int z_loaded_with_sp; int z_loaded_with_sp;
}; };
static int m68hc11_check_z_replacement PARAMS ((rtx, struct replace_info *)); static int m68hc11_check_z_replacement (rtx, struct replace_info *);
static void m68hc11_find_z_replacement PARAMS ((rtx, struct replace_info *)); static void m68hc11_find_z_replacement (rtx, struct replace_info *);
static void m68hc11_z_replacement PARAMS ((rtx)); static void m68hc11_z_replacement (rtx);
static void m68hc11_reassign_regs PARAMS ((rtx)); static void m68hc11_reassign_regs (rtx);
int z_replacement_completed = 0; int z_replacement_completed = 0;
...@@ -4205,9 +4088,7 @@ int z_replacement_completed = 0; ...@@ -4205,9 +4088,7 @@ int z_replacement_completed = 0;
continue replacement in next insns. */ continue replacement in next insns. */
static int static int
m68hc11_check_z_replacement (insn, info) m68hc11_check_z_replacement (rtx insn, struct replace_info *info)
rtx insn;
struct replace_info *info;
{ {
int this_insn_uses_ix; int this_insn_uses_ix;
int this_insn_uses_iy; int this_insn_uses_iy;
...@@ -4770,9 +4651,7 @@ m68hc11_check_z_replacement (insn, info) ...@@ -4770,9 +4651,7 @@ m68hc11_check_z_replacement (insn, info)
} }
static void static void
m68hc11_find_z_replacement (insn, info) m68hc11_find_z_replacement (rtx insn, struct replace_info *info)
rtx insn;
struct replace_info *info;
{ {
int reg; int reg;
...@@ -4883,8 +4762,7 @@ m68hc11_find_z_replacement (insn, info) ...@@ -4883,8 +4762,7 @@ m68hc11_find_z_replacement (insn, info)
Z and of the replacement register. */ Z and of the replacement register. */
static void static void
m68hc11_z_replacement (insn) m68hc11_z_replacement (rtx insn)
rtx insn;
{ {
rtx replace_reg_qi; rtx replace_reg_qi;
rtx replace_reg; rtx replace_reg;
...@@ -5094,8 +4972,7 @@ m68hc11_z_replacement (insn) ...@@ -5094,8 +4972,7 @@ m68hc11_z_replacement (insn)
on the instruction. */ on the instruction. */
static void static void
m68hc11_reassign_regs (first) m68hc11_reassign_regs (rtx first)
rtx first;
{ {
rtx insn; rtx insn;
...@@ -5159,7 +5036,7 @@ m68hc11_reassign_regs (first) ...@@ -5159,7 +5036,7 @@ m68hc11_reassign_regs (first)
'z_replacement_completed' is set to 2. */ 'z_replacement_completed' is set to 2. */
static void static void
m68hc11_reorg () m68hc11_reorg (void)
{ {
int split_done = 0; int split_done = 0;
rtx insn, first; rtx insn, first;
...@@ -5277,10 +5154,8 @@ m68hc11_init_libfuncs (void) ...@@ -5277,10 +5154,8 @@ m68hc11_init_libfuncs (void)
/* Cost of moving memory. */ /* Cost of moving memory. */
int int
m68hc11_memory_move_cost (mode, class, in) m68hc11_memory_move_cost (enum machine_mode mode, enum reg_class class,
enum machine_mode mode; int in ATTRIBUTE_UNUSED)
enum reg_class class;
int in ATTRIBUTE_UNUSED;
{ {
if (class <= H_REGS && class > NO_REGS) if (class <= H_REGS && class > NO_REGS)
{ {
...@@ -5304,10 +5179,8 @@ m68hc11_memory_move_cost (mode, class, in) ...@@ -5304,10 +5179,8 @@ m68hc11_memory_move_cost (mode, class, in)
have a move cost of 2. Setting a higher cost will force reload to check have a move cost of 2. Setting a higher cost will force reload to check
the constraints. */ the constraints. */
int int
m68hc11_register_move_cost (mode, from, to) m68hc11_register_move_cost (enum machine_mode mode, enum reg_class from,
enum machine_mode mode; enum reg_class to)
enum reg_class from;
enum reg_class to;
{ {
/* All costs are symmetric, so reduce cases by putting the /* All costs are symmetric, so reduce cases by putting the
lower number class as the destination. */ lower number class as the destination. */
...@@ -5329,8 +5202,7 @@ m68hc11_register_move_cost (mode, from, to) ...@@ -5329,8 +5202,7 @@ m68hc11_register_move_cost (mode, from, to)
If ADDR is not a valid address, its cost is irrelevant. */ If ADDR is not a valid address, its cost is irrelevant. */
static int static int
m68hc11_address_cost (addr) m68hc11_address_cost (rtx addr)
rtx addr;
{ {
int cost = 4; int cost = 4;
...@@ -5411,10 +5283,7 @@ m68hc11_address_cost (addr) ...@@ -5411,10 +5283,7 @@ m68hc11_address_cost (addr)
} }
static int static int
m68hc11_shift_cost (mode, x, shift) m68hc11_shift_cost (enum machine_mode mode, rtx x, int shift)
enum machine_mode mode;
rtx x;
int shift;
{ {
int total; int total;
...@@ -5443,10 +5312,8 @@ m68hc11_shift_cost (mode, x, shift) ...@@ -5443,10 +5312,8 @@ m68hc11_shift_cost (mode, x, shift)
} }
static int static int
m68hc11_rtx_costs_1 (x, code, outer_code) m68hc11_rtx_costs_1 (rtx x, enum rtx_code code,
rtx x; enum rtx_code outer_code ATTRIBUTE_UNUSED)
enum rtx_code code;
enum rtx_code outer_code ATTRIBUTE_UNUSED;
{ {
enum machine_mode mode = GET_MODE (x); enum machine_mode mode = GET_MODE (x);
int extra_cost = 0; int extra_cost = 0;
...@@ -5579,10 +5446,7 @@ m68hc11_rtx_costs_1 (x, code, outer_code) ...@@ -5579,10 +5446,7 @@ m68hc11_rtx_costs_1 (x, code, outer_code)
} }
static bool static bool
m68hc11_rtx_costs (x, code, outer_code, total) m68hc11_rtx_costs (rtx x, int code, int outer_code, int *total)
rtx x;
int code, outer_code;
int *total;
{ {
switch (code) switch (code)
{ {
...@@ -5634,7 +5498,7 @@ m68hc11_rtx_costs (x, code, outer_code, total) ...@@ -5634,7 +5498,7 @@ m68hc11_rtx_costs (x, code, outer_code, total)
static void static void
m68hc11_file_start () m68hc11_file_start (void)
{ {
default_file_start (); default_file_start ();
...@@ -5643,18 +5507,14 @@ m68hc11_file_start () ...@@ -5643,18 +5507,14 @@ m68hc11_file_start ()
static void static void
m68hc11_asm_out_constructor (symbol, priority) m68hc11_asm_out_constructor (rtx symbol, int priority)
rtx symbol;
int priority;
{ {
default_ctor_section_asm_out_constructor (symbol, priority); default_ctor_section_asm_out_constructor (symbol, priority);
fprintf (asm_out_file, "\t.globl\t__do_global_ctors\n"); fprintf (asm_out_file, "\t.globl\t__do_global_ctors\n");
} }
static void static void
m68hc11_asm_out_destructor (symbol, priority) m68hc11_asm_out_destructor (rtx symbol, int priority)
rtx symbol;
int priority;
{ {
default_dtor_section_asm_out_destructor (symbol, priority); default_dtor_section_asm_out_destructor (symbol, priority);
fprintf (asm_out_file, "\t.globl\t__do_global_dtors\n"); fprintf (asm_out_file, "\t.globl\t__do_global_dtors\n");
......
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