2000-11-06 Kazu Hirata <kazu@hxi.com>
* as.c: Fix formatting. * dwarf2dbg.c: Likewise. * itbl-ops.c: Likewise. * listing.c: Likewise. * macro.h: Likewise. * messages.c: Likewise. * read.c: Likewise. * subsegs.c: Likewise. * subsegs.h: Likewise. * write.c: Likewise.
This commit is contained in:
parent
4efc3e0524
commit
ef99799a42
@ -1,8 +1,18 @@
|
|||||||
2000-11-06 Kazu Hirata <kazu@hxi.com>
|
2000-11-06 Kazu Hirata <kazu@hxi.com>
|
||||||
|
|
||||||
* input-file.c: Fix formatting.
|
* as.c: Fix formatting.
|
||||||
|
* dwarf2dbg.c: Likewise.
|
||||||
|
* input-file.c: Likewise.
|
||||||
* input-file.h: Likewise.
|
* input-file.h: Likewise.
|
||||||
* input-scrub.c: Likewise.
|
* input-scrub.c: Likewise.
|
||||||
|
* itbl-ops.c: Likewise.
|
||||||
|
* listing.c: Likewise.
|
||||||
|
* macro.h: Likewise.
|
||||||
|
* messages.c: Likewise.
|
||||||
|
* read.c: Likewise.
|
||||||
|
* subsegs.c: Likewise.
|
||||||
|
* subsegs.h: Likewise.
|
||||||
|
* write.c: Likewise.
|
||||||
|
|
||||||
2000-11-06 Nick Clifton <nickc@redhat.com>
|
2000-11-06 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
2
gas/as.c
2
gas/as.c
@ -497,7 +497,7 @@ parse_args (pargc, pargv)
|
|||||||
new_argv[new_argc++] = optarg;
|
new_argv[new_argc++] = optarg;
|
||||||
new_argv[new_argc] = NULL;
|
new_argv[new_argc] = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPTION_TARGET_HELP:
|
case OPTION_TARGET_HELP:
|
||||||
md_show_usage (stdout);
|
md_show_usage (stdout);
|
||||||
exit (EXIT_SUCCESS);
|
exit (EXIT_SUCCESS);
|
||||||
|
@ -782,15 +782,14 @@ dwarf2_generate_asm_lineno (size)
|
|||||||
{
|
{
|
||||||
bfd_vma addr;
|
bfd_vma addr;
|
||||||
static struct dwarf2_line_info debug_line;
|
static struct dwarf2_line_info debug_line;
|
||||||
|
|
||||||
/* First update the notion of the current source line. */
|
/* First update the notion of the current source line. */
|
||||||
dwarf2_where (& debug_line);
|
dwarf2_where (&debug_line);
|
||||||
|
|
||||||
/* We want the offset of the start of this
|
/* We want the offset of the start of this
|
||||||
instruction within the the current frag. */
|
instruction within the the current frag. */
|
||||||
addr = frag_now->fr_address + frag_now_fix () - size;
|
addr = frag_now->fr_address + frag_now_fix () - size;
|
||||||
|
|
||||||
/* And record the information. */
|
|
||||||
dwarf2_gen_line_info (addr, & debug_line);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
/* And record the information. */
|
||||||
|
dwarf2_gen_line_info (addr, &debug_line);
|
||||||
|
}
|
||||||
|
@ -114,43 +114,39 @@ int itbl_have_entries = 0;
|
|||||||
/*======================================================================*/
|
/*======================================================================*/
|
||||||
/* structures for keeping itbl format entries */
|
/* structures for keeping itbl format entries */
|
||||||
|
|
||||||
struct itbl_range
|
struct itbl_range {
|
||||||
{
|
int sbit; /* mask starting bit position */
|
||||||
int sbit; /* mask starting bit position */
|
int ebit; /* mask ending bit position */
|
||||||
int ebit; /* mask ending bit position */
|
};
|
||||||
};
|
|
||||||
|
|
||||||
struct itbl_field
|
struct itbl_field {
|
||||||
{
|
e_type type; /* dreg/creg/greg/immed/symb */
|
||||||
e_type type; /* dreg/creg/greg/immed/symb */
|
struct itbl_range range; /* field's bitfield range within instruction */
|
||||||
struct itbl_range range; /* field's bitfield range within instruction */
|
unsigned long flags; /* field flags */
|
||||||
unsigned long flags; /* field flags */
|
struct itbl_field *next; /* next field in list */
|
||||||
struct itbl_field *next; /* next field in list */
|
};
|
||||||
};
|
|
||||||
|
|
||||||
/* These structures define the instructions and registers for a processor.
|
/* These structures define the instructions and registers for a processor.
|
||||||
* If the type is an instruction, the structure defines the format of an
|
* If the type is an instruction, the structure defines the format of an
|
||||||
* instruction where the fields are the list of operands.
|
* instruction where the fields are the list of operands.
|
||||||
* The flags field below uses the same values as those defined in the
|
* The flags field below uses the same values as those defined in the
|
||||||
* gnu assembler and are machine specific. */
|
* gnu assembler and are machine specific. */
|
||||||
struct itbl_entry
|
struct itbl_entry {
|
||||||
{
|
e_processor processor; /* processor number */
|
||||||
e_processor processor; /* processor number */
|
e_type type; /* dreg/creg/greg/insn */
|
||||||
e_type type; /* dreg/creg/greg/insn */
|
char *name; /* mnemionic name for insn/register */
|
||||||
char *name; /* mnemionic name for insn/register */
|
unsigned long value; /* opcode/instruction mask/register number */
|
||||||
unsigned long value; /* opcode/instruction mask/register number */
|
unsigned long flags; /* effects of the instruction */
|
||||||
unsigned long flags; /* effects of the instruction */
|
struct itbl_range range; /* bit range within instruction for value */
|
||||||
struct itbl_range range; /* bit range within instruction for value */
|
struct itbl_field *fields; /* list of operand definitions (if any) */
|
||||||
struct itbl_field *fields; /* list of operand definitions (if any) */
|
struct itbl_entry *next; /* next entry */
|
||||||
struct itbl_entry *next; /* next entry */
|
};
|
||||||
};
|
|
||||||
|
|
||||||
/* local data and structures */
|
/* local data and structures */
|
||||||
|
|
||||||
static int itbl_num_opcodes = 0;
|
static int itbl_num_opcodes = 0;
|
||||||
/* Array of entries for each processor and entry type */
|
/* Array of entries for each processor and entry type */
|
||||||
static struct itbl_entry *entries[e_nprocs][e_ntypes] =
|
static struct itbl_entry *entries[e_nprocs][e_ntypes] = {
|
||||||
{
|
|
||||||
{0, 0, 0, 0, 0, 0},
|
{0, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0},
|
{0, 0, 0, 0, 0, 0},
|
||||||
{0, 0, 0, 0, 0, 0},
|
{0, 0, 0, 0, 0, 0},
|
||||||
@ -273,7 +269,8 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit,
|
|||||||
#include "symbols.h"
|
#include "symbols.h"
|
||||||
static void append_insns_as_macros (void);
|
static void append_insns_as_macros (void);
|
||||||
|
|
||||||
/* initialize for gas */
|
/* Initialize for gas. */
|
||||||
|
|
||||||
void
|
void
|
||||||
itbl_init (void)
|
itbl_init (void)
|
||||||
{
|
{
|
||||||
@ -282,7 +279,7 @@ itbl_init (void)
|
|||||||
e_type type;
|
e_type type;
|
||||||
|
|
||||||
if (!itbl_have_entries)
|
if (!itbl_have_entries)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Since register names don't have a prefix, put them in the symbol table so
|
/* Since register names don't have a prefix, put them in the symbol table so
|
||||||
they can't be used as symbols. This simplifies argument parsing as
|
they can't be used as symbols. This simplifies argument parsing as
|
||||||
@ -297,7 +294,7 @@ itbl_init (void)
|
|||||||
for (e = *es; e; e = e->next)
|
for (e = *es; e; e = e->next)
|
||||||
{
|
{
|
||||||
symbol_table_insert (symbol_create (e->name, reg_section,
|
symbol_table_insert (symbol_create (e->name, reg_section,
|
||||||
e->value, &zero_address_frag));
|
e->value, &zero_address_frag));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
append_insns_as_macros ();
|
append_insns_as_macros ();
|
||||||
@ -327,7 +324,7 @@ append_insns_as_macros (void)
|
|||||||
int n, id, size, new_size, new_num_opcodes;
|
int n, id, size, new_size, new_num_opcodes;
|
||||||
|
|
||||||
if (!itbl_have_entries)
|
if (!itbl_have_entries)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!itbl_num_opcodes) /* no new instructions to add! */
|
if (!itbl_num_opcodes) /* no new instructions to add! */
|
||||||
{
|
{
|
||||||
@ -603,7 +600,7 @@ itbl_disassemble (char *s, unsigned long insn)
|
|||||||
struct itbl_field *f;
|
struct itbl_field *f;
|
||||||
|
|
||||||
if (!ITBL_IS_INSN (insn))
|
if (!ITBL_IS_INSN (insn))
|
||||||
return 0; /* error*/
|
return 0; /* error */
|
||||||
processor = get_processor (ITBL_DECODE_PNUM (insn));
|
processor = get_processor (ITBL_DECODE_PNUM (insn));
|
||||||
|
|
||||||
/* find entry in list */
|
/* find entry in list */
|
||||||
@ -612,15 +609,15 @@ itbl_disassemble (char *s, unsigned long insn)
|
|||||||
return 0; /* opcode not in table; invalid instrustion */
|
return 0; /* opcode not in table; invalid instrustion */
|
||||||
strcpy (s, e->name);
|
strcpy (s, e->name);
|
||||||
|
|
||||||
/* parse insn's args (if any) */
|
/* Parse insn's args (if any). */
|
||||||
for (f = e->fields; f; f = f->next) /* for each arg, ... */
|
for (f = e->fields; f; f = f->next) /* for each arg, ... */
|
||||||
{
|
{
|
||||||
struct itbl_entry *r;
|
struct itbl_entry *r;
|
||||||
unsigned long value;
|
unsigned long value;
|
||||||
|
|
||||||
if (f == e->fields) /* first operand is preceeded by tab */
|
if (f == e->fields) /* First operand is preceeded by tab. */
|
||||||
strcat (s, "\t");
|
strcat (s, "\t");
|
||||||
else /* ','s separate following operands */
|
else /* ','s separate following operands. */
|
||||||
strcat (s, ",");
|
strcat (s, ",");
|
||||||
value = extract_range (insn, f->range);
|
value = extract_range (insn, f->range);
|
||||||
/* n should be in form $n or 0xhhh (are symbol names valid?? */
|
/* n should be in form $n or 0xhhh (are symbol names valid?? */
|
||||||
@ -630,7 +627,7 @@ itbl_disassemble (char *s, unsigned long insn)
|
|||||||
case e_creg:
|
case e_creg:
|
||||||
case e_greg:
|
case e_greg:
|
||||||
/* Accept either a string name
|
/* Accept either a string name
|
||||||
* or '$' followed by the register number */
|
or '$' followed by the register number. */
|
||||||
r = find_entry_byval (e->processor, f->type, value, &f->range);
|
r = find_entry_byval (e->processor, f->type, value, &f->range);
|
||||||
if (r)
|
if (r)
|
||||||
strcat (s, r->name);
|
strcat (s, r->name);
|
||||||
@ -638,11 +635,9 @@ itbl_disassemble (char *s, unsigned long insn)
|
|||||||
sprintf (s, "%s$%lu", s, value);
|
sprintf (s, "%s$%lu", s, value);
|
||||||
break;
|
break;
|
||||||
case e_addr:
|
case e_addr:
|
||||||
/* use assembler's symbol table to find symbol */
|
/* Use assembler's symbol table to find symbol. */
|
||||||
/* FIXME!! Do we need this?
|
/* FIXME!! Do we need this? If so, what about relocs?? */
|
||||||
* if so, what about relocs??
|
/* If not a symbol, fall through to IMMED. */
|
||||||
*/
|
|
||||||
/* If not a symbol, fall thru to IMMED */
|
|
||||||
case e_immed:
|
case e_immed:
|
||||||
sprintf (s, "%s0x%lx", s, value);
|
sprintf (s, "%s0x%lx", s, value);
|
||||||
break;
|
break;
|
||||||
@ -650,7 +645,7 @@ itbl_disassemble (char *s, unsigned long insn)
|
|||||||
return 0; /* error; invalid field spec */
|
return 0; /* error; invalid field spec */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1; /* done! */
|
return 1; /* Done! */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*======================================================================*/
|
/*======================================================================*/
|
||||||
|
@ -119,20 +119,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This structure remembers which .s were used. */
|
/* This structure remembers which .s were used. */
|
||||||
typedef struct file_info_struct
|
typedef struct file_info_struct {
|
||||||
{
|
|
||||||
struct file_info_struct * next;
|
struct file_info_struct * next;
|
||||||
char * filename;
|
char * filename;
|
||||||
long pos;
|
long pos;
|
||||||
unsigned int linenum;
|
unsigned int linenum;
|
||||||
int at_end;
|
int at_end;
|
||||||
}
|
} file_info_type;
|
||||||
file_info_type;
|
|
||||||
|
|
||||||
/* This structure rememebrs which line from which file goes into which
|
/* This structure rememebrs which line from which file goes into which
|
||||||
frag. */
|
frag. */
|
||||||
struct list_info_struct
|
struct list_info_struct {
|
||||||
{
|
|
||||||
/* Frag which this line of source is nearest to. */
|
/* Frag which this line of source is nearest to. */
|
||||||
fragS *frag;
|
fragS *frag;
|
||||||
|
|
||||||
@ -157,16 +154,15 @@ struct list_info_struct
|
|||||||
/* Pointer to any error message associated with this line. */
|
/* Pointer to any error message associated with this line. */
|
||||||
char *message;
|
char *message;
|
||||||
|
|
||||||
enum
|
enum {
|
||||||
{
|
EDICT_NONE,
|
||||||
EDICT_NONE,
|
EDICT_SBTTL,
|
||||||
EDICT_SBTTL,
|
EDICT_TITLE,
|
||||||
EDICT_TITLE,
|
EDICT_NOLIST,
|
||||||
EDICT_NOLIST,
|
EDICT_LIST,
|
||||||
EDICT_LIST,
|
EDICT_NOLIST_NEXT,
|
||||||
EDICT_NOLIST_NEXT,
|
EDICT_EJECT
|
||||||
EDICT_EJECT
|
} edict;
|
||||||
} edict;
|
|
||||||
char *edict_arg;
|
char *edict_arg;
|
||||||
|
|
||||||
/* Nonzero if this line is to be omitted because it contains
|
/* Nonzero if this line is to be omitted because it contains
|
||||||
@ -194,7 +190,7 @@ static int paper_height = 60;
|
|||||||
extern int listing;
|
extern int listing;
|
||||||
|
|
||||||
/* File to output listings to. */
|
/* File to output listings to. */
|
||||||
static FILE * list_file;
|
static FILE *list_file;
|
||||||
|
|
||||||
/* This static array is used to keep the text of data to be printed
|
/* This static array is used to keep the text of data to be printed
|
||||||
before the start of the line. */
|
before the start of the line. */
|
||||||
@ -209,7 +205,7 @@ static char *data_buffer;
|
|||||||
|
|
||||||
/* Prototypes. */
|
/* Prototypes. */
|
||||||
static void listing_message PARAMS ((const char *name, const char *message));
|
static void listing_message PARAMS ((const char *name, const char *message));
|
||||||
static file_info_type * file_info PARAMS ((const char *file_name));
|
static file_info_type *file_info PARAMS ((const char *file_name));
|
||||||
static void new_frag PARAMS ((void));
|
static void new_frag PARAMS ((void));
|
||||||
static char *buffer_line PARAMS ((file_info_type *file,
|
static char *buffer_line PARAMS ((file_info_type *file,
|
||||||
char *line, unsigned int size));
|
char *line, unsigned int size));
|
||||||
|
30
gas/macro.h
30
gas/macro.h
@ -38,15 +38,13 @@
|
|||||||
|
|
||||||
/* describe the formal arguments to a macro */
|
/* describe the formal arguments to a macro */
|
||||||
|
|
||||||
typedef struct formal_struct
|
typedef struct formal_struct {
|
||||||
{
|
struct formal_struct *next; /* next formal in list */
|
||||||
struct formal_struct *next; /* next formal in list */
|
sb name; /* name of the formal */
|
||||||
sb name; /* name of the formal */
|
sb def; /* the default value */
|
||||||
sb def; /* the default value */
|
sb actual; /* the actual argument (changed on each expansion) */
|
||||||
sb actual; /* the actual argument (changed on each expansion) */
|
int index; /* the index of the formal 0..formal_count-1 */
|
||||||
int index; /* the index of the formal 0..formal_count-1 */
|
} formal_entry;
|
||||||
}
|
|
||||||
formal_entry;
|
|
||||||
|
|
||||||
/* Other values found in the index field of a formal_entry. */
|
/* Other values found in the index field of a formal_entry. */
|
||||||
#define QUAL_INDEX (-1)
|
#define QUAL_INDEX (-1)
|
||||||
@ -55,14 +53,12 @@ formal_entry;
|
|||||||
|
|
||||||
/* describe the macro. */
|
/* describe the macro. */
|
||||||
|
|
||||||
typedef struct macro_struct
|
typedef struct macro_struct {
|
||||||
{
|
sb sub; /* substitution text. */
|
||||||
sb sub; /* substitution text. */
|
int formal_count; /* number of formal args. */
|
||||||
int formal_count; /* number of formal args. */
|
formal_entry *formals; /* pointer to list of formal_structs */
|
||||||
formal_entry *formals; /* pointer to list of formal_structs */
|
struct hash_control *formal_hash; /* hash table of formals. */
|
||||||
struct hash_control *formal_hash; /* hash table of formals. */
|
} macro_entry;
|
||||||
}
|
|
||||||
macro_entry;
|
|
||||||
|
|
||||||
/* Whether any macros have been defined. */
|
/* Whether any macros have been defined. */
|
||||||
|
|
||||||
|
121
gas/messages.c
121
gas/messages.c
@ -1,5 +1,5 @@
|
|||||||
/* messages.c - error reporter -
|
/* messages.c - error reporter -
|
||||||
Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 1998
|
Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 2000
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
|
||||||
@ -47,8 +47,7 @@ static void as_show_where PARAMS ((void));
|
|||||||
static void as_warn_internal PARAMS ((char *, unsigned int, char *));
|
static void as_warn_internal PARAMS ((char *, unsigned int, char *));
|
||||||
static void as_bad_internal PARAMS ((char *, unsigned int, char *));
|
static void as_bad_internal PARAMS ((char *, unsigned int, char *));
|
||||||
|
|
||||||
/*
|
/* Despite the rest of the comments in this file, (FIXME-SOON),
|
||||||
* Despite the rest of the comments in this file, (FIXME-SOON),
|
|
||||||
* here is the current scheme for error messages etc:
|
* here is the current scheme for error messages etc:
|
||||||
*
|
*
|
||||||
* as_fatal() is used when gas is quite confused and
|
* as_fatal() is used when gas is quite confused and
|
||||||
@ -105,7 +104,8 @@ identify (file)
|
|||||||
fprintf (stderr, _("Assembler messages:\n"));
|
fprintf (stderr, _("Assembler messages:\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int warning_count; /* Count of number of warnings issued */
|
/* The number of warnings issued. */
|
||||||
|
static int warning_count;
|
||||||
|
|
||||||
int
|
int
|
||||||
had_warnings ()
|
had_warnings ()
|
||||||
@ -114,7 +114,7 @@ had_warnings ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Nonzero if we've hit a 'bad error', and should not write an obj file,
|
/* Nonzero if we've hit a 'bad error', and should not write an obj file,
|
||||||
and exit with a nonzero error code */
|
and exit with a nonzero error code. */
|
||||||
|
|
||||||
static int error_count;
|
static int error_count;
|
||||||
|
|
||||||
@ -138,11 +138,7 @@ as_show_where ()
|
|||||||
fprintf (stderr, "%s:%u: ", file, line);
|
fprintf (stderr, "%s:%u: ", file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Like perror(3), but with more info. */
|
||||||
* a s _ p e r r o r
|
|
||||||
*
|
|
||||||
* Like perror(3), but with more info.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
as_perror (gripe, filename)
|
as_perror (gripe, filename)
|
||||||
@ -165,18 +161,15 @@ as_perror (gripe, filename)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Send to stderr a string as a warning, and locate warning
|
||||||
* a s _ t s k t s k ()
|
in input file(s).
|
||||||
*
|
Please only use this for when we have some recovery action.
|
||||||
* Send to stderr a string as a warning, and locate warning
|
Please explain in string (which may have '\n's) what recovery was
|
||||||
* in input file(s).
|
done. */
|
||||||
* Please only use this for when we have some recovery action.
|
|
||||||
* Please explain in string (which may have '\n's) what recovery was done.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
void
|
void
|
||||||
as_tsktsk (const char *format,...)
|
as_tsktsk (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
@ -185,7 +178,7 @@ as_tsktsk (const char *format,...)
|
|||||||
vfprintf (stderr, format, args);
|
vfprintf (stderr, format, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
(void) putc ('\n', stderr);
|
(void) putc ('\n', stderr);
|
||||||
} /* as_tsktsk() */
|
}
|
||||||
#else
|
#else
|
||||||
void
|
void
|
||||||
as_tsktsk (format, va_alist)
|
as_tsktsk (format, va_alist)
|
||||||
@ -199,7 +192,7 @@ as_tsktsk (format, va_alist)
|
|||||||
vfprintf (stderr, format, args);
|
vfprintf (stderr, format, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
(void) putc ('\n', stderr);
|
(void) putc ('\n', stderr);
|
||||||
} /* as_tsktsk() */
|
}
|
||||||
#endif /* not NO_STDARG */
|
#endif /* not NO_STDARG */
|
||||||
|
|
||||||
/* The common portion of as_warn and as_warn_where. */
|
/* The common portion of as_warn and as_warn_where. */
|
||||||
@ -226,18 +219,15 @@ as_warn_internal (file, line, buffer)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Send to stderr a string as a warning, and locate warning
|
||||||
* a s _ w a r n ()
|
in input file(s).
|
||||||
*
|
Please only use this for when we have some recovery action.
|
||||||
* Send to stderr a string as a warning, and locate warning
|
Please explain in string (which may have '\n's) what recovery was
|
||||||
* in input file(s).
|
done. */
|
||||||
* Please only use this for when we have some recovery action.
|
|
||||||
* Please explain in string (which may have '\n's) what recovery was done.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
void
|
void
|
||||||
as_warn (const char *format,...)
|
as_warn (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char buffer[2000];
|
char buffer[2000];
|
||||||
@ -249,9 +239,8 @@ as_warn (const char *format,...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
as_warn_internal ((char *) NULL, 0, buffer);
|
as_warn_internal ((char *) NULL, 0, buffer);
|
||||||
}
|
}
|
||||||
} /* as_warn() */
|
}
|
||||||
#else
|
#else
|
||||||
/*VARARGS1 */
|
|
||||||
void
|
void
|
||||||
as_warn (format, va_alist)
|
as_warn (format, va_alist)
|
||||||
const char *format;
|
const char *format;
|
||||||
@ -267,16 +256,16 @@ as_warn (format, va_alist)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
as_warn_internal ((char *) NULL, 0, buffer);
|
as_warn_internal ((char *) NULL, 0, buffer);
|
||||||
}
|
}
|
||||||
} /* as_warn() */
|
}
|
||||||
#endif /* not NO_STDARG */
|
#endif /* not NO_STDARG */
|
||||||
|
|
||||||
/* as_warn_where, like as_bad but the file name and line number are
|
/* Like as_bad but the file name and line number are passed in.
|
||||||
passed in. Unfortunately, we have to repeat the function in order
|
Unfortunately, we have to repeat the function in order to handle
|
||||||
to handle the varargs correctly and portably. */
|
the varargs correctly and portably. */
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
void
|
void
|
||||||
as_warn_where (char *file, unsigned int line, const char *format,...)
|
as_warn_where (char *file, unsigned int line, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char buffer[2000];
|
char buffer[2000];
|
||||||
@ -288,9 +277,8 @@ as_warn_where (char *file, unsigned int line, const char *format,...)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
as_warn_internal (file, line, buffer);
|
as_warn_internal (file, line, buffer);
|
||||||
}
|
}
|
||||||
} /* as_warn() */
|
}
|
||||||
#else
|
#else
|
||||||
/*VARARGS1 */
|
|
||||||
void
|
void
|
||||||
as_warn_where (file, line, format, va_alist)
|
as_warn_where (file, line, format, va_alist)
|
||||||
char *file;
|
char *file;
|
||||||
@ -308,7 +296,7 @@ as_warn_where (file, line, format, va_alist)
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
as_warn_internal (file, line, buffer);
|
as_warn_internal (file, line, buffer);
|
||||||
}
|
}
|
||||||
} /* as_warn() */
|
}
|
||||||
#endif /* not NO_STDARG */
|
#endif /* not NO_STDARG */
|
||||||
|
|
||||||
/* The common portion of as_bad and as_bad_where. */
|
/* The common portion of as_bad and as_bad_where. */
|
||||||
@ -335,18 +323,15 @@ as_bad_internal (file, line, buffer)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Send to stderr a string as a warning, and locate warning in input
|
||||||
* a s _ b a d ()
|
file(s). Please us when there is no recovery, but we want to
|
||||||
*
|
continue processing but not produce an object file.
|
||||||
* Send to stderr a string as a warning, and locate warning in input file(s).
|
Please explain in string (which may have '\n's) what recovery was
|
||||||
* Please us when there is no recovery, but we want to continue processing
|
done. */
|
||||||
* but not produce an object file.
|
|
||||||
* Please explain in string (which may have '\n's) what recovery was done.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
void
|
void
|
||||||
as_bad (const char *format,...)
|
as_bad (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char buffer[2000];
|
char buffer[2000];
|
||||||
@ -359,7 +344,6 @@ as_bad (const char *format,...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/*VARARGS1 */
|
|
||||||
void
|
void
|
||||||
as_bad (format, va_alist)
|
as_bad (format, va_alist)
|
||||||
const char *format;
|
const char *format;
|
||||||
@ -376,13 +360,13 @@ as_bad (format, va_alist)
|
|||||||
}
|
}
|
||||||
#endif /* not NO_STDARG */
|
#endif /* not NO_STDARG */
|
||||||
|
|
||||||
/* as_bad_where, like as_bad but the file name and line number are
|
/* Like as_bad but the file name and line number are passed in.
|
||||||
passed in. Unfortunately, we have to repeat the function in order
|
Unfortunately, we have to repeat the function in order to handle
|
||||||
to handle the varargs correctly and portably. */
|
the varargs correctly and portably. */
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
void
|
void
|
||||||
as_bad_where (char *file, unsigned int line, const char *format,...)
|
as_bad_where (char *file, unsigned int line, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char buffer[2000];
|
char buffer[2000];
|
||||||
@ -395,7 +379,6 @@ as_bad_where (char *file, unsigned int line, const char *format,...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/*VARARGS1 */
|
|
||||||
void
|
void
|
||||||
as_bad_where (file, line, format, va_alist)
|
as_bad_where (file, line, format, va_alist)
|
||||||
char *file;
|
char *file;
|
||||||
@ -414,18 +397,14 @@ as_bad_where (file, line, format, va_alist)
|
|||||||
}
|
}
|
||||||
#endif /* not NO_STDARG */
|
#endif /* not NO_STDARG */
|
||||||
|
|
||||||
/*
|
/* Send to stderr a string as a fatal message, and print location of
|
||||||
* a s _ f a t a l ()
|
error in input file(s).
|
||||||
*
|
Please only use this for when we DON'T have some recovery action.
|
||||||
* Send to stderr a string as a fatal message, and print location of error in
|
It xexit()s with a warning status. */
|
||||||
* input file(s).
|
|
||||||
* Please only use this for when we DON'T have some recovery action.
|
|
||||||
* It xexit()s with a warning status.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef USE_STDARG
|
#ifdef USE_STDARG
|
||||||
void
|
void
|
||||||
as_fatal (const char *format,...)
|
as_fatal (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
@ -436,9 +415,8 @@ as_fatal (const char *format,...)
|
|||||||
(void) putc ('\n', stderr);
|
(void) putc ('\n', stderr);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
xexit (EXIT_FAILURE);
|
xexit (EXIT_FAILURE);
|
||||||
} /* as_fatal() */
|
}
|
||||||
#else
|
#else
|
||||||
/*VARARGS1*/
|
|
||||||
void
|
void
|
||||||
as_fatal (format, va_alist)
|
as_fatal (format, va_alist)
|
||||||
char *format;
|
char *format;
|
||||||
@ -453,13 +431,11 @@ as_fatal (format, va_alist)
|
|||||||
(void) putc ('\n', stderr);
|
(void) putc ('\n', stderr);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
xexit (EXIT_FAILURE);
|
xexit (EXIT_FAILURE);
|
||||||
} /* as_fatal() */
|
}
|
||||||
#endif /* not NO_STDARG */
|
#endif /* not NO_STDARG */
|
||||||
|
|
||||||
/*
|
/* Indicate assertion failure.
|
||||||
* as_assert: Indicate assertion failure.
|
Arguments: Filename, line number, optional function name. */
|
||||||
* Arguments: Filename, line number, optional function name.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
as_assert (file, line, fn)
|
as_assert (file, line, fn)
|
||||||
@ -479,6 +455,7 @@ as_assert (file, line, fn)
|
|||||||
|
|
||||||
/* as_abort: Print a friendly message saying how totally hosed we are,
|
/* as_abort: Print a friendly message saying how totally hosed we are,
|
||||||
and exit without producing a core file. */
|
and exit without producing a core file. */
|
||||||
|
|
||||||
void
|
void
|
||||||
as_abort (file, line, fn)
|
as_abort (file, line, fn)
|
||||||
const char *file, *fn;
|
const char *file, *fn;
|
||||||
@ -536,5 +513,3 @@ sprint_value (buf, val)
|
|||||||
#endif
|
#endif
|
||||||
abort ();
|
abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end of messages.c */
|
|
||||||
|
26
gas/read.c
26
gas/read.c
@ -119,8 +119,7 @@ die horribly;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Used by is_... macros. our ctype[]. */
|
/* Used by is_... macros. our ctype[]. */
|
||||||
char lex_type[256] =
|
char lex_type[256] = {
|
||||||
{
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* @ABCDEFGHIJKLMNO */
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ[\]^_ */
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ[\]^_ */
|
||||||
0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
|
0, 0, 0, LEX_HASH, LEX_DOLLAR, LEX_PCT, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, /* _!"#$%&'()*+,-./ */
|
||||||
@ -141,8 +140,7 @@ char lex_type[256] =
|
|||||||
|
|
||||||
/* In: a character.
|
/* In: a character.
|
||||||
Out: 1 if this character ends a line. */
|
Out: 1 if this character ends a line. */
|
||||||
char is_end_of_line[256] =
|
char is_end_of_line[256] = {
|
||||||
{
|
|
||||||
#ifdef CR_EOL
|
#ifdef CR_EOL
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, /* @abcdefghijklmno */
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, /* @abcdefghijklmno */
|
||||||
#else
|
#else
|
||||||
@ -275,8 +273,7 @@ read_begin ()
|
|||||||
|
|
||||||
static struct hash_control *po_hash;
|
static struct hash_control *po_hash;
|
||||||
|
|
||||||
static const pseudo_typeS potable[] =
|
static const pseudo_typeS potable[] = {
|
||||||
{
|
|
||||||
{"abort", s_abort, 0},
|
{"abort", s_abort, 0},
|
||||||
{"align", s_align_ptwo, 0},
|
{"align", s_align_ptwo, 0},
|
||||||
{"ascii", stringer, 0},
|
{"ascii", stringer, 0},
|
||||||
@ -610,10 +607,10 @@ read_a_source_file (name)
|
|||||||
symbol in the symbol table. */
|
symbol in the symbol table. */
|
||||||
if (!mri_line_macro
|
if (!mri_line_macro
|
||||||
#ifdef TC_START_LABEL_WITHOUT_COLON
|
#ifdef TC_START_LABEL_WITHOUT_COLON
|
||||||
&& TC_START_LABEL_WITHOUT_COLON(c,
|
&& TC_START_LABEL_WITHOUT_COLON(c,
|
||||||
input_line_pointer)
|
input_line_pointer)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
line_label = colon (line_start);
|
line_label = colon (line_start);
|
||||||
else
|
else
|
||||||
line_label = symbol_create (line_start,
|
line_label = symbol_create (line_start,
|
||||||
@ -659,13 +656,13 @@ read_a_source_file (name)
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
/* Find the end of the current expanded macro line. */
|
/* Find the end of the current expanded macro line. */
|
||||||
for (s = input_line_pointer - 1; *s ; ++s)
|
for (s = input_line_pointer - 1; *s; ++s)
|
||||||
if (is_end_of_line[(unsigned char) *s])
|
if (is_end_of_line[(unsigned char) *s])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Copy it for safe keeping. Also give an indication of
|
/* Copy it for safe keeping. Also give an indication of
|
||||||
how much macro nesting is involved at this point. */
|
how much macro nesting is involved at this point. */
|
||||||
len = s - (input_line_pointer-1);
|
len = s - (input_line_pointer - 1);
|
||||||
copy = (char *) xmalloc (len + macro_nest + 2);
|
copy = (char *) xmalloc (len + macro_nest + 2);
|
||||||
memset (copy, '>', macro_nest);
|
memset (copy, '>', macro_nest);
|
||||||
copy[macro_nest] = ' ';
|
copy[macro_nest] = ' ';
|
||||||
@ -745,7 +742,7 @@ read_a_source_file (name)
|
|||||||
|
|
||||||
strncpy (original_case_string, s2, sizeof (original_case_string));
|
strncpy (original_case_string, s2, sizeof (original_case_string));
|
||||||
original_case_string[sizeof (original_case_string) - 1] = 0;
|
original_case_string[sizeof (original_case_string) - 1] = 0;
|
||||||
|
|
||||||
while (*s2)
|
while (*s2)
|
||||||
{
|
{
|
||||||
if (isupper ((unsigned char) *s2))
|
if (isupper ((unsigned char) *s2))
|
||||||
@ -2094,7 +2091,7 @@ s_lcomm_internal (needs_align, bytes_p)
|
|||||||
if (align)
|
if (align)
|
||||||
frag_align (align, 0, 0);
|
frag_align (align, 0, 0);
|
||||||
|
|
||||||
/* Detach from old frag. */
|
/* Detach from old frag. */
|
||||||
if (S_GET_SEGMENT (symbolP) == bss_seg)
|
if (S_GET_SEGMENT (symbolP) == bss_seg)
|
||||||
symbol_get_frag (symbolP)->fr_symbol = NULL;
|
symbol_get_frag (symbolP)->fr_symbol = NULL;
|
||||||
|
|
||||||
@ -3819,7 +3816,8 @@ parse_bitfield_cons (exp, nbytes)
|
|||||||
break;
|
break;
|
||||||
} /* Won't fit. */
|
} /* Won't fit. */
|
||||||
|
|
||||||
hold = ++input_line_pointer; /* skip ':' */
|
/* Skip ':'. */
|
||||||
|
hold = ++input_line_pointer;
|
||||||
|
|
||||||
(void) expression (exp);
|
(void) expression (exp);
|
||||||
if (exp->X_op != O_constant)
|
if (exp->X_op != O_constant)
|
||||||
|
@ -19,9 +19,7 @@
|
|||||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
02111-1307, USA. */
|
02111-1307, USA. */
|
||||||
|
|
||||||
/*
|
/* Segments & sub-segments. */
|
||||||
* Segments & sub-segments.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "as.h"
|
#include "as.h"
|
||||||
|
|
||||||
@ -41,8 +39,7 @@ segment_info_type segment_info[SEG_MAXIMUM_ORDINAL];
|
|||||||
frchainS *data0_frchainP, *bss0_frchainP;
|
frchainS *data0_frchainP, *bss0_frchainP;
|
||||||
|
|
||||||
#endif /* MANY_SEGMENTS */
|
#endif /* MANY_SEGMENTS */
|
||||||
char const *const seg_name[] =
|
char const *const seg_name[] = {
|
||||||
{
|
|
||||||
"absolute",
|
"absolute",
|
||||||
#ifdef MANY_SEGMENTS
|
#ifdef MANY_SEGMENTS
|
||||||
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9",
|
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9",
|
||||||
@ -567,8 +564,7 @@ section_symbol (sec)
|
|||||||
/* Return whether the specified segment is thought to hold text. */
|
/* Return whether the specified segment is thought to hold text. */
|
||||||
|
|
||||||
#ifndef BFD_ASSEMBLER
|
#ifndef BFD_ASSEMBLER
|
||||||
const char * const nontext_section_names[] =
|
const char * const nontext_section_names[] = {
|
||||||
{
|
|
||||||
".eh_frame",
|
".eh_frame",
|
||||||
".gcc_except_table",
|
".gcc_except_table",
|
||||||
#ifdef OBJ_COFF
|
#ifdef OBJ_COFF
|
||||||
|
@ -64,8 +64,7 @@ extern frchainS *frchain_root;
|
|||||||
frag chain, even if it contains no (complete) frags. */
|
frag chain, even if it contains no (complete) frags. */
|
||||||
extern frchainS *frchain_now;
|
extern frchainS *frchain_now;
|
||||||
|
|
||||||
typedef struct segment_info_struct
|
typedef struct segment_info_struct {
|
||||||
{
|
|
||||||
frchainS *frchainP;
|
frchainS *frchainP;
|
||||||
unsigned int hadone : 1;
|
unsigned int hadone : 1;
|
||||||
|
|
||||||
@ -103,13 +102,12 @@ typedef struct segment_info_struct
|
|||||||
symbolS *sym;
|
symbolS *sym;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
union
|
union {
|
||||||
{
|
/* Current size of section holding stabs strings. */
|
||||||
/* Current size of section holding stabs strings. */
|
unsigned long stab_string_size;
|
||||||
unsigned long stab_string_size;
|
/* Initial frag for ELF. */
|
||||||
/* Initial frag for ELF. */
|
char *p;
|
||||||
char *p;
|
}
|
||||||
}
|
|
||||||
stabu;
|
stabu;
|
||||||
|
|
||||||
#ifdef NEED_LITERAL_POOL
|
#ifdef NEED_LITERAL_POOL
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#ifndef TC_FIX_ADJUSTABLE
|
#ifndef TC_FIX_ADJUSTABLE
|
||||||
#define TC_FIX_ADJUSTABLE(fix) 1
|
#define TC_FIX_ADJUSTABLE(fix) 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MD_PCREL_FROM_SECTION
|
#ifndef MD_PCREL_FROM_SECTION
|
||||||
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from(FIXP)
|
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from(FIXP)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user