This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR gas/3826: Wrong register name used in x86 assembler error message


>>> "H. J. Lu" <hjl@lucon.org> 04.01.07 18:59 >>>
>I am checking this patch to fix PR gas/3826.

Could you at least give a day's time to look at your patches before you commit
them?

This

>@@ -1102,7 +1105,13 @@ set_intel_syntax (int syntax_flag)
>   else
>     allow_naked_reg = (ask_naked_reg < 0);
> 
>-  identifier_chars['%'] = intel_syntax && allow_naked_reg ? '%' : 0;
>+  if (intel_syntax && allow_naked_reg)
>+    {
>+      identifier_chars['%'] = '%';
>+      register_prefix = "";
>+    }
>+  else
>+    identifier_chars['%'] = 0;
>   identifier_chars['$'] = intel_syntax ? '$' : 0;
> }
 
seems wrong to me: You never restore register_prefix if subsequently .att_syntax
is being used. And even more, the setting of this variable should exclusively depend
on allow_naked_reg (i.e. be independent on AT&T or Intel mode).

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]