aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/app.c18
-rw-r--r--gas/as.h112
-rw-r--r--gas/atof-generic.c18
-rw-r--r--gas/bignum-copy.c9
-rw-r--r--gas/bignum.h4
-rw-r--r--gas/cgen.c2
-rw-r--r--gas/cgen.h52
-rw-r--r--gas/cond.c40
9 files changed, 126 insertions, 140 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index e449e43..45521ae 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,14 @@
+2003-11-20 Kazu Hirata <kazu@cs.umass.edu>
+
+ * app.c: Convert to ISO-C.
+ * as.h: Likewise.
+ * atof-generic.c: Likewise.
+ * bignum-copy.c: Likewise.
+ * bignum.h: Likewise.
+ * cgen.c: Likewise.
+ * cgen.h: Likewise.
+ * cond.c: Likewise.
+
2003-11-20 DJ Delorie <dj@redhat.com>
* config/tc-sh64.c (shmedia_frob_section): Only frob elf32
diff --git a/gas/app.c b/gas/app.c
index 074729f..d947664 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -87,15 +87,14 @@ static const char symbol_chars[] =
#define IS_LINE_COMMENT(c) (lex[c] == LEX_IS_LINE_COMMENT_START)
#define IS_NEWLINE(c) (lex[c] == LEX_IS_NEWLINE)
-static int process_escape PARAMS ((int));
+static int process_escape (int);
/* FIXME-soon: The entire lexer/parser thingy should be
built statically at compile time rather than dynamically
each and every time the assembler is run. xoxorich. */
void
-do_scrub_begin (m68k_mri)
- int m68k_mri ATTRIBUTE_UNUSED;
+do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
{
const char *p;
int c;
@@ -231,7 +230,7 @@ struct app_save
};
char *
-app_push ()
+app_push (void)
{
register struct app_save *saved;
@@ -267,8 +266,7 @@ app_push ()
}
void
-app_pop (arg)
- char *arg;
+app_pop (char *arg)
{
register struct app_save *saved = (struct app_save *) arg;
@@ -304,8 +302,7 @@ app_pop (arg)
necessarily true. */
static int
-process_escape (ch)
- int ch;
+process_escape (int ch)
{
switch (ch)
{
@@ -340,10 +337,7 @@ process_escape (ch)
This is the way the old code used to work. */
int
-do_scrub_chars (get, tostart, tolen)
- int (*get) PARAMS ((char *, int));
- char *tostart;
- int tolen;
+do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
{
char *to = tostart;
char *toend = tostart + tolen;
diff --git a/gas/as.h b/gas/as.h
index f8b8d1d..1a04b0d 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -492,7 +492,7 @@ struct _pseudo_type {
/* assembler mnemonic, lower case, no '.' */
const char *poc_name;
/* Do the work */
- void (*poc_handler) PARAMS ((int));
+ void (*poc_handler) (int);
/* Value to pass to handler */
int poc_val;
};
@@ -532,10 +532,10 @@ typedef struct _pseudo_type pseudo_typeS;
#else /* __GNUC__ < 2 || defined(VMS) */
-#define PRINTF_LIKE(FCN) void FCN PARAMS ((const char *format, ...))
-#define PRINTF_WHERE_LIKE(FCN) void FCN PARAMS ((char *file, \
- unsigned int line, \
- const char *format, ...))
+#define PRINTF_LIKE(FCN) void FCN (const char *format, ...)
+#define PRINTF_WHERE_LIKE(FCN) void FCN (char *file, \
+ unsigned int line, \
+ const char *format, ...)
#endif /* __GNUC__ < 2 || defined(VMS) */
@@ -553,54 +553,54 @@ PRINTF_LIKE (as_warn);
PRINTF_WHERE_LIKE (as_bad_where);
PRINTF_WHERE_LIKE (as_warn_where);
-void as_assert PARAMS ((const char *, int, const char *));
-void as_abort PARAMS ((const char *, int, const char *)) ATTRIBUTE_NORETURN;
-
-void fprint_value PARAMS ((FILE *file, addressT value));
-void sprint_value PARAMS ((char *buf, addressT value));
-
-int had_errors PARAMS ((void));
-int had_warnings PARAMS ((void));
-
-void print_version_id PARAMS ((void));
-char *app_push PARAMS ((void));
-char *atof_ieee PARAMS ((char *str, int what_kind, LITTLENUM_TYPE * words));
-char *input_scrub_include_file PARAMS ((char *filename, char *position));
-extern void input_scrub_insert_line PARAMS((const char *line));
-extern void input_scrub_insert_file PARAMS((char *path));
-char *input_scrub_new_file PARAMS ((char *filename));
-char *input_scrub_next_buffer PARAMS ((char **bufp));
-int do_scrub_chars PARAMS ((int (*get) (char *, int), char *to, int tolen));
-int gen_to_words PARAMS ((LITTLENUM_TYPE * words, int precision,
- long exponent_bits));
-int had_err PARAMS ((void));
-int ignore_input PARAMS ((void));
-void cond_finish_check PARAMS ((int));
-void cond_exit_macro PARAMS ((int));
-int seen_at_least_1_file PARAMS ((void));
-void app_pop PARAMS ((char *arg));
-void as_howmuch PARAMS ((FILE * stream));
-void as_perror PARAMS ((const char *gripe, const char *filename));
-void as_where PARAMS ((char **namep, unsigned int *linep));
-void bump_line_counters PARAMS ((void));
-void do_scrub_begin PARAMS ((int));
-void input_scrub_begin PARAMS ((void));
-void input_scrub_close PARAMS ((void));
-void input_scrub_end PARAMS ((void));
-int new_logical_line PARAMS ((char *fname, int line_number));
-void subsegs_begin PARAMS ((void));
-void subseg_change PARAMS ((segT seg, int subseg));
-segT subseg_new PARAMS ((const char *name, subsegT subseg));
-segT subseg_force_new PARAMS ((const char *name, subsegT subseg));
-void subseg_set PARAMS ((segT seg, subsegT subseg));
+void as_assert (const char *, int, const char *);
+void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
+
+void fprint_value (FILE *file, addressT value);
+void sprint_value (char *buf, addressT value);
+
+int had_errors (void);
+int had_warnings (void);
+
+void print_version_id (void);
+char *app_push (void);
+char *atof_ieee (char *str, int what_kind, LITTLENUM_TYPE * words);
+char *input_scrub_include_file (char *filename, char *position);
+extern void input_scrub_insert_line (const char *line);
+extern void input_scrub_insert_file (char *path);
+char *input_scrub_new_file (char *filename);
+char *input_scrub_next_buffer (char **bufp);
+int do_scrub_chars (int (*get) (char *, int), char *to, int tolen);
+int gen_to_words (LITTLENUM_TYPE * words, int precision,
+ long exponent_bits);
+int had_err (void);
+int ignore_input (void);
+void cond_finish_check (int);
+void cond_exit_macro (int);
+int seen_at_least_1_file (void);
+void app_pop (char *arg);
+void as_howmuch (FILE * stream);
+void as_perror (const char *gripe, const char *filename);
+void as_where (char **namep, unsigned int *linep);
+void bump_line_counters (void);
+void do_scrub_begin (int);
+void input_scrub_begin (void);
+void input_scrub_close (void);
+void input_scrub_end (void);
+int new_logical_line (char *fname, int line_number);
+void subsegs_begin (void);
+void subseg_change (segT seg, int subseg);
+segT subseg_new (const char *name, subsegT subseg);
+segT subseg_force_new (const char *name, subsegT subseg);
+void subseg_set (segT seg, subsegT subseg);
#ifdef BFD_ASSEMBLER
-segT subseg_get PARAMS ((const char *, int));
+segT subseg_get (const char *, int);
#endif
-int subseg_text_p PARAMS ((segT));
+int subseg_text_p (segT);
-void start_dependencies PARAMS ((char *));
-void register_dependency PARAMS ((char *));
-void print_dependencies PARAMS ((void));
+void start_dependencies (char *);
+void register_dependency (char *);
+void print_dependencies (void);
struct expressionS;
struct fix;
@@ -610,15 +610,15 @@ typedef struct frag fragS;
#ifdef BFD_ASSEMBLER
/* literal.c */
-valueT add_to_literal_pool PARAMS ((symbolS *, valueT, segT, int));
+valueT add_to_literal_pool (symbolS *, valueT, segT, int);
#endif
-int check_eh_frame PARAMS ((struct expressionS *, unsigned int *));
-int eh_frame_estimate_size_before_relax PARAMS ((fragS *));
-int eh_frame_relax_frag PARAMS ((fragS *));
-void eh_frame_convert_frag PARAMS ((fragS *));
+int check_eh_frame (struct expressionS *, unsigned int *);
+int eh_frame_estimate_size_before_relax (fragS *);
+int eh_frame_relax_frag (fragS *);
+void eh_frame_convert_frag (fragS *);
-int generic_force_reloc PARAMS ((struct fix *));
+int generic_force_reloc (struct fix *);
#include "expr.h" /* Before targ-*.h */
diff --git a/gas/atof-generic.c b/gas/atof-generic.c
index 6b6c7b2..8c599b5 100644
--- a/gas/atof-generic.c
+++ b/gas/atof-generic.c
@@ -32,7 +32,7 @@
#endif
#ifdef TRACE
-static void flonum_print PARAMS ((const FLONUM_TYPE *));
+static void flonum_print (const FLONUM_TYPE *);
#endif
#define ASSUME_DECIMAL_MARK_IS_DOT
@@ -75,16 +75,12 @@ static void flonum_print PARAMS ((const FLONUM_TYPE *));
*/
int
-atof_generic (address_of_string_pointer,
- string_of_decimal_marks,
- string_of_decimal_exponent_marks,
- address_of_generic_floating_point_number)
- /* return pointer to just AFTER number we read. */
- char **address_of_string_pointer;
- /* At most one per number. */
- const char *string_of_decimal_marks;
- const char *string_of_decimal_exponent_marks;
- FLONUM_TYPE *address_of_generic_floating_point_number;
+atof_generic (/* return pointer to just AFTER number we read. */
+ char **address_of_string_pointer,
+ /* At most one per number. */
+ const char *string_of_decimal_marks,
+ const char *string_of_decimal_exponent_marks,
+ FLONUM_TYPE *address_of_generic_floating_point_number)
{
int return_value; /* 0 means OK. */
char *first_digit;
diff --git a/gas/bignum-copy.c b/gas/bignum-copy.c
index b4ed7d1..5697472 100644
--- a/gas/bignum-copy.c
+++ b/gas/bignum-copy.c
@@ -33,11 +33,10 @@
/* void */
int
-bignum_copy (in, in_length, out, out_length)
- register LITTLENUM_TYPE *in;
- register int in_length; /* in sizeof(littlenum)s */
- register LITTLENUM_TYPE *out;
- register int out_length; /* in sizeof(littlenum)s */
+bignum_copy (register LITTLENUM_TYPE *in,
+ register int in_length, /* in sizeof(littlenum)s */
+ register LITTLENUM_TYPE *out,
+ register int out_length /* in sizeof(littlenum)s */)
{
int significant_littlenums_dropped;
diff --git a/gas/bignum.h b/gas/bignum.h
index 42954cf..fbb77ff 100644
--- a/gas/bignum.h
+++ b/gas/bignum.h
@@ -46,7 +46,7 @@ typedef unsigned short LITTLENUM_TYPE;
/* lengths are in sizeof(littlenum)s */
-int bignum_copy PARAMS ((LITTLENUM_TYPE * in, int in_length,
- LITTLENUM_TYPE * out, int out_length));
+int bignum_copy (LITTLENUM_TYPE * in, int in_length,
+ LITTLENUM_TYPE * out, int out_length);
/* end of bignum.h */
diff --git a/gas/cgen.c b/gas/cgen.c
index 9f2997e..5ce7f4c 100644
--- a/gas/cgen.c
+++ b/gas/cgen.c
@@ -29,7 +29,7 @@
#include "cgen.h"
#include "dwarf2dbg.h"
-static void queue_fixup PARAMS ((int, int, expressionS *));
+static void queue_fixup (int, int, expressionS *);
/* Opcode table descriptor, must be set by md_begin. */
diff --git a/gas/cgen.h b/gas/cgen.h
index d892915..8cf72af 100644
--- a/gas/cgen.h
+++ b/gas/cgen.h
@@ -46,59 +46,57 @@ typedef struct {
The result is an error message or NULL for success.
The parsed value is stored in the bfd_vma *. */
extern const char * gas_cgen_parse_operand
- PARAMS ((CGEN_CPU_DESC, enum cgen_parse_operand_type,
- const char **, int, int, enum cgen_parse_operand_result *,
- bfd_vma *));
+ (CGEN_CPU_DESC, enum cgen_parse_operand_type,
+ const char **, int, int, enum cgen_parse_operand_result *,
+ bfd_vma *);
/* Call this from md_assemble to initialize the assembler callback. */
-extern void gas_cgen_init_parse PARAMS ((void));
+extern void gas_cgen_init_parse (void);
/* Routines and macros for saving fixup chains. */
-extern void gas_cgen_save_fixups PARAMS ((int));
-extern void gas_cgen_restore_fixups PARAMS ((int));
-extern void gas_cgen_swap_fixups PARAMS ((int));
-extern void gas_cgen_initialize_saved_fixups_array PARAMS ((void));
+extern void gas_cgen_save_fixups (int);
+extern void gas_cgen_restore_fixups (int);
+extern void gas_cgen_swap_fixups (int);
+extern void gas_cgen_initialize_saved_fixups_array (void);
#define MAX_SAVED_FIXUP_CHAINS 50
/* Add a register to the assembler's hash table.
This makes lets GAS parse registers for us.
??? This isn't currently used, but it could be in the future. */
-extern void cgen_asm_record_register PARAMS ((char *, int));
+extern void cgen_asm_record_register (char *, int);
/* After CGEN_SYM (assemble_insn) is done, this is called to
output the insn and record any fixups. */
-extern void gas_cgen_finish_insn PARAMS ((const CGEN_INSN *,
- CGEN_INSN_BYTES_PTR, unsigned int,
- int, finished_insnS *));
+extern void gas_cgen_finish_insn (const CGEN_INSN *,
+ CGEN_INSN_BYTES_PTR, unsigned int,
+ int, finished_insnS *);
/* Record a fixup. */
-extern fixS * gas_cgen_record_fixup PARAMS ((fragS *, int, const CGEN_INSN *,
- int, const CGEN_OPERAND *, int,
- symbolS *, offsetT));
-extern fixS * gas_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *,
- int, const CGEN_OPERAND *, int,
- expressionS *));
+extern fixS * gas_cgen_record_fixup (fragS *, int, const CGEN_INSN *,
+ int, const CGEN_OPERAND *, int,
+ symbolS *, offsetT);
+extern fixS * gas_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *,
+ int, const CGEN_OPERAND *, int,
+ expressionS *);
/* md_apply_fix3 handler */
-extern void gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
+extern void gas_cgen_md_apply_fix3 (fixS *, valueT *, segT);
/* tc_gen_reloc handler */
-extern arelent *gas_cgen_tc_gen_reloc PARAMS ((asection *, fixS *));
+extern arelent *gas_cgen_tc_gen_reloc (asection *, fixS *);
/* Target supplied routine to lookup a reloc. */
extern bfd_reloc_code_real_type
-md_cgen_lookup_reloc PARAMS ((const CGEN_INSN *, const CGEN_OPERAND *,
- fixS *));
+md_cgen_lookup_reloc (const CGEN_INSN *, const CGEN_OPERAND *, fixS *);
/* Optional target supplied routine to record a fixup for an expression. */
extern fixS *
-md_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *, int,
- const CGEN_OPERAND *, int,
- expressionS *));
+md_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *, int,
+ const CGEN_OPERAND *, int, expressionS *);
-extern void gas_cgen_md_operand PARAMS ((expressionS *));
+extern void gas_cgen_md_operand (expressionS *);
/* Perform any cgen specific initialisation for gas. */
-extern void gas_cgen_begin PARAMS ((void));
+extern void gas_cgen_begin (void);
#endif /* GAS_CGEN_H */
diff --git a/gas/cond.c b/gas/cond.c
index b7a4082..870a7d5 100644
--- a/gas/cond.c
+++ b/gas/cond.c
@@ -55,8 +55,8 @@ struct conditional_frame {
int macro_nest;
};
-static void initialize_cframe PARAMS ((struct conditional_frame *cframe));
-static char *get_mri_string PARAMS ((int, int *));
+static void initialize_cframe (struct conditional_frame *cframe);
+static char *get_mri_string (int, int *);
static struct conditional_frame *current_cframe = NULL;
@@ -64,8 +64,7 @@ static struct conditional_frame *current_cframe = NULL;
the .ifndef (test_defined == 0) pseudo op. */
void
-s_ifdef (test_defined)
- int test_defined;
+s_ifdef (int test_defined)
{
/* Points to name of symbol. */
char *name;
@@ -123,8 +122,7 @@ s_ifdef (test_defined)
}
void
-s_if (arg)
- int arg;
+s_if (int arg)
{
expressionS operand;
struct conditional_frame cframe;
@@ -186,9 +184,7 @@ s_if (arg)
/* Get a string for the MRI IFC or IFNC pseudo-ops. */
static char *
-get_mri_string (terminator, len)
- int terminator;
- int *len;
+get_mri_string (int terminator, int *len)
{
char *ret;
char *s;
@@ -228,8 +224,7 @@ get_mri_string (terminator, len)
/* The MRI IFC and IFNC pseudo-ops. */
void
-s_ifc (arg)
- int arg;
+s_ifc (int arg)
{
char *stop = NULL;
char stopc;
@@ -270,8 +265,7 @@ s_ifc (arg)
}
void
-s_elseif (arg)
- int arg;
+s_elseif (int arg)
{
if (current_cframe == NULL)
{
@@ -346,8 +340,7 @@ s_elseif (arg)
}
void
-s_endif (arg)
- int arg ATTRIBUTE_UNUSED;
+s_endif (int arg ATTRIBUTE_UNUSED)
{
struct conditional_frame *hold;
@@ -378,8 +371,7 @@ s_endif (arg)
}
void
-s_else (arg)
- int arg ATTRIBUTE_UNUSED;
+s_else (int arg ATTRIBUTE_UNUSED)
{
if (current_cframe == NULL)
{
@@ -426,8 +418,7 @@ s_else (arg)
}
void
-s_ifeqs (arg)
- int arg;
+s_ifeqs (int arg)
{
char *s1, *s2;
int len1, len2;
@@ -465,7 +456,7 @@ s_ifeqs (arg)
}
int
-ignore_input ()
+ignore_input (void)
{
char *s;
@@ -499,8 +490,7 @@ ignore_input ()
}
static void
-initialize_cframe (cframe)
- struct conditional_frame *cframe;
+initialize_cframe (struct conditional_frame *cframe)
{
memset (cframe, 0, sizeof (*cframe));
as_where (&cframe->if_file_line.file,
@@ -516,8 +506,7 @@ initialize_cframe (cframe)
negative, we are being called at the of the input files. */
void
-cond_finish_check (nest)
- int nest;
+cond_finish_check (int nest)
{
if (current_cframe != NULL && current_cframe->macro_nest >= nest)
{
@@ -540,8 +529,7 @@ cond_finish_check (nest)
nested, and just pop them off the stack. */
void
-cond_exit_macro (nest)
- int nest;
+cond_exit_macro (int nest)
{
while (current_cframe != NULL && current_cframe->macro_nest >= nest)
{