aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-06-14 08:18:58 +0200
committerJan Beulich <jbeulich@suse.com>2021-06-14 08:18:58 +0200
commit987610f2d6841a48009a170bd401112a23f040f2 (patch)
treeef0e6fd1608dadc9a88b9c3b9fc3ddb3bbea3d83 /gas
parent4981807e06a7d274c22c25f342c3e37b29a2bc0c (diff)
downloadgdb-987610f2d6841a48009a170bd401112a23f040f2.zip
gdb-987610f2d6841a48009a170bd401112a23f040f2.tar.gz
gdb-987610f2d6841a48009a170bd401112a23f040f2.tar.bz2
gas: fold three as_warn() in emit_expr_with_reloc()
Simply use the available abstraction instead of, effectively, trying to open-code it.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/read.c14
2 files changed, 6 insertions, 12 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 493fde0..ecd0794 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,9 @@
2021-06-14 Jan Beulich <jbeulich@suse.com>
+ * read.c (emit_expr_with_reloc): Fold three as_warn().
+
+2021-06-14 Jan Beulich <jbeulich@suse.com>
+
* doc/internals.texi (TC_ADDRESS_BYTES): Mention generic default.
* read.c (potable, cons_worker): Drop TC_ADDRESS_BYTES
conditional.
diff --git a/gas/read.c b/gas/read.c
index 380281d..2f93e1b 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -4539,18 +4539,8 @@ emit_expr_with_reloc (expressionS *exp,
|| (get & hibit) == 0))
{
/* Leading bits contain both 0s & 1s. */
-#if defined (BFD64) && BFD_HOST_64BIT_LONG_LONG
-#ifndef __MSVCRT__
- as_warn (_("value 0x%llx truncated to 0x%llx"),
- (unsigned long long) get, (unsigned long long) use);
-#else
- as_warn (_("value 0x%I64x truncated to 0x%I64x"),
- (unsigned long long) get, (unsigned long long) use);
-#endif
-#else
- as_warn (_("value 0x%lx truncated to 0x%lx"),
- (unsigned long) get, (unsigned long) use);
-#endif
+ as_warn (_("value 0x%" BFD_VMA_FMT "x truncated to 0x%" BFD_VMA_FMT "x"),
+ get, use);
}
/* Put bytes in right order. */
md_number_to_chars (p, use, (int) nbytes);