Commit 4e58524e by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

mmix-protos.h: Convert prototypes to ISO C90.

	* config/mmix/mmix-protos.h: Convert prototypes to ISO C90.
	* config/mmix/mmix.c: Convert functions to ISO C90.
  	(mmix_eh_return_handler_rtx, mmix_output_shifted_value): Tweak
	formatting.
	(mmix_get_hard_reg_initial_val): Tweak section head comment.

From-SVN: r69466
parent dced0d12
2003-07-16 Hans-Peter Nilsson <hp@bitrange.com>
* config/mmix/mmix-protos.h: Convert prototypes to ISO C90.
* config/mmix/mmix.c: Convert functions to ISO C90.
(mmix_eh_return_handler_rtx, mmix_output_shifted_value): Tweak
formatting.
(mmix_get_hard_reg_initial_val): Tweak section head comment.
2003-07-16 J"orn Rennecke <joern.rennecke@superh.com>
* c-pragma.h (HANDLE_PRAGMA_WEAK): Always define to SUPPORTS_WEAK.
......
/* Prototypes for exported functions defined in mmix.c
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
......@@ -19,94 +19,89 @@ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
extern void mmix_override_options PARAMS ((void));
extern void mmix_init_expanders PARAMS ((void));
extern int mmix_eh_return_data_regno PARAMS ((int));
extern int mmix_initial_elimination_offset PARAMS ((int, int));
extern int mmix_starting_frame_offset PARAMS ((void));
extern int mmix_function_arg_regno_p PARAMS ((int, int));
extern void mmix_function_profiler PARAMS ((FILE *, int));
extern void mmix_trampoline_template PARAMS ((FILE *));
extern void mmix_override_options (void);
extern void mmix_init_expanders (void);
extern int mmix_eh_return_data_regno (int);
extern int mmix_initial_elimination_offset (int, int);
extern int mmix_starting_frame_offset (void);
extern int mmix_function_arg_regno_p (int, int);
extern void mmix_function_profiler (FILE *, int);
extern void mmix_trampoline_template (FILE *);
extern int mmix_trampoline_size;
extern int mmix_reversible_cc_mode PARAMS ((enum machine_mode));
extern int mmix_reversible_cc_mode (enum machine_mode);
extern int mmix_register_move_cost
PARAMS ((enum machine_mode, enum reg_class, enum reg_class));
extern const char *mmix_text_section_asm_op PARAMS ((void));
extern const char *mmix_data_section_asm_op PARAMS ((void));
extern void mmix_asm_output_source_filename PARAMS ((FILE *, const char *));
extern void mmix_output_quoted_string PARAMS ((FILE *, const char *, int));
extern void mmix_asm_output_source_line PARAMS ((FILE *, int));
extern void mmix_asm_output_ascii PARAMS ((FILE *, const char *, int));
extern void mmix_asm_output_label PARAMS ((FILE *, const char *));
extern void mmix_asm_weaken_label PARAMS ((FILE *, const char *));
extern void mmix_asm_output_labelref PARAMS ((FILE *, const char *));
extern void mmix_asm_output_def PARAMS ((FILE *, const char *, const char *));
extern int mmix_print_operand_punct_valid_p PARAMS ((int));
extern void mmix_asm_output_reg_push PARAMS ((FILE *, int));
extern void mmix_asm_output_reg_pop PARAMS ((FILE *, int));
extern void mmix_asm_output_skip PARAMS ((FILE *, int));
extern void mmix_asm_output_align PARAMS ((FILE *, int));
extern int mmix_shiftable_wyde_value PARAMS ((unsigned HOST_WIDEST_INT));
extern void mmix_output_register_setting
PARAMS ((FILE *, int, HOST_WIDEST_INT, int));
extern void mmix_conditional_register_usage PARAMS ((void));
extern int mmix_local_regno PARAMS ((int));
extern int mmix_dbx_register_number PARAMS ((int));
extern int mmix_use_simple_return PARAMS ((void));
extern void mmix_make_decl_one_only PARAMS ((tree));
(enum machine_mode, enum reg_class, enum reg_class);
extern const char *mmix_text_section_asm_op (void);
extern const char *mmix_data_section_asm_op (void);
extern void mmix_asm_output_source_filename (FILE *, const char *);
extern void mmix_output_quoted_string (FILE *, const char *, int);
extern void mmix_asm_output_source_line (FILE *, int);
extern void mmix_asm_output_ascii (FILE *, const char *, int);
extern void mmix_asm_output_label (FILE *, const char *);
extern void mmix_asm_weaken_label (FILE *, const char *);
extern void mmix_asm_output_labelref (FILE *, const char *);
extern void mmix_asm_output_def (FILE *, const char *, const char *);
extern int mmix_print_operand_punct_valid_p (int);
extern void mmix_asm_output_reg_push (FILE *, int);
extern void mmix_asm_output_reg_pop (FILE *, int);
extern void mmix_asm_output_skip (FILE *, int);
extern void mmix_asm_output_align (FILE *, int);
extern int mmix_shiftable_wyde_value (unsigned HOST_WIDEST_INT);
extern void mmix_output_register_setting (FILE *, int, HOST_WIDEST_INT, int);
extern void mmix_conditional_register_usage (void);
extern int mmix_local_regno (int);
extern int mmix_dbx_register_number (int);
extern int mmix_use_simple_return (void);
extern void mmix_make_decl_one_only (tree);
extern int mmix_function_arg_pass_by_reference
PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int));
extern rtx mmix_function_outgoing_value PARAMS ((tree, tree));
extern int mmix_function_value_regno_p PARAMS ((int));
extern int mmix_data_alignment PARAMS ((tree, int));
extern int mmix_constant_alignment PARAMS ((tree, int));
extern int mmix_local_alignment PARAMS ((tree, int));
(const CUMULATIVE_ARGS *, enum machine_mode, tree, int);
extern rtx mmix_function_outgoing_value (tree, tree);
extern int mmix_function_value_regno_p (int);
extern int mmix_data_alignment (tree, int);
extern int mmix_constant_alignment (tree, int);
extern int mmix_local_alignment (tree, int);
extern void mmix_setup_incoming_varargs
PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int));
extern void mmix_asm_output_pool_prologue
PARAMS ((FILE *, const char *, tree, int));
extern void mmix_asm_output_aligned_common
PARAMS ((FILE *, const char *, int, int));
extern void mmix_asm_output_aligned_local
PARAMS ((FILE *, const char *, int, int));
(CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int);
extern void mmix_asm_output_pool_prologue (FILE *, const char *, tree, int);
extern void mmix_asm_output_aligned_common (FILE *, const char *, int, int);
extern void mmix_asm_output_aligned_local (FILE *, const char *, int, int);
extern void mmix_asm_declare_register_global
PARAMS ((FILE *, tree, int, const char *));
(FILE *, tree, int, const char *);
extern rtx mmix_function_arg
PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int));
extern rtx mmix_expand_builtin_va_arg PARAMS ((tree, tree));
extern void mmix_asm_output_addr_diff_elt PARAMS ((FILE *, rtx, int, int));
extern void mmix_asm_output_addr_vec_elt PARAMS ((FILE *, int));
extern enum reg_class mmix_preferred_reload_class
PARAMS ((rtx, enum reg_class));
(const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int);
extern rtx mmix_expand_builtin_va_arg (tree, tree);
extern void mmix_asm_output_addr_diff_elt (FILE *, rtx, int, int);
extern void mmix_asm_output_addr_vec_elt (FILE *, int);
extern enum reg_class mmix_preferred_reload_class (rtx, enum reg_class);
extern enum reg_class mmix_preferred_output_reload_class
PARAMS ((rtx, enum reg_class));
(rtx, enum reg_class);
extern enum reg_class mmix_secondary_reload_class
PARAMS ((enum reg_class, enum machine_mode, rtx, int));
extern int mmix_const_ok_for_letter_p PARAMS ((HOST_WIDE_INT, int));
extern int mmix_const_double_ok_for_letter_p PARAMS ((rtx, int));
extern int mmix_extra_constraint PARAMS ((rtx, int, int));
extern rtx mmix_dynamic_chain_address PARAMS ((rtx));
extern rtx mmix_return_addr_rtx PARAMS ((int, rtx));
extern rtx mmix_eh_return_stackadj_rtx PARAMS ((void));
extern rtx mmix_eh_return_handler_rtx PARAMS ((void));
extern void mmix_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern int mmix_constant_address_p PARAMS ((rtx));
extern int mmix_legitimate_address PARAMS ((enum machine_mode, rtx, int));
extern int mmix_legitimate_constant_p PARAMS ((rtx));
extern void mmix_print_operand PARAMS ((FILE *, rtx, int));
extern void mmix_print_operand_address PARAMS ((FILE *, rtx));
extern void mmix_expand_prologue PARAMS ((void));
extern void mmix_expand_epilogue PARAMS ((void));
extern rtx mmix_get_hard_reg_initial_val PARAMS ((enum machine_mode, int));
extern int mmix_asm_preferred_eh_data_format PARAMS ((int, int));
extern void mmix_setup_frame_addresses PARAMS ((void));
(enum reg_class, enum machine_mode, rtx, int);
extern int mmix_const_ok_for_letter_p (HOST_WIDE_INT, int);
extern int mmix_const_double_ok_for_letter_p (rtx, int);
extern int mmix_extra_constraint (rtx, int, int);
extern rtx mmix_dynamic_chain_address (rtx);
extern rtx mmix_return_addr_rtx (int, rtx);
extern rtx mmix_eh_return_stackadj_rtx (void);
extern rtx mmix_eh_return_handler_rtx (void);
extern void mmix_initialize_trampoline (rtx, rtx, rtx);
extern int mmix_constant_address_p (rtx);
extern int mmix_legitimate_address (enum machine_mode, rtx, int);
extern int mmix_legitimate_constant_p (rtx);
extern void mmix_print_operand (FILE *, rtx, int);
extern void mmix_print_operand_address (FILE *, rtx);
extern void mmix_expand_prologue (void);
extern void mmix_expand_epilogue (void);
extern rtx mmix_get_hard_reg_initial_val (enum machine_mode, int);
extern int mmix_asm_preferred_eh_data_format (int, int);
extern void mmix_setup_frame_addresses (void);
#ifdef RTX_CODE
/* Needs to be ifdef:d for sake of enum rtx_code. */
extern enum machine_mode mmix_select_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
extern void mmix_canonicalize_comparison PARAMS ((enum rtx_code *, rtx *, rtx *));
extern int mmix_valid_comparison PARAMS ((enum rtx_code, enum machine_mode, rtx));
extern rtx mmix_gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx));
extern enum machine_mode mmix_select_cc_mode (enum rtx_code, rtx, rtx);
extern void mmix_canonicalize_comparison (enum rtx_code *, rtx *, rtx *);
extern int mmix_valid_comparison (enum rtx_code, enum machine_mode, rtx);
extern rtx mmix_gen_compare_reg (enum rtx_code, rtx, rtx);
#endif
/*
......
/* Definitions of target machine for GNU compiler, for MMIX.
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GCC.
......@@ -117,28 +117,25 @@ const char *mmix_cc1_ignored_option;
static int mmix_output_destination_register;
static void mmix_output_shiftvalue_op_from_str
PARAMS ((FILE *, const char *, HOST_WIDEST_INT));
static void mmix_output_shifted_value PARAMS ((FILE *, HOST_WIDEST_INT));
static void mmix_output_condition PARAMS ((FILE *, rtx, int));
static HOST_WIDEST_INT mmix_intval PARAMS ((rtx));
static void mmix_output_octa PARAMS ((FILE *, HOST_WIDEST_INT, int));
static bool mmix_assemble_integer PARAMS ((rtx, unsigned int, int));
static struct machine_function * mmix_init_machine_status PARAMS ((void));
static void mmix_encode_section_info PARAMS ((tree, rtx, int));
static const char *mmix_strip_name_encoding PARAMS ((const char *));
static void mmix_emit_sp_add PARAMS ((HOST_WIDE_INT offset));
static void mmix_target_asm_function_prologue
PARAMS ((FILE *, HOST_WIDE_INT));
static void mmix_target_asm_function_end_prologue PARAMS ((FILE *));
static void mmix_target_asm_function_epilogue
PARAMS ((FILE *, HOST_WIDE_INT));
static void mmix_reorg PARAMS ((void));
(FILE *, const char *, HOST_WIDEST_INT);
static void mmix_output_shifted_value (FILE *, HOST_WIDEST_INT);
static void mmix_output_condition (FILE *, rtx, int);
static HOST_WIDEST_INT mmix_intval (rtx);
static void mmix_output_octa (FILE *, HOST_WIDEST_INT, int);
static bool mmix_assemble_integer (rtx, unsigned int, int);
static struct machine_function *mmix_init_machine_status (void);
static void mmix_encode_section_info (tree, rtx, int);
static const char *mmix_strip_name_encoding (const char *);
static void mmix_emit_sp_add (HOST_WIDE_INT offset);
static void mmix_target_asm_function_prologue (FILE *, HOST_WIDE_INT);
static void mmix_target_asm_function_end_prologue (FILE *);
static void mmix_target_asm_function_epilogue (FILE *, HOST_WIDE_INT);
static void mmix_reorg (void);
static void mmix_asm_output_mi_thunk
PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
static void mmix_file_start PARAMS ((void));
static void mmix_file_end PARAMS ((void));
static bool mmix_rtx_costs
PARAMS ((rtx, int, int, int *));
(FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
static void mmix_file_start (void);
static void mmix_file_end (void);
static bool mmix_rtx_costs (rtx, int, int, int *);
/* Target structure macros. Listed by node. See `Using and Porting GCC'
......@@ -198,7 +195,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
/* OVERRIDE_OPTIONS. */
void
mmix_override_options ()
mmix_override_options (void)
{
/* Should we err or should we warn? Hmm. At least we must neutralize
it. For example the wrong kind of case-tables will be generated with
......@@ -215,7 +212,7 @@ mmix_override_options ()
/* INIT_EXPANDERS. */
void
mmix_init_expanders ()
mmix_init_expanders (void)
{
init_machine_status = mmix_init_machine_status;
}
......@@ -223,7 +220,7 @@ mmix_init_expanders ()
/* Set the per-function data. */
static struct machine_function *
mmix_init_machine_status ()
mmix_init_machine_status (void)
{
return ggc_alloc_cleared (sizeof (struct machine_function));
}
......@@ -234,9 +231,7 @@ mmix_init_machine_status ()
at least 32-bit alignment. */
int
mmix_data_alignment (type, basic_align)
tree type ATTRIBUTE_UNUSED;
int basic_align;
mmix_data_alignment (tree type ATTRIBUTE_UNUSED, int basic_align)
{
if (basic_align < 32)
return 32;
......@@ -247,9 +242,7 @@ mmix_data_alignment (type, basic_align)
/* CONSTANT_ALIGNMENT. */
int
mmix_constant_alignment (constant, basic_align)
tree constant ATTRIBUTE_UNUSED;
int basic_align;
mmix_constant_alignment (tree constant ATTRIBUTE_UNUSED, int basic_align)
{
if (basic_align < 32)
return 32;
......@@ -260,9 +253,7 @@ mmix_constant_alignment (constant, basic_align)
/* LOCAL_ALIGNMENT. */
int
mmix_local_alignment (type, basic_align)
tree type ATTRIBUTE_UNUSED;
int basic_align;
mmix_local_alignment (tree type ATTRIBUTE_UNUSED, int basic_align)
{
if (basic_align < 32)
return 32;
......@@ -273,7 +264,7 @@ mmix_local_alignment (type, basic_align)
/* CONDITIONAL_REGISTER_USAGE. */
void
mmix_conditional_register_usage ()
mmix_conditional_register_usage (void)
{
int i;
......@@ -314,8 +305,7 @@ mmix_conditional_register_usage ()
saved are local. */
int
mmix_local_regno (regno)
int regno;
mmix_local_regno (int regno)
{
return regno <= MMIX_LAST_STACK_REGISTER_REGNUM && !call_used_regs[regno];
}
......@@ -324,9 +314,7 @@ mmix_local_regno (regno)
We need to extend the reload class of REMAINDER_REG and HIMULT_REG. */
enum reg_class
mmix_preferred_reload_class (x, class)
rtx x ATTRIBUTE_UNUSED;
enum reg_class class;
mmix_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
{
/* FIXME: Revisit. */
return GET_CODE (x) == MOD && GET_MODE (x) == DImode
......@@ -337,9 +325,8 @@ mmix_preferred_reload_class (x, class)
We need to extend the reload class of REMAINDER_REG and HIMULT_REG. */
enum reg_class
mmix_preferred_output_reload_class (x, class)
rtx x ATTRIBUTE_UNUSED;
enum reg_class class;
mmix_preferred_output_reload_class (rtx x ATTRIBUTE_UNUSED,
enum reg_class class)
{
/* FIXME: Revisit. */
return GET_CODE (x) == MOD && GET_MODE (x) == DImode
......@@ -350,11 +337,10 @@ mmix_preferred_output_reload_class (x, class)
We need to reload regs of REMAINDER_REG and HIMULT_REG elsewhere. */
enum reg_class
mmix_secondary_reload_class (class, mode, x, in_p)
enum reg_class class;
enum machine_mode mode ATTRIBUTE_UNUSED;
rtx x ATTRIBUTE_UNUSED;
int in_p ATTRIBUTE_UNUSED;
mmix_secondary_reload_class (enum reg_class class,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x ATTRIBUTE_UNUSED,
int in_p ATTRIBUTE_UNUSED)
{
if (class == REMAINDER_REG
|| class == HIMULT_REG
......@@ -367,9 +353,7 @@ mmix_secondary_reload_class (class, mode, x, in_p)
/* CONST_OK_FOR_LETTER_P. */
int
mmix_const_ok_for_letter_p (value, c)
HOST_WIDE_INT value;
int c;
mmix_const_ok_for_letter_p (HOST_WIDE_INT value, int c)
{
return
(c == 'I' ? value >= 0 && value <= 255
......@@ -386,9 +370,7 @@ mmix_const_ok_for_letter_p (value, c)
/* CONST_DOUBLE_OK_FOR_LETTER_P. */
int
mmix_const_double_ok_for_letter_p (value, c)
rtx value;
int c;
mmix_const_double_ok_for_letter_p (rtx value, int c)
{
return
(c == 'G' ? value == CONST0_RTX (GET_MODE (value))
......@@ -400,10 +382,7 @@ mmix_const_double_ok_for_letter_p (value, c)
CONST_INT:s, but rather often as CONST_DOUBLE:s. */
int
mmix_extra_constraint (x, c, strict)
rtx x;
int c;
int strict;
mmix_extra_constraint (rtx x, int c, int strict)
{
HOST_WIDEST_INT value;
......@@ -455,8 +434,7 @@ mmix_extra_constraint (x, c, strict)
/* DYNAMIC_CHAIN_ADDRESS. */
rtx
mmix_dynamic_chain_address (frame)
rtx frame;
mmix_dynamic_chain_address (rtx frame)
{
/* FIXME: the frame-pointer is stored at offset -8 from the current
frame-pointer. Unfortunately, the caller assumes that a
......@@ -468,7 +446,7 @@ mmix_dynamic_chain_address (frame)
/* STARTING_FRAME_OFFSET. */
int
mmix_starting_frame_offset ()
mmix_starting_frame_offset (void)
{
/* The old frame pointer is in the slot below the new one, so
FIRST_PARM_OFFSET does not need to depend on whether the
......@@ -485,9 +463,7 @@ mmix_starting_frame_offset ()
/* RETURN_ADDR_RTX. */
rtx
mmix_return_addr_rtx (count, frame)
int count;
rtx frame ATTRIBUTE_UNUSED;
mmix_return_addr_rtx (int count, rtx frame ATTRIBUTE_UNUSED)
{
return count == 0
? (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS
......@@ -503,7 +479,7 @@ mmix_return_addr_rtx (count, frame)
/* SETUP_FRAME_ADDRESSES. */
void
mmix_setup_frame_addresses ()
mmix_setup_frame_addresses (void)
{
/* Nothing needed at the moment. */
}
......@@ -512,9 +488,7 @@ mmix_setup_frame_addresses ()
pointer. Used to eliminate the frame pointer. */
int
mmix_initial_elimination_offset (fromreg, toreg)
int fromreg;
int toreg;
mmix_initial_elimination_offset (int fromreg, int toreg)
{
int regno;
int fp_sp_offset
......@@ -567,12 +541,11 @@ mmix_initial_elimination_offset (fromreg, toreg)
one that must go on stack. */
rtx
mmix_function_arg (argsp, mode, type, named, incoming)
const CUMULATIVE_ARGS * argsp;
enum machine_mode mode;
tree type;
int named ATTRIBUTE_UNUSED;
int incoming;
mmix_function_arg (const CUMULATIVE_ARGS *argsp,
enum machine_mode mode,
tree type,
int named ATTRIBUTE_UNUSED,
int incoming)
{
/* Last-argument marker. */
if (type == void_type_node)
......@@ -600,11 +573,10 @@ mmix_function_arg (argsp, mode, type, named, incoming)
everything that goes by value. */
int
mmix_function_arg_pass_by_reference (argsp, mode, type, named)
const CUMULATIVE_ARGS * argsp;
enum machine_mode mode;
tree type;
int named ATTRIBUTE_UNUSED;
mmix_function_arg_pass_by_reference (const CUMULATIVE_ARGS *argsp,
enum machine_mode mode,
tree type,
int named ATTRIBUTE_UNUSED)
{
/* FIXME: Check: I'm not sure the MUST_PASS_IN_STACK check is
necessary. */
......@@ -619,9 +591,7 @@ mmix_function_arg_pass_by_reference (argsp, mode, type, named)
passed, and 0 otherwise. */
int
mmix_function_arg_regno_p (regno, incoming)
int regno;
int incoming;
mmix_function_arg_regno_p (int regno, int incoming)
{
int first_arg_regnum
= incoming ? MMIX_FIRST_INCOMING_ARG_REGNUM : MMIX_FIRST_ARG_REGNUM;
......@@ -633,9 +603,7 @@ mmix_function_arg_regno_p (regno, incoming)
/* FUNCTION_OUTGOING_VALUE. */
rtx
mmix_function_outgoing_value (valtype, func)
tree valtype;
tree func ATTRIBUTE_UNUSED;
mmix_function_outgoing_value (tree valtype, tree func ATTRIBUTE_UNUSED)
{
enum machine_mode mode = TYPE_MODE (valtype);
enum machine_mode cmode;
......@@ -684,8 +652,7 @@ mmix_function_outgoing_value (valtype, func)
/* FUNCTION_VALUE_REGNO_P. */
int
mmix_function_value_regno_p (regno)
int regno;
mmix_function_value_regno_p (int regno)
{
return regno == MMIX_RETURN_VALUE_REGNUM;
}
......@@ -693,8 +660,7 @@ mmix_function_value_regno_p (regno)
/* EH_RETURN_DATA_REGNO. */
int
mmix_eh_return_data_regno (n)
int n ATTRIBUTE_UNUSED;
mmix_eh_return_data_regno (int n)
{
if (n >= 0 && n < 4)
return MMIX_EH_RETURN_DATA_REGNO_START + n;
......@@ -705,7 +671,7 @@ mmix_eh_return_data_regno (n)
/* EH_RETURN_STACKADJ_RTX. */
rtx
mmix_eh_return_stackadj_rtx ()
mmix_eh_return_stackadj_rtx (void)
{
return gen_rtx_REG (Pmode, MMIX_EH_RETURN_STACKADJ_REGNUM);
}
......@@ -713,18 +679,16 @@ mmix_eh_return_stackadj_rtx ()
/* EH_RETURN_HANDLER_RTX. */
rtx
mmix_eh_return_handler_rtx ()
mmix_eh_return_handler_rtx (void)
{
return
gen_rtx_REG (Pmode, MMIX_INCOMING_RETURN_ADDRESS_REGNUM);
return gen_rtx_REG (Pmode, MMIX_INCOMING_RETURN_ADDRESS_REGNUM);
}
/* ASM_PREFERRED_EH_DATA_FORMAT. */
int
mmix_asm_preferred_eh_data_format (code, global)
int code ATTRIBUTE_UNUSED;
int global ATTRIBUTE_UNUSED;
mmix_asm_preferred_eh_data_format (int code ATTRIBUTE_UNUSED,
int global ATTRIBUTE_UNUSED)
{
/* This is the default (was at 2001-07-20). Revisit when needed. */
return DW_EH_PE_absptr;
......@@ -735,9 +699,8 @@ mmix_asm_preferred_eh_data_format (code, global)
mmix_reorg. */
static void
mmix_target_asm_function_prologue (stream, framesize)
FILE *stream ATTRIBUTE_UNUSED;
HOST_WIDE_INT framesize ATTRIBUTE_UNUSED;
mmix_target_asm_function_prologue (FILE *stream ATTRIBUTE_UNUSED,
HOST_WIDE_INT framesize ATTRIBUTE_UNUSED)
{
cfun->machine->in_prologue = 1;
}
......@@ -745,8 +708,7 @@ mmix_target_asm_function_prologue (stream, framesize)
/* Make a note that we've seen the end of the prologue. */
static void
mmix_target_asm_function_end_prologue (stream)
FILE *stream ATTRIBUTE_UNUSED;
mmix_target_asm_function_end_prologue (FILE *stream ATTRIBUTE_UNUSED)
{
cfun->machine->in_prologue = 0;
}
......@@ -756,7 +718,7 @@ mmix_target_asm_function_end_prologue (stream)
register number used to modify the register numbers at output time. */
static void
mmix_reorg ()
mmix_reorg (void)
{
int regno;
......@@ -796,10 +758,8 @@ mmix_reorg ()
/* TARGET_ASM_FUNCTION_EPILOGUE. */
static void
mmix_target_asm_function_epilogue (stream, locals_size)
FILE *stream;
HOST_WIDE_INT locals_size ATTRIBUTE_UNUSED;
mmix_target_asm_function_epilogue (FILE *stream,
HOST_WIDE_INT locals_size ATTRIBUTE_UNUSED)
{
/* Emit an \n for readability of the generated assembly. */
fputc ('\n', stream);
......@@ -808,12 +768,11 @@ mmix_target_asm_function_epilogue (stream, locals_size)
/* TARGET_ASM_OUTPUT_MI_THUNK. */
static void
mmix_asm_output_mi_thunk (stream, fndecl, delta, vcall_offset, func)
FILE * stream;
tree fndecl ATTRIBUTE_UNUSED;
HOST_WIDE_INT delta;
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
tree func;
mmix_asm_output_mi_thunk (FILE *stream,
tree fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta,
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED,
tree func)
{
/* If you define STRUCT_VALUE to 0, rather than use STRUCT_VALUE_REGNUM,
(i.e. pass location of structure to return as invisible first
......@@ -838,9 +797,8 @@ mmix_asm_output_mi_thunk (stream, fndecl, delta, vcall_offset, func)
/* FUNCTION_PROFILER. */
void
mmix_function_profiler (stream, labelno)
FILE *stream ATTRIBUTE_UNUSED;
int labelno ATTRIBUTE_UNUSED;
mmix_function_profiler (FILE *stream ATTRIBUTE_UNUSED,
int labelno ATTRIBUTE_UNUSED)
{
sorry ("function_profiler support for MMIX");
}
......@@ -848,13 +806,11 @@ mmix_function_profiler (stream, labelno)
/* SETUP_INCOMING_VARARGS. */
void
mmix_setup_incoming_varargs (args_so_farp, mode, vartype, pretend_sizep,
second_time)
CUMULATIVE_ARGS * args_so_farp;
enum machine_mode mode;
tree vartype;
int * pretend_sizep;
int second_time ATTRIBUTE_UNUSED;
mmix_setup_incoming_varargs (CUMULATIVE_ARGS *args_so_farp,
enum machine_mode mode,
tree vartype,
int *pretend_sizep,
int second_time ATTRIBUTE_UNUSED)
{
/* The last named variable has been handled, but
args_so_farp has not been advanced for it. */
......@@ -875,9 +831,7 @@ mmix_setup_incoming_varargs (args_so_farp, mode, vartype, pretend_sizep,
pass-by-reference, then perform an indirection. */
rtx
mmix_expand_builtin_va_arg (valist, type)
tree valist;
tree type;
mmix_expand_builtin_va_arg (tree valist, tree type)
{
tree ptr_size = size_int (BITS_PER_WORD / BITS_PER_UNIT);
tree addr_tree, type_size = NULL;
......@@ -982,8 +936,7 @@ int mmix_trampoline_size = 32;
/* TRAMPOLINE_TEMPLATE. */
void
mmix_trampoline_template (stream)
FILE * stream;
mmix_trampoline_template (FILE *stream)
{
/* Read a value into the static-chain register and jump somewhere. The
static chain is stored at offset 16, and the function address is
......@@ -1005,10 +958,7 @@ mmix_trampoline_template (stream)
some day it will). */
void
mmix_initialize_trampoline (trampaddr, fnaddr, static_chain)
rtx trampaddr;
rtx fnaddr;
rtx static_chain;
mmix_initialize_trampoline (rtx trampaddr, rtx fnaddr, rtx static_chain)
{
emit_move_insn (gen_rtx_MEM (DImode, plus_constant (trampaddr, 16)),
static_chain);
......@@ -1025,8 +975,7 @@ mmix_initialize_trampoline (trampaddr, fnaddr, static_chain)
instruction, unless TARGET_BASE_ADDRESSES. */
int
mmix_constant_address_p (x)
rtx x;
mmix_constant_address_p (rtx x)
{
RTX_CODE code = GET_CODE (x);
int addend = 0;
......@@ -1089,10 +1038,9 @@ mmix_constant_address_p (x)
Used by GO_IF_LEGITIMATE_ADDRESS. */
int
mmix_legitimate_address (mode, x, strict_checking)
enum machine_mode mode ATTRIBUTE_UNUSED;
rtx x;
int strict_checking;
mmix_legitimate_address (enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x,
int strict_checking)
{
#define MMIX_REG_OK(X) \
((strict_checking \
......@@ -1151,8 +1099,7 @@ mmix_legitimate_address (mode, x, strict_checking)
/* LEGITIMATE_CONSTANT_P. */
int
mmix_legitimate_constant_p (x)
rtx x;
mmix_legitimate_constant_p (rtx x)
{
RTX_CODE code = GET_CODE (x);
......@@ -1168,10 +1115,7 @@ mmix_legitimate_constant_p (x)
/* SELECT_CC_MODE. */
enum machine_mode
mmix_select_cc_mode (op, x, y)
RTX_CODE op;
rtx x;
rtx y ATTRIBUTE_UNUSED;
mmix_select_cc_mode (RTX_CODE op, rtx x, rtx y ATTRIBUTE_UNUSED)
{
/* We use CCmode, CC_UNSmode, CC_FPmode, CC_FPEQmode and CC_FUNmode to
output different compare insns. Note that we do not check the
......@@ -1198,8 +1142,7 @@ mmix_select_cc_mode (op, x, y)
/* REVERSIBLE_CC_MODE. */
int
mmix_reversible_cc_mode (mode)
enum machine_mode mode;
mmix_reversible_cc_mode (enum machine_mode mode)
{
/* That is, all integer and the EQ, NE, ORDERED and UNORDERED float
compares. */
......@@ -1209,11 +1152,10 @@ mmix_reversible_cc_mode (mode)
/* TARGET_RTX_COSTS. */
static bool
mmix_rtx_costs (x, code, outer_code, total)
rtx x ATTRIBUTE_UNUSED;
int code ATTRIBUTE_UNUSED;
int outer_code ATTRIBUTE_UNUSED;
int *total ATTRIBUTE_UNUSED;
mmix_rtx_costs (rtx x ATTRIBUTE_UNUSED,
int code ATTRIBUTE_UNUSED,
int outer_code ATTRIBUTE_UNUSED,
int *total ATTRIBUTE_UNUSED)
{
/* For the time being, this is just a stub and we'll accept the
generic calculations, until we can do measurements, at least.
......@@ -1224,10 +1166,9 @@ mmix_rtx_costs (x, code, outer_code, total)
/* REGISTER_MOVE_COST. */
int
mmix_register_move_cost (mode, from, to)
enum machine_mode mode ATTRIBUTE_UNUSED;
enum reg_class from;
enum reg_class to;
mmix_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
enum reg_class from,
enum reg_class to)
{
return (from == GENERAL_REGS && from == to) ? 2 : 3;
}
......@@ -1239,16 +1180,13 @@ mmix_register_move_cost (mode, from, to)
/* DATA_SECTION_ASM_OP. */
const char *
mmix_data_section_asm_op ()
mmix_data_section_asm_op (void)
{
return "\t.data ! mmixal:= 8H LOC 9B";
}
static void
mmix_encode_section_info (decl, rtl, first)
tree decl;
rtx rtl;
int first;
mmix_encode_section_info (tree decl, rtx rtl, int first)
{
/* Test for an external declaration, and do nothing if it is one. */
if ((TREE_CODE (decl) == VAR_DECL
......@@ -1293,8 +1231,7 @@ mmix_encode_section_info (decl, rtl, first)
}
static const char *
mmix_strip_name_encoding (name)
const char *name;
mmix_strip_name_encoding (const char *name)
{
for (; (*name == '@' || *name == '*'); name++)
;
......@@ -1306,7 +1243,7 @@ mmix_strip_name_encoding (name)
We just emit a little comment for the time being. */
static void
mmix_file_start ()
mmix_file_start (void)
{
default_file_start ();
......@@ -1319,7 +1256,7 @@ mmix_file_start ()
/* TARGET_ASM_FILE_END. */
static void
mmix_file_end ()
mmix_file_end (void)
{
/* Make sure each file ends with the data section. */
data_section ();
......@@ -1328,9 +1265,7 @@ mmix_file_end ()
/* ASM_OUTPUT_SOURCE_FILENAME. */
void
mmix_asm_output_source_filename (stream, name)
FILE * stream;
const char * name;
mmix_asm_output_source_filename (FILE *stream, const char *name)
{
fprintf (stream, "# 1 ");
OUTPUT_QUOTED_STRING (stream, name);
......@@ -1340,10 +1275,7 @@ mmix_asm_output_source_filename (stream, name)
/* OUTPUT_QUOTED_STRING. */
void
mmix_output_quoted_string (stream, string, length)
FILE * stream;
const char * string;
int length;
mmix_output_quoted_string (FILE *stream, const char *string, int length)
{
const char * string_end = string + length;
static const char *const unwanted_chars = "\"[]\\";
......@@ -1387,9 +1319,7 @@ mmix_output_quoted_string (stream, string, length)
/* ASM_OUTPUT_SOURCE_LINE. */
void
mmix_asm_output_source_line (stream, lineno)
FILE * stream;
int lineno;
mmix_asm_output_source_line (FILE *stream, int lineno)
{
fprintf (stream, "# %d ", lineno);
OUTPUT_QUOTED_STRING (stream, main_input_filename);
......@@ -1401,10 +1331,7 @@ mmix_asm_output_source_line (stream, lineno)
CONST_DOUBLEs. */
static bool
mmix_assemble_integer (x, size, aligned_p)
rtx x;
unsigned int size;
int aligned_p;
mmix_assemble_integer (rtx x, unsigned int size, int aligned_p)
{
if (aligned_p)
switch (size)
......@@ -1465,10 +1392,7 @@ mmix_assemble_integer (x, size, aligned_p)
/* ASM_OUTPUT_ASCII. */
void
mmix_asm_output_ascii (stream, string, length)
FILE *stream;
const char *string;
int length;
mmix_asm_output_ascii (FILE *stream, const char *string, int length)
{
while (length > 0)
{
......@@ -1484,11 +1408,10 @@ mmix_asm_output_ascii (stream, string, length)
/* ASM_OUTPUT_ALIGNED_COMMON. */
void
mmix_asm_output_aligned_common (stream, name, size, align)
FILE *stream;
const char *name;
int size;
int align;
mmix_asm_output_aligned_common (FILE *stream,
const char *name,
int size,
int align)
{
/* This is mostly the elfos.h one. There doesn't seem to be a way to
express this in a mmixal-compatible way. */
......@@ -1501,11 +1424,10 @@ mmix_asm_output_aligned_common (stream, name, size, align)
/* ASM_OUTPUT_ALIGNED_LOCAL. */
void
mmix_asm_output_aligned_local (stream, name, size, align)
FILE * stream;
const char * name;
int size;
int align;
mmix_asm_output_aligned_local (FILE *stream,
const char *name,
int size,
int align)
{
data_section ();
......@@ -1517,9 +1439,7 @@ mmix_asm_output_aligned_local (stream, name, size, align)
/* ASM_OUTPUT_LABEL. */
void
mmix_asm_output_label (stream, name)
FILE *stream;
const char * name;
mmix_asm_output_label (FILE *stream, const char *name)
{
assemble_name (stream, name);
fprintf (stream, "\tIS @\n");
......@@ -1528,11 +1448,10 @@ mmix_asm_output_label (stream, name)
/* ASM_DECLARE_REGISTER_GLOBAL. */
void
mmix_asm_declare_register_global (stream, decl, regno, name)
FILE *stream ATTRIBUTE_UNUSED;
tree decl ATTRIBUTE_UNUSED;
int regno ATTRIBUTE_UNUSED;
const char *name ATTRIBUTE_UNUSED;
mmix_asm_declare_register_global (FILE *stream ATTRIBUTE_UNUSED,
tree decl ATTRIBUTE_UNUSED,
int regno ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED)
{
/* Nothing to do here, but there *will* be, therefore the framework is
here. */
......@@ -1541,9 +1460,8 @@ mmix_asm_declare_register_global (stream, decl, regno, name)
/* ASM_WEAKEN_LABEL. */
void
mmix_asm_weaken_label (stream, name)
FILE * stream ATTRIBUTE_UNUSED;
const char * name ATTRIBUTE_UNUSED;
mmix_asm_weaken_label (FILE *stream ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED)
{
fprintf (stream, "\t.weak ");
assemble_name (stream, name);
......@@ -1553,8 +1471,7 @@ mmix_asm_weaken_label (stream, name)
/* MAKE_DECL_ONE_ONLY. */
void
mmix_make_decl_one_only (decl)
tree decl;
mmix_make_decl_one_only (tree decl)
{
DECL_WEAK (decl) = 1;
}
......@@ -1563,9 +1480,7 @@ mmix_make_decl_one_only (decl)
Strip GCC's '*' and our own '@'. No order is assumed. */
void
mmix_asm_output_labelref (stream, name)
FILE *stream;
const char *name;
mmix_asm_output_labelref (FILE *stream, const char *name)
{
int is_extern = 1;
......@@ -1581,10 +1496,7 @@ mmix_asm_output_labelref (stream, name)
/* ASM_OUTPUT_DEF. */
void
mmix_asm_output_def (stream, name, value)
FILE * stream;
const char * name;
const char * value;
mmix_asm_output_def (FILE *stream, const char *name, const char *value)
{
assemble_name (stream, name);
fprintf (stream, "\tIS ");
......@@ -1595,10 +1507,7 @@ mmix_asm_output_def (stream, name, value)
/* PRINT_OPERAND. */
void
mmix_print_operand (stream, x, code)
FILE * stream;
rtx x;
int code;
mmix_print_operand (FILE *stream, rtx x, int code)
{
/* When we add support for different codes later, we can, when needed,
drop through to the main handler with a modified operand. */
......@@ -1825,8 +1734,7 @@ mmix_print_operand (stream, x, code)
/* PRINT_OPERAND_PUNCT_VALID_P. */
int
mmix_print_operand_punct_valid_p (code)
int code ATTRIBUTE_UNUSED;
mmix_print_operand_punct_valid_p (int code ATTRIBUTE_UNUSED)
{
/* A '+' is used for branch prediction, similar to other ports. */
return code == '+'
......@@ -1837,9 +1745,7 @@ mmix_print_operand_punct_valid_p (code)
/* PRINT_OPERAND_ADDRESS. */
void
mmix_print_operand_address (stream, x)
FILE *stream;
rtx x;
mmix_print_operand_address (FILE *stream, rtx x)
{
if (REG_P (x))
{
......@@ -1884,9 +1790,7 @@ mmix_print_operand_address (stream, x)
/* ASM_OUTPUT_REG_PUSH. */
void
mmix_asm_output_reg_push (stream, regno)
FILE * stream;
int regno;
mmix_asm_output_reg_push (FILE *stream, int regno)
{
fprintf (stream, "\tSUBU %s,%s,8\n\tSTOU %s,%s,0\n",
reg_names[MMIX_STACK_POINTER_REGNUM],
......@@ -1898,9 +1802,7 @@ mmix_asm_output_reg_push (stream, regno)
/* ASM_OUTPUT_REG_POP. */
void
mmix_asm_output_reg_pop (stream, regno)
FILE * stream;
int regno;
mmix_asm_output_reg_pop (FILE *stream, int regno)
{
fprintf (stream, "\tLDOU %s,%s,0\n\tINCL %s,8\n",
reg_names[MMIX_OUTPUT_REGNO (regno)],
......@@ -1911,11 +1813,10 @@ mmix_asm_output_reg_pop (stream, regno)
/* ASM_OUTPUT_ADDR_DIFF_ELT. */
void
mmix_asm_output_addr_diff_elt (stream, body, value, rel)
FILE *stream;
rtx body ATTRIBUTE_UNUSED;
int value;
int rel;
mmix_asm_output_addr_diff_elt (FILE *stream,
rtx body ATTRIBUTE_UNUSED,
int value,
int rel)
{
fprintf (stream, "\tTETRA L%d-L%d\n", value, rel);
}
......@@ -1923,9 +1824,7 @@ mmix_asm_output_addr_diff_elt (stream, body, value, rel)
/* ASM_OUTPUT_ADDR_VEC_ELT. */
void
mmix_asm_output_addr_vec_elt (stream, value)
FILE *stream;
int value;
mmix_asm_output_addr_vec_elt (FILE *stream, int value)
{
fprintf (stream, "\tOCTA L:%d\n", value);
}
......@@ -1933,9 +1832,7 @@ mmix_asm_output_addr_vec_elt (stream, value)
/* ASM_OUTPUT_SKIP. */
void
mmix_asm_output_skip (stream, nbytes)
FILE *stream;
int nbytes;
mmix_asm_output_skip (FILE *stream, int nbytes)
{
fprintf (stream, "\tLOC @+%d\n", nbytes);
}
......@@ -1943,9 +1840,7 @@ mmix_asm_output_skip (stream, nbytes)
/* ASM_OUTPUT_ALIGN. */
void
mmix_asm_output_align (stream, power)
FILE *stream;
int power;
mmix_asm_output_align (FILE *stream, int power)
{
/* We need to record the needed alignment of this section in the object,
so we have to output an alignment directive. Use a .p2align (not
......@@ -1960,8 +1855,7 @@ mmix_asm_output_align (stream, power)
/* DBX_REGISTER_NUMBER. */
int
mmix_dbx_register_number (regno)
int regno;
mmix_dbx_register_number (int regno)
{
/* Adjust the register number to the one it will be output as, dammit.
It'd be nice if we could check the assumption that we're filling a
......@@ -1979,15 +1873,13 @@ mmix_dbx_register_number (regno)
/* End of target macro support functions.
Now MMIX's own functions. First the exported ones. */
Now the MMIX port's own functions. First the exported ones. */
/* Wrapper for get_hard_reg_initial_val since integrate.h isn't included
from insn-emit.c. */
rtx
mmix_get_hard_reg_initial_val (mode, regno)
enum machine_mode mode;
int regno;
mmix_get_hard_reg_initial_val (enum machine_mode mode, int regno)
{
return get_hard_reg_initial_val (mode, regno);
}
......@@ -1996,7 +1888,7 @@ mmix_get_hard_reg_initial_val (mode, regno)
"POP %d,0" should be used even within the function. */
int
mmix_use_simple_return ()
mmix_use_simple_return (void)
{
int regno;
......@@ -2033,7 +1925,7 @@ mmix_use_simple_return ()
/* Expands the function prologue into RTX. */
void
mmix_expand_prologue ()
mmix_expand_prologue (void)
{
HOST_WIDE_INT locals_size = get_frame_size ();
int regno;
......@@ -2268,7 +2160,7 @@ mmix_expand_prologue ()
/* Expands the function epilogue into RTX. */
void
mmix_expand_epilogue ()
mmix_expand_epilogue (void)
{
HOST_WIDE_INT locals_size = get_frame_size ();
int regno;
......@@ -2391,11 +2283,10 @@ mmix_expand_epilogue ()
first insn and after the last insn is wanted. */
void
mmix_output_register_setting (stream, regno, value, do_begin_end)
FILE *stream;
int regno;
HOST_WIDEST_INT value;
int do_begin_end;
mmix_output_register_setting (FILE *stream,
int regno,
HOST_WIDEST_INT value,
int do_begin_end)
{
if (do_begin_end)
fprintf (stream, "\t");
......@@ -2503,8 +2394,7 @@ mmix_output_register_setting (stream, regno, value, do_begin_end)
else return 0. */
int
mmix_shiftable_wyde_value (value)
unsigned HOST_WIDEST_INT value;
mmix_shiftable_wyde_value (unsigned HOST_WIDEST_INT value)
{
/* Shift by 16 bits per group, stop when we've found two groups with
nonzero bits. */
......@@ -2530,9 +2420,7 @@ mmix_shiftable_wyde_value (value)
/* True if this is an address_operand or a symbolic operand. */
int
mmix_symbolic_or_address_operand (op, mode)
rtx op;
enum machine_mode mode;
mmix_symbolic_or_address_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
......@@ -2558,9 +2446,7 @@ mmix_symbolic_or_address_operand (op, mode)
doesn't seem to be worth it at the moment. */
int
mmix_reg_or_constant_operand (op, mode)
rtx op;
enum machine_mode mode;
mmix_reg_or_constant_operand (rtx op, enum machine_mode mode)
{
return register_operand (op, mode)
|| (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) == VOIDmode)
......@@ -2570,9 +2456,7 @@ mmix_reg_or_constant_operand (op, mode)
/* True if this is a register with a condition-code mode. */
int
mmix_reg_cc_operand (op, mode)
rtx op;
enum machine_mode mode;
mmix_reg_cc_operand (rtx op, enum machine_mode mode)
{
if (mode == VOIDmode)
mode = GET_MODE (op);
......@@ -2587,9 +2471,7 @@ mmix_reg_cc_operand (op, mode)
replaced by (reg). */
int
mmix_foldable_comparison_operator (op, mode)
rtx op;
enum machine_mode mode;
mmix_foldable_comparison_operator (rtx op, enum machine_mode mode)
{
RTX_CODE code = GET_CODE (op);
......@@ -2614,9 +2496,7 @@ mmix_foldable_comparison_operator (op, mode)
code with -ffast-math (gcc.dg/20001228-1.c). */
int
mmix_comparison_operator (op, mode)
rtx op;
enum machine_mode mode;
mmix_comparison_operator (rtx op, enum machine_mode mode)
{
RTX_CODE code = GET_CODE (op);
......@@ -2652,9 +2532,7 @@ mmix_comparison_operator (op, mode)
/* True if this is a register or 0 (int or float). */
int
mmix_reg_or_0_operand (op, mode)
rtx op;
enum machine_mode mode;
mmix_reg_or_0_operand (rtx op, enum machine_mode mode)
{
/* FIXME: Is mode calculation necessary and correct? */
return
......@@ -2665,9 +2543,7 @@ mmix_reg_or_0_operand (op, mode)
/* True if this is a register or an int 0..255. */
int
mmix_reg_or_8bit_operand (op, mode)
rtx op;
enum machine_mode mode;
mmix_reg_or_8bit_operand (rtx op, enum machine_mode mode)
{
return register_operand (op, mode)
|| (GET_CODE (op) == CONST_INT
......@@ -2679,10 +2555,7 @@ mmix_reg_or_8bit_operand (op, mode)
is the comparison of mode is CC-somethingmode. */
int
mmix_valid_comparison (code, mode, op)
RTX_CODE code;
enum machine_mode mode;
rtx op;
mmix_valid_comparison (RTX_CODE code, enum machine_mode mode, rtx op)
{
if (mode == VOIDmode && op != NULL_RTX)
mode = GET_MODE (op);
......@@ -2711,9 +2584,7 @@ mmix_valid_comparison (code, mode, op)
NULL_RTX if this is not a valid comparison. */
rtx
mmix_gen_compare_reg (code, x, y)
RTX_CODE code;
rtx x, y;
mmix_gen_compare_reg (RTX_CODE code, rtx x, rtx y)
{
enum machine_mode ccmode = SELECT_CC_MODE (code, x, y);
rtx cc_reg;
......@@ -2748,8 +2619,7 @@ mmix_gen_compare_reg (code, x, y)
/* Local (static) helper functions. */
static void
mmix_emit_sp_add (offset)
HOST_WIDE_INT offset;
mmix_emit_sp_add (HOST_WIDE_INT offset)
{
rtx insn;
......@@ -2793,10 +2663,9 @@ mmix_emit_sp_add (offset)
wyde. The type of operator is passed as an asm output modifier. */
static void
mmix_output_shiftvalue_op_from_str (stream, mainop, value)
FILE *stream;
const char *mainop;
HOST_WIDEST_INT value;
mmix_output_shiftvalue_op_from_str (FILE *stream,
const char *mainop,
HOST_WIDEST_INT value)
{
static const char *const op_part[] = {"L", "ML", "MH", "H"};
int i;
......@@ -2827,10 +2696,7 @@ mmix_output_shiftvalue_op_from_str (stream, mainop, value)
/* Print a 64-bit value, optionally prefixed by assembly pseudo. */
static void
mmix_output_octa (stream, value, do_begin_end)
FILE *stream;
HOST_WIDEST_INT value;
int do_begin_end;
mmix_output_octa (FILE *stream, HOST_WIDEST_INT value, int do_begin_end)
{
/* Snipped from final.c:output_addr_const. We need to avoid the
presumed universal "0x" prefix. We can do it by replacing "0x" with
......@@ -2864,9 +2730,7 @@ mmix_output_octa (stream, value, do_begin_end)
be output with an operand). */
static void
mmix_output_shifted_value (stream, value)
FILE * stream;
HOST_WIDEST_INT value;
mmix_output_shifted_value (FILE *stream, HOST_WIDEST_INT value)
{
int i;
......@@ -2878,13 +2742,13 @@ mmix_output_shifted_value (stream, value)
}
for (i = 0; i < 4; i++)
{
/* We know we're through when we find one-bits in the low 16 bits. */
if (value & 0xffff)
{
fprintf (stream, "#%x", (int) (value & 0xffff));
return;
}
/* We know we're through when we find one-bits in the low 16 bits. */
if (value & 0xffff)
{
fprintf (stream, "#%x", (int) (value & 0xffff));
return;
}
value >>= 16;
}
......@@ -2902,10 +2766,7 @@ mmix_output_shifted_value (stream, value)
same as swapping the arguments). */
static void
mmix_output_condition (stream, x, reversed)
FILE *stream;
rtx x;
int reversed;
mmix_output_condition (FILE *stream, rtx x, int reversed)
{
struct cc_conv
{
......@@ -3010,8 +2871,7 @@ mmix_output_condition (stream, x, reversed)
/* Return the bit-value for a const_int or const_double. */
static HOST_WIDEST_INT
mmix_intval (x)
rtx x;
mmix_intval (rtx x)
{
unsigned HOST_WIDEST_INT retval;
......
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