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]

[PATCH] x86: make swapped operand warning be meaningful under Intel syntax


With how things currently are, the warning message suggests that the
assembler is going to use impossible operand combinations.

gas/
2009-04-15  Jan Beulich  <jbeulich@novell.com>

	* config/tc-i386.c (process_operands): Print operands in
	correct order depending on intel_syntax.

gas/testsuite/
2009-04-15  Jan Beulich  <jbeulich@novell.com>

	* gas/i386/intel.e: Adjust expectations.

--- 2009-04-15/gas/config/tc-i386.c	2009-04-15 08:47:23.000000000 +0200
+++ 2009-04-15/gas/config/tc-i386.c	2008-11-13 11:14:16.000000000 +0100
@@ -5061,8 +5061,8 @@ duplicate:
 		{
 		  /* Reversed arguments on faddp, fsubp, etc.  */
 		  as_warn (_("translating to `%s %s%s,%s%s'"), i.tm.name,
-			   register_prefix, i.op[1].regs->reg_name,
-			   register_prefix, i.op[0].regs->reg_name);
+			   register_prefix, i.op[!intel_syntax].regs->reg_name,
+			   register_prefix, i.op[intel_syntax].regs->reg_name);
 		}
 	      else
 		{
--- 2009-04-15/gas/testsuite/gas/i386/intel.e	2008-08-28 17:58:02.000000000 +0200
+++ 2009-04-15/gas/testsuite/gas/i386/intel.e	2008-11-13 11:17:13.000000000 +0100
@@ -7,11 +7,11 @@
 .*:495: Warning: Treating `\[0x90909090\]' as memory reference
 .*:635: Warning: translating to `faddp'
 .*:644: Warning: translating to `fdivp'
-.*:653: Warning: translating to `fdivp st,st\(3\)'
+.*:653: Warning: translating to `fdivp st\(3\),st'
 .*:654: Warning: translating to `fdivrp'
-.*:663: Warning: translating to `fdivrp st,st\(3\)'
+.*:663: Warning: translating to `fdivrp st\(3\),st'
 .*:664: Warning: translating to `fmulp'
 .*:673: Warning: translating to `fsubp'
 .*:674: Warning: translating to `fsubrp'
-.*:682: Warning: translating to `fsubp st,st\(3\)'
-.*:692: Warning: translating to `fsubrp st,st\(3\)'
+.*:682: Warning: translating to `fsubp st\(3\),st'
+.*:692: Warning: translating to `fsubrp st\(3\),st'




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