]> granicus.if.org Git - yasm/commitdiff
Fix twobytemem (two byte memory accessing, no size) opcodes.
authorPeter Johnson <peter@tortall.net>
Fri, 13 Jun 2003 02:34:40 +0000 (02:34 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 13 Jun 2003 02:34:40 +0000 (02:34 -0000)
Add testcase to check them.
Found and patched by: Ben Skeggs <darktama@dodo.com.au>

svn path=/trunk/yasm/; revision=981

modules/arch/x86/tests/Makefile.inc
modules/arch/x86/tests/twobytemem.asm [new file with mode: 0644]
modules/arch/x86/tests/twobytemem.errwarn [new file with mode: 0644]
modules/arch/x86/tests/twobytemem.hex [new file with mode: 0644]
modules/arch/x86/x86id.re

index 94f513daea2805b6888ba6e08e137f79e40d201e..cc1aba18f4877b9325c2b7b798c1631e98132384 100644 (file)
@@ -56,6 +56,9 @@ EXTRA_DIST += modules/arch/x86/tests/segmov.hex
 EXTRA_DIST += modules/arch/x86/tests/shift.asm
 EXTRA_DIST += modules/arch/x86/tests/shift.errwarn
 EXTRA_DIST += modules/arch/x86/tests/shift.hex
+EXTRA_DIST += modules/arch/x86/tests/twobytemem.asm
+EXTRA_DIST += modules/arch/x86/tests/twobytemem.errwarn
+EXTRA_DIST += modules/arch/x86/tests/twobytemem.hex
 EXTRA_DIST += modules/arch/x86/tests/x86label.asm
 EXTRA_DIST += modules/arch/x86/tests/x86label.errwarn
 EXTRA_DIST += modules/arch/x86/tests/x86label.hex
diff --git a/modules/arch/x86/tests/twobytemem.asm b/modules/arch/x86/tests/twobytemem.asm
new file mode 100644 (file)
index 0000000..8a6dbec
--- /dev/null
@@ -0,0 +1,15 @@
+lgdt [0]
+lidt [0x100]
+sgdt [0x1000]
+sidt [0x2004]
+fstenv [0x4]
+fsave [0x800]
+invlpg [0xffff0000]
+fxsave [0x200]
+fxrstor [0x400]
+prefetchnta [0x4]
+prefetcht0 [0x8]
+prefetcht1 [0xC]
+prefetcht2 [0x10]
+prefetch [0x50]
+prefetchw [0x60]
diff --git a/modules/arch/x86/tests/twobytemem.errwarn b/modules/arch/x86/tests/twobytemem.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/arch/x86/tests/twobytemem.hex b/modules/arch/x86/tests/twobytemem.hex
new file mode 100644 (file)
index 0000000..c7fc297
--- /dev/null
@@ -0,0 +1,75 @@
+0f 
+01 
+16 
+00 
+00 
+0f 
+01 
+1e 
+00 
+01 
+0f 
+01 
+06 
+00 
+10 
+0f 
+01 
+0e 
+04 
+20 
+9b 
+d9 
+36 
+04 
+00 
+9b 
+dd 
+36 
+00 
+08 
+0f 
+01 
+3e 
+00 
+00 
+0f 
+ae 
+06 
+00 
+02 
+0f 
+ae 
+0e 
+00 
+04 
+0f 
+18 
+06 
+04 
+00 
+0f 
+18 
+0e 
+08 
+00 
+0f 
+18 
+16 
+0c 
+00 
+0f 
+18 
+1e 
+10 
+00 
+0f 
+0d 
+06 
+50 
+00 
+0f 
+0d 
+0e 
+60 
+00 
index 7c573765ab50193b3e1f586e486f195f4919d55f..0f8bba4aabe2401beecb0961692768498042a3de 100644 (file)
@@ -311,7 +311,7 @@ static const x86_insn_info onebytemem_insn[] = {
 
 /* Two byte opcode instructions with general memory operand */
 static const x86_insn_info twobytemem_insn[] = {
-    { CPU_Any, MOD_Op1Add|MOD_Op0Add|MOD_SpAdd, 0, 1, {0, 0, 0}, 0, 1,
+    { CPU_Any, MOD_Op1Add|MOD_Op0Add|MOD_SpAdd, 0, 2, {0, 0, 0}, 0, 1,
       {OPT_Mem|OPS_Any|OPA_EA, 0, 0} }
 };