PATCH: Check 0x90 instead of xchg for xchg %rax,%rax

H. J. Lu hjl@lucon.org
Thu Mar 22 00:26:00 GMT 2007


This patch optimizes processs of xchg %rax,%rax by checking 0x90
instead of xchg.


H.J.
----
2003-03-21  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (process_suffix): Check 0x90 instead of
	xchg for xchg %rax,%rax.

--- gas/config/tc-i386.c.opt	2007-03-21 14:24:12.000000000 -0700
+++ gas/config/tc-i386.c	2007-03-21 17:20:57.000000000 -0700
@@ -2983,7 +2983,7 @@ process_suffix (void)
 	  if (i.operands != 2
 	      || i.types [0] != (Acc | Reg64)
 	      || i.types [1] != (Acc | Reg64)
-	      || strcmp (i.tm.name, "xchg") != 0)
+	      || i.tm.base_opcode != 0x90)
 	  i.rex |= REX_W;
 	}
 



More information about the Binutils mailing list