Commit f12b3fc8 by Steven Bosscher

pdp11-protos.h, [...]: Convert to ISO C90 function declarations and definitions.

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

From-SVN: r71880
parent 753aaa17
2003-09-28 Steven Bosscher <steven@gcc.gnu.org> 2003-09-28 Steven Bosscher <steven@gcc.gnu.org>
* config/pdp11/pdp11-protos.h, config/pdp11/pdp11.c,
config/c4x/c4x-c.c, config/c4x/c4x-protos.h, config/c4x/c4x.c,
config/c4x/c4x.h:
Convert to ISO C90 function declarations and definitions.
2003-09-28 Steven Bosscher <steven@gcc.gnu.org>
* config/stormy16/stormy16.c, config/stormy16/stormy16-protos.h: * config/stormy16/stormy16.c, config/stormy16/stormy16-protos.h:
Convert to ISO C90 function declarations and definitions. Convert to ISO C90 function declarations and definitions.
......
...@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
#include "c-pragma.h" #include "c-pragma.h"
#include "tm_p.h" #include "tm_p.h"
static int c4x_parse_pragma PARAMS ((const char *, tree *, tree *)); static int c4x_parse_pragma (const char *, tree *, tree *);
/* Handle machine specific pragmas for compatibility with existing /* Handle machine specific pragmas for compatibility with existing
compilers for the C3x/C4x. compilers for the C3x/C4x.
......
...@@ -1519,9 +1519,9 @@ if (REG_P (OP1) && ! REG_P (OP0)) \ ...@@ -1519,9 +1519,9 @@ if (REG_P (OP1) && ! REG_P (OP0)) \
FINI_SECTION_FUNCTION FINI_SECTION_FUNCTION
#define INIT_SECTION_FUNCTION \ #define INIT_SECTION_FUNCTION \
extern void init_section PARAMS ((void)); \ extern void init_section (void); \
void \ void \
init_section () \ init_section (void) \
{ \ { \
if (in_section != in_init) \ if (in_section != in_init) \
{ \ { \
......
/* Definitions of target machine for GNU compiler, for the pdp-11 /* Definitions of target machine for GNU compiler, for the pdp-11
Copyright (C) 2000 Free Software Foundation, Inc. Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
This file is part of GCC. This file is part of GCC.
...@@ -21,23 +21,23 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,23 +21,23 @@ Boston, MA 02111-1307, USA. */
/* declarations */ /* declarations */
#ifdef RTX_CODE #ifdef RTX_CODE
extern int arith_operand PARAMS ((rtx, enum machine_mode)); extern int arith_operand (rtx, enum machine_mode);
extern int const_immediate_operand PARAMS ((rtx, enum machine_mode)); extern int const_immediate_operand (rtx, enum machine_mode);
extern int expand_shift_operand PARAMS ((rtx, enum machine_mode)); extern int expand_shift_operand (rtx, enum machine_mode);
extern int immediate15_operand PARAMS ((rtx, enum machine_mode)); extern int immediate15_operand (rtx, enum machine_mode);
extern int simple_memory_operand PARAMS ((rtx, enum machine_mode)); extern int simple_memory_operand (rtx, enum machine_mode);
extern int comp_operator PARAMS ((rtx, enum machine_mode)); extern int comp_operator (rtx, enum machine_mode);
extern int legitimate_address_p PARAMS ((enum machine_mode, rtx)); extern int legitimate_address_p (enum machine_mode, rtx);
extern void notice_update_cc_on_set PARAMS ((rtx, rtx)); extern void notice_update_cc_on_set (rtx, rtx);
extern void output_addr_const_pdp11 PARAMS ((FILE *, rtx)); extern void output_addr_const_pdp11 (FILE *, rtx);
extern const char *output_move_double PARAMS ((rtx *)); extern const char *output_move_double (rtx *);
extern const char *output_move_quad PARAMS ((rtx *)); extern const char *output_move_quad (rtx *);
extern const char *output_block_move PARAMS ((rtx *)); extern const char *output_block_move (rtx *);
extern void print_operand_address PARAMS ((FILE *, rtx)); extern void print_operand_address (FILE *, rtx);
extern int register_move_cost PARAMS ((enum reg_class, enum reg_class)); extern int register_move_cost (enum reg_class, enum reg_class);
extern int comparison_operator_index PARAMS ((rtx)); extern int comparison_operator_index (rtx);
#endif /* RTX_CODE */ #endif /* RTX_CODE */
extern void output_ascii PARAMS ((FILE *, const char *, int)); extern void output_ascii (FILE *, const char *, int);
extern const char *output_jump PARAMS ((const char *, const char *, int)); extern const char *output_jump (const char *, const char *, int);
...@@ -54,12 +54,12 @@ int current_first_parm_offset; ...@@ -54,12 +54,12 @@ int current_first_parm_offset;
/* This is where the condition code register lives. */ /* This is where the condition code register lives. */
/* rtx cc0_reg_rtx; - no longer needed? */ /* rtx cc0_reg_rtx; - no longer needed? */
static rtx find_addr_reg PARAMS ((rtx)); static rtx find_addr_reg (rtx);
static const char *singlemove_string PARAMS ((rtx *)); static const char *singlemove_string (rtx *);
static bool pdp11_assemble_integer PARAMS ((rtx, unsigned int, int)); static bool pdp11_assemble_integer (rtx, unsigned int, int);
static void pdp11_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT)); static void pdp11_output_function_prologue (FILE *, HOST_WIDE_INT);
static void pdp11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); static void pdp11_output_function_epilogue (FILE *, HOST_WIDE_INT);
static bool pdp11_rtx_costs PARAMS ((rtx, int, int, int *)); static bool pdp11_rtx_costs (rtx, int, int, int *);
/* Initialize the GCC target structure. */ /* Initialize the GCC target structure. */
#undef TARGET_ASM_BYTE_OP #undef TARGET_ASM_BYTE_OP
...@@ -89,33 +89,25 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -89,33 +89,25 @@ struct gcc_target targetm = TARGET_INITIALIZER;
/* Nonzero if OP is a valid second operand for an arithmetic insn. */ /* Nonzero if OP is a valid second operand for an arithmetic insn. */
int int
arith_operand (op, mode) arith_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) || GET_CODE (op) == CONST_INT); return (register_operand (op, mode) || GET_CODE (op) == CONST_INT);
} }
int int
const_immediate_operand (op, mode) const_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT); return (GET_CODE (op) == CONST_INT);
} }
int int
immediate15_operand (op, mode) immediate15_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT && ((INTVAL (op) & 0x8000) == 0x0000)); return (GET_CODE (op) == CONST_INT && ((INTVAL (op) & 0x8000) == 0x0000));
} }
int int
expand_shift_operand (op, mode) expand_shift_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT return (GET_CODE (op) == CONST_INT
&& abs (INTVAL(op)) > 1 && abs (INTVAL(op)) > 1
...@@ -134,9 +126,7 @@ expand_shift_operand (op, mode) ...@@ -134,9 +126,7 @@ expand_shift_operand (op, mode)
#ifdef TWO_BSD #ifdef TWO_BSD
static void static void
pdp11_output_function_prologue (stream, size) pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
FILE *stream;
HOST_WIDE_INT size;
{ {
fprintf (stream, "\tjsr r5, csv\n"); fprintf (stream, "\tjsr r5, csv\n");
if (size) if (size)
...@@ -151,9 +141,7 @@ pdp11_output_function_prologue (stream, size) ...@@ -151,9 +141,7 @@ pdp11_output_function_prologue (stream, size)
#else /* !TWO_BSD */ #else /* !TWO_BSD */
static void static void
pdp11_output_function_prologue (stream, size) pdp11_output_function_prologue (FILE *stream, HOST_WIDE_INT size)
FILE *stream;
HOST_WIDE_INT size;
{ {
HOST_WIDE_INT fsize = ((size) + 1) & ~1; HOST_WIDE_INT fsize = ((size) + 1) & ~1;
int regno; int regno;
...@@ -249,9 +237,8 @@ pdp11_output_function_prologue (stream, size) ...@@ -249,9 +237,8 @@ pdp11_output_function_prologue (stream, size)
#ifdef TWO_BSD #ifdef TWO_BSD
static void static void
pdp11_output_function_epilogue (stream, size) pdp11_output_function_epilogue (FILE *stream,
FILE *stream; HOST_WIDE_INT size ATTRIBUTE_UNUSED)
HOST_WIDE_INT size ATTRIBUTE_UNUSED;
{ {
fprintf (stream, "\t/* SP ignored by cret? */\n"); fprintf (stream, "\t/* SP ignored by cret? */\n");
fprintf (stream, "\tjmp cret\n"); fprintf (stream, "\tjmp cret\n");
...@@ -260,9 +247,7 @@ pdp11_output_function_epilogue (stream, size) ...@@ -260,9 +247,7 @@ pdp11_output_function_epilogue (stream, size)
#else /* !TWO_BSD */ #else /* !TWO_BSD */
static void static void
pdp11_output_function_epilogue (stream, size) pdp11_output_function_epilogue (FILE *stream, HOST_WIDE_INT size)
FILE *stream;
HOST_WIDE_INT size;
{ {
HOST_WIDE_INT fsize = ((size) + 1) & ~1; HOST_WIDE_INT fsize = ((size) + 1) & ~1;
int i, j, k; int i, j, k;
...@@ -369,8 +354,7 @@ pdp11_output_function_epilogue (stream, size) ...@@ -369,8 +354,7 @@ pdp11_output_function_epilogue (stream, size)
/* Return the best assembler insn template /* Return the best assembler insn template
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 (operands[1] != const0_rtx) if (operands[1] != const0_rtx)
return "mov %1,%0"; return "mov %1,%0";
...@@ -383,8 +367,7 @@ singlemove_string (operands) ...@@ -383,8 +367,7 @@ singlemove_string (operands)
with operands OPERANDS. */ with operands OPERANDS. */
const char * const char *
output_move_double (operands) output_move_double (rtx *operands)
rtx *operands;
{ {
enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1; enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1;
rtx latehalf[2]; rtx latehalf[2];
...@@ -562,8 +545,7 @@ output_move_double (operands) ...@@ -562,8 +545,7 @@ output_move_double (operands)
with operands OPERANDS. */ with operands OPERANDS. */
const char * const char *
output_move_quad (operands) output_move_quad (rtx *operands)
rtx *operands;
{ {
enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1; enum { REGOP, OFFSOP, MEMOP, PUSHOP, POPOP, CNSTOP, RNDOP } optype0, optype1;
rtx latehalf[2]; rtx latehalf[2];
...@@ -787,8 +769,7 @@ output_move_quad (operands) ...@@ -787,8 +769,7 @@ output_move_quad (operands)
ADDR can be effectively incremented by incrementing REG. */ ADDR can be effectively incremented by incrementing REG. */
static rtx static rtx
find_addr_reg (addr) find_addr_reg (rtx addr)
rtx addr;
{ {
while (GET_CODE (addr) == PLUS) while (GET_CODE (addr) == PLUS)
{ {
...@@ -808,10 +789,7 @@ find_addr_reg (addr) ...@@ -808,10 +789,7 @@ find_addr_reg (addr)
/* Output an ascii string. */ /* Output an ascii string. */
void void
output_ascii (file, p, size) output_ascii (FILE *file, const char *p, int size)
FILE *file;
const char *p;
int size;
{ {
int i; int i;
...@@ -835,9 +813,7 @@ output_ascii (file, p, size) ...@@ -835,9 +813,7 @@ output_ascii (file, p, size)
/* --- stole from out-vax, needs changes */ /* --- stole from out-vax, needs changes */
void void
print_operand_address (file, addr) print_operand_address (FILE *file, register rtx addr)
FILE *file;
register rtx addr;
{ {
register rtx reg1, reg2, breg, ireg; register rtx reg1, reg2, breg, ireg;
rtx offset; rtx offset;
...@@ -967,10 +943,7 @@ print_operand_address (file, addr) ...@@ -967,10 +943,7 @@ print_operand_address (file, addr)
pdp-specific version of output_addr_const. */ pdp-specific version of output_addr_const. */
static bool static bool
pdp11_assemble_integer (x, size, aligned_p) pdp11_assemble_integer (rtx x, unsigned int size, int aligned_p)
rtx x;
unsigned int size;
int aligned_p;
{ {
if (aligned_p) if (aligned_p)
switch (size) switch (size)
...@@ -1020,10 +993,7 @@ register_move_cost(c1, c2) ...@@ -1020,10 +993,7 @@ register_move_cost(c1, c2)
} }
static bool static bool
pdp11_rtx_costs (x, code, outer_code, total) pdp11_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)
{ {
...@@ -1130,9 +1100,7 @@ pdp11_rtx_costs (x, code, outer_code, total) ...@@ -1130,9 +1100,7 @@ pdp11_rtx_costs (x, code, outer_code, total)
} }
const char * const char *
output_jump(pos, neg, length) output_jump(const char *pos, const char *neg, int length)
const char *pos, *neg;
int length;
{ {
static int x = 0; static int x = 0;
...@@ -1173,9 +1141,7 @@ output_jump(pos, neg, length) ...@@ -1173,9 +1141,7 @@ output_jump(pos, neg, length)
} }
void void
notice_update_cc_on_set(exp, insn) notice_update_cc_on_set(rtx exp, rtx insn ATTRIBUTE_UNUSED)
rtx exp;
rtx insn ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (SET_DEST (exp)) == CC0) if (GET_CODE (SET_DEST (exp)) == CC0)
{ {
...@@ -1245,9 +1211,7 @@ notice_update_cc_on_set(exp, insn) ...@@ -1245,9 +1211,7 @@ notice_update_cc_on_set(exp, insn)
int int
simple_memory_operand(op, mode) simple_memory_operand(rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
rtx addr; rtx addr;
...@@ -1320,8 +1284,7 @@ simple_memory_operand(op, mode) ...@@ -1320,8 +1284,7 @@ simple_memory_operand(op, mode)
const char * const char *
output_block_move(operands) output_block_move(rtx *operands)
rtx *operands;
{ {
static int count = 0; static int count = 0;
char buf[200]; char buf[200];
...@@ -1560,8 +1523,7 @@ output_block_move(operands) ...@@ -1560,8 +1523,7 @@ output_block_move(operands)
/* for future use */ /* for future use */
int int
comparison_operator_index(op) comparison_operator_index(rtx op)
rtx op;
{ {
switch (GET_CODE(op)) switch (GET_CODE(op))
{ {
...@@ -1602,18 +1564,14 @@ comparison_operator_index(op) ...@@ -1602,18 +1564,14 @@ comparison_operator_index(op)
/* tests whether the rtx is a comparison operator */ /* tests whether the rtx is a comparison operator */
int int
comp_operator (op, mode) comp_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return comparison_operator_index(op) >= 0; return comparison_operator_index(op) >= 0;
} }
int int
legitimate_address_p (mode, address) legitimate_address_p (enum machine_mode mode, rtx address)
enum machine_mode mode;
rtx address;
{ {
/* #define REG_OK_STRICT */ /* #define REG_OK_STRICT */
GO_IF_LEGITIMATE_ADDRESS(mode, address, win); GO_IF_LEGITIMATE_ADDRESS(mode, address, win);
...@@ -1632,9 +1590,7 @@ legitimate_address_p (mode, address) ...@@ -1632,9 +1590,7 @@ legitimate_address_p (mode, address)
So this copy should get called whenever needed. So this copy should get called whenever needed.
*/ */
void void
output_addr_const_pdp11 (file, x) output_addr_const_pdp11 (FILE *file, rtx x)
FILE *file;
rtx x;
{ {
char buf[256]; char buf[256];
......
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