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


Thanks, H.J.!

>>> "H. J. Lu" <hjl@lucon.org> 05.01.07 14:14 >>>
On Fri, Jan 05, 2007 at 07:33:13AM +0000, Jan Beulich wrote:
>  
> 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

Here is the fix.  Thanks.


H.J.
----
2007-01-05  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (set_intel_syntax): Update set_intel_syntax
	depending on allow_naked_reg.

--- gas/config/tc-i386.c.naked	2007-01-04 11:58:54.000000000 -0800
+++ gas/config/tc-i386.c	2007-01-05 05:11:06.000000000 -0800
@@ -1105,14 +1105,9 @@ set_intel_syntax (int syntax_flag)
   else
     allow_naked_reg = (ask_naked_reg < 0);
 
-  if (intel_syntax && allow_naked_reg)
-    {
-      identifier_chars['%'] = '%';
-      register_prefix = "";
-    }
-  else
-    identifier_chars['%'] = 0;
+  identifier_chars['%'] = intel_syntax && allow_naked_reg ? '%' : 0;
   identifier_chars['$'] = intel_syntax ? '$' : 0;
+  register_prefix = allow_naked_reg ? "" : "%";
 }
 
 static void


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