aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-i386-intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-i386-intel.c')
-rw-r--r--gas/config/tc-i386-intel.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gas/config/tc-i386-intel.c b/gas/config/tc-i386-intel.c
index 2bdcf35..cff0ae7 100644
--- a/gas/config/tc-i386-intel.c
+++ b/gas/config/tc-i386-intel.c
@@ -168,13 +168,18 @@ operatorT i386_operator (const char *name, unsigned int operands, char *pc)
for (j = 0; i386_types[j].name; ++j)
if (strcasecmp (i386_types[j].name, name) == 0)
break;
+
if (i386_types[j].name && *pc == ' ')
{
- char *pname = ++input_line_pointer;
- char c = get_symbol_end ();
+ char *pname;
+ char c;
+
+ ++input_line_pointer;
+ c = get_symbol_name (&pname);
if (strcasecmp (pname, "ptr") == 0)
{
+ /* FIXME: What if c == '"' ? */
pname[-1] = *pc;
*pc = c;
if (intel_syntax > 0 || operands != 1)
@@ -182,7 +187,7 @@ operatorT i386_operator (const char *name, unsigned int operands, char *pc)
return i386_types[j].op;
}
- *input_line_pointer = c;
+ (void) restore_line_pointer (c);
input_line_pointer = pname - 1;
}