* [PATCH] x86: Silence GCC 12 warning on tc-i386.c
@ 2022-10-31 16:06 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2022-10-31 16:06 UTC (permalink / raw)
To: binutils; +Cc: Lili Cui
Silence GCC 12 warning on tc-i386.c:
gas/config/tc-i386.c: In function ‘md_assemble’:
gas/config/tc-i386.c:5039:16: error: too many arguments for format [-Werror=format-extra-args]
5039 | as_warn (_("only support RIP-relative address"), i.tm.name);
* config/tc-i386.c (md_assemble): Print mnemonic in RIP-relative
warning.
* estsuite/gas/i386/x86-64-prefetchi-warn.l: Updated.
---
gas/config/tc-i386.c | 2 +-
gas/testsuite/gas/i386/x86-64-prefetchi-warn.l | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index fb1ce75fffc..cccd83717d0 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5036,7 +5036,7 @@ md_assemble (char *line)
/* Check if IP-relative addressing requirements can be satisfied. */
if (i.tm.cpu_flags.bitfield.cpuprefetchi
&& !(i.base_reg && i.base_reg->reg_num == RegIP))
- as_warn (_("only support RIP-relative address"), i.tm.name);
+ as_warn (_("'%s' only supports RIP-relative address"), i.tm.name);
/* Update operand types and check extended states. */
for (j = 0; j < i.operands; j++)
diff --git a/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l b/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l
index 4e153894638..49be004cb90 100644
--- a/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l
+++ b/gas/testsuite/gas/i386/x86-64-prefetchi-warn.l
@@ -1,5 +1,5 @@
.*: Assembler messages:
-.*:[0-9]*: Warning: only support RIP-relative address
-.*:[0-9]*: Warning: only support RIP-relative address
-.*:[0-9]*: Warning: only support RIP-relative address
-.*:[0-9]*: Warning: only support RIP-relative address
+.*:[0-9]*: Warning: 'prefetchit0' only supports RIP-relative address
+.*:[0-9]*: Warning: 'prefetchit1' only supports RIP-relative address
+.*:[0-9]*: Warning: 'prefetchit0' only supports RIP-relative address
+.*:[0-9]*: Warning: 'prefetchit1' only supports RIP-relative address
--
2.37.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-31 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 16:06 [PATCH] x86: Silence GCC 12 warning on tc-i386.c H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).