Fix formatting

This commit is contained in:
Nick Clifton 2000-07-10 19:09:51 +00:00
parent 3dd5103bb4
commit 1aea3bb851
2 changed files with 633 additions and 601 deletions

View File

@ -1,6 +1,7 @@
2000-07-10 Kazu Hirata <kazu@hxi.com>
* config/tc-h8500.c: Fix formatting.
* config/tc-tic54x.c: Fix formatting.
2000-07-10 Alan Modra <alan@linuxcare.com.au>

View File

@ -68,8 +68,13 @@ const char EXP_CHARS[] = "eE";
/* Only word (et al.), align, or conditionals are allowed within
.struct/.union. */
#define ILLEGAL_WITHIN_STRUCT() \
do if (current_stag != NULL){ \
as_bad (_("pseudo-op illegal within .struct/.union"));return; } while (0)
do \
if (current_stag != NULL) \
{ \
as_bad (_("pseudo-op illegal within .struct/.union")); \
return; \
} \
while (0)
void
md_show_usage (stream)
@ -109,7 +114,9 @@ struct option md_longopts[] =
{ "mfar-mode", no_argument, NULL, OPTION_ADDRESS_MODE },
{ "mf", no_argument, NULL, OPTION_ADDRESS_MODE },
{ "mcpu", required_argument, NULL, OPTION_CPU_VERSION },
/* { "mcoff-version", required_argument, NULL, OPTION_COFF_VERSION },*/
#if 0
{ "mcoff-version", required_argument, NULL, OPTION_COFF_VERSION },
#endif
{ "merrors-to-file", required_argument, NULL, OPTION_STDERR_TO_FILE },
{ "me", required_argument, NULL, OPTION_STDERR_TO_FILE },
{ NULL, no_argument, NULL, 0},
@ -563,7 +570,8 @@ stag_add_field_symbols (stag, path, base_offset, rootsym, root_stag_name)
}
else
{
char *replacement = xmalloc (strlen (name) + strlen (stag->name) + 2);
char *replacement = xmalloc (strlen (name)
+ strlen (stag->name) + 2);
strcpy (replacement, S_GET_NAME (rootsym));
strcat (replacement, "+");
strcat (replacement, root_stag_name);
@ -599,7 +607,8 @@ stag_add_field (parent, name, offset, stag)
sfield->stag = stag;
if (parent->field == NULL)
parent->field = sfield;
else {
else
{
struct stag_field *sf = parent->field;
while (sf->next != NULL)
sf = sf->next;
@ -786,6 +795,7 @@ tic54x_tag (ignore)
else
{
char label[strlen (S_GET_NAME (line_label)) + 1];
strcpy (label, S_GET_NAME (line_label));
if (current_stag != NULL)
stag_add_field (current_stag, label,
@ -866,11 +876,13 @@ tic54x_struct_field (int type)
/* Set the appropriate size and new field offset. */
if (count == 32)
{
size = 2; count = 1;
size = 2;
count = 1;
}
else if (count > 16)
{
size = 1; count = 1;
size = 1;
count = 1;
new_bitfield_offset = count - 16;
}
else
@ -2376,7 +2388,9 @@ const pseudo_typeS md_pseudo_table[] =
{ "emsg", tic54x_message, 'e' },
{ "mmsg", tic54x_message, 'm' },
{ "wmsg", tic54x_message, 'w' },
/*{ "end", s_end, 0 }, */
#if 0
{ "end", s_end, 0 },
#endif
{ "far_mode", tic54x_address_mode, far_mode },
{ "fclist", tic54x_fclist, 1 },
{ "fcnolist", tic54x_fclist, 0 },
@ -2401,8 +2415,10 @@ const pseudo_typeS md_pseudo_table[] =
{ "label", tic54x_label, 0 }, /* loadtime address */
{ "length", s_ignore, 0 },
{ "width", s_ignore, 0 },
/*{ "list", listing_list, 1 }, */
/*{ "nolist", listing_list, 0 }, */
#if 0
{ "list", listing_list, 1 },
{ "nolist", listing_list, 0 },
#endif
{ "long", tic54x_cons, 'l' },
{ "ulong", tic54x_cons, 'L' },
{ "xlong", tic54x_cons, 'x' },
@ -2416,7 +2432,9 @@ const pseudo_typeS md_pseudo_table[] =
{ "newblock", tic54x_clear_local_labels, 0 },
{ "option", s_ignore, 0 },
{ "p2align", tic54x_p2align, 0 },
/*{ "page", listing_eject, 0 }, */
#if 0
{ "page", listing_eject, 0 },
#endif
{ "sblock", tic54x_sblock, 0 },
{ "sect", tic54x_sect, '*' },
{ "set", tic54x_set, 0 },
@ -2432,7 +2450,9 @@ const pseudo_typeS md_pseudo_table[] =
{ "endstruct", tic54x_endstruct, 0 },
{ "tab", s_ignore, 0 },
{ "text", tic54x_sect, 't' },
/*{ "title", listing_title, 0 }, */
#if 0
{ "title", listing_title, 0 },
#endif
{ "union", tic54x_struct, 1 },
{ "endunion", tic54x_endstruct, 1 },
{ "usect", tic54x_usect, 0 },
@ -3054,13 +3074,15 @@ md_begin ()
if (A_DIR != NULL)
{
char *tmp = xstrdup (A_DIR);
do {
do
{
char *next = strchr (tmp, ';');
if (next)
*next++ = '\0';
add_include_dir (tmp);
tmp = next;
} while (tmp != NULL);
}
while (tmp != NULL);
}
op_hash = hash_new ();
@ -3074,7 +3096,9 @@ md_begin ()
opcode->name, hash_err);
}
parop_hash = hash_new ();
for (paropcode=(partemplate *)tic54x_paroptab; paropcode->name; paropcode++)
for (paropcode = (partemplate *) tic54x_paroptab;
paropcode->name;
paropcode++)
{
if (hash_find (parop_hash, paropcode->name))
continue;
@ -3970,9 +3994,11 @@ encode_operand (insn, type, operand)
case OP_MMR:
{
int value = operand->exp.X_add_number;
if (type == OP_MMR)
insn->opcode[0].word |= value;
else {
else
{
if (value < 16 || value > 24)
{
as_bad (_("Memory mapped register \"%s\" out of range"),
@ -4109,6 +4135,7 @@ emit_insn (insn)
tic54x_insn *insn;
{
int i;
for (i = 0; i < insn->words; i++)
{
int size = (insn->opcode[i].unresolved
@ -5146,8 +5173,10 @@ void
tic54x_define_label (sym)
symbolS *sym;
{
/*static int local_label_count = 0;*/
/*const char *name = S_GET_NAME (sym);*/
#if 0
static int local_label_count = 0;
const char *name = S_GET_NAME (sym);
#endif
/* Just in case we need this later; note that this is not necessarily the
same thing as line_label...
@ -5198,6 +5227,7 @@ tic54x_parse_name (name, exp)
{
#if 0
symbol *sym = (symbol *) hash_find (mmreg_hash, name);
/* If it's a MMREG, replace it with its constant value. */
if (sym)
{
@ -5225,7 +5255,8 @@ md_atof (type, literalP, sizeP)
input_line_pointer = t;
*sizeP = 4;
/* Target data is little-endian, but floats are stored big-"word"ian. ugh. */
/* Target data is little-endian, but floats are stored
big-"word"ian. ugh. */
for (word = words; prec--;)
{
md_number_to_chars (literalP, (long) (*word++), sizeof (LITTLENUM_TYPE));