]> granicus.if.org Git - yasm/commitdiff
Fix #92: CPU 8086 doesn't support PUSH imm; this was added in the 186.
authorPeter Johnson <peter@tortall.net>
Thu, 23 Nov 2006 02:15:47 +0000 (02:15 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 23 Nov 2006 02:15:47 +0000 (02:15 -0000)
svn path=/trunk/yasm/; revision=1698

modules/arch/x86/tests/cpubasic-err.asm
modules/arch/x86/tests/cpubasic-err.errwarn
modules/arch/x86/x86id.c

index a1f71cd1d12e598e0be048673fc9f43c412be830..795dc900778e5b8799cbe7e2e14fe1671b42dba3 100644 (file)
@@ -14,4 +14,4 @@ cpu 8086
 shl ax, 1
 shl ax, 2
 movsd
-
+push 0
index 3e8bd121688ac450a33ca3edae9ca9ecac812ad3..917843e59e770efc273e1193f7db976b798efc87 100644 (file)
@@ -3,3 +3,4 @@
 -:7: warning: `fninit' is an instruction in CPU FPU
 -:15: requires CPU 186
 -:16: warning: `movsd' is an instruction in CPU 386
+-:17: requires CPU 186
index 9b405aa16c3b5822822abee661a4bb0e5617f72f..4ea48781bfa9047d7c1a9b45e50c096c67dda790 100644 (file)
@@ -605,11 +605,11 @@ static const x86_insn_info push_insn[] = {
       {OPT_RM|OPS_32|OPA_EA, 0, 0} },
     { CPU_Hammer|CPU_64, MOD_GasSufQ, 0, 64, 0, 1, {0xFF, 0, 0}, 6, 1,
       {OPT_RM|OPS_64|OPA_EA, 0, 0} },
-    { CPU_Any, MOD_GasIllegal, 0, 64, 0, 1, {0x6A, 0, 0}, 0, 1,
+    { CPU_186, MOD_GasIllegal, 0, 64, 0, 1, {0x6A, 0, 0}, 0, 1,
       {OPT_Imm|OPS_8|OPA_SImm, 0, 0} },
-    { CPU_Any, MOD_GasOnly|MOD_GasSufB, 0, 64, 0, 1, {0x6A, 0, 0}, 0, 1,
+    { CPU_186, MOD_GasOnly|MOD_GasSufB, 0, 64, 0, 1, {0x6A, 0, 0}, 0, 1,
       {OPT_Imm|OPS_8|OPS_Relaxed|OPA_SImm, 0, 0} },
-    { CPU_Any, MOD_GasOnly|MOD_GasSufW, 16, 64, 0, 1, {0x6A, 0x68, 0}, 0, 1,
+    { CPU_186, MOD_GasOnly|MOD_GasSufW, 16, 64, 0, 1, {0x6A, 0x68, 0}, 0, 1,
       {OPT_Imm|OPS_16|OPS_Relaxed|OPA_Imm|OPAP_SImm8, 0, 0} },
     { CPU_386|CPU_Not64, MOD_GasOnly|MOD_GasSufL, 32, 0, 0, 1,
       {0x6A, 0x68, 0}, 0, 1,
@@ -617,13 +617,13 @@ static const x86_insn_info push_insn[] = {
     { CPU_Hammer|CPU_64, MOD_GasSufQ, 64, 64, 0, 1,
       {0x6A, 0x68, 0}, 0, 1,
       {OPT_Imm|OPS_32|OPS_Relaxed|OPA_SImm|OPAP_SImm8, 0, 0} },
-    { CPU_Any|CPU_Not64, MOD_GasIllegal, 0, 0, 0, 1,
+    { CPU_186|CPU_Not64, MOD_GasIllegal, 0, 0, 0, 1,
       {0x6A, 0x68, 0}, 0, 1,
       {OPT_Imm|OPS_BITS|OPS_Relaxed|OPA_Imm|OPAP_SImm8, 0, 0} },
     /* Need these when we don't match the BITS size, but they need to be
      * below the above line so the optimizer can kick in by default.
      */
-    { CPU_Any, MOD_GasIllegal, 16, 64, 0, 1, {0x68, 0, 0}, 0, 1,
+    { CPU_186, MOD_GasIllegal, 16, 64, 0, 1, {0x68, 0, 0}, 0, 1,
       {OPT_Imm|OPS_16|OPA_Imm, 0, 0} },
     { CPU_386|CPU_Not64, MOD_GasIllegal, 32, 0, 0, 1, {0x68, 0, 0}, 0, 1,
       {OPT_Imm|OPS_32|OPA_Imm, 0, 0} },