Kazu Hirata's formatting fixes.

This commit is contained in:
Alan Modra
2000-07-27 04:05:05 +00:00
parent 6166d547d8
commit e0c6ed95b5
4 changed files with 907 additions and 892 deletions

View File

@ -1,3 +1,13 @@
2000-07-27 Alan Modra <alan@linuxcare.com.au>
* config/tc-d10v.c (find_opcode): Remove extraneous `='.
2000-07-27 Kazu Hirata <kazu@hxi.com>
* config/tc-d10v.c: Fix formatting.
* config/tc-z8k.c: Likewise.
* config/tc-sparc.c: Likewise.
2000-07-26 Dave Brolley <brolley@redhat.com> 2000-07-26 Dave Brolley <brolley@redhat.com>
* cgen.c (queue_fixup): Declare opinfo. * cgen.c (queue_fixup): Declare opinfo.

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
/* tc-sparc.c -- Assemble for the SPARC /* tc-sparc.c -- Assemble for the SPARC
Copyright (C) 1989, 90-96, 97, 98, 99, 2000 Free Software Foundation, Inc. Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler. This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify GAS is free software; you can redistribute it and/or modify
@ -117,7 +118,7 @@ static symbolS *globals[8];
|| SPARC_OPCODE_ARCH_V9_P (max_architecture)) || SPARC_OPCODE_ARCH_V9_P (max_architecture))
#endif #endif
/* handle of the OPCODE hash table */ /* Handle of the OPCODE hash table. */
static struct hash_control *op_hash; static struct hash_control *op_hash;
static int log2 PARAMS ((int)); static int log2 PARAMS ((int));
@ -133,7 +134,7 @@ static void s_register PARAMS ((int));
const pseudo_typeS md_pseudo_table[] = const pseudo_typeS md_pseudo_table[] =
{ {
{"align", s_align_bytes, 0}, /* Defaulting is invalid (0) */ {"align", s_align_bytes, 0}, /* Defaulting is invalid (0). */
{"common", s_common, 0}, {"common", s_common, 0},
{"empty", s_empty, 0}, {"empty", s_empty, 0},
{"global", s_globl, 0}, {"global", s_globl, 0},
@ -150,7 +151,7 @@ const pseudo_typeS md_pseudo_table[] =
{"uaword", s_uacons, 4}, {"uaword", s_uacons, 4},
{"uaxword", s_uacons, 8}, {"uaxword", s_uacons, 8},
#ifdef OBJ_ELF #ifdef OBJ_ELF
/* these are specific to sparc/svr4 */ /* These are specific to sparc/svr4. */
{"2byte", s_uacons, 2}, {"2byte", s_uacons, 2},
{"4byte", s_uacons, 4}, {"4byte", s_uacons, 4},
{"8byte", s_uacons, 8}, {"8byte", s_uacons, 8},
@ -159,30 +160,33 @@ const pseudo_typeS md_pseudo_table[] =
{NULL, 0, 0}, {NULL, 0, 0},
}; };
const int md_reloc_size = 12; /* Size of relocation record */ /* Size of relocation record. */
const int md_reloc_size = 12;
/* This array holds the chars that always start a comment. If the /* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful */ pre-processor is disabled, these aren't very useful. */
const char comment_chars[] = "!"; /* JF removed '|' from comment_chars */ const char comment_chars[] = "!"; /* JF removed '|' from
comment_chars. */
/* This array holds the chars that only start a comment at the beginning of /* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename' a line. If the line seems to have the form '# 123 filename'
.line and .file directives will appear in the pre-processed output */ .line and .file directives will appear in the pre-processed output. */
/* Note that input_file.c hand checks for '#' at the beginning of the /* Note that input_file.c hand checks for '#' at the beginning of the
first line of the input file. This is because the compiler outputs first line of the input file. This is because the compiler outputs
#NO_APP at the beginning of its output. */ #NO_APP at the beginning of its output. */
/* Also note that comments started like this one will always /* Also note that comments started like this one will always
work if '/' isn't otherwise defined. */ work if '/' isn't otherwise defined. */
const char line_comment_chars[] = "#"; const char line_comment_chars[] = "#";
const char line_separator_chars[] = ";"; const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */ /* Chars that can be used to separate mant from exp in floating point
nums. */
const char EXP_CHARS[] = "eE"; const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant */ /* Chars that mean this number is a floating point constant.
/* As in 0f12.456 */ As in 0f12.456
/* or 0d1.2345e12 */ or 0d1.2345e12 */
const char FLT_CHARS[] = "rRsSfFdDxXpP"; const char FLT_CHARS[] = "rRsSfFdDxXpP";
/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be /* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
@ -323,8 +327,7 @@ sparc_target_format ()
abort (); abort ();
} }
/* /* md_parse_option
* md_parse_option
* Invocation line includes a switch not recognized by the base assembler. * Invocation line includes a switch not recognized by the base assembler.
* See if it's a processor-specific option. These are: * See if it's a processor-specific option. These are:
* *
@ -424,7 +427,8 @@ struct option md_longopts[] = {
{"no-relax", no_argument, NULL, OPTION_NO_RELAX}, {"no-relax", no_argument, NULL, OPTION_NO_RELAX},
{NULL, no_argument, NULL, 0} {NULL, no_argument, NULL, 0}
}; };
size_t md_longopts_size = sizeof(md_longopts);
size_t md_longopts_size = sizeof (md_longopts);
int int
md_parse_option (c, arg) md_parse_option (c, arg)
@ -451,8 +455,7 @@ md_parse_option (c, arg)
as_bad (_("invalid architecture -xarch=%s"), arg); as_bad (_("invalid architecture -xarch=%s"), arg);
return 0; return 0;
} }
/* Fall through. */
/* fall through */
case 'A': case 'A':
{ {
@ -554,15 +557,15 @@ md_parse_option (c, arg)
case 'Q': case 'Q':
/* Qy - do emit .comment /* Qy - do emit .comment
Qn - do not emit .comment */ Qn - do not emit .comment. */
break; break;
case 's': case 's':
/* use .stab instead of .stab.excl */ /* Use .stab instead of .stab.excl. */
break; break;
case 'q': case 'q':
/* quick -- native assembler does fewer checks */ /* quick -- Native assembler does fewer checks. */
break; break;
case 'K': case 'K':
@ -607,7 +610,7 @@ md_show_usage (stream)
if (! default_init_p) if (! default_init_p)
init_default_arch (); init_default_arch ();
fprintf(stream, _("SPARC options:\n")); fprintf (stream, _("SPARC options:\n"));
for (arch = &sparc_arch_table[0]; arch->name; arch++) for (arch = &sparc_arch_table[0]; arch->name; arch++)
{ {
if (arch != &sparc_arch_table[0]) if (arch != &sparc_arch_table[0])
@ -659,7 +662,7 @@ md_show_usage (stream)
#endif #endif
} }
/* native operand size opcode translation */ /* Native operand size opcode translation. */
struct struct
{ {
char *name; char *name;
@ -680,7 +683,7 @@ struct
{NULL, NULL, NULL}, {NULL, NULL, NULL},
}; };
/* sparc64 priviledged registers */ /* sparc64 priviledged registers. */
struct priv_reg_entry struct priv_reg_entry
{ {
@ -707,10 +710,10 @@ struct priv_reg_entry priv_reg_table[] =
{"wstate", 14}, {"wstate", 14},
{"fq", 15}, {"fq", 15},
{"ver", 31}, {"ver", 31},
{"", -1}, /* end marker */ {"", -1}, /* End marker. */
}; };
/* v9a specific asrs */ /* v9a specific asrs. */
struct priv_reg_entry v9a_asr_table[] = struct priv_reg_entry v9a_asr_table[] =
{ {
@ -722,7 +725,7 @@ struct priv_reg_entry v9a_asr_table[] =
{"gsr", 19}, {"gsr", 19},
{"dcr", 18}, {"dcr", 18},
{"clear_softint", 21}, {"clear_softint", 21},
{"", -1}, /* end marker */ {"", -1}, /* End marker. */
}; };
static int static int
@ -737,7 +740,8 @@ cmp_reg_entry (parg, qarg)
} }
/* This function is called once, at assembler startup time. It should /* This function is called once, at assembler startup time. It should
set up all the tables, etc. that the MD part of the assembler will need. */ set up all the tables, etc. that the MD part of the assembler will
need. */
void void
md_begin () md_begin ()
@ -783,13 +787,13 @@ md_begin ()
const struct sparc_opcode *insn; const struct sparc_opcode *insn;
char *name = sparc_arch_size == 32 ? native_op_table[i].name32 : char *name = sparc_arch_size == 32 ? native_op_table[i].name32 :
native_op_table[i].name64; native_op_table[i].name64;
insn = (struct sparc_opcode *)hash_find (op_hash, name); insn = (struct sparc_opcode *) hash_find (op_hash, name);
if (insn == NULL) if (insn == NULL)
{ {
as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"), as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"),
name, native_op_table[i].name); name, native_op_table[i].name);
lose = 1; lose = 1;
} }
else else
{ {
retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn); retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn);
@ -857,9 +861,9 @@ sparc_md_end ()
bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclite_le); bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclite_le);
else else
{ {
/* The sparclite is treated like a normal sparc. Perhaps it shouldn't /* The sparclite is treated like a normal sparc. Perhaps it
be but for now it is (since that's the way it's always been shouldn't be but for now it is (since that's the way it's
treated). */ always been treated). */
bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc); bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc);
} }
} }
@ -877,7 +881,7 @@ in_signed_range (val, max)
0xffffffff is always considered -1 on sparc32. */ 0xffffffff is always considered -1 on sparc32. */
if (sparc_arch_size == 32) if (sparc_arch_size == 32)
{ {
bfd_signed_vma sign = (bfd_signed_vma)1 << 31; bfd_signed_vma sign = (bfd_signed_vma) 1 << 31;
val = ((val & 0xffffffff) ^ sign) - sign; val = ((val & 0xffffffff) ^ sign) - sign;
} }
if (val > max) if (val > max)
@ -967,6 +971,7 @@ static const struct sparc_opcode *last_insn;
static unsigned long last_opcode; static unsigned long last_opcode;
/* Handle the set and setuw synthetic instructions. */ /* Handle the set and setuw synthetic instructions. */
static void static void
synthetize_setuw (insn) synthetize_setuw (insn)
const struct sparc_opcode *insn; const struct sparc_opcode *insn;
@ -978,18 +983,18 @@ synthetize_setuw (insn)
{ {
if (SPARC_OPCODE_ARCH_V9_P (max_architecture)) if (SPARC_OPCODE_ARCH_V9_P (max_architecture))
{ {
if (sizeof(offsetT) > 4 if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < 0 && (the_insn.exp.X_add_number < 0
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff)) || the_insn.exp.X_add_number > (offsetT) 0xffffffff))
as_warn (_("set: number not in 0..4294967295 range")); as_warn (_("set: number not in 0..4294967295 range"));
} }
else else
{ {
if (sizeof(offsetT) > 4 if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < -(offsetT) 0x80000000 && (the_insn.exp.X_add_number < -(offsetT) 0x80000000
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff)) || the_insn.exp.X_add_number > (offsetT) 0xffffffff))
as_warn (_("set: number not in -2147483648..4294967295 range")); as_warn (_("set: number not in -2147483648..4294967295 range"));
the_insn.exp.X_add_number = (int)the_insn.exp.X_add_number; the_insn.exp.X_add_number = (int) the_insn.exp.X_add_number;
} }
} }
@ -1026,6 +1031,7 @@ synthetize_setuw (insn)
} }
/* Handle the setsw synthetic instruction. */ /* Handle the setsw synthetic instruction. */
static void static void
synthetize_setsw (insn) synthetize_setsw (insn)
const struct sparc_opcode *insn; const struct sparc_opcode *insn;
@ -1045,7 +1051,7 @@ synthetize_setsw (insn)
return; return;
} }
if (sizeof(offsetT) > 4 if (sizeof (offsetT) > 4
&& (the_insn.exp.X_add_number < -(offsetT) 0x80000000 && (the_insn.exp.X_add_number < -(offsetT) 0x80000000
|| the_insn.exp.X_add_number > (offsetT) 0xffffffff)) || the_insn.exp.X_add_number > (offsetT) 0xffffffff))
as_warn (_("setsw: number not in -2147483648..4294967295 range")); as_warn (_("setsw: number not in -2147483648..4294967295 range"));
@ -1077,6 +1083,7 @@ synthetize_setsw (insn)
} }
/* Handle the setsw synthetic instruction. */ /* Handle the setsw synthetic instruction. */
static void static void
synthetize_setx (insn) synthetize_setx (insn)
const struct sparc_opcode *insn; const struct sparc_opcode *insn;
@ -1285,7 +1292,7 @@ md_assemble (str)
switch (special_case) switch (special_case)
{ {
case SPECIAL_CASE_NONE: case SPECIAL_CASE_NONE:
/* normal insn */ /* Normal insn. */
output_insn (insn, &the_insn); output_insn (insn, &the_insn);
break; break;
@ -1311,7 +1318,7 @@ md_assemble (str)
on early SPARC machines would produce incorrect results sometimes. on early SPARC machines would produce incorrect results sometimes.
The workaround is to add an fmovs of the destination register to The workaround is to add an fmovs of the destination register to
itself just after the instruction. This was true on machines itself just after the instruction. This was true on machines
with Weitek 1165 float chips, such as the Sun-4/260 and /280. */ with Weitek 1165 float chips, such as the Sun-4/260 and /280. */
assert (the_insn.reloc == BFD_RELOC_NONE); assert (the_insn.reloc == BFD_RELOC_NONE);
the_insn.opcode = FMOVS_INSN | rd | RD (rd); the_insn.opcode = FMOVS_INSN | rd | RD (rd);
output_insn (insn, &the_insn); output_insn (insn, &the_insn);
@ -1358,8 +1365,7 @@ sparc_ip (str, pinsn)
case ',': case ',':
comma = 1; comma = 1;
/* Fall through. */
/*FALLTHROUGH */
case ' ': case ' ':
*s++ = '\0'; *s++ = '\0';
@ -1388,10 +1394,8 @@ sparc_ip (str, pinsn)
the_insn.reloc = BFD_RELOC_NONE; the_insn.reloc = BFD_RELOC_NONE;
v9_arg_p = 0; v9_arg_p = 0;
/* /* Build the opcode, checking as we go to make sure that the
* Build the opcode, checking as we go to make operands match. */
* sure that the operands match
*/
for (args = insn->args;; ++args) for (args = insn->args;; ++args)
{ {
switch (*args) switch (*args)
@ -1474,7 +1478,7 @@ sparc_ip (str, pinsn)
if (*s == '%') if (*s == '%')
{ {
struct priv_reg_entry *p = priv_reg_table; struct priv_reg_entry *p = priv_reg_table;
unsigned int len = 9999999; /* init to make gcc happy */ unsigned int len = 9999999; /* Init to make gcc happy. */
s += 1; s += 1;
while (p->name[0] > s[0]) while (p->name[0] > s[0])
@ -1510,7 +1514,7 @@ sparc_ip (str, pinsn)
if (*s == '%') if (*s == '%')
{ {
struct priv_reg_entry *p = v9a_asr_table; struct priv_reg_entry *p = v9a_asr_table;
unsigned int len = 9999999; /* init to make gcc happy */ unsigned int len = 9999999; /* Init to make gcc happy. */
s += 1; s += 1;
while (p->name[0] > s[0]) while (p->name[0] > s[0])
@ -1586,7 +1590,7 @@ sparc_ip (str, pinsn)
error_message = _(": expecting %asrN"); error_message = _(": expecting %asrN");
goto error; goto error;
} }
} /* if %asr */ } /* if %asr */
break; break;
case 'I': case 'I':
@ -1731,7 +1735,7 @@ sparc_ip (str, pinsn)
} }
break; break;
case '\0': /* end of args */ case '\0': /* End of args. */
if (*s == '\0') if (*s == '\0')
{ {
match = 1; match = 1;
@ -1750,7 +1754,7 @@ sparc_ip (str, pinsn)
} }
break; break;
case '[': /* these must match exactly */ case '[': /* These must match exactly. */
case ']': case ']':
case ',': case ',':
case ' ': case ' ':
@ -1758,7 +1762,7 @@ sparc_ip (str, pinsn)
continue; continue;
break; break;
case '#': /* must be at least one digit */ case '#': /* Must be at least one digit. */
if (isdigit ((unsigned char) *s++)) if (isdigit ((unsigned char) *s++))
{ {
while (isdigit ((unsigned char) *s)) while (isdigit ((unsigned char) *s))
@ -1769,7 +1773,7 @@ sparc_ip (str, pinsn)
} }
break; break;
case 'C': /* coprocessor state register */ case 'C': /* Coprocessor state register. */
if (strncmp (s, "%csr", 4) == 0) if (strncmp (s, "%csr", 4) == 0)
{ {
s += 4; s += 4;
@ -1777,7 +1781,7 @@ sparc_ip (str, pinsn)
} }
break; break;
case 'b': /* next operand is a coprocessor register */ case 'b': /* Next operand is a coprocessor register. */
case 'c': case 'c':
case 'D': case 'D':
if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s)) if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s))
@ -1910,7 +1914,7 @@ sparc_ip (str, pinsn)
} }
if ((mask & ~1) == 2 && sparc_arch_size == 64 if ((mask & ~1) == 2 && sparc_arch_size == 64
&& no_undeclared_regs && ! globals [mask]) && no_undeclared_regs && ! globals[mask])
as_bad (_("detected global register use not covered by .register pseudo-op")); as_bad (_("detected global register use not covered by .register pseudo-op"));
/* Got the register, now figure out where /* Got the register, now figure out where
@ -2014,7 +2018,6 @@ sparc_ip (str, pinsn)
opcode |= RS1 (mask); opcode |= RS1 (mask);
continue; continue;
case 'f': case 'f':
case 'B': case 'B':
case 'R': case 'R':
@ -2169,10 +2172,11 @@ sparc_ip (str, pinsn)
*s1 = '0'; *s1 = '0';
s = s1; s = s1;
op_exp = the_insn.exp; op_exp = the_insn.exp;
memset (&the_insn.exp, 0, sizeof(the_insn.exp)); memset (&the_insn.exp, 0, sizeof (the_insn.exp));
} }
for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) ; for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
;
if (s1 != s && isdigit ((unsigned char) s1[-1])) if (s1 != s && isdigit ((unsigned char) s1[-1]))
{ {
@ -2227,7 +2231,7 @@ sparc_ip (str, pinsn)
case BFD_RELOC_SPARC_HH22: case BFD_RELOC_SPARC_HH22:
val = BSR (val, 32); val = BSR (val, 32);
/* intentional fallthrough */ /* Fall through. */
case BFD_RELOC_SPARC_LM22: case BFD_RELOC_SPARC_LM22:
case BFD_RELOC_HI22: case BFD_RELOC_HI22:
@ -2236,7 +2240,7 @@ sparc_ip (str, pinsn)
case BFD_RELOC_SPARC_HM10: case BFD_RELOC_SPARC_HM10:
val = BSR (val, 32); val = BSR (val, 32);
/* intentional fallthrough */ /* Fall through. */
case BFD_RELOC_LO10: case BFD_RELOC_LO10:
val &= 0x3ff; val &= 0x3ff;
@ -2352,7 +2356,7 @@ sparc_ip (str, pinsn)
} }
opcode |= ASI (asi); opcode |= ASI (asi);
continue; continue;
} /* alternate space */ } /* Alternate space. */
case 'p': case 'p':
if (strncmp (s, "%psr", 4) == 0) if (strncmp (s, "%psr", 4) == 0)
@ -2362,7 +2366,7 @@ sparc_ip (str, pinsn)
} }
break; break;
case 'q': /* floating point queue */ case 'q': /* Floating point queue. */
if (strncmp (s, "%fq", 3) == 0) if (strncmp (s, "%fq", 3) == 0)
{ {
s += 3; s += 3;
@ -2370,7 +2374,7 @@ sparc_ip (str, pinsn)
} }
break; break;
case 'Q': /* coprocessor queue */ case 'Q': /* Coprocessor queue. */
if (strncmp (s, "%cq", 3) == 0) if (strncmp (s, "%cq", 3) == 0)
{ {
s += 3; s += 3;
@ -2476,16 +2480,16 @@ sparc_ip (str, pinsn)
default: default:
as_fatal (_("failed sanity check.")); as_fatal (_("failed sanity check."));
} /* switch on arg code */ } /* switch on arg code. */
/* Break out of for() loop. */ /* Break out of for() loop. */
break; break;
} /* for each arg that we expect */ } /* For each arg that we expect. */
error: error:
if (match == 0) if (match == 0)
{ {
/* Args don't match. */ /* Args don't match. */
if (&insn[1] - sparc_opcodes < sparc_num_opcodes if (&insn[1] - sparc_opcodes < sparc_num_opcodes
&& (insn->name == insn[1].name && (insn->name == insn[1].name
|| !strcmp (insn->name, insn[1].name))) || !strcmp (insn->name, insn[1].name)))
@ -2502,7 +2506,7 @@ sparc_ip (str, pinsn)
} }
else else
{ {
/* We have a match. Now see if the architecture is ok. */ /* We have a match. Now see if the architecture is OK. */
int needed_arch_mask = insn->architecture; int needed_arch_mask = insn->architecture;
if (v9_arg_p) if (v9_arg_p)
@ -2512,10 +2516,13 @@ sparc_ip (str, pinsn)
needed_arch_mask |= (1 << SPARC_OPCODE_ARCH_V9); needed_arch_mask |= (1 << SPARC_OPCODE_ARCH_V9);
} }
if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (current_architecture)) if (needed_arch_mask
; /* ok */ & SPARC_OPCODE_SUPPORTED (current_architecture))
/* OK. */
;
/* Can we bump up the architecture? */ /* Can we bump up the architecture? */
else if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (max_architecture)) else if (needed_arch_mask
& SPARC_OPCODE_SUPPORTED (max_architecture))
{ {
enum sparc_opcode_arch_val needed_architecture = enum sparc_opcode_arch_val needed_architecture =
sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture) sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture)
@ -2540,12 +2547,12 @@ sparc_ip (str, pinsn)
happen but what about tomorrow? */ happen but what about tomorrow? */
else else
{ {
int arch,printed_one_p = 0; int arch, printed_one_p = 0;
char *p; char *p;
char required_archs[SPARC_OPCODE_ARCH_MAX * 16]; char required_archs[SPARC_OPCODE_ARCH_MAX * 16];
/* Create a list of the architectures that support the insn. */ /* Create a list of the architectures that support the insn. */
needed_arch_mask &= ~ SPARC_OPCODE_SUPPORTED (max_architecture); needed_arch_mask &= ~SPARC_OPCODE_SUPPORTED (max_architecture);
p = required_archs; p = required_archs;
arch = sparc_ffs (needed_arch_mask); arch = sparc_ffs (needed_arch_mask);
while ((1 << arch) <= needed_arch_mask) while ((1 << arch) <= needed_arch_mask)
@ -2567,10 +2574,10 @@ sparc_ip (str, pinsn)
sparc_opcode_archs[max_architecture].name); sparc_opcode_archs[max_architecture].name);
return special_case; return special_case;
} }
} /* if no match */ } /* If no match. */
break; break;
} /* forever looking for a match */ } /* Forever looking for a match. */
the_insn.opcode = opcode; the_insn.opcode = opcode;
return special_case; return special_case;
@ -2676,18 +2683,18 @@ output_insn (insn, the_insn)
{ {
char *toP = frag_more (4); char *toP = frag_more (4);
/* put out the opcode */ /* Put out the opcode. */
if (INSN_BIG_ENDIAN) if (INSN_BIG_ENDIAN)
number_to_chars_bigendian (toP, (valueT) the_insn->opcode, 4); number_to_chars_bigendian (toP, (valueT) the_insn->opcode, 4);
else else
number_to_chars_littleendian (toP, (valueT) the_insn->opcode, 4); number_to_chars_littleendian (toP, (valueT) the_insn->opcode, 4);
/* put out the symbol-dependent stuff */ /* Put out the symbol-dependent stuff. */
if (the_insn->reloc != BFD_RELOC_NONE) if (the_insn->reloc != BFD_RELOC_NONE)
{ {
fixS *fixP = fix_new_exp (frag_now, /* which frag */ fixS *fixP = fix_new_exp (frag_now, /* Which frag. */
(toP - frag_now->fr_literal), /* where */ (toP - frag_now->fr_literal), /* Where. */
4, /* size */ 4, /* Size. */
&the_insn->exp, &the_insn->exp,
the_insn->pcrel, the_insn->pcrel,
the_insn->reloc); the_insn->reloc);
@ -2704,16 +2711,15 @@ output_insn (insn, the_insn)
last_opcode = the_insn->opcode; last_opcode = the_insn->opcode;
} }
/* /* This is identical to the md_atof in m68k.c. I think this is right,
This is identical to the md_atof in m68k.c. I think this is right, but I'm not sure.
but I'm not sure.
Turn a string in input_line_pointer into a floating point constant of type Turn a string in input_line_pointer into a floating point constant
type, and store the appropriate bytes in *litP. The number of LITTLENUMS of type TYPE, and store the appropriate bytes in *LITP. The number
emitted is stored in *sizeP . An error message is returned, or NULL on OK. of LITTLENUMS emitted is stored in *SIZEP. An error message is
*/ returned, or NULL on OK. */
/* Equal to MAX_PRECISION in atof-ieee.c */ /* Equal to MAX_PRECISION in atof-ieee.c. */
#define MAX_LITTLENUMS 6 #define MAX_LITTLENUMS 6
char * char *
@ -2722,7 +2728,7 @@ md_atof (type, litP, sizeP)
char *litP; char *litP;
int *sizeP; int *sizeP;
{ {
int i,prec; int i, prec;
LITTLENUM_TYPE words[MAX_LITTLENUMS]; LITTLENUM_TYPE words[MAX_LITTLENUMS];
char *t; char *t;
@ -2795,7 +2801,8 @@ md_number_to_chars (buf, val, n)
number_to_chars_bigendian (buf, val, n); number_to_chars_bigendian (buf, val, n);
else if (target_little_endian_data else if (target_little_endian_data
&& ((n == 4 || n == 2) && ~now_seg->flags & SEC_ALLOC)) && ((n == 4 || n == 2) && ~now_seg->flags & SEC_ALLOC))
/* Output debug words, which are not in allocated sections, as big endian */ /* Output debug words, which are not in allocated sections, as big
endian. */
number_to_chars_bigendian (buf, val, n); number_to_chars_bigendian (buf, val, n);
else if (target_little_endian_data || ! target_big_endian) else if (target_little_endian_data || ! target_big_endian)
number_to_chars_littleendian (buf, val, n); number_to_chars_littleendian (buf, val, n);
@ -2818,7 +2825,7 @@ md_apply_fix3 (fixP, value, segment)
assert (fixP->fx_r_type < BFD_RELOC_UNUSED); assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
fixP->fx_addnumber = val; /* Remember value for emit_reloc */ fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
#ifdef OBJ_ELF #ifdef OBJ_ELF
/* FIXME: SPARC ELF relocations don't use an addend in the data /* FIXME: SPARC ELF relocations don't use an addend in the data
@ -2935,7 +2942,7 @@ md_apply_fix3 (fixP, value, segment)
insn |= val & 0x3fffffff; insn |= val & 0x3fffffff;
/* See if we have a delay slot */ /* See if we have a delay slot. */
if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix) if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
{ {
#define G0 0 #define G0 0
@ -2960,15 +2967,15 @@ md_apply_fix3 (fixP, value, segment)
delay = bfd_getb32 ((unsigned char *) buf + 4); delay = bfd_getb32 ((unsigned char *) buf + 4);
else else
delay = bfd_getl32 ((unsigned char *) buf + 4); delay = bfd_getl32 ((unsigned char *) buf + 4);
if ((insn & OP(~0)) != OP(1) || (delay & OP(~0)) != OP(2)) if ((insn & OP (~0)) != OP (1) || (delay & OP (~0)) != OP (2))
break; break;
if ((delay & OP3(~0)) != OP3(0x3d) /* restore */ if ((delay & OP3 (~0)) != OP3 (0x3d) /* Restore. */
&& ((delay & OP3(0x28)) != 0 /* arithmetic */ && ((delay & OP3 (0x28)) != 0 /* Arithmetic. */
|| ((delay & RD(~0)) != RD(O7)))) || ((delay & RD (~0)) != RD (O7))))
break; break;
if ((delay & RS1(~0)) == RS1(O7) if ((delay & RS1 (~0)) == RS1 (O7)
|| ((delay & F3I(~0)) == 0 || ((delay & F3I (~0)) == 0
&& (delay & RS2(~0)) == RS2(O7))) && (delay & RS2 (~0)) == RS2 (O7)))
break; break;
/* Ensure the branch will fit into simm22. */ /* Ensure the branch will fit into simm22. */
if ((val & 0x3fe00000) if ((val & 0x3fe00000)
@ -2980,14 +2987,14 @@ md_apply_fix3 (fixP, value, segment)
|| (val & 0x3c0000) == 0x3c0000) || (val & 0x3c0000) == 0x3c0000)
&& (sparc_arch_size == 64 && (sparc_arch_size == 64
|| current_architecture >= SPARC_OPCODE_ARCH_V9)) || current_architecture >= SPARC_OPCODE_ARCH_V9))
/* ba,pt %xcc */ /* ba,pt %xcc */
insn = INSN_BPA | (val & 0x7ffff); insn = INSN_BPA | (val & 0x7ffff);
else else
/* ba */ /* ba */
insn = INSN_BA | (val & 0x3fffff); insn = INSN_BA | (val & 0x3fffff);
if (fixP->fx_where >= 4 if (fixP->fx_where >= 4
&& ((delay & (0xffffffff ^ RS1(~0))) && ((delay & (0xffffffff ^ RS1 (~0)))
== (INSN_OR | RD(O7) | RS2(G0)))) == (INSN_OR | RD (O7) | RS2 (G0))))
{ {
long setter; long setter;
int reg; int reg;
@ -2996,8 +3003,8 @@ md_apply_fix3 (fixP, value, segment)
setter = bfd_getb32 ((unsigned char *) buf - 4); setter = bfd_getb32 ((unsigned char *) buf - 4);
else else
setter = bfd_getl32 ((unsigned char *) buf - 4); setter = bfd_getl32 ((unsigned char *) buf - 4);
if ((setter & (0xffffffff ^ RD(~0))) if ((setter & (0xffffffff ^ RD (~0)))
!= (INSN_OR | RS1(O7) | RS2(G0))) != (INSN_OR | RS1 (O7) | RS2 (G0)))
break; break;
/* The sequence was /* The sequence was
or %o7, %g0, %rN or %o7, %g0, %rN
@ -3006,8 +3013,8 @@ md_apply_fix3 (fixP, value, segment)
If call foo was replaced with ba, replace If call foo was replaced with ba, replace
or %rN, %g0, %o7 with nop. */ or %rN, %g0, %o7 with nop. */
reg = (delay & RS1(~0)) >> 14; reg = (delay & RS1 (~0)) >> 14;
if (reg != ((setter & RD(~0)) >> 25) if (reg != ((setter & RD (~0)) >> 25)
|| reg == G0 || reg == O7) || reg == G0 || reg == O7)
break; break;
@ -3055,7 +3062,7 @@ md_apply_fix3 (fixP, value, segment)
break; break;
case BFD_RELOC_SPARC_WDISP16: case BFD_RELOC_SPARC_WDISP16:
/* FIXME: simplify */ /* FIXME: simplify. */
if (((val > 0) && (val & ~0x3fffc)) if (((val > 0) && (val & ~0x3fffc))
|| ((val < 0) && (~(val - 1) & ~0x3fffc))) || ((val < 0) && (~(val - 1) & ~0x3fffc)))
as_bad_where (fixP->fx_file, fixP->fx_line, as_bad_where (fixP->fx_file, fixP->fx_line,
@ -3066,7 +3073,7 @@ md_apply_fix3 (fixP, value, segment)
break; break;
case BFD_RELOC_SPARC_WDISP19: case BFD_RELOC_SPARC_WDISP19:
/* FIXME: simplify */ /* FIXME: simplify. */
if (((val > 0) && (val & ~0x1ffffc)) if (((val > 0) && (val & ~0x1ffffc))
|| ((val < 0) && (~(val - 1) & ~0x1ffffc))) || ((val < 0) && (~(val - 1) & ~0x1ffffc)))
as_bad_where (fixP->fx_file, fixP->fx_line, as_bad_where (fixP->fx_file, fixP->fx_line,
@ -3078,7 +3085,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_HH22: case BFD_RELOC_SPARC_HH22:
val = BSR (val, 32); val = BSR (val, 32);
/* intentional fallthrough */ /* Fall through. */
case BFD_RELOC_SPARC_LM22: case BFD_RELOC_SPARC_LM22:
case BFD_RELOC_HI22: case BFD_RELOC_HI22:
@ -3102,7 +3109,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_HM10: case BFD_RELOC_SPARC_HM10:
val = BSR (val, 32); val = BSR (val, 32);
/* intentional fallthrough */ /* Fall through. */
case BFD_RELOC_LO10: case BFD_RELOC_LO10:
if (!fixP->fx_addsy) if (!fixP->fx_addsy)
@ -3119,7 +3126,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_OLO10: case BFD_RELOC_SPARC_OLO10:
val &= 0x3ff; val &= 0x3ff;
val += fixP->tc_fix_data; val += fixP->tc_fix_data;
/* intentional fallthrough */ /* Fall through. */
case BFD_RELOC_SPARC13: case BFD_RELOC_SPARC13:
if (! in_signed_range (val, 0x1fff)) if (! in_signed_range (val, 0x1fff))
@ -3130,7 +3137,7 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_WDISP22: case BFD_RELOC_SPARC_WDISP22:
val = (val >> 2) + 1; val = (val >> 2) + 1;
/* FALLTHROUGH */ /* Fall through. */
case BFD_RELOC_SPARC_BASE22: case BFD_RELOC_SPARC_BASE22:
insn |= val & 0x3fffff; insn |= val & 0x3fffff;
break; break;
@ -3190,6 +3197,7 @@ md_apply_fix3 (fixP, value, segment)
/* Translate internal representation of relocation info to BFD target /* Translate internal representation of relocation info to BFD target
format. */ format. */
arelent ** arelent **
tc_gen_reloc (section, fixp) tc_gen_reloc (section, fixp)
asection *section; asection *section;
@ -3291,7 +3299,7 @@ tc_gen_reloc (section, fixp)
break; break;
} }
} }
#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */ #endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
if (code == BFD_RELOC_SPARC_OLO10) if (code == BFD_RELOC_SPARC_OLO10)
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10); reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10);
@ -3325,7 +3333,7 @@ tc_gen_reloc (section, fixp)
else else
reloc->addend = fixp->fx_offset - reloc->address; reloc->addend = fixp->fx_offset - reloc->address;
#else /* elf or coff */ #else /* elf or coff */
if (reloc->howto->pc_relative == 0 if (reloc->howto->pc_relative == 0
|| code == BFD_RELOC_SPARC_PC10 || code == BFD_RELOC_SPARC_PC10
@ -3356,17 +3364,17 @@ tc_gen_reloc (section, fixp)
return relocs; return relocs;
} }
/* We have no need to default values of symbols. */ /* We have no need to default values of symbols. */
/* ARGSUSED */
symbolS * symbolS *
md_undefined_symbol (name) md_undefined_symbol (name)
char *name; char *name;
{ {
return 0; return 0;
} /* md_undefined_symbol() */ }
/* Round up a section size to the appropriate boundary. */
/* Round up a section size to the appropriate boundary. */
valueT valueT
md_section_align (segment, size) md_section_align (segment, size)
segT segment; segT segment;
@ -3378,7 +3386,8 @@ md_section_align (segment, size)
valueT align = ((valueT) 1 valueT align = ((valueT) 1
<< (valueT) bfd_get_section_alignment (stdoutput, segment)); << (valueT) bfd_get_section_alignment (stdoutput, segment));
valueT newsize; valueT newsize;
/* turn alignment value into a mask */
/* Turn alignment value into a mask. */
align--; align--;
newsize = (size + align) & ~align; newsize = (size + align) & ~align;
return newsize; return newsize;
@ -3390,7 +3399,7 @@ md_section_align (segment, size)
/* Exactly what point is a PC-relative offset relative TO? /* Exactly what point is a PC-relative offset relative TO?
On the sparc, they're relative to the address of the offset, plus On the sparc, they're relative to the address of the offset, plus
its size. This gets us to the following instruction. its size. This gets us to the following instruction.
(??? Is this right? FIXME-SOON) */ (??? Is this right? FIXME-SOON) */
long long
md_pcrel_from (fixP) md_pcrel_from (fixP)
fixS *fixP; fixS *fixP;
@ -3423,9 +3432,7 @@ log2 (value)
return (value == 1) ? shift : -1; return (value == 1) ? shift : -1;
} }
/* /* Sort of like s_lcomm. */
* sort of like s_lcomm
*/
#ifndef OBJ_ELF #ifndef OBJ_ELF
static int max_alignment = 15; static int max_alignment = 15;
@ -3463,7 +3470,7 @@ s_reserve (ignore)
as_bad (_("BSS length (%d.) <0! Ignored."), size); as_bad (_("BSS length (%d.) <0! Ignored."), size);
ignore_rest_of_line (); ignore_rest_of_line ();
return; return;
} /* bad length */ } /* Bad length. */
*p = 0; *p = 0;
symbolP = symbol_find_or_make (name); symbolP = symbol_find_or_make (name);
@ -3542,18 +3549,20 @@ s_reserve (ignore)
segT current_seg = now_seg; segT current_seg = now_seg;
subsegT current_subseg = now_subseg; subsegT current_subseg = now_subseg;
subseg_set (bss_section, 1); /* switch to bss */ /* Switch to bss. */
subseg_set (bss_section, 1);
if (align) 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) if (S_GET_SEGMENT(symbolP) == bss_section)
symbol_get_frag (symbolP)->fr_symbol = NULL; symbol_get_frag (symbolP)->fr_symbol = NULL;
symbol_set_frag (symbolP, frag_now); symbol_set_frag (symbolP, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP, pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *)0); (offsetT) size, (char *) 0);
*pfrag = 0; *pfrag = 0;
S_SET_SEGMENT (symbolP, bss_section); S_SET_SEGMENT (symbolP, bss_section);
@ -3569,7 +3578,7 @@ s_reserve (ignore)
{ {
as_warn("Ignoring attempt to re-define symbol %s", as_warn("Ignoring attempt to re-define symbol %s",
S_GET_NAME (symbolP)); S_GET_NAME (symbolP));
} /* if not redefining */ } /* if not redefining. */
demand_empty_rest_of_line (); demand_empty_rest_of_line ();
} }
@ -3586,7 +3595,7 @@ s_common (ignore)
name = input_line_pointer; name = input_line_pointer;
c = get_symbol_end (); c = get_symbol_end ();
/* just after name is now '\0' */ /* Just after name is now '\0'. */
p = input_line_pointer; p = input_line_pointer;
*p = c; *p = c;
SKIP_WHITESPACE (); SKIP_WHITESPACE ();
@ -3596,7 +3605,10 @@ s_common (ignore)
ignore_rest_of_line (); ignore_rest_of_line ();
return; return;
} }
input_line_pointer++; /* skip ',' */
/* Skip ','. */
input_line_pointer++;
if ((temp = get_absolute_expression ()) < 0) if ((temp = get_absolute_expression ()) < 0)
{ {
as_bad (_(".COMMon length (%d.) <0! Ignored."), temp); as_bad (_(".COMMon length (%d.) <0! Ignored."), temp);
@ -3695,7 +3707,7 @@ s_common (ignore)
subseg_set (old_sec, old_subsec); subseg_set (old_sec, old_subsec);
} }
else else
#endif /* OBJ_ELF */ #endif /* OBJ_ELF */
{ {
allocate_common: allocate_common:
S_SET_VALUE (symbolP, (valueT) size); S_SET_VALUE (symbolP, (valueT) size);
@ -3789,8 +3801,8 @@ s_seg (ignore)
input_line_pointer += 5; input_line_pointer += 5;
/* We only support 2 segments -- text and data -- for now, so /* We only support 2 segments -- text and data -- for now, so
things in the "bss segment" will have to go into data for now. things in the "bss segment" will have to go into data for now.
You can still allocate SEG_BSS stuff with .lcomm or .reserve. */ You can still allocate SEG_BSS stuff with .lcomm or .reserve. */
subseg_set (data_section, 255); /* FIXME-SOMEDAY */ subseg_set (data_section, 255); /* FIXME-SOMEDAY. */
return; return;
} }
as_bad (_("Unknown segment type")); as_bad (_("Unknown segment type"));
@ -3850,7 +3862,7 @@ s_ncons (bytes)
The syntax is: The syntax is:
.register %g[2367],{#scratch|symbolname|#ignore} .register %g[2367],{#scratch|symbolname|#ignore}
*/ */
static void static void
s_register (ignore) s_register (ignore)
@ -3889,17 +3901,17 @@ s_register (ignore)
} }
if (sparc_arch_size == 64) if (sparc_arch_size == 64)
{ {
if (globals [reg]) if (globals[reg])
{ {
if ((regname && globals [reg] != (symbolS *)1 if ((regname && globals[reg] != (symbolS *) 1
&& strcmp (S_GET_NAME (globals [reg]), regname)) && strcmp (S_GET_NAME (globals[reg]), regname))
|| ((regname != NULL) ^ (globals [reg] != (symbolS *)1))) || ((regname != NULL) ^ (globals[reg] != (symbolS *) 1)))
as_bad (_("redefinition of global register")); as_bad (_("redefinition of global register"));
} }
else else
{ {
if (regname == NULL) if (regname == NULL)
globals [reg] = (symbolS *)1; globals[reg] = (symbolS *) 1;
else else
{ {
if (*regname) if (*regname)
@ -3908,26 +3920,26 @@ s_register (ignore)
as_bad (_("Register symbol %s already defined."), as_bad (_("Register symbol %s already defined."),
regname); regname);
} }
globals [reg] = symbol_make (regname); globals[reg] = symbol_make (regname);
flags = symbol_get_bfdsym (globals [reg])->flags; flags = symbol_get_bfdsym (globals[reg])->flags;
if (! *regname) if (! *regname)
flags = flags & ~(BSF_GLOBAL|BSF_LOCAL|BSF_WEAK); flags = flags & ~(BSF_GLOBAL|BSF_LOCAL|BSF_WEAK);
if (! (flags & (BSF_GLOBAL|BSF_LOCAL|BSF_WEAK))) if (! (flags & (BSF_GLOBAL|BSF_LOCAL|BSF_WEAK)))
flags |= BSF_GLOBAL; flags |= BSF_GLOBAL;
symbol_get_bfdsym (globals [reg])->flags = flags; symbol_get_bfdsym (globals[reg])->flags = flags;
S_SET_VALUE (globals [reg], (valueT)reg); S_SET_VALUE (globals[reg], (valueT) reg);
S_SET_ALIGN (globals [reg], reg); S_SET_ALIGN (globals[reg], reg);
S_SET_SIZE (globals [reg], 0); S_SET_SIZE (globals[reg], 0);
/* Although we actually want undefined_section here, /* Although we actually want undefined_section here,
we have to use absolute_section, because otherwise we have to use absolute_section, because otherwise
generic as code will make it a COM section. generic as code will make it a COM section.
We fix this up in sparc_adjust_symtab. */ We fix this up in sparc_adjust_symtab. */
S_SET_SEGMENT (globals [reg], absolute_section); S_SET_SEGMENT (globals[reg], absolute_section);
S_SET_OTHER (globals [reg], 0); S_SET_OTHER (globals[reg], 0);
elf_symbol (symbol_get_bfdsym (globals [reg])) elf_symbol (symbol_get_bfdsym (globals[reg]))
->internal_elf_sym.st_info = ->internal_elf_sym.st_info =
ELF_ST_INFO(STB_GLOBAL, STT_REGISTER); ELF_ST_INFO(STB_GLOBAL, STT_REGISTER);
elf_symbol (symbol_get_bfdsym (globals [reg])) elf_symbol (symbol_get_bfdsym (globals[reg]))
->internal_elf_sym.st_shndx = SHN_UNDEF; ->internal_elf_sym.st_shndx = SHN_UNDEF;
} }
} }
@ -4026,28 +4038,29 @@ sparc_handle_align (fragp)
if (count >= 4 if (count >= 4
&& !(count & 3) && !(count & 3)
&& count <= 1024 && count <= 1024
&& !((long)(fragp->fr_literal + fragp->fr_fix) & 3)) && !((long) (fragp->fr_literal + fragp->fr_fix) & 3))
{ {
unsigned *p = (unsigned *)(fragp->fr_literal + fragp->fr_fix); unsigned *p = (unsigned *) (fragp->fr_literal + fragp->fr_fix);
int i; int i;
for (i = 0; i < count; i += 4, p++) for (i = 0; i < count; i += 4, p++)
if (INSN_BIG_ENDIAN) if (INSN_BIG_ENDIAN)
number_to_chars_bigendian ((char *)p, 0x01000000, 4); /* emit nops */ /* Emit nops. */
else number_to_chars_bigendian ((char *) p, 0x01000000, 4);
number_to_chars_littleendian ((char *)p, 0x10000000, 4); else
number_to_chars_littleendian ((char *) p, 0x10000000, 4);
if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8)
{ {
char *waddr = &fragp->fr_literal[fragp->fr_fix]; char *waddr = &fragp->fr_literal[fragp->fr_fix];
unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */
if (INSN_BIG_ENDIAN) if (INSN_BIG_ENDIAN)
number_to_chars_bigendian (waddr, wval, 4); number_to_chars_bigendian (waddr, wval, 4);
else else
number_to_chars_littleendian (waddr, wval, 4); number_to_chars_littleendian (waddr, wval, 4);
} }
fragp->fr_var = count; fragp->fr_var = count;
} }
} }
} }
@ -4106,7 +4119,7 @@ cons_fix_new_sparc (frag, where, nbytes, exp)
#ifdef OBJ_ELF #ifdef OBJ_ELF
int int
elf32_sparc_force_relocation (fixp) elf32_sparc_force_relocation (fixp)
struct fix *fixp; struct fix *fixp;
{ {
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
@ -4115,4 +4128,3 @@ elf32_sparc_force_relocation (fixp)
return 0; return 0;
} }
#endif #endif

File diff suppressed because it is too large Load Diff