Commit f12b3fc8 by Steven Bosscher

pdp11-protos.h, [...]: Convert to ISO C90 function declarations and definitions.

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

From-SVN: r71880
parent 753aaa17
2003-09-28 Steven Bosscher <steven@gcc.gnu.org> 2003-09-28 Steven Bosscher <steven@gcc.gnu.org>
* config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c,
config/c4x/c4x-c.c, config/c4x/c4x-protos.h, config/c4x/c4x.c,
config/c4x/c4x.h:
Convert to ISO C90 function declarations and definitions.
2003-09-28 Steven Bosscher <steven@gcc.gnu.org>
* config/stormy16/stormy16.c, config/stormy16/stormy16-protos.h: * config/stormy16/stormy16.c, config/stormy16/stormy16-protos.h:
Convert to ISO C90 function declarations and definitions. Convert to ISO C90 function declarations and definitions.
......
...@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "c-pragma.h" #include "c-pragma.h"
#include "tm_p.h" #include "tm_p.h"
static int c4x_parse_pragma PARAMS ((const char *, tree *, tree *)); static int c4x_parse_pragma (const char *, tree *, tree *);
/* Handle machine specific pragmas for compatibility with existing /* Handle machine specific pragmas for compatibility with existing
compilers for the C3x/C4x. compilers for the C3x/C4x.
......
/* Definitions of target machine for GNU compiler. TMS320C[34]x /* Definitions of target machine for GNU compiler. TMS320C[34]x
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2003
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
...@@ -25,244 +25,236 @@ ...@@ -25,244 +25,236 @@
#ifndef GCC_C4X_PROTOS_H #ifndef GCC_C4X_PROTOS_H
#define GCC_C4X_PROTOS_H #define GCC_C4X_PROTOS_H
extern void c4x_override_options PARAMS ((void)); extern void c4x_override_options (void);
extern void c4x_optimization_options PARAMS ((int, int)); extern void c4x_optimization_options (int, int);
extern void c4x_output_ascii PARAMS ((FILE *, const char *, int)); extern void c4x_output_ascii (FILE *, const char *, int);
extern int c4x_interrupt_function_p PARAMS ((void)); extern int c4x_interrupt_function_p (void);
extern void c4x_expand_prologue PARAMS ((void)); extern void c4x_expand_prologue (void);
extern void c4x_expand_epilogue PARAMS ((void)); extern void c4x_expand_epilogue (void);
extern int c4x_null_epilogue_p PARAMS ((void)); extern int c4x_null_epilogue_p (void);
extern void c4x_global_label (const char *); extern void c4x_global_label (const char *);
extern void c4x_external_ref (const char *); extern void c4x_external_ref (const char *);
#ifdef TREE_CODE #ifdef TREE_CODE
extern void c4x_function_arg_advance PARAMS ((CUMULATIVE_ARGS *, extern void c4x_function_arg_advance (CUMULATIVE_ARGS *,
enum machine_mode, tree, int)); enum machine_mode, tree, int);
extern struct rtx_def *c4x_function_arg PARAMS ((CUMULATIVE_ARGS *, extern struct rtx_def *c4x_function_arg (CUMULATIVE_ARGS *,
enum machine_mode, tree, enum machine_mode, tree, int);
int));
#endif /* TREE_CODE */ #endif /* TREE_CODE */
#if defined(RTX_CODE) && defined(TREE_CODE) #if defined(RTX_CODE) && defined(TREE_CODE)
extern void c4x_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *c, tree, rtx)); extern void c4x_init_cumulative_args (CUMULATIVE_ARGS *c, tree, rtx);
extern struct rtx_def *c4x_va_arg PARAMS ((tree, tree)); extern struct rtx_def *c4x_va_arg (tree, tree);
extern rtx c4x_expand_builtin PARAMS ((tree, rtx, rtx, extern rtx c4x_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
enum machine_mode, int));
extern void c4x_init_builtins PARAMS ((void)); extern void c4x_init_builtins (void);
#endif /* TREE_CODE and RTX_CODE*/ #endif /* TREE_CODE and RTX_CODE*/
#ifdef RTX_CODE #ifdef RTX_CODE
extern struct rtx_def *c4x_gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx)); extern struct rtx_def *c4x_gen_compare_reg (enum rtx_code, rtx, rtx);
extern int c4x_check_legit_addr PARAMS ((enum machine_mode, rtx, int)); extern int c4x_check_legit_addr (enum machine_mode, rtx, int);
extern int c4x_hard_regno_mode_ok PARAMS ((unsigned int, enum machine_mode)); extern int c4x_hard_regno_mode_ok (unsigned int, enum machine_mode);
extern int c4x_hard_regno_rename_ok PARAMS ((unsigned int, unsigned int)); extern int c4x_hard_regno_rename_ok (unsigned int, unsigned int);
extern struct rtx_def *c4x_legitimize_address PARAMS ((rtx, extern struct rtx_def *c4x_legitimize_address (rtx, enum machine_mode);
enum machine_mode));
extern void c4x_print_operand PARAMS ((FILE *, rtx, int)); extern void c4x_print_operand (FILE *, rtx, int);
extern void c4x_print_operand_address PARAMS ((FILE *, rtx)); extern void c4x_print_operand_address (FILE *, rtx);
extern enum reg_class c4x_preferred_reload_class PARAMS ((rtx, extern enum reg_class c4x_preferred_reload_class (rtx, enum reg_class);
enum reg_class));
extern struct rtx_def *c4x_operand_subword PARAMS ((rtx, int, int, extern struct rtx_def *c4x_operand_subword (rtx, int, int, enum machine_mode);
enum machine_mode));
extern char *c4x_output_cbranch PARAMS ((const char *, rtx)); extern char *c4x_output_cbranch (const char *, rtx);
extern int c4x_label_conflict PARAMS ((rtx, rtx, rtx)); extern int c4x_label_conflict (rtx, rtx, rtx);
extern int c4x_address_conflict PARAMS ((rtx, rtx, int, int)); extern int c4x_address_conflict (rtx, rtx, int, int);
extern void c4x_rptb_insert PARAMS ((rtx insn)); extern void c4x_rptb_insert (rtx insn);
extern int c4x_rptb_nop_p PARAMS ((rtx)); extern int c4x_rptb_nop_p (rtx);
extern int c4x_rptb_rpts_p PARAMS ((rtx, rtx)); extern int c4x_rptb_rpts_p (rtx, rtx);
extern int c4x_check_laj_p PARAMS ((rtx)); extern int c4x_check_laj_p (rtx);
extern int c4x_autoinc_operand PARAMS ((rtx, enum machine_mode)); extern int c4x_autoinc_operand (rtx, enum machine_mode);
extern int any_operand PARAMS ((rtx, enum machine_mode)); extern int any_operand (rtx, enum machine_mode);
extern int fp_zero_operand PARAMS ((rtx, enum machine_mode)); extern int fp_zero_operand (rtx, enum machine_mode);
extern int const_operand PARAMS ((rtx, enum machine_mode)); extern int const_operand (rtx, enum machine_mode);
extern int stik_const_operand PARAMS ((rtx, enum machine_mode)); extern int stik_const_operand (rtx, enum machine_mode);
extern int not_const_operand PARAMS ((rtx, enum machine_mode)); extern int not_const_operand (rtx, enum machine_mode);
extern int parallel_operand PARAMS ((rtx, enum machine_mode)); extern int parallel_operand (rtx, enum machine_mode);
extern int reg_or_const_operand PARAMS ((rtx, enum machine_mode)); extern int reg_or_const_operand (rtx, enum machine_mode);
extern int reg_operand PARAMS ((rtx, enum machine_mode)); extern int reg_operand (rtx, enum machine_mode);
extern int mixed_subreg_operand PARAMS ((rtx, enum machine_mode)); extern int mixed_subreg_operand (rtx, enum machine_mode);
extern int reg_imm_operand PARAMS ((rtx, enum machine_mode)); extern int reg_imm_operand (rtx, enum machine_mode);
extern int r0r1_reg_operand PARAMS ((rtx, enum machine_mode)); extern int r0r1_reg_operand (rtx, enum machine_mode);
extern int r2r3_reg_operand PARAMS ((rtx, enum machine_mode)); extern int r2r3_reg_operand (rtx, enum machine_mode);
extern int ext_low_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ext_low_reg_operand (rtx, enum machine_mode);
extern int ext_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ext_reg_operand (rtx, enum machine_mode);
extern int std_reg_operand PARAMS ((rtx, enum machine_mode)); extern int std_reg_operand (rtx, enum machine_mode);
extern int std_or_reg_operand PARAMS ((rtx, enum machine_mode)); extern int std_or_reg_operand (rtx, enum machine_mode);
extern int dst_operand PARAMS ((rtx, enum machine_mode)); extern int dst_operand (rtx, enum machine_mode);
extern int src_operand PARAMS ((rtx, enum machine_mode)); extern int src_operand (rtx, enum machine_mode);
extern int src_hi_operand PARAMS ((rtx, enum machine_mode)); extern int src_hi_operand (rtx, enum machine_mode);
extern int lsrc_operand PARAMS ((rtx, enum machine_mode)); extern int lsrc_operand (rtx, enum machine_mode);
extern int tsrc_operand PARAMS ((rtx, enum machine_mode)); extern int tsrc_operand (rtx, enum machine_mode);
extern int nonimmediate_src_operand PARAMS ((rtx, enum machine_mode)); extern int nonimmediate_src_operand (rtx, enum machine_mode);
extern int nonimmediate_lsrc_operand PARAMS ((rtx, enum machine_mode)); extern int nonimmediate_lsrc_operand (rtx, enum machine_mode);
extern int addr_reg_operand PARAMS ((rtx, enum machine_mode)); extern int addr_reg_operand (rtx, enum machine_mode);
extern int index_reg_operand PARAMS ((rtx, enum machine_mode)); extern int index_reg_operand (rtx, enum machine_mode);
extern int dp_reg_operand PARAMS ((rtx, enum machine_mode)); extern int dp_reg_operand (rtx, enum machine_mode);
extern int sp_reg_operand PARAMS ((rtx, enum machine_mode)); extern int sp_reg_operand (rtx, enum machine_mode);
extern int rc_reg_operand PARAMS ((rtx, enum machine_mode)); extern int rc_reg_operand (rtx, enum machine_mode);
extern int st_reg_operand PARAMS ((rtx, enum machine_mode)); extern int st_reg_operand (rtx, enum machine_mode);
extern int symbolic_address_operand PARAMS ((rtx, enum machine_mode)); extern int symbolic_address_operand (rtx, enum machine_mode);
extern int ar0_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar0_reg_operand (rtx, enum machine_mode);
extern int ar0_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar0_mem_operand (rtx, enum machine_mode);
extern int ar1_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar1_reg_operand (rtx, enum machine_mode);
extern int ar1_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar1_mem_operand (rtx, enum machine_mode);
extern int ar2_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar2_reg_operand (rtx, enum machine_mode);
extern int ar2_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar2_mem_operand (rtx, enum machine_mode);
extern int ar3_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar3_reg_operand (rtx, enum machine_mode);
extern int ar3_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar3_mem_operand (rtx, enum machine_mode);
extern int ar4_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar4_reg_operand (rtx, enum machine_mode);
extern int ar4_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar4_mem_operand (rtx, enum machine_mode);
extern int ar5_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar5_reg_operand (rtx, enum machine_mode);
extern int ar5_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar5_mem_operand (rtx, enum machine_mode);
extern int ar6_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar6_reg_operand (rtx, enum machine_mode);
extern int ar6_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar6_mem_operand (rtx, enum machine_mode);
extern int ar7_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ar7_reg_operand (rtx, enum machine_mode);
extern int ar7_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ar7_mem_operand (rtx, enum machine_mode);
extern int ir0_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ir0_reg_operand (rtx, enum machine_mode);
extern int ir0_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ir0_mem_operand (rtx, enum machine_mode);
extern int ir1_reg_operand PARAMS ((rtx, enum machine_mode)); extern int ir1_reg_operand (rtx, enum machine_mode);
extern int ir1_mem_operand PARAMS ((rtx, enum machine_mode)); extern int ir1_mem_operand (rtx, enum machine_mode);
extern int group1_reg_operand PARAMS ((rtx, enum machine_mode)); extern int group1_reg_operand (rtx, enum machine_mode);
extern int group1_mem_operand PARAMS ((rtx, enum machine_mode)); extern int group1_mem_operand (rtx, enum machine_mode);
extern int arx_reg_operand PARAMS ((rtx, enum machine_mode)); extern int arx_reg_operand (rtx, enum machine_mode);
extern int call_address_operand PARAMS ((rtx, enum machine_mode)); extern int call_address_operand (rtx, enum machine_mode);
extern int par_ind_operand PARAMS ((rtx, enum machine_mode)); extern int par_ind_operand (rtx, enum machine_mode);
extern int not_rc_reg PARAMS ((rtx, enum machine_mode)); extern int not_rc_reg (rtx, enum machine_mode);
extern int not_modify_reg PARAMS ((rtx, enum machine_mode)); extern int not_modify_reg (rtx, enum machine_mode);
extern int c4x_shiftable_constant PARAMS ((rtx)); extern int c4x_shiftable_constant (rtx);
extern int c4x_H_constant PARAMS ((rtx)); extern int c4x_H_constant (rtx);
extern int c4x_I_constant PARAMS ((rtx)); extern int c4x_I_constant (rtx);
extern int c4x_J_constant PARAMS ((rtx)); extern int c4x_J_constant (rtx);
extern int c4x_L_constant PARAMS ((rtx)); extern int c4x_L_constant (rtx);
extern int c4x_Q_constraint PARAMS ((rtx)); extern int c4x_Q_constraint (rtx);
extern int c4x_R_constraint PARAMS ((rtx)); extern int c4x_R_constraint (rtx);
extern int c4x_S_constraint PARAMS ((rtx)); extern int c4x_S_constraint (rtx);
extern int c4x_T_constraint PARAMS ((rtx)); extern int c4x_T_constraint (rtx);
extern int c4x_U_constraint PARAMS ((rtx)); extern int c4x_U_constraint (rtx);
extern void c4x_emit_libcall PARAMS ((rtx, enum rtx_code, extern void c4x_emit_libcall (rtx, enum rtx_code, enum machine_mode,
enum machine_mode, enum machine_mode, int, rtx *);
enum machine_mode, int, rtx *));
extern void c4x_emit_libcall3 PARAMS ((rtx, enum rtx_code, extern void c4x_emit_libcall3 (rtx, enum rtx_code, enum machine_mode, rtx *);
enum machine_mode, rtx *));
extern void c4x_emit_libcall_mulhi PARAMS ((rtx, enum rtx_code, extern void c4x_emit_libcall_mulhi (rtx, enum rtx_code,
enum machine_mode, rtx *)); enum machine_mode, rtx *);
extern int c4x_emit_move_sequence PARAMS ((rtx *, enum machine_mode)); extern int c4x_emit_move_sequence (rtx *, enum machine_mode);
extern int legitimize_operands PARAMS ((enum rtx_code, rtx *, extern int legitimize_operands (enum rtx_code, rtx *, enum machine_mode);
enum machine_mode));
extern int valid_operands PARAMS ((enum rtx_code, rtx *, enum machine_mode)); extern int valid_operands (enum rtx_code, rtx *, enum machine_mode);
extern int valid_parallel_load_store PARAMS ((rtx *, enum machine_mode)); extern int valid_parallel_load_store (rtx *, enum machine_mode);
extern int valid_parallel_operands_4 PARAMS ((rtx *, enum machine_mode)); extern int valid_parallel_operands_4 (rtx *, enum machine_mode);
extern int valid_parallel_operands_5 PARAMS ((rtx *, enum machine_mode)); extern int valid_parallel_operands_5 (rtx *, enum machine_mode);
extern int valid_parallel_operands_6 PARAMS ((rtx *, enum machine_mode)); extern int valid_parallel_operands_6 (rtx *, enum machine_mode);
extern GTY(()) rtx smulhi3_libfunc; extern GTY(()) rtx smulhi3_libfunc;
extern GTY(()) rtx umulhi3_libfunc; extern GTY(()) rtx umulhi3_libfunc;
...@@ -287,13 +279,13 @@ extern enum machine_mode c4x_caller_save_map[FIRST_PSEUDO_REGISTER]; ...@@ -287,13 +279,13 @@ extern enum machine_mode c4x_caller_save_map[FIRST_PSEUDO_REGISTER];
extern int c4x_rpts_cycles; /* Max cycles for RPTS. */ extern int c4x_rpts_cycles; /* Max cycles for RPTS. */
extern int c4x_cpu_version; /* Cpu version C30/31/32/40/44. */ extern int c4x_cpu_version; /* Cpu version C30/31/32/40/44. */
extern void c4x_pr_CODE_SECTION PARAMS ((struct cpp_reader *)); extern void c4x_pr_CODE_SECTION (struct cpp_reader *);
extern void c4x_pr_DATA_SECTION PARAMS ((struct cpp_reader *)); extern void c4x_pr_DATA_SECTION (struct cpp_reader *);
extern void c4x_pr_FUNC_IS_PURE PARAMS ((struct cpp_reader *)); extern void c4x_pr_FUNC_IS_PURE (struct cpp_reader *);
extern void c4x_pr_FUNC_NEVER_RETURNS PARAMS ((struct cpp_reader *)); extern void c4x_pr_FUNC_NEVER_RETURNS (struct cpp_reader *);
extern void c4x_pr_INTERRUPT PARAMS ((struct cpp_reader *)); extern void c4x_pr_INTERRUPT (struct cpp_reader *);
extern void c4x_pr_ignored PARAMS ((struct cpp_reader *)); extern void c4x_pr_ignored (struct cpp_reader *);
extern void c4x_init_pragma PARAMS ((int (*) (tree *))); extern void c4x_init_pragma (int (*) (tree *));
extern GTY(()) tree code_tree; extern GTY(()) tree code_tree;
extern GTY(()) tree data_tree; extern GTY(()) tree data_tree;
......
/* Subroutines for assembler code output on the TMS320C[34]x /* Subroutines for assembler code output on the TMS320C[34]x
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz) Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
...@@ -167,39 +167,38 @@ tree interrupt_tree = NULL_TREE; ...@@ -167,39 +167,38 @@ tree interrupt_tree = NULL_TREE;
tree naked_tree = NULL_TREE; tree naked_tree = NULL_TREE;
/* Forward declarations */ /* Forward declarations */
static int c4x_isr_reg_used_p PARAMS ((unsigned int)); static int c4x_isr_reg_used_p (unsigned int);
static int c4x_leaf_function_p PARAMS ((void)); static int c4x_leaf_function_p (void);
static int c4x_naked_function_p PARAMS ((void)); static int c4x_naked_function_p (void);
static int c4x_immed_float_p PARAMS ((rtx)); static int c4x_immed_float_p (rtx);
static int c4x_a_register PARAMS ((rtx)); static int c4x_a_register (rtx);
static int c4x_x_register PARAMS ((rtx)); static int c4x_x_register (rtx);
static int c4x_immed_int_constant PARAMS ((rtx)); static int c4x_immed_int_constant (rtx);
static int c4x_immed_float_constant PARAMS ((rtx)); static int c4x_immed_float_constant (rtx);
static int c4x_K_constant PARAMS ((rtx)); static int c4x_K_constant (rtx);
static int c4x_N_constant PARAMS ((rtx)); static int c4x_N_constant (rtx);
static int c4x_O_constant PARAMS ((rtx)); static int c4x_O_constant (rtx);
static int c4x_R_indirect PARAMS ((rtx)); static int c4x_R_indirect (rtx);
static int c4x_S_indirect PARAMS ((rtx)); static int c4x_S_indirect (rtx);
static void c4x_S_address_parse PARAMS ((rtx , int *, int *, int *, int *)); static void c4x_S_address_parse (rtx , int *, int *, int *, int *);
static int c4x_valid_operands PARAMS ((enum rtx_code, rtx *, static int c4x_valid_operands (enum rtx_code, rtx *, enum machine_mode, int);
enum machine_mode, int)); static int c4x_arn_reg_operand (rtx, enum machine_mode, unsigned int);
static int c4x_arn_reg_operand PARAMS ((rtx, enum machine_mode, unsigned int)); static int c4x_arn_mem_operand (rtx, enum machine_mode, unsigned int);
static int c4x_arn_mem_operand PARAMS ((rtx, enum machine_mode, unsigned int)); static void c4x_file_start (void);
static void c4x_file_start PARAMS ((void)); static void c4x_file_end (void);
static void c4x_file_end PARAMS ((void)); static void c4x_check_attribute (const char *, tree, tree, tree *);
static void c4x_check_attribute PARAMS ((const char *, tree, tree, tree *)); static int c4x_r11_set_p (rtx);
static int c4x_r11_set_p PARAMS ((rtx)); static int c4x_rptb_valid_p (rtx, rtx);
static int c4x_rptb_valid_p PARAMS ((rtx, rtx)); static void c4x_reorg (void);
static void c4x_reorg PARAMS ((void)); static int c4x_label_ref_used_p (rtx, rtx);
static int c4x_label_ref_used_p PARAMS ((rtx, rtx)); static tree c4x_handle_fntype_attribute (tree *, tree, tree, int, bool *);
static tree c4x_handle_fntype_attribute PARAMS ((tree *, tree, tree, int, bool *));
const struct attribute_spec c4x_attribute_table[]; const struct attribute_spec c4x_attribute_table[];
static void c4x_insert_attributes PARAMS ((tree, tree *)); static void c4x_insert_attributes (tree, tree *);
static void c4x_asm_named_section PARAMS ((const char *, unsigned int)); static void c4x_asm_named_section (const char *, unsigned int);
static int c4x_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int c4x_adjust_cost (rtx, rtx, rtx, int);
static void c4x_globalize_label PARAMS ((FILE *, const char *)); static void c4x_globalize_label (FILE *, const char *);
static bool c4x_rtx_costs PARAMS ((rtx, int, int, int *)); static bool c4x_rtx_costs (rtx, int, int, int *);
static int c4x_address_cost PARAMS ((rtx)); static int c4x_address_cost (rtx);
/* Initialize the GCC target structure. */ /* Initialize the GCC target structure. */
#undef TARGET_ASM_BYTE_OP #undef TARGET_ASM_BYTE_OP
...@@ -249,7 +248,7 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -249,7 +248,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
type and sometimes adjust other TARGET_ options. */ type and sometimes adjust other TARGET_ options. */
void void
c4x_override_options () c4x_override_options (void)
{ {
if (c4x_rpts_cycles_string) if (c4x_rpts_cycles_string)
c4x_rpts_cycles = atoi (c4x_rpts_cycles_string); c4x_rpts_cycles = atoi (c4x_rpts_cycles_string);
...@@ -322,9 +321,8 @@ c4x_override_options () ...@@ -322,9 +321,8 @@ c4x_override_options ()
/* This is called before c4x_override_options. */ /* This is called before c4x_override_options. */
void void
c4x_optimization_options (level, size) c4x_optimization_options (int level ATTRIBUTE_UNUSED,
int level ATTRIBUTE_UNUSED; int size ATTRIBUTE_UNUSED)
int size ATTRIBUTE_UNUSED;
{ {
/* Scheduling before register allocation can screw up global /* Scheduling before register allocation can screw up global
register allocation, especially for functions that use MPY||ADD register allocation, especially for functions that use MPY||ADD
...@@ -339,10 +337,7 @@ c4x_optimization_options (level, size) ...@@ -339,10 +337,7 @@ c4x_optimization_options (level, size)
#define C4X_ASCII_LIMIT 40 #define C4X_ASCII_LIMIT 40
void void
c4x_output_ascii (stream, ptr, len) c4x_output_ascii (FILE *stream, const char *ptr, int len)
FILE *stream;
const char *ptr;
int len;
{ {
char sbuf[C4X_ASCII_LIMIT + 1]; char sbuf[C4X_ASCII_LIMIT + 1];
int s, l, special, first = 1, onlys; int s, l, special, first = 1, onlys;
...@@ -423,9 +418,7 @@ c4x_output_ascii (stream, ptr, len) ...@@ -423,9 +418,7 @@ c4x_output_ascii (stream, ptr, len)
int int
c4x_hard_regno_mode_ok (regno, mode) c4x_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
unsigned int regno;
enum machine_mode mode;
{ {
switch (mode) switch (mode)
{ {
...@@ -460,9 +453,7 @@ c4x_hard_regno_mode_ok (regno, mode) ...@@ -460,9 +453,7 @@ c4x_hard_regno_mode_ok (regno, mode)
/* Return nonzero if REGNO1 can be renamed to REGNO2. */ /* Return nonzero if REGNO1 can be renamed to REGNO2. */
int int
c4x_hard_regno_rename_ok (regno1, regno2) c4x_hard_regno_rename_ok (unsigned int regno1, unsigned int regno2)
unsigned int regno1;
unsigned int regno2;
{ {
/* We can not copy call saved registers from mode QI into QF or from /* We can not copy call saved registers from mode QI into QF or from
mode QF into QI. */ mode QF into QI. */
...@@ -522,10 +513,7 @@ static const int c4x_fp_reglist[2] = {R2_REGNO, R3_REGNO}; ...@@ -522,10 +513,7 @@ static const int c4x_fp_reglist[2] = {R2_REGNO, R3_REGNO};
For a library call, FNTYPE is 0. */ For a library call, FNTYPE is 0. */
void void
c4x_init_cumulative_args (cum, fntype, libname) c4x_init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, rtx libname)
CUMULATIVE_ARGS *cum; /* Argument info to initialize. */
tree fntype; /* Tree ptr for function decl. */
rtx libname; /* SYMBOL_REF of library name or 0. */
{ {
tree param, next_param; tree param, next_param;
...@@ -601,11 +589,8 @@ c4x_init_cumulative_args (cum, fntype, libname) ...@@ -601,11 +589,8 @@ c4x_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
c4x_function_arg_advance (cum, mode, type, named) c4x_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; /* Current arg information. */ tree type, int named)
enum machine_mode mode; /* Current arg mode. */
tree type; /* Type of the arg or 0 if lib support. */
int named; /* Whether or not the argument was named. */
{ {
if (TARGET_DEBUG) if (TARGET_DEBUG)
fprintf (stderr, "c4x_function_adv(mode=%s, named=%d)\n\n", fprintf (stderr, "c4x_function_adv(mode=%s, named=%d)\n\n",
...@@ -648,11 +633,8 @@ c4x_function_arg_advance (cum, mode, type, named) ...@@ -648,11 +633,8 @@ c4x_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 *
c4x_function_arg (cum, mode, type, named) c4x_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; /* Current arg information. */ tree type, int named)
enum machine_mode mode; /* Current arg mode. */
tree type; /* Type of the arg or 0 if lib support. */
int named; /* != 0 for normal args, == 0 for ... args. */
{ {
int reg = 0; /* Default to passing argument on stack. */ int reg = 0; /* Default to passing argument on stack. */
...@@ -731,8 +713,7 @@ c4x_function_arg (cum, mode, type, named) ...@@ -731,8 +713,7 @@ c4x_function_arg (cum, mode, type, named)
/* C[34]x arguments grow in weird ways (downwards) that the standard /* C[34]x arguments grow in weird ways (downwards) that the standard
varargs stuff can't handle.. */ varargs stuff can't handle.. */
rtx rtx
c4x_va_arg (valist, type) c4x_va_arg (tree valist, tree type)
tree valist, type;
{ {
tree t; tree t;
...@@ -745,8 +726,7 @@ c4x_va_arg (valist, type) ...@@ -745,8 +726,7 @@ c4x_va_arg (valist, type)
static int static int
c4x_isr_reg_used_p (regno) c4x_isr_reg_used_p (unsigned int regno)
unsigned int regno;
{ {
/* Don't save/restore FP or ST, we handle them separately. */ /* Don't save/restore FP or ST, we handle them separately. */
if (regno == FRAME_POINTER_REGNUM if (regno == FRAME_POINTER_REGNUM
...@@ -773,7 +753,7 @@ c4x_isr_reg_used_p (regno) ...@@ -773,7 +753,7 @@ c4x_isr_reg_used_p (regno)
static int static int
c4x_leaf_function_p () c4x_leaf_function_p (void)
{ {
/* A leaf function makes no calls, so we only need /* A leaf function makes no calls, so we only need
to save/restore the registers we actually use. to save/restore the registers we actually use.
...@@ -800,7 +780,7 @@ c4x_leaf_function_p () ...@@ -800,7 +780,7 @@ c4x_leaf_function_p ()
static int static int
c4x_naked_function_p () c4x_naked_function_p (void)
{ {
tree type; tree type;
...@@ -810,7 +790,7 @@ c4x_naked_function_p () ...@@ -810,7 +790,7 @@ c4x_naked_function_p ()
int int
c4x_interrupt_function_p () c4x_interrupt_function_p (void)
{ {
if (lookup_attribute ("interrupt", if (lookup_attribute ("interrupt",
TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl)))) TYPE_ATTRIBUTES (TREE_TYPE (current_function_decl))))
...@@ -827,7 +807,7 @@ c4x_interrupt_function_p () ...@@ -827,7 +807,7 @@ c4x_interrupt_function_p ()
} }
void void
c4x_expand_prologue () c4x_expand_prologue (void)
{ {
unsigned int regno; unsigned int regno;
int size = get_frame_size (); int size = get_frame_size ();
...@@ -1017,7 +997,7 @@ c4x_expand_prologue () ...@@ -1017,7 +997,7 @@ c4x_expand_prologue ()
void void
c4x_expand_epilogue() c4x_expand_epilogue(void)
{ {
int regno; int regno;
int jump = 0; int jump = 0;
...@@ -1216,7 +1196,7 @@ c4x_expand_epilogue() ...@@ -1216,7 +1196,7 @@ c4x_expand_epilogue()
int int
c4x_null_epilogue_p () c4x_null_epilogue_p (void)
{ {
int regno; int regno;
...@@ -1239,9 +1219,7 @@ c4x_null_epilogue_p () ...@@ -1239,9 +1219,7 @@ c4x_null_epilogue_p ()
int int
c4x_emit_move_sequence (operands, mode) c4x_emit_move_sequence (rtx *operands, enum machine_mode mode)
rtx *operands;
enum machine_mode mode;
{ {
rtx op0 = operands[0]; rtx op0 = operands[0];
rtx op1 = operands[1]; rtx op1 = operands[1];
...@@ -1388,13 +1366,9 @@ c4x_emit_move_sequence (operands, mode) ...@@ -1388,13 +1366,9 @@ c4x_emit_move_sequence (operands, mode)
void void
c4x_emit_libcall (libcall, code, dmode, smode, noperands, operands) c4x_emit_libcall (rtx libcall, enum rtx_code code,
rtx libcall; 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;
...@@ -1426,22 +1400,16 @@ c4x_emit_libcall (libcall, code, dmode, smode, noperands, operands) ...@@ -1426,22 +1400,16 @@ c4x_emit_libcall (libcall, code, dmode, smode, noperands, operands)
void void
c4x_emit_libcall3 (libcall, code, mode, operands) c4x_emit_libcall3 (rtx libcall, enum rtx_code code,
rtx libcall; enum machine_mode mode, rtx *operands)
enum rtx_code code;
enum machine_mode mode;
rtx *operands;
{ {
c4x_emit_libcall (libcall, code, mode, mode, 3, operands); c4x_emit_libcall (libcall, code, mode, mode, 3, operands);
} }
void void
c4x_emit_libcall_mulhi (libcall, code, mode, operands) c4x_emit_libcall_mulhi (rtx libcall, enum rtx_code code,
rtx libcall; enum machine_mode mode, rtx *operands)
enum rtx_code code;
enum machine_mode mode;
rtx *operands;
{ {
rtx ret; rtx ret;
rtx insns; rtx insns;
...@@ -1463,10 +1431,7 @@ c4x_emit_libcall_mulhi (libcall, code, mode, operands) ...@@ -1463,10 +1431,7 @@ c4x_emit_libcall_mulhi (libcall, code, mode, operands)
int int
c4x_check_legit_addr (mode, addr, strict) c4x_check_legit_addr (enum machine_mode mode, rtx addr, int strict)
enum machine_mode mode;
rtx addr;
int strict;
{ {
rtx base = NULL_RTX; /* Base register (AR0-AR7). */ rtx base = NULL_RTX; /* Base register (AR0-AR7). */
rtx indx = NULL_RTX; /* Index register (IR0,IR1). */ rtx indx = NULL_RTX; /* Index register (IR0,IR1). */
...@@ -1660,9 +1625,8 @@ c4x_check_legit_addr (mode, addr, strict) ...@@ -1660,9 +1625,8 @@ c4x_check_legit_addr (mode, addr, strict)
rtx rtx
c4x_legitimize_address (orig, mode) c4x_legitimize_address (rtx orig ATTRIBUTE_UNUSED,
rtx orig ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (orig) == SYMBOL_REF if (GET_CODE (orig) == SYMBOL_REF
|| GET_CODE (orig) == LABEL_REF) || GET_CODE (orig) == LABEL_REF)
...@@ -1697,8 +1661,7 @@ c4x_legitimize_address (orig, mode) ...@@ -1697,8 +1661,7 @@ c4x_legitimize_address (orig, mode)
Unfortunately, the C4x address cost depends on other operands. */ Unfortunately, the C4x address cost depends on other operands. */
static int static int
c4x_address_cost (addr) c4x_address_cost (rtx addr)
rtx addr;
{ {
switch (GET_CODE (addr)) switch (GET_CODE (addr))
{ {
...@@ -1788,9 +1751,7 @@ c4x_address_cost (addr) ...@@ -1788,9 +1751,7 @@ c4x_address_cost (addr)
rtx rtx
c4x_gen_compare_reg (code, x, y) c4x_gen_compare_reg (enum rtx_code code, rtx x, rtx y)
enum rtx_code code;
rtx x, y;
{ {
enum machine_mode mode = SELECT_CC_MODE (code, x, y); enum machine_mode mode = SELECT_CC_MODE (code, x, y);
rtx cc_reg; rtx cc_reg;
...@@ -1806,9 +1767,7 @@ c4x_gen_compare_reg (code, x, y) ...@@ -1806,9 +1767,7 @@ c4x_gen_compare_reg (code, x, y)
} }
char * char *
c4x_output_cbranch (form, seq) c4x_output_cbranch (const char *form, rtx seq)
const char *form;
rtx seq;
{ {
int delayed = 0; int delayed = 0;
int annultrue = 0; int annultrue = 0;
...@@ -1850,10 +1809,7 @@ c4x_output_cbranch (form, seq) ...@@ -1850,10 +1809,7 @@ c4x_output_cbranch (form, seq)
} }
void void
c4x_print_operand (file, op, letter) c4x_print_operand (FILE *file, rtx op, int letter)
FILE *file; /* File to write to. */
rtx op; /* Operand to print. */
int letter; /* %<letter> or 0. */
{ {
rtx op1; rtx op1;
enum rtx_code code; enum rtx_code code;
...@@ -2033,9 +1989,7 @@ c4x_print_operand (file, op, letter) ...@@ -2033,9 +1989,7 @@ c4x_print_operand (file, op, letter)
void void
c4x_print_operand_address (file, addr) c4x_print_operand_address (FILE *file, rtx addr)
FILE *file;
rtx addr;
{ {
switch (GET_CODE (addr)) switch (GET_CODE (addr))
{ {
...@@ -2176,8 +2130,7 @@ c4x_print_operand_address (file, addr) ...@@ -2176,8 +2130,7 @@ c4x_print_operand_address (file, addr)
in the immediate field. */ in the immediate field. */
static int static int
c4x_immed_float_p (op) c4x_immed_float_p (rtx op)
rtx op;
{ {
long convval[2]; long convval[2];
int exponent; int exponent;
...@@ -2223,8 +2176,7 @@ c4x_immed_float_p (op) ...@@ -2223,8 +2176,7 @@ c4x_immed_float_p (op)
!!! FIXME. The rptb_top insn may be sucked into a SEQUENCE. */ !!! FIXME. The rptb_top insn may be sucked into a SEQUENCE. */
int int
c4x_rptb_nop_p (insn) c4x_rptb_nop_p (rtx insn)
rtx insn;
{ {
rtx start_label; rtx start_label;
int i; int i;
...@@ -2282,8 +2234,7 @@ c4x_rptb_nop_p (insn) ...@@ -2282,8 +2234,7 @@ c4x_rptb_nop_p (insn)
pass. The C4x cpu can not handle this. */ pass. The C4x cpu can not handle this. */
static int static int
c4x_label_ref_used_p (x, code_label) c4x_label_ref_used_p (rtx x, rtx code_label)
rtx x, code_label;
{ {
enum rtx_code code; enum rtx_code code;
int i, j; int i, j;
...@@ -2314,8 +2265,7 @@ c4x_label_ref_used_p (x, code_label) ...@@ -2314,8 +2265,7 @@ c4x_label_ref_used_p (x, code_label)
static int static int
c4x_rptb_valid_p (insn, start_label) c4x_rptb_valid_p (rtx insn, rtx start_label)
rtx insn, start_label;
{ {
rtx end = insn; rtx end = insn;
rtx start; rtx start;
...@@ -2375,8 +2325,7 @@ c4x_rptb_valid_p (insn, start_label) ...@@ -2375,8 +2325,7 @@ c4x_rptb_valid_p (insn, start_label)
void void
c4x_rptb_insert (insn) c4x_rptb_insert (rtx insn)
rtx insn;
{ {
rtx end_label; rtx end_label;
rtx start_label; rtx start_label;
...@@ -2446,7 +2395,7 @@ c4x_rptb_insert (insn) ...@@ -2446,7 +2395,7 @@ c4x_rptb_insert (insn)
allocated as the loop counter. */ allocated as the loop counter. */
static void static void
c4x_reorg () c4x_reorg (void)
{ {
rtx insn; rtx insn;
...@@ -2491,24 +2440,21 @@ c4x_reorg () ...@@ -2491,24 +2440,21 @@ c4x_reorg ()
static int static int
c4x_a_register (op) c4x_a_register (rtx op)
rtx op;
{ {
return REG_P (op) && IS_ADDR_OR_PSEUDO_REG (op); return REG_P (op) && IS_ADDR_OR_PSEUDO_REG (op);
} }
static int static int
c4x_x_register (op) c4x_x_register (rtx op)
rtx op;
{ {
return REG_P (op) && IS_INDEX_OR_PSEUDO_REG (op); return REG_P (op) && IS_INDEX_OR_PSEUDO_REG (op);
} }
static int static int
c4x_immed_int_constant (op) c4x_immed_int_constant (rtx op)
rtx op;
{ {
if (GET_CODE (op) != CONST_INT) if (GET_CODE (op) != CONST_INT)
return 0; return 0;
...@@ -2520,8 +2466,7 @@ c4x_immed_int_constant (op) ...@@ -2520,8 +2466,7 @@ c4x_immed_int_constant (op)
static int static int
c4x_immed_float_constant (op) c4x_immed_float_constant (rtx op)
rtx op;
{ {
if (GET_CODE (op) != CONST_DOUBLE) if (GET_CODE (op) != CONST_DOUBLE)
return 0; return 0;
...@@ -2535,8 +2480,7 @@ c4x_immed_float_constant (op) ...@@ -2535,8 +2480,7 @@ c4x_immed_float_constant (op)
int int
c4x_shiftable_constant (op) c4x_shiftable_constant (rtx op)
rtx op;
{ {
int i; int i;
int mask; int mask;
...@@ -2556,24 +2500,21 @@ c4x_shiftable_constant (op) ...@@ -2556,24 +2500,21 @@ c4x_shiftable_constant (op)
int int
c4x_H_constant (op) c4x_H_constant (rtx op)
rtx op;
{ {
return c4x_immed_float_constant (op) && c4x_immed_float_p (op); return c4x_immed_float_constant (op) && c4x_immed_float_p (op);
} }
int int
c4x_I_constant (op) c4x_I_constant (rtx op)
rtx op;
{ {
return c4x_immed_int_constant (op) && IS_INT16_CONST (INTVAL (op)); return c4x_immed_int_constant (op) && IS_INT16_CONST (INTVAL (op));
} }
int int
c4x_J_constant (op) c4x_J_constant (rtx op)
rtx op;
{ {
if (TARGET_C3X) if (TARGET_C3X)
return 0; return 0;
...@@ -2582,8 +2523,7 @@ c4x_J_constant (op) ...@@ -2582,8 +2523,7 @@ c4x_J_constant (op)
static int static int
c4x_K_constant (op) c4x_K_constant (rtx op)
rtx op;
{ {
if (TARGET_C3X || ! c4x_immed_int_constant (op)) if (TARGET_C3X || ! c4x_immed_int_constant (op))
return 0; return 0;
...@@ -2592,24 +2532,21 @@ c4x_K_constant (op) ...@@ -2592,24 +2532,21 @@ c4x_K_constant (op)
int int
c4x_L_constant (op) c4x_L_constant (rtx op)
rtx op;
{ {
return c4x_immed_int_constant (op) && IS_UINT16_CONST (INTVAL (op)); return c4x_immed_int_constant (op) && IS_UINT16_CONST (INTVAL (op));
} }
static int static int
c4x_N_constant (op) c4x_N_constant (rtx op)
rtx op;
{ {
return c4x_immed_int_constant (op) && IS_NOT_UINT16_CONST (INTVAL (op)); return c4x_immed_int_constant (op) && IS_NOT_UINT16_CONST (INTVAL (op));
} }
static int static int
c4x_O_constant (op) c4x_O_constant (rtx op)
rtx op;
{ {
return c4x_immed_int_constant (op) && IS_HIGH_CONST (INTVAL (op)); return c4x_immed_int_constant (op) && IS_HIGH_CONST (INTVAL (op));
} }
...@@ -2625,8 +2562,7 @@ c4x_O_constant (op) ...@@ -2625,8 +2562,7 @@ c4x_O_constant (op)
they are handled by the <> constraints. */ they are handled by the <> constraints. */
int int
c4x_Q_constraint (op) c4x_Q_constraint (rtx op)
rtx op;
{ {
enum machine_mode mode = GET_MODE (op); enum machine_mode mode = GET_MODE (op);
...@@ -2671,8 +2607,7 @@ c4x_Q_constraint (op) ...@@ -2671,8 +2607,7 @@ c4x_Q_constraint (op)
*ARx, *+ARx(n) for n < 32. */ *ARx, *+ARx(n) for n < 32. */
int int
c4x_R_constraint (op) c4x_R_constraint (rtx op)
rtx op;
{ {
enum machine_mode mode = GET_MODE (op); enum machine_mode mode = GET_MODE (op);
...@@ -2713,8 +2648,7 @@ c4x_R_constraint (op) ...@@ -2713,8 +2648,7 @@ c4x_R_constraint (op)
static int static int
c4x_R_indirect (op) c4x_R_indirect (rtx op)
rtx op;
{ {
enum machine_mode mode = GET_MODE (op); enum machine_mode mode = GET_MODE (op);
...@@ -2758,8 +2692,7 @@ c4x_R_indirect (op) ...@@ -2758,8 +2692,7 @@ c4x_R_indirect (op)
they are handled by the <> constraints. */ they are handled by the <> constraints. */
int int
c4x_S_constraint (op) c4x_S_constraint (rtx op)
rtx op;
{ {
enum machine_mode mode = GET_MODE (op); enum machine_mode mode = GET_MODE (op);
if (GET_CODE (op) != MEM) if (GET_CODE (op) != MEM)
...@@ -2818,8 +2751,7 @@ c4x_S_constraint (op) ...@@ -2818,8 +2751,7 @@ c4x_S_constraint (op)
static int static int
c4x_S_indirect (op) c4x_S_indirect (rtx op)
rtx op;
{ {
enum machine_mode mode = GET_MODE (op); enum machine_mode mode = GET_MODE (op);
if (GET_CODE (op) != MEM) if (GET_CODE (op) != MEM)
...@@ -2896,8 +2828,7 @@ c4x_S_indirect (op) ...@@ -2896,8 +2828,7 @@ c4x_S_indirect (op)
/* Direct memory operand. */ /* Direct memory operand. */
int int
c4x_T_constraint (op) c4x_T_constraint (rtx op)
rtx op;
{ {
if (GET_CODE (op) != MEM) if (GET_CODE (op) != MEM)
return 0; return 0;
...@@ -2926,8 +2857,7 @@ c4x_T_constraint (op) ...@@ -2926,8 +2857,7 @@ c4x_T_constraint (op)
/* Symbolic operand. */ /* Symbolic operand. */
int int
c4x_U_constraint (op) c4x_U_constraint (rtx op)
rtx op;
{ {
/* Don't allow direct addressing to an arbitrary constant. */ /* Don't allow direct addressing to an arbitrary constant. */
return GET_CODE (op) == CONST return GET_CODE (op) == CONST
...@@ -2937,9 +2867,7 @@ c4x_U_constraint (op) ...@@ -2937,9 +2867,7 @@ c4x_U_constraint (op)
int int
c4x_autoinc_operand (op, mode) c4x_autoinc_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) == MEM) if (GET_CODE (op) == MEM)
{ {
...@@ -2961,9 +2889,8 @@ c4x_autoinc_operand (op, mode) ...@@ -2961,9 +2889,8 @@ c4x_autoinc_operand (op, mode)
/* Match any operand. */ /* Match any operand. */
int int
any_operand (op, mode) any_operand (register rtx op ATTRIBUTE_UNUSED,
register rtx op ATTRIBUTE_UNUSED; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return 1; return 1;
} }
...@@ -2972,9 +2899,7 @@ any_operand (op, mode) ...@@ -2972,9 +2899,7 @@ any_operand (op, mode)
/* Nonzero if OP is a floating point value with value 0.0. */ /* Nonzero if OP is a floating point value with value 0.0. */
int int
fp_zero_operand (op, mode) fp_zero_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
REAL_VALUE_TYPE r; REAL_VALUE_TYPE r;
...@@ -2986,9 +2911,7 @@ fp_zero_operand (op, mode) ...@@ -2986,9 +2911,7 @@ fp_zero_operand (op, mode)
int int
const_operand (op, mode) const_operand (register rtx op, register enum machine_mode mode)
register rtx op;
register enum machine_mode mode;
{ {
switch (mode) switch (mode)
{ {
...@@ -3025,27 +2948,21 @@ const_operand (op, mode) ...@@ -3025,27 +2948,21 @@ const_operand (op, mode)
int int
stik_const_operand (op, mode) stik_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return c4x_K_constant (op); return c4x_K_constant (op);
} }
int int
not_const_operand (op, mode) not_const_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return c4x_N_constant (op); return c4x_N_constant (op);
} }
int int
reg_operand (op, mode) reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == SUBREG if (GET_CODE (op) == SUBREG
&& GET_MODE (op) == QFmode) && GET_MODE (op) == QFmode)
...@@ -3055,9 +2972,7 @@ reg_operand (op, mode) ...@@ -3055,9 +2972,7 @@ reg_operand (op, mode)
int int
mixed_subreg_operand (op, mode) mixed_subreg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
/* Allow (subreg:HF (reg:HI)) that be generated for a union of an /* Allow (subreg:HF (reg:HI)) that be generated for a union of an
int and a long double. */ int and a long double. */
...@@ -3071,9 +2986,7 @@ mixed_subreg_operand (op, mode) ...@@ -3071,9 +2986,7 @@ mixed_subreg_operand (op, mode)
int int
reg_imm_operand (op, mode) reg_imm_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (REG_P (op) || CONSTANT_P (op)) if (REG_P (op) || CONSTANT_P (op))
return 1; return 1;
...@@ -3082,9 +2995,7 @@ reg_imm_operand (op, mode) ...@@ -3082,9 +2995,7 @@ reg_imm_operand (op, mode)
int int
not_modify_reg (op, mode) not_modify_reg (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (REG_P (op) || CONSTANT_P (op)) if (REG_P (op) || CONSTANT_P (op))
return 1; return 1;
...@@ -3130,9 +3041,7 @@ not_modify_reg (op, mode) ...@@ -3130,9 +3041,7 @@ not_modify_reg (op, mode)
int int
not_rc_reg (op, mode) not_rc_reg (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (REG_P (op) && REGNO (op) == RC_REGNO) if (REG_P (op) && REGNO (op) == RC_REGNO)
return 0; return 0;
...@@ -3143,9 +3052,7 @@ not_rc_reg (op, mode) ...@@ -3143,9 +3052,7 @@ not_rc_reg (op, mode)
/* Extended precision register R0-R1. */ /* Extended precision register R0-R1. */
int int
r0r1_reg_operand (op, mode) r0r1_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3158,9 +3065,7 @@ r0r1_reg_operand (op, mode) ...@@ -3158,9 +3065,7 @@ r0r1_reg_operand (op, mode)
/* Extended precision register R2-R3. */ /* Extended precision register R2-R3. */
int int
r2r3_reg_operand (op, mode) r2r3_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3173,9 +3078,7 @@ r2r3_reg_operand (op, mode) ...@@ -3173,9 +3078,7 @@ r2r3_reg_operand (op, mode)
/* Low extended precision register R0-R7. */ /* Low extended precision register R0-R7. */
int int
ext_low_reg_operand (op, mode) ext_low_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3188,9 +3091,7 @@ ext_low_reg_operand (op, mode) ...@@ -3188,9 +3091,7 @@ ext_low_reg_operand (op, mode)
/* Extended precision register. */ /* Extended precision register. */
int int
ext_reg_operand (op, mode) ext_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3205,9 +3106,7 @@ ext_reg_operand (op, mode) ...@@ -3205,9 +3106,7 @@ ext_reg_operand (op, mode)
/* Standard precision register. */ /* Standard precision register. */
int int
std_reg_operand (op, mode) std_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3219,9 +3118,7 @@ std_reg_operand (op, mode) ...@@ -3219,9 +3118,7 @@ std_reg_operand (op, mode)
/* Standard precision or normal register. */ /* Standard precision or normal register. */
int int
std_or_reg_operand (op, mode) std_or_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (reload_in_progress) if (reload_in_progress)
return std_reg_operand (op, mode); return std_reg_operand (op, mode);
...@@ -3231,9 +3128,7 @@ std_or_reg_operand (op, mode) ...@@ -3231,9 +3128,7 @@ std_or_reg_operand (op, mode)
/* Address register. */ /* Address register. */
int int
addr_reg_operand (op, mode) addr_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3244,9 +3139,7 @@ addr_reg_operand (op, mode) ...@@ -3244,9 +3139,7 @@ addr_reg_operand (op, mode)
/* Index register. */ /* Index register. */
int int
index_reg_operand (op, mode) index_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! reg_operand (op, mode)) if (! reg_operand (op, mode))
return 0; return 0;
...@@ -3259,9 +3152,7 @@ index_reg_operand (op, mode) ...@@ -3259,9 +3152,7 @@ index_reg_operand (op, mode)
/* DP register. */ /* DP register. */
int int
dp_reg_operand (op, mode) dp_reg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return REG_P (op) && IS_DP_OR_PSEUDO_REG (op); return REG_P (op) && IS_DP_OR_PSEUDO_REG (op);
} }
...@@ -3270,9 +3161,7 @@ dp_reg_operand (op, mode) ...@@ -3270,9 +3161,7 @@ dp_reg_operand (op, mode)
/* SP register. */ /* SP register. */
int int
sp_reg_operand (op, mode) sp_reg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return REG_P (op) && IS_SP_OR_PSEUDO_REG (op); return REG_P (op) && IS_SP_OR_PSEUDO_REG (op);
} }
...@@ -3281,9 +3170,7 @@ sp_reg_operand (op, mode) ...@@ -3281,9 +3170,7 @@ sp_reg_operand (op, mode)
/* ST register. */ /* ST register. */
int int
st_reg_operand (op, mode) st_reg_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return REG_P (op) && IS_ST_OR_PSEUDO_REG (op); return REG_P (op) && IS_ST_OR_PSEUDO_REG (op);
} }
...@@ -3292,18 +3179,14 @@ st_reg_operand (op, mode) ...@@ -3292,18 +3179,14 @@ st_reg_operand (op, mode)
/* RC register. */ /* RC register. */
int int
rc_reg_operand (op, mode) rc_reg_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return REG_P (op) && IS_RC_OR_PSEUDO_REG (op); return REG_P (op) && IS_RC_OR_PSEUDO_REG (op);
} }
int int
call_address_operand (op, mode) call_address_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (REG_P (op) || symbolic_address_operand (op, mode)); return (REG_P (op) || symbolic_address_operand (op, mode));
} }
...@@ -3312,9 +3195,8 @@ call_address_operand (op, mode) ...@@ -3312,9 +3195,8 @@ call_address_operand (op, mode)
/* Symbolic address operand. */ /* Symbolic address operand. */
int int
symbolic_address_operand (op, mode) symbolic_address_operand (register rtx op,
register rtx op; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -3331,9 +3213,7 @@ symbolic_address_operand (op, mode) ...@@ -3331,9 +3213,7 @@ symbolic_address_operand (op, mode)
/* Check dst operand of a move instruction. */ /* Check dst operand of a move instruction. */
int int
dst_operand (op, mode) dst_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == SUBREG if (GET_CODE (op) == SUBREG
&& mixed_subreg_operand (op, mode)) && mixed_subreg_operand (op, mode))
...@@ -3349,9 +3229,7 @@ dst_operand (op, mode) ...@@ -3349,9 +3229,7 @@ dst_operand (op, mode)
/* Check src operand of two operand arithmetic instructions. */ /* Check src operand of two operand arithmetic instructions. */
int int
src_operand (op, mode) src_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == SUBREG if (GET_CODE (op) == SUBREG
&& mixed_subreg_operand (op, mode)) && mixed_subreg_operand (op, mode))
...@@ -3393,9 +3271,7 @@ src_operand (op, mode) ...@@ -3393,9 +3271,7 @@ src_operand (op, mode)
int int
src_hi_operand (op, mode) src_hi_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (c4x_O_constant (op)) if (c4x_O_constant (op))
return 1; return 1;
...@@ -3406,9 +3282,7 @@ src_hi_operand (op, mode) ...@@ -3406,9 +3282,7 @@ src_hi_operand (op, mode)
/* Check src operand of two operand logical instructions. */ /* Check src operand of two operand logical instructions. */
int int
lsrc_operand (op, mode) lsrc_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode == VOIDmode) if (mode == VOIDmode)
mode = GET_MODE (op); mode = GET_MODE (op);
...@@ -3426,9 +3300,7 @@ lsrc_operand (op, mode) ...@@ -3426,9 +3300,7 @@ lsrc_operand (op, mode)
/* Check src operand of two operand tricky instructions. */ /* Check src operand of two operand tricky instructions. */
int int
tsrc_operand (op, mode) tsrc_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode == VOIDmode) if (mode == VOIDmode)
mode = GET_MODE (op); mode = GET_MODE (op);
...@@ -3446,9 +3318,7 @@ tsrc_operand (op, mode) ...@@ -3446,9 +3318,7 @@ tsrc_operand (op, mode)
/* Check src operand of two operand non immedidate instructions. */ /* Check src operand of two operand non immedidate instructions. */
int int
nonimmediate_src_operand (op, mode) nonimmediate_src_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE) if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE)
return 0; return 0;
...@@ -3460,9 +3330,7 @@ nonimmediate_src_operand (op, mode) ...@@ -3460,9 +3330,7 @@ nonimmediate_src_operand (op, mode)
/* Check logical src operand of two operand non immedidate instructions. */ /* Check logical src operand of two operand non immedidate instructions. */
int int
nonimmediate_lsrc_operand (op, mode) nonimmediate_lsrc_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE) if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_DOUBLE)
return 0; return 0;
...@@ -3472,9 +3340,7 @@ nonimmediate_lsrc_operand (op, mode) ...@@ -3472,9 +3340,7 @@ nonimmediate_lsrc_operand (op, mode)
int int
reg_or_const_operand (op, mode) reg_or_const_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return reg_operand (op, mode) || const_operand (op, mode); return reg_operand (op, mode) || const_operand (op, mode);
} }
...@@ -3483,9 +3349,7 @@ reg_or_const_operand (op, mode) ...@@ -3483,9 +3349,7 @@ reg_or_const_operand (op, mode)
/* Check for indirect operands allowable in parallel instruction. */ /* Check for indirect operands allowable in parallel instruction. */
int int
par_ind_operand (op, mode) par_ind_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && mode != GET_MODE (op))
return 0; return 0;
...@@ -3497,21 +3361,14 @@ par_ind_operand (op, mode) ...@@ -3497,21 +3361,14 @@ par_ind_operand (op, mode)
/* Check for operands allowable in parallel instruction. */ /* Check for operands allowable in parallel instruction. */
int int
parallel_operand (op, mode) parallel_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ext_low_reg_operand (op, mode) || par_ind_operand (op, mode); return ext_low_reg_operand (op, mode) || par_ind_operand (op, mode);
} }
static void static void
c4x_S_address_parse (op, base, incdec, index, disp) c4x_S_address_parse (rtx op, int *base, int *incdec, int *index, int *disp)
rtx op;
int *base;
int *incdec;
int *index;
int *disp;
{ {
*base = 0; *base = 0;
*incdec = 0; *incdec = 0;
...@@ -3614,11 +3471,7 @@ c4x_S_address_parse (op, base, incdec, index, disp) ...@@ -3614,11 +3471,7 @@ c4x_S_address_parse (op, base, incdec, index, disp)
int int
c4x_address_conflict (op0, op1, store0, store1) c4x_address_conflict (rtx op0, rtx op1, int store0, int store1)
rtx op0;
rtx op1;
int store0;
int store1;
{ {
int base0; int base0;
int base1; int base1;
...@@ -3681,10 +3534,7 @@ c4x_address_conflict (op0, op1, store0, store1) ...@@ -3681,10 +3534,7 @@ c4x_address_conflict (op0, op1, store0, store1)
/* Check for while loop inside a decrement and branch loop. */ /* Check for while loop inside a decrement and branch loop. */
int int
c4x_label_conflict (insn, jump, db) c4x_label_conflict (rtx insn, rtx jump, rtx db)
rtx insn;
rtx jump;
rtx db;
{ {
while (insn) while (insn)
{ {
...@@ -3704,9 +3554,8 @@ c4x_label_conflict (insn, jump, db) ...@@ -3704,9 +3554,8 @@ c4x_label_conflict (insn, jump, db)
/* Validate combination of operands for parallel load/store instructions. */ /* Validate combination of operands for parallel load/store instructions. */
int int
valid_parallel_load_store (operands, mode) valid_parallel_load_store (rtx *operands,
rtx *operands; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
rtx op0 = operands[0]; rtx op0 = operands[0];
rtx op1 = operands[1]; rtx op1 = operands[1];
...@@ -3760,9 +3609,8 @@ valid_parallel_load_store (operands, mode) ...@@ -3760,9 +3609,8 @@ valid_parallel_load_store (operands, mode)
int int
valid_parallel_operands_4 (operands, mode) valid_parallel_operands_4 (rtx *operands,
rtx *operands; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
rtx op0 = operands[0]; rtx op0 = operands[0];
rtx op2 = operands[2]; rtx op2 = operands[2];
...@@ -3785,9 +3633,8 @@ valid_parallel_operands_4 (operands, mode) ...@@ -3785,9 +3633,8 @@ valid_parallel_operands_4 (operands, mode)
int int
valid_parallel_operands_5 (operands, mode) valid_parallel_operands_5 (rtx *operands,
rtx *operands; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
int regs = 0; int regs = 0;
rtx op0 = operands[0]; rtx op0 = operands[0];
...@@ -3826,9 +3673,8 @@ valid_parallel_operands_5 (operands, mode) ...@@ -3826,9 +3673,8 @@ valid_parallel_operands_5 (operands, mode)
int int
valid_parallel_operands_6 (operands, mode) valid_parallel_operands_6 (rtx *operands,
rtx *operands; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
int regs = 0; int regs = 0;
rtx op0 = operands[0]; rtx op0 = operands[0];
...@@ -3882,11 +3728,9 @@ valid_parallel_operands_6 (operands, mode) ...@@ -3882,11 +3728,9 @@ valid_parallel_operands_6 (operands, mode)
that the destination regno is valid if we have a 2 operand insn. */ that the destination regno is valid if we have a 2 operand insn. */
static int static int
c4x_valid_operands (code, operands, mode, force) c4x_valid_operands (enum rtx_code code, rtx *operands,
enum rtx_code code; enum machine_mode mode ATTRIBUTE_UNUSED,
rtx *operands; int force)
enum machine_mode mode ATTRIBUTE_UNUSED;
int force;
{ {
rtx op1; rtx op1;
rtx op2; rtx op2;
...@@ -4004,10 +3848,7 @@ c4x_valid_operands (code, operands, mode, force) ...@@ -4004,10 +3848,7 @@ c4x_valid_operands (code, operands, mode, force)
} }
int valid_operands (code, operands, mode) int valid_operands (enum rtx_code code, rtx *operands, enum machine_mode mode)
enum rtx_code code;
rtx *operands;
enum machine_mode mode;
{ {
/* If we are not optimizing then we have to let anything go and let /* If we are not optimizing then we have to let anything go and let
...@@ -4023,10 +3864,7 @@ int valid_operands (code, operands, mode) ...@@ -4023,10 +3864,7 @@ int valid_operands (code, operands, mode)
int int
legitimize_operands (code, operands, mode) legitimize_operands (enum rtx_code code, rtx *operands, enum machine_mode mode)
enum rtx_code code;
rtx *operands;
enum machine_mode mode;
{ {
/* Compare only has 2 operands. */ /* Compare only has 2 operands. */
if (code == COMPARE) if (code == COMPARE)
...@@ -4114,9 +3952,7 @@ legitimize_operands (code, operands, mode) ...@@ -4114,9 +3952,7 @@ legitimize_operands (code, operands, mode)
/* The following predicates are used for instruction scheduling. */ /* The following predicates are used for instruction scheduling. */
int int
group1_reg_operand (op, mode) group1_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && mode != GET_MODE (op))
return 0; return 0;
...@@ -4127,9 +3963,7 @@ group1_reg_operand (op, mode) ...@@ -4127,9 +3963,7 @@ group1_reg_operand (op, mode)
int int
group1_mem_operand (op, mode) group1_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && mode != GET_MODE (op))
return 0; return 0;
...@@ -4157,9 +3991,7 @@ group1_mem_operand (op, mode) ...@@ -4157,9 +3991,7 @@ group1_mem_operand (op, mode)
/* Return true if any one of the address registers. */ /* Return true if any one of the address registers. */
int int
arx_reg_operand (op, mode) arx_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (mode != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && mode != GET_MODE (op))
return 0; return 0;
...@@ -4170,10 +4002,7 @@ arx_reg_operand (op, mode) ...@@ -4170,10 +4002,7 @@ arx_reg_operand (op, mode)
static int static int
c4x_arn_reg_operand (op, mode, regno) c4x_arn_reg_operand (rtx op, enum machine_mode mode, unsigned int regno)
rtx op;
enum machine_mode mode;
unsigned int regno;
{ {
if (mode != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && mode != GET_MODE (op))
return 0; return 0;
...@@ -4184,10 +4013,7 @@ c4x_arn_reg_operand (op, mode, regno) ...@@ -4184,10 +4013,7 @@ c4x_arn_reg_operand (op, mode, regno)
static int static int
c4x_arn_mem_operand (op, mode, regno) c4x_arn_mem_operand (rtx op, enum machine_mode mode, unsigned int regno)
rtx op;
enum machine_mode mode;
unsigned int regno;
{ {
if (mode != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && mode != GET_MODE (op))
return 0; return 0;
...@@ -4239,180 +4065,140 @@ c4x_arn_mem_operand (op, mode, regno) ...@@ -4239,180 +4065,140 @@ c4x_arn_mem_operand (op, mode, regno)
int int
ar0_reg_operand (op, mode) ar0_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR0_REGNO); return c4x_arn_reg_operand (op, mode, AR0_REGNO);
} }
int int
ar0_mem_operand (op, mode) ar0_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR0_REGNO); return c4x_arn_mem_operand (op, mode, AR0_REGNO);
} }
int int
ar1_reg_operand (op, mode) ar1_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR1_REGNO); return c4x_arn_reg_operand (op, mode, AR1_REGNO);
} }
int int
ar1_mem_operand (op, mode) ar1_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR1_REGNO); return c4x_arn_mem_operand (op, mode, AR1_REGNO);
} }
int int
ar2_reg_operand (op, mode) ar2_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR2_REGNO); return c4x_arn_reg_operand (op, mode, AR2_REGNO);
} }
int int
ar2_mem_operand (op, mode) ar2_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR2_REGNO); return c4x_arn_mem_operand (op, mode, AR2_REGNO);
} }
int int
ar3_reg_operand (op, mode) ar3_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR3_REGNO); return c4x_arn_reg_operand (op, mode, AR3_REGNO);
} }
int int
ar3_mem_operand (op, mode) ar3_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR3_REGNO); return c4x_arn_mem_operand (op, mode, AR3_REGNO);
} }
int int
ar4_reg_operand (op, mode) ar4_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR4_REGNO); return c4x_arn_reg_operand (op, mode, AR4_REGNO);
} }
int int
ar4_mem_operand (op, mode) ar4_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR4_REGNO); return c4x_arn_mem_operand (op, mode, AR4_REGNO);
} }
int int
ar5_reg_operand (op, mode) ar5_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR5_REGNO); return c4x_arn_reg_operand (op, mode, AR5_REGNO);
} }
int int
ar5_mem_operand (op, mode) ar5_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR5_REGNO); return c4x_arn_mem_operand (op, mode, AR5_REGNO);
} }
int int
ar6_reg_operand (op, mode) ar6_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR6_REGNO); return c4x_arn_reg_operand (op, mode, AR6_REGNO);
} }
int int
ar6_mem_operand (op, mode) ar6_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR6_REGNO); return c4x_arn_mem_operand (op, mode, AR6_REGNO);
} }
int int
ar7_reg_operand (op, mode) ar7_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, AR7_REGNO); return c4x_arn_reg_operand (op, mode, AR7_REGNO);
} }
int int
ar7_mem_operand (op, mode) ar7_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, AR7_REGNO); return c4x_arn_mem_operand (op, mode, AR7_REGNO);
} }
int int
ir0_reg_operand (op, mode) ir0_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, IR0_REGNO); return c4x_arn_reg_operand (op, mode, IR0_REGNO);
} }
int int
ir0_mem_operand (op, mode) ir0_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, IR0_REGNO); return c4x_arn_mem_operand (op, mode, IR0_REGNO);
} }
int int
ir1_reg_operand (op, mode) ir1_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_reg_operand (op, mode, IR1_REGNO); return c4x_arn_reg_operand (op, mode, IR1_REGNO);
} }
int int
ir1_mem_operand (op, mode) ir1_mem_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return c4x_arn_mem_operand (op, mode, IR1_REGNO); return c4x_arn_mem_operand (op, mode, IR1_REGNO);
} }
...@@ -4422,11 +4208,8 @@ ir1_mem_operand (op, mode) ...@@ -4422,11 +4208,8 @@ ir1_mem_operand (op, mode)
addressing. */ addressing. */
rtx rtx
c4x_operand_subword (op, i, validate_address, mode) c4x_operand_subword (rtx op, int i, int validate_address,
rtx op; enum machine_mode mode)
int i;
int validate_address;
enum machine_mode mode;
{ {
if (mode != HImode && mode != HFmode) if (mode != HImode && mode != HFmode)
fatal_insn ("c4x_operand_subword: invalid mode", op); fatal_insn ("c4x_operand_subword: invalid mode", op);
...@@ -4499,8 +4282,7 @@ static struct name_list *extern_head; ...@@ -4499,8 +4282,7 @@ static struct name_list *extern_head;
present on external list. */ present on external list. */
void void
c4x_global_label (name) c4x_global_label (const char *name)
const char *name;
{ {
struct name_list *p, *last; struct name_list *p, *last;
...@@ -4540,8 +4322,7 @@ c4x_global_label (name) ...@@ -4540,8 +4322,7 @@ c4x_global_label (name)
/* Add NAME to list of external symbols. */ /* Add NAME to list of external symbols. */
void void
c4x_external_ref (name) c4x_external_ref (const char *name)
const char *name;
{ {
struct name_list *p; struct name_list *p;
...@@ -4573,7 +4354,7 @@ c4x_external_ref (name) ...@@ -4573,7 +4354,7 @@ c4x_external_ref (name)
This is only required for ISRs if we are paranoid that someone This is only required for ISRs if we are paranoid that someone
may have quietly changed this register on the sly. */ may have quietly changed this register on the sly. */
static void static void
c4x_file_start () c4x_file_start (void)
{ {
int dspversion = 0; int dspversion = 0;
if (TARGET_C30) dspversion = 30; if (TARGET_C30) dspversion = 30;
...@@ -4590,7 +4371,7 @@ c4x_file_start () ...@@ -4590,7 +4371,7 @@ c4x_file_start ()
static void static void
c4x_file_end () c4x_file_end (void)
{ {
struct name_list *p; struct name_list *p;
...@@ -4608,9 +4389,7 @@ c4x_file_end () ...@@ -4608,9 +4389,7 @@ c4x_file_end ()
static void static void
c4x_check_attribute (attrib, list, decl, attributes) c4x_check_attribute (const char *attrib, tree list, tree decl, tree *attributes)
const char *attrib;
tree list, decl, *attributes;
{ {
while (list != NULL_TREE while (list != NULL_TREE
&& IDENTIFIER_POINTER (TREE_PURPOSE (list)) && IDENTIFIER_POINTER (TREE_PURPOSE (list))
...@@ -4623,8 +4402,7 @@ c4x_check_attribute (attrib, list, decl, attributes) ...@@ -4623,8 +4402,7 @@ c4x_check_attribute (attrib, list, decl, attributes)
static void static void
c4x_insert_attributes (decl, attributes) c4x_insert_attributes (tree decl, tree *attributes)
tree decl, *attributes;
{ {
switch (TREE_CODE (decl)) switch (TREE_CODE (decl))
{ {
...@@ -4658,12 +4436,10 @@ const struct attribute_spec c4x_attribute_table[] = ...@@ -4658,12 +4436,10 @@ const struct attribute_spec c4x_attribute_table[] =
/* Handle an attribute requiring a FUNCTION_TYPE; /* Handle an attribute requiring a FUNCTION_TYPE;
arguments as in struct attribute_spec.handler. */ arguments as in struct attribute_spec.handler. */
static tree static tree
c4x_handle_fntype_attribute (node, name, args, flags, no_add_attrs) c4x_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)
{ {
...@@ -4679,8 +4455,7 @@ c4x_handle_fntype_attribute (node, name, args, flags, no_add_attrs) ...@@ -4679,8 +4455,7 @@ c4x_handle_fntype_attribute (node, name, args, flags, no_add_attrs)
/* !!! FIXME to emit RPTS correctly. */ /* !!! FIXME to emit RPTS correctly. */
int int
c4x_rptb_rpts_p (insn, op) c4x_rptb_rpts_p (rtx insn, rtx op)
rtx insn, op;
{ {
/* The next insn should be our label marking where the /* The next insn should be our label marking where the
repeat block starts. */ repeat block starts. */
...@@ -4724,8 +4499,7 @@ c4x_rptb_rpts_p (insn, op) ...@@ -4724,8 +4499,7 @@ c4x_rptb_rpts_p (insn, op)
/* Check if register r11 is used as the destination of an insn. */ /* Check if register r11 is used as the destination of an insn. */
static int static int
c4x_r11_set_p(x) c4x_r11_set_p(rtx x)
rtx x;
{ {
rtx set; rtx set;
int i, j; int i, j;
...@@ -4764,8 +4538,7 @@ c4x_r11_set_p(x) ...@@ -4764,8 +4538,7 @@ c4x_r11_set_p(x)
sets the r11 register. Check for this situation. */ sets the r11 register. Check for this situation. */
int int
c4x_check_laj_p (insn) c4x_check_laj_p (rtx insn)
rtx insn;
{ {
insn = prev_nonnote_insn (insn); insn = prev_nonnote_insn (insn);
...@@ -4799,11 +4572,7 @@ c4x_check_laj_p (insn) ...@@ -4799,11 +4572,7 @@ c4x_check_laj_p (insn)
#define READ_USE_COST 2 #define READ_USE_COST 2
static int static int
c4x_adjust_cost (insn, link, dep_insn, cost) c4x_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
rtx insn;
rtx link;
rtx dep_insn;
int cost;
{ {
/* Don't worry about this until we know what registers have been /* Don't worry about this until we know what registers have been
assigned. */ assigned. */
...@@ -4936,7 +4705,7 @@ c4x_adjust_cost (insn, link, dep_insn, cost) ...@@ -4936,7 +4705,7 @@ c4x_adjust_cost (insn, link, dep_insn, cost)
} }
void void
c4x_init_builtins () c4x_init_builtins (void)
{ {
tree endlink = void_list_node; tree endlink = void_list_node;
...@@ -4980,12 +4749,10 @@ c4x_init_builtins () ...@@ -4980,12 +4749,10 @@ c4x_init_builtins ()
rtx rtx
c4x_expand_builtin (exp, target, subtarget, mode, ignore) c4x_expand_builtin (tree exp, rtx target,
tree exp; rtx subtarget ATTRIBUTE_UNUSED,
rtx target; enum machine_mode mode ATTRIBUTE_UNUSED,
rtx subtarget ATTRIBUTE_UNUSED; int ignore ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
int ignore ATTRIBUTE_UNUSED;
{ {
tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
unsigned int fcode = DECL_FUNCTION_CODE (fndecl); unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
...@@ -5072,17 +4839,13 @@ c4x_expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -5072,17 +4839,13 @@ c4x_expand_builtin (exp, target, subtarget, mode, ignore)
} }
static void static void
c4x_asm_named_section (name, flags) c4x_asm_named_section (const char *name, unsigned int flags ATTRIBUTE_UNUSED)
const char *name;
unsigned int flags ATTRIBUTE_UNUSED;
{ {
fprintf (asm_out_file, "\t.sect\t\"%s\"\n", name); fprintf (asm_out_file, "\t.sect\t\"%s\"\n", name);
} }
static void static void
c4x_globalize_label (stream, name) c4x_globalize_label (FILE *stream, const char *name)
FILE *stream;
const char *name;
{ {
default_globalize_label (stream, name); default_globalize_label (stream, name);
c4x_global_label (name); c4x_global_label (name);
...@@ -5098,10 +4861,7 @@ c4x_globalize_label (stream, name) ...@@ -5098,10 +4861,7 @@ c4x_globalize_label (stream, name)
scanned. In either case, *TOTAL contains the cost result. */ scanned. In either case, *TOTAL contains the cost result. */
static bool static bool
c4x_rtx_costs (x, code, outer_code, total) c4x_rtx_costs (rtx x, int code, int outer_code, int *total)
rtx x;
int code, outer_code;
int *total;
{ {
HOST_WIDE_INT val; HOST_WIDE_INT val;
......
...@@ -1519,9 +1519,9 @@ if (REG_P (OP1) && ! REG_P (OP0)) \ ...@@ -1519,9 +1519,9 @@ if (REG_P (OP1) && ! REG_P (OP0)) \
FINI_SECTION_FUNCTION FINI_SECTION_FUNCTION
#define INIT_SECTION_FUNCTION \ #define INIT_SECTION_FUNCTION \
extern void init_section PARAMS ((void)); \ extern void init_section (void); \
void \ void \
init_section () \ init_section (void) \
{ \ { \
if (in_section != in_init) \ if (in_section != in_init) \
{ \ { \
......
/* Definitions of target machine for GNU compiler, for the pdp-11 /* Definitions of target machine for GNU compiler, for the pdp-11
Copyright (C) 2000 Free Software Foundation, Inc. Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
This file is part of GCC. This file is part of GCC.
...@@ -21,23 +21,23 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,23 +21,23 @@ Boston, MA 02111-1307, USA. */
/* declarations */ /* declarations */
#ifdef RTX_CODE #ifdef RTX_CODE
extern int arith_operand PARAMS ((rtx, enum machine_mode)); extern int arith_operand (rtx, enum machine_mode);
extern int const_immediate_operand PARAMS ((rtx, enum machine_mode)); extern int const_immediate_operand (rtx, enum machine_mode);
extern int expand_shift_operand PARAMS ((rtx, enum machine_mode)); extern int expand_shift_operand (rtx, enum machine_mode);
extern int immediate15_operand PARAMS ((rtx, enum machine_mode)); extern int immediate15_operand (rtx, enum machine_mode);
extern int simple_memory_operand PARAMS ((rtx, enum machine_mode)); extern int simple_memory_operand (rtx, enum machine_mode);
extern int comp_operator PARAMS ((rtx, enum machine_mode)); extern int comp_operator (rtx, enum machine_mode);
extern int legitimate_address_p PARAMS ((enum machine_mode, rtx)); extern int legitimate_address_p (enum machine_mode, rtx);
extern void notice_update_cc_on_set PARAMS ((rtx, rtx)); extern void notice_update_cc_on_set (rtx, rtx);
extern void output_addr_const_pdp11 PARAMS ((FILE *, rtx)); extern void output_addr_const_pdp11 (FILE *, rtx);
extern const char *output_move_double PARAMS ((rtx *)); extern const char *output_move_double (rtx *);
extern const char *output_move_quad PARAMS ((rtx *)); extern const char *output_move_quad (rtx *);
extern const char *output_block_move PARAMS ((rtx *)); extern const char *output_block_move (rtx *);
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address (FILE *, rtx);
extern int register_move_cost PARAMS ((enum reg_class, enum reg_class)); extern int register_move_cost (enum reg_class, enum reg_class);
extern int comparison_operator_index PARAMS ((rtx)); extern int comparison_operator_index (rtx);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
extern void output_ascii PARAMS ((FILE *, const char *, int)); extern void output_ascii (FILE *, const char *, int);
extern const char *output_jump PARAMS ((const char *, const char *, int)); extern const char *output_jump (const char *, const char *, int);
...@@ -54,12 +54,12 @@ int current_first_parm_offset; ...@@ -54,12 +54,12 @@ int current_first_parm_offset;
/* This is where the condition code register lives. */ /* This is where the condition code register lives. */
/* rtx cc0_reg_rtx; - no longer needed? */ /* rtx cc0_reg_rtx; - no longer needed? */
static rtx find_addr_reg PARAMS ((rtx)); static rtx find_addr_reg (rtx);
static const char *singlemove_string PARAMS ((rtx *)); static const char *singlemove_string (rtx *);
static bool pdp11_assemble_integer PARAMS ((rtx, unsigned int, int)); static bool pdp11_assemble_integer (rtx, unsigned int, int);
static void pdp11_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void pdp11_output_function_prologue (FILE *, HOST_WIDE_INT);
static void pdp11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void pdp11_output_function_epilogue (FILE *, HOST_WIDE_INT);
static bool pdp11_rtx_costs PARAMS ((rtx, int, int, int *)); static bool pdp11_rtx_costs (rtx, int, int, int *);
/* Initialize the GCC target structure. */ /* Initialize the GCC target structure. */
#undef TARGET_ASM_BYTE_OP #undef TARGET_ASM_BYTE_OP
...@@ -89,33 +89,25 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -89,33 +89,25 @@ struct gcc_target targetm = TARGET_INITIALIZER;
/* Nonzero if OP is a valid second operand for an arithmetic insn. */ /* Nonzero if OP is a valid second operand for an arithmetic insn. */
int int
arith_operand (op, mode) arith_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) || GET_CODE (op) == CONST_INT); return (register_operand (op, mode) || GET_CODE (op) == CONST_INT);
} }
int int
const_immediate_operand (op, mode) const_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT); return (GET_CODE (op) == CONST_INT);
} }
int int
immediate15_operand (op, mode) immediate15_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT && ((INTVAL (op) & 0x8000) == 0x0000)); return (GET_CODE (op) == CONST_INT && ((INTVAL (op) & 0x8000) == 0x0000));
} }
int int
expand_shift_operand (op, mode) expand_shift_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT return (GET_CODE (op) == CONST_INT
&& abs (INTVAL(op)) > 1 && abs (INTVAL(op)) > 1
...@@ -134,9 +126,7 @@ expand_shift_operand (op, mode) ...@@ -134,9 +126,7 @@ expand_shift_operand (op, mode)
#ifdef TWO_BSD #ifdef TWO_BSD
static void static void
pdp11_output_function_prologue (stream, size) pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
FILE *stream;
HOST_WIDE_INT size;
{ {
fprintf (stream, "\tjsr r5, csv\n"); fprintf (stream, "\tjsr r5, csv\n");
if (size) if (size)
...@@ -151,9 +141,7 @@ pdp11_output_function_prologue (stream, size) ...@@ -151,9 +141,7 @@ pdp11_output_function_prologue (stream, size)
#else /* !TWO_BSD */ #else /* !TWO_BSD */
static void static void
pdp11_output_function_prologue (stream, size) pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
FILE *stream;
HOST_WIDE_INT size;
{ {
HOST_WIDE_INT fsize = ((size) + 1) & ~1; HOST_WIDE_INT fsize = ((size) + 1) & ~1;
int regno; int regno;
...@@ -249,9 +237,8 @@ pdp11_output_function_prologue (stream, size) ...@@ -249,9 +237,8 @@ pdp11_output_function_prologue (stream, size)
#ifdef TWO_BSD #ifdef TWO_BSD
static void static void
pdp11_output_function_epilogue (stream, size) pdp11_output_function_epilogue (FILE *stream,
FILE *stream; HOST_WIDE_INT size ATTRIBUTE_UNUSED)
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{ {
fprintf (stream, "\t/* SP ignored by cret? */\n"); fprintf (stream, "\t/* SP ignored by cret? */\n");
fprintf (stream, "\tjmp cret\n"); fprintf (stream, "\tjmp cret\n");
...@@ -260,9 +247,7 @@ pdp11_output_function_epilogue (stream, size) ...@@ -260,9 +247,7 @@ pdp11_output_function_epilogue (stream, size)
#else /* !TWO_BSD */ #else /* !TWO_BSD */
static void static void
pdp11_output_function_epilogue (stream, size) pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size)
FILE *stream;
HOST_WIDE_INT size;
{ {
HOST_WIDE_INT fsize = ((size) + 1) & ~1; HOST_WIDE_INT fsize = ((size) + 1) & ~1;
int i, j, k; int i, j, k;
...@@ -369,8 +354,7 @@ pdp11_output_function_epilogue (stream, size) ...@@ -369,8 +354,7 @@ pdp11_output_function_epilogue (stream, size)
/* Return the best assembler insn template /* Return the best assembler insn template
for moving operands[1] into operands[0] as a fullword. */ for moving operands[1] into operands[0] as a fullword. */
static const char * static const char *
singlemove_string (operands) singlemove_string (rtx *operands)
rtx *operands;
{ {
if (operands[1] != const0_rtx) if (operands[1] != const0_rtx)
return "mov %1,%0"; return "mov %1,%0";
...@@ -383,8 +367,7 @@ singlemove_string (operands) ...@@ -383,8 +367,7 @@ singlemove_string (operands)
with operands OPERANDS. */ with operands OPERANDS. */
const char * const char *
output_move_double (operands) output_move_double (rtx *operands)
rtx *operands;
{ {
enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1; enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1;
rtx latehalf[2]; rtx latehalf[2];
...@@ -562,8 +545,7 @@ output_move_double (operands) ...@@ -562,8 +545,7 @@ output_move_double (operands)
with operands OPERANDS. */ with operands OPERANDS. */
const char * const char *
output_move_quad (operands) output_move_quad (rtx *operands)
rtx *operands;
{ {
enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1; enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1;
rtx latehalf[2]; rtx latehalf[2];
...@@ -787,8 +769,7 @@ output_move_quad (operands) ...@@ -787,8 +769,7 @@ output_move_quad (operands)
ADDR can be effectively incremented by incrementing REG. */ ADDR can be effectively incremented by incrementing REG. */
static rtx static rtx
find_addr_reg (addr) find_addr_reg (rtx addr)
rtx addr;
{ {
while (GET_CODE (addr) == PLUS) while (GET_CODE (addr) == PLUS)
{ {
...@@ -808,10 +789,7 @@ find_addr_reg (addr) ...@@ -808,10 +789,7 @@ find_addr_reg (addr)
/* Output an ascii string. */ /* Output an ascii string. */
void void
output_ascii (file, p, size) output_ascii (FILE *file, const char *p, int size)
FILE *file;
const char *p;
int size;
{ {
int i; int i;
...@@ -835,9 +813,7 @@ output_ascii (file, p, size) ...@@ -835,9 +813,7 @@ output_ascii (file, p, size)
/* --- stole from out-vax, needs changes */ /* --- stole from out-vax, needs changes */
void void
print_operand_address (file, addr) print_operand_address (FILE *file, register rtx addr)
FILE *file;
register rtx addr;
{ {
register rtx reg1, reg2, breg, ireg; register rtx reg1, reg2, breg, ireg;
rtx offset; rtx offset;
...@@ -967,10 +943,7 @@ print_operand_address (file, addr) ...@@ -967,10 +943,7 @@ print_operand_address (file, addr)
pdp-specific version of output_addr_const. */ pdp-specific version of output_addr_const. */
static bool static bool
pdp11_assemble_integer (x, size, aligned_p) pdp11_assemble_integer (rtx x, unsigned int size, int aligned_p)
rtx x;
unsigned int size;
int aligned_p;
{ {
if (aligned_p) if (aligned_p)
switch (size) switch (size)
...@@ -1020,10 +993,7 @@ register_move_cost(c1, c2) ...@@ -1020,10 +993,7 @@ register_move_cost(c1, c2)
} }
static bool static bool
pdp11_rtx_costs (x, code, outer_code, total) pdp11_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
rtx x;
int code, outer_code ATTRIBUTE_UNUSED;
int *total;
{ {
switch (code) switch (code)
{ {
...@@ -1130,9 +1100,7 @@ pdp11_rtx_costs (x, code, outer_code, total) ...@@ -1130,9 +1100,7 @@ pdp11_rtx_costs (x, code, outer_code, total)
} }
const char * const char *
output_jump(pos, neg, length) output_jump(const char *pos, const char *neg, int length)
const char *pos, *neg;
int length;
{ {
static int x = 0; static int x = 0;
...@@ -1173,9 +1141,7 @@ output_jump(pos, neg, length) ...@@ -1173,9 +1141,7 @@ output_jump(pos, neg, length)
} }
void void
notice_update_cc_on_set(exp, insn) notice_update_cc_on_set(rtx exp, rtx insn ATTRIBUTE_UNUSED)
rtx exp;
rtx insn ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (SET_DEST (exp)) == CC0) if (GET_CODE (SET_DEST (exp)) == CC0)
{ {
...@@ -1245,9 +1211,7 @@ notice_update_cc_on_set(exp, insn) ...@@ -1245,9 +1211,7 @@ notice_update_cc_on_set(exp, insn)
int int
simple_memory_operand(op, mode) simple_memory_operand(rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
rtx addr; rtx addr;
...@@ -1320,8 +1284,7 @@ simple_memory_operand(op, mode) ...@@ -1320,8 +1284,7 @@ simple_memory_operand(op, mode)
const char * const char *
output_block_move(operands) output_block_move(rtx *operands)
rtx *operands;
{ {
static int count = 0; static int count = 0;
char buf[200]; char buf[200];
...@@ -1560,8 +1523,7 @@ output_block_move(operands) ...@@ -1560,8 +1523,7 @@ output_block_move(operands)
/* for future use */ /* for future use */
int int
comparison_operator_index(op) comparison_operator_index(rtx op)
rtx op;
{ {
switch (GET_CODE(op)) switch (GET_CODE(op))
{ {
...@@ -1602,18 +1564,14 @@ comparison_operator_index(op) ...@@ -1602,18 +1564,14 @@ comparison_operator_index(op)
/* tests whether the rtx is a comparison operator */ /* tests whether the rtx is a comparison operator */
int int
comp_operator (op, mode) comp_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return comparison_operator_index(op) >= 0; return comparison_operator_index(op) >= 0;
} }
int int
legitimate_address_p (mode, address) legitimate_address_p (enum machine_mode mode, rtx address)
enum machine_mode mode;
rtx address;
{ {
/* #define REG_OK_STRICT */ /* #define REG_OK_STRICT */
GO_IF_LEGITIMATE_ADDRESS(mode, address, win); GO_IF_LEGITIMATE_ADDRESS(mode, address, win);
...@@ -1632,9 +1590,7 @@ legitimate_address_p (mode, address) ...@@ -1632,9 +1590,7 @@ legitimate_address_p (mode, address)
So this copy should get called whenever needed. So this copy should get called whenever needed.
*/ */
void void
output_addr_const_pdp11 (file, x) output_addr_const_pdp11 (FILE *file, rtx x)
FILE *file;
rtx x;
{ {
char buf[256]; char buf[256];
......
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