* [binutils-gdb] x86/Intel: address quoted-symbol related FIXMEs
@ 2023-05-23 7:01 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-05-23 7:01 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a4f8c177b46fe96b08a066c159a7a11071095a30
commit a4f8c177b46fe96b08a066c159a7a11071095a30
Author: Jan Beulich <jbeulich@suse.com>
Date: Tue May 23 09:01:31 2023 +0200
x86/Intel: address quoted-symbol related FIXMEs
If in a "word ptr <address>" or alike construct the "ptr" part is
double-quoted, it shouldn't be recognized as the specific keyword we're
looking for (just like we don't recognize double-quoted operator or
register names anymore). Be careful though to tell closing from opening
double-quotes, as a quoted symbol may follow right afterwards.
Diff:
---
gas/config/tc-i386-intel.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index b5c97be234a..fa32226dc03 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -188,15 +188,12 @@ operatorT i386_operator (const char *name, unsigned int operands, char *pc)
if (i386_types[j].name && *pc == ' ')
{
+ const char *start = ++input_line_pointer;
char *pname;
- char c;
+ char c = get_symbol_name (&pname);
- ++input_line_pointer;
- c = get_symbol_name (&pname);
-
- if (strcasecmp (pname, "ptr") == 0)
+ if (strcasecmp (pname, "ptr") == 0 && (c != '"' || pname == start))
{
- /* FIXME: What if c == '"' ? */
pname[-1] = *pc;
*pc = c;
if (intel_syntax > 0 || operands != 1)
@@ -204,9 +201,8 @@ operatorT i386_operator (const char *name, unsigned int operands, char *pc)
return i386_types[j].op;
}
- if (strcasecmp (pname, "bcst") == 0)
+ if (strcasecmp (pname, "bcst") == 0 && (c != '"' || pname == start))
{
- /* FIXME: Again, what if c == '"' ? */
pname[-1] = *pc;
*pc = c;
if (intel_syntax > 0 || operands != 1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-23 7:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 7:01 [binutils-gdb] x86/Intel: address quoted-symbol related FIXMEs Jan Beulich
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).