]> granicus.if.org Git - yasm/commitdiff
Fix encoding of repe and repz prefixes.
authorPeter Johnson <peter@tortall.net>
Thu, 23 Oct 2003 01:19:15 +0000 (01:19 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 23 Oct 2003 01:19:15 +0000 (01:19 -0000)
Reported by: Edouard Gomez <ed.gomez@free.fr>

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

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

index 65dd20387a0e0f1a5ed017d782ecd85d5fafc9c3..076659b18bfe8e9020c47d8fba0c3f5450de3180 100644 (file)
@@ -89,6 +89,9 @@ EXTRA_DIST += modules/arch/x86/tests/opsize-err.errwarn
 EXTRA_DIST += modules/arch/x86/tests/overflow.asm
 EXTRA_DIST += modules/arch/x86/tests/overflow.errwarn
 EXTRA_DIST += modules/arch/x86/tests/overflow.hex
+EXTRA_DIST += modules/arch/x86/tests/rep.asm
+EXTRA_DIST += modules/arch/x86/tests/rep.errwarn
+EXTRA_DIST += modules/arch/x86/tests/rep.hex
 EXTRA_DIST += modules/arch/x86/tests/ret.asm
 EXTRA_DIST += modules/arch/x86/tests/ret.errwarn
 EXTRA_DIST += modules/arch/x86/tests/ret.hex
diff --git a/modules/arch/x86/tests/rep.asm b/modules/arch/x86/tests/rep.asm
new file mode 100644 (file)
index 0000000..e3e12b6
--- /dev/null
@@ -0,0 +1,5 @@
+repne lodsw
+repnz lodsd
+rep stosb
+repe cmpsb
+repz movsb
diff --git a/modules/arch/x86/tests/rep.errwarn b/modules/arch/x86/tests/rep.errwarn
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/modules/arch/x86/tests/rep.hex b/modules/arch/x86/tests/rep.hex
new file mode 100644 (file)
index 0000000..84f3476
--- /dev/null
@@ -0,0 +1,11 @@
+f2 
+ad 
+f2 
+66 
+ad 
+f3 
+aa 
+f3 
+a6 
+f3 
+a4 
index fa3c9c05c5cd3caaf51a1de07a4e3ae13d1b2a10..23b1652f6de97ac09391c8cfa55cb81b61f127e5 100644 (file)
@@ -2400,12 +2400,12 @@ yasm_x86__parse_check_id(yasm_arch *arch, unsigned long data[4],
        }
        R E P E         {
            data[0] = X86_LOCKREP;
-           data[1] = 0xF4;
+           data[1] = 0xF3;
            return YASM_ARCH_CHECK_ID_PREFIX;
        }
        R E P Z         {
            data[0] = X86_LOCKREP;
-           data[1] = 0xF4;
+           data[1] = 0xF3;
            return YASM_ARCH_CHECK_ID_PREFIX;
        }