This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] Convert config/arc to C90
- From: "Kelley Cook" <kelleycook at wideopenwest dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Nov 2003 22:38:02 -0500
- Subject: [Committed] Convert config/arc to C90
Long Boring patch attached. Committed as preapproved.
configure --target=arc-unknown-elf
make "-O2 -g -Wold-style-definition -Werror" all
Kelley Cook
2003-11-19 Kelley Cook <kcook@gcc.gnu.org>
* config/arc/arc-protos.h: Update to C90 prototypes.
* config/arc/arc.c: Likewise.
* config/arc/initfini.c: Likewise.
diff -cp ../../../../gcc-orig/gcc/config/arc/arc-protos.h ./arc-protos.h
*** ../../../../gcc-orig/gcc/config/arc/arc-protos.h Sat Sep 27 00:48:13 2003
--- ./arc-protos.h Mon Nov 17 09:07:04 2003
*************** Boston, MA 02111-1307, USA. */
*** 20,77 ****
#ifdef RTX_CODE
#ifdef TREE_CODE
! extern void arc_va_start PARAMS ((tree, rtx));
! extern rtx arc_va_arg PARAMS ((tree, tree));
#endif /* TREE_CODE */
! extern enum machine_mode arc_select_cc_mode PARAMS ((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));
/* Declarations for various fns used in the .md file. */
! extern const char *output_shift PARAMS ((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));
#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));
#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));
--- 20,76 ----
#ifdef RTX_CODE
#ifdef TREE_CODE
! 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 (enum rtx_code, rtx, rtx);
/* Define the function that build the compare insn for scc and bcc. */
! 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 (rtx *);
! 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 (tree);
! extern void arc_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
! tree, int *, int);
#endif /* TREE_CODE */
! 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);
diff -cp ../../../../gcc-orig/gcc/config/arc/arc.c ./arc.c
*** ../../../../gcc-orig/gcc/config/arc/arc.c Mon Oct 13 17:16:22 2003
--- ./arc.c Wed Nov 19 17:18:26 2003
*************** static int arc_ccfsm_target_label;
*** 86,103 ****
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));
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));
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
--- 86,103 ----
arc_print_operand. */
static int last_insn_set_cc_p;
static int current_insn_set_cc_p;
! 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 (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);
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
*************** struct gcc_target targetm = TARGET_INITI
*** 128,134 ****
/* Called by OVERRIDE_OPTIONS to initialize various things. */
void
! arc_init ()
{
char *tmp;
--- 128,134 ----
/* Called by OVERRIDE_OPTIONS to initialize various things. */
void
! arc_init (void)
{
char *tmp;
*************** static const char *const arc_condition_c
*** 183,190 ****
`(eq (...) (...))'. */
static int
! get_arc_condition_code (comparison)
! rtx comparison;
{
switch (GET_CODE (comparison))
{
--- 183,189 ----
`(eq (...) (...))'. */
static int
! get_arc_condition_code (rtx comparison)
{
switch (GET_CODE (comparison))
{
*************** get_arc_condition_code (comparison)
*** 208,216 ****
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;
{
switch (op)
{
--- 207,215 ----
return the mode to be used for the comparison. */
enum machine_mode
! arc_select_cc_mode (enum rtx_code op,
! rtx x ATTRIBUTE_UNUSED,
! rtx y ATTRIBUTE_UNUSED)
{
switch (op)
{
*************** unsigned int arc_mode_class [NUM_MACHINE
*** 284,290 ****
enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
static void
! arc_init_reg_tables ()
{
int i;
--- 283,289 ----
enum reg_class arc_regno_reg_class[FIRST_PSEUDO_REGISTER];
static void
! arc_init_reg_tables (void)
{
int i;
*************** const struct attribute_spec arc_attribut
*** 357,368 ****
/* 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;
{
tree value = TREE_VALUE (args);
--- 356,366 ----
/* Handle an "interrupt" attribute; arguments as in
struct attribute_spec.handler. */
static tree
! 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);
*************** arc_handle_interrupt_attribute (node, na
*** 387,395 ****
/* Acceptable arguments to the call insn. */
int
! call_address_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
return (symbolic_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && LEGITIMATE_CONSTANT_P (op))
--- 385,391 ----
/* Acceptable arguments to the call insn. */
int
! call_address_operand (rtx op, enum machine_mode mode)
{
return (symbolic_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && LEGITIMATE_CONSTANT_P (op))
*************** call_address_operand (op, mode)
*** 397,405 ****
}
int
! call_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
if (GET_CODE (op) != MEM)
return 0;
--- 393,399 ----
}
int
! call_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != MEM)
return 0;
*************** call_operand (op, mode)
*** 410,418 ****
/* Returns 1 if OP is a symbol reference. */
int
! symbolic_operand (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
--- 404,410 ----
/* Returns 1 if OP is a symbol reference. */
int
! symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (GET_CODE (op))
{
*************** symbolic_operand (op, mode)
*** 429,437 ****
operand of mode MODE. */
int
! symbolic_memory_operand (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
--- 421,427 ----
operand of mode MODE. */
int
! symbolic_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op);
*************** symbolic_memory_operand (op, mode)
*** 445,453 ****
/* Return true if OP is a short immediate (shimm) value. */
int
! short_immediate_operand (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) != CONST_INT)
return 0;
--- 435,441 ----
/* Return true if OP is a short immediate (shimm) value. */
int
! short_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) != CONST_INT)
return 0;
*************** short_immediate_operand (op, mode)
*** 458,466 ****
This is currently only used when calculating length attributes. */
int
! long_immediate_operand (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
--- 446,452 ----
This is currently only used when calculating length attributes. */
int
! long_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (GET_CODE (op))
{
*************** long_immediate_operand (op, mode)
*** 488,496 ****
This is currently only used when calculating length attributes. */
int
! long_immediate_loadstore_operand (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
if (GET_CODE (op) != MEM)
return 0;
--- 474,481 ----
This is currently only used when calculating length attributes. */
int
! long_immediate_loadstore_operand (rtx op,
! enum machine_mode mode ATTRIBUTE_UNUSED)
{
if (GET_CODE (op) != MEM)
return 0;
*************** long_immediate_loadstore_operand (op, mo
*** 530,538 ****
move source. */
int
! move_src_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
switch (GET_CODE (op))
{
--- 515,521 ----
move source. */
int
! move_src_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
*************** move_src_operand (op, mode)
*** 572,580 ****
move source. */
int
! move_double_src_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
switch (GET_CODE (op))
{
--- 555,561 ----
move source. */
int
! move_double_src_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
*************** move_double_src_operand (op, mode)
*** 604,612 ****
/* Return true if OP is an acceptable argument for a move destination. */
int
! move_dest_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
switch (GET_CODE (op))
{
--- 585,591 ----
/* Return true if OP is an acceptable argument for a move destination. */
int
! move_dest_operand (rtx op, enum machine_mode mode)
{
switch (GET_CODE (op))
{
*************** move_dest_operand (op, mode)
*** 629,637 ****
/* Return true if OP is valid load with update operand. */
int
! load_update_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
if (GET_CODE (op) != MEM
|| GET_MODE (op) != mode)
--- 608,614 ----
/* Return true if OP is valid load with update operand. */
int
! load_update_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != MEM
|| GET_MODE (op) != mode)
*************** load_update_operand (op, mode)
*** 648,656 ****
/* Return true if OP is valid store with update operand. */
int
! store_update_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
if (GET_CODE (op) != MEM
|| GET_MODE (op) != mode)
--- 625,631 ----
/* Return true if OP is valid store with update operand. */
int
! store_update_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) != MEM
|| GET_MODE (op) != mode)
*************** store_update_operand (op, mode)
*** 670,678 ****
and only the standard movXX patterns are set up to handle them. */
int
! nonvol_nonimm_operand (op, mode)
! rtx op;
! enum machine_mode mode;
{
if (GET_CODE (op) == MEM && MEM_VOLATILE_P (op))
return 0;
--- 645,651 ----
and only the standard movXX patterns are set up to handle them. */
int
! nonvol_nonimm_operand (rtx op, enum machine_mode mode)
{
if (GET_CODE (op) == MEM && MEM_VOLATILE_P (op))
return 0;
*************** nonvol_nonimm_operand (op, mode)
*** 684,692 ****
contexts. */
int
! const_sint32_operand (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
/* All allowed constants will fit a CONST_INT. */
return (GET_CODE (op) == CONST_INT
--- 657,663 ----
contexts. */
int
! 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
*************** const_sint32_operand (op, mode)
*** 698,706 ****
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;
{
#if HOST_BITS_PER_WIDE_INT > 32
/* All allowed constants will fit a CONST_INT. */
--- 669,675 ----
need some extra crud to make it work when hosted on 64-bit machines. */
int
! 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. */
*************** const_uint32_operand (op, mode)
*** 719,727 ****
comparisons that use the bits that are valid. */
int
! proper_comparison_operator (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
enum rtx_code code = GET_CODE (op);
--- 688,694 ----
comparisons that use the bits that are valid. */
int
! proper_comparison_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
enum rtx_code code = GET_CODE (op);
*************** proper_comparison_operator (op, mode)
*** 742,750 ****
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;
{
enum machine_mode mode = SELECT_CC_MODE (code, x, y);
rtx cc_reg;
--- 709,715 ----
return the rtx for the cc reg in the proper mode. */
rtx
! gen_compare_reg (enum rtx_code code, rtx x, rtx y)
{
enum machine_mode mode = SELECT_CC_MODE (code, x, y);
rtx cc_reg;
*************** gen_compare_reg (code, x, y)
*** 761,768 ****
We assume the value can be either signed or unsigned. */
int
! arc_double_limm_p (value)
! rtx value;
{
HOST_WIDE_INT low, high;
--- 726,732 ----
We assume the value can be either signed or unsigned. */
int
! arc_double_limm_p (rtx value)
{
HOST_WIDE_INT low, high;
*************** arc_double_limm_p (value)
*** 798,809 ****
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;
{
int first_anon_arg;
--- 762,772 ----
to compensate. */
void
! 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;
*************** arc_setup_incoming_varargs (cum, mode, t
*** 845,855 ****
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;
{
switch (code)
{
--- 808,814 ----
scanned. In either case, *TOTAL contains the cost result. */
static bool
! arc_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
{
switch (code)
{
*************** arc_rtx_costs (x, code, outer_code, tota
*** 903,910 ****
If ADDR is not a valid address, its cost is irrelevant. */
static int
! arc_address_cost (addr)
! rtx addr;
{
switch (GET_CODE (addr))
{
--- 862,868 ----
If ADDR is not a valid address, its cost is irrelevant. */
static int
! arc_address_cost (rtx addr)
{
switch (GET_CODE (addr))
{
*************** static struct arc_frame_info zero_frame_
*** 1019,1026 ****
call with DECL = NULL_TREE. */
enum arc_function_type
! arc_compute_function_type (decl)
! tree decl;
{
tree a;
/* Cached value. */
--- 977,983 ----
call with DECL = NULL_TREE. */
enum arc_function_type
! arc_compute_function_type (tree decl)
{
tree a;
/* Cached value. */
*************** arc_compute_function_type (decl)
*** 1090,1097 ****
SIZE is the size needed for local variables. */
unsigned int
! arc_compute_frame_size (size)
! int size; /* # of var. bytes allocated. */
{
int regno;
unsigned int total_size, var_size, args_size, pretend_size, extra_size;
--- 1047,1053 ----
SIZE is the size needed for local variables. */
unsigned int
! arc_compute_frame_size (int size /* # of var. bytes allocated. */)
{
int regno;
unsigned int total_size, var_size, args_size, pretend_size, extra_size;
*************** arc_compute_frame_size (size)
*** 1155,1166 ****
/* 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;
{
int regno;
--- 1111,1121 ----
/* Common code to save/restore registers. */
void
! arc_save_restore (FILE *file,
! const char *base_reg,
! unsigned int offset,
! unsigned int gmask,
! const char *op)
{
int regno;
*************** arc_save_restore (file, base_reg, offset
*** 1183,1192 ****
symbols. */
static bool
! arc_assemble_integer (x, size, aligned_p)
! 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))
--- 1138,1144 ----
symbols. */
static bool
! 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))
*************** arc_assemble_integer (x, size, aligned_p
*** 1203,1211 ****
/* 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;
{
const char *sp_str = reg_names[STACK_POINTER_REGNUM];
const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
--- 1155,1161 ----
/* Set up the stack and frame pointer (if desired) for the function. */
static void
! 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];
*************** arc_output_function_prologue (file, size
*** 1281,1289 ****
and regs. */
static void
! arc_output_function_epilogue (file, size)
! FILE *file;
! HOST_WIDE_INT size;
{
rtx epilogue_delay = current_function_epilogue_delay_list;
int noepilogue = FALSE;
--- 1231,1237 ----
and regs. */
static void
! arc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
{
rtx epilogue_delay = current_function_epilogue_delay_list;
int noepilogue = FALSE;
*************** arc_output_function_epilogue (file, size
*** 1446,1452 ****
delay slot so for now we only consider functions with empty frames. */
int
! arc_delay_slots_for_epilogue ()
{
if (arc_compute_function_type (current_function_decl) != ARC_FUNCTION_NORMAL)
return 0;
--- 1394,1400 ----
delay slot so for now we only consider functions with empty frames. */
int
! arc_delay_slots_for_epilogue (void)
{
if (arc_compute_function_type (current_function_decl) != ARC_FUNCTION_NORMAL)
return 0;
*************** arc_delay_slots_for_epilogue ()
*** 1462,1470 ****
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;
{
if (slot != 0)
abort ();
--- 1410,1416 ----
pointer or any call-saved register is OK. SLOT will always be 0. */
int
! arc_eligible_for_epilogue_delay (rtx trial, int slot)
{
if (slot != 0)
abort ();
*************** arc_eligible_for_epilogue_delay (trial,
*** 1489,1495 ****
/* Emit special PIC prologues and epilogues. */
void
! arc_finalize_pic ()
{
/* nothing to do */
}
--- 1435,1441 ----
/* Emit special PIC prologues and epilogues. */
void
! arc_finalize_pic (void)
{
/* nothing to do */
}
*************** arc_finalize_pic ()
*** 1497,1505 ****
/* Return true if OP is a shift operator. */
int
! shift_operator (op, mode)
! rtx op;
! enum machine_mode mode ATTRIBUTE_UNUSED;
{
switch (GET_CODE (op))
{
--- 1443,1449 ----
/* Return true if OP is a shift operator. */
int
! shift_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
{
switch (GET_CODE (op))
{
*************** shift_operator (op, mode)
*** 1527,1534 ****
using it here will give us a chance to play with it. */
const char *
! output_shift (operands)
! rtx *operands;
{
rtx shift = operands[3];
enum machine_mode mode = GET_MODE (shift);
--- 1471,1477 ----
using it here will give us a chance to play with it. */
const char *
! output_shift (rtx *operands)
{
rtx shift = operands[3];
enum machine_mode mode = GET_MODE (shift);
*************** output_shift (operands)
*** 1649,1656 ****
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;
{
}
--- 1592,1600 ----
CXT is an RTX for the static chain value for the function. */
void
! arc_initialize_trampoline (rtx tramp ATTRIBUTE_UNUSED,
! rtx fnaddr ATTRIBUTE_UNUSED,
! rtx cxt ATTRIBUTE_UNUSED)
{
}
*************** arc_initialize_trampoline (tramp, fnaddr
*** 1658,1664 ****
at the top of the file. */
static void
! arc_file_start ()
{
default_file_start ();
fprintf (asm_out_file, "\t.cpu %s\n", arc_cpu_string);
--- 1602,1608 ----
at the top of the file. */
static void
! arc_file_start (void)
{
default_file_start ();
fprintf (asm_out_file, "\t.cpu %s\n", arc_cpu_string);
*************** arc_file_start ()
*** 1669,1678 ****
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;
{
switch (code)
{
--- 1613,1619 ----
For `%' followed by punctuation, CODE is the punctuation and X is null. */
void
! arc_print_operand (FILE *file, rtx x, int code)
{
switch (code)
{
*************** arc_print_operand (file, x, code)
*** 1884,1892 ****
/* Print a memory address as an operand to reference that memory location. */
void
! arc_print_operand_address (file, addr)
! FILE *file;
! rtx addr;
{
register rtx base, index = 0;
int offset = 0;
--- 1825,1831 ----
/* Print a memory address as an operand to reference that memory location. */
void
! arc_print_operand_address (FILE *file, rtx addr)
{
register rtx base, index = 0;
int offset = 0;
*************** arc_print_operand_address (file, addr)
*** 1943,1950 ****
/* Update compare/branch separation marker. */
static void
! record_cc_ref (insn)
! rtx insn;
{
last_insn_set_cc_p = current_insn_set_cc_p;
--- 1882,1888 ----
/* Update compare/branch separation marker. */
static void
! record_cc_ref (rtx insn)
{
last_insn_set_cc_p = current_insn_set_cc_p;
*************** record_cc_ref (insn)
*** 2000,2009 ****
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;
{
/* BODY will hold the body of INSN. */
register rtx body = PATTERN (insn);
--- 1938,1946 ----
we may not be outputting the branch. */
void
! 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);
*************** arc_final_prescan_insn (insn, opvec, nop
*** 2285,2293 ****
Called from (*targetm.asm_out.internal_label). */
void
! arc_ccfsm_at_label (prefix, num)
! const char *prefix;
! int num;
{
if (arc_ccfsm_state == 3 && arc_ccfsm_target_label == num
&& !strcmp (prefix, "L"))
--- 2222,2228 ----
Called from (*targetm.asm_out.internal_label). */
void
! arc_ccfsm_at_label (const char *prefix, int num)
{
if (arc_ccfsm_state == 3 && arc_ccfsm_target_label == num
&& !strcmp (prefix, "L"))
*************** arc_ccfsm_at_label (prefix, num)
*** 2301,2307 ****
deleted. */
int
! arc_ccfsm_branch_deleted_p ()
{
if (arc_ccfsm_state == 1 || arc_ccfsm_state == 2)
return 1;
--- 2236,2242 ----
deleted. */
int
! arc_ccfsm_branch_deleted_p (void)
{
if (arc_ccfsm_state == 1 || arc_ccfsm_state == 2)
return 1;
*************** arc_ccfsm_branch_deleted_p ()
*** 2312,2318 ****
conditionalized. */
void
! arc_ccfsm_record_branch_deleted ()
{
/* Indicate we're conditionalizing insns now. */
arc_ccfsm_state += 2;
--- 2247,2253 ----
conditionalized. */
void
! arc_ccfsm_record_branch_deleted (void)
{
/* Indicate we're conditionalizing insns now. */
arc_ccfsm_state += 2;
*************** arc_ccfsm_record_branch_deleted ()
*** 2324,2332 ****
}
void
! arc_va_start (valist, nextarg)
! tree valist;
! rtx nextarg;
{
/* See arc_setup_incoming_varargs for reasons for this oddity. */
if (current_function_args_info < 8
--- 2259,2265 ----
}
void
! arc_va_start (tree valist, rtx nextarg)
{
/* See arc_setup_incoming_varargs for reasons for this oddity. */
if (current_function_args_info < 8
*************** arc_va_start (valist, nextarg)
*** 2337,2344 ****
}
rtx
! arc_va_arg (valist, type)
! tree valist, type;
{
rtx addr_rtx;
tree addr, incr;
--- 2270,2276 ----
}
rtx
! arc_va_arg (tree valist, tree type)
{
rtx addr_rtx;
tree addr, incr;
*************** arc_va_arg (valist, type)
*** 2413,2422 ****
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_ccfsm_at_label (prefix, labelno);
default_internal_label (stream, prefix, labelno);
--- 2345,2351 ----
PREFIX is the class of label and NUM is the number within the class. */
static void
! arc_internal_label (FILE *stream, const char *prefix, unsigned long labelno)
{
arc_ccfsm_at_label (prefix, labelno);
default_internal_label (stream, prefix, labelno);
diff -cp ../../../../gcc-orig/gcc/config/arc/initfini.c ./initfini.c
*** ../../../../gcc-orig/gcc/config/arc/initfini.c Sat Sep 27 00:48:13 2003
--- ./initfini.c Wed Nov 19 17:21:50 2003
*************** static func_ptr __DTOR_LIST__[1] __attri
*** 66,76 ****
refers to one particular associated `__DTOR_LIST__' which belongs to the
same particular root executable or shared library file. */
! static void __do_global_dtors ()
asm ("__do_global_dtors") __attribute__ ((section (".text")));
static void
! __do_global_dtors ()
{
func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++)
--- 66,76 ----
refers to one particular associated `__DTOR_LIST__' which belongs to the
same particular root executable or shared library file. */
! static void __do_global_dtors (void)
asm ("__do_global_dtors") __attribute__ ((section (".text")));
static void
! __do_global_dtors (void)
{
func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++)
*************** static func_ptr __DTOR_END__[1] __attrib
*** 125,135 ****
/* Run all global constructors for the program.
Note that they are run in reverse order. */
! static void __do_global_ctors ()
asm ("__do_global_ctors") __attribute__ ((section (".text")));
static void
! __do_global_ctors ()
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
--- 125,135 ----
/* Run all global constructors for the program.
Note that they are run in reverse order. */
! static void __do_global_ctors (void)
asm ("__do_global_ctors") __attribute__ ((section (".text")));
static void
! __do_global_ctors (void)
{
func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)