2001-01-14 Kazu Hirata <kazu@hxi.com>

* config/tc-arc.c: Fix formatting.
This commit is contained in:
Kazu Hirata 2001-01-15 01:37:20 +00:00
parent badd2b1e70
commit 19203624a6
2 changed files with 201 additions and 202 deletions

View File

@ -15,6 +15,8 @@
* config/tc-arc.c: Fix formatting.
* config/tc-arc.c: Fix formatting.
2001-01-14 Alan Modra <alan@linuxcare.com.au>
* config/tc-hppa.c (pa_build_unwind_subspace): Use SEGREL32 for

View File

@ -15,8 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#include <stdio.h>
#include <ctype.h>
@ -73,8 +74,7 @@ const struct syntax_classes {
#define MAXSYNTAXCLASS (sizeof (syntaxclass) / sizeof (struct syntax_classes))
const pseudo_typeS md_pseudo_table[] =
{
const pseudo_typeS md_pseudo_table[] = {
{ "align", s_align_bytes, 0 }, /* Defaulting is invalid (0) */
{ "comm", arc_common, 0 },
{ "common", arc_common, 0 },
@ -139,8 +139,7 @@ static int cpu_tables_init_p = 0;
static struct hash_control *arc_suffix_hash = NULL;
const char *md_shortopts = "";
struct option md_longopts[] =
{
struct option md_longopts[] = {
#define OPTION_EB (OPTION_MD_BASE + 0)
{"EB", no_argument, NULL, OPTION_EB},
#define OPTION_EL (OPTION_MD_BASE + 1)
@ -164,12 +163,8 @@ size_t md_longopts_size = sizeof (md_longopts);
struct arc_operand_value *get_ext_suffix (char *s);
/*
* md_parse_option
*
* Invocation line includes a switch not recognized by the base assembler.
* See if it's a processor-specific option.
*/
/* Invocation line includes a switch not recognized by the base assembler.
See if it's a processor-specific option. */
int
md_parse_option (c, arg)
@ -360,8 +355,7 @@ arc_insert_operand (insn, operand, mods, reg, val, file, line)
we go, because that would require us to first create the frag, and
that would screw up references to ``.''. */
struct arc_fixup
{
struct arc_fixup {
/* index into `arc_operands' */
int opindex;
expressionS exp;
@ -608,7 +602,8 @@ md_assemble (str)
}
++syn;
if (!found)
; /* Wrong type. Just go on to try next insn entry. */
/* Wrong type. Just go on to try next insn entry. */
;
else
{
if (num_suffixes == MAX_SUFFIXES)
@ -668,7 +663,7 @@ md_assemble (str)
as_fatal ("too many fixups");
fixups[fc].exp = exp;
/* We don't support shimm relocs. break here to force
the assembler to output a limm */
the assembler to output a limm. */
#define IS_REG_SHIMM_OFFSET(o) ((o) == 'd')
if (IS_REG_SHIMM_OFFSET (*syn))
break;
@ -682,7 +677,7 @@ md_assemble (str)
{
const char *junk;
limm_reloc_p = 1;
/* save this, we don't yet know what reloc to use */
/* Save this, we don't yet know what reloc to use. */
fix_up_at = fc;
/* Tell insert_reg we need a limm. This is
needed because the value at this point is
@ -838,7 +833,7 @@ md_assemble (str)
if (arc_operands[fixups[i].opindex].flags & ARC_OPERAND_LIMM)
{
/* modify the fixup addend as required by the cpu */
/* Modify the fixup addend as required by the cpu. */
fixups[i].exp.X_add_number += arc_limm_fixup_adjust (insn);
op_type = fixups[i].opindex;
/* FIXME: can we add this data to the operand table? */
@ -882,9 +877,7 @@ md_assemble (str)
else
as_bad (last_errmsg);
}
static void
arc_extoper (opertype)
int opertype;
@ -1041,7 +1034,7 @@ arc_extoper (opertype)
if (opertype)
{
/* if the symbol already exists, point it at the new definition */
/* If the symbol already exists, point it at the new definition. */
if ((symbolP = symbol_find (name)))
{
if (S_GET_SEGMENT (symbolP) == reg_section)
@ -1057,7 +1050,7 @@ arc_extoper (opertype)
}
else
{
/* If its not there, add it */
/* If its not there, add it. */
symbol_table_insert (symbol_create (name, reg_section,
(int) &ext_oper->operand, &zero_address_frag));
}
@ -1071,8 +1064,8 @@ arc_extoper (opertype)
ext_oper->next = arc_ext_operands;
arc_ext_operands = ext_oper;
/* ok, now that we know what this operand is, put a description
in the arc extension section of the output file */
/* OK, now that we know what this operand is, put a description in
the arc extension section of the output file. */
old_sec = now_seg;
old_subsec = now_subseg;
@ -1127,7 +1120,7 @@ arc_extoper (opertype)
subseg_set (old_sec, old_subsec);
/* enter all registers into the symbol table */
/* Enter all registers into the symbol table. */
demand_empty_rest_of_line ();
}
@ -1325,8 +1318,8 @@ arc_extinst (ignore)
ext_op->next_dis = arc_ext_opcodes;
arc_ext_opcodes = ext_op;
/* ok, now that we know what this inst is, put a description in
the arc extension section of the output file */
/* OK, now that we know what this inst is, put a description in the
arc extension section of the output file. */
old_sec = now_seg;
old_subsec = now_subseg;
@ -1446,9 +1439,10 @@ arc_common (localScope)
subseg_set (bss_section, 0); /* ??? subseg_set (bss_section, 1); ??? */
if (align)
frag_align (align, 0, 0); /* do alignment */
/* Do alignment. */
frag_align (align, 0, 0);
/* detach from old frag */
/* Detach from old frag. */
if (S_GET_SEGMENT (symbolP) == bss_section)
symbolP->sy_frag->fr_symbol = NULL;
@ -1476,9 +1470,7 @@ arc_common (localScope)
demand_empty_rest_of_line ();
return;
}
/* Select the cpu we're assembling for. */
static void
@ -1528,12 +1520,11 @@ arc_option (ignore)
as_bad ("invalid identifier for \".option\"");
ignore_rest_of_line ();
}
/* Turn a string in input_line_pointer into a floating point constant of type
type, and store the appropriate bytes in *litP. The number of LITTLENUMS
emitted is stored in *sizeP.
An error message is returned, or NULL on OK. */
/* Turn a string in input_line_pointer into a floating point constant
of type TYPE, and store the appropriate bytes in *LITP. The number
of LITTLENUMS emitted is stored in *SIZEP. An error message is
returned, or NULL on OK. */
/* Equal to MAX_PRECISION in atof-ieee.c */
#define MAX_LITTLENUMS 6
@ -1644,9 +1635,11 @@ arc_code_symbol(expressionP)
two.X_add_number = 2;
expressionP->X_op_symbol = make_expr_symbol (&two);
}
/* allow %st(sym1-sym2) */
else if (expressionP->X_op == O_subtract && expressionP->X_add_symbol != NULL
&& expressionP->X_op_symbol != NULL && expressionP->X_add_number == 0)
/* Allow %st(sym1-sym2) */
else if (expressionP->X_op == O_subtract
&& expressionP->X_add_symbol != NULL
&& expressionP->X_op_symbol != NULL
&& expressionP->X_add_number == 0)
{
expressionS two;
expressionP->X_add_symbol = make_expr_symbol (expressionP);
@ -1693,7 +1686,7 @@ md_operand (expressionP)
arc_code_symbol (expressionP);
}
else
{ /* it could be a register */
{ /* It could be a register. */
int i, l;
struct arc_ext_operand_value *ext_oper = arc_ext_operands;
p++;
@ -1885,7 +1878,9 @@ md_apply_fix3 (fixP, valueP, seg)
valueT *valueP;
segT seg;
{
/*char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;*/
#if 0
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
#endif
valueT value;
/* FIXME FIXME FIXME: The value we are passed in *valueP includes
@ -2057,14 +2052,16 @@ tc_gen_reloc (section, fixP)
{
as_bad_where (fixP->fx_file, fixP->fx_line,
"internal error: can't export reloc type %d (`%s')",
fixP->fx_r_type, bfd_get_reloc_code_name (fixP->fx_r_type));
fixP->fx_r_type,
bfd_get_reloc_code_name (fixP->fx_r_type));
return NULL;
}
assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
/* set addend to account for PC being advanced one insn before the target
address is computed, drop fx_addnumber as it is handled elsewhere mlm */
/* Set addend to account for PC being advanced one insn before the
target address is computed, drop fx_addnumber as it is handled
elsewhere mlm */
reloc->addend = (fixP->fx_pcrel ? -4 : 0);