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