public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Clean up x86 assembler
@ 2007-09-05  5:26 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2007-09-05  5:26 UTC (permalink / raw)
  To: binutils

RegRex is for the reg_flags field, not the reg_type field. It also
changes

  if ((A | B) != 0)

to

  if (A || B)


H.J.
---
2007-09-04  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (i386_index_check): Don't use RegRex
	on the reg_type field.
	(parse_real_register): Use `||' instead of `|'.

--- gas/config/tc-i386.c.foo	2007-09-04 22:12:09.000000000 -0700
+++ gas/config/tc-i386.c	2007-09-04 22:17:48.000000000 -0700
@@ -4981,7 +4981,7 @@ i386_index_check (const char *operand_st
 	{
 	  /* 16bit checks.  */
 	  if ((i.base_reg
-	       && ((i.base_reg->reg_type & (Reg16 | BaseIndex | RegRex))
+	       && ((i.base_reg->reg_type & (Reg16 | BaseIndex))
 		   != (Reg16 | BaseIndex)))
 	      || (i.index_reg
 		  && (((i.index_reg->reg_type & (Reg16 | BaseIndex))
@@ -4996,9 +4996,9 @@ i386_index_check (const char *operand_st
 	{
 	  /* 32bit checks.  */
 	  if ((i.base_reg
-	       && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32)
+	       && (i.base_reg->reg_type & Reg32) != Reg32)
 	      || (i.index_reg
-		  && ((i.index_reg->reg_type & (Reg32 | BaseIndex | RegRex))
+		  && ((i.index_reg->reg_type & (Reg32 | BaseIndex))
 		      != (Reg32 | BaseIndex))))
 	    ok = 0;
 	}
@@ -5885,7 +5885,8 @@ parse_real_register (char *reg_string, c
     }
 
   if (r != NULL
-      && ((r->reg_flags & (RegRex64 | RegRex)) | (r->reg_type & Reg64)) != 0
+      && ((r->reg_flags & (RegRex64 | RegRex))
+	  || (r->reg_type & Reg64))
       && (r->reg_type != Control || !(cpu_arch_flags & CpuSledgehammer))
       && flag_code != CODE_64BIT)
     return (const reg_entry *) NULL;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-05  5:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05  5:26 PATCH: Clean up x86 assembler H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).