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/Intel: don't swap operands of MONITOR and MWAIT


Generally, the documentation doesn't allow for any explicit operands
to be specified with MONITOR/MWAIT. To permit the more legible
overriding of the address size via specifying operands, the option is
being retained even in Intel mode, but operand swapping is being
suppressed by this patch. This is both because it makes no sense here
(all of the operands are inputs) and since not doing so would require
a more intrusive fix to process_immext() (as it currently mis-numbers
the operands in the diagnostic when in Intel mode).

2012-07-24  Jan Beulich <jbeulich@suse.com>

	* config/tc-i386.c (md_assemble): Also suppress operand
	swapping for MONITOR and MWAIT.

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3100,6 +3100,8 @@ md_assemble (char *line)
       && i.operands > 1
       && (strcmp (mnemonic, "bound") != 0)
       && (strcmp (mnemonic, "invlpga") != 0)
+      && (strcmp (mnemonic, "monitor") != 0)
+      && (strcmp (mnemonic, "mwait") != 0)
       && !(operand_type_check (i.types[0], imm)
 	   && operand_type_check (i.types[1], imm)))
     swap_operands ();



Attachment: binutils-mainline-x86-intel-monitor-no-swap.patch
Description: Text document


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