+2021-04-19 Jan Beulich <jbeulich@suse.com>
+
+ * as.h (sprint_value): Delete.
+ * messages.c (sprint_value): Likewise.
+ * config/tc-i386.c (offset_in_range): Use bfd_sprintf_vma in
+ place of sprint_value.
+ * config/tc-s390.c (s390_insert_operand): Likewise.
+ * doc/internals.texi (sprint_value): Delete section.
+ * write.c (fixup_segment): Likewise.
+ (relax_segment): Likewise.
+
2021-04-16 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com>
* testsuite/gas/aarch64/rme-invalid.d: New test.
void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
void signal_init (void);
-void sprint_value (char *, addressT);
int had_errors (void);
int had_warnings (void);
void as_warn_value_out_of_range (const char *, offsetT, offsetT, offsetT,
{
char buf1[40], buf2[40];
- sprint_value (buf1, val);
- sprint_value (buf2, val & mask);
+ bfd_sprintf_vma (stdoutput, buf1, val);
+ bfd_sprintf_vma (stdoutput, buf2, val & mask);
as_warn (_("%s shortened to %s"), buf1, buf2);
}
return val & mask;
min <<= 1;
max <<= 1;
}
- sprint_value (buf, val);
+ bfd_sprintf_vma (stdoutput, buf, val);
if (file == (char *) NULL)
as_bad (err, buf, (int) min, (int) max);
else
original filename and line number that they are applicable to.
@end deftypefun
-@deftypefun @{@} void sprint_value (char *@var{buf}, valueT @var{val})
-This function is helpful for converting a @code{valueT} value into printable
-format, in case it's wider than modes that @code{*printf} can handle. If the
-type is narrow enough, a decimal number will be produced; otherwise, it will be
-in hexadecimal. The value itself is not examined to make this determination.
-@end deftypefun
-
@node Test suite
@section Test suite
@cindex test suite
/* Support routines. */
-void
-sprint_value (char *buf, valueT val)
-{
- if (sizeof (val) <= sizeof (long))
- {
- sprintf (buf, "%ld", (long) val);
- return;
- }
- if (sizeof (val) <= sizeof (bfd_vma))
- {
- sprintf_vma (buf, val);
- return;
- }
- abort ();
-}
-
#define HEX_MAX_THRESHOLD 1024
#define HEX_MIN_THRESHOLD -(HEX_MAX_THRESHOLD)
if ((add_number & mask) != 0 && (add_number & mask) != mask)
{
char buf[50], buf2[50];
- sprint_value (buf, fragP->fr_address + fixP->fx_where);
+ bfd_sprintf_vma (stdoutput, buf, fragP->fr_address + fixP->fx_where);
if (add_number > 1000)
- sprint_value (buf2, add_number);
+ bfd_sprintf_vma (stdoutput, buf2, add_number);
else
sprintf (buf2, "%ld", (long) add_number);
as_bad_where (fixP->fx_file, fixP->fx_line,
if (flag_warn_displacement)
{
char buf[50];
- sprint_value (buf, (addressT) lie->addnum);
+
+ bfd_sprintf_vma (stdoutput, buf,
+ (addressT) lie->addnum);
as_warn_where (fragP->fr_file, fragP->fr_line,
_(".word %s-%s+%s didn't fit"),
S_GET_NAME (lie->add),