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
This commit is contained in:
Steven Bosscher 2003-09-28 12:09:07 +00:00
parent 753aaa17f3
commit f12b3fc8aa
7 changed files with 372 additions and 657 deletions

View File

@ -1,3 +1,10 @@
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> 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:

View File

@ -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.

View File

@ -1,5 +1,5 @@
/* 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 @@
#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];
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;

File diff suppressed because it is too large Load Diff

View File

@ -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) \
{ \ { \

View File

@ -1,5 +1,5 @@
/* 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. */
/* 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);

View File

@ -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;
/* 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)
#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)
#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)
#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)
#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)
/* 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)
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)
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)
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)
/* 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)
/* --- 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)
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)
} }
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)
} }
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)
} }
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)
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)
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)
/* 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)
/* 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)
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];