Commit bfb26edd by Kazu Hirata Committed by Kazu Hirata

* config/ns32k/ns32k.c: Convert to ISO-C.

From-SVN: r74989
parent 692fb023
2003-12-23 Kazu Hirata <kazu@cs.umass.edu>
* config/ns32k/ns32k.c: Convert to ISO-C.
2003-12-23 Zack Weinberg <zack@codesourcery.com> 2003-12-23 Zack Weinberg <zack@codesourcery.com>
* config/ia64/ia64.c (ia64_va_arg): Pass pointer for * config/ia64/ia64.c (ia64_va_arg): Pass pointer for
......
...@@ -150,9 +150,7 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -150,9 +150,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
#endif #endif
static void static void
ns32k_output_function_prologue (file, size) ns32k_output_function_prologue (FILE *file, HOST_WIDE_INT size)
FILE *file;
HOST_WIDE_INT size;
{ {
register int regno, g_regs_used = 0; register int regno, g_regs_used = 0;
int used_regs_buf[8], *bufp = used_regs_buf; int used_regs_buf[8], *bufp = used_regs_buf;
...@@ -330,9 +328,7 @@ ns32k_output_function_prologue (file, size) ...@@ -330,9 +328,7 @@ ns32k_output_function_prologue (file, size)
#if !defined (MERLIN_TARGET) && !defined (UTEK_ASM) #if !defined (MERLIN_TARGET) && !defined (UTEK_ASM)
static void static void
ns32k_output_function_epilogue (file, size) ns32k_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
FILE *file;
HOST_WIDE_INT size;
{ {
register int regno, g_regs_used = 0, f_regs_used = 0; register int regno, g_regs_used = 0, f_regs_used = 0;
int used_regs_buf[8], *bufp = used_regs_buf; int used_regs_buf[8], *bufp = used_regs_buf;
...@@ -472,9 +468,7 @@ ns32k_output_function_epilogue (file, size) ...@@ -472,9 +468,7 @@ ns32k_output_function_epilogue (file, size)
/* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */ /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. */
int int
hard_regno_mode_ok (regno, mode) hard_regno_mode_ok (int regno, enum machine_mode mode)
int regno;
enum machine_mode mode;
{ {
int size = GET_MODE_UNIT_SIZE (mode); int size = GET_MODE_UNIT_SIZE (mode);
...@@ -498,10 +492,7 @@ hard_regno_mode_ok (regno, mode) ...@@ -498,10 +492,7 @@ hard_regno_mode_ok (regno, mode)
} }
static bool static bool
ns32k_rtx_costs (x, code, outer_code, total) ns32k_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total)
rtx x;
int code, outer_code ATTRIBUTE_UNUSED;
int *total;
{ {
switch (code) switch (code)
{ {
...@@ -529,9 +520,8 @@ ns32k_rtx_costs (x, code, outer_code, total) ...@@ -529,9 +520,8 @@ ns32k_rtx_costs (x, code, outer_code, total)
} }
} }
int register_move_cost (CLASS1, CLASS2) int
enum reg_class CLASS1; register_move_cost (enum reg_class CLASS1, enum reg_class CLASS2)
enum reg_class CLASS2;
{ {
if (CLASS1 == NO_REGS || CLASS2 == NO_REGS) if (CLASS1 == NO_REGS || CLASS2 == NO_REGS)
return 2; return 2;
...@@ -550,10 +540,10 @@ int register_move_cost (CLASS1, CLASS2) ...@@ -550,10 +540,10 @@ int register_move_cost (CLASS1, CLASS2)
#if 0 #if 0
/* We made the insn definitions copy from floating point to general /* We made the insn definitions copy from floating point to general
registers via the stack. */ registers via the stack. */
int secondary_memory_needed (CLASS1, CLASS2, M) int
enum reg_class CLASS1; secondary_memory_needed (enum reg_class CLASS1,
enum reg_class CLASS2; enum reg_class CLASS2,
enum machine_mode M; enum machine_mode M)
{ {
int ret = ((SUBSET_P (CLASS1, FP_REGS) && !SUBSET_P (CLASS2, FP_REGS)) int ret = ((SUBSET_P (CLASS1, FP_REGS) && !SUBSET_P (CLASS2, FP_REGS))
|| (!SUBSET_P (CLASS1, FP_REGS) && SUBSET_P (CLASS2, FP_REGS))); || (!SUBSET_P (CLASS1, FP_REGS) && SUBSET_P (CLASS2, FP_REGS)));
...@@ -567,8 +557,7 @@ int secondary_memory_needed (CLASS1, CLASS2, M) ...@@ -567,8 +557,7 @@ int secondary_memory_needed (CLASS1, CLASS2, M)
the default. */ the default. */
static int static int
ns32k_address_cost (operand) ns32k_address_cost (rtx operand)
rtx operand;
{ {
int cost = 0; int cost = 0;
...@@ -623,10 +612,9 @@ ns32k_address_cost (operand) ...@@ -623,10 +612,9 @@ ns32k_address_cost (operand)
NO_REGS is returned. */ NO_REGS is returned. */
enum reg_class enum reg_class
secondary_reload_class (class, mode, in) secondary_reload_class (enum reg_class class,
enum reg_class class; enum machine_mode mode ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED; rtx in)
rtx in;
{ {
int regno = true_regnum (in); int regno = true_regnum (in);
...@@ -646,8 +634,7 @@ secondary_reload_class (class, mode, in) ...@@ -646,8 +634,7 @@ secondary_reload_class (class, mode, in)
multiplier (for MULT). */ multiplier (for MULT). */
static rtx static rtx
gen_indexed_expr (base, index, scale) gen_indexed_expr (rtx base, rtx index, rtx scale)
rtx base, index, scale;
{ {
rtx addr; rtx addr;
...@@ -669,10 +656,7 @@ gen_indexed_expr (base, index, scale) ...@@ -669,10 +656,7 @@ gen_indexed_expr (base, index, scale)
that parallel "operands". */ that parallel "operands". */
void void
split_di (operands, num, lo_half, hi_half) split_di (rtx operands[], int num, rtx lo_half[], rtx hi_half[])
rtx operands[];
int num;
rtx lo_half[], hi_half[];
{ {
while (num--) while (num--)
{ {
...@@ -699,8 +683,7 @@ split_di (operands, num, lo_half, hi_half) ...@@ -699,8 +683,7 @@ split_di (operands, num, lo_half, hi_half)
for moving operands[1] into operands[0] as a fullword. */ for moving operands[1] into operands[0] as a fullword. */
static const char * static const char *
singlemove_string (operands) singlemove_string (rtx *operands)
rtx *operands;
{ {
if (GET_CODE (operands[1]) == CONST_INT if (GET_CODE (operands[1]) == CONST_INT
&& INTVAL (operands[1]) <= 7 && INTVAL (operands[1]) <= 7
...@@ -710,8 +693,7 @@ singlemove_string (operands) ...@@ -710,8 +693,7 @@ singlemove_string (operands)
} }
const char * const char *
output_move_double (operands) output_move_double (rtx *operands)
rtx *operands;
{ {
enum anon1 { REGOP, OFFSOP, PUSHOP, CNSTOP, RNDOP } optype0, optype1; enum anon1 { REGOP, OFFSOP, PUSHOP, CNSTOP, RNDOP } optype0, optype1;
rtx latehalf[2]; rtx latehalf[2];
...@@ -849,10 +831,7 @@ output_move_double (operands) ...@@ -849,10 +831,7 @@ output_move_double (operands)
operands[3] is the alignment. */ operands[3] is the alignment. */
static void static void
move_tail (operands, bytes, offset) move_tail (rtx operands[], int bytes, int offset)
rtx operands[];
int bytes;
int offset;
{ {
if (bytes & 2) if (bytes & 2)
{ {
...@@ -866,8 +845,7 @@ move_tail (operands, bytes, offset) ...@@ -866,8 +845,7 @@ move_tail (operands, bytes, offset)
} }
void void
expand_block_move (operands) expand_block_move (rtx operands[])
rtx operands[];
{ {
rtx bytes_rtx = operands[2]; rtx bytes_rtx = operands[2];
rtx align_rtx = operands[3]; rtx align_rtx = operands[3];
...@@ -994,9 +972,7 @@ expand_block_move (operands) ...@@ -994,9 +972,7 @@ expand_block_move (operands)
/* Returns 1 if OP contains a global symbol reference */ /* Returns 1 if OP contains a global symbol reference */
int int
global_symbolic_reference_mentioned_p (op, f) global_symbolic_reference_mentioned_p (rtx op, int f)
rtx op;
int f;
{ {
register const char *fmt; register const char *fmt;
register int i; register int i;
...@@ -1034,8 +1010,7 @@ global_symbolic_reference_mentioned_p (op, f) ...@@ -1034,8 +1010,7 @@ global_symbolic_reference_mentioned_p (op, f)
/* Returns 1 if OP contains a symbol reference */ /* Returns 1 if OP contains a symbol reference */
int int
symbolic_reference_mentioned_p (op) symbolic_reference_mentioned_p (rtx op)
rtx op;
{ {
register const char *fmt; register const char *fmt;
register int i; register int i;
...@@ -1077,12 +1052,10 @@ const struct attribute_spec ns32k_attribute_table[] = ...@@ -1077,12 +1052,10 @@ const struct attribute_spec ns32k_attribute_table[] =
/* Handle an attribute requiring a FUNCTION_TYPE, FIELD_DECL or TYPE_DECL; /* Handle an attribute requiring a FUNCTION_TYPE, FIELD_DECL or TYPE_DECL;
arguments as in struct attribute_spec.handler. */ arguments as in struct attribute_spec.handler. */
static tree static tree
ns32k_handle_fntype_attribute (node, name, args, flags, no_add_attrs) ns32k_handle_fntype_attribute (tree *node, tree name,
tree *node; tree args ATTRIBUTE_UNUSED,
tree name; int flags ATTRIBUTE_UNUSED,
tree args ATTRIBUTE_UNUSED; bool *no_add_attrs)
int flags ATTRIBUTE_UNUSED;
bool *no_add_attrs;
{ {
if (TREE_CODE (*node) != FUNCTION_TYPE if (TREE_CODE (*node) != FUNCTION_TYPE
&& TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != FIELD_DECL
...@@ -1115,10 +1088,7 @@ ns32k_handle_fntype_attribute (node, name, args, flags, no_add_attrs) ...@@ -1115,10 +1088,7 @@ ns32k_handle_fntype_attribute (node, name, args, flags, no_add_attrs)
The attribute stdcall is equivalent to RET on a per module basis. */ The attribute stdcall is equivalent to RET on a per module basis. */
int int
ns32k_return_pops_args (fundecl, funtype, size) ns32k_return_pops_args (tree fundecl ATTRIBUTE_UNUSED, tree funtype, int size)
tree fundecl ATTRIBUTE_UNUSED;
tree funtype;
int size;
{ {
int rtd = TARGET_RTD; int rtd = TARGET_RTD;
...@@ -1149,10 +1119,7 @@ ns32k_return_pops_args (fundecl, funtype, size) ...@@ -1149,10 +1119,7 @@ ns32k_return_pops_args (fundecl, funtype, size)
/* XXX time 12% of cpu time is in fprintf for non optimizing */ /* XXX time 12% of cpu time is in fprintf for non optimizing */
void void
print_operand (file, x, code) print_operand (FILE *file, rtx x, int code)
FILE *file;
rtx x;
int code;
{ {
if (code == '$') if (code == '$')
PUT_IMMEDIATE_PREFIX (file); PUT_IMMEDIATE_PREFIX (file);
...@@ -1240,9 +1207,7 @@ print_operand (file, x, code) ...@@ -1240,9 +1207,7 @@ print_operand (file, x, code)
90-11-25 Tatu Yl|nen <ylo@cs.hut.fi> */ 90-11-25 Tatu Yl|nen <ylo@cs.hut.fi> */
void void
print_operand_address (file, addr) print_operand_address (register FILE *file, register rtx addr)
register FILE *file;
register rtx addr;
{ {
static const char scales[] = { 'b', 'w', 'd', 0, 'q', }; static const char scales[] = { 'b', 'w', 'd', 0, 'q', };
rtx offset, base, indexexp, tmp; rtx offset, base, indexexp, tmp;
...@@ -1524,8 +1489,7 @@ print_operand_address (file, addr) ...@@ -1524,8 +1489,7 @@ print_operand_address (file, addr)
better performance in many common cases by using other better performance in many common cases by using other
techniques. */ techniques. */
const char * const char *
output_shift_insn (operands) output_shift_insn (rtx *operands)
rtx *operands;
{ {
if (GET_CODE (operands[2]) == CONST_INT if (GET_CODE (operands[2]) == CONST_INT
&& INTVAL (operands[2]) > 0 && INTVAL (operands[2]) > 0
...@@ -1574,9 +1538,7 @@ output_shift_insn (operands) ...@@ -1574,9 +1538,7 @@ output_shift_insn (operands)
} }
const char * const char *
output_move_dconst (n, s) output_move_dconst (int n, const char *s)
int n;
const char *s;
{ {
static char r[32]; static char r[32];
......
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