mcore.c: Convert to ISO C90 function declarations and definitions.

* config/mcore/mcore.c: Convert to ISO C90 function declarations and definitions.
* config/mcore/mcore.h: Likewise.
* config/mcore/mcore-protos.h: Likewise.

From-SVN: r72020
This commit is contained in:
Steven Bosscher 2003-10-02 12:48:54 +02:00 committed by Nick Clifton
parent 16aae3d209
commit 08903e087e
4 changed files with 281 additions and 435 deletions

View File

@ -1,3 +1,10 @@
2003-10-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
* config/mcore/mcore.c: Convert to ISO C90 function declarations
and definitions.
* config/mcore/mcore.h: Likewise.
* config/mcore/mcore-protos.h: Likewise.
2003-10-02 Richard Sandiford <rsandifo@redhat.com>
* config/frv/frv.c (frv_use_dfa_pipeline_interface): New function.

View File

@ -1,49 +1,49 @@
/* Prototypes for exported functions defined in mcore.c
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Nick Clifton (nickc@redhat.com)
This file is part of GCC.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
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. */
You should have received a copy of the GNU General Public License
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 const char * mcore_output_jump_label_table PARAMS ((void));
extern void mcore_expand_prolog PARAMS ((void));
extern void mcore_expand_epilog PARAMS ((void));
extern int mcore_const_ok_for_inline PARAMS ((long));
extern int mcore_num_ones PARAMS ((int));
extern int mcore_num_zeros PARAMS ((int));
extern int mcore_initial_elimination_offset PARAMS ((int, int));
extern int mcore_byte_offset PARAMS ((unsigned int));
extern int mcore_halfword_offset PARAMS ((unsigned int));
extern int mcore_const_trick_uses_not PARAMS ((long));
extern void mcore_override_options PARAMS ((void));
extern int mcore_dllexport_name_p PARAMS ((const char *));
extern int mcore_dllimport_name_p PARAMS ((const char *));
extern int mcore_naked_function_p PARAMS ((void));
extern const char * mcore_output_jump_label_table (void);
extern void mcore_expand_prolog (void);
extern void mcore_expand_epilog (void);
extern int mcore_const_ok_for_inline (long);
extern int mcore_num_ones (int);
extern int mcore_num_zeros (int);
extern int mcore_initial_elimination_offset (int, int);
extern int mcore_byte_offset (unsigned int);
extern int mcore_halfword_offset (unsigned int);
extern int mcore_const_trick_uses_not (long);
extern void mcore_override_options (void);
extern int mcore_dllexport_name_p (const char *);
extern int mcore_dllimport_name_p (const char *);
extern int mcore_naked_function_p (void);
#ifdef TREE_CODE
#ifdef HAVE_MACHINE_MODES
extern int mcore_function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int));
extern void mcore_setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int *));
extern int mcore_num_arg_regs PARAMS ((enum machine_mode, tree));
extern int mcore_must_pass_on_stack PARAMS ((enum machine_mode, tree));
extern int mcore_function_arg_partial_nregs (CUMULATIVE_ARGS, enum machine_mode, tree, int);
extern void mcore_setup_incoming_varargs (CUMULATIVE_ARGS, enum machine_mode, tree, int *);
extern int mcore_num_arg_regs (enum machine_mode, tree);
extern int mcore_must_pass_on_stack (enum machine_mode, tree);
#endif /* HAVE_MACHINE_MODES */
#ifdef RTX_CODE
extern rtx mcore_function_value PARAMS ((tree, tree));
extern rtx mcore_function_value (tree, tree);
#endif /* RTX_CODE */
#endif /* TREE_CODE */
@ -52,49 +52,49 @@ extern rtx mcore_function_value PARAMS ((tree, tree));
extern GTY(()) rtx arch_compare_op0;
extern GTY(()) rtx arch_compare_op1;
extern const char * mcore_output_bclri PARAMS ((rtx, int));
extern const char * mcore_output_bseti PARAMS ((rtx, int));
extern const char * mcore_output_cmov PARAMS ((rtx *, int, const char *));
extern char * mcore_output_call PARAMS ((rtx *, int));
extern int mcore_is_dead PARAMS ((rtx, rtx));
extern int mcore_expand_insv PARAMS ((rtx *));
extern int mcore_modify_comparison PARAMS ((RTX_CODE));
extern void mcore_expand_block_move PARAMS ((rtx, rtx, rtx *));
extern const char * mcore_output_andn PARAMS ((rtx, rtx *));
extern void mcore_print_operand_address PARAMS ((FILE *, rtx));
extern void mcore_print_operand PARAMS ((FILE *, rtx, int));
extern rtx mcore_gen_compare_reg PARAMS ((RTX_CODE));
extern int mcore_symbolic_address_p PARAMS ((rtx));
extern bool mcore_r15_operand_p PARAMS ((rtx));
extern enum reg_class mcore_secondary_reload_class PARAMS ((enum reg_class, enum machine_mode, rtx));
extern enum reg_class mcore_reload_class PARAMS ((rtx, enum reg_class));
extern int mcore_is_same_reg PARAMS ((rtx, rtx));
extern int mcore_arith_S_operand PARAMS ((rtx));
extern const char * mcore_output_bclri (rtx, int);
extern const char * mcore_output_bseti (rtx, int);
extern const char * mcore_output_cmov (rtx *, int, const char *);
extern char * mcore_output_call (rtx *, int);
extern int mcore_is_dead (rtx, rtx);
extern int mcore_expand_insv (rtx *);
extern int mcore_modify_comparison (RTX_CODE);
extern void mcore_expand_block_move (rtx, rtx, rtx *);
extern const char * mcore_output_andn (rtx, rtx *);
extern void mcore_print_operand_address (FILE *, rtx);
extern void mcore_print_operand (FILE *, rtx, int);
extern rtx mcore_gen_compare_reg (RTX_CODE);
extern int mcore_symbolic_address_p (rtx);
extern bool mcore_r15_operand_p (rtx);
extern enum reg_class mcore_secondary_reload_class (enum reg_class, enum machine_mode, rtx);
extern enum reg_class mcore_reload_class (rtx, enum reg_class);
extern int mcore_is_same_reg (rtx, rtx);
extern int mcore_arith_S_operand (rtx);
#ifdef HAVE_MACHINE_MODES
extern const char * mcore_output_move PARAMS ((rtx, rtx *, enum machine_mode));
extern const char * mcore_output_movedouble PARAMS ((rtx *, enum machine_mode));
extern int mcore_arith_reg_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_general_movsrc_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_general_movdst_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_reload_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_J_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_K_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_K_operand_not_0 PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_M_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_K_S_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_imm_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_any_imm_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_arith_O_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_literal_K_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_addsub_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_compare_operand PARAMS ((rtx, enum machine_mode));
extern int mcore_load_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int mcore_store_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int mcore_call_address_operand PARAMS ((rtx, enum machine_mode));
extern const char * mcore_output_move (rtx, rtx *, enum machine_mode);
extern const char * mcore_output_movedouble (rtx *, enum machine_mode);
extern int mcore_arith_reg_operand (rtx, enum machine_mode);
extern int mcore_general_movsrc_operand (rtx, enum machine_mode);
extern int mcore_general_movdst_operand (rtx, enum machine_mode);
extern int mcore_reload_operand (rtx, enum machine_mode);
extern int mcore_arith_J_operand (rtx, enum machine_mode);
extern int mcore_arith_K_operand (rtx, enum machine_mode);
extern int mcore_arith_K_operand_not_0 (rtx, enum machine_mode);
extern int mcore_arith_M_operand (rtx, enum machine_mode);
extern int mcore_arith_K_S_operand (rtx, enum machine_mode);
extern int mcore_arith_imm_operand (rtx, enum machine_mode);
extern int mcore_arith_any_imm_operand (rtx, enum machine_mode);
extern int mcore_arith_O_operand (rtx, enum machine_mode);
extern int mcore_literal_K_operand (rtx, enum machine_mode);
extern int mcore_addsub_operand (rtx, enum machine_mode);
extern int mcore_compare_operand (rtx, enum machine_mode);
extern int mcore_load_multiple_operation (rtx, enum machine_mode);
extern int mcore_store_multiple_operation (rtx, enum machine_mode);
extern int mcore_call_address_operand (rtx, enum machine_mode);
#ifdef TREE_CODE
extern rtx mcore_function_arg PARAMS ((CUMULATIVE_ARGS, enum machine_mode, tree, int));
extern rtx mcore_function_arg (CUMULATIVE_ARGS, enum machine_mode, tree, int);
#endif /* TREE_CODE */
#endif /* HAVE_MACHINE_MODES */
#endif /* RTX_CODE */

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@
while (0)
/* If -m4align is ever re-enabled then add this line to the definition of CPP_SPEC
%{!m4align:-D__MCORE_ALIGN_8__} %{m4align:-D__MCORE__ALIGN_4__} */
%{!m4align:-D__MCORE_ALIGN_8__} %{m4align:-D__MCORE__ALIGN_4__}. */
#undef CPP_SPEC
#define CPP_SPEC "%{m210:%{mlittle-endian:%ethe m210 does not have little endian support}}"
@ -78,16 +78,16 @@
many architecture specific files (other architectures...). */
extern int target_flags;
#define HARDLIT_BIT (1 << 0) /* Build in-line literals using 2 insns */
#define ALIGN8_BIT (1 << 1) /* Max alignment goes to 8 instead of 4 */
#define DIV_BIT (1 << 2) /* Generate divide instructions */
#define RELAX_IMM_BIT (1 << 3) /* Arbitrary immediates in and, or, tst */
#define W_FIELD_BIT (1 << 4) /* Generate bit insv/extv using SImode */
#define OVERALIGN_FUNC_BIT (1 << 5) /* Align functions to 4 byte boundary */
#define CGDATA_BIT (1 << 6) /* Generate callgraph data */
#define SLOW_BYTES_BIT (1 << 7) /* Slow byte access */
#define LITTLE_END_BIT (1 << 8) /* Generate little endian code */
#define M340_BIT (1 << 9) /* Generate code for the m340 */
#define HARDLIT_BIT (1 << 0) /* Build in-line literals using 2 insns. */
#define ALIGN8_BIT (1 << 1) /* Max alignment goes to 8 instead of 4. */
#define DIV_BIT (1 << 2) /* Generate divide instructions. */
#define RELAX_IMM_BIT (1 << 3) /* Arbitrary immediates in and, or, tst. */
#define W_FIELD_BIT (1 << 4) /* Generate bit insv/extv using SImode. */
#define OVERALIGN_FUNC_BIT (1 << 5) /* Align functions to 4 byte boundary. */
#define CGDATA_BIT (1 << 6) /* Generate callgraph data. */
#define SLOW_BYTES_BIT (1 << 7) /* Slow byte access. */
#define LITTLE_END_BIT (1 << 8) /* Generate little endian code. */
#define M340_BIT (1 << 9) /* Generate code for the m340. */
#define TARGET_DEFAULT \
(HARDLIT_BIT | ALIGN8_BIT | DIV_BIT | RELAX_IMM_BIT | M340_BIT | LITTLE_END_BIT)
@ -314,7 +314,7 @@ extern int mcore_stack_increment;
ap arg pointer (doesn't really exist, always eliminated)
c c bit
fp frame pointer (doesn't really exist, always eliminated)
x19 two control registers */
x19 two control registers. */
/* Number of actual hardware registers.
The hardware registers are assigned numbers for the compiler
@ -327,12 +327,12 @@ extern int mcore_stack_increment;
#define FIRST_PSEUDO_REGISTER 20
#define R1_REG 1 /* where literals are forced */
#define LK_REG 15 /* overloaded on general register */
#define AP_REG 16 /* fake arg pointer register */
/* RBE: mcore.md depends on CC_REG being set to 17 */
#define CC_REG 17 /* can't name it C_REG */
#define FP_REG 18 /* fake frame pointer register */
#define R1_REG 1 /* Where literals are forced. */
#define LK_REG 15 /* Overloaded on general register. */
#define AP_REG 16 /* Fake arg pointer register. */
/* RBE: mcore.md depends on CC_REG being set to 17. */
#define CC_REG 17 /* Can't name it C_REG. */
#define FP_REG 18 /* Fake frame pointer register. */
/* Specify the registers used for certain standard purposes.
The values of these macros are register numbers. */
@ -460,7 +460,7 @@ extern int mcore_stack_increment;
/* The MCore has only general registers. There are
also some special purpose registers: the T bit register, the
procedure Link and the Count Registers */
procedure Link and the Count Registers. */
enum reg_class
{
NO_REGS,
@ -625,14 +625,6 @@ extern const enum reg_class reg_class_from_letter[];
makes the stack pointer a smaller address. */
#define STACK_GROWS_DOWNWARD
/* Define this if the nominal address of the stack frame
is at the high-address end of the local variables;
that is, each additional local variable allocated
goes at a more negative offset in the frame. */
/* We don't define this, because the MCore does not support
addresses with negative offsets. */
/* #define FRAME_GROWS_DOWNWARD */
/* Offset within stack frame to start allocating local variables at.
If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
first local allocated. Otherwise, it is the offset to the BEGINNING
@ -669,18 +661,6 @@ extern const enum reg_class reg_class_from_letter[];
we want to retain compatibility with older gcc versions. */
#define DEFAULT_PCC_STRUCT_RETURN 0
/* how we are going to return big values */
/*
* #define RETURN_IN_MEMORY(TYPE) \
* (TYPE_MODE (TYPE) == BLKmode \
* || ((TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE(TYPE) == UNION_TYPE) \
* && !(TYPE_MODE (TYPE) == SImode \
* || (TYPE_MODE (TYPE) == BLKmode \
* && TYPE_ALIGN (TYPE) == BITS_PER_WORD \
* && int_size_in_bytes (TYPE) == UNITS_PER_WORD))))
*/
/* How many registers to use for struct return. */
#define RETURN_IN_MEMORY(TYPE) (int_size_in_bytes (TYPE) > 2 * UNITS_PER_WORD)
@ -939,11 +919,6 @@ extern const enum reg_class reg_class_from_letter[];
for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table
to contain offsets from the address of the table.
Do not define this if the table should contain absolute addresses. */
/* #define CASE_VECTOR_PC_RELATIVE */
/* 'char' is signed by default. */
#define DEFAULT_SIGNED_CHAR 0
@ -1030,11 +1005,9 @@ extern const enum reg_class reg_class_from_letter[];
ASM_DECLARE_OBJECT_NAME and then switch back to the original section
afterwards. */
#define SWITCH_SECTION_FUNCTION \
static void switch_to_section PARAMS ((enum in_section, tree)); \
static void switch_to_section (enum in_section, tree); \
static void \
switch_to_section (section, decl) \
enum in_section section; \
tree decl; \
switch_to_section (enum in_section section, tree decl) \
{ \
switch (section) \
{ \