Commit 59f3507d by Nathanael Nerode

v850-c.c, [...]: Convert to ISO C90 function declarations and definitions.

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

From-SVN: r72102
parent c9034561
2003-10-04 Nathanael Nerode <neroden@gcc.gnu.org>
* config/v850/v850-c.c, config/v850/v850-protos.h, config/v850/v850.c:
Convert to ISO C90 function declarations and definitions.
2003-10-04 Zack Weinberg <zack@codesourcery.com> 2003-10-04 Zack Weinberg <zack@codesourcery.com>
* libfuncs.h * libfuncs.h
......
...@@ -34,15 +34,14 @@ Boston, MA 02111-1307, USA. */ ...@@ -34,15 +34,14 @@ Boston, MA 02111-1307, USA. */
#define streq(a,b) (strcmp (a, b) == 0) #define streq(a,b) (strcmp (a, b) == 0)
#endif #endif
static int pop_data_area PARAMS ((v850_data_area)); static int pop_data_area (v850_data_area);
static int push_data_area PARAMS ((v850_data_area)); static int push_data_area (v850_data_area);
static void mark_current_function_as_interrupt PARAMS ((void)); static void mark_current_function_as_interrupt (void);
/* Push a data area onto the stack. */ /* Push a data area onto the stack. */
static int static int
push_data_area (data_area) push_data_area (v850_data_area data_area)
v850_data_area data_area;
{ {
data_area_stack_element * elem; data_area_stack_element * elem;
...@@ -62,8 +61,7 @@ push_data_area (data_area) ...@@ -62,8 +61,7 @@ push_data_area (data_area)
/* Remove a data area from the stack. */ /* Remove a data area from the stack. */
static int static int
pop_data_area (data_area) pop_data_area (v850_data_area data_area)
v850_data_area data_area;
{ {
if (data_area_stack == NULL) if (data_area_stack == NULL)
warning ("#pragma GHS endXXXX found without previous startXXX"); warning ("#pragma GHS endXXXX found without previous startXXX");
...@@ -87,7 +85,7 @@ pop_data_area (data_area) ...@@ -87,7 +85,7 @@ pop_data_area (data_area)
/* Set the machine specific 'interrupt' attribute on the current function. */ /* Set the machine specific 'interrupt' attribute on the current function. */
static void static void
mark_current_function_as_interrupt () mark_current_function_as_interrupt (void)
{ {
tree name; tree name;
...@@ -113,8 +111,7 @@ mark_current_function_as_interrupt () ...@@ -113,8 +111,7 @@ mark_current_function_as_interrupt ()
/* Support for GHS pragmata. */ /* Support for GHS pragmata. */
void void
ghs_pragma_section (pfile) ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
int repeat; int repeat;
...@@ -193,8 +190,7 @@ ghs_pragma_section (pfile) ...@@ -193,8 +190,7 @@ ghs_pragma_section (pfile)
} }
void void
ghs_pragma_interrupt (pfile) ghs_pragma_interrupt (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
...@@ -205,8 +201,7 @@ ghs_pragma_interrupt (pfile) ...@@ -205,8 +201,7 @@ ghs_pragma_interrupt (pfile)
} }
void void
ghs_pragma_starttda (pfile) ghs_pragma_starttda (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
...@@ -217,8 +212,7 @@ ghs_pragma_starttda (pfile) ...@@ -217,8 +212,7 @@ ghs_pragma_starttda (pfile)
} }
void void
ghs_pragma_startsda (pfile) ghs_pragma_startsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
...@@ -229,8 +223,7 @@ ghs_pragma_startsda (pfile) ...@@ -229,8 +223,7 @@ ghs_pragma_startsda (pfile)
} }
void void
ghs_pragma_startzda (pfile) ghs_pragma_startzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
...@@ -241,8 +234,7 @@ ghs_pragma_startzda (pfile) ...@@ -241,8 +234,7 @@ ghs_pragma_startzda (pfile)
} }
void void
ghs_pragma_endtda (pfile) ghs_pragma_endtda (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
...@@ -253,8 +245,7 @@ ghs_pragma_endtda (pfile) ...@@ -253,8 +245,7 @@ ghs_pragma_endtda (pfile)
} }
void void
ghs_pragma_endsda (pfile) ghs_pragma_endsda (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
...@@ -265,8 +256,7 @@ ghs_pragma_endsda (pfile) ...@@ -265,8 +256,7 @@ ghs_pragma_endsda (pfile)
} }
void void
ghs_pragma_endzda (pfile) ghs_pragma_endzda (cpp_reader * pfile ATTRIBUTE_UNUSED)
cpp_reader *pfile ATTRIBUTE_UNUSED;
{ {
tree x; tree x;
......
...@@ -25,75 +25,75 @@ ...@@ -25,75 +25,75 @@
#define Mmode enum machine_mode #define Mmode enum machine_mode
extern void expand_prologue PARAMS ((void)); extern void expand_prologue (void);
extern void expand_epilogue PARAMS ((void)); extern void expand_epilogue (void);
extern void sdata_section PARAMS ((void)); extern void sdata_section (void);
extern void rosdata_section PARAMS ((void)); extern void rosdata_section (void);
extern void sbss_section PARAMS ((void)); extern void sbss_section (void);
extern void tdata_section PARAMS ((void)); extern void tdata_section (void);
extern void zdata_section PARAMS ((void)); extern void zdata_section (void);
extern void rozdata_section PARAMS ((void)); extern void rozdata_section (void);
extern void zbss_section PARAMS ((void)); extern void zbss_section (void);
extern int v850_handle_pragma PARAMS ((int (*)(void), void (*)(int), char *)); extern int v850_handle_pragma (int (*)(void), void (*)(int), char *);
extern void override_options PARAMS ((void)); extern void override_options (void);
extern int compute_register_save_size PARAMS ((long *)); extern int compute_register_save_size (long *);
extern int compute_frame_size PARAMS ((int, long *)); extern int compute_frame_size (int, long *);
extern void v850_init_expanders PARAMS ((void)); extern void v850_init_expanders (void);
#ifdef RTX_CODE #ifdef RTX_CODE
extern int v850_output_addr_const_extra PARAMS ((FILE *, rtx)); extern int v850_output_addr_const_extra (FILE *, rtx);
extern rtx v850_return_addr PARAMS ((int)); extern rtx v850_return_addr (int);
extern void print_operand PARAMS ((FILE *, rtx, int )); extern void print_operand (FILE *, rtx, int );
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address (FILE *, rtx);
extern const char *output_move_double PARAMS ((rtx *)); extern const char *output_move_double (rtx *);
extern const char *output_move_single PARAMS ((rtx *)); extern const char *output_move_single (rtx *);
extern void notice_update_cc PARAMS ((rtx, rtx)); extern void notice_update_cc (rtx, rtx);
extern char * construct_save_jarl PARAMS ((rtx)); extern char * construct_save_jarl (rtx);
extern char * construct_restore_jr PARAMS ((rtx)); extern char * construct_restore_jr (rtx);
#ifdef HAVE_MACHINE_MODES #ifdef HAVE_MACHINE_MODES
extern int reg_or_int9_operand PARAMS ((rtx, Mmode)); extern int reg_or_int9_operand (rtx, Mmode);
extern int reg_or_const_operand PARAMS ((rtx, Mmode)); extern int reg_or_const_operand (rtx, Mmode);
extern char * construct_dispose_instruction PARAMS ((rtx)); extern char * construct_dispose_instruction (rtx);
extern char * construct_prepare_instruction PARAMS ((rtx)); extern char * construct_prepare_instruction (rtx);
extern int pattern_is_ok_for_prepare PARAMS ((rtx, Mmode)); extern int pattern_is_ok_for_prepare (rtx, Mmode);
extern int pattern_is_ok_for_dispose PARAMS ((rtx, Mmode)); extern int pattern_is_ok_for_dispose (rtx, Mmode);
extern int ep_memory_operand PARAMS ((rtx, Mmode, int)); extern int ep_memory_operand (rtx, Mmode, int);
extern int reg_or_0_operand PARAMS ((rtx, Mmode)); extern int reg_or_0_operand (rtx, Mmode);
extern int reg_or_int5_operand PARAMS ((rtx, Mmode)); extern int reg_or_int5_operand (rtx, Mmode);
extern int call_address_operand PARAMS ((rtx, Mmode)); extern int call_address_operand (rtx, Mmode);
extern int movsi_source_operand PARAMS ((rtx, Mmode)); extern int movsi_source_operand (rtx, Mmode);
extern int power_of_two_operand PARAMS ((rtx, Mmode)); extern int power_of_two_operand (rtx, Mmode);
extern int not_power_of_two_operand PARAMS ((rtx, Mmode)); extern int not_power_of_two_operand (rtx, Mmode);
extern int special_symbolref_operand PARAMS ((rtx, Mmode)); extern int special_symbolref_operand (rtx, Mmode);
extern int pattern_is_ok_for_prologue PARAMS ((rtx, Mmode)); extern int pattern_is_ok_for_prologue (rtx, Mmode);
extern int pattern_is_ok_for_epilogue PARAMS ((rtx, Mmode)); extern int pattern_is_ok_for_epilogue (rtx, Mmode);
extern int register_is_ok_for_epilogue PARAMS ((rtx, Mmode)); extern int register_is_ok_for_epilogue (rtx, Mmode);
#ifdef TREE_CODE #ifdef TREE_CODE
extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *, Mmode, tree, int)); extern rtx function_arg (CUMULATIVE_ARGS *, Mmode, tree, int);
extern rtx v850_va_arg PARAMS ((tree, tree)); extern rtx v850_va_arg (tree, tree);
#endif #endif
#endif #endif
#endif /* TREE_CODE */ #endif /* TREE_CODE */
#ifdef TREE_CODE #ifdef TREE_CODE
extern int v850_interrupt_function_p PARAMS ((tree)); extern int v850_interrupt_function_p (tree);
extern void v850_output_aligned_bss PARAMS ((FILE *, tree, const char *, int, int)); extern void v850_output_aligned_bss (FILE *, tree, const char *, int, int);
extern void v850_output_common PARAMS ((FILE *, tree, const char *, int, int)); extern void v850_output_common (FILE *, tree, const char *, int, int);
extern void v850_output_local PARAMS ((FILE *, tree, const char *, int, int)); extern void v850_output_local (FILE *, tree, const char *, int, int);
extern v850_data_area v850_get_data_area PARAMS ((tree)); extern v850_data_area v850_get_data_area (tree);
#ifdef HAVE_MACHINE_MODES #ifdef HAVE_MACHINE_MODES
extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *, Mmode, tree, int)); extern int function_arg_partial_nregs (CUMULATIVE_ARGS *, Mmode, tree, int);
#endif #endif
#endif #endif
extern void ghs_pragma_section PARAMS ((struct cpp_reader *)); extern void ghs_pragma_section (struct cpp_reader *);
extern void ghs_pragma_interrupt PARAMS ((struct cpp_reader *)); extern void ghs_pragma_interrupt (struct cpp_reader *);
extern void ghs_pragma_starttda PARAMS ((struct cpp_reader *)); extern void ghs_pragma_starttda (struct cpp_reader *);
extern void ghs_pragma_startsda PARAMS ((struct cpp_reader *)); extern void ghs_pragma_startsda (struct cpp_reader *);
extern void ghs_pragma_startzda PARAMS ((struct cpp_reader *)); extern void ghs_pragma_startzda (struct cpp_reader *);
extern void ghs_pragma_endtda PARAMS ((struct cpp_reader *)); extern void ghs_pragma_endtda (struct cpp_reader *);
extern void ghs_pragma_endsda PARAMS ((struct cpp_reader *)); extern void ghs_pragma_endsda (struct cpp_reader *);
extern void ghs_pragma_endzda PARAMS ((struct cpp_reader *)); extern void ghs_pragma_endzda (struct cpp_reader *);
#undef Mmode #undef Mmode
......
...@@ -49,21 +49,21 @@ ...@@ -49,21 +49,21 @@
#endif #endif
/* Function prototypes for stupid compilers: */ /* Function prototypes for stupid compilers: */
static void const_double_split PARAMS ((rtx, HOST_WIDE_INT *, HOST_WIDE_INT *)); static void const_double_split (rtx, HOST_WIDE_INT *, HOST_WIDE_INT *);
static int const_costs_int PARAMS ((HOST_WIDE_INT, int)); static int const_costs_int (HOST_WIDE_INT, int);
static int const_costs PARAMS ((rtx, enum rtx_code)); static int const_costs (rtx, enum rtx_code);
static bool v850_rtx_costs PARAMS ((rtx, int, int, int *)); static bool v850_rtx_costs (rtx, int, int, int *);
static void substitute_ep_register PARAMS ((rtx, rtx, int, int, rtx *, rtx *)); static void substitute_ep_register (rtx, rtx, int, int, rtx *, rtx *);
static void v850_reorg PARAMS ((void)); static void v850_reorg (void);
static int ep_memory_offset PARAMS ((enum machine_mode, int)); static int ep_memory_offset (enum machine_mode, int);
static void v850_set_data_area PARAMS ((tree, v850_data_area)); static void v850_set_data_area (tree, v850_data_area);
const struct attribute_spec v850_attribute_table[]; const struct attribute_spec v850_attribute_table[];
static tree v850_handle_interrupt_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree v850_handle_interrupt_attribute (tree *, tree, tree, int, bool *);
static tree v850_handle_data_area_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree v850_handle_data_area_attribute (tree *, tree, tree, int, bool *);
static void v850_insert_attributes PARAMS ((tree, tree *)); static void v850_insert_attributes (tree, tree *);
static void v850_select_section PARAMS ((tree, int, unsigned HOST_WIDE_INT)); static void v850_select_section (tree, int, unsigned HOST_WIDE_INT);
static void v850_encode_data_area PARAMS ((tree, rtx)); static void v850_encode_data_area (tree, rtx);
static void v850_encode_section_info PARAMS ((tree, rtx, int)); static void v850_encode_section_info (tree, rtx, int);
/* Information about the various small memory areas. */ /* Information about the various small memory areas. */
struct small_memory_info small_memory[ (int)SMALL_MEMORY_max ] = struct small_memory_info small_memory[ (int)SMALL_MEMORY_max ] =
...@@ -128,10 +128,10 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -128,10 +128,10 @@ struct gcc_target targetm = TARGET_INITIALIZER;
`-O'. That is what `OPTIMIZATION_OPTIONS' is for. */ `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
void void
override_options () override_options (void)
{ {
int i; int i;
extern int atoi PARAMS ((const char *)); extern int atoi (const char *);
/* Parse -m{s,t,z}da=nnn switches */ /* Parse -m{s,t,z}da=nnn switches */
for (i = 0; i < (int)SMALL_MEMORY_max; i++) for (i = 0; i < (int)SMALL_MEMORY_max; i++)
...@@ -167,11 +167,10 @@ override_options () ...@@ -167,11 +167,10 @@ override_options ()
from a function. If the result is 0, the argument is pushed. */ from a function. If the result is 0, the argument is pushed. */
rtx rtx
function_arg (cum, mode, type, named) function_arg (CUMULATIVE_ARGS * cum,
CUMULATIVE_ARGS *cum; enum machine_mode mode,
enum machine_mode mode; tree type,
tree type; int named)
int named;
{ {
rtx result = 0; rtx result = 0;
int size, align; int size, align;
...@@ -227,11 +226,10 @@ function_arg (cum, mode, type, named) ...@@ -227,11 +226,10 @@ function_arg (cum, mode, type, named)
for values which are part in registers and part in memory. */ for values which are part in registers and part in memory. */
int int
function_arg_partial_nregs (cum, mode, type, named) function_arg_partial_nregs (CUMULATIVE_ARGS * cum,
CUMULATIVE_ARGS *cum; enum machine_mode mode,
enum machine_mode mode; tree type,
tree type; int named)
int named;
{ {
int size, align; int size, align;
...@@ -267,10 +265,7 @@ function_arg_partial_nregs (cum, mode, type, named) ...@@ -267,10 +265,7 @@ function_arg_partial_nregs (cum, mode, type, named)
/* Return the high and low words of a CONST_DOUBLE */ /* Return the high and low words of a CONST_DOUBLE */
static void static void
const_double_split (x, p_high, p_low) const_double_split (rtx x, HOST_WIDE_INT * p_high, HOST_WIDE_INT * p_low)
rtx x;
HOST_WIDE_INT *p_high;
HOST_WIDE_INT *p_low;
{ {
if (GET_CODE (x) == CONST_DOUBLE) if (GET_CODE (x) == CONST_DOUBLE)
{ {
...@@ -310,9 +305,7 @@ const_double_split (x, p_high, p_low) ...@@ -310,9 +305,7 @@ const_double_split (x, p_high, p_low)
/* Return the cost of the rtx R with code CODE. */ /* Return the cost of the rtx R with code CODE. */
static int static int
const_costs_int (value, zero_cost) const_costs_int (HOST_WIDE_INT value, int zero_cost)
HOST_WIDE_INT value;
int zero_cost;
{ {
if (CONST_OK_FOR_I (value)) if (CONST_OK_FOR_I (value))
return zero_cost; return zero_cost;
...@@ -325,9 +318,7 @@ const_costs_int (value, zero_cost) ...@@ -325,9 +318,7 @@ const_costs_int (value, zero_cost)
} }
static int static int
const_costs (r, c) const_costs (rtx r, enum rtx_code c)
rtx r;
enum rtx_code c;
{ {
HOST_WIDE_INT high, low; HOST_WIDE_INT high, low;
...@@ -357,9 +348,10 @@ const_costs (r, c) ...@@ -357,9 +348,10 @@ const_costs (r, c)
} }
static bool static bool
v850_rtx_costs (x, code, outer_code, total) v850_rtx_costs (rtx x,
rtx x; int code,
int code, outer_code ATTRIBUTE_UNUSED, *total; int outer_code ATTRIBUTE_UNUSED,
int * total)
{ {
switch (code) switch (code)
{ {
...@@ -410,10 +402,7 @@ v850_rtx_costs (x, code, outer_code, total) ...@@ -410,10 +402,7 @@ v850_rtx_costs (x, code, outer_code, total)
FILE. */ FILE. */
void void
print_operand (file, x, code) print_operand (FILE * file, rtx x, int code)
FILE *file;
rtx x;
int code;
{ {
HOST_WIDE_INT high, low; HOST_WIDE_INT high, low;
...@@ -643,9 +632,7 @@ print_operand (file, x, code) ...@@ -643,9 +632,7 @@ print_operand (file, x, code)
/* Output assembly language output for the address ADDR to FILE. */ /* Output assembly language output for the address ADDR to FILE. */
void void
print_operand_address (file, addr) print_operand_address (FILE * file, rtx addr)
FILE *file;
rtx addr;
{ {
switch (GET_CODE (addr)) switch (GET_CODE (addr))
{ {
...@@ -757,9 +744,7 @@ print_operand_address (file, addr) ...@@ -757,9 +744,7 @@ print_operand_address (file, addr)
Returns 1 if rtx was handled, 0 otherwise. */ Returns 1 if rtx was handled, 0 otherwise. */
int int
v850_output_addr_const_extra (file, x) v850_output_addr_const_extra (FILE * file, rtx x)
FILE * file;
rtx x;
{ {
if (GET_CODE (x) != TRUNCATE) if (GET_CODE (x) != TRUNCATE)
return 0; return 0;
...@@ -785,8 +770,7 @@ v850_output_addr_const_extra (file, x) ...@@ -785,8 +770,7 @@ v850_output_addr_const_extra (file, x)
point value. */ point value. */
const char * const char *
output_move_single (operands) output_move_single (rtx * operands)
rtx *operands;
{ {
rtx dst = operands[0]; rtx dst = operands[0];
rtx src = operands[1]; rtx src = operands[1];
...@@ -888,8 +872,7 @@ output_move_single (operands) ...@@ -888,8 +872,7 @@ output_move_single (operands)
floating point value */ floating point value */
const char * const char *
output_move_double (operands) output_move_double (rtx * operands)
rtx *operands;
{ {
enum machine_mode mode = GET_MODE (operands[0]); enum machine_mode mode = GET_MODE (operands[0]);
rtx dst = operands[0]; rtx dst = operands[0];
...@@ -967,9 +950,7 @@ output_move_double (operands) ...@@ -967,9 +950,7 @@ output_move_double (operands)
MODE and signedness UNSIGNEDP. */ MODE and signedness UNSIGNEDP. */
static int static int
ep_memory_offset (mode, unsignedp) ep_memory_offset (enum machine_mode mode, int unsignedp ATTRIBUTE_UNUSED)
enum machine_mode mode;
int ATTRIBUTE_UNUSED unsignedp;
{ {
int max_offset = 0; int max_offset = 0;
...@@ -1012,10 +993,7 @@ ep_memory_offset (mode, unsignedp) ...@@ -1012,10 +993,7 @@ ep_memory_offset (mode, unsignedp)
/* Return true if OP is a valid short EP memory reference */ /* Return true if OP is a valid short EP memory reference */
int int
ep_memory_operand (op, mode, unsigned_load) ep_memory_operand (rtx op, enum machine_mode mode, int unsigned_load)
rtx op;
enum machine_mode mode;
int unsigned_load;
{ {
rtx addr, op0, op1; rtx addr, op0, op1;
int max_offset; int max_offset;
...@@ -1066,9 +1044,7 @@ ep_memory_operand (op, mode, unsigned_load) ...@@ -1066,9 +1044,7 @@ ep_memory_operand (op, mode, unsigned_load)
/* Return true if OP is either a register or 0 */ /* Return true if OP is either a register or 0 */
int int
reg_or_0_operand (op, mode) reg_or_0_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
return INTVAL (op) == 0; return INTVAL (op) == 0;
...@@ -1083,9 +1059,7 @@ reg_or_0_operand (op, mode) ...@@ -1083,9 +1059,7 @@ reg_or_0_operand (op, mode)
/* Return true if OP is either a register or a signed five bit integer */ /* Return true if OP is either a register or a signed five bit integer */
int int
reg_or_int5_operand (op, mode) reg_or_int5_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
return CONST_OK_FOR_J (INTVAL (op)); return CONST_OK_FOR_J (INTVAL (op));
...@@ -1097,9 +1071,7 @@ reg_or_int5_operand (op, mode) ...@@ -1097,9 +1071,7 @@ reg_or_int5_operand (op, mode)
/* Return true if OP is either a register or a signed nine bit integer. */ /* Return true if OP is either a register or a signed nine bit integer. */
int int
reg_or_int9_operand (op, mode) reg_or_int9_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
return CONST_OK_FOR_O (INTVAL (op)); return CONST_OK_FOR_O (INTVAL (op));
...@@ -1110,9 +1082,7 @@ reg_or_int9_operand (op, mode) ...@@ -1110,9 +1082,7 @@ reg_or_int9_operand (op, mode)
/* Return true if OP is either a register or a const integer. */ /* Return true if OP is either a register or a const integer. */
int int
reg_or_const_operand (op, mode) reg_or_const_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == CONST_INT) if (GET_CODE (op) == CONST_INT)
return TRUE; return TRUE;
...@@ -1123,9 +1093,7 @@ reg_or_const_operand (op, mode) ...@@ -1123,9 +1093,7 @@ reg_or_const_operand (op, mode)
/* Return true if OP is a valid call operand. */ /* Return true if OP is a valid call operand. */
int int
call_address_operand (op, mode) call_address_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode ATTRIBUTE_UNUSED mode;
{ {
/* Only registers are valid call operands if TARGET_LONG_CALLS. */ /* Only registers are valid call operands if TARGET_LONG_CALLS. */
if (TARGET_LONG_CALLS) if (TARGET_LONG_CALLS)
...@@ -1134,9 +1102,7 @@ call_address_operand (op, mode) ...@@ -1134,9 +1102,7 @@ call_address_operand (op, mode)
} }
int int
special_symbolref_operand (op, mode) special_symbolref_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode ATTRIBUTE_UNUSED mode;
{ {
if (GET_CODE (op) == CONST if (GET_CODE (op) == CONST
&& GET_CODE (XEXP (op, 0)) == PLUS && GET_CODE (XEXP (op, 0)) == PLUS
...@@ -1152,9 +1118,7 @@ special_symbolref_operand (op, mode) ...@@ -1152,9 +1118,7 @@ special_symbolref_operand (op, mode)
} }
int int
movsi_source_operand (op, mode) movsi_source_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
/* Some constants, as well as symbolic operands /* Some constants, as well as symbolic operands
must be done with HIGH & LO_SUM patterns. */ must be done with HIGH & LO_SUM patterns. */
...@@ -1171,9 +1135,7 @@ movsi_source_operand (op, mode) ...@@ -1171,9 +1135,7 @@ movsi_source_operand (op, mode)
} }
int int
power_of_two_operand (op, mode) power_of_two_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode ATTRIBUTE_UNUSED mode;
{ {
if (GET_CODE (op) != CONST_INT) if (GET_CODE (op) != CONST_INT)
return 0; return 0;
...@@ -1184,9 +1146,7 @@ power_of_two_operand (op, mode) ...@@ -1184,9 +1146,7 @@ power_of_two_operand (op, mode)
} }
int int
not_power_of_two_operand (op, mode) not_power_of_two_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
unsigned int mask; unsigned int mask;
...@@ -1212,13 +1172,12 @@ not_power_of_two_operand (op, mode) ...@@ -1212,13 +1172,12 @@ not_power_of_two_operand (op, mode)
taking care to save and preserve the ep. */ taking care to save and preserve the ep. */
static void static void
substitute_ep_register (first_insn, last_insn, uses, regno, p_r1, p_ep) substitute_ep_register (rtx first_insn,
rtx first_insn; rtx last_insn,
rtx last_insn; int uses,
int uses; int regno,
int regno; rtx * p_r1,
rtx *p_r1; rtx * p_ep)
rtx *p_ep;
{ {
rtx reg = gen_rtx_REG (Pmode, regno); rtx reg = gen_rtx_REG (Pmode, regno);
rtx insn; rtx insn;
...@@ -1321,7 +1280,7 @@ Saved %d bytes (%d uses of register %s) in function %s, starting as insn %d, end ...@@ -1321,7 +1280,7 @@ Saved %d bytes (%d uses of register %s) in function %s, starting as insn %d, end
addressing. */ addressing. */
static void static void
v850_reorg () v850_reorg (void)
{ {
struct struct
{ {
...@@ -1546,8 +1505,7 @@ v850_reorg () ...@@ -1546,8 +1505,7 @@ v850_reorg ()
#define INTERRUPT_ALL_SAVE_SIZE (4 * INTERRUPT_ALL_SAVE_NUM) #define INTERRUPT_ALL_SAVE_SIZE (4 * INTERRUPT_ALL_SAVE_NUM)
int int
compute_register_save_size (p_reg_saved) compute_register_save_size (long * p_reg_saved)
long *p_reg_saved;
{ {
int size = 0; int size = 0;
int i; int i;
...@@ -1651,9 +1609,7 @@ compute_register_save_size (p_reg_saved) ...@@ -1651,9 +1609,7 @@ compute_register_save_size (p_reg_saved)
} }
int int
compute_frame_size (size, p_reg_saved) compute_frame_size (int size, long * p_reg_saved)
int size;
long *p_reg_saved;
{ {
return (size return (size
+ compute_register_save_size (p_reg_saved) + compute_register_save_size (p_reg_saved)
...@@ -1662,7 +1618,7 @@ compute_frame_size (size, p_reg_saved) ...@@ -1662,7 +1618,7 @@ compute_frame_size (size, p_reg_saved)
void void
expand_prologue () expand_prologue (void)
{ {
unsigned int i; unsigned int i;
int offset; int offset;
...@@ -1884,7 +1840,7 @@ Saved %d bytes via prologue function (%d vs. %d) for function %s\n", ...@@ -1884,7 +1840,7 @@ Saved %d bytes via prologue function (%d vs. %d) for function %s\n",
void void
expand_epilogue () expand_epilogue (void)
{ {
unsigned int i; unsigned int i;
int offset; int offset;
...@@ -2111,9 +2067,7 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n", ...@@ -2111,9 +2067,7 @@ Saved %d bytes via epilogue function (%d vs. %d) in function %s\n",
/* Update the condition code from the insn. */ /* Update the condition code from the insn. */
void void
notice_update_cc (body, insn) notice_update_cc (rtx body, rtx insn)
rtx body;
rtx insn;
{ {
switch (get_attr_cc (insn)) switch (get_attr_cc (insn))
{ {
...@@ -2160,8 +2114,7 @@ notice_update_cc (body, insn) ...@@ -2160,8 +2114,7 @@ notice_update_cc (body, insn)
/* Retrieve the data area that has been chosen for the given decl. */ /* Retrieve the data area that has been chosen for the given decl. */
v850_data_area v850_data_area
v850_get_data_area (decl) v850_get_data_area (tree decl)
tree decl;
{ {
if (lookup_attribute ("sda", DECL_ATTRIBUTES (decl)) != NULL_TREE) if (lookup_attribute ("sda", DECL_ATTRIBUTES (decl)) != NULL_TREE)
return DATA_AREA_SDA; return DATA_AREA_SDA;
...@@ -2178,9 +2131,7 @@ v850_get_data_area (decl) ...@@ -2178,9 +2131,7 @@ v850_get_data_area (decl)
/* Store the indicated data area in the decl's attributes. */ /* Store the indicated data area in the decl's attributes. */
static void static void
v850_set_data_area (decl, data_area) v850_set_data_area (tree decl, v850_data_area data_area)
tree decl;
v850_data_area data_area;
{ {
tree name; tree name;
...@@ -2211,12 +2162,11 @@ const struct attribute_spec v850_attribute_table[] = ...@@ -2211,12 +2162,11 @@ const struct attribute_spec v850_attribute_table[] =
/* Handle an "interrupt" attribute; arguments as in /* Handle an "interrupt" attribute; arguments as in
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
v850_handle_interrupt_attribute (node, name, args, flags, no_add_attrs) v850_handle_interrupt_attribute (tree * node,
tree *node; tree name,
tree name; tree args ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED; int flags ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED; bool * no_add_attrs)
bool *no_add_attrs;
{ {
if (TREE_CODE (*node) != FUNCTION_DECL) if (TREE_CODE (*node) != FUNCTION_DECL)
{ {
...@@ -2231,12 +2181,11 @@ v850_handle_interrupt_attribute (node, name, args, flags, no_add_attrs) ...@@ -2231,12 +2181,11 @@ v850_handle_interrupt_attribute (node, name, args, flags, no_add_attrs)
/* Handle a "sda", "tda" or "zda" attribute; arguments as in /* Handle a "sda", "tda" or "zda" attribute; arguments as in
struct attribute_spec.handler. */ struct attribute_spec.handler. */
static tree static tree
v850_handle_data_area_attribute (node, name, args, flags, no_add_attrs) v850_handle_data_area_attribute (tree* node,
tree *node; tree name,
tree name; tree args ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED; int flags ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED; bool * no_add_attrs)
bool *no_add_attrs;
{ {
v850_data_area data_area; v850_data_area data_area;
v850_data_area area; v850_data_area area;
...@@ -2286,8 +2235,7 @@ v850_handle_data_area_attribute (node, name, args, flags, no_add_attrs) ...@@ -2286,8 +2235,7 @@ v850_handle_data_area_attribute (node, name, args, flags, no_add_attrs)
by the "interrupt" attribute. */ by the "interrupt" attribute. */
int int
v850_interrupt_function_p (func) v850_interrupt_function_p (tree func)
tree func;
{ {
tree a; tree a;
int ret = 0; int ret = 0;
...@@ -2318,9 +2266,7 @@ v850_interrupt_function_p (func) ...@@ -2318,9 +2266,7 @@ v850_interrupt_function_p (func)
static void static void
v850_encode_data_area (decl, symbol) v850_encode_data_area (tree decl, rtx symbol)
tree decl;
rtx symbol;
{ {
int flags; int flags;
...@@ -2374,10 +2320,7 @@ v850_encode_data_area (decl, symbol) ...@@ -2374,10 +2320,7 @@ v850_encode_data_area (decl, symbol)
} }
static void static void
v850_encode_section_info (decl, rtl, first) v850_encode_section_info (tree decl, rtx rtl, int first)
tree decl;
rtx rtl;
int first;
{ {
default_encode_section_info (decl, rtl, first); default_encode_section_info (decl, rtl, first);
...@@ -2389,9 +2332,7 @@ v850_encode_section_info (decl, rtl, first) ...@@ -2389,9 +2332,7 @@ v850_encode_section_info (decl, rtl, first)
/* Return true if the given RTX is a register which can be restored /* Return true if the given RTX is a register which can be restored
by a function epilogue. */ by a function epilogue. */
int int
register_is_ok_for_epilogue (op, mode) register_is_ok_for_epilogue (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode ATTRIBUTE_UNUSED mode;
{ {
/* The save/restore routines can only cope with registers 20 - 31. */ /* The save/restore routines can only cope with registers 20 - 31. */
return ((GET_CODE (op) == REG) return ((GET_CODE (op) == REG)
...@@ -2401,9 +2342,7 @@ register_is_ok_for_epilogue (op, mode) ...@@ -2401,9 +2342,7 @@ register_is_ok_for_epilogue (op, mode)
/* Return nonzero if the given RTX is suitable for collapsing into /* Return nonzero if the given RTX is suitable for collapsing into
jump to a function epilogue. */ jump to a function epilogue. */
int int
pattern_is_ok_for_epilogue (op, mode) pattern_is_ok_for_epilogue (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode ATTRIBUTE_UNUSED mode;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int i; int i;
...@@ -2465,8 +2404,7 @@ pattern_is_ok_for_epilogue (op, mode) ...@@ -2465,8 +2404,7 @@ pattern_is_ok_for_epilogue (op, mode)
as well. The code has already verified that the RTL matches these as well. The code has already verified that the RTL matches these
requirements. */ requirements. */
char * char *
construct_restore_jr (op) construct_restore_jr (rtx op)
rtx op;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int stack_bytes; int stack_bytes;
...@@ -2580,9 +2518,7 @@ construct_restore_jr (op) ...@@ -2580,9 +2518,7 @@ construct_restore_jr (op)
/* Return nonzero if the given RTX is suitable for collapsing into /* Return nonzero if the given RTX is suitable for collapsing into
a jump to a function prologue. */ a jump to a function prologue. */
int int
pattern_is_ok_for_prologue (op, mode) pattern_is_ok_for_prologue (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode ATTRIBUTE_UNUSED mode;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int i; int i;
...@@ -2668,8 +2604,7 @@ pattern_is_ok_for_prologue (op, mode) ...@@ -2668,8 +2604,7 @@ pattern_is_ok_for_prologue (op, mode)
some stack space as well. The code has already verified that the RTL some stack space as well. The code has already verified that the RTL
matches these requirements. */ matches these requirements. */
char * char *
construct_save_jarl (op) construct_save_jarl (rtx op)
rtx op;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int stack_bytes; int stack_bytes;
...@@ -2788,12 +2723,11 @@ extern int size_directive_output; ...@@ -2788,12 +2723,11 @@ extern int size_directive_output;
/* A version of asm_output_aligned_bss() that copes with the special /* A version of asm_output_aligned_bss() that copes with the special
data areas of the v850. */ data areas of the v850. */
void void
v850_output_aligned_bss (file, decl, name, size, align) v850_output_aligned_bss (FILE * file,
FILE * file; tree decl,
tree decl; const char * name,
const char * name; int size,
int size; int align)
int align;
{ {
switch (v850_get_data_area (decl)) switch (v850_get_data_area (decl))
{ {
...@@ -2826,12 +2760,11 @@ v850_output_aligned_bss (file, decl, name, size, align) ...@@ -2826,12 +2760,11 @@ v850_output_aligned_bss (file, decl, name, size, align)
/* Called via the macro ASM_OUTPUT_DECL_COMMON */ /* Called via the macro ASM_OUTPUT_DECL_COMMON */
void void
v850_output_common (file, decl, name, size, align) v850_output_common (FILE * file,
FILE * file; tree decl,
tree decl; const char * name,
const char * name; int size,
int size; int align)
int align;
{ {
if (decl == NULL_TREE) if (decl == NULL_TREE)
{ {
...@@ -2865,12 +2798,11 @@ v850_output_common (file, decl, name, size, align) ...@@ -2865,12 +2798,11 @@ v850_output_common (file, decl, name, size, align)
/* Called via the macro ASM_OUTPUT_DECL_LOCAL */ /* Called via the macro ASM_OUTPUT_DECL_LOCAL */
void void
v850_output_local (file, decl, name, size, align) v850_output_local (FILE * file,
FILE * file; tree decl,
tree decl; const char * name,
const char * name; int size,
int size; int align)
int align;
{ {
fprintf (file, "%s", LOCAL_ASM_OP); fprintf (file, "%s", LOCAL_ASM_OP);
assemble_name (file, name); assemble_name (file, name);
...@@ -2882,9 +2814,7 @@ v850_output_local (file, decl, name, size, align) ...@@ -2882,9 +2814,7 @@ v850_output_local (file, decl, name, size, align)
/* Add data area to the given declaration if a ghs data area pragma is /* Add data area to the given declaration if a ghs data area pragma is
currently in effect (#pragma ghs startXXX/endXXX). */ currently in effect (#pragma ghs startXXX/endXXX). */
static void static void
v850_insert_attributes (decl, attr_ptr) v850_insert_attributes (tree decl, tree * attr_ptr ATTRIBUTE_UNUSED )
tree decl;
tree *attr_ptr ATTRIBUTE_UNUSED;
{ {
if (data_area_stack if (data_area_stack
&& data_area_stack->data_area && data_area_stack->data_area
...@@ -2983,9 +2913,7 @@ v850_insert_attributes (decl, attr_ptr) ...@@ -2983,9 +2913,7 @@ v850_insert_attributes (decl, attr_ptr)
for collapsing into a DISPOSE instruction. */ for collapsing into a DISPOSE instruction. */
int int
pattern_is_ok_for_dispose (op, mode) pattern_is_ok_for_dispose (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int i; int i;
...@@ -3047,8 +2975,7 @@ pattern_is_ok_for_dispose (op, mode) ...@@ -3047,8 +2975,7 @@ pattern_is_ok_for_dispose (op, mode)
be possible. */ be possible. */
char * char *
construct_dispose_instruction (op) construct_dispose_instruction (rtx op)
rtx op;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int stack_bytes; int stack_bytes;
...@@ -3173,9 +3100,7 @@ construct_dispose_instruction (op) ...@@ -3173,9 +3100,7 @@ construct_dispose_instruction (op)
for collapsing into a PREPARE instruction. */ for collapsing into a PREPARE instruction. */
int int
pattern_is_ok_for_prepare (op, mode) pattern_is_ok_for_prepare (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int i; int i;
...@@ -3245,8 +3170,7 @@ pattern_is_ok_for_prepare (op, mode) ...@@ -3245,8 +3170,7 @@ pattern_is_ok_for_prepare (op, mode)
be possible. */ be possible. */
char * char *
construct_prepare_instruction (op) construct_prepare_instruction (rtx op)
rtx op;
{ {
int count = XVECLEN (op, 0); int count = XVECLEN (op, 0);
int stack_bytes; int stack_bytes;
...@@ -3368,8 +3292,7 @@ construct_prepare_instruction (op) ...@@ -3368,8 +3292,7 @@ construct_prepare_instruction (op)
/* Implement `va_arg'. */ /* Implement `va_arg'. */
rtx rtx
v850_va_arg (valist, type) v850_va_arg (tree valist, tree type)
tree valist, type;
{ {
HOST_WIDE_INT size, rsize; HOST_WIDE_INT size, rsize;
tree addr, incr; tree addr, incr;
...@@ -3411,8 +3334,7 @@ v850_va_arg (valist, type) ...@@ -3411,8 +3334,7 @@ v850_va_arg (valist, type)
calling function can be found. */ calling function can be found. */
rtx rtx
v850_return_addr (count) v850_return_addr (int count)
int count;
{ {
if (count != 0) if (count != 0)
return const0_rtx; return const0_rtx;
...@@ -3421,10 +3343,9 @@ v850_return_addr (count) ...@@ -3421,10 +3343,9 @@ v850_return_addr (count)
} }
static void static void
v850_select_section (exp, reloc, align) v850_select_section (tree exp,
tree exp; int reloc ATTRIBUTE_UNUSED,
int reloc ATTRIBUTE_UNUSED; unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED)
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{ {
if (TREE_CODE (exp) == VAR_DECL) if (TREE_CODE (exp) == VAR_DECL)
{ {
......
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