mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 10:35:12 +08:00
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.
This commit is contained in:
parent
6acf913090
commit
a4f8c177b4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user