summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-08-01 11:33:46 +0930
committerAlan Modra <amodra@gmail.com>2022-08-01 13:52:18 +0930
commitf493c2174ef99a43c0a5d89179122f857955d738 (patch)
tree62cc84715e6a801434dce9cd6cb7760e94110d74
parent48ca1b26b99c8fd5bc21f5c69b6b666d9b6b9726 (diff)
Get rid of fprintf_vma and sprintf_vma
These two macros print either a 16 digit hex number or an 8 digit hex number. Unfortunately they depend on both target and host, which means that the output for 32-bit targets may be either 8 or 16 hex digits. Replace them in most cases with code that prints a bfd_vma using PRIx64. In some cases, deliberately lose the leading zeros. This change some output, notably in base/offset fields of m68k disassembly which I think looks better that way, and in error messages. I've kept leading zeros in symbol dumps (objdump -t) and in PE header dumps. bfd/ * bfd-in.h (fprintf_vma, sprintf_vma, printf_vma): Delete. * bfd-in2.h: Regenerate. * bfd.c (bfd_sprintf_vma): Don't use sprintf_vma. (bfd_fprintf_vma): Don't use fprintf_vma. * coff-rs6000.c (xcoff_reloc_type_tls): Don't use sprintf_vma. Instead use PRIx64 to print bfd_vma values. (xcoff_ppc_relocate_section): Likewise. * cofflink.c (_bfd_coff_write_global_sym): Likewise. * mmo.c (mmo_write_symbols_and_terminator): Likewise. * srec.c (srec_write_symbols): Likewise. * elf32-xtensa.c (print_r_reloc): Similarly for fprintf_vma. * pei-x86_64.c (pex64_dump_xdata): Likewise. (pex64_bfd_print_pdata_section): Likewise. * som.c (som_print_symbol): Likewise. * ecoff.c (_bfd_ecoff_print_symbol): Use bfd_fprintf_vma. opcodes/ * dis-buf.c (perror_memory, generic_print_address): Don't use sprintf_vma. Instead use PRIx64 to print bfd_vma values. * i386-dis.c (print_operand_value, print_displacement): Likewise. * m68k-dis.c (print_base, print_indexed): Likewise. * ns32k-dis.c (print_insn_arg): Likewise. * ia64-gen.c (_opcode_int64_low, _opcode_int64_high): Delete. (opcode_fprintf_vma): Delete. (print_main_table): Use PRIx64 to print opcode. binutils/ * od-macho.c: Replace all uses of printf_vma with bfd_printf_vma. * objcopy.c (copy_object): Don't use sprintf_vma. Instead use PRIx64 to print bfd_vma values. (copy_main): Likewise. * readelf.c (CHECK_ENTSIZE_VALUES): Likewise. (dynamic_section_mips_val): Likewise. (print_vma): Don't use printf_vma. Instead use PRIx64 to print bfd_vma values. (dump_ia64_vms_dynamic_fixups): Likewise. (process_version_sections): Likewise. * rddbg.c (stab_context): Likewise. gas/ * config/tc-i386.c (offset_in_range): Don't use sprintf_vma. Instead use PRIx64 to print bfd_vma values. (md_assemble): Likewise. * config/tc-mips.c (load_register, macro): Likewise. * messages.c (as_internal_value_out_of_range): Likewise. * read.c (emit_expr_with_reloc): Likewise. * config/tc-ia64.c (note_register_values): Don't use fprintf_vma. Instead use PRIx64 to print bfd_vma values. (print_dependency): Likewise. * listing.c (list_symbol_table): Use bfd_sprintf_vma. * symbols.c (print_symbol_value_1): Use %p to print pointers. (print_binary): Likewise. (print_expr_1): Use PRIx64 to print bfd_vma values. * write.c (print_fixup): Use %p to print pointers. Don't use fprintf_vma. * testsuite/gas/all/overflow.l: Update expected output. * testsuite/gas/m68k/mcf-mov3q.d: Likewise. * testsuite/gas/m68k/operands.d: Likewise. * testsuite/gas/s12z/truncated.d: Likewise. ld/ * deffilep.y (def_file_print): Don't use fprintf_vma. Instead use PRIx64 to print bfd_vma values. * emultempl/armelf.em (gld${EMULATION_NAME}_finish): Don't use sprintf_vma. Instead use PRIx64 to print bfd_vma values. * emultempl/pe.em (gld${EMULATION_NAME}_finish): Likewise. * ldlang.c (lang_map): Use %V to print region origin. (lang_one_common): Don't use sprintf_vma. * ldmisc.c (vfinfo): Don't use fprintf_vma or sprintf_vma. * pe-dll.c (pe_dll_generate_def_file): Likewise. gdb/ * remote.c (remote_target::trace_set_readonly_regions): Replace uses of sprintf_vma with bfd_sprintf_vma.
-rw-r--r--bfd/bfd-in.h7
-rw-r--r--bfd/bfd-in2.h7
-rw-r--r--bfd/bfd.c12
-rw-r--r--bfd/coff-rs6000.c27
-rw-r--r--bfd/cofflink.c12
-rw-r--r--bfd/ecoff.c6
-rw-r--r--bfd/elf32-xtensa.c7
-rw-r--r--bfd/mmo.c11
-rw-r--r--bfd/pei-x86_64.c52
-rw-r--r--bfd/som.c5
-rw-r--r--bfd/srec.c21
-rw-r--r--binutils/objcopy.c58
-rw-r--r--binutils/od-macho.c34
-rw-r--r--binutils/rddbg.c2
-rw-r--r--binutils/readelf.c41
-rw-r--r--gas/config/tc-i386.c19
-rw-r--r--gas/config/tc-ia64.c23
-rw-r--r--gas/config/tc-mips.c18
-rw-r--r--gas/listing.c20
-rw-r--r--gas/messages.c42
-rw-r--r--gas/read.c9
-rw-r--r--gas/symbols.c24
-rw-r--r--gas/testsuite/gas/all/overflow.l8
-rw-r--r--gas/testsuite/gas/m68k/mcf-mov3q.d2
-rw-r--r--gas/testsuite/gas/m68k/operands.d448
-rw-r--r--gas/testsuite/gas/s12z/truncated.d2
-rw-r--r--gas/write.c14
-rw-r--r--gdb/remote.c15
-rw-r--r--ld/deffilep.y7
-rw-r--r--ld/emultempl/armelf.em5
-rw-r--r--ld/emultempl/pe.em5
-rw-r--r--ld/ldlang.c19
-rw-r--r--ld/ldmisc.c28
-rw-r--r--ld/pe-dll.c6
-rw-r--r--opcodes/dis-buf.c11
-rw-r--r--opcodes/i386-dis.c21
-rw-r--r--opcodes/ia64-gen.c20
-rw-r--r--opcodes/m68k-dis.c10
-rw-r--r--opcodes/ns32k-dis.c5
39 files changed, 426 insertions, 657 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 9d0738a232..5ae7e48214 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -115,9 +115,6 @@ typedef uint64_t symvalue;
#define BFD_VMA_FMT @BFD_INT64_FMT@
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-
#else /* not BFD64 */
typedef unsigned long bfd_vma;
@@ -127,9 +124,6 @@ typedef unsigned long bfd_size_type;
#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
#endif /* not BFD64 */
#define HALF_BFD_SIZE_TYPE \
@@ -143,7 +137,6 @@ typedef @bfd_ufile_ptr@ ufile_ptr;
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-#define printf_vma(x) fprintf_vma(stdout,x)
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index bbe1928852..91ada0e3a9 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -122,9 +122,6 @@ typedef uint64_t symvalue;
#define BFD_VMA_FMT @BFD_INT64_FMT@
-#define fprintf_vma(f,x) fprintf (f, "%016" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%016" BFD_VMA_FMT "x", x)
-
#else /* not BFD64 */
typedef unsigned long bfd_vma;
@@ -134,9 +131,6 @@ typedef unsigned long bfd_size_type;
#define BFD_VMA_FMT "l"
-#define fprintf_vma(s,x) fprintf (s, "%08" BFD_VMA_FMT "x", x)
-#define sprintf_vma(s,x) sprintf (s, "%08" BFD_VMA_FMT "x", x)
-
#endif /* not BFD64 */
#define HALF_BFD_SIZE_TYPE \
@@ -150,7 +144,6 @@ typedef @bfd_ufile_ptr@ ufile_ptr;
extern void bfd_sprintf_vma (bfd *, char *, bfd_vma);
extern void bfd_fprintf_vma (bfd *, void *, bfd_vma);
-#define printf_vma(x) fprintf_vma(stdout,x)
#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 913ce2d6ab..3e85e171e3 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2236,26 +2236,26 @@ void
bfd_sprintf_vma (bfd *abfd ATTRIBUTE_UNUSED, char *buf, bfd_vma value)
{
#ifdef BFD64
- if (is32bit (abfd))
+ if (!is32bit (abfd))
{
- sprintf (buf, "%08lx", (unsigned long) value & 0xffffffff);
+ sprintf (buf, "%016" PRIx64, (uint64_t) value);
return;
}
#endif
- sprintf_vma (buf, value);
+ sprintf (buf, "%08lx", (unsigned long) value & 0xffffffff);
}
void
bfd_fprintf_vma (bfd *abfd ATTRIBUTE_UNUSED, void *stream, bfd_vma value)
{
#ifdef BFD64
- if (is32bit (abfd))
+ if (!is32bit (abfd))
{
- fprintf ((FILE *) stream, "%08lx", (unsigned long) value & 0xffffffff);
+ fprintf ((FILE *) stream, "%016" PRIx64, (uint64_t) value);
return;
}
#endif
- fprintf_vma ((FILE *) stream, value);
+ fprintf ((FILE *) stream, "%08lx", (unsigned long) value & 0xffffffff);
}
/*
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 6ad77ba77c..3f0753e5bf 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -3280,12 +3280,9 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED,
/* TLS relocations must target a TLS symbol. */
if (h->smclas != XMC_TL && h->smclas != XMC_UL)
{
- char vaddr_buf[128];
-
- sprintf_vma (vaddr_buf, rel->r_vaddr);
_bfd_error_handler
- (_("%pB: TLS relocation at 0x%s over non-TLS symbol %s (0x%x)\n"),
- input_bfd, vaddr_buf, h->root.root.string, h->smclas);
+ (_("%pB: TLS relocation at 0x%" PRIx64 " over non-TLS symbol %s (0x%x)\n"),
+ input_bfd, (uint64_t) rel->r_vaddr, h->root.root.string, h->smclas);
return false;
}
@@ -3296,12 +3293,9 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED,
&& (h->flags & XCOFF_DEF_DYNAMIC) != 0)
|| (h->flags & XCOFF_IMPORT) != 0))
{
- char vaddr_buf[128];
-
- sprintf_vma (vaddr_buf, rel->r_vaddr);
_bfd_error_handler
- (_("%pB: TLS local relocation at 0x%s over imported symbol %s\n"),
- input_bfd, vaddr_buf, h->root.root.string);
+ (_("%pB: TLS local relocation at 0x%" PRIx64 " over imported symbol %s\n"),
+ input_bfd, (uint64_t) rel->r_vaddr, h->root.root.string);
return false;
}
@@ -3705,15 +3699,10 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
break;
default:
- {
- char vaddr_buf[128];
-
- sprintf_vma (vaddr_buf, rel->r_vaddr);
- _bfd_error_handler
- (_("%pB: relocation (%d) at 0x%s has wrong r_rsize (0x%x)\n"),
- input_bfd, rel->r_type, vaddr_buf, rel->r_size);
- return false;
- }
+ _bfd_error_handler
+ (_("%pB: relocation (%d) at 0x%" PRIx64 " has wrong r_rsize (0x%x)\n"),
+ input_bfd, rel->r_type, (uint64_t) rel->r_vaddr, rel->r_size);
+ return false;
}
}
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 92e780733f..a5b936fd7c 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -2562,14 +2562,10 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
if (isym.n_value > (bfd_vma) 0xffffffff)
{
if (! h->root.linker_def)
- {
- char value_buf[128];
-
- sprintf_vma (value_buf, isym.n_value);
- _bfd_error_handler
- (_("%pB: stripping non-representable symbol '%s' (value 0x%s)"),
- output_bfd, h->root.root.string, value_buf);
- }
+ _bfd_error_handler
+ (_("%pB: stripping non-representable symbol '%s' "
+ "(value 0x%" PRIx64 ")"),
+ output_bfd, h->root.root.string, isym.n_value);
return true;
}
#endif
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 511d88b533..a4edf7a2e6 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -1389,7 +1389,7 @@ _bfd_ecoff_print_symbol (bfd *abfd,
(*debug_swap->swap_sym_in) (abfd, ecoffsymbol (symbol)->native,
&ecoff_sym);
fprintf (file, "ecoff local ");
- fprintf_vma (file, (bfd_vma) ecoff_sym.value);
+ bfd_fprintf_vma (abfd, file, ecoff_sym.value);
fprintf (file, " %x %x", (unsigned) ecoff_sym.st,
(unsigned) ecoff_sym.sc);
}
@@ -1400,7 +1400,7 @@ _bfd_ecoff_print_symbol (bfd *abfd,
(*debug_swap->swap_ext_in) (abfd, ecoffsymbol (symbol)->native,
&ecoff_ext);
fprintf (file, "ecoff extern ");
- fprintf_vma (file, (bfd_vma) ecoff_ext.asym.value);
+ bfd_fprintf_vma (abfd, file, ecoff_ext.asym.value);
fprintf (file, " %x %x", (unsigned) ecoff_ext.asym.st,
(unsigned) ecoff_ext.asym.sc);
}
@@ -1443,7 +1443,7 @@ _bfd_ecoff_print_symbol (bfd *abfd,
fprintf (file, "[%3d] %c ",
pos, type);
- fprintf_vma (file, (bfd_vma) ecoff_ext.asym.value);
+ bfd_fprintf_vma (abfd, file, ecoff_ext.asym.value);
fprintf (file, " st %x sc %x indx %x %c%c%c %s",
(unsigned) ecoff_ext.asym.st,
(unsigned) ecoff_ext.asym.sc,
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index ce3c46f69e..bf72c85ca4 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -5054,12 +5054,9 @@ print_r_reloc (FILE *fp, const r_reloc *r_rel)
else
fprintf (fp, " ?? + ");
- fprintf_vma (fp, r_rel->target_offset);
+ fprintf (fp, "%" PRIx64, (uint64_t) r_rel->target_offset);
if (r_rel->virtual_offset)
- {
- fprintf (fp, " + ");
- fprintf_vma (fp, r_rel->virtual_offset);
- }
+ fprintf (fp, " + %" PRIx64, (uint64_t) r_rel->virtual_offset);
fprintf (fp, ")");
}
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 20fa472c38..9c177d8d0b 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -3010,18 +3010,13 @@ mmo_write_symbols_and_terminator (bfd *abfd)
{
/* Arbitrary buffer to hold the printable representation of a
vma. */
- char vmas_main[40];
- char vmas_start[40];
bfd_vma vma_start = bfd_get_start_address (abfd);
- sprintf_vma (vmas_main, mainvalue);
- sprintf_vma (vmas_start, vma_start);
-
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: bad symbol definition: `Main' set to %s rather"
- " than the start address %s\n"),
- abfd, vmas_main, vmas_start);
+ (_("%pB: bad symbol definition: `Main' set to %" PRIx64 " rather"
+ " than the start address %" PRIx64 "\n"),
+ abfd, mainvalue, vma_start);
bfd_set_error (bfd_error_bad_value);
return false;
}
diff --git a/bfd/pei-x86_64.c b/bfd/pei-x86_64.c
index 90ee530ea2..7d8fc8f072 100644
--- a/bfd/pei-x86_64.c
+++ b/bfd/pei-x86_64.c
@@ -498,19 +498,14 @@ pex64_dump_xdata (FILE *file, bfd *abfd,
case UNW_FLAG_EHANDLER:
case UNW_FLAG_UHANDLER:
case UNW_FLAG_FHANDLER:
- fprintf (file, "\tHandler: ");
- fprintf_vma (file, (ui.rva_ExceptionHandler
- + pe_data (abfd)->pe_opthdr.ImageBase));
- fprintf (file, ".\n");
+ fprintf (file, "\tHandler: %016" PRIx64 ".\n",
+ ui.rva_ExceptionHandler + pe_data (abfd)->pe_opthdr.ImageBase);
break;
case UNW_FLAG_CHAININFO:
- fprintf (file, "\tChain: start: ");
- fprintf_vma (file, ui.rva_BeginAddress);
- fprintf (file, ", end: ");
- fprintf_vma (file, ui.rva_EndAddress);
- fprintf (file, "\n\t unwind data: ");
- fprintf_vma (file, ui.rva_UnwindData);
- fprintf (file, ".\n");
+ fprintf (file, "\tChain: start: %016" PRIx64 ", end: %016" PRIx64,
+ ui.rva_BeginAddress, ui.rva_EndAddress);
+ fprintf (file, "\n\t unwind data: %016" PRIx64 ".\n",
+ ui.rva_UnwindData);
break;
}
@@ -640,15 +635,10 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
&& rf.rva_UnwindData == 0)
/* We are probably into the padding of the section now. */
break;
- fputc (' ', file);
- fprintf_vma (file, i + pdata_section->vma);
- fprintf (file, ":\t");
- fprintf_vma (file, imagebase + rf.rva_BeginAddress);
- fprintf (file, " ");
- fprintf_vma (file, imagebase + rf.rva_EndAddress);
- fprintf (file, " ");
- fprintf_vma (file, imagebase + rf.rva_UnwindData);
- fprintf (file, "\n");
+ fprintf (file, " %016" PRIx64, i + pdata_section->vma);
+ fprintf (file, ":\t%016" PRIx64, imagebase + rf.rva_BeginAddress);
+ fprintf (file, " %016" PRIx64, imagebase + rf.rva_EndAddress);
+ fprintf (file, " %016" PRIx64 "\n", imagebase + rf.rva_UnwindData);
if (i != 0 && rf.rva_BeginAddress <= prev_beginaddress)
{
seen_error = 1;
@@ -744,26 +734,22 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
if (i == 0)
fprintf (file, _("\nDump of %s\n"), xdata_section->name);
- fputc (' ', file);
- fprintf_vma (file, rf.rva_UnwindData + imagebase);
+ fprintf (file, " %016" PRIx64, rf.rva_UnwindData + imagebase);
if (prev_unwinddata_rva == rf.rva_UnwindData)
{
/* Do not dump again the xdata for the same entry. */
- fprintf (file, " also used for function at ");
- fprintf_vma (file, rf.rva_BeginAddress + imagebase);
- fputc ('\n', file);
+ fprintf (file, " also used for function at %016" PRIx64 "\n",
+ rf.rva_BeginAddress + imagebase);
continue;
}
else
prev_unwinddata_rva = rf.rva_UnwindData;
- fprintf (file, " (rva: %08x): ",
- (unsigned int) rf.rva_UnwindData);
- fprintf_vma (file, rf.rva_BeginAddress + imagebase);
- fprintf (file, " - ");
- fprintf_vma (file, rf.rva_EndAddress + imagebase);
- fputc ('\n', file);
+ fprintf (file, " (rva: %08x): %016" PRIx64 " - %016" PRIx64 "\n",
+ (unsigned int) rf.rva_UnwindData,
+ rf.rva_BeginAddress + imagebase,
+ rf.rva_EndAddress + imagebase);
if (rf.rva_UnwindData != 0 || virt_size_is_zero)
{
@@ -781,8 +767,8 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
{
pex64_get_runtime_function
(abfd, &arf, &pdata[altent - pdata_vma]);
- fprintf (file, "pdata element at 0x");
- fprintf_vma (file, arf.rva_UnwindData);
+ fprintf (file, "pdata element at 0x%016" PRIx64,
+ arf.rva_UnwindData);
}
else
fprintf (file, "unknown pdata element");
diff --git a/bfd/som.c b/bfd/som.c
index 3c0b68a444..90928b7641 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -4897,9 +4897,8 @@ som_print_symbol (bfd *abfd,
fprintf (file, "%s", symbol->name);
break;
case bfd_print_symbol_more:
- fprintf (file, "som ");
- fprintf_vma (file, symbol->value);
- fprintf (file, " %lx", (long) symbol->flags);
+ fprintf (file, "som %08" PRIx64 " %x",
+ (uint64_t) symbol->value, symbol->flags);
break;
case bfd_print_symbol_all:
{
diff --git a/bfd/srec.c b/bfd/srec.c
index 5f8c8c1808..abe36bbdbd 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -1096,26 +1096,19 @@ srec_write_symbols (bfd *abfd)
&& s->section->output_section != NULL)
{
/* Just dump out non debug symbols. */
- char buf[43], *p;
+ char buf[43];
len = strlen (s->name);
if (bfd_bwrite (" ", (bfd_size_type) 2, abfd) != 2
|| bfd_bwrite (s->name, len, abfd) != len)
return false;
- sprintf_vma (buf + 2, (s->value
- + s->section->output_section->lma
- + s->section->output_offset));
- p = buf + 2;
- while (p[0] == '0' && p[1] != 0)
- p++;
- len = strlen (p);
- p[len] = '\r';
- p[len + 1] = '\n';
- *--p = '$';
- *--p = ' ';
- len += 4;
- if (bfd_bwrite (p, len, abfd) != len)
+ sprintf (buf, " $%" PRIx64 "\r\n",
+ (uint64_t) (s->value
+ + s->section->output_section->lma
+ + s->section->output_offset));
+ len = strlen (buf);
+ if (bfd_bwrite (buf, len, abfd) != len)
return false;
}
}
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 37435733d7..21c3a7127c 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2792,13 +2792,10 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
if (pe_file_alignment > pe_section_alignment)
{
- char file_alignment[20], section_alignment[20];
-
- sprintf_vma (file_alignment, pe_file_alignment);
- sprintf_vma (section_alignment, pe_section_alignment);
- non_fatal (_("warning: file alignment (0x%s) > section alignment (0x%s)"),
-
- file_alignment, section_alignment);
+ non_fatal (_("warning: file alignment (0x%" PRIx64
+ ") > section alignment (0x%" PRIx64 ")"),
+ (uint64_t) pe_file_alignment,
+ (uint64_t) pe_section_alignment);
}
}
@@ -5495,14 +5492,9 @@ copy_main (int argc, char *argv[])
gap_fill_vma = parse_vma (optarg, "--gap-fill");
gap_fill = (bfd_byte) gap_fill_vma;
if ((bfd_vma) gap_fill != gap_fill_vma)
- {
- char buff[20];
-
- sprintf_vma (buff, gap_fill_vma);
-
- non_fatal (_("Warning: truncating gap-fill from 0x%s to 0x%x"),
- buff, gap_fill);
- }
+ non_fatal (_("Warning: truncating gap-fill from 0x%" PRIx64
+ " to 0x%x"),
+ (uint64_t) gap_fill_vma, gap_fill);
gap_fill_set = true;
}
break;
@@ -5968,32 +5960,20 @@ copy_main (int argc, char *argv[])
if (! p->used)
{
if (p->context & (SECTION_CONTEXT_SET_VMA | SECTION_CONTEXT_ALTER_VMA))
- {
- char buff [20];
-
- sprintf_vma (buff, p->vma_val);
-
- /* xgettext:c-format */
- non_fatal (_("%s %s%c0x%s never used"),
- "--change-section-vma",
- p->pattern,
- p->context & SECTION_CONTEXT_SET_VMA ? '=' : '+',
- buff);
- }
+ /* xgettext:c-format */
+ non_fatal (_("%s %s%c0x%" PRIx64 " never used"),
+ "--change-section-vma",
+ p->pattern,
+ p->context & SECTION_CONTEXT_SET_VMA ? '=' : '+',
+ (uint64_t) p->vma_val);
if (p->context & (SECTION_CONTEXT_SET_LMA | SECTION_CONTEXT_ALTER_LMA))
- {
- char buff [20];
-
- sprintf_vma (buff, p->lma_val);
-
- /* xgettext:c-format */
- non_fatal (_("%s %s%c0x%s never used"),
- "--change-section-lma",
- p->pattern,
- p->context & SECTION_CONTEXT_SET_LMA ? '=' : '+',
- buff);
- }
+ /* xgettext:c-format */
+ non_fatal (_("%s %s%c0x%" PRIx64 " never used"),
+ "--change-section-lma",
+ p->pattern,
+ p->context & SECTION_CONTEXT_SET_LMA ? '=' : '+',
+ (uint64_t) p->lma_val);
}
}
}
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index e91c87d2ac..710dfc33db 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -357,9 +357,9 @@ dump_section_map (bfd *abfd)
seg = &cmd->command.segment;
printf ("[Segment %-16s ", seg->segname);
- printf_vma (seg->vmaddr);
+ bfd_printf_vma (abfd, seg->vmaddr);
putchar ('-');
- printf_vma (seg->vmaddr + seg->vmsize - 1);
+ bfd_printf_vma (abfd, seg->vmaddr + seg->vmsize - 1);
putchar (' ');
disp_segment_prot (seg->initprot);
printf ("]\n");
@@ -368,29 +368,29 @@ dump_section_map (bfd *abfd)
{
printf ("%02u: %-16s %-16s ", ++sec_nbr,
sec->segname, sec->sectname);
- printf_vma (sec->addr);
+ bfd_printf_vma (abfd, sec->addr);
putchar (' ');
- printf_vma (sec->size);
+ bfd_printf_vma (abfd, sec->size);
printf (" %08lx\n", sec->flags);
}
}
}
static void
-dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, bfd_mach_o_section *sec)
+dump_section_header (bfd *abfd, bfd_mach_o_section *sec)
{
printf (" Section: %-16s %-16s (bfdname: %s)\n",
sec->sectname, sec->segname, sec->bfdsection->name);
printf (" addr: ");
- printf_vma (sec->addr);
+ bfd_printf_vma (abfd, sec->addr);
printf (" size: ");
- printf_vma (sec->size);
+ bfd_printf_vma (abfd, sec->size);
printf (" offset: ");
- printf_vma (sec->offset);
+ bfd_printf_vma (abfd, sec->offset);
printf ("\n");
printf (" align: %ld", sec->align);
printf (" nreloc: %lu reloff: ", sec->nreloc);
- printf_vma (sec->reloff);
+ bfd_printf_vma (abfd, sec->reloff);
printf ("\n");
printf (" flags: %08lx (type: %s", sec->flags,
bfd_mach_o_get_name (bfd_mach_o_section_type_name,
@@ -425,7 +425,7 @@ dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, bfd_mach_o_section *sec)
}
static void
-dump_segment (bfd *abfd ATTRIBUTE_UNUSED, bfd_mach_o_load_command *cmd)
+dump_segment (bfd *abfd, bfd_mach_o_load_command *cmd)
{
bfd_mach_o_segment_command *seg = &cmd->command.segment;
bfd_mach_o_section *sec;
@@ -439,16 +439,16 @@ dump_segment (bfd *abfd ATTRIBUTE_UNUSED, bfd_mach_o_load_command *cmd)
disp_segment_prot (seg->maxprot);
printf ("\n");
printf (" vmaddr: ");
- printf_vma (seg->vmaddr);
+ bfd_printf_vma (abfd, seg->vmaddr);
printf (" vmsize: ");
- printf_vma (seg->vmsize);
+ bfd_printf_vma (abfd, seg->vmsize);
printf ("\n");
printf (" fileoff: ");
- printf_vma (seg->fileoff);
+ bfd_printf_vma (abfd, seg->fileoff);
printf (" filesize: ");
- printf_vma ((bfd_vma)seg->filesize);
+ bfd_printf_vma (abfd, (bfd_vma) seg->filesize);
printf (" endoff: ");
- printf_vma ((bfd_vma)(seg->fileoff + seg->filesize));
+ bfd_printf_vma (abfd, (bfd_vma) (seg->fileoff + seg->filesize));
printf ("\n");
for (sec = seg->sect_head; sec != NULL; sec = sec->next)
dump_section_header (abfd, sec);
@@ -540,7 +540,7 @@ dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bool verbose)
printf (" term: idx: %8u num: %u\n",
module->iterm, module->nterm);
printf (" objc_module_info: addr: ");
- printf_vma (module->objc_module_info_addr);
+ bfd_printf_vma (abfd, module->objc_module_info_addr);
printf (" size: %lu\n", module->objc_module_info_size);
}
@@ -608,7 +608,7 @@ dump_dysymtab (bfd *abfd, bfd_mach_o_load_command *cmd, bool verbose)
unsigned int isym = dysymtab->indirect_syms[j];
printf (" ");
- printf_vma (addr);
+ bfd_printf_vma (abfd, addr);
printf (" %5u: 0x%08x", j, isym);
if (isym & BFD_MACH_O_INDIRECT_SYMBOL_LOCAL)
printf (" LOCAL");
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index 169c52f498..9d69355420 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -410,7 +410,7 @@ stab_context (void)
else
fprintf (stderr, "%-6d", stabp->type);
fprintf (stderr, " %-6d ", stabp->desc);
- fprintf_vma (stderr, stabp->value);
+ fprintf (stderr, "%08" PRIx64, (uint64_t) stabp->value);
if (stabp->type != 0)
fprintf (stderr, " %s", stabp->string);
fprintf (stderr, "\n");
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 4a3e448e30..157f8d8f6f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -566,11 +566,10 @@ print_vma (bfd_vma vma, print_mode mode)
/* Fall through. */
case LONG_HEX:
#ifdef BFD64
- if (is_32bit_elf)
- return nc + printf ("%8.8" BFD_VMA_FMT "x", vma);
+ if (!is_32bit_elf)
+ return nc + printf ("%16.16" PRIx64, (uint64_t) vma);
#endif
- printf_vma (vma);
- return nc + 16;
+ return nc + printf ("%8.8" PRIx64, (uint64_t) vma);
case DEC_5:
if (vma <= 99999)
@@ -7193,13 +7192,10 @@ process_section_headers (Filedata * filedata)
bfd_size_type expected_entsize = is_32bit_elf ? size32 : size64; \
if (section->sh_entsize != expected_entsize) \
{ \
- char buf[40]; \
- sprintf_vma (buf, section->sh_entsize); \
- /* Note: coded this way so that there is a single string for \
- translation. */ \
- error (_("Section %d has invalid sh_entsize of %s\n"), i, buf); \
- error (_("(Using the expected size of %u for the rest of this dump)\n"), \
- (unsigned) expected_entsize); \
+ error (_("Section %d has invalid sh_entsize of %" PRIx64 "\n"), \
+ i, (uint64_t) section->sh_entsize); \
+ error (_("(Using the expected size of %" PRIx64 " for the rest of this dump)\n"), \
+ (uint64_t) expected_entsize); \
section->sh_entsize = expected_entsize; \
} \
} \
@@ -8184,13 +8180,13 @@ dump_ia64_vms_dynamic_fixups (Filedata * filedata,
const char *rtype;
printf ("%3u ", (unsigned) BYTE_GET (imfs [i].fixup_seg));
- printf_vma ((bfd_vma) BYTE_GET (imfs [i].fixup_offset));
+ printf ("%016" PRIx64 " ", (uint64_t) BYTE_GET (imfs [i].fixup_offset));
type = BYTE_GET (imfs [i].type);
rtype = elf_ia64_reloc_type (type);
if (rtype == NULL)
- printf (" 0x%08x ", type);
+ printf ("0x%08x ", type);
else
- printf (" %-32s ", rtype);
+ printf ("%-32s ", rtype);
printf ("%6u ", (unsigned) BYTE_GET (imfs [i].symvec_index));
printf ("0x%08x\n", (unsigned) BYTE_GET (imfs [i].data_type));
}
@@ -10596,12 +10592,8 @@ dynamic_section_mips_val (Filedata * filedata, Elf_Internal_Dyn * entry)
printf (_("Interface Version: %s"),
get_dynamic_name (filedata, entry->d_un.d_val));
else
- {
- char buf[40];
- sprintf_vma (buf, entry->d_un.d_ptr);
- /* Note: coded this way so that there is a single string for translation. */
- printf (_("<corrupt: %s>"), buf);
- }
+ printf (_("Interface Version: <corrupt: %" PRIx64 ">"),
+ (uint64_t) entry->d_un.d_ptr);
break;
case DT_MIPS_TIME_STAMP:
@@ -12087,8 +12079,7 @@ process_version_sections (Filedata * filedata)
printable_section_name (filedata, section),
section->sh_info);
- printf (_(" Addr: 0x"));
- printf_vma (section->sh_addr);
+ printf (_(" Addr: 0x%016" PRIx64), (uint64_t) section->sh_addr);
printf (_(" Offset: %#08lx Link: %u (%s)\n"),
(unsigned long) section->sh_offset, section->sh_link,
printable_section_name_from_index (filedata, section->sh_link));
@@ -12234,8 +12225,7 @@ process_version_sections (Filedata * filedata)
printable_section_name (filedata, section),
section->sh_info);
- printf (_(" Addr: 0x"));
- printf_vma (section->sh_addr);
+ printf (_(" Addr: 0x%016" PRIx64), (uint64_t) section->sh_addr);
printf (_(" Offset: %#08lx Link: %u (%s)\n"),
(unsigned long) section->sh_offset, section->sh_link,
printable_section_name_from_index (filedata, section->sh_link));
@@ -12400,8 +12390,7 @@ process_version_sections (Filedata * filedata)
printable_section_name (filedata, section),
(unsigned long) total);
- printf (_(" Addr: 0x"));
- printf_vma (section->sh_addr);
+ printf (_(" Addr: 0x%016" PRIx64), (uint64_t) section->sh_addr);
printf (_(" Offset: %#08lx Link: %u (%s)\n"),
(unsigned long) section->sh_offset, section->sh_link,
printable_section_name (filedata, link_section));
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index d40a71a492..15520e5843 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2377,15 +2377,8 @@ offset_in_range (offsetT val, int size)
}
if ((val & ~mask) != 0 && (-val & ~mask) != 0)
- {
- char val_buf[128];
- char masked_buf[128];
-
- /* Coded this way in order to ease translation. */
- sprintf_vma (val_buf, val);
- sprintf_vma (masked_buf, val & mask);
- as_warn (_("0x%s shortened to 0x%s"), val_buf, masked_buf);
- }
+ as_warn (_("0x%" PRIx64 " shortened to 0x%" PRIx64),
+ (uint64_t) val, (uint64_t) (val & mask));
return val & mask;
}
@@ -4913,12 +4906,8 @@ md_assemble (char *line)
i.types[j].bitfield.disp32 = 0;
if (i.types[j].bitfield.baseindex)
{
- char number_buf[128];
-
- /* Coded this way in order to allow for ease of translation. */
- sprintf_vma (number_buf, exp->X_add_number);
- as_bad (_("0x%s out of range of signed 32bit displacement"),
- number_buf);
+ as_bad (_("0x%" PRIx64 " out of range of signed 32bit displacement"),
+ (uint64_t) exp->X_add_number);
return;
}
}
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 3011302ffb..2051d72a69 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -9954,11 +9954,8 @@ note_register_values (struct ia64_opcode *idesc)
gr_values[regno].value = CURR_SLOT.opnd[1].X_add_number;
gr_values[regno].path = md.path;
if (md.debug_dv)
- {
- fprintf (stderr, " Know gr%d = ", regno);
- fprintf_vma (stderr, gr_values[regno].value);
- fputs ("\n", stderr);
- }
+ fprintf (stderr, " Know gr%d = %" PRIx64 "\n",
+ regno, gr_values[regno].value);
}
}
/* Look for dep.z imm insns. */
@@ -9978,11 +9975,8 @@ note_register_values (struct ia64_opcode *idesc)
gr_values[regno].value = value;
gr_values[regno].path = md.path;
if (md.debug_dv)
- {
- fprintf (stderr, " Know gr%d = ", regno);
- fprintf_vma (stderr, gr_values[regno].value);
- fputs ("\n", stderr);
- }
+ fprintf (stderr, " Know gr%d = %" PRIx64 "\n",
+ regno, gr_values[regno].value);
}
}
else
@@ -10196,12 +10190,9 @@ print_dependency (const char *action, int depind)
if (regdeps[depind].specific && regdeps[depind].index >= 0)
fprintf (stderr, " (%d)", regdeps[depind].index);
if (regdeps[depind].mem_offset.hint)
- {
- fputs (" ", stderr);
- fprintf_vma (stderr, regdeps[depind].mem_offset.base);
- fputs ("+", stderr);
- fprintf_vma (stderr, regdeps[depind].mem_offset.offset);
- }
+ fprintf (stderr, " %" PRIx64 "+%" PRIx64,
+ regdeps[depind].mem_offset.base,
+ regdeps[depind].mem_offset.offset);
fprintf (stderr, "\n");
}
}
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index da04414bdf..9abdf389ac 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -9501,10 +9501,8 @@ load_register (int reg, expressionS *ep, int dbl)
if (!dbl || GPR_SIZE == 32)
{
- char value[32];
-
- sprintf_vma (value, ep->X_add_number);
- as_bad (_("number (0x%s) larger than 32 bits"), value);
+ as_bad (_("number (0x%" PRIx64 ") larger than 32 bits"),
+ ep->X_add_number);
macro_build (ep, "addiu", "t,r,j", reg, 0, BFD_RELOC_LO16);
return;
}
@@ -12318,10 +12316,8 @@ macro (struct mips_cl_insn *ip, char *str)
if (HAVE_32BIT_ADDRESSES
&& !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
{
- char value [32];
-
- sprintf_vma (value, offset_expr.X_add_number);
- as_bad (_("number (0x%s) larger than 32 bits"), value);
+ as_bad (_("number (0x%" PRIx64 ") larger than 32 bits"),
+ offset_expr.X_add_number);
}
/* A constant expression in PIC code can be handled just as it
@@ -13001,10 +12997,8 @@ macro (struct mips_cl_insn *ip, char *str)
if (HAVE_32BIT_ADDRESSES
&& !IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
{
- char value [32];
-
- sprintf_vma (value, offset_expr.X_add_number);
- as_bad (_("number (0x%s) larger than 32 bits"), value);
+ as_bad (_("number (0x%" PRIx64 ") larger than 32 bits"),
+ offset_expr.X_add_number);
}
if (mips_pic == NO_PIC || offset_expr.X_op == O_constant)
diff --git a/gas/listing.c b/gas/listing.c
index 56e04b155d..83a6f39cb3 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -936,26 +936,10 @@ list_symbol_table (void)
if (S_GET_NAME (ptr))
{
- char buf[30], fmt[8];
+ char buf[30];
valueT val = S_GET_VALUE (ptr);
- /* @@ Note that this is dependent on the compilation options,
- not solely on the target characteristics. */
- if (sizeof (val) == 4 && sizeof (int) == 4)
- sprintf (buf, "%08lx", (unsigned long) val);
- else if (sizeof (val) <= sizeof (unsigned long))
- {
- sprintf (fmt, "%%0%lulx",
- (unsigned long) (sizeof (val) * 2));
- sprintf (buf, fmt, (unsigned long) val);
- }
-#if defined (BFD64)
- else if (sizeof (val) > 4)
- sprintf_vma (buf, val);
-#endif
- else
- abort ();
-
+ bfd_sprintf_vma (stdoutput, buf, val);
if (!got_some)
{
fprintf (list_file, "DEFINED SYMBOLS\n");
diff --git a/gas/messages.c b/gas/messages.c
index 3b34466e99..e43b2dbd38 100644
--- a/gas/messages.c
+++ b/gas/messages.c
@@ -369,12 +369,6 @@ as_internal_value_out_of_range (const char *prefix,
bool bad)
{
const char * err;
- /* These buffer sizes are excessive, but better to be safe than sorry.
- Note - these buffers are used in order to make the error message
- string translateable. */
- char val_buf [128];
- char min_buf [128];
- char max_buf [128];
if (prefix == NULL)
prefix = "";
@@ -386,16 +380,14 @@ as_internal_value_out_of_range (const char *prefix,
if (max <= 1)
abort ();
- sprintf (val_buf, "%" BFD_VMA_FMT "d", val);
- sprintf (min_buf, "%" BFD_VMA_FMT "d", right);
-
/* xgettext:c-format */
- err = _("%s out of domain (%s is not a multiple of %s)");
+ err = _("%s out of domain (%" PRId64
+ " is not a multiple of %" PRId64 ")");
if (bad)
- as_bad_where (file, line, err, prefix, val_buf, min_buf);
+ as_bad_where (file, line, err, prefix, (int64_t) val, (int64_t) right);
else
- as_warn_where (file, line, err, prefix, val_buf, min_buf);
+ as_warn_where (file, line, err, prefix, (int64_t) val, (int64_t) right);
}
else if ( val < HEX_MAX_THRESHOLD
&& min < HEX_MAX_THRESHOLD
@@ -404,31 +396,29 @@ as_internal_value_out_of_range (const char *prefix,
&& min > HEX_MIN_THRESHOLD
&& max > HEX_MIN_THRESHOLD)
{
- sprintf (val_buf, "%" BFD_VMA_FMT "d", val);
- sprintf (min_buf, "%" BFD_VMA_FMT "d", min);
- sprintf (max_buf, "%" BFD_VMA_FMT "d", max);
-
/* xgettext:c-format. */
- err = _("%s out of range (%s is not between %s and %s)");
+ err = _("%s out of range (%" PRId64
+ " is not between %" PRId64 " and %" PRId64 ")");
if (bad)
- as_bad_where (file, line, err, prefix, val_buf, min_buf, max_buf);
+ as_bad_where (file, line, err, prefix,
+ (int64_t) val, (int64_t) min, (int64_t) max);
else
- as_warn_where (file, line, err, prefix, val_buf, min_buf, max_buf);
+ as_warn_where (file, line, err, prefix,
+ (int64_t) val, (int64_t) min, (int64_t) max);
}
else
{
- sprintf_vma (val_buf, (bfd_vma) val);
- sprintf_vma (min_buf, (bfd_vma) min);
- sprintf_vma (max_buf, (bfd_vma) max);
-
/* xgettext:c-format. */
- err = _("%s out of range (0x%s is not between 0x%s and 0x%s)");
+ err = _("%s out of range (0x%" PRIx64
+ " is not between 0x%" PRIx64 " and 0x%" PRIx64 ")");
if (bad)
- as_bad_where (file, line, err, prefix, val_buf, min_buf, max_buf);
+ as_bad_where (file, line, err, prefix,
+ (int64_t) val, (int64_t) min, (int64_t) max);
else
- as_warn_where (file, line, err, prefix, val_buf, min_buf, max_buf);
+ as_warn_where (file, line, err, prefix,
+ (int64_t) val, (int64_t) min, (int64_t) max);
}
}
diff --git a/gas/read.c b/gas/read.c
index 559fd05a8d..800712466b 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -4495,14 +4495,9 @@ emit_expr_with_reloc (expressionS *exp,
use = get & unmask;
if ((get & mask) != 0 && (-get & mask) != 0)
{
- char get_buf[128];
- char use_buf[128];
-
- /* These buffers help to ease the translation of the warning message. */
- sprintf_vma (get_buf, get);
- sprintf_vma (use_buf, use);
/* Leading bits contain both 0s & 1s. */
- as_warn (_("value 0x%s truncated to 0x%s"), get_buf, use_buf);
+ as_warn (_("value 0x%" PRIx64 " truncated to 0x%" PRIx64),
+ (uint64_t) get, (uint64_t) use);
}
/* Put bytes in right order. */
md_number_to_chars (p, use, (int) nbytes);
diff --git a/gas/symbols.c b/gas/symbols.c
index 81383a5e8c..d4c0dff7ad 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3132,9 +3132,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
const char *name = S_GET_NAME (sym);
if (!name || !name[0])
name = "(unnamed)";
- fprintf (file, "sym ");
- fprintf_vma (file, (bfd_vma) (uintptr_t) sym);
- fprintf (file, " %s", name);
+ fprintf (file, "sym %p %s", sym, name);
if (sym->flags.local_symbol)
{
@@ -3142,10 +3140,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
if (locsym->frag != &zero_address_frag
&& locsym->frag != NULL)
- {
- fprintf (file, " frag ");
- fprintf_vma (file, (bfd_vma) (uintptr_t) locsym->frag);
- }
+ fprintf (file, " frag %p", locsym->frag);
if (locsym->flags.resolved)
fprintf (file, " resolved");
fprintf (file, " local");
@@ -3153,10 +3148,7 @@ print_symbol_value_1 (FILE *file, symbolS *sym)
else
{
if (sym->frag != &zero_address_frag)
- {
- fprintf (file, " frag ");
- fprintf_vma (file, (bfd_vma) (uintptr_t) sym->frag);
- }
+ fprintf (file, " frag %p", sym->frag);
if (sym->flags.written)
fprintf (file, " written");
if (sym->flags.resolved)
@@ -3230,9 +3222,7 @@ print_binary (FILE *file, const char *name, expressionS *exp)
void
print_expr_1 (FILE *file, expressionS *exp)
{
- fprintf (file, "expr ");
- fprintf_vma (file, (bfd_vma) (uintptr_t) exp);
- fprintf (file, " ");
+ fprintf (file, "expr %p ", exp);
switch (exp->X_op)
{
case O_illegal:
@@ -3242,7 +3232,7 @@ print_expr_1 (FILE *file, expressionS *exp)
fprintf (file, "absent");
break;
case O_constant:
- fprintf (file, "constant %lx", (unsigned long) exp->X_add_number);
+ fprintf (file, "constant %" PRIx64, (uint64_t) exp->X_add_number);
break;
case O_symbol:
indent_level++;
@@ -3251,8 +3241,8 @@ print_expr_1 (FILE *file, expressionS *exp)
fprintf (file, ">");
maybe_print_addnum:
if (exp->X_add_number)
- fprintf (file, "\n%*s%lx", indent_level * 4, "",
- (unsigned long) exp->X_add_number);
+ fprintf (file, "\n%*s%" PRIx64, indent_level * 4, "",
+ (uint64_t) exp->X_add_number);
indent_level--;
break;
case O_register:
diff --git a/gas/testsuite/gas/all/overflow.l b/gas/testsuite/gas/all/overflow.l
index 7f98e852f6..d10d9feb55 100644
--- a/gas/testsuite/gas/all/overflow.l
+++ b/gas/testsuite/gas/all/overflow.l
@@ -1,8 +1,8 @@
.*: Assembler messages:
-.*:5: Warning: .* 0x0+100 truncated to 0x0+0
-.*:6: Warning: .* 0x0+101 truncated to 0x0+1
-.*:11: Warning: .* 0xf+00 truncated to 0x0+0
-.*:12: Warning: .* 0xf+eff truncated to 0x0+ff
+.*:5: Warning: .* 0x0*100 truncated to 0x0*0
+.*:6: Warning: .* 0x0*101 truncated to 0x0*1
+.*:11: Warning: .* 0xf+00 truncated to 0x0*0
+.*:12: Warning: .* 0xf+eff truncated to 0x0*ff
.*:17: Error: .* (256|(0x)?100) too large .*
.*:18: Error: .* (257|(0x)?101) too large .*
.*:23: Error: .* (0x)?f+00 too large .*
diff --git a/gas/testsuite/gas/m68k/mcf-mov3q.d b/gas/testsuite/gas/m68k/mcf-mov3q.d
index 8de1d38b68..1f4df1dc31 100644
--- a/gas/testsuite/gas/m68k/mcf-mov3q.d
+++ b/gas/testsuite/gas/m68k/mcf-mov3q.d
@@ -13,6 +13,6 @@ Disassembly of section .text:
6: a75b mov3ql #3,%a3@\+
8: a964 mov3ql #4,%a4@-
a: ab6d 04d2 mov3ql #5,%a5@\(1234\)
- e: ad76 6803 mov3ql #6,%fp@\(0+03,%d6:l\)
+ e: ad76 6803 mov3ql #6,%fp@\(0*3,%d6:l\)
12: af78 1234 mov3ql #7,1234 (<test_mov3q\+0x1234>|<.data\+0x1218>)
16: a179 1234 5678 mov3ql #-1,12345678 (<test_mov3q\+0x12345678>|<.data\+0x1234565c>)
diff --git a/gas/testsuite/gas/m68k/operands.d b/gas/testsuite/gas/m68k/operands.d
index 465ae88dac..f3a1b04531 100644
--- a/gas/testsuite/gas/m68k/operands.d
+++ b/gas/testsuite/gas/m68k/operands.d
@@ -18,237 +18,237 @@ Disassembly of section .text:
0+010 <foo\+(0x|)10> tstl %a0@\(8\)
0+014 <foo\+(0x|)14> tstl %a0@\(8\)
0+018 <foo\+(0x|)18> tstl %a0@\(8\)
-0+01c <foo\+(0x|)1c> tstl %a0@\(0+008,%d0:l\)
-0+020 <foo\+(0x|)20> tstl %a0@\(0+008,%d0:w\)
-0+024 <foo\+(0x|)24> tstl %a0@\(0+008,%d0:w\)
-0+028 <foo\+(0x|)28> tstl %a0@\(0+008,%d0:w:2\)
-0+02c <foo\+(0x|)2c> tstl %a0@\(0+008,%d0:w:4\)
-0+030 <foo\+(0x|)30> tstl %a0@\(0+008,%d0:w:8\)
-0+034 <foo\+(0x|)34> tstl %a0@\(0+008,%d0:l\)
-0+038 <foo\+(0x|)38> tstl %a0@\(0+008,%d0:l\)
-0+03c <foo\+(0x|)3c> tstl %a0@\(0+008,%d0:l:2\)
-0+040 <foo\+(0x|)40> tstl %a0@\(0+008,%d0:l:4\)
-0+044 <foo\+(0x|)44> tstl %a0@\(0+008,%d0:l:8\)
-0+048 <foo\+(0x|)48> tstl %a0@\(0+000,%d0:w:2\)
-0+04c <foo\+(0x|)4c> tstl %a0@\(0+008,%d0:l\)
-0+050 <foo\+(0x|)50> tstl %a0@\(0+008,%d0:l\)
-0+054 <foo\+(0x|)54> tstl %a0@\(0+008,%d0:l:2\)
-0+058 <foo\+(0x|)58> tstl %a0@\(0+008,%d0:l:4\)
-0+05c <foo\+(0x|)5c> tstl %a0@\(0+008,%d0:l:8\)
-0+060 <foo\+(0x|)60> tstl %a0@\(0+008,%d0:w\)
-0+064 <foo\+(0x|)64> tstl %a0@\(0+008,%d0:w\)
-0+068 <foo\+(0x|)68> tstl %a0@\(0+008,%d0:w:2\)
-0+06c <foo\+(0x|)6c> tstl %a0@\(0+008,%d0:w:4\)
-0+070 <foo\+(0x|)70> tstl %a0@\(0+008,%d0:w:8\)
-0+074 <foo\+(0x|)74> tstl %a0@\(0+008,%d0:l\)
-0+078 <foo\+(0x|)78> tstl %a0@\(0+008,%d0:l\)
-0+07c <foo\+(0x|)7c> tstl %a0@\(0+008,%d0:l:2\)
-0+080 <foo\+(0x|)80> tstl %a0@\(0+008,%d0:l:4\)
-0+084 <foo\+(0x|)84> tstl %a0@\(0+008,%d0:l:8\)
-0+088 <foo\+(0x|)88> tstl %a0@\(0+008,%d0:l\)
-0+08c <foo\+(0x|)8c> tstl %a0@\(0+008,%a1:w:2\)
-0+090 <foo\+(0x|)90> tstl %a1@\(0+008,%a0:l\)
-0+094 <foo\+(0x|)94> tstl %a0@\(0+008,%d0:w:2\)
-0+098 <foo\+(0x|)98> tstl %a0@\(0+008,%d0:w:2\)
-0+09c <foo\+(0x|)9c> tstl %a0@\(0+008,%a1:w:2\)
-0+0a0 <foo\+(0x|)a0> tstl %a0@\(0+000,%d0:w:2\)
-0+0a4 <foo\+(0x|)a4> tstl %a0@\(0+000,%d0:w:2\)
-0+0a8 <foo\+(0x|)a8> tstl %a0@\(0+3e8,%d0:w:2\)
-0+0ae <foo\+(0x|)ae> tstl @\(0+3e8,%d0:w:2\)
-0+0b4 <foo\+(0x|)b4> tstl @\(0+000,%d0:w:2\)
-0+0b8 <foo\+(0x|)b8> tstl @\(0+3e8\)
-0+0be <foo\+(0x|)be> tstl %a0@\(0+186a0\)
-0+0c6 <foo\+(0x|)c6> tstl %a0@\(0+3e8,%d0:w:2\)
-0+0cc <foo\+(0x|)cc> tstl %a0@\(0+3e8,%d0:l\)
-0+0d2 <foo\+(0x|)d2> tstl %a0@\(0+3e8,%a1:w:2\)
-0+0d8 <foo\+(0x|)d8> tstl %a0@\(0+3e8,%d0:w:2\)
-0+0de <foo\+(0x|)de> tstl %a0@\(0+3e8,%d0:l\)
-0+0e4 <foo\+(0x|)e4> tstl @\(0+3e8,%d0:w:2\)
-0+0ea <foo\+(0x|)ea> tstl @\(0+3e8,%d0:w:2\)
-0+0f0 <foo\+(0x|)f0> tstl @\(0+000,%d0:w:2\)
-0+0f4 <foo\+(0x|)f4> tstl %a0@\(0+186a0\)
-0+0fc <foo\+(0x|)fc> tstl %a0@\(0+186a0\)
-0+104 <foo\+(0x|)104> tstl @\(0+3e8,%d0:w:2\)
-0+10a <foo\+(0x|)10a> tstl @\(0+186a0\)
-0+112 <foo\+(0x|)112> tstl @\(0+3e8,%d0:w:2\)
-0+118 <foo\+(0x|)118> tstl @\(0+3e8,%d0:l\)
-0+11e <foo\+(0x|)11e> tstl @\(0+3e8,%a1:w:2\)
-0+124 <foo\+(0x|)124> tstl @\(0+3e8,%d0:w:2\)
-0+12a <foo\+(0x|)12a> tstl @\(0+3e8,%d0:l\)
-0+130 <foo\+(0x|)130> tstl @\(0+186a0\)
-0+138 <foo\+(0x|)138> tstl @\(0+186a0\)
-0+140 <foo\+(0x|)140> tstl %a0@\(0+3e8\)
-0+146 <foo\+(0x|)146> tstl @\(0+3e8\)
-0+14c <foo\+(0x|)14c> tstl @\(0+000\)
-0+150 <foo\+(0x|)150> tstl %a0@\(0+3e8\)
-0+156 <foo\+(0x|)156> tstl %a0@\(0+3e8\)
-0+15c <foo\+(0x|)15c> tstl %a0@\(0+3e8\)
-0+162 <foo\+(0x|)162> tstl %a0@\(0+3e8\)
-0+168 <foo\+(0x|)168> tstl %a0@\(0+3e8\)
-0+16e <foo\+(0x|)16e> tstl @\(0+3e8\)
-0+174 <foo\+(0x|)174> tstl @\(0+3e8\)
-0+17a <foo\+(0x|)17a> tstl @\(0+000\)
-0+17e <foo\+(0x|)17e> tstl %a0@\(0+3e8\)@\(0+7d0,%d0:w:2\)
-0+186 <foo\+(0x|)186> tstl %a0@\(0+3e8\)@\(0+000,%d0:w:2\)
-0+18c <foo\+(0x|)18c> tstl %a0@\(0+3e8\)@\(0+7d0\)
-0+194 <foo\+(0x|)194> tstl @\(0+3e8\)@\(0+7d0,%d0:w:2\)
-0+19c <foo\+(0x|)19c> tstl @\(0+3e8\)@\(0+000,%d0:w:2\)
-0+1a2 <foo\+(0x|)1a2> tstl @\(0+3e8\)@\(0+7d0\)
-0+1aa <foo\+(0x|)1aa> tstl %a0@\(0+000\)@\(0+7d0,%d0:w:2\)
-0+1b0 <foo\+(0x|)1b0> tstl %a0@\(0+000\)@\(0+000,%d0:w:2\)
-0+1b4 <foo\+(0x|)1b4> tstl %a0@\(0+000\)@\(0+7d0\)
-0+1ba <foo\+(0x|)1ba> tstl @\(0+000\)@\(0+7d0,%d0:w:2\)
-0+1c0 <foo\+(0x|)1c0> tstl @\(0+000\)@\(0+000,%d0:w:2\)
-0+1c4 <foo\+(0x|)1c4> tstl @\(0+000\)@\(0+7d0\)
-0+1ca <foo\+(0x|)1ca> tstl %a0@\(0+3e8\)@\(0+7d0,%d0:w:2\)
-0+1d2 <foo\+(0x|)1d2> tstl %a0@\(0+3e8\)@\(0+000,%d0:w:2\)
-0+1d8 <foo\+(0x|)1d8> tstl %a0@\(0+3e8\)@\(0+7d0\)
-0+1e0 <foo\+(0x|)1e0> tstl @\(0+3e8\)@\(0+7d0,%d0:w:2\)
-0+1e8 <foo\+(0x|)1e8> tstl @\(0+3e8\)@\(0+000,%d0:w:2\)
-0+1ee <foo\+(0x|)1ee> tstl @\(0+3e8\)@\(0+7d0\)
-0+1f6 <foo\+(0x|)1f6> tstl %a0@\(0+000\)@\(0+7d0,%d0:w:2\)
-0+1fc <foo\+(0x|)1fc> tstl %a0@\(0+000\)@\(0+000,%d0:w:2\)
-0+200 <foo\+(0x|)200> tstl %a0@\(0+000\)@\(0+7d0\)
-0+206 <foo\+(0x|)206> tstl @\(0+000\)@\(0+7d0,%d0:w:2\)
-0+20c <foo\+(0x|)20c> tstl @\(0+000\)@\(0+000,%d0:w:2\)
-0+210 <foo\+(0x|)210> tstl @\(0+000\)@\(0+7d0\)
-0+216 <foo\+(0x|)216> tstl %a0@\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+21e <foo\+(0x|)21e> tstl %a0@\(0+3e8,%d0:w:2\)@\(0+000\)
-0+224 <foo\+(0x|)224> tstl @\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+22c <foo\+(0x|)22c> tstl @\(0+3e8,%d0:w:2\)@\(0+000\)
-0+232 <foo\+(0x|)232> tstl %a0@\(0+000,%d0:w:2\)@\(0+7d0\)
-0+238 <foo\+(0x|)238> tstl %a0@\(0+000,%d0:w:2\)@\(0+000\)
-0+23c <foo\+(0x|)23c> tstl @\(0+000,%d0:w:2\)@\(0+7d0\)
-0+242 <foo\+(0x|)242> tstl @\(0+000,%d0:w:2\)@\(0+000\)
-0+246 <foo\+(0x|)246> tstl %a0@\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+24e <foo\+(0x|)24e> tstl %a0@\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+256 <foo\+(0x|)256> tstl %a0@\(0+3e8,%d0:l\)@\(0+7d0\)
-0+25e <foo\+(0x|)25e> tstl %a1@\(0+3e8,%a0:l\)@\(0+7d0\)
-0+266 <foo\+(0x|)266> tstl %a0@\(0+3e8,%a1:w:2\)@\(0+7d0\)
-0+26e <foo\+(0x|)26e> tstl %a0@\(0+3e8,%d0:w:2\)@\(0+000\)
-0+274 <foo\+(0x|)274> tstl %a0@\(0+3e8,%d0:l\)@\(0+000\)
-0+27a <foo\+(0x|)27a> tstl @\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+282 <foo\+(0x|)282> tstl @\(0+3e8,%d0:w:2\)@\(0+000\)
-0+288 <foo\+(0x|)288> tstl %a0@\(0+000,%d0:w:2\)@\(0+7d0\)
-0+28e <foo\+(0x|)28e> tstl %a0@\(0+000,%d0:l\)@\(0+7d0\)
-0+294 <foo\+(0x|)294> tstl %a0@\(0+000,%d0:w:2\)@\(0+000\)
-0+298 <foo\+(0x|)298> tstl %a0@\(0+000,%d0:l\)@\(0+000\)
-0+29c <foo\+(0x|)29c> tstl @\(0+000,%d0:w:2\)@\(0+7d0\)
-0+2a2 <foo\+(0x|)2a2> tstl @\(0+000,%d0:w:2\)@\(0+000\)
-0+2a6 <foo\+(0x|)2a6> pea %pc@\(0+2b0 <foo\+(0x|)2b0>\)
-0+2aa <foo\+(0x|)2aa> pea %pc@\(0+2b4 <foo\+(0x|)2b4>\)
-0+2ae <foo\+(0x|)2ae> pea %pc@\(0+2b8 <foo\+(0x|)2b8>\)
-0+2b2 <foo\+(0x|)2b2> pea %pc@\(0+000 <foo>\)
-0+2b6 <foo\+(0x|)2b6> pea %pc@\(0+2c0 <foo\+(0x|)2c0>,%d0:w:2\)
-0+2ba <foo\+(0x|)2ba> pea %pc@\(0+2bc <foo\+(0x|)2bc>,%d0:w:2\)
-0+2be <foo\+(0x|)2be> pea %pc@\(0+2c8 <foo\+(0x|)2c8>,%d0:w:2\)
-0+2c2 <foo\+(0x|)2c2> pea %pc@\(0+2cc <foo\+(0x|)2cc>,%d0:l\)
-0+2c6 <foo\+(0x|)2c6> pea %pc@\(0+2d0 <foo\+(0x|)2d0>,%a0:l\)
-0+2ca <foo\+(0x|)2ca> pea %pc@\(0+2d4 <foo\+(0x|)2d4>,%d0:w:2\)
-0+2ce <foo\+(0x|)2ce> pea %pc@\(0+2d8 <foo\+(0x|)2d8>,%d0:l\)
-0+2d2 <foo\+(0x|)2d2> pea %pc@\(0+2dc <foo\+(0x|)2dc>,%a0:l\)
-0+2d6 <foo\+(0x|)2d6> pea %pc@\(0+2d8 <foo\+(0x|)2d8>,%d0:w:2\)
-0+2da <foo\+(0x|)2da> pea %pc@\(0+2dc <foo\+(0x|)2dc>,%d0:l\)
-0+2de <foo\+(0x|)2de> pea %pc@\(0+2e0 <foo\+(0x|)2e0>,%a0:l\)
-0+2e2 <foo\+(0x|)2e2> pea %pc@\(0+6cc <.*>,%d0:w:2\)
-0+2e8 <foo\+(0x|)2e8> pea %pc@\(0+1898a <.*>\)
-0+2f0 <foo\+(0x|)2f0> pea %pc@\(0+6da <.*>,%d0:w:2\)
-0+2f6 <foo\+(0x|)2f6> pea %pc@\(0+6e0 <.*>,%d0:l\)
-0+2fc <foo\+(0x|)2fc> pea %pc@\(0+6e6 <.*>,%a1:w:2\)
-0+302 <foo\+(0x|)302> pea %pc@\(0+6ec <.*>,%a1:l\)
-0+308 <foo\+(0x|)308> pea %pc@\(0+6f2 <.*>,%d0:w:2\)
-0+30e <foo\+(0x|)30e> pea %pc@\(0+6f8 <.*>,%d0:l\)
-0+314 <foo\+(0x|)314> pea %pc@\(0+6fe <.*>,%a1:l\)
-0+31a <foo\+(0x|)31a> pea %pc@\(0+189bc <.*>\)
-0+322 <foo\+(0x|)322> pea %pc@\(0+189c4 <.*>\)
-0+32a <foo\+(0x|)32a> pea %zpc@\(0+3e8,%d0:w:2\)
-0+330 <foo\+(0x|)330> pea %zpc@\(0+186a0\)
-0+338 <foo\+(0x|)338> pea %zpc@\(0+3e8,%d0:w:2\)
-0+33e <foo\+(0x|)33e> pea %zpc@\(0+3e8,%d0:l\)
-0+344 <foo\+(0x|)344> pea %zpc@\(0+3e8,%a1:w:2\)
-0+34a <foo\+(0x|)34a> pea %zpc@\(0+3e8,%a1:l\)
-0+350 <foo\+(0x|)350> pea %zpc@\(0+3e8,%d0:w:2\)
-0+356 <foo\+(0x|)356> pea %zpc@\(0+3e8,%d0:l\)
-0+35c <foo\+(0x|)35c> pea %zpc@\(0+3e8,%a1:l\)
-0+362 <foo\+(0x|)362> pea %zpc@\(0+186a0\)
-0+36a <foo\+(0x|)36a> pea %zpc@\(0+186a0\)
-0+372 <foo\+(0x|)372> pea %pc@\(0+75c <.*>\)@\(0+7d0,%d0:w:2\)
-0+37a <foo\+(0x|)37a> pea %pc@\(0+764 <.*>\)@\(0+000,%d0:w:2\)
-0+380 <foo\+(0x|)380> pea %pc@\(0+76a <.*>\)@\(0+7d0\)
-0+388 <foo\+(0x|)388> pea %pc@\(0+38a <foo\+(0x|)38a>\)@\(0+7d0,%d0:w:2\)
-0+38e <foo\+(0x|)38e> pea %pc@\(0+390 <foo\+(0x|)390>\)@\(0+000,%d0:w:2\)
-0+392 <foo\+(0x|)392> pea %pc@\(0+394 <foo\+(0x|)394>\)@\(0+7d0\)
-0+398 <foo\+(0x|)398> pea %pc@\(0+782 <.*>\)@\(0+7d0,%d0:w:2\)
-0+3a0 <foo\+(0x|)3a0> pea %pc@\(0+78a <.*>\)@\(0+000,%d0:w:2\)
-0+3a6 <foo\+(0x|)3a6> pea %pc@\(0+790 <.*>\)@\(0+7d0\)
-0+3ae <foo\+(0x|)3ae> pea %pc@\(0+3b0 <foo\+(0x|)3b0>\)@\(0+7d0,%d0:w:2\)
-0+3b4 <foo\+(0x|)3b4> pea %pc@\(0+3b6 <foo\+(0x|)3b6>\)@\(0+000,%d0:w:2\)
-0+3b8 <foo\+(0x|)3b8> pea %pc@\(0+3ba <foo\+(0x|)3ba>\)@\(0+7d0\)
-0+3be <foo\+(0x|)3be> pea %zpc@\(0+3e8\)@\(0+7d0,%d0:w:2\)
-0+3c6 <foo\+(0x|)3c6> pea %zpc@\(0+3e8\)@\(0+000,%d0:w:2\)
-0+3cc <foo\+(0x|)3cc> pea %zpc@\(0+3e8\)@\(0+7d0\)
-0+3d4 <foo\+(0x|)3d4> pea %zpc@\(0+000\)@\(0+7d0,%d0:w:2\)
-0+3da <foo\+(0x|)3da> pea %zpc@\(0+000\)@\(0+000,%d0:w:2\)
-0+3de <foo\+(0x|)3de> pea %zpc@\(0+000\)@\(0+7d0\)
-0+3e4 <foo\+(0x|)3e4> pea %zpc@\(0+3e8\)@\(0+7d0,%d0:w:2\)
-0+3ec <foo\+(0x|)3ec> pea %zpc@\(0+3e8\)@\(0+000,%d0:w:2\)
-0+3f2 <foo\+(0x|)3f2> pea %zpc@\(0+3e8\)@\(0+7d0\)
-0+3fa <foo\+(0x|)3fa> pea %zpc@\(0+000\)@\(0+7d0,%d0:w:2\)
-0+400 <foo\+(0x|)400> pea %zpc@\(0+000\)@\(0+000,%d0:w:2\)
-0+404 <foo\+(0x|)404> pea %zpc@\(0+000\)@\(0+7d0\)
-0+40a <foo\+(0x|)40a> pea %pc@\(0+7f4 <.*>,%d0:w:2\)@\(0+7d0\)
-0+412 <foo\+(0x|)412> pea %pc@\(0+7fc <.*>,%d0:w:2\)@\(0+000\)
-0+418 <foo\+(0x|)418> pea %pc@\(0+41a <foo\+(0x|)41a>,%d0:w:2\)@\(0+7d0\)
-0+41e <foo\+(0x|)41e> pea %pc@\(0+420 <foo\+(0x|)420>,%d0:w:2\)@\(0+000\)
-0+422 <foo\+(0x|)422> pea %pc@\(0+80c <.*>,%d0:w:2\)@\(0+7d0\)
-0+42a <foo\+(0x|)42a> pea %pc@\(0+814 <.*>,%d0:w:2\)@\(0+7d0\)
-0+432 <foo\+(0x|)432> pea %pc@\(0+81c <.*>,%d0:l\)@\(0+7d0\)
-0+43a <foo\+(0x|)43a> pea %pc@\(0+824 <.*>,%a1:l\)@\(0+7d0\)
-0+442 <foo\+(0x|)442> pea %pc@\(0+82c <.*>,%a1:l\)@\(0+7d0\)
-0+44a <foo\+(0x|)44a> pea %pc@\(0+834 <.*>,%a1:w:2\)@\(0+7d0\)
-0+452 <foo\+(0x|)452> pea %pc@\(0+83c <.*>,%d0:w:2\)@\(0+000\)
-0+458 <foo\+(0x|)458> pea %pc@\(0+842 <.*>,%d0:l\)@\(0+000\)
-0+45e <foo\+(0x|)45e> pea %pc@\(0+848 <.*>,%a1:l\)@\(0+000\)
-0+464 <foo\+(0x|)464> pea %pc@\(0+466 <foo\+(0x|)466>,%d0:w:2\)@\(0+7d0\)
-0+46a <foo\+(0x|)46a> pea %pc@\(0+46c <foo\+(0x|)46c>,%a0:l\)@\(0+7d0\)
-0+470 <foo\+(0x|)470> pea %pc@\(0+472 <foo\+(0x|)472>,%d0:w:2\)@\(0+000\)
-0+474 <foo\+(0x|)474> pea %pc@\(0+476 <foo\+(0x|)476>,%d0:l\)@\(0+000\)
-0+478 <foo\+(0x|)478> pea %zpc@\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+480 <foo\+(0x|)480> pea %zpc@\(0+3e8,%d0:w:2\)@\(0+000\)
-0+486 <foo\+(0x|)486> pea %zpc@\(0+000,%d0:w:2\)@\(0+7d0\)
-0+48c <foo\+(0x|)48c> pea %zpc@\(0+000,%d0:w:2\)@\(0+000\)
-0+490 <foo\+(0x|)490> pea %zpc@\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+498 <foo\+(0x|)498> pea %zpc@\(0+3e8,%d0:w:2\)@\(0+7d0\)
-0+4a0 <foo\+(0x|)4a0> pea %zpc@\(0+3e8,%d0:l\)@\(0+7d0\)
-0+4a8 <foo\+(0x|)4a8> pea %zpc@\(0+3e8,%a1:l\)@\(0+7d0\)
-0+4b0 <foo\+(0x|)4b0> pea %zpc@\(0+3e8,%a1:l\)@\(0+7d0\)
-0+4b8 <foo\+(0x|)4b8> pea %zpc@\(0+3e8,%a1:w:2\)@\(0+7d0\)
-0+4c0 <foo\+(0x|)4c0> pea %zpc@\(0+3e8,%d0:w:2\)@\(0+000\)
-0+4c6 <foo\+(0x|)4c6> pea %zpc@\(0+3e8,%d0:l\)@\(0+000\)
-0+4cc <foo\+(0x|)4cc> pea %zpc@\(0+3e8,%a1:l\)@\(0+000\)
-0+4d2 <foo\+(0x|)4d2> pea %zpc@\(0+000,%d0:w:2\)@\(0+7d0\)
-0+4d8 <foo\+(0x|)4d8> pea %zpc@\(0+000,%a0:l\)@\(0+7d0\)
-0+4de <foo\+(0x|)4de> pea %zpc@\(0+000,%d0:w:2\)@\(0+000\)
-0+4e2 <foo\+(0x|)4e2> pea %zpc@\(0+000,%d0:l\)@\(0+000\)
-0+4e6 <foo\+(0x|)4e6> tstl 0+004 <foo\+(0x|)4>
-0+4ea <foo\+(0x|)4ea> tstl 0+004 <foo\+(0x|)4>
-0+4ee <foo\+(0x|)4ee> tstl 0+004 <foo\+(0x|)4>
-0+4f2 <foo\+(0x|)4f2> tstl 0+186a0 <.*>
-0+4f8 <foo\+(0x|)4f8> tstl 0+008 <foo\+(0x|)8>
-0+4fe <foo\+(0x|)4fe> tstl 0+008 <foo\+(0x|)8>
+0+01c <foo\+(0x|)1c> tstl %a0@\(0*8,%d0:l\)
+0+020 <foo\+(0x|)20> tstl %a0@\(0*8,%d0:w\)
+0+024 <foo\+(0x|)24> tstl %a0@\(0*8,%d0:w\)
+0+028 <foo\+(0x|)28> tstl %a0@\(0*8,%d0:w:2\)
+0+02c <foo\+(0x|)2c> tstl %a0@\(0*8,%d0:w:4\)
+0+030 <foo\+(0x|)30> tstl %a0@\(0*8,%d0:w:8\)
+0+034 <foo\+(0x|)34> tstl %a0@\(0*8,%d0:l\)
+0+038 <foo\+(0x|)38> tstl %a0@\(0*8,%d0:l\)
+0+03c <foo\+(0x|)3c> tstl %a0@\(0*8,%d0:l:2\)
+0+040 <foo\+(0x|)40> tstl %a0@\(0*8,%d0:l:4\)
+0+044 <foo\+(0x|)44> tstl %a0@\(0*8,%d0:l:8\)
+0+048 <foo\+(0x|)48> tstl %a0@\(0*0,%d0:w:2\)
+0+04c <foo\+(0x|)4c> tstl %a0@\(0*8,%d0:l\)
+0+050 <foo\+(0x|)50> tstl %a0@\(0*8,%d0:l\)
+0+054 <foo\+(0x|)54> tstl %a0@\(0*8,%d0:l:2\)
+0+058 <foo\+(0x|)58> tstl %a0@\(0*8,%d0:l:4\)
+0+05c <foo\+(0x|)5c> tstl %a0@\(0*8,%d0:l:8\)
+0+060 <foo\+(0x|)60> tstl %a0@\(0*8,%d0:w\)
+0+064 <foo\+(0x|)64> tstl %a0@\(0*8,%d0:w\)
+0+068 <foo\+(0x|)68> tstl %a0@\(0*8,%d0:w:2\)
+0+06c <foo\+(0x|)6c> tstl %a0@\(0*8,%d0:w:4\)
+0+070 <foo\+(0x|)70> tstl %a0@\(0*8,%d0:w:8\)
+0+074 <foo\+(0x|)74> tstl %a0@\(0*8,%d0:l\)
+0+078 <foo\+(0x|)78> tstl %a0@\(0*8,%d0:l\)
+0+07c <foo\+(0x|)7c> tstl %a0@\(0*8,%d0:l:2\)
+0+080 <foo\+(0x|)80> tstl %a0@\(0*8,%d0:l:4\)
+0+084 <foo\+(0x|)84> tstl %a0@\(0*8,%d0:l:8\)
+0+088 <foo\+(0x|)88> tstl %a0@\(0*8,%d0:l\)
+0+08c <foo\+(0x|)8c> tstl %a0@\(0*8,%a1:w:2\)
+0+090 <foo\+(0x|)90> tstl %a1@\(0*8,%a0:l\)
+0+094 <foo\+(0x|)94> tstl %a0@\(0*8,%d0:w:2\)
+0+098 <foo\+(0x|)98> tstl %a0@\(0*8,%d0:w:2\)
+0+09c <foo\+(0x|)9c> tstl %a0@\(0*8,%a1:w:2\)
+0+0a0 <foo\+(0x|)a0> tstl %a0@\(0*0,%d0:w:2\)
+0+0a4 <foo\+(0x|)a4> tstl %a0@\(0*0,%d0:w:2\)
+0+0a8 <foo\+(0x|)a8> tstl %a0@\(0*3e8,%d0:w:2\)
+0+0ae <foo\+(0x|)ae> tstl @\(0*3e8,%d0:w:2\)
+0+0b4 <foo\+(0x|)b4> tstl @\(0*0,%d0:w:2\)
+0+0b8 <foo\+(0x|)b8> tstl @\(0*3e8\)
+0+0be <foo\+(0x|)be> tstl %a0@\(0*186a0\)
+0+0c6 <foo\+(0x|)c6> tstl %a0@\(0*3e8,%d0:w:2\)
+0+0cc <foo\+(0x|)cc> tstl %a0@\(0*3e8,%d0:l\)
+0+0d2 <foo\+(0x|)d2> tstl %a0@\(0*3e8,%a1:w:2\)
+0+0d8 <foo\+(0x|)d8> tstl %a0@\(0*3e8,%d0:w:2\)
+0+0de <foo\+(0x|)de> tstl %a0@\(0*3e8,%d0:l\)
+0+0e4 <foo\+(0x|)e4> tstl @\(0*3e8,%d0:w:2\)
+0+0ea <foo\+(0x|)ea> tstl @\(0*3e8,%d0:w:2\)
+0+0f0 <foo\+(0x|)f0> tstl @\(0*0,%d0:w:2\)
+0+0f4 <foo\+(0x|)f4> tstl %a0@\(0*186a0\)
+0+0fc <foo\+(0x|)fc> tstl %a0@\(0*186a0\)
+0+104 <foo\+(0x|)104> tstl @\(0*3e8,%d0:w:2\)
+0+10a <foo\+(0x|)10a> tstl @\(0*186a0\)
+0+112 <foo\+(0x|)112> tstl @\(0*3e8,%d0:w:2\)
+0+118 <foo\+(0x|)118> tstl @\(0*3e8,%d0:l\)
+0+11e <foo\+(0x|)11e> tstl @\(0*3e8,%a1:w:2\)
+0+124 <foo\+(0x|)124> tstl @\(0*3e8,%d0:w:2\)
+0+12a <foo\+(0x|)12a> tstl @\(0*3e8,%d0:l\)
+0+130 <foo\+(0x|)130> tstl @\(0*186a0\)
+0+138 <foo\+(0x|)138> tstl @\(0*186a0\)
+0+140 <foo\+(0x|)140> tstl %a0@\(0*3e8\)
+0+146 <foo\+(0x|)146> tstl @\(0*3e8\)
+0+14c <foo\+(0x|)14c> tstl @\(0*0\)
+0+150 <foo\+(0x|)150> tstl %a0@\(0*3e8\)
+0+156 <foo\+(0x|)156> tstl %a0@\(0*3e8\)
+0+15c <foo\+(0x|)15c> tstl %a0@\(0*3e8\)
+0+162 <foo\+(0x|)162> tstl %a0@\(0*3e8\)
+0+168 <foo\+(0x|)168> tstl %a0@\(0*3e8\)
+0+16e <foo\+(0x|)16e> tstl @\(0*3e8\)
+0+174 <foo\+(0x|)174> tstl @\(0*3e8\)
+0+17a <foo\+(0x|)17a> tstl @\(0*0\)
+0+17e <foo\+(0x|)17e> tstl %a0@\(0*3e8\)@\(0*7d0,%d0:w:2\)
+0+186 <foo\+(0x|)186> tstl %a0@\(0*3e8\)@\(0*0,%d0:w:2\)
+0+18c <foo\+(0x|)18c> tstl %a0@\(0*3e8\)@\(0*7d0\)
+0+194 <foo\+(0x|)194> tstl @\(0*3e8\)@\(0*7d0,%d0:w:2\)
+0+19c <foo\+(0x|)19c> tstl @\(0*3e8\)@\(0*0,%d0:w:2\)
+0+1a2 <foo\+(0x|)1a2> tstl @\(0*3e8\)@\(0*7d0\)
+0+1aa <foo\+(0x|)1aa> tstl %a0@\(0*0\)@\(0*7d0,%d0:w:2\)
+0+1b0 <foo\+(0x|)1b0> tstl %a0@\(0*0\)@\(0*0,%d0:w:2\)
+0+1b4 <foo\+(0x|)1b4> tstl %a0@\(0*0\)@\(0*7d0\)
+0+1ba <foo\+(0x|)1ba> tstl @\(0*0\)@\(0*7d0,%d0:w:2\)
+0+1c0 <foo\+(0x|)1c0> tstl @\(0*0\)@\(0*0,%d0:w:2\)
+0+1c4 <foo\+(0x|)1c4> tstl @\(0*0\)@\(0*7d0\)
+0+1ca <foo\+(0x|)1ca> tstl %a0@\(0*3e8\)@\(0*7d0,%d0:w:2\)
+0+1d2 <foo\+(0x|)1d2> tstl %a0@\(0*3e8\)@\(0*0,%d0:w:2\)
+0+1d8 <foo\+(0x|)1d8> tstl %a0@\(0*3e8\)@\(0*7d0\)
+0+1e0 <foo\+(0x|)1e0> tstl @\(0*3e8\)@\(0*7d0,%d0:w:2\)
+0+1e8 <foo\+(0x|)1e8> tstl @\(0*3e8\)@\(0*0,%d0:w:2\)
+0+1ee <foo\+(0x|)1ee> tstl @\(0*3e8\)@\(0*7d0\)
+0+1f6 <foo\+(0x|)1f6> tstl %a0@\(0*0\)@\(0*7d0,%d0:w:2\)
+0+1fc <foo\+(0x|)1fc> tstl %a0@\(0*0\)@\(0*0,%d0:w:2\)
+0+200 <foo\+(0x|)200> tstl %a0@\(0*0\)@\(0*7d0\)
+0+206 <foo\+(0x|)206> tstl @\(0*0\)@\(0*7d0,%d0:w:2\)
+0+20c <foo\+(0x|)20c> tstl @\(0*0\)@\(0*0,%d0:w:2\)
+0+210 <foo\+(0x|)210> tstl @\(0*0\)@\(0*7d0\)
+0+216 <foo\+(0x|)216> tstl %a0@\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+21e <foo\+(0x|)21e> tstl %a0@\(0*3e8,%d0:w:2\)@\(0*0\)
+0+224 <foo\+(0x|)224> tstl @\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+22c <foo\+(0x|)22c> tstl @\(0*3e8,%d0:w:2\)@\(0*0\)
+0+232 <foo\+(0x|)232> tstl %a0@\(0*0,%d0:w:2\)@\(0*7d0\)
+0+238 <foo\+(0x|)238> tstl %a0@\(0*0,%d0:w:2\)@\(0*0\)
+0+23c <foo\+(0x|)23c> tstl @\(0*0,%d0:w:2\)@\(0*7d0\)
+0+242 <foo\+(0x|)242> tstl @\(0*0,%d0:w:2\)@\(0*0\)
+0+246 <foo\+(0x|)246> tstl %a0@\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+24e <foo\+(0x|)24e> tstl %a0@\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+256 <foo\+(0x|)256> tstl %a0@\(0*3e8,%d0:l\)@\(0*7d0\)
+0+25e <foo\+(0x|)25e> tstl %a1@\(0*3e8,%a0:l\)@\(0*7d0\)
+0+266 <foo\+(0x|)266> tstl %a0@\(0*3e8,%a1:w:2\)@\(0*7d0\)
+0+26e <foo\+(0x|)26e> tstl %a0@\(0*3e8,%d0:w:2\)@\(0*0\)
+0+274 <foo\+(0x|)274> tstl %a0@\(0*3e8,%d0:l\)@\(0*0\)
+0+27a <foo\+(0x|)27a> tstl @\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+282 <foo\+(0x|)282> tstl @\(0*3e8,%d0:w:2\)@\(0*0\)
+0+288 <foo\+(0x|)288> tstl %a0@\(0*0,%d0:w:2\)@\(0*7d0\)
+0+28e <foo\+(0x|)28e> tstl %a0@\(0*0,%d0:l\)@\(0*7d0\)
+0+294 <foo\+(0x|)294> tstl %a0@\(0*0,%d0:w:2\)@\(0*0\)
+0+298 <foo\+(0x|)298> tstl %a0@\(0*0,%d0:l\)@\(0*0\)
+0+29c <foo\+(0x|)29c> tstl @\(0*0,%d0:w:2\)@\(0*7d0\)
+0+2a2 <foo\+(0x|)2a2> tstl @\(0*0,%d0:w:2\)@\(0*0\)
+0+2a6 <foo\+(0x|)2a6> pea %pc@\(0*2b0 <foo\+(0x|)2b0>\)
+0+2aa <foo\+(0x|)2aa> pea %pc@\(0*2b4 <foo\+(0x|)2b4>\)
+0+2ae <foo\+(0x|)2ae> pea %pc@\(0*2b8 <foo\+(0x|)2b8>\)
+0+2b2 <foo\+(0x|)2b2> pea %pc@\(0*0 <foo>\)
+0+2b6 <foo\+(0x|)2b6> pea %pc@\(0*2c0 <foo\+(0x|)2c0>,%d0:w:2\)
+0+2ba <foo\+(0x|)2ba> pea %pc@\(0*2bc <foo\+(0x|)2bc>,%d0:w:2\)
+0+2be <foo\+(0x|)2be> pea %pc@\(0*2c8 <foo\+(0x|)2c8>,%d0:w:2\)
+0+2c2 <foo\+(0x|)2c2> pea %pc@\(0*2cc <foo\+(0x|)2cc>,%d0:l\)
+0+2c6 <foo\+(0x|)2c6> pea %pc@\(0*2d0 <foo\+(0x|)2d0>,%a0:l\)
+0+2ca <foo\+(0x|)2ca> pea %pc@\(0*2d4 <foo\+(0x|)2d4>,%d0:w:2\)
+0+2ce <foo\+(0x|)2ce> pea %pc@\(0*2d8 <foo\+(0x|)2d8>,%d0:l\)
+0+2d2 <foo\+(0x|)2d2> pea %pc@\(0*2dc <foo\+(0x|)2dc>,%a0:l\)
+0+2d6 <foo\+(0x|)2d6> pea %pc@\(0*2d8 <foo\+(0x|)2d8>,%d0:w:2\)
+0+2da <foo\+(0x|)2da> pea %pc@\(0*2dc <foo\+(0x|)2dc>,%d0:l\)
+0+2de <foo\+(0x|)2de> pea %pc@\(0*2e0 <foo\+(0x|)2e0>,%a0:l\)
+0+2e2 <foo\+(0x|)2e2> pea %pc@\(0*6cc <.*>,%d0:w:2\)
+0+2e8 <foo\+(0x|)2e8> pea %pc@\(0*1898a <.*>\)
+0+2f0 <foo\+(0x|)2f0> pea %pc@\(0*6da <.*>,%d0:w:2\)
+0+2f6 <foo\+(0x|)2f6> pea %pc@\(0*6e0 <.*>,%d0:l\)
+0+2fc <foo\+(0x|)2fc> pea %pc@\(0*6e6 <.*>,%a1:w:2\)
+0+302 <foo\+(0x|)302> pea %pc@\(0*6ec <.*>,%a1:l\)
+0+308 <foo\+(0x|)308> pea %pc@\(0*6f2 <.*>,%d0:w:2\)
+0+30e <foo\+(0x|)30e> pea %pc@\(0*6f8 <.*>,%d0:l\)
+0+314 <foo\+(0x|)314> pea %pc@\(0*6fe <.*>,%a1:l\)
+0+31a <foo\+(0x|)31a> pea %pc@\(0*189bc <.*>\)
+0+322 <foo\+(0x|)322> pea %pc@\(0*189c4 <.*>\)
+0+32a <foo\+(0x|)32a> pea %zpc@\(0*3e8,%d0:w:2\)
+0+330 <foo\+(0x|)330> pea %zpc@\(0*186a0\)
+0+338 <foo\+(0x|)338> pea %zpc@\(0*3e8,%d0:w:2\)
+0+33e <foo\+(0x|)33e> pea %zpc@\(0*3e8,%d0:l\)
+0+344 <foo\+(0x|)344> pea %zpc@\(0*3e8,%a1:w:2\)
+0+34a <foo\+(0x|)34a> pea %zpc@\(0*3e8,%a1:l\)
+0+350 <foo\+(0x|)350> pea %zpc@\(0*3e8,%d0:w:2\)
+0+356 <foo\+(0x|)356> pea %zpc@\(0*3e8,%d0:l\)
+0+35c <foo\+(0x|)35c> pea %zpc@\(0*3e8,%a1:l\)
+0+362 <foo\+(0x|)362> pea %zpc@\(0*186a0\)
+0+36a <foo\+(0x|)36a> pea %zpc@\(0*186a0\)
+0+372 <foo\+(0x|)372> pea %pc@\(0*75c <.*>\)@\(0*7d0,%d0:w:2\)
+0+37a <foo\+(0x|)37a> pea %pc@\(0*764 <.*>\)@\(0*0,%d0:w:2\)
+0+380 <foo\+(0x|)380> pea %pc@\(0*76a <.*>\)@\(0*7d0\)
+0+388 <foo\+(0x|)388> pea %pc@\(0*38a <foo\+(0x|)38a>\)@\(0*7d0,%d0:w:2\)
+0+38e <foo\+(0x|)38e> pea %pc@\(0*390 <foo\+(0x|)390>\)@\(0*0,%d0:w:2\)
+0+392 <foo\+(0x|)392> pea %pc@\(0*394 <foo\+(0x|)394>\)@\(0*7d0\)
+0+398 <foo\+(0x|)398> pea %pc@\(0*782 <.*>\)@\(0*7d0,%d0:w:2\)
+0+3a0 <foo\+(0x|)3a0> pea %pc@\(0*78a <.*>\)@\(0*0,%d0:w:2\)
+0+3a6 <foo\+(0x|)3a6> pea %pc@\(0*790 <.*>\)@\(0*7d0\)
+0+3ae <foo\+(0x|)3ae> pea %pc@\(0*3b0 <foo\+(0x|)3b0>\)@\(0*7d0,%d0:w:2\)
+0+3b4 <foo\+(0x|)3b4> pea %pc@\(0*3b6 <foo\+(0x|)3b6>\)@\(0*0,%d0:w:2\)
+0+3b8 <foo\+(0x|)3b8> pea %pc@\(0*3ba <foo\+(0x|)3ba>\)@\(0*7d0\)
+0+3be <foo\+(0x|)3be> pea %zpc@\(0*3e8\)@\(0*7d0,%d0:w:2\)
+0+3c6 <foo\+(0x|)3c6> pea %zpc@\(0*3e8\)@\(0*0,%d0:w:2\)
+0+3cc <foo\+(0x|)3cc> pea %zpc@\(0*3e8\)@\(0*7d0\)
+0+3d4 <foo\+(0x|)3d4> pea %zpc@\(0*0\)@\(0*7d0,%d0:w:2\)
+0+3da <foo\+(0x|)3da> pea %zpc@\(0*0\)@\(0*0,%d0:w:2\)
+0+3de <foo\+(0x|)3de> pea %zpc@\(0*0\)@\(0*7d0\)
+0+3e4 <foo\+(0x|)3e4> pea %zpc@\(0*3e8\)@\(0*7d0,%d0:w:2\)
+0+3ec <foo\+(0x|)3ec> pea %zpc@\(0*3e8\)@\(0*0,%d0:w:2\)
+0+3f2 <foo\+(0x|)3f2> pea %zpc@\(0*3e8\)@\(0*7d0\)
+0+3fa <foo\+(0x|)3fa> pea %zpc@\(0*0\)@\(0*7d0,%d0:w:2\)
+0+400 <foo\+(0x|)400> pea %zpc@\(0*0\)@\(0*0,%d0:w:2\)
+0+404 <foo\+(0x|)404> pea %zpc@\(0*0\)@\(0*7d0\)
+0+40a <foo\+(0x|)40a> pea %pc@\(0*7f4 <.*>,%d0:w:2\)@\(0*7d0\)
+0+412 <foo\+(0x|)412> pea %pc@\(0*7fc <.*>,%d0:w:2\)@\(0*0\)
+0+418 <foo\+(0x|)418> pea %pc@\(0*41a <foo\+(0x|)41a>,%d0:w:2\)@\(0*7d0\)
+0+41e <foo\+(0x|)41e> pea %pc@\(0*420 <foo\+(0x|)420>,%d0:w:2\)@\(0*0\)
+0+422 <foo\+(0x|)422> pea %pc@\(0*80c <.*>,%d0:w:2\)@\(0*7d0\)
+0+42a <foo\+(0x|)42a> pea %pc@\(0*814 <.*>,%d0:w:2\)@\(0*7d0\)
+0+432 <foo\+(0x|)432> pea %pc@\(0*81c <.*>,%d0:l\)@\(0*7d0\)
+0+43a <foo\+(0x|)43a> pea %pc@\(0*824 <.*>,%a1:l\)@\(0*7d0\)
+0+442 <foo\+(0x|)442> pea %pc@\(0*82c <.*>,%a1:l\)@\(0*7d0\)
+0+44a <foo\+(0x|)44a> pea %pc@\(0*834 <.*>,%a1:w:2\)@\(0*7d0\)
+0+452 <foo\+(0x|)452> pea %pc@\(0*83c <.*>,%d0:w:2\)@\(0*0\)
+0+458 <foo\+(0x|)458> pea %pc@\(0*842 <.*>,%d0:l\)@\(0*0\)
+0+45e <foo\+(0x|)45e> pea %pc@\(0*848 <.*>,%a1:l\)@\(0*0\)
+0+464 <foo\+(0x|)464> pea %pc@\(0*466 <foo\+(0x|)466>,%d0:w:2\)@\(0*7d0\)
+0+46a <foo\+(0x|)46a> pea %pc@\(0*46c <foo\+(0x|)46c>,%a0:l\)@\(0*7d0\)
+0+470 <foo\+(0x|)470> pea %pc@\(0*472 <foo\+(0x|)472>,%d0:w:2\)@\(0*0\)
+0+474 <foo\+(0x|)474> pea %pc@\(0*476 <foo\+(0x|)476>,%d0:l\)@\(0*0\)
+0+478 <foo\+(0x|)478> pea %zpc@\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+480 <foo\+(0x|)480> pea %zpc@\(0*3e8,%d0:w:2\)@\(0*0\)
+0+486 <foo\+(0x|)486> pea %zpc@\(0*0,%d0:w:2\)@\(0*7d0\)
+0+48c <foo\+(0x|)48c> pea %zpc@\(0*0,%d0:w:2\)@\(0*0\)
+0+490 <foo\+(0x|)490> pea %zpc@\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+498 <foo\+(0x|)498> pea %zpc@\(0*3e8,%d0:w:2\)@\(0*7d0\)
+0+4a0 <foo\+(0x|)4a0> pea %zpc@\(0*3e8,%d0:l\)@\(0*7d0\)
+0+4a8 <foo\+(0x|)4a8> pea %zpc@\(0*3e8,%a1:l\)@\(0*7d0\)
+0+4b0 <foo\+(0x|)4b0> pea %zpc@\(0*3e8,%a1:l\)@\(0*7d0\)
+0+4b8 <foo\+(0x|)4b8> pea %zpc@\(0*3e8,%a1:w:2\)@\(0*7d0\)
+0+4c0 <foo\+(0x|)4c0> pea %zpc@\(0*3e8,%d0:w:2\)@\(0*0\)
+0+4c6 <foo\+(0x|)4c6> pea %zpc@\(0*3e8,%d0:l\)@\(0*0\)
+0+4cc <foo\+(0x|)4cc> pea %zpc@\(0*3e8,%a1:l\)@\(0*0\)
+0+4d2 <foo\+(0x|)4d2> pea %zpc@\(0*0,%d0:w:2\)@\(0*7d0\)
+0+4d8 <foo\+(0x|)4d8> pea %zpc@\(0*0,%a0:l\)@\(0*7d0\)
+0+4de <foo\+(0x|)4de> pea %zpc@\(0*0,%d0:w:2\)@\(0*0\)
+0+4e2 <foo\+(0x|)4e2> pea %zpc@\(0*0,%d0:l\)@\(0*0\)
+0+4e6 <foo\+(0x|)4e6> tstl 0*4 <foo\+(0x|)4>
+0+4ea <foo\+(0x|)4ea> tstl 0*4 <foo\+(0x|)4>
+0+4ee <foo\+(0x|)4ee> tstl 0*4 <foo\+(0x|)4>
+0+4f2 <foo\+(0x|)4f2> tstl 0*186a0 <.*>
+0+4f8 <foo\+(0x|)4f8> tstl 0*8 <foo\+(0x|)8>
+0+4fe <foo\+(0x|)4fe> tstl 0*8 <foo\+(0x|)8>
0+504 <foo\+(0x|)504> addib #1,%d0
0+508 <foo\+(0x|)508> addiw #1,%d0
0+50c <foo\+(0x|)50c> addil #1,%d0
0+512 <foo\+(0x|)512> addqb #1,%d0
0+514 <foo\+(0x|)514> cmpib #1,%d0
-0+518 <foo\+(0x|)518> cmpib #1,%pc@\(0+51c <foo\+(0x|)51c>\)
+0+518 <foo\+(0x|)518> cmpib #1,%pc@\(0*51c <foo\+(0x|)51c>\)
0+51e <foo\+(0x|)51e> cmpiw #1,%d0
-0+522 <foo\+(0x|)522> cmpiw #1,%pc@\(0+526 <foo\+(0x|)526>\)
+0+522 <foo\+(0x|)522> cmpiw #1,%pc@\(0*526 <foo\+(0x|)526>\)
0+528 <foo\+(0x|)528> cmpil #1,%d0
-0+52e <foo\+(0x|)52e> cmpil #1,%pc@\(0+534 <foo\+(0x|)534>\)
+0+52e <foo\+(0x|)52e> cmpil #1,%pc@\(0*534 <foo\+(0x|)534>\)
0+536 <foo\+(0x|)536> cmpib #1,%d0
-0+53a <foo\+(0x|)53a> cmpib #1,%pc@\(0+53e <foo\+(0x|)53e>\)
+0+53a <foo\+(0x|)53a> cmpib #1,%pc@\(0*53e <foo\+(0x|)53e>\)
0+540 <foo\+(0x|)540> cmpiw #1,%d0
-0+544 <foo\+(0x|)544> cmpiw #1,%pc@\(0+548 <foo\+(0x|)548>\)
+0+544 <foo\+(0x|)544> cmpiw #1,%pc@\(0*548 <foo\+(0x|)548>\)
0+54a <foo\+(0x|)54a> cmpil #1,%d0
-0+550 <foo\+(0x|)550> cmpil #1,%pc@\(0+556 <foo\+(0x|)556>\)
+0+550 <foo\+(0x|)550> cmpil #1,%pc@\(0*556 <foo\+(0x|)556>\)
diff --git a/gas/testsuite/gas/s12z/truncated.d b/gas/testsuite/gas/s12z/truncated.d
index 2dec3bc8d7..fc6c4f4088 100644
--- a/gas/testsuite/gas/s12z/truncated.d
+++ b/gas/testsuite/gas/s12z/truncated.d
@@ -10,5 +10,5 @@ Disassembly of section .text:
00000000 <.text>:
0: 01 nop
- 1: 14 Address 0x0+2 is out of bounds.
+ 1: 14 Address 0x0*2 is out of bounds.
!!invalid!!
diff --git a/gas/write.c b/gas/write.c
index 20f5ce24d5..f76bbdb706 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -3211,9 +3211,7 @@ void
print_fixup (fixS *fixp)
{
indent_level = 1;
- fprintf (stderr, "fix ");
- fprintf_vma (stderr, (bfd_vma) (uintptr_t) fixp);
- fprintf (stderr, " %s:%d",fixp->fx_file, fixp->fx_line);
+ fprintf (stderr, "fix %p %s:%d", fixp, fixp->fx_file, fixp->fx_line);
if (fixp->fx_pcrel)
fprintf (stderr, " pcrel");
if (fixp->fx_pcrel_adjust)
@@ -3222,12 +3220,10 @@ print_fixup (fixS *fixp)
fprintf (stderr, " tcbit");
if (fixp->fx_done)
fprintf (stderr, " done");
- fprintf (stderr, "\n size=%d frag=", fixp->fx_size);
- fprintf_vma (stderr, (bfd_vma) (uintptr_t) fixp->fx_frag);
- fprintf (stderr, " where=%ld offset=%lx addnumber=%lx",
- (long) fixp->fx_where,
- (unsigned long) fixp->fx_offset,
- (unsigned long) fixp->fx_addnumber);
+ fprintf (stderr, "\n size=%d frag=%p", fixp->fx_size, fixp->fx_frag);
+ fprintf (stderr, " where=%ld offset=%" PRIx64 " addnumber=%" PRIx64,
+ fixp->fx_where, (uint64_t) fixp->fx_offset,
+ (uint64_t) fixp->fx_addnumber);
fprintf (stderr, "\n %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
fixp->fx_r_type);
if (fixp->fx_addsy)
diff --git a/gdb/remote.c b/gdb/remote.c
index 39d0a794a2..49d26c2039 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -13496,29 +13496,30 @@ remote_target::trace_set_readonly_regions ()
bfd_vma vma;
int anysecs = 0;
int offset = 0;
+ bfd *abfd = current_program_space->exec_bfd ();
- if (!current_program_space->exec_bfd ())
+ if (!abfd)
return; /* No information to give. */
struct remote_state *rs = get_remote_state ();
strcpy (rs->buf.data (), "QTro");
offset = strlen (rs->buf.data ());
- for (s = current_program_space->exec_bfd ()->sections; s; s = s->next)
+ for (s = abfd->sections; s; s = s->next)
{
char tmp1[40], tmp2[40];
int sec_length;
- if ((s->flags & SEC_LOAD) == 0 ||
- /* (s->flags & SEC_CODE) == 0 || */
- (s->flags & SEC_READONLY) == 0)
+ if ((s->flags & SEC_LOAD) == 0
+ /* || (s->flags & SEC_CODE) == 0 */
+ || (s->flags & SEC_READONLY) == 0)
continue;
anysecs = 1;
vma = bfd_section_vma (s);
size = bfd_section_size (s);
- sprintf_vma (tmp1, vma);
- sprintf_vma (tmp2, vma + size);
+ bfd_sprintf_vma (abfd, tmp1, vma);
+ bfd_sprintf_vma (abfd, tmp2, vma + size);
sec_length = 1 + strlen (tmp1) + 1 + strlen (tmp2);
if (offset + sec_length + 1 > rs->buf.size ())
{
diff --git a/ld/deffilep.y b/ld/deffilep.y
index 3f610ddbe1..8c7a0dc479 100644
--- a/ld/deffilep.y
+++ b/ld/deffilep.y
@@ -503,11 +503,8 @@ def_file_print (FILE *file, def_file *fdef)
if (fdef->is_dll != -1)
fprintf (file, " is dll: %s\n", fdef->is_dll ? "yes" : "no");
if (fdef->base_address != (bfd_vma) -1)
- {
- fprintf (file, " base address: 0x");
- fprintf_vma (file, fdef->base_address);
- fprintf (file, "\n");
- }
+ fprintf (file, " base address: 0x%" PRIx64 "\n",
+ (uint64_t) fdef->base_address);
if (fdef->description)
fprintf (file, " description: `%s'\n", fdef->description);
if (fdef->stack_reserve != -1)
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index 8f5334df19..1769ec54b2 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -497,10 +497,7 @@ gld${EMULATION_NAME}_finish (void)
/* Now convert this value into a string and store it in entry_symbol
where the lang_finish() function will pick it up. */
- buffer[0] = '0';
- buffer[1] = 'x';
-
- sprintf_vma (buffer + 2, val);
+ sprintf (buffer, "0x%" PRIx64, (uint64_t) val);
if (params.thumb_entry_symbol != NULL && entry_symbol.name != NULL
&& entry_from_cmdline)
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 892bf70b7a..2fd4ff4aca 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1980,10 +1980,7 @@ gld${EMULATION_NAME}_finish (void)
/* Now convert this value into a string and store it in entry_symbol
where the lang_finish() function will pick it up. */
- buffer[0] = '0';
- buffer[1] = 'x';
-
- sprintf_vma (buffer + 2, val);
+ sprintf (buffer, "0x%" PRIx64, (uint64_t) val);
if (entry_symbol.name != NULL && entry_from_cmdline)
einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
diff --git a/ld/ldlang.c b/ld/ldlang.c
index f12c09633a..e7bc9f2d26 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2297,21 +2297,9 @@ lang_map (void)
for (m = lang_memory_region_list; m != NULL; m = m->next)
{
- char buf[100];
- int len;
-
fprintf (config.map_file, "%-16s ", m->name_list.name);
- sprintf_vma (buf, m->origin);
- minfo ("0x%s ", buf);
- len = strlen (buf);
- while (len < 16)
- {
- print_space ();
- ++len;
- }
-
- minfo ("0x%V", m->length);
+ minfo ("0x%V 0x%V", m->origin, m->length);
if (m->flags || m->not_flags)
{
#ifndef BFD64
@@ -7317,10 +7305,7 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
}
minfo ("0x");
- if (size <= 0xffffffff)
- sprintf (buf, "%lx", (unsigned long) size);
- else
- sprintf_vma (buf, size);
+ sprintf (buf, "%" PRIx64, (uint64_t) size);
minfo ("%s", buf);
len = strlen (buf);
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index e204811a03..ee5248705a 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -241,25 +241,18 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
case 'V':
/* hex bfd_vma */
{
- bfd_vma value = args[arg_no].v;
+ uint64_t value = args[arg_no].v;
++arg_count;
- fprintf_vma (fp, value);
+ fprintf (fp, "%016" PRIx64, value);
}
break;
case 'v':
/* hex bfd_vma, no leading zeros */
{
- char buf[100];
- char *p = buf;
- bfd_vma value = args[arg_no].v;
+ uint64_t value = args[arg_no].v;
++arg_count;
- sprintf_vma (p, value);
- while (*p == '0')
- p++;
- if (!*p)
- p--;
- fputs (p, fp);
+ fprintf (fp, "%" PRIx64, value);
}
break;
@@ -268,24 +261,19 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
8 spaces. */
{
char buf[100];
- bfd_vma value;
- char *p;
+ uint64_t value;
int len;
value = args[arg_no].v;
++arg_count;
- sprintf_vma (buf, value);
- for (p = buf; *p == '0'; ++p)
- ;
- if (*p == '\0')
- --p;
- len = strlen (p);
+ sprintf (buf, "%" PRIx64, value);
+ len = strlen (buf);
while (len < 8)
{
putc (' ', fp);
++len;
}
- fprintf (fp, "0x%s", p);
+ fprintf (fp, "0x%s", buf);
}
break;
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index db2c75da9b..24a5118966 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1812,10 +1812,8 @@ pe_dll_generate_def_file (const char *pe_out_def_filename)
quoteput (pe_def_file->name, out, 1);
if (pe_data (link_info.output_bfd)->pe_opthdr.ImageBase)
- {
- fprintf (out, " BASE=0x");
- fprintf_vma (out, ((bfd_vma) pe_data (link_info.output_bfd)->pe_opthdr.ImageBase));
- }
+ fprintf (out, " BASE=0x%" PRIx64,
+ (uint64_t) pe_data (link_info.output_bfd)->pe_opthdr.ImageBase);
fprintf (out, "\n");
}
diff --git a/opcodes/dis-buf.c b/opcodes/dis-buf.c
index 3bd078f54d..56a57f9639 100644
--- a/opcodes/dis-buf.c
+++ b/opcodes/dis-buf.c
@@ -61,13 +61,11 @@ perror_memory (int status,
info->fprintf_func (info->stream, _("Unknown error %d\n"), status);
else
{
- char buf[30];
-
/* Actually, address between memaddr and memaddr + len was
out of bounds. */
- sprintf_vma (buf, memaddr);
info->fprintf_func (info->stream,
- _("Address 0x%s is out of bounds.\n"), buf);
+ _("Address 0x%" PRIx64 " is out of bounds.\n"),
+ (uint64_t) memaddr);
}
}
@@ -81,10 +79,7 @@ perror_memory (int status,
void
generic_print_address (bfd_vma addr, struct disassemble_info *info)
{
- char buf[30];
-
- sprintf_vma (buf, addr);
- (*info->fprintf_func) (info->stream, "0x%s", buf);
+ (*info->fprintf_func) (info->stream, "0x%08" PRIx64, (uint64_t) addr);
}
/* Just return NULL. */
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index de9793690a..1761df583d 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -10973,18 +10973,12 @@ print_operand_value (instr_info *ins, bfd_vma disp,
enum disassembler_style style)
{
char tmp[30];
- unsigned int i = 0;
if (ins->address_mode == mode_64bit)
- {
- oappend_with_style (ins, "0x", style);
- sprintf_vma (tmp, disp);
- while (tmp[i] == '0' && tmp[i + 1])
- ++i;
- }
+ sprintf (tmp, "0x%" PRIx64, (uint64_t) disp);
else
sprintf (tmp, "0x%x", (unsigned int) disp);
- oappend_with_style (ins, tmp + i, style);
+ oappend_with_style (ins, tmp, style);
}
/* Like oappend, but called for immediate operands. */
@@ -11004,7 +10998,6 @@ print_displacement (instr_info *ins, bfd_vma disp)
{
bfd_signed_vma val = disp;
char tmp[30];
- unsigned int i;
if (val < 0)
{
@@ -11033,14 +11026,8 @@ print_displacement (instr_info *ins, bfd_vma disp)
}
}
- oappend_with_style (ins, "0x", dis_style_address_offset);
-
- sprintf_vma (tmp, (bfd_vma) val);
- for (i = 0; tmp[i] == '0'; i++)
- continue;
- if (tmp[i] == '\0')
- i--;
- oappend_with_style (ins, tmp + i, dis_style_address_offset);
+ sprintf (tmp, "0x%" PRIx64, (int64_t) val);
+ oappend_with_style (ins, tmp, dis_style_address_offset);
}
static void
diff --git a/opcodes/ia64-gen.c b/opcodes/ia64-gen.c
index a996bcd1c2..9acb078264 100644
--- a/opcodes/ia64-gen.c
+++ b/opcodes/ia64-gen.c
@@ -53,15 +53,6 @@
#include <libintl.h>
#define _(String) gettext (String)
-/* This is a copy of fprintf_vma from bfd/bfd-in2.h. We have to use this
- always, because we might be compiled without BFD64 defined, if configured
- for a 32-bit target and --enable-targets=all is used. This will work for
- both 32-bit and 64-bit hosts. */
-#define _opcode_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
-#define _opcode_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
-#define opcode_fprintf_vma(s,x) \
- fprintf ((s), "%08lx%08lx", _opcode_int64_high (x), _opcode_int64_low (x))
-
const char * program_name = NULL;
int debug = 0;
@@ -2711,14 +2702,13 @@ print_main_table (void)
printf ("static const struct ia64_main_table\nmain_table[] = {\n");
while (ptr != NULL)
{
- printf (" { %d, %d, %d, 0x",
+ printf (" { %d, %d, %d, 0x%016" PRIx64 "ull, 0x%016" PRIx64
+ "ull, { %d, %d, %d, %d, %d }, 0x%x, %d, },\n",
ptr->name->num,
ptr->opcode->type,
- ptr->opcode->num_outputs);
- opcode_fprintf_vma (stdout, ptr->opcode->opcode);
- printf ("ull, 0x");
- opcode_fprintf_vma (stdout, ptr->opcode->mask);
- printf ("ull, { %d, %d, %d, %d, %d }, 0x%x, %d, },\n",
+ ptr->opcode->num_outputs,
+ ptr->opcode->opcode,
+ ptr->opcode->mask,
ptr->opcode->operands[0],
ptr->opcode->operands[1],
ptr->opcode->operands[2],
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index 963e1bf94a..55038d4207 100644
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -515,17 +515,13 @@ print_base (int regno, bfd_vma disp, disassemble_info *info)
}
else
{
- char buf[50];
-
if (regno == -2)
(*info->fprintf_func) (info->stream, "@(");
else if (regno == -3)
(*info->fprintf_func) (info->stream, "%%zpc@(");
else
(*info->fprintf_func) (info->stream, "%s@(", reg_names[regno]);
-
- sprintf_vma (buf, disp);
- (*info->fprintf_func) (info->stream, "%s", buf);
+ (*info->fprintf_func) (info->stream, "%" PRIx64, (uint64_t) disp);
}
}
@@ -545,7 +541,6 @@ print_indexed (int basereg,
bfd_vma base_disp;
bfd_vma outer_disp;
char buf[40];
- char vmabuf[50];
NEXTWORD (p, word, NULL);
@@ -620,8 +615,7 @@ print_indexed (int basereg,
(*info->fprintf_func) (info->stream, ",%s", buf);
buf[0] = '\0';
}
- sprintf_vma (vmabuf, outer_disp);
- (*info->fprintf_func) (info->stream, ")@(%s", vmabuf);
+ (*info->fprintf_func) (info->stream, ")@(%" PRIx64, (uint64_t) outer_disp);
if (buf[0] != '\0')
(*info->fprintf_func) (info->stream, ",%s", buf);
(*info->fprintf_func) (info->stream, ")");
diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c
index a8509abb5c..46e467da84 100644
--- a/opcodes/ns32k-dis.c
+++ b/opcodes/ns32k-dis.c
@@ -606,7 +606,7 @@ print_insn_arg (int d,
/* Memory space disp(PC). */
disp1 = get_displacement (buffer, aoffsetp);
*result++ = NEXT_IS_ADDR;
- sprintf_vma (result, addr + disp1);
+ sprintf (result, "%" PRIx64, (uint64_t) (addr + disp1));
result += strlen (result);
*result++ = NEXT_IS_ADDR;
*result = '\0';
@@ -665,7 +665,8 @@ print_insn_arg (int d,
break;
case 'p':
*result++ = NEXT_IS_ADDR;
- sprintf_vma (result, addr + get_displacement (buffer, aoffsetp));
+ sprintf (result, "%" PRIx64,
+ (uint64_t) (addr + get_displacement (buffer, aoffsetp)));
result += strlen (result);
*result++ = NEXT_IS_ADDR;
*result = '\0';