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: Check 8bit immediate operands directly for instructions with 4 operands


I am checking in this patch to check the first 2 8bit immediate
operands directly for instructions with 4 operands.

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

	* config/tc-i386.c (build_modrm_byte): Check the first 2 8bit
	immediate operands directly for instructions with 4 operands.

--- tc-i386.c.imm	2007-10-04 14:33:47.000000000 -0700
+++ tc-i386.c	2007-10-05 10:45:27.000000000 -0700
@@ -4421,11 +4421,12 @@ build_modrm_byte (void)
 	    source = 0;
 	  break;
 	case 4:
-	  /* When there are 4 operands, the first two must be immediate
-	     operands. The source operand will be the 3rd one.  */
+	  /* When there are 4 operands, the first two must be 8bit
+	     immediate operands. The source operand will be the 3rd
+	     one.  */
 	  assert (i.imm_operands == 2
-		  && operand_type_check (i.types[0], imm)
-		  && operand_type_check (i.types[1], imm));
+		  && i.types[0].bitfield.imm8
+		  && i.types[1].bitfield.imm8);
 	  source = 2;
 	  break;
 	default:


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