X86: Added some new versions of MOV and a new argument type tag.
authorGabe Black <gblack@eecs.umich.edu>
Sat, 13 Oct 2007 03:08:12 +0000 (20:08 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Sat, 13 Oct 2007 03:08:12 +0000 (20:08 -0700)
--HG--
extra : convert_revision : e21b2062d68baa983c7c631b3e1fe3149de56427

src/arch/x86/isa/decoder/one_byte_opcodes.isa
src/arch/x86/isa/insts/general_purpose/data_transfer/move.py
src/arch/x86/isa/specialize.isa

index aed7fb7e74c7e13c7d020ef6b57726541e53e8ec..da78674011cb4151419138bbfe9753b3b9889c53 100644 (file)
                 default: lahf();
             }
         }
-        0x14: decode OPCODE_OP_BOTTOM3 {
-            0x0: mov_Al_Ob();
-            0x1: mov_rAX_Ov();
-            0x2: mov_Ob_Al();
-            0x3: mov_Ov_rAX();
-            0x4: StringInst::MOVS(Yb,Xb);
-            0x5: StringInst::MOVS(Yv,Xv);
-            0x6: StringTestInst::CMPS(Yb,Xb);
-            0x7: StringTestInst::CMPS(Yv,Xv);
-        }
         format Inst {
+            0x14: decode OPCODE_OP_BOTTOM3 {
+                0x0: MOV(rAb, Ob);
+                0x1: MOV(rAv, Ov);
+                0x2: MOV(Ob, rAb);
+                0x3: MOV(Ov, rAv);
+                0x4: StringInst::MOVS(Yb,Xb);
+                0x5: StringInst::MOVS(Yv,Xv);
+                0x6: StringTestInst::CMPS(Yb,Xb);
+                0x7: StringTestInst::CMPS(Yv,Xv);
+            }
             0x15: decode OPCODE_OP_BOTTOM3 {
                 0x0: TEST(rAb,Ib);
                 0x1: TEST(rAv,Iz);
index a248f5656ac5d91c0d2479f61168ee2f6b64d5cc..04f9ea12aa24eb461fdd088563d8073a89e6a66c 100644 (file)
@@ -59,6 +59,16 @@ microcode = '''
 # Regular moves
 #
 
+def macroop MOV_R_MI {
+    limm t1, imm
+    ld reg, seg, [1, t0, t1]
+};
+
+def macroop MOV_MI_R {
+    limm t1, imm
+    st reg, seg, [1, t0, t1]
+};
+
 def macroop MOV_R_R {
     mov reg, reg, regm
 };
index 59e9577d99411efc3b2546ca1f4d1600ab3e1ac7..cf6b6ff868b5e83b73b362fcd039cc9eb07f63e0 100644 (file)
@@ -172,6 +172,9 @@ let {{
             elif opType.tag in ("I", "J"):
                 # Immediates
                 Name += "_I"
+            elif opType.tag == "O":
+                # Immediate containing a memory offset
+                Name += "_MI"
             elif opType.tag in ("PR", "R", "VR"):
                 # Non register modrm settings should cause an error
                 env.addReg(ModRMRMIndex)