* app.c: Fix formatting.
* as.c: Likewise.
* as.h: Likewise.
* bit_fix.h: Likewise.
* cgen.c: Likewise.
* cgen.h: Likewise.
* cond.c: Likewise.
+2000-10-12 Kazu Hirata <kazu@hxi.com>
+
+ * app.c: Fix formatting.
+ * as.c: Likewise.
+ * as.h: Likewise.
+ * bit_fix.h: Likewise.
+ * cgen.c: Likewise.
+ * cgen.h: Likewise.
+ * cond.c: Likewise.
+
2000-10-11 Alan Modra <alan@linuxcare.com.au>
* config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change.
state at the time .include is interpreted is completely unrelated.
That's why we have to save it all. */
-struct app_save
- {
- int state;
- int old_state;
- char * out_string;
- char out_buf[sizeof (out_buf)];
- int add_newlines;
- char * saved_input;
- int saved_input_len;
+struct app_save {
+ int state;
+ int old_state;
+ char * out_string;
+ char out_buf[sizeof (out_buf)];
+ int add_newlines;
+ char * saved_input;
+ int saved_input_len;
#ifdef TC_M68K
- int scrub_m68k_mri;
+ int scrub_m68k_mri;
#endif
- const char * mri_state;
- char mri_last_ch;
+ const char * mri_state;
+ char mri_last_ch;
#if defined TC_ARM && defined OBJ_ELF
- const char * symver_state;
+ const char * symver_state;
#endif
- };
+};
char *
app_push ()
}
#ifdef KEEP_WHITE_AROUND_COLON
- if (lex[ch] == LEX_IS_COLON)
- {
- /* only keep this white if there's no white *after* the colon */
- ch2 = GET ();
- UNGET (ch2);
- if (!IS_WHITESPACE (ch2))
- {
- state = 9;
- UNGET (ch);
- PUT (' ');
- break;
- }
- }
+ if (lex[ch] == LEX_IS_COLON)
+ {
+ /* Only keep this white if there's no white *after* the
+ colon. */
+ ch2 = GET ();
+ UNGET (ch2);
+ if (!IS_WHITESPACE (ch2))
+ {
+ state = 9;
+ UNGET (ch);
+ PUT (' ');
+ break;
+ }
+ }
#endif
if (IS_COMMENT (ch)
|| ch == '/'
case LEX_IS_COLON:
#ifdef KEEP_WHITE_AROUND_COLON
- state = 9;
+ state = 9;
#else
if (state == 9 || state == 10)
state = 3;
#ifdef TC_V850
case LEX_IS_DOUBLEDASH_1ST:
- ch2 = GET();
+ ch2 = GET ();
if (ch2 != '-')
{
UNGET (ch2);
#endif
#ifdef DOUBLEBAR_PARALLEL
case LEX_IS_DOUBLEBAR_1ST:
- ch2 = GET();
+ ch2 = GET ();
if (ch2 != '|')
{
UNGET (ch2);
Trap is the only short insn that has a first operand that is
neither register nor label.
We must prevent exef0f ||trap #1 to degenerate to exef0f ||trap#1 .
- We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is already
- LEX_IS_LINE_COMMENT_START. However, it is the only character in
- line_comment_chars for d10v, hence we can recognize it as such. */
+ We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is
+ already LEX_IS_LINE_COMMENT_START. However, it is the
+ only character in line_comment_chars for d10v, hence we
+ can recognize it as such. */
/* An alternative approach would be to reset the state to 1 when
we see '||', '<'- or '->', but that seems to be overkill. */
- if (state == 10) PUT (' ');
+ if (state == 10)
+ PUT (' ');
#endif
/* We have a line comment character which is not at the
start of a line. If this is also a normal comment
#if defined TC_ARM && defined OBJ_ELF
/* On the ARM, `@' is the comment character.
Unfortunately this is also a special character in ELF .symver
- directives (and .type, though we deal with those another way). So
- we check if this line is such a directive, and treat the character
- as default if so. This is a hack. */
+ directives (and .type, though we deal with those another way).
+ So we check if this line is such a directive, and treat
+ the character as default if so. This is a hack. */
if ((symver_state != NULL) && (*symver_state == 0))
goto de_fault;
#endif
{
int type;
- ch2 = * (unsigned char *) s;
+ ch2 = *(unsigned char *) s;
type = lex[ch2];
if (type != 0
&& type != LEX_IS_SYMBOL_COMPONENT)
/* We build a list of defsyms as we read the options, and then define
them after we have initialized everything. */
-struct defsym_list
-{
+struct defsym_list {
struct defsym_list *next;
char *name;
valueT value;
/* Keep a record of the itbl files we read in. */
-struct itbl_file_list
-{
+struct itbl_file_list {
struct itbl_file_list *next;
char *name;
};
char *shortopts;
extern CONST char *md_shortopts;
- static const char std_shortopts[] =
- {
- '-', 'J',
+ static const char std_shortopts[] = {
+ '-', 'J',
#ifndef WORKING_DOT_WORD
- /* -K is not meaningful if .word is not being hacked. */
- 'K',
+ /* -K is not meaningful if .word is not being hacked. */
+ 'K',
#endif
- 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
+ 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':',
#ifndef VMS
- /* -v takes an argument on VMS, so we don't make it a generic
- option. */
- 'v',
+ /* -v takes an argument on VMS, so we don't make it a generic
+ option. */
+ 'v',
#endif
- 'w', 'X',
- /* New option for extending instruction set (see also --itbl below) */
- 't', ':',
- '\0'
- };
+ 'w', 'X',
+ /* New option for extending instruction set (see also --itbl below) */
+ 't', ':',
+ '\0'
+ };
struct option *longopts;
extern struct option md_longopts[];
extern size_t md_longopts_size;
VMS code in md_parse_option can return 0 in that case,
but it has no way of pushing the filename argument back. */
if (optarg && *optarg)
- new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL;
+ new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL;
else
#else
case 'v':
#ifndef GAS
#define GAS 1
-/*
- * I think this stuff is largely out of date. xoxorich.
+/* I think this stuff is largely out of date. xoxorich.
*
* CAPITALISED names are #defined.
* "lowercaseH" is #defined if "lowercase.h" has been #include-d.
#include "asintl.h"
-#define BAD_CASE(val) \
-{ \
- as_fatal(_("Case value %ld unexpected at line %d of file \"%s\"\n"), \
- (long) val, __LINE__, __FILE__); \
- }
+#define BAD_CASE(val) \
+ { \
+ as_fatal (_("Case value %ld unexpected at line %d of file \"%s\"\n"), \
+ (long) val, __LINE__, __FILE__); \
+ }
\f
#include "flonum.h"
\f
/* input_scrub.c */
-/*
- * Supplies sanitised buffers to read.c.
- * Also understands printing line-number part of error messages.
- */
+/* Supplies sanitised buffers to read.c.
+ Also understands printing line-number part of error messages. */
\f
-
/* subsegs.c Sub-segments. Also, segment(=expression type)s.*/
#ifndef BFD_ASSEMBLER
#define SEG_LIST SEG_TEXT,SEG_DATA,SEG_BSS
#endif
-typedef enum _segT
- {
- SEG_ABSOLUTE = 0,
- SEG_LIST,
- SEG_UNKNOWN,
- SEG_GOOF, /* Only happens if AS has a logic error. */
- /* Invented so we don't crash printing */
- /* error message involving weird segment. */
- SEG_EXPR, /* Intermediate expression values. */
- SEG_DEBUG, /* Debug segment */
- SEG_NTV, /* Transfert vector preload segment */
- SEG_PTV, /* Transfert vector postload segment */
- SEG_REGISTER /* Mythical: a register-valued expression */
- } segT;
+typedef enum _segT {
+ SEG_ABSOLUTE = 0,
+ SEG_LIST,
+ SEG_UNKNOWN,
+ SEG_GOOF, /* Only happens if AS has a logic error. */
+ /* Invented so we don't crash printing */
+ /* error message involving weird segment. */
+ SEG_EXPR, /* Intermediate expression values. */
+ SEG_DEBUG, /* Debug segment */
+ SEG_NTV, /* Transfert vector preload segment */
+ SEG_PTV, /* Transfert vector postload segment */
+ SEG_REGISTER /* Mythical: a register-valued expression */
+} segT;
#define SEG_MAXIMUM_ORDINAL (SEG_REGISTER)
#else
/* relax() */
-enum _relax_state
- {
- /* Variable chars to be repeated fr_offset times.
- Fr_symbol unused. Used with fr_offset == 0 for a
- constant length frag. */
- rs_fill = 1,
-
- /* Align. The fr_offset field holds the power of 2 to which to
- align. The fr_var field holds the number of characters in the
- fill pattern. The fr_subtype field holds the maximum number of
- bytes to skip when aligning, or 0 if there is no maximum. */
- rs_align,
-
- /* Align code. The fr_offset field holds the power of 2 to which
- to align. This type is only generated by machine specific
- code, which is normally responsible for handling the fill
- pattern. The fr_subtype field holds the maximum number of
- bytes to skip when aligning, or 0 if there is no maximum. */
- rs_align_code,
-
- /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
- character. */
- rs_org,
+enum _relax_state {
+ /* Variable chars to be repeated fr_offset times.
+ Fr_symbol unused. Used with fr_offset == 0 for a
+ constant length frag. */
+ rs_fill = 1,
+
+ /* Align. The fr_offset field holds the power of 2 to which to
+ align. The fr_var field holds the number of characters in the
+ fill pattern. The fr_subtype field holds the maximum number of
+ bytes to skip when aligning, or 0 if there is no maximum. */
+ rs_align,
+
+ /* Align code. The fr_offset field holds the power of 2 to which
+ to align. This type is only generated by machine specific
+ code, which is normally responsible for handling the fill
+ pattern. The fr_subtype field holds the maximum number of
+ bytes to skip when aligning, or 0 if there is no maximum. */
+ rs_align_code,
+
+ /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill
+ character. */
+ rs_org,
#ifndef WORKING_DOT_WORD
- /* JF: gunpoint */
- rs_broken_word,
+ /* JF: gunpoint */
+ rs_broken_word,
#endif
- /* machine-specific relaxable (or similarly alterable) instruction */
- rs_machine_dependent,
+ /* machine-specific relaxable (or similarly alterable) instruction */
+ rs_machine_dependent,
- /* .space directive with expression operand that needs to be computed
- later. Similar to rs_org, but different.
- fr_symbol: operand
- 1 variable char: fill character */
- rs_space,
+ /* .space directive with expression operand that needs to be computed
+ later. Similar to rs_org, but different.
+ fr_symbol: operand
+ 1 variable char: fill character */
+ rs_space,
- /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for
- unsigned, 1 for signed. */
- rs_leb128,
+ /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for
+ unsigned, 1 for signed. */
+ rs_leb128,
- /* Exception frame information which we may be able to optimize. */
- rs_cfa
- };
+ /* Exception frame information which we may be able to optimize. */
+ rs_cfa
+};
typedef enum _relax_state relax_stateT;
/* Type of debugging information we should generate. We currently
support stabs, ECOFF, and DWARF2. */
-enum debug_info_type
- {
- DEBUG_UNSPECIFIED,
- DEBUG_NONE,
- DEBUG_STABS,
- DEBUG_ECOFF,
- DEBUG_DWARF,
- DEBUG_DWARF2
- };
+enum debug_info_type {
+ DEBUG_UNSPECIFIED,
+ DEBUG_NONE,
+ DEBUG_STABS,
+ DEBUG_ECOFF,
+ DEBUG_DWARF,
+ DEBUG_DWARF2
+};
extern enum debug_info_type debug_type;
\f
increase malloc calls for monitoring memory allocation. */
extern int chunksize;
-struct _pseudo_type
- {
- /* assembler mnemonic, lower case, no '.' */
- const char *poc_name;
- /* Do the work */
- void (*poc_handler) PARAMS ((int));
- /* Value to pass to handler */
- int poc_val;
- };
+struct _pseudo_type {
+ /* assembler mnemonic, lower case, no '.' */
+ const char *poc_name;
+ /* Do the work */
+ void (*poc_handler) PARAMS ((int));
+ /* Value to pass to handler */
+ int poc_val;
+};
typedef struct _pseudo_type pseudo_typeS;
#ifndef __bit_fix_h__
#define __bit_fix_h__
-struct bit_fix
- {
- int fx_bit_size; /* Length of bitfield */
- int fx_bit_offset; /* Bit offset to bitfield */
- long fx_bit_base; /* Where do we apply the bitfix.
- If this is zero, default is assumed. */
- long fx_bit_base_adj; /* Adjustment of base */
- long fx_bit_max; /* Signextended max for bitfield */
- long fx_bit_min; /* Signextended min for bitfield */
- long fx_bit_add; /* Or mask, used for huffman prefix */
- };
+struct bit_fix {
+ int fx_bit_size; /* Length of bitfield */
+ int fx_bit_offset; /* Bit offset to bitfield */
+ long fx_bit_base; /* Where do we apply the bitfix.
+ If this is zero, default is assumed. */
+ long fx_bit_base_adj; /* Adjustment of base */
+ long fx_bit_max; /* Signextended max for bitfield */
+ long fx_bit_min; /* Signextended min for bitfield */
+ long fx_bit_add; /* Or mask, used for huffman prefix */
+};
typedef struct bit_fix bit_fixS;
#endif /* __bit_fix_h__ */
OPINDEX is the index in the operand table.
OPINFO is something the caller chooses to help in reloc determination. */
-struct fixup
-{
+struct fixup {
int opindex;
int opinfo;
expressionS exp;
/* We need to generate a fixup for this expression. */
if (num_fixups >= GAS_CGEN_MAX_FIXUPS)
as_fatal (_("too many fixups"));
- fixups[num_fixups].exp = * expP;
+ fixups[num_fixups].exp = *expP;
fixups[num_fixups].opindex = opindex;
fixups[num_fixups].opinfo = opinfo;
++ num_fixups;
*resultP = CGEN_PARSE_OPERAND_RESULT_REGISTER;
break;
default:
- queue_fixup (opindex, opinfo, & exp);
+ queue_fixup (opindex, opinfo, &exp);
*valueP = 0;
*resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
break;
/* Struct defining result of gas_cgen_finish_insn. */
typedef struct {
/* frag containing the insn */
- fragS * frag;
+ fragS *frag;
/* Address of insn in frag. */
- char * addr;
+ char *addr;
/* Number of fixups this insn has. */
int num_fixups;
/* Array of fixups. */
- fixS * fixups[GAS_CGEN_MAX_FIXUPS];
+ fixS *fixups[GAS_CGEN_MAX_FIXUPS];
} finished_insnS;
/* Callback for operand parsing.
extern void gas_cgen_save_fixups PARAMS ((void));
extern void gas_cgen_restore_fixups PARAMS ((void));
extern void gas_cgen_swap_fixups PARAMS ((void));
-
+
/* 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. */
scanned. */
struct obstack cond_obstack;
-struct file_line
-{
+struct file_line {
char *file;
unsigned int line;
};
/* We push one of these structures for each .if, and pop it at the
.endif. */
-struct conditional_frame
-{
+struct conditional_frame {
/* The source file & line number of the "if". */
struct file_line if_file_line;
/* The source file & line of the "else". */