#ifdef RTX_CODE
#ifdef TREE_CODE
-extern void arc_va_start PARAMS ((tree, rtx));
-extern rtx arc_va_arg PARAMS ((tree, tree));
+extern void arc_va_start (tree, rtx);
+extern rtx arc_va_arg (tree, tree);
#endif /* TREE_CODE */
-extern enum machine_mode arc_select_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
+extern enum machine_mode arc_select_cc_mode (enum rtx_code, rtx, rtx);
/* Define the function that build the compare insn for scc and bcc. */
-extern struct rtx_def *gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx));
+extern struct rtx_def *gen_compare_reg (enum rtx_code, rtx, rtx);
/* Declarations for various fns used in the .md file. */
-extern const char *output_shift PARAMS ((rtx *));
+extern const char *output_shift (rtx *);
-extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
-extern int arc_double_limm_p PARAMS ((rtx));
-extern int arc_eligible_for_epilogue_delay PARAMS ((rtx, int));
-extern void arc_initialize_trampoline PARAMS ((rtx, rtx, rtx));
-extern void arc_print_operand PARAMS ((FILE *, rtx, int));
-extern void arc_print_operand_address PARAMS ((FILE *, rtx));
-extern void arc_final_prescan_insn PARAMS ((rtx, rtx *, int));
-extern int call_address_operand PARAMS ((rtx, enum machine_mode));
-extern int call_operand PARAMS ((rtx, enum machine_mode));
-extern int symbolic_memory_operand PARAMS ((rtx, enum machine_mode));
-extern int short_immediate_operand PARAMS ((rtx, enum machine_mode));
-extern int long_immediate_operand PARAMS ((rtx, enum machine_mode));
-extern int long_immediate_loadstore_operand PARAMS ((rtx, enum machine_mode));
-extern int move_src_operand PARAMS ((rtx, enum machine_mode));
-extern int move_double_src_operand PARAMS ((rtx, enum machine_mode));
-extern int move_dest_operand PARAMS ((rtx, enum machine_mode));
-extern int load_update_operand PARAMS ((rtx, enum machine_mode));
-extern int store_update_operand PARAMS ((rtx, enum machine_mode));
-extern int nonvol_nonimm_operand PARAMS ((rtx, enum machine_mode));
-extern int const_sint32_operand PARAMS ((rtx, enum machine_mode));
-extern int const_uint32_operand PARAMS ((rtx, enum machine_mode));
-extern int proper_comparison_operator PARAMS ((rtx, enum machine_mode));
-extern int shift_operator PARAMS ((rtx, enum machine_mode));
+extern int symbolic_operand (rtx, enum machine_mode);
+extern int arc_double_limm_p (rtx);
+extern int arc_eligible_for_epilogue_delay (rtx, int);
+extern void arc_initialize_trampoline (rtx, rtx, rtx);
+extern void arc_print_operand (FILE *, rtx, int);
+extern void arc_print_operand_address (FILE *, rtx);
+extern void arc_final_prescan_insn (rtx, rtx *, int);
+extern int call_address_operand (rtx, enum machine_mode);
+extern int call_operand (rtx, enum machine_mode);
+extern int symbolic_memory_operand (rtx, enum machine_mode);
+extern int short_immediate_operand (rtx, enum machine_mode);
+extern int long_immediate_operand (rtx, enum machine_mode);
+extern int long_immediate_loadstore_operand (rtx, enum machine_mode);
+extern int move_src_operand (rtx, enum machine_mode);
+extern int move_double_src_operand (rtx, enum machine_mode);
+extern int move_dest_operand (rtx, enum machine_mode);
+extern int load_update_operand (rtx, enum machine_mode);
+extern int store_update_operand (rtx, enum machine_mode);
+extern int nonvol_nonimm_operand (rtx, enum machine_mode);
+extern int const_sint32_operand (rtx, enum machine_mode);
+extern int const_uint32_operand (rtx, enum machine_mode);
+extern int proper_comparison_operator (rtx, enum machine_mode);
+extern int shift_operator (rtx, enum machine_mode);
#endif /* RTX_CODE */
#ifdef TREE_CODE
-extern enum arc_function_type arc_compute_function_type PARAMS ((tree));
-extern void arc_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
- enum machine_mode, tree,
- int *, int));
+extern enum arc_function_type arc_compute_function_type (tree);
+extern void arc_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
+ tree, int *, int);
#endif /* TREE_CODE */
-extern void arc_init PARAMS ((void));
-extern unsigned int arc_compute_frame_size PARAMS ((int));
-extern void arc_save_restore PARAMS ((FILE *, const char *, unsigned int,
- unsigned int, const char *));
-extern int arc_delay_slots_for_epilogue PARAMS ((void));
-extern void arc_finalize_pic PARAMS ((void));
-extern void arc_ccfsm_at_label PARAMS ((const char *, int));
-extern int arc_ccfsm_branch_deleted_p PARAMS ((void));
-extern void arc_ccfsm_record_branch_deleted PARAMS ((void));
+extern void arc_init (void);
+extern unsigned int arc_compute_frame_size (int);
+extern void arc_save_restore (FILE *, const char *, unsigned int,
+ unsigned int, const char *);
+extern int arc_delay_slots_for_epilogue (void);
+extern void arc_finalize_pic (void);
+extern void arc_ccfsm_at_label (const char *, int);
+extern int arc_ccfsm_branch_deleted_p (void);
+extern void arc_ccfsm_record_branch_deleted (void);
arc_print_operand. */
static int last_insn_set_cc_p;
static int current_insn_set_cc_p;
-static void record_cc_ref PARAMS ((rtx));
-static void arc_init_reg_tables PARAMS ((void));
-static int get_arc_condition_code PARAMS ((rtx));
+static void record_cc_ref (rtx);
+static void arc_init_reg_tables (void);
+static int get_arc_condition_code (rtx);
const struct attribute_spec arc_attribute_table[];
-static tree arc_handle_interrupt_attribute PARAMS ((tree *, tree, tree, int, bool *));
-static bool arc_assemble_integer PARAMS ((rtx, unsigned int, int));
-static void arc_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
-static void arc_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void arc_file_start PARAMS ((void));
-static void arc_internal_label PARAMS ((FILE *, const char *, unsigned long));
-static bool arc_rtx_costs PARAMS ((rtx, int, int, int *));
-static int arc_address_cost PARAMS ((rtx));
+static tree arc_handle_interrupt_attribute (tree *, tree, tree, int, bool *);
+static bool arc_assemble_integer (rtx, unsigned int, int);
+static void arc_output_function_prologue (FILE *, HOST_WIDE_INT);
+static void arc_output_function_epilogue (FILE *, HOST_WIDE_INT);
+static void arc_file_start (void);
+static void arc_internal_label (FILE *, const char *, unsigned long);
+static bool arc_rtx_costs (rtx, int, int, int *);
+static int arc_address_cost (rtx);
\f
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
/* Called by OVERRIDE_OPTIONS to initialize various things. */
void
-arc_init ()
+arc_init (void)
{
char *tmp;
`(eq (...) (...))'. */
static int
-get_arc_condition_code (comparison)
- rtx comparison;
+get_arc_condition_code (rtx comparison)
{
switch (GET_CODE (comparison))
{
return the mode to be used for the comparison. */
enum machine_mode
-arc_select_cc_mode (op, x, y)
- enum rtx_code op;
- rtx x, y ATTRIBUTE_UNUSED;
+arc_select_cc_mode (enum rtx_code op,
+ rtx x ATTRIBUTE_UNUSED,
+ rtx y ATTRIBUTE_UNUSED)
{
switch (op)
{
enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
static void
-arc_init_reg_tables ()
+arc_init_reg_tables (void)
{
int i;
/* Handle an "interrupt" attribute; arguments as in
struct attribute_spec.handler. */
static tree
-arc_handle_interrupt_attribute (node, name, args, flags, no_add_attrs)
- tree *node ATTRIBUTE_UNUSED;
- tree name;
- tree args;
- int flags ATTRIBUTE_UNUSED;
- bool *no_add_attrs;
+arc_handle_interrupt_attribute (tree *node ATTRIBUTE_UNUSED,
+ tree name,
+ tree args,
+ int flags ATTRIBUTE_UNUSED,
+ bool *no_add_attrs)
{
tree value = TREE_VALUE (args);
/* Acceptable arguments to the call insn. */
int
-call_address_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+call_address_operand (rtx op, enum machine_mode mode)
{
return (symbolic_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && LEGITIMATE_CONSTANT_P (op))
}
int
-call_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+call_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != MEM)
return 0;
/* Returns 1 if OP is a symbol reference. */
int
-symbolic_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (GET_CODE (op))
{
operand of mode MODE. */
int
-symbolic_memory_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+symbolic_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
/* Return true if OP is a short immediate (shimm) value. */
int
-short_immediate_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+short_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) != CONST_INT)
return 0;
This is currently only used when calculating length attributes. */
int
-long_immediate_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+long_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (GET_CODE (op))
{
This is currently only used when calculating length attributes. */
int
-long_immediate_loadstore_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+long_immediate_loadstore_operand (rtx op,
+ enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) != MEM)
return 0;
move source. */
int
-move_src_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+move_src_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
move source. */
int
-move_double_src_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+move_double_src_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
/* Return true if OP is an acceptable argument for a move destination. */
int
-move_dest_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+move_dest_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
/* Return true if OP is valid load with update operand. */
int
-load_update_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+load_update_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != MEM
|| GET_MODE (op) != mode)
/* Return true if OP is valid store with update operand. */
int
-store_update_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+store_update_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != MEM
|| GET_MODE (op) != mode)
and only the standard movXX patterns are set up to handle them. */
int
-nonvol_nonimm_operand (op, mode)
- rtx op;
- enum machine_mode mode;
+nonvol_nonimm_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == MEM && MEM_VOLATILE_P (op))
return 0;
contexts. */
int
-const_sint32_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+const_sint32_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
/* All allowed constants will fit a CONST_INT. */
return (GET_CODE (op) == CONST_INT
need some extra crud to make it work when hosted on 64-bit machines. */
int
-const_uint32_operand (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+const_uint32_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
#if HOST_BITS_PER_WIDE_INT > 32
/* All allowed constants will fit a CONST_INT. */
comparisons that use the bits that are valid. */
int
-proper_comparison_operator (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+proper_comparison_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
enum rtx_code code = GET_CODE (op);
return the rtx for the cc reg in the proper mode. */
rtx
-gen_compare_reg (code, x, y)
- enum rtx_code code;
- rtx x, y;
+gen_compare_reg (enum rtx_code code, rtx x, rtx y)
{
enum machine_mode mode = SELECT_CC_MODE (code, x, y);
rtx cc_reg;
We assume the value can be either signed or unsigned. */
int
-arc_double_limm_p (value)
- rtx value;
+arc_double_limm_p (rtx value)
{
HOST_WIDE_INT low, high;
to compensate. */
void
-arc_setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
- CUMULATIVE_ARGS *cum;
- enum machine_mode mode;
- tree type ATTRIBUTE_UNUSED;
- int *pretend_size;
- int no_rtl;
+arc_setup_incoming_varargs (CUMULATIVE_ARGS *cum,
+ enum machine_mode mode,
+ tree type ATTRIBUTE_UNUSED,
+ int *pretend_size,
+ int no_rtl)
{
int first_anon_arg;
scanned. In either case, *TOTAL contains the cost result. */
static bool
-arc_rtx_costs (x, code, outer_code, total)
- rtx x;
- int code;
- int outer_code ATTRIBUTE_UNUSED;
- int *total;
+arc_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
{
switch (code)
{
If ADDR is not a valid address, its cost is irrelevant. */
static int
-arc_address_cost (addr)
- rtx addr;
+arc_address_cost (rtx addr)
{
switch (GET_CODE (addr))
{
call with DECL = NULL_TREE. */
enum arc_function_type
-arc_compute_function_type (decl)
- tree decl;
+arc_compute_function_type (tree decl)
{
tree a;
/* Cached value. */
SIZE is the size needed for local variables. */
unsigned int
-arc_compute_frame_size (size)
- int size; /* # of var. bytes allocated. */
+arc_compute_frame_size (int size /* # of var. bytes allocated. */)
{
int regno;
unsigned int total_size, var_size, args_size, pretend_size, extra_size;
/* Common code to save/restore registers. */
void
-arc_save_restore (file, base_reg, offset, gmask, op)
- FILE *file;
- const char *base_reg;
- unsigned int offset;
- unsigned int gmask;
- const char *op;
+arc_save_restore (FILE *file,
+ const char *base_reg,
+ unsigned int offset,
+ unsigned int gmask,
+ const char *op)
{
int regno;
symbols. */
static bool
-arc_assemble_integer (x, size, aligned_p)
- rtx x;
- unsigned int size;
- int aligned_p;
+arc_assemble_integer (rtx x, unsigned int size, int aligned_p)
{
if (size == UNITS_PER_WORD && aligned_p
&& ((GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x))
/* Set up the stack and frame pointer (if desired) for the function. */
static void
-arc_output_function_prologue (file, size)
- FILE *file;
- HOST_WIDE_INT size;
+arc_output_function_prologue (FILE *file, HOST_WIDE_INT size)
{
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
and regs. */
static void
-arc_output_function_epilogue (file, size)
- FILE *file;
- HOST_WIDE_INT size;
+arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
{
rtx epilogue_delay = current_function_epilogue_delay_list;
int noepilogue = FALSE;
delay slot so for now we only consider functions with empty frames. */
int
-arc_delay_slots_for_epilogue ()
+arc_delay_slots_for_epilogue (void)
{
if (arc_compute_function_type (current_function_decl) != ARC_FUNCTION_NORMAL)
return 0;
pointer or any call-saved register is OK. SLOT will always be 0. */
int
-arc_eligible_for_epilogue_delay (trial, slot)
- rtx trial;
- int slot;
+arc_eligible_for_epilogue_delay (rtx trial, int slot)
{
if (slot != 0)
abort ();
/* Emit special PIC prologues and epilogues. */
void
-arc_finalize_pic ()
+arc_finalize_pic (void)
{
/* nothing to do */
}
/* Return true if OP is a shift operator. */
int
-shift_operator (op, mode)
- rtx op;
- enum machine_mode mode ATTRIBUTE_UNUSED;
+shift_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (GET_CODE (op))
{
using it here will give us a chance to play with it. */
const char *
-output_shift (operands)
- rtx *operands;
+output_shift (rtx *operands)
{
rtx shift = operands[3];
enum machine_mode mode = GET_MODE (shift);
CXT is an RTX for the static chain value for the function. */
void
-arc_initialize_trampoline (tramp, fnaddr, cxt)
- rtx tramp ATTRIBUTE_UNUSED, fnaddr ATTRIBUTE_UNUSED, cxt ATTRIBUTE_UNUSED;
+arc_initialize_trampoline (rtx tramp ATTRIBUTE_UNUSED,
+ rtx fnaddr ATTRIBUTE_UNUSED,
+ rtx cxt ATTRIBUTE_UNUSED)
{
}
\f
at the top of the file. */
static void
-arc_file_start ()
+arc_file_start (void)
{
default_file_start ();
fprintf (asm_out_file, "\t.cpu %s\n", arc_cpu_string);
For `%' followed by punctuation, CODE is the punctuation and X is null. */
void
-arc_print_operand (file, x, code)
- FILE *file;
- rtx x;
- int code;
+arc_print_operand (FILE *file, rtx x, int code)
{
switch (code)
{
/* Print a memory address as an operand to reference that memory location. */
void
-arc_print_operand_address (file, addr)
- FILE *file;
- rtx addr;
+arc_print_operand_address (FILE *file, rtx addr)
{
register rtx base, index = 0;
int offset = 0;
/* Update compare/branch separation marker. */
static void
-record_cc_ref (insn)
- rtx insn;
+record_cc_ref (rtx insn)
{
last_insn_set_cc_p = current_insn_set_cc_p;
we may not be outputting the branch. */
void
-arc_final_prescan_insn (insn, opvec, noperands)
- rtx insn;
- rtx *opvec ATTRIBUTE_UNUSED;
- int noperands ATTRIBUTE_UNUSED;
+arc_final_prescan_insn (rtx insn,
+ rtx *opvec ATTRIBUTE_UNUSED,
+ int noperands ATTRIBUTE_UNUSED)
{
/* BODY will hold the body of INSN. */
register rtx body = PATTERN (insn);
Called from (*targetm.asm_out.internal_label). */
void
-arc_ccfsm_at_label (prefix, num)
- const char *prefix;
- int num;
+arc_ccfsm_at_label (const char *prefix, int num)
{
if (arc_ccfsm_state == 3 && arc_ccfsm_target_label == num
&& !strcmp (prefix, "L"))
deleted. */
int
-arc_ccfsm_branch_deleted_p ()
+arc_ccfsm_branch_deleted_p (void)
{
if (arc_ccfsm_state == 1 || arc_ccfsm_state == 2)
return 1;
conditionalized. */
void
-arc_ccfsm_record_branch_deleted ()
+arc_ccfsm_record_branch_deleted (void)
{
/* Indicate we're conditionalizing insns now. */
arc_ccfsm_state += 2;
}
\f
void
-arc_va_start (valist, nextarg)
- tree valist;
- rtx nextarg;
+arc_va_start (tree valist, rtx nextarg)
{
/* See arc_setup_incoming_varargs for reasons for this oddity. */
if (current_function_args_info < 8
}
rtx
-arc_va_arg (valist, type)
- tree valist, type;
+arc_va_arg (tree valist, tree type)
{
rtx addr_rtx;
tree addr, incr;
PREFIX is the class of label and NUM is the number within the class. */
static void
-arc_internal_label (stream, prefix, labelno)
- FILE *stream;
- const char *prefix;
- unsigned long labelno;
+arc_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
{
arc_ccfsm_at_label (prefix, labelno);
default_internal_label (stream, prefix, labelno);