Explorar o código

* merge i8086 branch by Nikolay Nikolov

git-svn-id: trunk@24324 -
florian %!s(int64=12) %!d(string=hai) anos
pai
achega
0e41df598e
Modificáronse 100 ficheiros con 23449 adicións e 544 borrados
  1. 66 0
      .gitattributes
  2. 3 0
      Makefile.fpc
  3. 18 4
      compiler/Makefile.fpc
  4. 13 6
      compiler/aasmtai.pas
  5. 12 12
      compiler/cg64f32.pas
  6. 13 3
      compiler/cgbase.pas
  7. 10 2
      compiler/cgobj.pas
  8. 1 5
      compiler/cgutils.pas
  9. 38 0
      compiler/cutils.pas
  10. 149 12
      compiler/defutil.pas
  11. 17 0
      compiler/fpcdefs.inc
  12. 5 0
      compiler/globals.pas
  13. 5 1
      compiler/globtype.pas
  14. 34 29
      compiler/hlcg2ll.pas
  15. 120 55
      compiler/hlcgobj.pas
  16. 1521 0
      compiler/i8086/cgcpu.pas
  17. 149 0
      compiler/i8086/cpubase.inc
  18. 130 0
      compiler/i8086/cpuinfo.pas
  19. 60 0
      compiler/i8086/cpunode.pas
  20. 716 0
      compiler/i8086/cpupara.pas
  21. 100 0
      compiler/i8086/cpupi.pas
  22. 88 0
      compiler/i8086/cputarg.pas
  23. 203 0
      compiler/i8086/hlcgcpu.pas
  24. 947 0
      compiler/i8086/i8086att.inc
  25. 947 0
      compiler/i8086/i8086atts.inc
  26. 947 0
      compiler/i8086/i8086int.inc
  27. 2 0
      compiler/i8086/i8086nop.inc
  28. 947 0
      compiler/i8086/i8086op.inc
  29. 947 0
      compiler/i8086/i8086prop.inc
  30. 11567 0
      compiler/i8086/i8086tab.inc
  31. 682 0
      compiler/i8086/n8086add.pas
  32. 80 0
      compiler/i8086/n8086inl.pas
  33. 475 0
      compiler/i8086/n8086mat.pas
  34. 82 0
      compiler/i8086/r8086ari.inc
  35. 82 0
      compiler/i8086/r8086att.inc
  36. 82 0
      compiler/i8086/r8086con.inc
  37. 82 0
      compiler/i8086/r8086dwrf.inc
  38. 82 0
      compiler/i8086/r8086int.inc
  39. 82 0
      compiler/i8086/r8086iri.inc
  40. 82 0
      compiler/i8086/r8086nasm.inc
  41. 2 0
      compiler/i8086/r8086nor.inc
  42. 82 0
      compiler/i8086/r8086nri.inc
  43. 82 0
      compiler/i8086/r8086num.inc
  44. 82 0
      compiler/i8086/r8086op.inc
  45. 82 0
      compiler/i8086/r8086ot.inc
  46. 82 0
      compiler/i8086/r8086rni.inc
  47. 82 0
      compiler/i8086/r8086sri.inc
  48. 82 0
      compiler/i8086/r8086stab.inc
  49. 82 0
      compiler/i8086/r8086std.inc
  50. 59 0
      compiler/i8086/ra8086att.pas
  51. 74 0
      compiler/i8086/ra8086int.pas
  52. 111 0
      compiler/i8086/rgcpu.pas
  53. 36 36
      compiler/jvm/hlcgcpu.pas
  54. 7 0
      compiler/link.pas
  55. 37 30
      compiler/nadd.pas
  56. 4 3
      compiler/ncal.pas
  57. 0 89
      compiler/ncgflw.pas
  58. 3 0
      compiler/ncginl.pas
  59. 35 13
      compiler/ncgmat.pas
  60. 20 4
      compiler/ncgmem.pas
  61. 89 6
      compiler/ncgset.pas
  62. 29 7
      compiler/ncgutil.pas
  63. 1 1
      compiler/ncnv.pas
  64. 47 18
      compiler/nflw.pas
  65. 192 84
      compiler/ninl.pas
  66. 77 32
      compiler/nmat.pas
  67. 2 19
      compiler/optdfa.pas
  68. 13 2
      compiler/options.pas
  69. 3 2
      compiler/optutils.pas
  70. 4 4
      compiler/pdecvar.pas
  71. 2 2
      compiler/pexpr.pas
  72. 2 2
      compiler/powerpc64/hlcgcpu.pas
  73. 7 0
      compiler/pp.pas
  74. 145 0
      compiler/ppc8086.lpi
  75. 9 5
      compiler/ppu.pas
  76. 3 3
      compiler/psub.pas
  77. 5 2
      compiler/ptype.pas
  78. 3 3
      compiler/scanner.pas
  79. 6 0
      compiler/symconst.pas
  80. 29 8
      compiler/symdef.pas
  81. 2 2
      compiler/symsym.pas
  82. 7 2
      compiler/systems.inc
  83. 8 4
      compiler/systems.pas
  84. 2 2
      compiler/systems/i_android.pas
  85. 2 2
      compiler/systems/i_beos.pas
  86. 2 2
      compiler/systems/i_bsd.pas
  87. 2 2
      compiler/systems/i_emx.pas
  88. 2 2
      compiler/systems/i_go32v2.pas
  89. 2 2
      compiler/systems/i_haiku.pas
  90. 2 2
      compiler/systems/i_linux.pas
  91. 102 0
      compiler/systems/i_msdos.pas
  92. 2 2
      compiler/systems/i_nativent.pas
  93. 2 2
      compiler/systems/i_nwl.pas
  94. 2 2
      compiler/systems/i_nwm.pas
  95. 2 2
      compiler/systems/i_os2.pas
  96. 2 2
      compiler/systems/i_sunos.pas
  97. 2 2
      compiler/systems/i_symbian.pas
  98. 2 2
      compiler/systems/i_watcom.pas
  99. 2 2
      compiler/systems/i_wdosx.pas
  100. 2 2
      compiler/systems/i_win.pas

+ 66 - 0
.gitattributes

@@ -228,6 +228,43 @@ compiler/i386/ra386att.pas svneol=native#text/plain
 compiler/i386/ra386int.pas svneol=native#text/plain
 compiler/i386/ra386int.pas svneol=native#text/plain
 compiler/i386/rgcpu.pas svneol=native#text/plain
 compiler/i386/rgcpu.pas svneol=native#text/plain
 compiler/i386/rropt386.pas svneol=native#text/plain
 compiler/i386/rropt386.pas svneol=native#text/plain
+compiler/i8086/cgcpu.pas svneol=native#text/plain
+compiler/i8086/cpubase.inc svneol=native#text/plain
+compiler/i8086/cpuinfo.pas svneol=native#text/plain
+compiler/i8086/cpunode.pas svneol=native#text/plain
+compiler/i8086/cpupara.pas svneol=native#text/plain
+compiler/i8086/cpupi.pas svneol=native#text/plain
+compiler/i8086/cputarg.pas svneol=native#text/plain
+compiler/i8086/hlcgcpu.pas svneol=native#text/plain
+compiler/i8086/i8086att.inc svneol=native#text/plain
+compiler/i8086/i8086atts.inc svneol=native#text/plain
+compiler/i8086/i8086int.inc svneol=native#text/plain
+compiler/i8086/i8086nop.inc svneol=native#text/plain
+compiler/i8086/i8086op.inc svneol=native#text/plain
+compiler/i8086/i8086prop.inc svneol=native#text/plain
+compiler/i8086/i8086tab.inc svneol=native#text/plain
+compiler/i8086/n8086add.pas svneol=native#text/plain
+compiler/i8086/n8086inl.pas svneol=native#text/plain
+compiler/i8086/n8086mat.pas svneol=native#text/plain
+compiler/i8086/r8086ari.inc svneol=native#text/plain
+compiler/i8086/r8086att.inc svneol=native#text/plain
+compiler/i8086/r8086con.inc svneol=native#text/plain
+compiler/i8086/r8086dwrf.inc svneol=native#text/plain
+compiler/i8086/r8086int.inc svneol=native#text/plain
+compiler/i8086/r8086iri.inc svneol=native#text/plain
+compiler/i8086/r8086nasm.inc svneol=native#text/plain
+compiler/i8086/r8086nor.inc svneol=native#text/plain
+compiler/i8086/r8086nri.inc svneol=native#text/plain
+compiler/i8086/r8086num.inc svneol=native#text/plain
+compiler/i8086/r8086op.inc svneol=native#text/plain
+compiler/i8086/r8086ot.inc svneol=native#text/plain
+compiler/i8086/r8086rni.inc svneol=native#text/plain
+compiler/i8086/r8086sri.inc svneol=native#text/plain
+compiler/i8086/r8086stab.inc svneol=native#text/plain
+compiler/i8086/r8086std.inc svneol=native#text/plain
+compiler/i8086/ra8086att.pas svneol=native#text/plain
+compiler/i8086/ra8086int.pas svneol=native#text/plain
+compiler/i8086/rgcpu.pas svneol=native#text/plain
 compiler/ia64/aasmcpu.pas svneol=native#text/plain
 compiler/ia64/aasmcpu.pas svneol=native#text/plain
 compiler/ia64/cpubase.pas svneol=native#text/plain
 compiler/ia64/cpubase.pas svneol=native#text/plain
 compiler/ia64/cpuinfo.pas svneol=native#text/plain
 compiler/ia64/cpuinfo.pas svneol=native#text/plain
@@ -517,6 +554,7 @@ compiler/pp.lpi svneol=native#text/plain
 compiler/pp.pas svneol=native#text/plain
 compiler/pp.pas svneol=native#text/plain
 compiler/pparautl.pas svneol=native#text/plain
 compiler/pparautl.pas svneol=native#text/plain
 compiler/ppc68k.lpi svneol=native#text/plain
 compiler/ppc68k.lpi svneol=native#text/plain
+compiler/ppc8086.lpi svneol=native#text/plain
 compiler/ppcaarch64.lpi svneol=native#text/plain
 compiler/ppcaarch64.lpi svneol=native#text/plain
 compiler/ppcarm.lpi svneol=native#text/plain
 compiler/ppcarm.lpi svneol=native#text/plain
 compiler/ppcavr.lpi svneol=native#text/plain
 compiler/ppcavr.lpi svneol=native#text/plain
@@ -618,6 +656,7 @@ compiler/systems/i_jvm.pas svneol=native#text/plain
 compiler/systems/i_linux.pas svneol=native#text/plain
 compiler/systems/i_linux.pas svneol=native#text/plain
 compiler/systems/i_macos.pas svneol=native#text/plain
 compiler/systems/i_macos.pas svneol=native#text/plain
 compiler/systems/i_morph.pas svneol=native#text/plain
 compiler/systems/i_morph.pas svneol=native#text/plain
+compiler/systems/i_msdos.pas svneol=native#text/plain
 compiler/systems/i_nativent.pas svneol=native#text/pascal
 compiler/systems/i_nativent.pas svneol=native#text/pascal
 compiler/systems/i_nds.pas svneol=native#text/plain
 compiler/systems/i_nds.pas svneol=native#text/plain
 compiler/systems/i_nwl.pas svneol=native#text/plain
 compiler/systems/i_nwl.pas svneol=native#text/plain
@@ -646,6 +685,7 @@ compiler/systems/t_jvm.pas svneol=native#text/plain
 compiler/systems/t_linux.pas svneol=native#text/plain
 compiler/systems/t_linux.pas svneol=native#text/plain
 compiler/systems/t_macos.pas svneol=native#text/plain
 compiler/systems/t_macos.pas svneol=native#text/plain
 compiler/systems/t_morph.pas svneol=native#text/plain
 compiler/systems/t_morph.pas svneol=native#text/plain
+compiler/systems/t_msdos.pas svneol=native#text/plain
 compiler/systems/t_nativent.pas svneol=native#text/pascal
 compiler/systems/t_nativent.pas svneol=native#text/pascal
 compiler/systems/t_nds.pas svneol=native#text/plain
 compiler/systems/t_nds.pas svneol=native#text/plain
 compiler/systems/t_nwl.pas svneol=native#text/plain
 compiler/systems/t_nwl.pas svneol=native#text/plain
@@ -7775,6 +7815,15 @@ rtl/i386/setjumph.inc svneol=native#text/plain
 rtl/i386/strings.inc svneol=native#text/plain
 rtl/i386/strings.inc svneol=native#text/plain
 rtl/i386/stringss.inc svneol=native#text/plain
 rtl/i386/stringss.inc svneol=native#text/plain
 rtl/i386/strpas.inc svneol=native#text/plain
 rtl/i386/strpas.inc svneol=native#text/plain
+rtl/i8086/i8086.inc svneol=native#text/plain
+rtl/i8086/int64p.inc svneol=native#text/plain
+rtl/i8086/makefile.cpu svneol=native#text/plain
+rtl/i8086/math.inc svneol=native#text/plain
+rtl/i8086/set.inc svneol=native#text/plain
+rtl/i8086/setjump.inc svneol=native#text/plain
+rtl/i8086/setjumph.inc svneol=native#text/plain
+rtl/i8086/strings.inc svneol=native#text/plain
+rtl/i8086/stringss.inc svneol=native#text/plain
 rtl/inc/aliases.inc svneol=native#text/plain
 rtl/inc/aliases.inc svneol=native#text/plain
 rtl/inc/astrings.inc svneol=native#text/plain
 rtl/inc/astrings.inc svneol=native#text/plain
 rtl/inc/cgeneric.inc svneol=native#text/plain
 rtl/inc/cgeneric.inc svneol=native#text/plain
@@ -7861,6 +7910,7 @@ rtl/inc/textrec.inc svneol=native#text/plain
 rtl/inc/thread.inc svneol=native#text/plain
 rtl/inc/thread.inc svneol=native#text/plain
 rtl/inc/threadh.inc svneol=native#text/plain
 rtl/inc/threadh.inc svneol=native#text/plain
 rtl/inc/threadvr.inc svneol=native#text/plain
 rtl/inc/threadvr.inc svneol=native#text/plain
+rtl/inc/tinyheap.inc svneol=native#text/plain
 rtl/inc/typefile.inc svneol=native#text/plain
 rtl/inc/typefile.inc svneol=native#text/plain
 rtl/inc/ucomplex.pp svneol=native#text/plain
 rtl/inc/ucomplex.pp svneol=native#text/plain
 rtl/inc/ufloat128.pp svneol=native#text/plain
 rtl/inc/ufloat128.pp svneol=native#text/plain
@@ -8182,6 +8232,17 @@ rtl/morphos/utility.pp svneol=native#text/plain
 rtl/morphos/varutils.pp svneol=native#text/plain
 rtl/morphos/varutils.pp svneol=native#text/plain
 rtl/morphos/video.pp svneol=native#text/plain
 rtl/morphos/video.pp svneol=native#text/plain
 rtl/morphos/videodata.inc svneol=native#text/plain
 rtl/morphos/videodata.inc svneol=native#text/plain
+rtl/msdos/Makefile svneol=native#text/plain
+rtl/msdos/Makefile.fpc svneol=native#text/plain
+rtl/msdos/dos.pp svneol=native#text/plain
+rtl/msdos/prt0.asm svneol=native#text/plain
+rtl/msdos/registers.inc svneol=native#text/plain
+rtl/msdos/sysdir.inc svneol=native#text/plain
+rtl/msdos/sysfile.inc svneol=native#text/plain
+rtl/msdos/sysheap.inc svneol=native#text/plain
+rtl/msdos/sysos.inc svneol=native#text/plain
+rtl/msdos/sysosh.inc svneol=native#text/plain
+rtl/msdos/system.pp svneol=native#text/plain
 rtl/nativent/Makefile svneol=native#text/plain
 rtl/nativent/Makefile svneol=native#text/plain
 rtl/nativent/Makefile.fpc svneol=native#text/plain
 rtl/nativent/Makefile.fpc svneol=native#text/plain
 rtl/nativent/buildrtl.lpi svneol=native#text/plain
 rtl/nativent/buildrtl.lpi svneol=native#text/plain
@@ -10480,6 +10541,7 @@ tests/test/cg/variants/tvarol9.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol91.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol91.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol94.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol94.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol96.pp svneol=native#text/plain
 tests/test/cg/variants/tvarol96.pp svneol=native#text/plain
+tests/test/cpu16/taddint1.pp svneol=native#text/pascal
 tests/test/dumpclass.pp svneol=native#text/plain
 tests/test/dumpclass.pp svneol=native#text/plain
 tests/test/dumpmethods.pp svneol=native#text/plain
 tests/test/dumpmethods.pp svneol=native#text/plain
 tests/test/jvm/JavaClass.java svneol=native#text/plain
 tests/test/jvm/JavaClass.java svneol=native#text/plain
@@ -12013,6 +12075,10 @@ tests/utils/concat.pp svneol=native#text/plain
 tests/utils/dbdigest.pp svneol=native#text/plain
 tests/utils/dbdigest.pp svneol=native#text/plain
 tests/utils/dbtests.pp svneol=native#text/plain
 tests/utils/dbtests.pp svneol=native#text/plain
 tests/utils/digest.pp svneol=native#text/plain
 tests/utils/digest.pp svneol=native#text/plain
+tests/utils/dosbox/dosbox.conf svneol=native#text/plain
+tests/utils/dosbox/dosbox_wrapper.pas svneol=native#text/plain
+tests/utils/dosbox/exitcode.exe -text svneol=unset#application/x-dosexec
+tests/utils/dosbox/exitcode.pas svneol=native#text/plain
 tests/utils/dotest.pp svneol=native#text/plain
 tests/utils/dotest.pp svneol=native#text/plain
 tests/utils/fail.pp svneol=native#text/plain
 tests/utils/fail.pp svneol=native#text/plain
 tests/utils/fptime.pp svneol=native#text/plain
 tests/utils/fptime.pp svneol=native#text/plain

+ 3 - 0
Makefile.fpc

@@ -73,6 +73,9 @@ endif
 ifeq ($(CPU_TARGET),mipsel)
 ifeq ($(CPU_TARGET),mipsel)
 PPSUF=mipsel
 PPSUF=mipsel
 endif
 endif
+ifeq ($(CPU_TARGET),i8086)
+PPSUF=8086
+endif
 
 
 # cross compilers uses full cpu_target, not just ppc-suffix
 # cross compilers uses full cpu_target, not just ppc-suffix
 # (except if the target cannot run a native compiler)
 # (except if the target cannot run a native compiler)

+ 18 - 4
compiler/Makefile.fpc

@@ -32,7 +32,7 @@ fpcdir=..
 unexport FPC_VERSION FPC_COMPILERINFO
 unexport FPC_VERSION FPC_COMPILERINFO
 
 
 # Which platforms are ready for inclusion in the cycle
 # Which platforms are ready for inclusion in the cycle
-CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips avr jvm
+CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips avr jvm i8086
 
 
 # All supported targets used for clean
 # All supported targets used for clean
 ALLTARGETS=$(CYCLETARGETS)
 ALLTARGETS=$(CYCLETARGETS)
@@ -77,6 +77,9 @@ endif
 ifdef JVM
 ifdef JVM
 PPC_TARGET=jvm
 PPC_TARGET=jvm
 endif
 endif
+ifdef I8086
+PPC_TARGET=i8086
+endif
 
 
 # Default is to generate a compiler for the same
 # Default is to generate a compiler for the same
 # platform as CPU_TARGET (a native compiler)
 # platform as CPU_TARGET (a native compiler)
@@ -193,6 +196,9 @@ endif
 ifeq ($(CPC_TARGET),jvm)
 ifeq ($(CPC_TARGET),jvm)
 CPUSUF=jvm
 CPUSUF=jvm
 endif
 endif
+ifeq ($(CPC_TARGET),i8086)
+CPUSUF=8086
+endif
 
 
 # Do not define the default -d$(CPU_TARGET) because that
 # Do not define the default -d$(CPU_TARGET) because that
 # will conflict with our -d$(CPC_TARGET)
 # will conflict with our -d$(CPC_TARGET)
@@ -279,6 +285,11 @@ ifeq ($(PPC_TARGET),jvm)
 override LOCALOPT+=-Fujvm -dNOOPT
 override LOCALOPT+=-Fujvm -dNOOPT
 endif
 endif
 
 
+# i8086 specific
+ifeq ($(PPC_TARGET),i8086)
+override LOCALOPT+=-Fux86 -dNOOPT
+endif
+
 OPTWPOCOLLECT=-OWdevirtcalls,optvmts -FW$(BASEDIR)/pp1.wpo
 OPTWPOCOLLECT=-OWdevirtcalls,optvmts -FW$(BASEDIR)/pp1.wpo
 OPTWPOPERFORM=-Owdevirtcalls,optvmts -Fw$(BASEDIR)/pp1.wpo
 OPTWPOPERFORM=-Owdevirtcalls,optvmts -Fw$(BASEDIR)/pp1.wpo
 # symbol liveness WPO requires nm, smart linking and no stripping (the latter
 # symbol liveness WPO requires nm, smart linking and no stripping (the latter
@@ -303,6 +314,9 @@ endif
 ifeq ($(OS_TARGET),gba)
 ifeq ($(OS_TARGET),gba)
 NoNativeBinaries=1
 NoNativeBinaries=1
 endif
 endif
+ifeq ($(OS_TARGET),msdos)
+NoNativeBinaries=1
+endif
 
 
 [rules]
 [rules]
 #####################################################################
 #####################################################################
@@ -377,7 +391,7 @@ endif
 # CPU targets
 # CPU targets
 #####################################################################
 #####################################################################
 
 
-PPC_TARGETS=i386 m68k powerpc sparc arm armeb x86_64 powerpc64 alpha vis ia64 mips mipsel avr jvm
+PPC_TARGETS=i386 m68k powerpc sparc arm armeb x86_64 powerpc64 alpha vis ia64 mips mipsel avr jvm i8086
 INSTALL_TARGETS=$(addsuffix _exe_install,$(sort $(CYCLETARGETS) $(PPC_TARGETS)))
 INSTALL_TARGETS=$(addsuffix _exe_install,$(sort $(CYCLETARGETS) $(PPC_TARGETS)))
 
 
 .PHONY: $(PPC_TARGETS) $(INSTALL_TARGETS)
 .PHONY: $(PPC_TARGETS) $(INSTALL_TARGETS)
@@ -432,12 +446,12 @@ tempclean:
         -$(DEL) $(PPCROSSNAME) $(TEMPNAME) $(TEMPNAME1) $(TEMPNAME2) $(TEMPNAME3) $(MSG2INC) pp1.wpo pp2.wpo
         -$(DEL) $(PPCROSSNAME) $(TEMPNAME) $(TEMPNAME1) $(TEMPNAME2) $(TEMPNAME3) $(MSG2INC) pp1.wpo pp2.wpo
 
 
 execlean :
 execlean :
-        -$(DEL) ppc386$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT) ppcppc64$(EXEEXT) ppcarm$(EXEEXT) ppcmips$(EXEEXT) ppcmipsel$(EXEEXT) ppcjvm$(EXEEXT) $(EXENAME) $(TEMPWPONAME1) $(TEMPWPONAME2)
+        -$(DEL) ppc386$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT) ppcppc64$(EXEEXT) ppcarm$(EXEEXT) ppcmips$(EXEEXT) ppcmipsel$(EXEEXT) ppcjvm$(EXEEXT) ppc8086$(EXEEXT) $(EXENAME) $(TEMPWPONAME1) $(TEMPWPONAME2)
 
 
 $(addsuffix _clean,$(ALLTARGETS)):
 $(addsuffix _clean,$(ALLTARGETS)):
         -$(DELTREE) $(addprefix $(subst _clean,,$@),/units)
         -$(DELTREE) $(addprefix $(subst _clean,,$@),/units)
         -$(DEL) $(addprefix $(subst _clean,,$@)/,*$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT))
         -$(DEL) $(addprefix $(subst _clean,,$@)/,*$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT))
-        -$(DEL) $(addprefix $(subst _clean,,$@)/,ppc386$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT) ppcppc64$(EXEEXT) ppcarm$(EXEEXT) ppcmips$(EXEEXT) ppcmipsel$(EXEEXT) ppcjvm$(EXEEXT)  $(EXENAME))
+        -$(DEL) $(addprefix $(subst _clean,,$@)/,ppc386$(EXEEXT) ppc68k$(EXEEXT) ppcx64$(EXEEXT) ppcppc$(EXEEXT) ppcsparc$(EXEEXT) ppcppc64$(EXEEXT) ppcarm$(EXEEXT) ppcmips$(EXEEXT) ppcmipsel$(EXEEXT) ppcjvm$(EXEEXT) ppc8086$(EXEEXT) $(EXENAME))
 
 
 cycleclean: cleanall $(addsuffix _clean,$(CPC_TARGET))
 cycleclean: cleanall $(addsuffix _clean,$(CPC_TARGET))
         -$(DEL) $(EXENAME)
         -$(DEL) $(EXENAME)

+ 13 - 6
compiler/aasmtai.pas

@@ -142,19 +142,26 @@ interface
         );
         );
 
 
     const
     const
-{$ifdef cpu64bitaddr}
+{$if defined(cpu64bitaddr)}
        aitconst_ptr = aitconst_64bit;
        aitconst_ptr = aitconst_64bit;
        aitconst_ptr_unaligned = aitconst_64bit_unaligned;
        aitconst_ptr_unaligned = aitconst_64bit_unaligned;
-{$else cpu64bitaddr}
+{$elseif defined(cpu32bitaddr)}
        aitconst_ptr = aitconst_32bit;
        aitconst_ptr = aitconst_32bit;
        aitconst_ptr_unaligned = aitconst_32bit_unaligned;
        aitconst_ptr_unaligned = aitconst_32bit_unaligned;
-{$endif cpu64bitaddr}
+{$elseif defined(cpu16bitaddr)}
+       aitconst_ptr = aitconst_16bit;
+       aitconst_ptr_unaligned = aitconst_16bit_unaligned;
+{$endif}
 
 
-{$ifdef cpu64bitalu}
+{$if defined(cpu64bitalu)}
        aitconst_aint = aitconst_64bit;
        aitconst_aint = aitconst_64bit;
-{$else cpu64bitaddr}
+{$elseif defined(cpu32bitalu)}
        aitconst_aint = aitconst_32bit;
        aitconst_aint = aitconst_32bit;
-{$endif cpu64bitaddr}
+{$elseif defined(cpu16bitalu)}
+       aitconst_aint = aitconst_16bit;
+{$elseif defined(cpu8bitalu)}
+       aitconst_aint = aitconst_8bit;
+{$endif}
 
 
        taitypestr : array[taitype] of string[24] = (
        taitypestr : array[taitype] of string[24] = (
           '<none>',
           '<none>',

+ 12 - 12
compiler/cg64f32.pas

@@ -219,10 +219,10 @@ unit cg64f32;
       begin
       begin
         if target_info.endian = endian_big then
         if target_info.endian = endian_big then
           swap64(value);
           swap64(value);
-        cg.a_load_const_ref(list,OS_32,aint(lo(value)),ref);
+        cg.a_load_const_ref(list,OS_32,tcgint(lo(value)),ref);
         tmpref := ref;
         tmpref := ref;
         inc(tmpref.offset,4);
         inc(tmpref.offset,4);
-        cg.a_load_const_ref(list,OS_32,aint(hi(value)),tmpref);
+        cg.a_load_const_ref(list,OS_32,tcgint(hi(value)),tmpref);
       end;
       end;
 
 
 
 
@@ -271,8 +271,8 @@ unit cg64f32;
     procedure tcg64f32.a_load64_const_reg(list : TAsmList;value : int64;reg : tregister64);
     procedure tcg64f32.a_load64_const_reg(list : TAsmList;value : int64;reg : tregister64);
 
 
       begin
       begin
-        cg.a_load_const_reg(list,OS_32,aint(lo(value)),reg.reglo);
-        cg.a_load_const_reg(list,OS_32,aint(hi(value)),reg.reghi);
+        cg.a_load_const_reg(list,OS_32,tcgint(lo(value)),reg.reglo);
+        cg.a_load_const_reg(list,OS_32,tcgint(hi(value)),reg.reghi);
       end;
       end;
 
 
 
 
@@ -359,9 +359,9 @@ unit cg64f32;
           swap64(a);
           swap64(a);
         tmpsref := sref;
         tmpsref := sref;
         tmpsref.bitlen := 32;
         tmpsref.bitlen := 32;
-        hlcg.a_load_const_subsetref(list,u32inttype,aint(lo(a)),tmpsref);
+        hlcg.a_load_const_subsetref(list,u32inttype,tcgint(lo(a)),tmpsref);
         inc(tmpsref.ref.offset,4);
         inc(tmpsref.ref.offset,4);
-        hlcg.a_load_const_subsetref(list,u32inttype,aint(hi(a)),tmpsref);
+        hlcg.a_load_const_subsetref(list,u32inttype,tcgint(hi(a)),tmpsref);
       end;
       end;
 
 
 
 
@@ -537,7 +537,7 @@ unit cg64f32;
           LOC_CREGISTER :
           LOC_CREGISTER :
             cg.a_load_reg_reg(list,OS_32,OS_32,l.register64.reglo,reg);
             cg.a_load_reg_reg(list,OS_32,OS_32,l.register64.reglo,reg);
           LOC_CONSTANT :
           LOC_CONSTANT :
-            cg.a_load_const_reg(list,OS_32,aint(lo(l.value64)),reg);
+            cg.a_load_const_reg(list,OS_32,tcgint(lo(l.value64)),reg);
           else
           else
             internalerror(200203244);
             internalerror(200203244);
         end;
         end;
@@ -554,7 +554,7 @@ unit cg64f32;
           LOC_CREGISTER :
           LOC_CREGISTER :
             cg.a_load_reg_reg(list,OS_32,OS_32,l.register64.reghi,reg);
             cg.a_load_reg_reg(list,OS_32,OS_32,l.register64.reghi,reg);
           LOC_CONSTANT :
           LOC_CONSTANT :
-            cg.a_load_const_reg(list,OS_32,aint(hi(l.value64)),reg);
+            cg.a_load_const_reg(list,OS_32,tcgint(hi(l.value64)),reg);
           else
           else
             internalerror(200203244);
             internalerror(200203244);
         end;
         end;
@@ -675,15 +675,15 @@ unit cg64f32;
           begin
           begin
             { Keep this order of first lo before hi to have
             { Keep this order of first lo before hi to have
               the correct push order for m68k }
               the correct push order for m68k }
-            cg.a_load_const_cgpara(list,OS_32,aint(lo(value)),tmploclo);
-            cg.a_load_const_cgpara(list,OS_32,aint(hi(value)),tmplochi);
+            cg.a_load_const_cgpara(list,OS_32,tcgint(lo(value)),tmploclo);
+            cg.a_load_const_cgpara(list,OS_32,tcgint(hi(value)),tmplochi);
           end
           end
         else
         else
           begin
           begin
             { Keep this order of first hi before lo to have
             { Keep this order of first hi before lo to have
               the correct push order for i386 }
               the correct push order for i386 }
-            cg.a_load_const_cgpara(list,OS_32,aint(hi(value)),tmplochi);
-            cg.a_load_const_cgpara(list,OS_32,aint(lo(value)),tmploclo);
+            cg.a_load_const_cgpara(list,OS_32,tcgint(hi(value)),tmplochi);
+            cg.a_load_const_cgpara(list,OS_32,tcgint(lo(value)),tmploclo);
           end;
           end;
         tmploclo.done;
         tmploclo.done;
         tmplochi.done;
         tmplochi.done;

+ 13 - 3
compiler/cgbase.pas

@@ -294,17 +294,27 @@ interface
        tvarregable2tcgloc : array[tvarregable] of tcgloc = (LOC_VOID,
        tvarregable2tcgloc : array[tvarregable] of tcgloc = (LOC_VOID,
           LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER,LOC_CREGISTER);
           LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMREGISTER,LOC_CREGISTER);
 
 
-{$ifdef cpu64bitalu}
+{$if defined(cpu64bitalu)}
        { operand size describing an unsigned value in a pair of int registers }
        { operand size describing an unsigned value in a pair of int registers }
        OS_PAIR = OS_128;
        OS_PAIR = OS_128;
        { operand size describing an signed value in a pair of int registers }
        { operand size describing an signed value in a pair of int registers }
        OS_SPAIR = OS_S128;
        OS_SPAIR = OS_S128;
-{$else cpu64bitalu}
+{$elseif defined(cpu32bitalu)}
        { operand size describing an unsigned value in a pair of int registers }
        { operand size describing an unsigned value in a pair of int registers }
        OS_PAIR = OS_64;
        OS_PAIR = OS_64;
        { operand size describing an signed value in a pair of int registers }
        { operand size describing an signed value in a pair of int registers }
        OS_SPAIR = OS_S64;
        OS_SPAIR = OS_S64;
-{$endif cpu64bitalu}
+{$elseif defined(cpu16bitalu)}
+       { operand size describing an unsigned value in a pair of int registers }
+       OS_PAIR = OS_32;
+       { operand size describing an signed value in a pair of int registers }
+       OS_SPAIR = OS_S32;
+{$elseif defined(cpu8bitalu)}
+       { operand size describing an unsigned value in a pair of int registers }
+       OS_PAIR = OS_16;
+       { operand size describing an signed value in a pair of int registers }
+       OS_SPAIR = OS_S16;
+{$endif}
 
 
        { Table to convert tcgsize variables to the correspondending
        { Table to convert tcgsize variables to the correspondending
          unsigned types }
          unsigned types }

+ 10 - 2
compiler/cgobj.pas

@@ -2100,8 +2100,16 @@ implementation
            paramanager.getintparaloc(pd,1,cgpara1);
            paramanager.getintparaloc(pd,1,cgpara1);
            paramanager.getintparaloc(pd,2,cgpara2);
            paramanager.getintparaloc(pd,2,cgpara2);
            reference_reset_symbol(hrefvmt,current_asmdata.RefAsmSymbol(objdef.vmt_mangledname),0,sizeof(pint));
            reference_reset_symbol(hrefvmt,current_asmdata.RefAsmSymbol(objdef.vmt_mangledname),0,sizeof(pint));
-           a_loadaddr_ref_cgpara(list,hrefvmt,cgpara2);
-           a_load_reg_cgpara(list,OS_ADDR,reg,cgpara1);
+           if pd.is_pushleftright then
+             begin
+               a_load_reg_cgpara(list,OS_ADDR,reg,cgpara1);
+               a_loadaddr_ref_cgpara(list,hrefvmt,cgpara2);
+             end
+           else
+             begin
+               a_loadaddr_ref_cgpara(list,hrefvmt,cgpara2);
+               a_load_reg_cgpara(list,OS_ADDR,reg,cgpara1);
+             end;
            paramanager.freecgpara(list,cgpara1);
            paramanager.freecgpara(list,cgpara1);
            paramanager.freecgpara(list,cgpara2);
            paramanager.freecgpara(list,cgpara2);
            allocallcpuregisters(list);
            allocallcpuregisters(list);

+ 1 - 5
compiler/cgutils.pas

@@ -105,11 +105,7 @@ unit cgutils;
 {$endif cpuflags}
 {$endif cpuflags}
             LOC_CONSTANT : (
             LOC_CONSTANT : (
               case longint of
               case longint of
-{$ifdef FPC_BIG_ENDIAN}
-                1 : (_valuedummy,value : aint);
-{$else FPC_BIG_ENDIAN}
-                1 : (value : aint);
-{$endif FPC_BIG_ENDIAN}
+                1 : (value : TCGInt);
                 2 : (value64 : Int64);
                 2 : (value64 : Int64);
               );
               );
             LOC_CREFERENCE,
             LOC_CREFERENCE,

+ 38 - 0
compiler/cutils.pas

@@ -29,6 +29,9 @@ unit cutils;
 
 
 interface
 interface
 
 
+  uses
+    constexp;
+
   type
   type
     Tcharset=set of char;
     Tcharset=set of char;
 
 
@@ -42,6 +45,17 @@ interface
     {# Returns the maximum value between @var(a) and @var(b) }
     {# Returns the maximum value between @var(a) and @var(b) }
     function max(a,b : longint) : longint;{$ifdef USEINLINE}inline;{$endif}
     function max(a,b : longint) : longint;{$ifdef USEINLINE}inline;{$endif}
     function max(a,b : int64) : int64;{$ifdef USEINLINE}inline;{$endif}
     function max(a,b : int64) : int64;{$ifdef USEINLINE}inline;{$endif}
+
+    { These functions are intenionally put here and not in the constexp unit.
+      Since Tconstexprint may be automatically converted to int, which causes
+      loss of data and since there are already min and max functions for ints in
+      this unit, we put min and max for Tconstexprint as well. This way we avoid
+      potential bugs, caused by code unintentionally calling the int versions of
+      min/max on Tconstexprint, because of only including cutils and forgetting
+      the constexp unit in the uses clause. }
+    function min(const a,b : Tconstexprint) : Tconstexprint;{$ifdef USEINLINE}inline;{$endif}
+    function max(const a,b : Tconstexprint) : Tconstexprint;{$ifdef USEINLINE}inline;{$endif}
+
     {# Return value @var(i) aligned on @var(a) boundary }
     {# Return value @var(i) aligned on @var(a) boundary }
     function align(i,a:longint):longint;{$ifdef USEINLINE}inline;{$endif}
     function align(i,a:longint):longint;{$ifdef USEINLINE}inline;{$endif}
     { if you have an address aligned using "oldalignment" and add an
     { if you have an address aligned using "oldalignment" and add an
@@ -190,6 +204,18 @@ implementation
       end;
       end;
 
 
 
 
+    function min(const a,b : Tconstexprint) : Tconstexprint;{$ifdef USEINLINE}inline;{$endif}
+    {
+      return the minimal of a and b
+    }
+      begin
+         if a<=b then
+           min:=a
+         else
+           min:=b;
+      end;
+
+
     function max(a,b : longint) : longint;{$ifdef USEINLINE}inline;{$endif}
     function max(a,b : longint) : longint;{$ifdef USEINLINE}inline;{$endif}
     {
     {
       return the maximum of a and b
       return the maximum of a and b
@@ -214,6 +240,18 @@ implementation
       end;
       end;
 
 
 
 
+    function max(const a,b : Tconstexprint) : Tconstexprint;{$ifdef USEINLINE}inline;{$endif}
+    {
+      return the maximum of a and b
+    }
+      begin
+         if a>=b then
+           max:=a
+         else
+           max:=b;
+      end;
+
+
     function newalignment(oldalignment: longint; offset: int64): longint;
     function newalignment(oldalignment: longint; offset: int64): longint;
       var
       var
         localoffset: longint;
         localoffset: longint;

+ 149 - 12
compiler/defutil.pas

@@ -225,15 +225,48 @@ interface
     {# Returns true, if definition is a "real" real (i.e. single/double/extended) }
     {# Returns true, if definition is a "real" real (i.e. single/double/extended) }
     function is_real(def : tdef) : boolean;
     function is_real(def : tdef) : boolean;
 
 
+    { true, if def is a 8 bit int type }
+    function is_8bitint(def : tdef) : boolean;
+
+    { true, if def is a 8 bit ordinal type }
+    function is_8bit(def : tdef) : boolean;
+
+    { true, if def is a 16 bit int type }
+    function is_16bitint(def : tdef) : boolean;
+
+    { true, if def is a 16 bit ordinal type }
+    function is_16bit(def : tdef) : boolean;
+
     {# Returns true, if def is a 32 bit integer type }
     {# Returns true, if def is a 32 bit integer type }
     function is_32bitint(def : tdef) : boolean;
     function is_32bitint(def : tdef) : boolean;
 
 
+    {# Returns true, if def is a 32 bit ordinal type }
+    function is_32bit(def : tdef) : boolean;
+
     {# Returns true, if def is a 64 bit integer type }
     {# Returns true, if def is a 64 bit integer type }
     function is_64bitint(def : tdef) : boolean;
     function is_64bitint(def : tdef) : boolean;
 
 
     {# Returns true, if def is a 64 bit type }
     {# Returns true, if def is a 64 bit type }
     function is_64bit(def : tdef) : boolean;
     function is_64bit(def : tdef) : boolean;
 
 
+    { true, if def is an int type, larger than the processor's native int size }
+    function is_oversizedint(def : tdef) : boolean;
+
+    { true, if def is an ordinal type, larger than the processor's native int size }
+    function is_oversizedord(def : tdef) : boolean;
+
+    { true, if def is an int type, equal in size to the processor's native int size }
+    function is_nativeint(def : tdef) : boolean;
+
+    { true, if def is an ordinal type, equal in size to the processor's native int size }
+    function is_nativeord(def : tdef) : boolean;
+
+    { true, if def is an unsigned int type, equal in size to the processor's native int size }
+    function is_nativeuint(def : tdef) : boolean;
+
+    { true, if def is a signed int type, equal in size to the processor's native int size }
+    function is_nativesint(def : tdef) : boolean;
+
     {# If @var(l) isn't in the range of todef a range check error (if not explicit) is generated and
     {# If @var(l) isn't in the range of todef a range check error (if not explicit) is generated and
       the value is placed within the range
       the value is placed within the range
     }
     }
@@ -288,7 +321,7 @@ interface
 implementation
 implementation
 
 
     uses
     uses
-       verbose;
+       verbose,cutils;
 
 
     { returns true, if def uses FPU }
     { returns true, if def uses FPU }
     function is_fpu(def : tdef) : boolean;
     function is_fpu(def : tdef) : boolean;
@@ -359,8 +392,10 @@ implementation
          range_to_basetype:=s32bit
          range_to_basetype:=s32bit
         else if (l>=low(cardinal)) and (h<=high(cardinal)) then
         else if (l>=low(cardinal)) and (h<=high(cardinal)) then
          range_to_basetype:=u32bit
          range_to_basetype:=u32bit
+        else if (l>=low(int64)) and (h<=high(int64)) then
+         range_to_basetype:=s64bit
         else
         else
-         range_to_basetype:=s64bit;
+         range_to_basetype:=u64bit;
       end;
       end;
 
 
 
 
@@ -788,12 +823,41 @@ implementation
       end;
       end;
 
 
 
 
+    { true, if def is a 8 bit int type }
+    function is_8bitint(def : tdef) : boolean;
+      begin
+         result:=(def.typ=orddef) and (torddef(def).ordtype in [u8bit,s8bit])
+      end;
+
+    { true, if def is a 8 bit ordinal type }
+    function is_8bit(def : tdef) : boolean;
+      begin
+         result:=(def.typ=orddef) and (torddef(def).ordtype in [u8bit,s8bit,pasbool8,bool8bit,uchar])
+      end;
+
+    { true, if def is a 16 bit int type }
+    function is_16bitint(def : tdef) : boolean;
+      begin
+         result:=(def.typ=orddef) and (torddef(def).ordtype in [u16bit,s16bit])
+      end;
+
+    { true, if def is a 16 bit ordinal type }
+    function is_16bit(def : tdef) : boolean;
+      begin
+         result:=(def.typ=orddef) and (torddef(def).ordtype in [u16bit,s16bit,pasbool16,bool16bit,uwidechar])
+      end;
+
     { true, if def is a 32 bit int type }
     { true, if def is a 32 bit int type }
     function is_32bitint(def : tdef) : boolean;
     function is_32bitint(def : tdef) : boolean;
       begin
       begin
          result:=(def.typ=orddef) and (torddef(def).ordtype in [u32bit,s32bit])
          result:=(def.typ=orddef) and (torddef(def).ordtype in [u32bit,s32bit])
       end;
       end;
 
 
+    { true, if def is a 32 bit ordinal type }
+    function is_32bit(def: tdef): boolean;
+      begin
+         result:=(def.typ=orddef) and (torddef(def).ordtype in [u32bit,s32bit,pasbool32,bool32bit])
+      end;
 
 
     { true, if def is a 64 bit int type }
     { true, if def is a 64 bit int type }
     function is_64bitint(def : tdef) : boolean;
     function is_64bitint(def : tdef) : boolean;
@@ -809,6 +873,75 @@ implementation
       end;
       end;
 
 
 
 
+    { true, if def is an int type, larger than the processor's native int size }
+    function is_oversizedint(def : tdef) : boolean;
+      begin
+{$if defined(cpu8bitalu)}
+         result:=is_64bitint(def) or is_32bitint(def) or is_16bitint(def);
+{$elseif defined(cpu16bitalu)}
+         result:=is_64bitint(def) or is_32bitint(def);
+{$elseif defined(cpu32bitaddr)}
+         result:=is_64bitint(def);
+{$elseif defined(cpu64bitaddr)}
+         result:=false;
+{$endif}
+      end;
+
+    { true, if def is an ordinal type, larger than the processor's native int size }
+    function is_oversizedord(def : tdef) : boolean;
+      begin
+{$if defined(cpu8bitalu)}
+         result:=is_64bit(def) or is_32bit(def) or is_16bit(def);
+{$elseif defined(cpu16bitalu)}
+         result:=is_64bit(def) or is_32bit(def);
+{$elseif defined(cpu32bitaddr)}
+         result:=is_64bit(def);
+{$elseif defined(cpu64bitaddr)}
+         result:=false;
+{$endif}
+      end;
+
+
+    { true, if def is an int type, equal in size to the processor's native int size }
+    function is_nativeint(def: tdef): boolean;
+      begin
+{$if defined(cpu8bitalu)}
+         result:=is_8bitint(def);
+{$elseif defined(cpu16bitalu)}
+         result:=is_16bitint(def);
+{$elseif defined(cpu32bitaddr)}
+         result:=is_32bitint(def);
+{$elseif defined(cpu64bitaddr)}
+         result:=is_64bitint(def);
+{$endif}
+      end;
+
+    { true, if def is an ordinal type, equal in size to the processor's native int size }
+    function is_nativeord(def: tdef): boolean;
+      begin
+{$if defined(cpu8bitalu)}
+         result:=is_8bit(def);
+{$elseif defined(cpu16bitalu)}
+         result:=is_16bit(def);
+{$elseif defined(cpu32bitaddr)}
+         result:=is_32bit(def);
+{$elseif defined(cpu64bitaddr)}
+         result:=is_64bit(def);
+{$endif}
+      end;
+
+    { true, if def is an unsigned int type, equal in size to the processor's native int size }
+    function is_nativeuint(def: tdef): boolean;
+      begin
+         result:=is_nativeint(def) and (def.typ=orddef) and (torddef(def).ordtype in [u64bit,u32bit,u16bit,u8bit]);
+      end;
+
+    { true, if def is a signed int type, equal in size to the processor's native int size }
+    function is_nativesint(def: tdef): boolean;
+      begin
+         result:=is_nativeint(def) and (def.typ=orddef) and (torddef(def).ordtype in [s64bit,s32bit,s16bit,s8bit]);
+      end;
+
     { if l isn't in the range of todef a range check error (if not explicit) is generated and
     { if l isn't in the range of todef a range check error (if not explicit) is generated and
       the value is placed within the range }
       the value is placed within the range }
     procedure testrange(todef : tdef;var l : tconstexprint;explicit,forcerangecheck:boolean);
     procedure testrange(todef : tdef;var l : tconstexprint;explicit,forcerangecheck:boolean);
@@ -1042,13 +1175,15 @@ implementation
           procvardef:
           procvardef:
             begin
             begin
               if not tprocvardef(def).is_addressonly then
               if not tprocvardef(def).is_addressonly then
-                {$if sizeof(pint) = 4}
+                {$if sizeof(pint) = 2}
+                  result:=OS_32
+                {$elseif sizeof(pint) = 4}
                   result:=OS_64
                   result:=OS_64
-                {$else} {$if sizeof(pint) = 8}
+                {$elseif sizeof(pint) = 8}
                   result:=OS_128
                   result:=OS_128
                 {$else}
                 {$else}
                   internalerror(200707141)
                   internalerror(200707141)
-                {$endif} {$endif}
+                {$endif}
               else
               else
                 result:=OS_ADDR;
                 result:=OS_ADDR;
             end;
             end;
@@ -1117,7 +1252,13 @@ implementation
     {# returns true, if the type passed is a varset }
     {# returns true, if the type passed is a varset }
     function is_smallset(p : tdef) : boolean;
     function is_smallset(p : tdef) : boolean;
       begin
       begin
-        result:=(p.typ=setdef) and (p.size in [1,2,4])
+        {$if defined(cpu8bitalu)}
+          result:=(p.typ=setdef) and (p.size = 1)
+        {$elseif defined(cpu16bitalu)}
+          result:=(p.typ=setdef) and (p.size in [1,2])
+        {$else}
+          result:=(p.typ=setdef) and (p.size in [1,2,4])
+        {$endif}
       end;
       end;
 
 
 
 
@@ -1133,12 +1274,8 @@ implementation
       var
       var
         llow, lhigh: tconstexprint;
         llow, lhigh: tconstexprint;
       begin
       begin
-        llow:=rd.low;
-        if llow<ld.low then
-          llow:=ld.low;
-        lhigh:=rd.high;
-        if lhigh<ld.high then
-          lhigh:=ld.high;
+        llow:=min(ld.low,rd.low);
+        lhigh:=max(ld.high,rd.high);
         case range_to_basetype(llow,lhigh) of
         case range_to_basetype(llow,lhigh) of
           s8bit:
           s8bit:
             result:=torddef(s8inttype);
             result:=torddef(s8inttype);

+ 17 - 0
compiler/fpcdefs.inc

@@ -42,6 +42,23 @@
   {$packrecords c}
   {$packrecords c}
 {$endif cpuarm}
 {$endif cpuarm}
 
 
+{$ifdef i8086}
+  {$define cpu16bit}
+  {$define cpu16bitaddr}
+  {$define cpu16bitalu}
+  {$define x86}
+  {$define cpuflags}
+  {$define cpuextended}
+  {//$define SUPPORT_MMX}
+  {$define cpumm}
+  {$define fewintregisters}
+  {$define cpurox}
+  {$define SUPPORT_SAFECALL}
+  {$define cpuneedsmulhelper}
+  { TODO: add another define in order to disable the div helper for 16-bit divs? }
+  {$define cpuneedsdiv32helper}
+{$endif i8086}
+
 {$ifdef i386}
 {$ifdef i386}
   {$define cpu32bit}
   {$define cpu32bit}
   {$define cpu32bitaddr}
   {$define cpu32bitaddr}

+ 5 - 0
compiler/globals.pas

@@ -460,6 +460,11 @@ interface
         optimizecputype : cpu_armv8;
         optimizecputype : cpu_armv8;
         fputype : fpu_vfp;
         fputype : fpu_vfp;
   {$endif aarch64}
   {$endif aarch64}
+  {$ifdef i8086}
+        cputype : cpu_8086;
+        optimizecputype : cpu_8086;
+        fputype : fpu_x87;
+  {$endif i8086}
 {$endif not GENERIC_CPU}
 {$endif not GENERIC_CPU}
         asmmode : asmmode_standard;
         asmmode : asmmode_standard;
 {$ifndef jvm}
 {$ifndef jvm}

+ 5 - 1
compiler/globtype.pas

@@ -41,6 +41,8 @@ interface
 {$endif symansistr}
 {$endif symansistr}
        PSymStr = ^TSymStr;
        PSymStr = ^TSymStr;
 
 
+       Int32 = Longint;
+
        { Integer type corresponding to pointer size }
        { Integer type corresponding to pointer size }
 {$ifdef cpu64bitaddr}
 {$ifdef cpu64bitaddr}
        PUint = qword;
        PUint = qword;
@@ -488,7 +490,9 @@ interface
          );
          );
 
 
        { Default calling convention }
        { Default calling convention }
-{$ifdef x86}
+{$if defined(i8086)}
+       pocall_default = pocall_pascal;
+{$elseif defined(i386) or defined(x86_64)}
        pocall_default = pocall_register;
        pocall_default = pocall_register;
 {$else}
 {$else}
        pocall_default = pocall_stdcall;
        pocall_default = pocall_stdcall;

+ 34 - 29
compiler/hlcg2ll.pas

@@ -112,7 +112,7 @@ unit hlcg2ll;
              @param(a value of constant to send)
              @param(a value of constant to send)
              @param(cgpara where the parameter will be stored)
              @param(cgpara where the parameter will be stored)
           }
           }
-          procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : aint;const cgpara : TCGPara);override;
+          procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : tcgint;const cgpara : TCGPara);override;
           {# Pass the value of a parameter, which is located in memory, to a routine.
           {# Pass the value of a parameter, which is located in memory, to a routine.
 
 
              A generic version is provided. This routine should
              A generic version is provided. This routine should
@@ -160,9 +160,9 @@ unit hlcg2ll;
           function a_call_name_static(list : TAsmList;pd : tprocdef;const s : TSymStr; forceresdef: tdef): tcgpara;override;
           function a_call_name_static(list : TAsmList;pd : tprocdef;const s : TSymStr; forceresdef: tdef): tcgpara;override;
 
 
           { move instructions }
           { move instructions }
-          procedure a_load_const_reg(list : TAsmList;tosize : tdef;a : aint;register : tregister);override;
-          procedure a_load_const_ref(list : TAsmList;tosize : tdef;a : aint;const ref : treference);override;
-          procedure a_load_const_loc(list : TAsmList;tosize : tdef;a : aint;const loc : tlocation);override;
+          procedure a_load_const_reg(list : TAsmList;tosize : tdef;a : tcgint;register : tregister);override;
+          procedure a_load_const_ref(list : TAsmList;tosize : tdef;a : tcgint;const ref : treference);override;
+          procedure a_load_const_loc(list : TAsmList;tosize : tdef;a : tcgint;const loc : tlocation);override;
           procedure a_load_reg_ref(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);override;
           procedure a_load_reg_ref(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);override;
           procedure a_load_reg_ref_unaligned(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);override;
           procedure a_load_reg_ref_unaligned(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);override;
           procedure a_load_reg_reg(list : TAsmList;fromsize, tosize : tdef;reg1,reg2 : tregister);override;
           procedure a_load_reg_reg(list : TAsmList;fromsize, tosize : tdef;reg1,reg2 : tregister);override;
@@ -214,9 +214,9 @@ unit hlcg2ll;
           { the op_reg_reg, op_reg_ref or op_reg_loc methods and keep in mind   }
           { the op_reg_reg, op_reg_ref or op_reg_loc methods and keep in mind   }
           { that in this case the *second* operand is used as both source and   }
           { that in this case the *second* operand is used as both source and   }
           { destination (JM)                                                    }
           { destination (JM)                                                    }
-          procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: tdef; a: Aint; reg: TRegister); override;
-          procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: tdef; a: Aint; const ref: TReference); override;
-          procedure a_op_const_loc(list : TAsmList; Op: TOpCG; size: tdef; a: Aint; const loc: tlocation);override;
+          procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: tdef; a: tcgint; reg: TRegister); override;
+          procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: tdef; a: tcgint; const ref: TReference); override;
+          procedure a_op_const_loc(list : TAsmList; Op: TOpCG; size: tdef; a: tcgint; const loc: tlocation);override;
           procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: tdef; reg1, reg2: TRegister); override;
           procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: tdef; reg1, reg2: TRegister); override;
           procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: tdef; reg: TRegister; const ref: TReference); override;
           procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: tdef; reg: TRegister; const ref: TReference); override;
           procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: tdef; const ref: TReference; reg: TRegister); override;
           procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: tdef; const ref: TReference; reg: TRegister); override;
@@ -226,17 +226,17 @@ unit hlcg2ll;
           { trinary operations for processors that support them, 'emulated' }
           { trinary operations for processors that support them, 'emulated' }
           { on others. None with "ref" arguments since I don't think there  }
           { on others. None with "ref" arguments since I don't think there  }
           { are any processors that support it (JM)                         }
           { are any processors that support it (JM)                         }
-          procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister); override;
+          procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister); override;
           procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister); override;
           procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister); override;
-          procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
+          procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
           procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
           procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
 
 
           {  comparison operations }
           {  comparison operations }
-          procedure a_cmp_const_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : aint;reg : tregister;
+          procedure a_cmp_const_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : tcgint;reg : tregister;
             l : tasmlabel);override;
             l : tasmlabel);override;
-          procedure a_cmp_const_ref_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : aint;const ref : treference;
+          procedure a_cmp_const_ref_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : tcgint;const ref : treference;
             l : tasmlabel); override;
             l : tasmlabel); override;
-          procedure a_cmp_const_loc_label(list: TAsmList; size: tdef;cmp_op: topcmp; a: aint; const loc: tlocation;
+          procedure a_cmp_const_loc_label(list: TAsmList; size: tdef;cmp_op: topcmp; a: tcgint; const loc: tlocation;
             l : tasmlabel);override;
             l : tasmlabel);override;
           procedure a_cmp_reg_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
           procedure a_cmp_reg_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
           procedure a_cmp_ref_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp; const ref: treference; reg : tregister; l : tasmlabel); override;
           procedure a_cmp_ref_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp; const ref: treference; reg : tregister; l : tasmlabel); override;
@@ -436,7 +436,7 @@ implementation
       cg.a_load_reg_cgpara(list,def_cgsize(size),r,cgpara);
       cg.a_load_reg_cgpara(list,def_cgsize(size),r,cgpara);
     end;
     end;
 
 
-  procedure thlcg2ll.a_load_const_cgpara(list: TAsmList; tosize: tdef; a: aint; const cgpara: TCGPara);
+  procedure thlcg2ll.a_load_const_cgpara(list: TAsmList; tosize: tdef; a: tcgint; const cgpara: TCGPara);
     begin
     begin
       cg.a_load_const_cgpara(list,def_cgsize(tosize),a,cgpara);
       cg.a_load_const_cgpara(list,def_cgsize(tosize),a,cgpara);
     end;
     end;
@@ -478,17 +478,17 @@ implementation
       result:=get_call_result_cgpara(pd,forceresdef);
       result:=get_call_result_cgpara(pd,forceresdef);
     end;
     end;
 
 
-  procedure thlcg2ll.a_load_const_reg(list: TAsmList; tosize: tdef; a: aint; register: tregister);
+  procedure thlcg2ll.a_load_const_reg(list: TAsmList; tosize: tdef; a: tcgint; register: tregister);
     begin
     begin
       cg.a_load_const_reg(list,def_cgsize(tosize),a,register);
       cg.a_load_const_reg(list,def_cgsize(tosize),a,register);
     end;
     end;
 
 
-  procedure thlcg2ll.a_load_const_ref(list: TAsmList; tosize: tdef; a: aint; const ref: treference);
+  procedure thlcg2ll.a_load_const_ref(list: TAsmList; tosize: tdef; a: tcgint; const ref: treference);
     begin
     begin
        cg.a_load_const_ref(list,def_cgsize(tosize),a,ref);
        cg.a_load_const_ref(list,def_cgsize(tosize),a,ref);
     end;
     end;
 
 
-  procedure thlcg2ll.a_load_const_loc(list: TAsmList; tosize: tdef; a: aint; const loc: tlocation);
+  procedure thlcg2ll.a_load_const_loc(list: TAsmList; tosize: tdef; a: tcgint; const loc: tlocation);
     begin
     begin
       case loc.loc of
       case loc.loc of
         LOC_SUBSETREG,LOC_CSUBSETREG,
         LOC_SUBSETREG,LOC_CSUBSETREG,
@@ -746,17 +746,17 @@ implementation
       cg.a_loadmm_reg_intreg(list,def_cgsize(fromsize),def_cgsize(tosize),mmreg,intreg,shuffle);
       cg.a_loadmm_reg_intreg(list,def_cgsize(fromsize),def_cgsize(tosize),mmreg,intreg,shuffle);
     end;
     end;
 *)
 *)
-  procedure thlcg2ll.a_op_const_reg(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; reg: TRegister);
+  procedure thlcg2ll.a_op_const_reg(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; reg: TRegister);
     begin
     begin
       cg.a_op_const_reg(list,op,def_cgsize(size),a,reg);
       cg.a_op_const_reg(list,op,def_cgsize(size),a,reg);
     end;
     end;
 
 
-  procedure thlcg2ll.a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; const ref: TReference);
+  procedure thlcg2ll.a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; const ref: TReference);
     begin
     begin
       cg.a_op_const_ref(list,op,def_cgsize(size),a,ref);
       cg.a_op_const_ref(list,op,def_cgsize(size),a,ref);
     end;
     end;
 
 
-  procedure thlcg2ll.a_op_const_loc(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; const loc: tlocation);
+  procedure thlcg2ll.a_op_const_loc(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; const loc: tlocation);
     begin
     begin
 {$ifdef extdebug}
 {$ifdef extdebug}
       if def_cgsize(size)<>loc.size then
       if def_cgsize(size)<>loc.size then
@@ -816,7 +816,7 @@ implementation
       end;
       end;
     end;
     end;
 
 
-  procedure thlcg2ll.a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister);
+  procedure thlcg2ll.a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister);
     begin
     begin
       cg.a_op_const_reg_reg(list,op,def_cgsize(size),a,src,dst);
       cg.a_op_const_reg_reg(list,op,def_cgsize(size),a,src,dst);
     end;
     end;
@@ -826,7 +826,7 @@ implementation
       cg.a_op_reg_reg_reg(list,op,def_cgsize(size),src1,src2,dst);
       cg.a_op_reg_reg_reg(list,op,def_cgsize(size),src1,src2,dst);
     end;
     end;
 
 
-  procedure thlcg2ll.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
+  procedure thlcg2ll.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
     begin
     begin
       cg.a_op_const_reg_reg_checkoverflow(list,op,def_cgsize(size),a,src,dst,setflags,ovloc);
       cg.a_op_const_reg_reg_checkoverflow(list,op,def_cgsize(size),a,src,dst,setflags,ovloc);
     end;
     end;
@@ -836,17 +836,17 @@ implementation
       cg.a_op_reg_reg_reg_checkoverflow(list,op,def_cgsize(size),src1,src2,dst,setflags,ovloc);
       cg.a_op_reg_reg_reg_checkoverflow(list,op,def_cgsize(size),src1,src2,dst,setflags,ovloc);
     end;
     end;
 
 
-  procedure thlcg2ll.a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; reg: tregister; l: tasmlabel);
+  procedure thlcg2ll.a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);
     begin
     begin
       cg.a_cmp_const_reg_label(list,def_cgsize(size),cmp_op,a,reg,l);
       cg.a_cmp_const_reg_label(list,def_cgsize(size),cmp_op,a,reg,l);
     end;
     end;
 
 
-  procedure thlcg2ll.a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; const ref: treference; l: tasmlabel);
+  procedure thlcg2ll.a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; const ref: treference; l: tasmlabel);
     begin
     begin
       cg.a_cmp_const_ref_label(list,def_cgsize(size),cmp_op,a,ref,l);
       cg.a_cmp_const_ref_label(list,def_cgsize(size),cmp_op,a,ref,l);
     end;
     end;
 
 
-  procedure thlcg2ll.a_cmp_const_loc_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; const loc: tlocation; l: tasmlabel);
+  procedure thlcg2ll.a_cmp_const_loc_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; const loc: tlocation; l: tasmlabel);
     begin
     begin
       case loc.loc of
       case loc.loc of
         LOC_SUBSETREG,LOC_CSUBSETREG,
         LOC_SUBSETREG,LOC_CSUBSETREG,
@@ -996,14 +996,14 @@ implementation
             { load a smaller size to OS_64 }
             { load a smaller size to OS_64 }
             if l.loc=LOC_REGISTER then
             if l.loc=LOC_REGISTER then
              begin
              begin
-{$ifdef AVR}
+{$if defined(cpu8bitalu) or defined(cpu16bitalu)}
                { on avr, we cannot change the size of a register
                { on avr, we cannot change the size of a register
                  due to the nature how register with size > OS8 are handled
                  due to the nature how register with size > OS8 are handled
                }
                }
                hregister:=cg.getintregister(list,OS_32);
                hregister:=cg.getintregister(list,OS_32);
-{$else AVR}
+{$else}
                hregister:=cg.makeregsize(list,l.register64.reglo,OS_32);
                hregister:=cg.makeregsize(list,l.register64.reglo,OS_32);
-{$endif AVR}
+{$endif}
                cg.a_load_reg_reg(list,l.size,OS_32,l.register64.reglo,hregister);
                cg.a_load_reg_reg(list,l.size,OS_32,l.register64.reglo,hregister);
              end
              end
             else
             else
@@ -1028,7 +1028,7 @@ implementation
                   cg.a_label(list,hl);
                   cg.a_label(list,hl);
                 end;
                 end;
               else
               else
-                a_load_loc_reg(list,src_size,osuinttype,l,hregister);
+                a_load_loc_reg(list,src_size,u32inttype,l,hregister);
             end;
             end;
             { reset hi part, take care of the signed bit of the current value }
             { reset hi part, take care of the signed bit of the current value }
             hregisterhi:=cg.getintregister(list,OS_32);
             hregisterhi:=cg.getintregister(list,OS_32);
@@ -1127,7 +1127,12 @@ implementation
                 if (TCGSize2Size[dst_cgsize]<TCGSize2Size[l.size]) then
                 if (TCGSize2Size[dst_cgsize]<TCGSize2Size[l.size]) then
                  begin
                  begin
                    if (l.loc in [LOC_REGISTER,LOC_CREGISTER]) then
                    if (l.loc in [LOC_REGISTER,LOC_CREGISTER]) then
-                     l.register:=cg.makeregsize(list,l.register,dst_cgsize);
+                     begin
+{$if defined(cpu8bitalu) or defined(cpu16bitalu)}
+                       if TCGSize2Size[dst_cgsize]<=TCGSize2Size[OS_INT] then
+{$endif}
+                         l.register:=cg.makeregsize(list,l.register,dst_cgsize);
+                     end;
                    { for big endian systems, the reference's offset must }
                    { for big endian systems, the reference's offset must }
                    { be increased in this case, since they have the      }
                    { be increased in this case, since they have the      }
                    { MSB first in memory and e.g. byte(word_var) should  }
                    { MSB first in memory and e.g. byte(word_var) should  }

+ 120 - 55
compiler/hlcgobj.pas

@@ -133,7 +133,7 @@ unit hlcgobj;
              @param(a value of constant to send)
              @param(a value of constant to send)
              @param(cgpara where the parameter will be stored)
              @param(cgpara where the parameter will be stored)
           }
           }
-          procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : aint;const cgpara : TCGPara);virtual;
+          procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : tcgint;const cgpara : TCGPara);virtual;
           {# Pass the value of a parameter, which is located in memory, to a routine.
           {# Pass the value of a parameter, which is located in memory, to a routine.
 
 
              A generic version is provided. This routine should
              A generic version is provided. This routine should
@@ -205,9 +205,9 @@ unit hlcgobj;
           procedure a_call_name_inherited(list : TAsmList;pd : tprocdef;const s : TSymStr);virtual;
           procedure a_call_name_inherited(list : TAsmList;pd : tprocdef;const s : TSymStr);virtual;
 
 
           { move instructions }
           { move instructions }
-          procedure a_load_const_reg(list : TAsmList;tosize : tdef;a : aint;register : tregister);virtual;abstract;
-          procedure a_load_const_ref(list : TAsmList;tosize : tdef;a : aint;const ref : treference);virtual;
-          procedure a_load_const_loc(list : TAsmList;tosize : tdef;a : aint;const loc : tlocation);virtual;
+          procedure a_load_const_reg(list : TAsmList;tosize : tdef;a : tcgint;register : tregister);virtual;abstract;
+          procedure a_load_const_ref(list : TAsmList;tosize : tdef;a : tcgint;const ref : treference);virtual;
+          procedure a_load_const_loc(list : TAsmList;tosize : tdef;a : tcgint;const loc : tlocation);virtual;
           procedure a_load_reg_ref(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);virtual;abstract;
           procedure a_load_reg_ref(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);virtual;abstract;
           procedure a_load_reg_ref_unaligned(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);virtual;
           procedure a_load_reg_ref_unaligned(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);virtual;
           procedure a_load_reg_reg(list : TAsmList;fromsize, tosize : tdef;reg1,reg2 : tregister);virtual;abstract;
           procedure a_load_reg_reg(list : TAsmList;fromsize, tosize : tdef;reg1,reg2 : tregister);virtual;abstract;
@@ -229,7 +229,7 @@ unit hlcgobj;
           procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize : tdef; const fromsreg, tosreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize : tdef; const fromsreg, tosreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_ref(list : TAsmList; fromsubsetsize, tosize: tdef; const sreg: tsubsetregister; const destref: treference); virtual;
           procedure a_load_subsetreg_ref(list : TAsmList; fromsubsetsize, tosize: tdef; const sreg: tsubsetregister; const destref: treference); virtual;
           procedure a_load_ref_subsetreg(list : TAsmList; fromsize, tosubsetsize: tdef; const fromref: treference; const sreg: tsubsetregister); virtual;
           procedure a_load_ref_subsetreg(list : TAsmList; fromsize, tosubsetsize: tdef; const fromref: treference; const sreg: tsubsetregister); virtual;
-          procedure a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: aint; const sreg: tsubsetregister); virtual;
+          procedure a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: tcgint; const sreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_loc(list: TAsmlist; fromsubsetsize, tosize: tdef; const sreg: tsubsetregister; const loc: tlocation); virtual;
           procedure a_load_subsetreg_loc(list: TAsmlist; fromsubsetsize, tosize: tdef; const sreg: tsubsetregister; const loc: tlocation); virtual;
 
 
           procedure a_load_subsetref_reg(list : TAsmList; fromsubsetsize, tosize: tdef; const sref: tsubsetreference; destreg: tregister); virtual;
           procedure a_load_subsetref_reg(list : TAsmList; fromsubsetsize, tosize: tdef; const sref: tsubsetreference; destreg: tregister); virtual;
@@ -253,12 +253,12 @@ unit hlcgobj;
 
 
           { bit set/clear instructions }
           { bit set/clear instructions }
           procedure a_bit_set_reg_reg(list : TAsmList; doset: boolean; bitnumbersize, destsize: tdef; bitnumber,dest: tregister); virtual;
           procedure a_bit_set_reg_reg(list : TAsmList; doset: boolean; bitnumbersize, destsize: tdef; bitnumber,dest: tregister); virtual;
-          procedure a_bit_set_const_ref(list: TAsmList; doset: boolean;destsize: tdef; bitnumber: aint; const ref: treference); virtual;
-          procedure a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: aint; destreg: tregister); virtual;
-          procedure a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: aint; const destreg: tsubsetregister); virtual;
+          procedure a_bit_set_const_ref(list: TAsmList; doset: boolean;destsize: tdef; bitnumber: tcgint; const ref: treference); virtual;
+          procedure a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: tcgint; destreg: tregister); virtual;
+          procedure a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: tcgint; const destreg: tsubsetregister); virtual;
           procedure a_bit_set_reg_ref(list: TAsmList; doset: boolean; fromsize, tosize: tdef; bitnumber: tregister; const ref: treference); virtual;
           procedure a_bit_set_reg_ref(list: TAsmList; doset: boolean; fromsize, tosize: tdef; bitnumber: tregister; const ref: treference); virtual;
           procedure a_bit_set_reg_loc(list: TAsmList; doset: boolean; regsize, tosize: tdef; bitnumber: tregister; const loc: tlocation);virtual;
           procedure a_bit_set_reg_loc(list: TAsmList; doset: boolean; regsize, tosize: tdef; bitnumber: tregister; const loc: tlocation);virtual;
-          procedure a_bit_set_const_loc(list: TAsmList; doset: boolean; tosize: tdef; bitnumber: aint; const loc: tlocation);virtual;
+          procedure a_bit_set_const_loc(list: TAsmList; doset: boolean; tosize: tdef; bitnumber: tcgint; const loc: tlocation);virtual;
 
 
          protected
          protected
            function  get_call_result_cgpara(pd: tprocdef; forceresdef: tdef): tcgpara;
            function  get_call_result_cgpara(pd: tprocdef; forceresdef: tdef): tcgpara;
@@ -319,11 +319,11 @@ unit hlcgobj;
           { the op_reg_reg, op_reg_ref or op_reg_loc methods and keep in mind   }
           { the op_reg_reg, op_reg_ref or op_reg_loc methods and keep in mind   }
           { that in this case the *second* operand is used as both source and   }
           { that in this case the *second* operand is used as both source and   }
           { destination (JM)                                                    }
           { destination (JM)                                                    }
-          procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: tdef; a: Aint; reg: TRegister); virtual; abstract;
-          procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: tdef; a: Aint; const ref: TReference); virtual;
-          procedure a_op_const_subsetreg(list : TAsmList; Op : TOpCG; size, subsetsize : tdef; a : aint; const sreg: tsubsetregister); virtual;
-          procedure a_op_const_subsetref(list : TAsmList; Op : TOpCG; size, subsetsize : tdef; a : aint; const sref: tsubsetreference); virtual;
-          procedure a_op_const_loc(list : TAsmList; Op: TOpCG; size: tdef; a: Aint; const loc: tlocation);virtual;
+          procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: tdef; a: tcgint; reg: TRegister); virtual; abstract;
+          procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: tdef; a: tcgint; const ref: TReference); virtual;
+          procedure a_op_const_subsetreg(list : TAsmList; Op : TOpCG; size, subsetsize : tdef; a : tcgint; const sreg: tsubsetregister); virtual;
+          procedure a_op_const_subsetref(list : TAsmList; Op : TOpCG; size, subsetsize : tdef; a : tcgint; const sref: tsubsetreference); virtual;
+          procedure a_op_const_loc(list : TAsmList; Op: TOpCG; size: tdef; a: tcgint; const loc: tlocation);virtual;
           procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: tdef; reg1, reg2: TRegister); virtual; abstract;
           procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: tdef; reg1, reg2: TRegister); virtual; abstract;
           procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: tdef; reg: TRegister; const ref: TReference); virtual;
           procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: tdef; reg: TRegister; const ref: TReference); virtual;
           procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: tdef; const ref: TReference; reg: TRegister); virtual;
           procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: tdef; const ref: TReference; reg: TRegister); virtual;
@@ -335,17 +335,17 @@ unit hlcgobj;
           { trinary operations for processors that support them, 'emulated' }
           { trinary operations for processors that support them, 'emulated' }
           { on others. None with "ref" arguments since I don't think there  }
           { on others. None with "ref" arguments since I don't think there  }
           { are any processors that support it (JM)                         }
           { are any processors that support it (JM)                         }
-          procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister); virtual;
+          procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister); virtual;
           procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister); virtual;
           procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister); virtual;
-          procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
+          procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
           procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
           procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
 
 
           {  comparison operations }
           {  comparison operations }
-          procedure a_cmp_const_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : aint;reg : tregister;
+          procedure a_cmp_const_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : tcgint;reg : tregister;
             l : tasmlabel);virtual;
             l : tasmlabel);virtual;
-          procedure a_cmp_const_ref_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : aint;const ref : treference;
+          procedure a_cmp_const_ref_label(list : TAsmList;size : tdef;cmp_op : topcmp;a : tcgint;const ref : treference;
             l : tasmlabel); virtual;
             l : tasmlabel); virtual;
-          procedure a_cmp_const_loc_label(list: TAsmList; size: tdef;cmp_op: topcmp; a: aint; const loc: tlocation;
+          procedure a_cmp_const_loc_label(list: TAsmList; size: tdef;cmp_op: topcmp; a: tcgint; const loc: tlocation;
             l : tasmlabel);virtual;
             l : tasmlabel);virtual;
           procedure a_cmp_reg_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); virtual; abstract;
           procedure a_cmp_reg_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); virtual; abstract;
           procedure a_cmp_ref_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp; const ref: treference; reg : tregister; l : tasmlabel); virtual;
           procedure a_cmp_ref_reg_label(list : TAsmList;size : tdef;cmp_op : topcmp; const ref: treference; reg : tregister; l : tasmlabel); virtual;
@@ -787,7 +787,7 @@ implementation
       end;
       end;
     end;
     end;
 
 
-  procedure thlcgobj.a_load_const_cgpara(list: TAsmList; tosize: tdef; a: aint; const cgpara: TCGPara);
+  procedure thlcgobj.a_load_const_cgpara(list: TAsmList; tosize: tdef; a: tcgint; const cgpara: TCGPara);
     var
     var
        ref : treference;
        ref : treference;
     begin
     begin
@@ -901,7 +901,7 @@ implementation
         a_call_name(list,pd,s,nil,false);
         a_call_name(list,pd,s,nil,false);
       end;
       end;
 
 
-  procedure thlcgobj.a_load_const_ref(list: TAsmList; tosize: tdef; a: aint; const ref: treference);
+  procedure thlcgobj.a_load_const_ref(list: TAsmList; tosize: tdef; a: tcgint; const ref: treference);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -910,7 +910,7 @@ implementation
       a_load_reg_ref(list,tosize,tosize,tmpreg,ref);
       a_load_reg_ref(list,tosize,tosize,tmpreg,ref);
     end;
     end;
 
 
-  procedure thlcgobj.a_load_const_loc(list: TAsmList; tosize: tdef; a: aint; const loc: tlocation);
+  procedure thlcgobj.a_load_const_loc(list: TAsmList; tosize: tdef; a: tcgint; const loc: tlocation);
     begin
     begin
       case loc.loc of
       case loc.loc of
         LOC_REFERENCE,LOC_CREFERENCE:
         LOC_REFERENCE,LOC_CREFERENCE:
@@ -1146,7 +1146,7 @@ implementation
       a_load_reg_subsetreg(list,tosubsetsize,tosubsetsize,tmpreg,sreg);
       a_load_reg_subsetreg(list,tosubsetsize,tosubsetsize,tmpreg,sreg);
     end;
     end;
 
 
-  procedure thlcgobj.a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: aint; const sreg: tsubsetregister);
+  procedure thlcgobj.a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: tcgint; const sreg: tsubsetregister);
     var
     var
       subsetregdef: torddef;
       subsetregdef: torddef;
       bitmask: aword;
       bitmask: aword;
@@ -1505,17 +1505,17 @@ implementation
         end;
         end;
     end;
     end;
 
 
-  procedure thlcgobj.a_bit_set_const_ref(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: aint; const ref: treference);
+  procedure thlcgobj.a_bit_set_const_ref(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: tcgint; const ref: treference);
     begin
     begin
       a_load_const_subsetref(list,u8inttype,ord(doset),get_bit_const_ref_sref(bitnumber,destsize,ref));
       a_load_const_subsetref(list,u8inttype,ord(doset),get_bit_const_ref_sref(bitnumber,destsize,ref));
     end;
     end;
 
 
-  procedure thlcgobj.a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: aint; destreg: tregister);
+  procedure thlcgobj.a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: tcgint; destreg: tregister);
     begin
     begin
       a_load_const_subsetreg(list,u8inttype,ord(doset),get_bit_const_reg_sreg(destsize,bitnumber,destreg));
       a_load_const_subsetreg(list,u8inttype,ord(doset),get_bit_const_reg_sreg(destsize,bitnumber,destreg));
     end;
     end;
 
 
-  procedure thlcgobj.a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: aint; const destreg: tsubsetregister);
+  procedure thlcgobj.a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tdef; bitnumber: tcgint; const destreg: tsubsetregister);
     var
     var
       tmpsreg: tsubsetregister;
       tmpsreg: tsubsetregister;
     begin
     begin
@@ -1559,7 +1559,7 @@ implementation
       end;
       end;
     end;
     end;
 
 
-  procedure thlcgobj.a_bit_set_const_loc(list: TAsmList; doset: boolean; tosize: tdef; bitnumber: aint; const loc: tlocation);
+  procedure thlcgobj.a_bit_set_const_loc(list: TAsmList; doset: boolean; tosize: tdef; bitnumber: tcgint; const loc: tlocation);
     begin
     begin
       case loc.loc of
       case loc.loc of
         LOC_REFERENCE:
         LOC_REFERENCE:
@@ -2435,7 +2435,7 @@ implementation
       cg.a_loadmm_reg_intreg(list,def_cgsize(fromsize),def_cgsize(tosize),mmreg,intreg,shuffle);
       cg.a_loadmm_reg_intreg(list,def_cgsize(fromsize),def_cgsize(tosize),mmreg,intreg,shuffle);
     end;
     end;
 *)
 *)
-  procedure thlcgobj.a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; const ref: TReference);
+  procedure thlcgobj.a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; const ref: TReference);
     var
     var
       tmpreg : tregister;
       tmpreg : tregister;
     begin
     begin
@@ -2445,7 +2445,7 @@ implementation
       a_load_reg_ref(list,size,size,tmpreg,ref);
       a_load_reg_ref(list,size,size,tmpreg,ref);
     end;
     end;
 
 
-  procedure thlcgobj.a_op_const_subsetreg(list: TAsmList; Op: TOpCG; size, subsetsize: tdef; a: aint; const sreg: tsubsetregister);
+  procedure thlcgobj.a_op_const_subsetreg(list: TAsmList; Op: TOpCG; size, subsetsize: tdef; a: tcgint; const sreg: tsubsetregister);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -2455,7 +2455,7 @@ implementation
       a_load_reg_subsetreg(list,size,subsetsize,tmpreg,sreg);
       a_load_reg_subsetreg(list,size,subsetsize,tmpreg,sreg);
     end;
     end;
 
 
-  procedure thlcgobj.a_op_const_subsetref(list: TAsmList; Op: TOpCG; size, subsetsize: tdef; a: aint; const sref: tsubsetreference);
+  procedure thlcgobj.a_op_const_subsetref(list: TAsmList; Op: TOpCG; size, subsetsize: tdef; a: tcgint; const sref: tsubsetreference);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -2465,7 +2465,7 @@ implementation
       a_load_reg_subsetref(list,size,subsetsize,tmpreg,sref);
       a_load_reg_subsetref(list,size,subsetsize,tmpreg,sref);
     end;
     end;
 
 
-  procedure thlcgobj.a_op_const_loc(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; const loc: tlocation);
+  procedure thlcgobj.a_op_const_loc(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; const loc: tlocation);
     begin
     begin
       case loc.loc of
       case loc.loc of
         LOC_REGISTER, LOC_CREGISTER:
         LOC_REGISTER, LOC_CREGISTER:
@@ -2588,7 +2588,7 @@ implementation
       end;
       end;
     end;
     end;
 
 
-  procedure thlcgobj.a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister);
+  procedure thlcgobj.a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister);
     begin
     begin
       a_load_reg_reg(list,size,size,src,dst);
       a_load_reg_reg(list,size,size,src,dst);
       a_op_const_reg(list,op,size,a,dst);
       a_op_const_reg(list,op,size,a,dst);
@@ -2618,7 +2618,7 @@ implementation
         end;
         end;
     end;
     end;
 
 
-  procedure thlcgobj.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
+  procedure thlcgobj.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
     begin
     begin
       ovloc.loc:=LOC_VOID;
       ovloc.loc:=LOC_VOID;
       if not setflags then
       if not setflags then
@@ -2636,7 +2636,7 @@ implementation
         internalerror(2010122911);
         internalerror(2010122911);
     end;
     end;
 
 
-  procedure thlcgobj.a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; reg: tregister; l: tasmlabel);
+  procedure thlcgobj.a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -2645,7 +2645,7 @@ implementation
       a_cmp_reg_reg_label(list,size,cmp_op,tmpreg,reg,l);
       a_cmp_reg_reg_label(list,size,cmp_op,tmpreg,reg,l);
     end;
     end;
 
 
-  procedure thlcgobj.a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; const ref: treference; l: tasmlabel);
+  procedure thlcgobj.a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; const ref: treference; l: tasmlabel);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -2654,7 +2654,7 @@ implementation
       a_cmp_const_reg_label(list,size,cmp_op,a,tmpreg,l);
       a_cmp_const_reg_label(list,size,cmp_op,a,tmpreg,l);
     end;
     end;
 
 
-  procedure thlcgobj.a_cmp_const_loc_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; const loc: tlocation; l: tasmlabel);
+  procedure thlcgobj.a_cmp_const_loc_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; const loc: tlocation; l: tasmlabel);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -2829,9 +2829,18 @@ implementation
       paramanager.getintparaloc(pd,1,cgpara1);
       paramanager.getintparaloc(pd,1,cgpara1);
       paramanager.getintparaloc(pd,2,cgpara2);
       paramanager.getintparaloc(pd,2,cgpara2);
       paramanager.getintparaloc(pd,3,cgpara3);
       paramanager.getintparaloc(pd,3,cgpara3);
-      a_loadaddr_ref_cgpara(list,strdef,dest,cgpara3);
-      a_loadaddr_ref_cgpara(list,strdef,source,cgpara2);
-      a_load_const_cgpara(list,s32inttype,strdef.len,cgpara1);
+      if pd.is_pushleftright then
+        begin
+          a_load_const_cgpara(list,s32inttype,strdef.len,cgpara1);
+          a_loadaddr_ref_cgpara(list,strdef,source,cgpara2);
+          a_loadaddr_ref_cgpara(list,strdef,dest,cgpara3);
+        end
+      else
+        begin
+          a_loadaddr_ref_cgpara(list,strdef,dest,cgpara3);
+          a_loadaddr_ref_cgpara(list,strdef,source,cgpara2);
+          a_load_const_cgpara(list,s32inttype,strdef.len,cgpara1);
+        end;
       paramanager.freecgpara(list,cgpara3);
       paramanager.freecgpara(list,cgpara3);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara1);
       paramanager.freecgpara(list,cgpara1);
@@ -2851,8 +2860,16 @@ implementation
       cgpara2.init;
       cgpara2.init;
       paramanager.getintparaloc(pd,1,cgpara1);
       paramanager.getintparaloc(pd,1,cgpara1);
       paramanager.getintparaloc(pd,2,cgpara2);
       paramanager.getintparaloc(pd,2,cgpara2);
-      a_loadaddr_ref_cgpara(list,vardef,dest,cgpara2);
-      a_loadaddr_ref_cgpara(list,vardef,source,cgpara1);
+      if pd.is_pushleftright then
+        begin
+          a_loadaddr_ref_cgpara(list,vardef,source,cgpara1);
+          a_loadaddr_ref_cgpara(list,vardef,dest,cgpara2);
+        end
+      else
+        begin
+          a_loadaddr_ref_cgpara(list,vardef,dest,cgpara2);
+          a_loadaddr_ref_cgpara(list,vardef,source,cgpara1);
+        end;
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara1);
       paramanager.freecgpara(list,cgpara1);
       g_call_system_proc(list,pd,nil);
       g_call_system_proc(list,pd,nil);
@@ -2904,8 +2921,16 @@ implementation
           if is_open_array(t) then
           if is_open_array(t) then
             InternalError(201103054);
             InternalError(201103054);
           reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
           reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
-          a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
-          a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+          if pd.is_pushleftright then
+            begin
+              a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+              a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+            end
+          else
+            begin
+              a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+              a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+            end;
           paramanager.freecgpara(list,cgpara1);
           paramanager.freecgpara(list,cgpara1);
           paramanager.freecgpara(list,cgpara2);
           paramanager.freecgpara(list,cgpara2);
           g_call_system_proc(list,pd,nil);
           g_call_system_proc(list,pd,nil);
@@ -2944,8 +2969,16 @@ implementation
             paramanager.getintparaloc(pd,1,cgpara1);
             paramanager.getintparaloc(pd,1,cgpara1);
             paramanager.getintparaloc(pd,2,cgpara2);
             paramanager.getintparaloc(pd,2,cgpara2);
             reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
             reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
-            a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
-            a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+            if pd.is_pushleftright then
+              begin
+                a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+                a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+              end
+            else
+              begin
+                a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+                a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+              end;
             paramanager.freecgpara(list,cgpara1);
             paramanager.freecgpara(list,cgpara1);
             paramanager.freecgpara(list,cgpara2);
             paramanager.freecgpara(list,cgpara2);
             g_call_system_proc(list,pd,nil);
             g_call_system_proc(list,pd,nil);
@@ -2986,8 +3019,16 @@ implementation
           paramanager.getintparaloc(pd,1,cgpara1);
           paramanager.getintparaloc(pd,1,cgpara1);
           paramanager.getintparaloc(pd,2,cgpara2);
           paramanager.getintparaloc(pd,2,cgpara2);
           reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
           reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
-          a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
-          a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+          if pd.is_pushleftright then
+            begin
+              a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+              a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+            end
+          else
+            begin
+              a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+              a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+            end;
           paramanager.freecgpara(list,cgpara1);
           paramanager.freecgpara(list,cgpara1);
           paramanager.freecgpara(list,cgpara2);
           paramanager.freecgpara(list,cgpara2);
           g_call_system_proc(list,pd,nil);
           g_call_system_proc(list,pd,nil);
@@ -3020,6 +3061,14 @@ implementation
       paramanager.getintparaloc(pd,3,cgpara3);
       paramanager.getintparaloc(pd,3,cgpara3);
 
 
       reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
       reference_reset_symbol(href,RTTIWriter.get_rtti_label(t,initrtti),0,sizeof(pint));
+      { if calling convention is left to right, push parameters 1 and 2 }
+      if pd.is_pushleftright then
+        begin
+          a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+          a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+        end;
+
+      { push parameter 3 }
       if highloc.loc=LOC_CONSTANT then
       if highloc.loc=LOC_CONSTANT then
         a_load_const_cgpara(list,ptrsinttype,highloc.value+1,cgpara3)
         a_load_const_cgpara(list,ptrsinttype,highloc.value+1,cgpara3)
       else
       else
@@ -3037,8 +3086,12 @@ implementation
           a_load_reg_cgpara(list,ptrsinttype,lenreg,cgpara3);
           a_load_reg_cgpara(list,ptrsinttype,lenreg,cgpara3);
         end;
         end;
 
 
-      a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
-      a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+      { if calling convention is right to left, push parameters 2 and 1 }
+      if not pd.is_pushleftright then
+        begin
+          a_loadaddr_ref_cgpara(list,voidpointertype,href,cgpara2);
+          a_loadaddr_ref_cgpara(list,t,ref,cgpara1);
+        end;
       paramanager.freecgpara(list,cgpara1);
       paramanager.freecgpara(list,cgpara1);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara3);
       paramanager.freecgpara(list,cgpara3);
@@ -3308,12 +3361,24 @@ implementation
       paramanager.getintparaloc(pd,1,cgpara1);
       paramanager.getintparaloc(pd,1,cgpara1);
       paramanager.getintparaloc(pd,2,cgpara2);
       paramanager.getintparaloc(pd,2,cgpara2);
       paramanager.getintparaloc(pd,3,cgpara3);
       paramanager.getintparaloc(pd,3,cgpara3);
-      { load size }
-      a_load_reg_cgpara(list,ptrsinttype,sizereg,cgpara3);
-      { load destination }
-      a_load_reg_cgpara(list,ptrarrdef,destreg,cgpara2);
-      { load source }
-      a_load_reg_cgpara(list,ptrarrdef,sourcereg,cgpara1);
+      if pd.is_pushleftright then
+        begin
+          { load source }
+          a_load_reg_cgpara(list,ptrarrdef,sourcereg,cgpara1);
+          { load destination }
+          a_load_reg_cgpara(list,ptrarrdef,destreg,cgpara2);
+          { load size }
+          a_load_reg_cgpara(list,ptrsinttype,sizereg,cgpara3);
+        end
+      else
+        begin
+          { load size }
+          a_load_reg_cgpara(list,ptrsinttype,sizereg,cgpara3);
+          { load destination }
+          a_load_reg_cgpara(list,ptrarrdef,destreg,cgpara2);
+          { load source }
+          a_load_reg_cgpara(list,ptrarrdef,sourcereg,cgpara1);
+        end;
       paramanager.freecgpara(list,cgpara3);
       paramanager.freecgpara(list,cgpara3);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara2);
       paramanager.freecgpara(list,cgpara1);
       paramanager.freecgpara(list,cgpara1);

+ 1521 - 0
compiler/i8086/cgcpu.pas

@@ -0,0 +1,1521 @@
+{
+    Copyright (c) 1998-2002 by Florian Klaempfl
+
+    This unit implements the code generator for the i8086
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit cgcpu;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+       globtype,
+       cgbase,cgobj,cg64f32,cgx86,
+       aasmbase,aasmtai,aasmdata,aasmcpu,
+       cpubase,parabase,cgutils,
+       symconst,symdef
+       ;
+
+    type
+
+      { tcg8086 }
+
+      tcg8086 = class(tcgx86)
+        procedure init_register_allocators;override;
+        procedure do_register_allocation(list:TAsmList;headertai:tai);override;
+
+        function getintregister(list:TAsmList;size:Tcgsize):Tregister;override;
+
+        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister); override;
+        procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
+
+        { passing parameter using push instead of mov }
+        procedure a_load_reg_cgpara(list : TAsmList;size : tcgsize;r : tregister;const cgpara : tcgpara);override;
+        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : tcgpara);override;
+        procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);override;
+        procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const cgpara : tcgpara);override;
+
+        { move instructions }
+        procedure a_load_const_reg(list : TAsmList; tosize: tcgsize; a : tcgint;reg : tregister);override;
+        procedure a_load_const_ref(list : TAsmList; tosize: tcgsize; a : tcgint;const ref : treference);override;
+        procedure a_load_reg_ref(list : TAsmList;fromsize,tosize: tcgsize; reg : tregister;const ref : treference);override;
+        procedure a_load_ref_reg(list : TAsmList;fromsize,tosize: tcgsize;const ref : treference;reg : tregister);override;
+        procedure a_load_reg_reg(list : TAsmList;fromsize,tosize: tcgsize;reg1,reg2 : tregister);override;
+
+        procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister);override;
+        procedure g_flags2ref(list: TAsmList; size: TCgSize; const f: tresflags; const ref: TReference);override;
+
+        procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
+        procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);
+        procedure g_releasevaluepara_openarray(list : TAsmList;const l:tlocation);
+
+        procedure g_exception_reason_save(list : TAsmList; const href : treference);override;
+        procedure g_exception_reason_save_const(list : TAsmList; const href : treference; a: tcgint);override;
+        procedure g_exception_reason_load(list : TAsmList; const href : treference);override;
+
+        procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);override;
+        procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
+        procedure g_maybe_got_init(list: TAsmList); override;
+
+        procedure get_32bit_ops(op: TOpCG; out op1,op2: TAsmOp);
+     end;
+
+      tcg64f8086 = class(tcg64f32)
+{        procedure a_op64_ref_reg(list : TAsmList;op:TOpCG;size : tcgsize;const ref : treference;reg : tregister64);override;}
+        procedure a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);override;
+        procedure a_op64_const_reg(list : TAsmList;op:TOpCG;size : tcgsize;value : int64;reg : tregister64);override;
+{        procedure a_op64_const_ref(list : TAsmList;op:TOpCG;size : tcgsize;value : int64;const ref : treference);override;}
+      private
+        procedure get_64bit_ops(op:TOpCG;var op1,op2:TAsmOp);
+      end;
+
+    procedure create_codegen;
+
+  implementation
+
+    uses
+       globals,verbose,systems,cutils,
+       paramgr,procinfo,fmodule,
+       rgcpu,rgx86,cpuinfo,
+       symtype,symsym;
+
+    function use_push(const cgpara:tcgpara):boolean;
+      begin
+        result:=(not paramanager.use_fixed_stack) and
+                assigned(cgpara.location) and
+                (cgpara.location^.loc=LOC_REFERENCE) and
+                (cgpara.location^.reference.index=NR_STACK_POINTER_REG);
+      end;
+
+
+    procedure tcg8086.init_register_allocators;
+      begin
+        inherited init_register_allocators;
+        if not(target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+           (cs_create_pic in current_settings.moduleswitches) then
+          rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_AX,RS_DX,RS_CX,RS_SI,RS_DI],first_int_imreg,[RS_BP])
+        else
+          if (cs_useebp in current_settings.optimizerswitches) and assigned(current_procinfo) and (current_procinfo.framepointer<>NR_BP) then
+            rg[R_INTREGISTER]:=trgcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_AX,RS_DX,RS_CX,RS_BX,RS_SI,RS_DI,RS_BP],first_int_imreg,[])
+          else
+            rg[R_INTREGISTER]:=trgintcpu.create(R_INTREGISTER,R_SUBWHOLE,[RS_AX,RS_DX,RS_CX,RS_BX,RS_SI,RS_DI],first_int_imreg,[RS_BP]);
+        rg[R_MMXREGISTER]:=trgcpu.create(R_MMXREGISTER,R_SUBNONE,[RS_XMM0,RS_XMM1,RS_XMM2,RS_XMM3,RS_XMM4,RS_XMM5,RS_XMM6,RS_XMM7],first_mm_imreg,[]);
+        rg[R_MMREGISTER]:=trgcpu.create(R_MMREGISTER,R_SUBWHOLE,[RS_XMM0,RS_XMM1,RS_XMM2,RS_XMM3,RS_XMM4,RS_XMM5,RS_XMM6,RS_XMM7],first_mm_imreg,[]);
+        rgfpu:=Trgx86fpu.create;
+      end;
+
+    procedure tcg8086.do_register_allocation(list:TAsmList;headertai:tai);
+      begin
+        if (pi_needs_got in current_procinfo.flags) then
+          begin
+            if getsupreg(current_procinfo.got) < first_int_imreg then
+              include(rg[R_INTREGISTER].used_in_proc,getsupreg(current_procinfo.got));
+          end;
+        inherited do_register_allocation(list,headertai);
+      end;
+
+
+    function tcg8086.getintregister(list: TAsmList; size: Tcgsize): Tregister;
+      begin
+        case size of
+          OS_8, OS_S8,
+          OS_16, OS_S16:
+            Result := inherited getintregister(list, size);
+          OS_32, OS_S32:
+            begin
+              Result:=inherited getintregister(list, OS_16);
+              { ensure that the high register can be retrieved by
+                GetNextReg
+              }
+              if inherited getintregister(list, OS_16)<>GetNextReg(Result) then
+                internalerror(2013030202);
+            end;
+          else
+            internalerror(2013030201);
+        end;
+      end;
+
+
+    procedure tcg8086.a_op_const_reg(list: TAsmList; Op: TOpCG; size: TCGSize;
+      a: tcgint; reg: TRegister);
+      var
+        tmpreg: tregister;
+        op1, op2: TAsmOp;
+      begin
+        optimize_op_const(op, a);
+        check_register_size(size,reg);
+
+        if size in [OS_64, OS_S64] then
+          internalerror(2013030904);
+
+        if size in [OS_32, OS_S32] then
+          begin
+            case op of
+              OP_NONE:
+                begin
+                  { Opcode is optimized away }
+                end;
+              OP_MOVE:
+                begin
+                  { Optimized, replaced with a simple load }
+                  a_load_const_reg(list,size,a,reg);
+                end;
+              OP_ADD, OP_AND, OP_OR, OP_SUB, OP_XOR:
+                begin
+                  if (longword(a) = high(longword)) and
+                     (op in [OP_AND,OP_OR,OP_XOR]) then
+                    begin
+                      case op of
+                        OP_AND:
+                          exit;
+                        OP_OR:
+                          a_load_const_reg(list,size,high(longword),reg);
+                        OP_XOR:
+                          begin
+                            list.concat(taicpu.op_reg(A_NOT,S_W,reg));
+                            list.concat(taicpu.op_reg(A_NOT,S_W,GetNextReg(reg)));
+                          end;
+                      end
+                    end
+                  else
+                  begin
+                    get_32bit_ops(op, op1, op2);
+                    list.concat(taicpu.op_const_reg(op1,S_W,aint(a and $FFFF),reg));
+                    list.concat(taicpu.op_const_reg(op2,S_W,aint(a shr 16),GetNextReg(reg)));
+                  end;
+                end;
+              else
+                begin
+                  tmpreg:=getintregister(list,size);
+                  a_load_const_reg(list,size,a,tmpreg);
+                  a_op_reg_reg(list,op,size,tmpreg,reg);
+                end;
+            end;
+          end
+        else
+          inherited a_op_const_reg(list, Op, size, a, reg);
+      end;
+
+
+    procedure tcg8086.a_op_reg_reg(list: TAsmList; Op: TOpCG; size: TCGSize;
+      src, dst: TRegister);
+      var
+        op1, op2: TAsmOp;
+        hl_skip, hl_loop_start: TAsmLabel;
+        ai: taicpu;
+      begin
+        check_register_size(size,src);
+        check_register_size(size,dst);
+        if size in [OS_64, OS_S64] then
+          internalerror(2013030902);
+        if size in [OS_32, OS_S32] then
+          begin
+            case op of
+              OP_NEG:
+                begin
+                  if src<>dst then
+                    a_load_reg_reg(list,size,size,src,dst);
+                  list.concat(taicpu.op_reg(A_NOT, S_W, GetNextReg(dst)));
+                  list.concat(taicpu.op_reg(A_NEG, S_W, dst));
+                  list.concat(taicpu.op_const_reg(A_SBB, S_W,-1, GetNextReg(dst)));
+                end;
+              OP_NOT:
+                begin
+                  if src<>dst then
+                    a_load_reg_reg(list,size,size,src,dst);
+                  list.concat(taicpu.op_reg(A_NOT, S_W, dst));
+                  list.concat(taicpu.op_reg(A_NOT, S_W, GetNextReg(dst)));
+                end;
+              OP_ADD,OP_SUB,OP_XOR,OP_OR,OP_AND:
+                begin
+                  get_32bit_ops(op, op1, op2);
+                  list.concat(taicpu.op_reg_reg(op1, S_W, src, dst));
+                  list.concat(taicpu.op_reg_reg(op2, S_W, GetNextReg(src), GetNextReg(dst)));
+                end;
+              OP_SHR,OP_SHL,OP_SAR:
+                begin
+                  getcpuregister(list,NR_CX);
+                  a_load_reg_reg(list,size,OS_16,src,NR_CX);
+                  list.concat(taicpu.op_const_reg(A_AND,S_W,$1f,NR_CX));
+
+                  current_asmdata.getjumplabel(hl_skip);
+                  ai:=Taicpu.Op_Sym(A_Jcc,S_NO,hl_skip);
+                  ai.SetCondition(C_Z);
+                  ai.is_jmp:=true;
+                  list.concat(ai);
+
+                  current_asmdata.getjumplabel(hl_loop_start);
+                  a_label(list,hl_loop_start);
+
+                  case op of
+                    OP_SHR:
+                      begin
+                        list.concat(taicpu.op_const_reg(A_SHR,S_W,1,GetNextReg(dst)));
+                        list.concat(taicpu.op_const_reg(A_RCR,S_W,1,dst));
+                      end;
+                    OP_SAR:
+                      begin
+                        list.concat(taicpu.op_const_reg(A_SAR,S_W,1,GetNextReg(dst)));
+                        list.concat(taicpu.op_const_reg(A_RCR,S_W,1,dst));
+                      end;
+                    OP_SHL:
+                      begin
+                        list.concat(taicpu.op_const_reg(A_SHL,S_W,1,dst));
+                        list.concat(taicpu.op_const_reg(A_RCL,S_W,1,GetNextReg(dst)));
+                      end;
+                    else
+                      internalerror(2013030903);
+                  end;
+
+                  ai:=Taicpu.Op_Sym(A_LOOP,S_W,hl_loop_start);
+                  ai.is_jmp:=true;
+                  list.concat(ai);
+
+                  a_label(list,hl_skip);
+
+                  ungetcpuregister(list,NR_CX);
+                end;
+              else
+                internalerror(2013030901);
+            end;
+          end
+        else
+          inherited a_op_reg_reg(list, Op, size, src, dst);
+      end;
+
+
+    procedure tcg8086.a_load_reg_cgpara(list : TAsmList;size : tcgsize;r : tregister;const cgpara : tcgpara);
+      var
+        pushsize, pushsize2: tcgsize;
+      begin
+        check_register_size(size,r);
+        if use_push(cgpara) then
+          begin
+            if tcgsize2size[cgpara.Size] > 2 then
+              begin
+                if tcgsize2size[cgpara.Size] <> 4 then
+                  internalerror(2013031101);
+                if cgpara.location^.Next = nil then
+                  begin
+                    if tcgsize2size[cgpara.location^.size] <> 4 then
+                      internalerror(2013031101);
+                  end
+                else
+                  begin
+                    if tcgsize2size[cgpara.location^.size] <> 2 then
+                      internalerror(2013031101);
+                    if tcgsize2size[cgpara.location^.Next^.size] <> 2 then
+                      internalerror(2013031101);
+                    if cgpara.location^.Next^.Next <> nil then
+                      internalerror(2013031101);
+                  end;
+
+                if tcgsize2size[cgpara.size]>cgpara.alignment then
+                  pushsize:=cgpara.size
+                else
+                  pushsize:=int_cgsize(cgpara.alignment);
+                pushsize2 := int_cgsize(tcgsize2size[pushsize] - 2);
+                list.concat(taicpu.op_reg(A_PUSH,TCgsize2opsize[pushsize2],makeregsize(list,GetNextReg(r),pushsize2)));
+                list.concat(taicpu.op_reg(A_PUSH,S_W,makeregsize(list,r,OS_16)));
+              end
+            else
+              begin
+                cgpara.check_simple_location;
+                if tcgsize2size[cgpara.location^.size]>cgpara.alignment then
+                  pushsize:=cgpara.location^.size
+                else
+                  pushsize:=int_cgsize(cgpara.alignment);
+                list.concat(taicpu.op_reg(A_PUSH,TCgsize2opsize[pushsize],makeregsize(list,r,pushsize)));
+              end;
+          end
+        else
+          inherited a_load_reg_cgpara(list,size,r,cgpara);
+      end;
+
+
+    procedure tcg8086.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : tcgpara);
+      var
+        pushsize : tcgsize;
+      begin
+        if use_push(cgpara) then
+          begin
+            if tcgsize2size[cgpara.Size] > 2 then
+              begin
+                if tcgsize2size[cgpara.Size] <> 4 then
+                  internalerror(2013031101);
+                if cgpara.location^.Next = nil then
+                  begin
+                    if tcgsize2size[cgpara.location^.size] <> 4 then
+                      internalerror(2013031101);
+                  end
+                else
+                  begin
+                    if tcgsize2size[cgpara.location^.size] <> 2 then
+                      internalerror(2013031101);
+                    if tcgsize2size[cgpara.location^.Next^.size] <> 2 then
+                      internalerror(2013031101);
+                    if cgpara.location^.Next^.Next <> nil then
+                      internalerror(2013031101);
+                  end;
+                if (cgpara.alignment <> 4) and (cgpara.alignment <> 2) then
+                  internalerror(2013031101);
+
+                list.concat(taicpu.op_const(A_PUSH,S_W,a shr 16));
+                list.concat(taicpu.op_const(A_PUSH,S_W,a and $FFFF));
+              end
+            else
+              begin
+                cgpara.check_simple_location;
+                if tcgsize2size[cgpara.location^.size]>cgpara.alignment then
+                  pushsize:=cgpara.location^.size
+                else
+                  pushsize:=int_cgsize(cgpara.alignment);
+                list.concat(taicpu.op_const(A_PUSH,tcgsize2opsize[pushsize],a));
+              end;
+          end
+        else
+          inherited a_load_const_cgpara(list,size,a,cgpara);
+      end;
+
+
+    procedure tcg8086.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);
+
+        procedure pushdata(paraloc:pcgparalocation;ofs:tcgint);
+        var
+          pushsize : tcgsize;
+          opsize : topsize;
+          tmpreg   : tregister;
+          href,tmpref: treference;
+        begin
+          if not assigned(paraloc) then
+            exit;
+          if (paraloc^.loc<>LOC_REFERENCE) or
+             (paraloc^.reference.index<>NR_STACK_POINTER_REG) or
+             (tcgsize2size[paraloc^.size]>4) then
+            internalerror(200501162);
+          { Pushes are needed in reverse order, add the size of the
+            current location to the offset where to load from. This
+            prevents wrong calculations for the last location when
+            the size is not a power of 2 }
+          if assigned(paraloc^.next) then
+            pushdata(paraloc^.next,ofs+tcgsize2size[paraloc^.size]);
+          { Push the data starting at ofs }
+          href:=r;
+          inc(href.offset,ofs);
+          if tcgsize2size[paraloc^.size]>cgpara.alignment then
+            pushsize:=paraloc^.size
+          else
+            pushsize:=int_cgsize(cgpara.alignment);
+          opsize:=TCgsize2opsize[pushsize];
+          { for go32v2 we obtain OS_F32,
+            but pushs is not valid, we need pushl }
+          if opsize=S_FS then
+            opsize:=S_L;
+          if tcgsize2size[paraloc^.size]<cgpara.alignment then
+            begin
+              tmpreg:=getintregister(list,pushsize);
+              a_load_ref_reg(list,paraloc^.size,pushsize,href,tmpreg);
+              list.concat(taicpu.op_reg(A_PUSH,opsize,tmpreg));
+            end
+          else
+            begin
+              make_simple_ref(list,href);
+              if tcgsize2size[pushsize] > 2 then
+                begin
+                  tmpref := href;
+                  Inc(tmpref.offset, 2);
+                  list.concat(taicpu.op_ref(A_PUSH,TCgsize2opsize[int_cgsize(tcgsize2size[pushsize]-2)],tmpref));
+                end;
+              list.concat(taicpu.op_ref(A_PUSH,opsize,href));
+            end;
+        end;
+
+      var
+        len : tcgint;
+        href : treference;
+      begin
+        { cgpara.size=OS_NO requires a copy on the stack }
+        if use_push(cgpara) then
+          begin
+            { Record copy? }
+            if (cgpara.size in [OS_NO,OS_F64]) or (size=OS_NO) then
+              begin
+                cgpara.check_simple_location;
+                len:=align(cgpara.intsize,cgpara.alignment);
+                g_stackpointer_alloc(list,len);
+                reference_reset_base(href,NR_STACK_POINTER_REG,0,4);
+                g_concatcopy(list,r,href,len);
+              end
+            else
+              begin
+                if tcgsize2size[cgpara.size]<>tcgsize2size[size] then
+                  internalerror(200501161);
+                { We need to push the data in reverse order,
+                  therefor we use a recursive algorithm }
+                pushdata(cgpara.location,0);
+              end
+          end
+        else
+          inherited a_load_ref_cgpara(list,size,r,cgpara);
+      end;
+
+
+    procedure tcg8086.a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const cgpara : tcgpara);
+      var
+        tmpreg : tregister;
+        opsize : topsize;
+        tmpref : treference;
+      begin
+        with r do
+          begin
+            if use_push(cgpara) then
+              begin
+                cgpara.check_simple_location;
+                opsize:=tcgsize2opsize[OS_ADDR];
+                if (segment=NR_NO) and (base=NR_NO) and (index=NR_NO) then
+                  begin
+                    if assigned(symbol) then
+                      begin
+                        if (target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+                           ((r.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
+                            (cs_create_pic in current_settings.moduleswitches)) then
+                          begin
+                            tmpreg:=getaddressregister(list);
+                            a_loadaddr_ref_reg(list,r,tmpreg);
+                            list.concat(taicpu.op_reg(A_PUSH,opsize,tmpreg));
+                          end
+                        else if cs_create_pic in current_settings.moduleswitches then
+                          begin
+                            if offset<>0 then
+                              begin
+                                tmpreg:=getaddressregister(list);
+                                a_loadaddr_ref_reg(list,r,tmpreg);
+                                list.concat(taicpu.op_reg(A_PUSH,opsize,tmpreg));
+                              end
+                            else
+                              begin
+                                reference_reset_symbol(tmpref,r.symbol,0,r.alignment);
+                                tmpref.refaddr:=addr_pic;
+                                tmpref.base:=current_procinfo.got;
+{$ifdef EXTDEBUG}
+				if not (pi_needs_got in current_procinfo.flags) then
+				  Comment(V_warning,'pi_needs_got not included');
+{$endif EXTDEBUG}
+                                include(current_procinfo.flags,pi_needs_got);
+                                list.concat(taicpu.op_ref(A_PUSH,S_L,tmpref));
+                              end
+                          end
+                        else
+                          list.concat(Taicpu.Op_sym_ofs(A_PUSH,opsize,symbol,offset));
+                      end
+                    else
+                      list.concat(Taicpu.Op_const(A_PUSH,opsize,offset));
+                  end
+                else if (segment=NR_NO) and (base=NR_NO) and (index<>NR_NO) and
+                        (offset=0) and (scalefactor=0) and (symbol=nil) then
+                  list.concat(Taicpu.Op_reg(A_PUSH,opsize,index))
+                else if (segment=NR_NO) and (base<>NR_NO) and (index=NR_NO) and
+                        (offset=0) and (symbol=nil) then
+                  list.concat(Taicpu.Op_reg(A_PUSH,opsize,base))
+                else
+                  begin
+                    tmpreg:=getaddressregister(list);
+                    a_loadaddr_ref_reg(list,r,tmpreg);
+                    list.concat(taicpu.op_reg(A_PUSH,opsize,tmpreg));
+                  end;
+              end
+            else
+              inherited a_loadaddr_ref_cgpara(list,r,cgpara);
+          end;
+      end;
+
+
+    procedure tcg8086.a_load_const_reg(list : TAsmList; tosize: tcgsize; a : tcgint;reg : tregister);
+    begin
+      check_register_size(tosize,reg);
+      if tosize in [OS_S32,OS_32] then
+        begin
+          list.concat(taicpu.op_const_reg(A_MOV,S_W,longint(a and $ffff),reg));
+          list.concat(taicpu.op_const_reg(A_MOV,S_W,longint(a shr 16),GetNextReg(reg)));
+        end
+      else
+        list.concat(taicpu.op_const_reg(A_MOV,TCGSize2OpSize[tosize],a,reg));
+    end;
+
+
+    procedure tcg8086.a_load_const_ref(list : TAsmList; tosize: tcgsize; a : tcgint;const ref : treference);
+      var
+        tmpref : treference;
+      begin
+        tmpref:=ref;
+        make_simple_ref(list,tmpref);
+
+        if tosize in [OS_S32,OS_32] then
+          begin
+            a_load_const_ref(list,OS_16,longint(a and $ffff),tmpref);
+            inc(tmpref.offset,2);
+            a_load_const_ref(list,OS_16,longint(a shr 16),tmpref);
+          end
+        else
+          list.concat(taicpu.op_const_ref(A_MOV,TCGSize2OpSize[tosize],a,tmpref));
+      end;
+
+
+
+    procedure tcg8086.a_load_reg_ref(list : TAsmList;fromsize,tosize: tcgsize; reg : tregister;const ref : treference);
+      var
+        tmpsize : tcgsize;
+        tmpreg  : tregister;
+        tmpref  : treference;
+      begin
+        tmpref:=ref;
+        make_simple_ref(list,tmpref);
+        check_register_size(fromsize,reg);
+
+        case tosize of
+          OS_8,OS_S8:
+            if fromsize in [OS_8,OS_S8] then
+              list.concat(taicpu.op_reg_ref(A_MOV, S_B, reg, tmpref))
+            else
+              internalerror(2013030310);
+          OS_16,OS_S16:
+            if fromsize in [OS_16,OS_S16] then
+              list.concat(taicpu.op_reg_ref(A_MOV, S_W, reg, tmpref))
+            else
+              internalerror(2013030312);
+          OS_32,OS_S32:
+            if fromsize in [OS_32,OS_S32] then
+              begin
+                list.concat(taicpu.op_reg_ref(A_MOV, S_W, reg, tmpref));
+                inc(tmpref.offset, 2);
+                list.concat(taicpu.op_reg_ref(A_MOV, S_W, GetNextReg(reg), tmpref));
+              end
+            else
+              internalerror(2013030313);
+          else
+            internalerror(2013030311);
+        end;
+      end;
+
+
+    procedure tcg8086.a_load_ref_reg(list : TAsmList;fromsize,tosize: tcgsize;const ref : treference;reg : tregister);
+
+        procedure add_mov(instr: Taicpu);
+          begin
+            { Notify the register allocator that we have written a move instruction so
+              it can try to eliminate it. }
+            if (instr.oper[0]^.reg<>current_procinfo.framepointer) and (instr.oper[0]^.reg<>NR_STACK_POINTER_REG) then
+              add_move_instruction(instr);
+            list.concat(instr);
+          end;
+
+      var
+        tmpref  : treference;
+      begin
+        tmpref:=ref;
+        make_simple_ref(list,tmpref);
+        check_register_size(tosize,reg);
+
+        if (tcgsize2size[fromsize]>32) or (tcgsize2size[tosize]>32) or (fromsize=OS_NO) or (tosize=OS_NO) then
+          internalerror(2011021307);
+{        if tcgsize2size[tosize]<=tcgsize2size[fromsize] then
+          fromsize:=tosize;}
+
+        case tosize of
+          OS_8,OS_S8:
+            if fromsize in [OS_8,OS_S8] then
+              list.concat(taicpu.op_ref_reg(A_MOV, S_B, tmpref, reg))
+            else
+              internalerror(2013030210);
+          OS_16,OS_S16:
+            case fromsize of
+              OS_8:
+                begin
+                  list.concat(taicpu.op_const_reg(A_MOV, S_W, 0, reg));
+                  reg := makeregsize(list, reg, OS_8);
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_B, tmpref, reg));
+                end;
+              OS_S8:
+                begin
+                  getcpuregister(list, NR_AX);
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_B, tmpref, NR_AL));
+                  list.concat(taicpu.op_none(A_CBW));
+                  add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_AX, reg));
+                  ungetcpuregister(list, NR_AX);
+                end;
+              OS_16,OS_S16:
+                list.concat(taicpu.op_ref_reg(A_MOV, S_W, tmpref, reg));
+              else
+                internalerror(2013030212);
+            end;
+          OS_32,OS_S32:
+            case fromsize of
+              OS_8:
+                begin
+                  list.concat(taicpu.op_const_reg(A_MOV,S_W,0,GetNextReg(reg)));
+                  list.concat(taicpu.op_const_reg(A_MOV, S_W, 0, reg));
+                  reg := makeregsize(list, reg, OS_8);
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_B, tmpref, reg));
+                end;
+              OS_S8:
+                begin
+                  getcpuregister(list, NR_AX);
+                  getcpuregister(list, NR_DX);
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_B, tmpref, NR_AL));
+                  list.concat(taicpu.op_none(A_CBW));
+                  list.concat(taicpu.op_none(A_CWD));
+                  add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_AX, reg));
+                  add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_DX, GetNextReg(reg)));
+                  ungetcpuregister(list, NR_AX);
+                  ungetcpuregister(list, NR_DX);
+                end;
+              OS_16:
+                begin
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_W, tmpref, reg));
+                  list.concat(taicpu.op_const_reg(A_MOV,S_W,0,GetNextReg(reg)));
+                end;
+              OS_S16:
+                begin
+                  getcpuregister(list, NR_AX);
+                  getcpuregister(list, NR_DX);
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_W, tmpref, NR_AX));
+                  list.concat(taicpu.op_none(A_CWD));
+                  add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_AX, reg));
+                  add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_DX, GetNextReg(reg)));
+                  ungetcpuregister(list, NR_AX);
+                  ungetcpuregister(list, NR_DX);
+                end;
+              OS_32,OS_S32:
+                begin
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_W, tmpref, reg));
+                  inc(tmpref.offset, 2);
+                  list.concat(taicpu.op_ref_reg(A_MOV, S_W, tmpref, GetNextReg(reg)));
+                end;
+              else
+                internalerror(2013030213);
+            end;
+          else
+            internalerror(2013030211);
+        end;
+      end;
+
+
+    procedure tcg8086.a_load_reg_reg(list : TAsmList;fromsize,tosize: tcgsize;reg1,reg2 : tregister);
+
+        procedure add_mov(instr: Taicpu);
+          begin
+            { Notify the register allocator that we have written a move instruction so
+              it can try to eliminate it. }
+            if (instr.oper[0]^.reg<>current_procinfo.framepointer) and (instr.oper[0]^.reg<>NR_STACK_POINTER_REG) then
+              add_move_instruction(instr);
+            list.concat(instr);
+          end;
+
+      begin
+        check_register_size(fromsize,reg1);
+        check_register_size(tosize,reg2);
+
+        if tcgsize2size[fromsize]>tcgsize2size[tosize] then
+          begin
+            if tosize in [OS_32, OS_S32] then
+              internalerror(2013031801);
+            reg1:=makeregsize(list,reg1,tosize);
+            fromsize:=tosize;
+          end;
+
+        if (reg1<>reg2) then
+          begin
+            case tosize of
+              OS_8,OS_S8:
+                if fromsize in [OS_8,OS_S8] then
+                  add_mov(taicpu.op_reg_reg(A_MOV, S_B, reg1, reg2))
+                else
+                  internalerror(2013030210);
+              OS_16,OS_S16:
+                case fromsize of
+                  OS_8:
+                    begin
+                      list.concat(taicpu.op_const_reg(A_MOV, S_W, 0, reg2));
+                      reg2 := makeregsize(list, reg2, OS_8);
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_B, reg1, reg2));
+                    end;
+                  OS_S8:
+                    begin
+                      getcpuregister(list, NR_AX);
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_B, reg1, NR_AL));
+                      list.concat(taicpu.op_none(A_CBW));
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_AX, reg2));
+                      ungetcpuregister(list, NR_AX);
+                    end;
+                  OS_16,OS_S16:
+                    add_mov(taicpu.op_reg_reg(A_MOV, S_W, reg1, reg2));
+                  else
+                    internalerror(2013030212);
+                end;
+              OS_32,OS_S32:
+                case fromsize of
+                  OS_8:
+                    begin
+                      list.concat(taicpu.op_const_reg(A_MOV, S_W, 0, GetNextReg(reg2)));
+                      list.concat(taicpu.op_const_reg(A_MOV, S_W, 0, reg2));
+                      reg2 := makeregsize(list, reg2, OS_8);
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_B, reg1, reg2));
+                    end;
+                  OS_S8:
+                    begin
+                      getcpuregister(list, NR_AX);
+                      getcpuregister(list, NR_DX);
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_B, reg1, NR_AL));
+                      list.concat(taicpu.op_none(A_CBW));
+                      list.concat(taicpu.op_none(A_CWD));
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_AX, reg2));
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_DX, GetNextReg(reg2)));
+                      ungetcpuregister(list, NR_AX);
+                      ungetcpuregister(list, NR_DX);
+                    end;
+                  OS_16:
+                    begin
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, reg1, reg2));
+                      list.concat(taicpu.op_const_reg(A_MOV,S_W,0,GetNextReg(reg2)));
+                    end;
+                  OS_S16:
+                    begin
+                      getcpuregister(list, NR_AX);
+                      getcpuregister(list, NR_DX);
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, reg1, NR_AX));
+                      list.concat(taicpu.op_none(A_CWD));
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_AX, reg2));
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, NR_DX, GetNextReg(reg2)));
+                      ungetcpuregister(list, NR_AX);
+                      ungetcpuregister(list, NR_DX);
+                    end;
+                  OS_32,OS_S32:
+                    begin
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, reg1, reg2));
+                      add_mov(taicpu.op_reg_reg(A_MOV, S_W, GetNextReg(reg1), GetNextReg(reg2)));
+                    end;
+                  else
+                    internalerror(2013030213);
+                end;
+              else
+                internalerror(2013030211);
+            end;
+          end;
+      end;
+
+
+    procedure tcg8086.g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister);
+      var
+        ai : taicpu;
+        hreg, hreg16 : tregister;
+        hl_skip: TAsmLabel;
+        invf: TResFlags;
+      begin
+        hreg:=makeregsize(list,reg,OS_8);
+
+        invf := f;
+        inverse_flags(invf);
+
+        list.concat(Taicpu.op_const_reg(A_MOV, S_B, 0, hreg));
+
+        current_asmdata.getjumplabel(hl_skip);
+        ai:=Taicpu.Op_Sym(A_Jcc,S_NO,hl_skip);
+        ai.SetCondition(flags_to_cond(invf));
+        ai.is_jmp:=true;
+        list.concat(ai);
+
+        { 16-bit INC is shorter than 8-bit }
+        hreg16:=makeregsize(list,hreg,OS_16);
+        list.concat(Taicpu.op_reg(A_INC, S_W, hreg16));
+
+        a_label(list,hl_skip);
+
+        if reg<>hreg then
+          a_load_reg_reg(list,OS_8,size,hreg,reg);
+      end;
+
+
+    procedure tcg8086.g_flags2ref(list: TAsmList; size: TCgSize; const f: tresflags; const ref: TReference);
+      var
+        tmpreg : tregister;
+      begin
+        tmpreg:=getintregister(list,size);
+        g_flags2reg(list,size,f,tmpreg);
+        a_load_reg_ref(list,size,size,tmpreg,ref);
+      end;
+
+
+    procedure tcg8086.g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);
+      var
+        stacksize : longint;
+      begin
+        { MMX needs to call EMMS }
+        if assigned(rg[R_MMXREGISTER]) and
+           (rg[R_MMXREGISTER].uses_registers) then
+          list.concat(Taicpu.op_none(A_EMMS,S_NO));
+
+        { remove stackframe }
+        if not nostackframe then
+          begin
+            if (current_procinfo.framepointer=NR_STACK_POINTER_REG) then
+              begin
+                stacksize:=current_procinfo.calc_stackframe_size;
+                if (target_info.stackalign>4) and
+                   ((stacksize <> 0) or
+                    (pi_do_call in current_procinfo.flags) or
+                    { can't detect if a call in this case -> use nostackframe }
+                    { if you (think you) know what you are doing              }
+                    (po_assembler in current_procinfo.procdef.procoptions)) then
+                  stacksize := align(stacksize+sizeof(aint),target_info.stackalign) - sizeof(aint);
+                if (stacksize<>0) then
+                  cg.a_op_const_reg(list,OP_ADD,OS_ADDR,stacksize,current_procinfo.framepointer);
+              end
+            else
+              begin
+                list.concat(Taicpu.op_reg_reg(A_MOV, S_W, NR_BP, NR_SP));
+                list.concat(Taicpu.op_reg(A_POP, S_W, NR_BP));
+                {todo: use LEAVE for 286+}
+                {list.concat(Taicpu.op_none(A_LEAVE,S_NO));}
+              end;
+            list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
+          end;
+
+        { return from proc }
+        if (po_interrupt in current_procinfo.procdef.procoptions) and
+           { this messes up stack alignment }
+           (target_info.stackalign=4) then
+          begin
+            if assigned(current_procinfo.procdef.funcretloc[calleeside].location) and
+               (current_procinfo.procdef.funcretloc[calleeside].location^.loc=LOC_REGISTER) then
+              begin
+                if (getsupreg(current_procinfo.procdef.funcretloc[calleeside].location^.register)=RS_EAX) then
+                  list.concat(Taicpu.Op_const_reg(A_ADD,S_L,4,NR_ESP))
+                else
+                  internalerror(2010053001);
+              end
+            else
+              list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EAX));
+            list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EBX));
+            list.concat(Taicpu.Op_reg(A_POP,S_L,NR_ECX));
+
+            if (current_procinfo.procdef.funcretloc[calleeside].size in [OS_64,OS_S64]) and
+               assigned(current_procinfo.procdef.funcretloc[calleeside].location) and
+               assigned(current_procinfo.procdef.funcretloc[calleeside].location^.next) and
+               (current_procinfo.procdef.funcretloc[calleeside].location^.next^.loc=LOC_REGISTER) then
+              begin
+                if (getsupreg(current_procinfo.procdef.funcretloc[calleeside].location^.next^.register)=RS_EDX) then
+                  list.concat(Taicpu.Op_const_reg(A_ADD,S_L,4,NR_ESP))
+                else
+                  internalerror(2010053002);
+              end
+            else
+              list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EDX));
+
+            list.concat(Taicpu.Op_reg(A_POP,S_L,NR_ESI));
+            list.concat(Taicpu.Op_reg(A_POP,S_L,NR_EDI));
+            { .... also the segment registers }
+            list.concat(Taicpu.Op_reg(A_POP,S_W,NR_DS));
+            list.concat(Taicpu.Op_reg(A_POP,S_W,NR_ES));
+            list.concat(Taicpu.Op_reg(A_POP,S_W,NR_FS));
+            list.concat(Taicpu.Op_reg(A_POP,S_W,NR_GS));
+            { this restores the flags }
+            list.concat(Taicpu.Op_none(A_IRET,S_NO));
+          end
+        { Routines with the poclearstack flag set use only a ret }
+        else if (current_procinfo.procdef.proccalloption in clearstack_pocalls) and
+                (not paramanager.use_fixed_stack)  then
+         begin
+           { complex return values are removed from stack in C code PM }
+           { but not on win32 }
+           { and not for safecall with hidden exceptions, because the result }
+           { wich contains the exception is passed in EAX }
+           if (target_info.system <> system_i386_win32) and
+              not ((current_procinfo.procdef.proccalloption = pocall_safecall) and
+               (tf_safecall_exceptions in target_info.flags)) and
+              paramanager.ret_in_param(current_procinfo.procdef.returndef,
+                                       current_procinfo.procdef) then
+             list.concat(Taicpu.Op_const(A_RET,S_W,sizeof(aint)))
+           else
+             list.concat(Taicpu.Op_none(A_RET,S_NO));
+         end
+        { ... also routines with parasize=0 }
+        else if (parasize=0) then
+         list.concat(Taicpu.Op_none(A_RET,S_NO))
+        else
+         begin
+           { parameters are limited to 65535 bytes because ret allows only imm16 }
+           if (parasize>65535) then
+             CGMessage(cg_e_parasize_too_big);
+           list.concat(Taicpu.Op_const(A_RET,S_W,parasize));
+         end;
+      end;
+
+
+    procedure tcg8086.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);
+      var
+        power,len  : longint;
+        opsize : topsize;
+{$ifndef __NOWINPECOFF__}
+        again,ok : tasmlabel;
+{$endif}
+      begin
+        { get stack space }
+        getcpuregister(list,NR_EDI);
+        a_load_loc_reg(list,OS_INT,lenloc,NR_EDI);
+        list.concat(Taicpu.op_reg(A_INC,S_L,NR_EDI));
+        { Now EDI contains (high+1). Copy it to ECX for later use. }
+        getcpuregister(list,NR_ECX);
+        list.concat(Taicpu.op_reg_reg(A_MOV,S_L,NR_EDI,NR_ECX));
+        if (elesize<>1) then
+         begin
+           if ispowerof2(elesize, power) then
+             list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_EDI))
+           else
+             list.concat(Taicpu.op_const_reg(A_IMUL,S_L,elesize,NR_EDI));
+         end;
+{$ifndef __NOWINPECOFF__}
+        { windows guards only a few pages for stack growing, }
+        { so we have to access every page first              }
+        if target_info.system=system_i386_win32 then
+          begin
+             current_asmdata.getjumplabel(again);
+             current_asmdata.getjumplabel(ok);
+             a_label(list,again);
+             list.concat(Taicpu.op_const_reg(A_CMP,S_L,winstackpagesize,NR_EDI));
+             a_jmp_cond(list,OC_B,ok);
+             list.concat(Taicpu.op_const_reg(A_SUB,S_L,winstackpagesize-4,NR_ESP));
+             list.concat(Taicpu.op_reg(A_PUSH,S_L,NR_EDI));
+             list.concat(Taicpu.op_const_reg(A_SUB,S_L,winstackpagesize,NR_EDI));
+             a_jmp_always(list,again);
+
+             a_label(list,ok);
+          end;
+{$endif __NOWINPECOFF__}
+        { If we were probing pages, EDI=(size mod pagesize) and ESP is decremented
+          by (size div pagesize)*pagesize, otherwise EDI=size.
+          Either way, subtracting EDI from ESP will set ESP to desired final value. }
+        list.concat(Taicpu.op_reg_reg(A_SUB,S_L,NR_EDI,NR_ESP));
+        { align stack on 4 bytes }
+        list.concat(Taicpu.op_const_reg(A_AND,S_L,aint($fffffff4),NR_ESP));
+        { load destination, don't use a_load_reg_reg, that will add a move instruction
+          that can confuse the reg allocator }
+        list.concat(Taicpu.Op_reg_reg(A_MOV,S_L,NR_ESP,NR_EDI));
+
+        { Allocate ESI and load it with source }
+        getcpuregister(list,NR_ESI);
+        a_loadaddr_ref_reg(list,ref,NR_ESI);
+
+        { calculate size }
+        len:=elesize;
+        opsize:=S_B;
+        if (len and 3)=0 then
+         begin
+           opsize:=S_L;
+           len:=len shr 2;
+         end
+        else
+         if (len and 1)=0 then
+          begin
+            opsize:=S_W;
+            len:=len shr 1;
+          end;
+
+        if len>1 then
+          begin
+            if ispowerof2(len, power) then
+              list.concat(Taicpu.op_const_reg(A_SHL,S_L,power,NR_ECX))
+            else
+              list.concat(Taicpu.op_const_reg(A_IMUL,S_L,len,NR_ECX));
+          end;
+        list.concat(Taicpu.op_none(A_REP,S_NO));
+        case opsize of
+          S_B : list.concat(Taicpu.Op_none(A_MOVSB,S_NO));
+          S_W : list.concat(Taicpu.Op_none(A_MOVSW,S_NO));
+          S_L : list.concat(Taicpu.Op_none(A_MOVSD,S_NO));
+        end;
+        ungetcpuregister(list,NR_EDI);
+        ungetcpuregister(list,NR_ECX);
+        ungetcpuregister(list,NR_ESI);
+
+        { patch the new address, but don't use a_load_reg_reg, that will add a move instruction
+          that can confuse the reg allocator }
+        list.concat(Taicpu.Op_reg_reg(A_MOV,S_L,NR_ESP,destreg));
+      end;
+
+
+    procedure tcg8086.g_releasevaluepara_openarray(list : TAsmList;const l:tlocation);
+      begin
+        { Nothing to release }
+      end;
+
+
+    procedure tcg8086.g_exception_reason_save(list : TAsmList; const href : treference);
+      begin
+        if not paramanager.use_fixed_stack then
+          list.concat(Taicpu.op_reg(A_PUSH,tcgsize2opsize[OS_INT],NR_FUNCTION_RESULT_REG))
+        else
+         inherited g_exception_reason_save(list,href);
+      end;
+
+
+    procedure tcg8086.g_exception_reason_save_const(list : TAsmList;const href : treference; a: tcgint);
+      begin
+        if not paramanager.use_fixed_stack then
+          list.concat(Taicpu.op_const(A_PUSH,tcgsize2opsize[OS_INT],a))
+        else
+          inherited g_exception_reason_save_const(list,href,a);
+      end;
+
+
+    procedure tcg8086.g_exception_reason_load(list : TAsmList; const href : treference);
+      begin
+        if not paramanager.use_fixed_stack then
+          begin
+            cg.a_reg_alloc(list,NR_FUNCTION_RESULT_REG);
+            list.concat(Taicpu.op_reg(A_POP,tcgsize2opsize[OS_INT],NR_FUNCTION_RESULT_REG))
+          end
+        else
+          inherited g_exception_reason_load(list,href);
+      end;
+
+
+    procedure tcg8086.g_maybe_got_init(list: TAsmList);
+      var
+        notdarwin: boolean;
+      begin
+        { allocate PIC register }
+        if (cs_create_pic in current_settings.moduleswitches) and
+           (tf_pic_uses_got in target_info.flags) and
+           (pi_needs_got in current_procinfo.flags) then
+          begin
+            notdarwin:=not(target_info.system in [system_i386_darwin,system_i386_iphonesim]);
+            { on darwin, the got register is virtual (and allocated earlier
+              already) }
+            if notdarwin then
+              { ecx could be used in leaf procedures that don't use ecx to pass
+                aparameter }
+              current_procinfo.got:=NR_EBX;
+            if notdarwin { needs testing before it can be enabled for non-darwin platforms
+                and
+               (current_settings.optimizecputype in [cpu_Pentium2,cpu_Pentium3,cpu_Pentium4]) } then
+              begin
+                current_module.requires_ebx_pic_helper:=true;
+                cg.a_call_name_static(list,'fpc_geteipasebx');
+              end
+            else
+              begin
+                { call/pop is faster than call/ret/mov on Core Solo and later
+                  according to Apple's benchmarking -- and all Intel Macs
+                  have at least a Core Solo (furthermore, the i386 - Pentium 1
+                  don't have a return stack buffer) }
+                a_call_name_static(list,current_procinfo.CurrGOTLabel.name);
+                a_label(list,current_procinfo.CurrGotLabel);
+                list.concat(taicpu.op_reg(A_POP,S_L,current_procinfo.got))
+              end;
+            if notdarwin then
+              begin
+                list.concat(taicpu.op_sym_ofs_reg(A_ADD,S_L,current_asmdata.RefAsmSymbol('_GLOBAL_OFFSET_TABLE_'),0,NR_PIC_OFFSET_REG));
+                list.concat(tai_regalloc.alloc(NR_PIC_OFFSET_REG,nil));
+              end;
+          end;
+      end;
+
+
+    procedure tcg8086.get_32bit_ops(op: TOpCG; out op1, op2: TAsmOp);
+      begin
+        case op of
+          OP_ADD :
+            begin
+              op1:=A_ADD;
+              op2:=A_ADC;
+            end;
+          OP_SUB :
+            begin
+              op1:=A_SUB;
+              op2:=A_SBB;
+            end;
+          OP_XOR :
+            begin
+              op1:=A_XOR;
+              op2:=A_XOR;
+            end;
+          OP_OR :
+            begin
+              op1:=A_OR;
+              op2:=A_OR;
+            end;
+          OP_AND :
+            begin
+              op1:=A_AND;
+              op2:=A_AND;
+            end;
+          else
+            internalerror(200203241);
+        end;
+      end;
+
+
+    procedure tcg8086.g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);
+      var
+        hsym : tsym;
+        href : treference;
+        paraloc : Pcgparalocation;
+      begin
+        { calculate the parameter info for the procdef }
+        procdef.init_paraloc_info(callerside);
+        hsym:=tsym(procdef.parast.Find('self'));
+        if not(assigned(hsym) and
+               (hsym.typ=paravarsym)) then
+          internalerror(200305251);
+        paraloc:=tparavarsym(hsym).paraloc[callerside].location;
+        while paraloc<>nil do
+          with paraloc^ do
+            begin
+              case loc of
+                LOC_REGISTER:
+                  a_op_const_reg(list,OP_SUB,size,ioffset,register);
+                LOC_REFERENCE:
+                  begin
+                    { offset in the wrapper needs to be adjusted for the stored
+                      return address }
+                    if (reference.index<>NR_BP) and (reference.index<>NR_BX) and (reference.index<>NR_DI)
+                      and (reference.index<>NR_SI) then
+                      begin
+                        list.concat(taicpu.op_reg(A_PUSH,S_W,NR_DI));
+                        list.concat(taicpu.op_reg_reg(A_MOV,S_W,reference.index,NR_DI));
+
+                        if reference.index=NR_SP then
+                          reference_reset_base(href,NR_DI,reference.offset+sizeof(pint)+2,sizeof(pint))
+                        else
+                          reference_reset_base(href,NR_DI,reference.offset+sizeof(pint),sizeof(pint));
+                        a_op_const_ref(list,OP_SUB,size,ioffset,href);
+                        list.concat(taicpu.op_reg(A_POP,S_W,NR_DI));
+                      end
+                    else
+                      begin
+                        reference_reset_base(href,reference.index,reference.offset+sizeof(pint),sizeof(pint));
+                        a_op_const_ref(list,OP_SUB,size,ioffset,href);
+                      end;
+                  end
+                else
+                  internalerror(200309189);
+              end;
+              paraloc:=next;
+            end;
+      end;
+
+
+    procedure tcg8086.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
+      {
+      possible calling conventions:
+                    default stdcall cdecl pascal register
+      default(0):      OK     OK    OK     OK       OK
+      virtual(1):      OK     OK    OK     OK       OK(2)
+
+      (0):
+          set self parameter to correct value
+          jmp mangledname
+
+      (1): The wrapper code use %eax to reach the virtual method address
+           set self to correct value
+           move self,%bx
+           mov  0(%bx),%bx ; load vmt
+           jmp  vmtoffs(%bx) ; method offs
+
+      (2): Virtual use values pushed on stack to reach the method address
+           so the following code be generated:
+           set self to correct value
+           push %bx ; allocate space for function address
+           push %bx
+           push %di
+           mov  self,%bx
+           mov  0(%bx),%bx ; load vmt
+           mov  vmtoffs(%bx),bx ; method offs
+           mov  %sp,%di
+           mov  %bx,4(%di)
+           pop  %di
+           pop  %bx
+           ret  0; jmp the address
+
+      }
+
+      procedure getselftobx(offs: longint);
+        var
+          href : treference;
+          selfoffsetfromsp : longint;
+        begin
+          { "mov offset(%sp),%bx" }
+          if (procdef.proccalloption<>pocall_register) then
+            begin
+              list.concat(taicpu.op_reg(A_PUSH,S_W,NR_DI));
+              { framepointer is pushed for nested procs }
+              if procdef.parast.symtablelevel>normal_function_level then
+                selfoffsetfromsp:=2*sizeof(aint)
+              else
+                selfoffsetfromsp:=sizeof(aint);
+              list.concat(taicpu.op_reg_reg(A_mov,S_W,NR_SP,NR_DI));
+              reference_reset_base(href,NR_DI,selfoffsetfromsp+offs+2,2);
+              cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_BX);
+              list.concat(taicpu.op_reg(A_POP,S_W,NR_DI));
+            end
+          else
+            cg.a_load_reg_reg(list,OS_ADDR,OS_ADDR,NR_BX,NR_BX);
+        end;
+
+
+      procedure loadvmttobx;
+        var
+          href : treference;
+        begin
+          { mov  0(%bx),%bx ; load vmt}
+          reference_reset_base(href,NR_BX,0,2);
+          cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_BX);
+        end;
+
+
+      procedure loadmethodoffstobx;
+        var
+          href : treference;
+        begin
+          if (procdef.extnumber=$ffff) then
+            Internalerror(200006139);
+          { mov vmtoffs(%bx),%bx ; method offs }
+          reference_reset_base(href,NR_BX,tobjectdef(procdef.struct).vmtmethodoffset(procdef.extnumber),2);
+          cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_BX);
+        end;
+
+
+      var
+        lab : tasmsymbol;
+        make_global : boolean;
+        href : treference;
+      begin
+        if not(procdef.proctypeoption in [potype_function,potype_procedure]) then
+          Internalerror(200006137);
+        if not assigned(procdef.struct) or
+           (procdef.procoptions*[po_classmethod, po_staticmethod,
+             po_methodpointer, po_interrupt, po_iocheck]<>[]) then
+          Internalerror(200006138);
+        if procdef.owner.symtabletype<>ObjectSymtable then
+          Internalerror(200109191);
+
+        make_global:=false;
+        if (not current_module.is_unit) or
+           create_smartlink or
+           (procdef.owner.defowner.owner.symtabletype=globalsymtable) then
+          make_global:=true;
+
+        if make_global then
+          List.concat(Tai_symbol.Createname_global(labelname,AT_FUNCTION,0))
+        else
+          List.concat(Tai_symbol.Createname(labelname,AT_FUNCTION,0));
+
+        { set param1 interface to self  }
+        g_adjust_self_value(list,procdef,ioffset);
+
+        if (po_virtualmethod in procdef.procoptions) and
+            not is_objectpascal_helper(procdef.struct) then
+          begin
+            { case 1 & case 2 }
+            list.concat(taicpu.op_reg(A_PUSH,S_W,NR_BX)); { allocate space for address}
+            list.concat(taicpu.op_reg(A_PUSH,S_W,NR_BX));
+            list.concat(taicpu.op_reg(A_PUSH,S_W,NR_DI));
+            getselftobx(8);
+            loadvmttobx;
+            loadmethodoffstobx;
+            { set target address
+              "mov %bx,4(%sp)" }
+            reference_reset_base(href,NR_DI,4,2);
+            list.concat(taicpu.op_reg_reg(A_MOV,S_W,NR_SP,NR_DI));
+            list.concat(taicpu.op_reg_ref(A_MOV,S_W,NR_BX,href));
+
+            { load ax? }
+            if procdef.proccalloption=pocall_register then
+              list.concat(taicpu.op_reg_reg(A_MOV,S_W,NR_BX,NR_AX));
+
+            { restore register
+              pop  %di,bx }
+            list.concat(taicpu.op_reg(A_POP,S_W,NR_DI));
+            list.concat(taicpu.op_reg(A_POP,S_W,NR_BX));
+
+            { ret  ; jump to the address }
+            list.concat(taicpu.op_none(A_RET,S_W));
+          end
+        { case 0 }
+        else
+          begin
+            lab:=current_asmdata.RefAsmSymbol(procdef.mangledname);
+            list.concat(taicpu.op_sym(A_JMP,S_NO,lab))
+          end;
+
+        List.concat(Tai_symbol_end.Createname(labelname));
+      end;
+
+
+{ ************* 64bit operations ************ }
+
+    procedure tcg64f8086.get_64bit_ops(op:TOpCG;var op1,op2:TAsmOp);
+      begin
+        case op of
+          OP_ADD :
+            begin
+              op1:=A_ADD;
+              op2:=A_ADC;
+            end;
+          OP_SUB :
+            begin
+              op1:=A_SUB;
+              op2:=A_SBB;
+            end;
+          OP_XOR :
+            begin
+              op1:=A_XOR;
+              op2:=A_XOR;
+            end;
+          OP_OR :
+            begin
+              op1:=A_OR;
+              op2:=A_OR;
+            end;
+          OP_AND :
+            begin
+              op1:=A_AND;
+              op2:=A_AND;
+            end;
+          else
+            internalerror(200203241);
+        end;
+      end;
+
+
+(*    procedure tcg64f8086.a_op64_ref_reg(list : TAsmList;op:TOpCG;size : tcgsize;const ref : treference;reg : tregister64);
+      var
+        op1,op2 : TAsmOp;
+        tempref : treference;
+      begin
+        if not(op in [OP_NEG,OP_NOT]) then
+          begin
+            get_64bit_ops(op,op1,op2);
+            tempref:=ref;
+            tcgx86(cg).make_simple_ref(list,tempref);
+            list.concat(taicpu.op_ref_reg(op1,S_L,tempref,reg.reglo));
+            inc(tempref.offset,4);
+            list.concat(taicpu.op_ref_reg(op2,S_L,tempref,reg.reghi));
+          end
+        else
+          begin
+            a_load64_ref_reg(list,ref,reg);
+            a_op64_reg_reg(list,op,size,reg,reg);
+          end;
+      end;*)
+
+
+    procedure tcg64f8086.a_op64_reg_reg(list : TAsmList;op:TOpCG;size : tcgsize;regsrc,regdst : tregister64);
+      var
+        op1,op2 : TAsmOp;
+      begin
+        case op of
+          OP_NEG :
+            begin
+              if (regsrc.reglo<>regdst.reglo) then
+                a_load64_reg_reg(list,regsrc,regdst);
+              cg.a_op_reg_reg(list,OP_NOT,OS_32,regdst.reghi,regdst.reghi);
+              cg.a_op_reg_reg(list,OP_NEG,OS_32,regdst.reglo,regdst.reglo);
+              { there's no OP_SBB, so do it directly }
+              list.concat(taicpu.op_const_reg(A_SBB,S_W,-1,regdst.reghi));
+              list.concat(taicpu.op_const_reg(A_SBB,S_W,-1,GetNextReg(regdst.reghi)));
+              exit;
+            end;
+          OP_NOT :
+            begin
+              if (regsrc.reglo<>regdst.reglo) then
+                a_load64_reg_reg(list,regsrc,regdst);
+              cg.a_op_reg_reg(list,OP_NOT,OS_32,regdst.reglo,regdst.reglo);
+              cg.a_op_reg_reg(list,OP_NOT,OS_32,regdst.reghi,regdst.reghi);
+              exit;
+            end;
+        end;
+        get_64bit_ops(op,op1,op2);
+        list.concat(taicpu.op_reg_reg(op1,S_W,regsrc.reglo,regdst.reglo));
+        list.concat(taicpu.op_reg_reg(op2,S_W,GetNextReg(regsrc.reglo),GetNextReg(regdst.reglo)));
+        list.concat(taicpu.op_reg_reg(op2,S_W,regsrc.reghi,regdst.reghi));
+        list.concat(taicpu.op_reg_reg(op2,S_W,GetNextReg(regsrc.reghi),GetNextReg(regdst.reghi)));
+      end;
+
+
+    procedure tcg64f8086.a_op64_const_reg(list : TAsmList;op:TOpCG;size : tcgsize;value : int64;reg : tregister64);
+      var
+        op1,op2 : TAsmOp;
+      begin
+        case op of
+          OP_AND,OP_OR,OP_XOR:
+            begin
+              cg.a_op_const_reg(list,op,OS_32,tcgint(lo(value)),reg.reglo);
+              cg.a_op_const_reg(list,op,OS_32,tcgint(hi(value)),reg.reghi);
+            end;
+          OP_ADD, OP_SUB:
+            begin
+              // can't use a_op_const_ref because this may use dec/inc
+              get_64bit_ops(op,op1,op2);
+              list.concat(taicpu.op_const_reg(op1,S_W,aint(value and $ffff),reg.reglo));
+              list.concat(taicpu.op_const_reg(op2,S_W,aint((value shr 16) and $ffff),GetNextReg(reg.reglo)));
+              list.concat(taicpu.op_const_reg(op2,S_W,aint((value shr 32) and $ffff),reg.reghi));
+              list.concat(taicpu.op_const_reg(op2,S_W,aint((value shr 48) and $ffff),GetNextReg(reg.reghi)));
+            end;
+          else
+            internalerror(200204021);
+        end;
+      end;
+
+
+(*    procedure tcg64f8086.a_op64_const_ref(list : TAsmList;op:TOpCG;size : tcgsize;value : int64;const ref : treference);
+      var
+        op1,op2 : TAsmOp;
+        tempref : treference;
+      begin
+        tempref:=ref;
+        tcgx86(cg).make_simple_ref(list,tempref);
+        case op of
+          OP_AND,OP_OR,OP_XOR:
+            begin
+              cg.a_op_const_ref(list,op,OS_32,tcgint(lo(value)),tempref);
+              inc(tempref.offset,4);
+              cg.a_op_const_ref(list,op,OS_32,tcgint(hi(value)),tempref);
+            end;
+          OP_ADD, OP_SUB:
+            begin
+              get_64bit_ops(op,op1,op2);
+              // can't use a_op_const_ref because this may use dec/inc
+              list.concat(taicpu.op_const_ref(op1,S_L,aint(lo(value)),tempref));
+              inc(tempref.offset,4);
+              list.concat(taicpu.op_const_ref(op2,S_L,aint(hi(value)),tempref));
+            end;
+          else
+            internalerror(200204022);
+        end;
+      end;*)
+
+    procedure create_codegen;
+      begin
+        cg := tcg8086.create;
+        cg64 := tcg64f8086.create;
+      end;
+
+end.

+ 149 - 0
compiler/i8086/cpubase.inc

@@ -0,0 +1,149 @@
+{
+    Copyright (c) 1998-2000 by Florian Klaempfl and Peter Vreman
+
+    Contains the basic declarations for the i8086 architecture
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+{ This include file contains the basic declarations for the i8086 architecture.
+}
+
+{*****************************************************************************
+                                Operand Sizes
+*****************************************************************************}
+
+    type
+      topsize = (S_NO,
+        S_B,S_W,S_L,S_Q,S_BW,S_BL,S_WL,
+        S_IS,S_IL,S_IQ,
+        S_FS,S_FL,S_FX,S_FV,S_FXX,
+        S_MD,
+        S_NEAR,S_FAR,S_SHORT,
+        S_T,
+        S_XMM,
+        S_YMM
+      );
+
+
+{*****************************************************************************
+                                Registers
+*****************************************************************************}
+  const
+      {# Standard opcode string table (for each tasmop enumeration). The
+         opcode strings should conform to the names as defined by the
+         processor manufacturer.
+      }
+      std_op2str:op2strtable={$i i8086int.inc}
+
+{*****************************************************************************
+                               GDB Information
+*****************************************************************************}
+
+      {# Register indexes for stabs information, when some
+         parameters or variables are stored in registers.
+
+         Taken from i386.c (dbx_register_map) and i386.h
+          (FIXED_REGISTERS) from GCC 3.x source code
+
+      }
+      reg_stab_table : array[tregisterindex] of shortint = (
+        {$i r8086stab.inc}
+      );
+
+
+{*****************************************************************************
+                          Default generic sizes
+*****************************************************************************}
+
+      {# Defines the default address size for a processor, }
+      OS_ADDR = OS_16;
+      {# the natural int size for a processor,
+         has to match osuinttype/ossinttype as initialized in psystem }
+      OS_INT = OS_16;
+      OS_SINT = OS_S16;
+      {# the maximum float size for a processor,           }
+      OS_FLOAT = OS_F80;
+      {# the size of a vector register for a processor     }
+      OS_VECTOR = OS_M128;
+
+{*****************************************************************************
+                          Generic Register names
+*****************************************************************************}
+
+      {# Stack pointer register }
+      NR_STACK_POINTER_REG = NR_SP;
+      RS_STACK_POINTER_REG = RS_SP;
+      {# Frame pointer register }
+      RS_FRAME_POINTER_REG = RS_BP;
+      NR_FRAME_POINTER_REG = NR_BP;
+      { Return address for DWARF }
+      NR_RETURN_ADDRESS_REG = NR_EIP;
+      {# Register for addressing absolute data in a position independant way,
+         such as in PIC code. The exact meaning is ABI specific. For
+         further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
+      }
+      NR_PIC_OFFSET_REG = NR_BX;
+      { Results are returned in this register (16-bit values) }
+      NR_FUNCTION_RETURN_REG = NR_AX;
+      RS_FUNCTION_RETURN_REG = RS_AX;
+      { Low part of 32bit return value }
+      NR_FUNCTION_RETURN32_LOW_REG = NR_AX;
+      RS_FUNCTION_RETURN32_LOW_REG = RS_AX;
+      { High part of 32bit return value }
+      NR_FUNCTION_RETURN32_HIGH_REG = NR_DX;
+      RS_FUNCTION_RETURN32_HIGH_REG = RS_DX;
+      { The value returned from a function is available in this register }
+      NR_FUNCTION_RESULT_REG = NR_FUNCTION_RETURN_REG;
+      RS_FUNCTION_RESULT_REG = RS_FUNCTION_RETURN_REG;
+      { The lowh part of 32bit value returned from a function }
+      NR_FUNCTION_RESULT32_LOW_REG = NR_FUNCTION_RETURN32_LOW_REG;
+      RS_FUNCTION_RESULT32_LOW_REG = RS_FUNCTION_RETURN32_LOW_REG;
+      { The high part of 32bit value returned from a function }
+      NR_FUNCTION_RESULT32_HIGH_REG = NR_FUNCTION_RETURN32_HIGH_REG;
+      RS_FUNCTION_RESULT32_HIGH_REG = RS_FUNCTION_RETURN32_HIGH_REG;
+
+      { WARNING: don't change to R_ST0!! See comments above implementation of }
+      { a_loadfpu* methods in rgcpu (JM)                                      }
+      NR_fpu_result_reg = NR_ST;
+      NR_mm_result_reg = NR_MM0;
+
+      { Offset where the parent framepointer is pushed }
+      PARENT_FRAMEPOINTER_OFFSET = 8;
+
+{*****************************************************************************
+                       GCC /ABI linking information
+*****************************************************************************}
+
+    const
+      {# Registers which must be saved when calling a routine declared as
+         cppdecl, cdecl, stdcall, safecall, palmossyscall. The registers
+         saved should be the ones as defined in the target ABI and / or GCC.
+
+         This value can be deduced from the CALLED_USED_REGISTERS array in the
+         GCC source.
+      }
+      saved_standard_registers : array[0..3] of tsuperregister = (RS_BX,RS_SI,RS_DI,RS_BP);
+
+      saved_mm_registers : array[0..0] of tsuperregister = (RS_INVALID);
+      {# Required parameter alignment when calling a routine declared as
+         stdcall and cdecl. The alignment value should be the one defined
+         by GCC or the target ABI.
+
+         The value of this constant is equal to the constant
+         PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
+      }
+      std_param_align = 2;

+ 130 - 0
compiler/i8086/cpuinfo.pas

@@ -0,0 +1,130 @@
+{
+    Copyright (c) 1998-2004 by Florian Klaempfl
+
+    Basic Processor information
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+Unit cpuinfo;
+
+{$i fpcdefs.inc}
+
+Interface
+
+  uses
+    globtype;
+
+Type
+   bestreal = extended;
+   ts32real = single;
+   ts64real = double;
+   ts80real = extended;
+   ts128real = type extended;
+   ts64comp = type extended;
+
+   pbestreal=^bestreal;
+
+   { possible supported processors for this target }
+   tcputype =
+      (cpu_none,
+       cpu_8086,
+       cpu_186,
+       cpu_286,
+       cpu_386,
+       cpu_Pentium,
+       cpu_Pentium2,
+       cpu_Pentium3,
+       cpu_Pentium4,
+       cpu_PentiumM
+      );
+
+   tfputype =
+     (fpu_none,
+//      fpu_soft,
+      fpu_x87,
+      fpu_sse,
+      fpu_sse2,
+      fpu_sse3,
+      fpu_ssse3,
+      fpu_sse41,
+      fpu_sse42,
+      fpu_avx
+     );
+
+
+Const
+   { calling conventions supported by the code generator }
+   supported_calling_conventions : tproccalloptions = [
+     pocall_internproc,
+     pocall_register,
+     pocall_safecall,
+     pocall_stdcall,
+     pocall_cdecl,
+     pocall_cppdecl,
+     pocall_far16,
+     pocall_pascal,
+     pocall_oldfpccall,
+     pocall_mwpascal
+   ];
+
+   cputypestr : array[tcputype] of string[10] = ('',
+     '8086',
+     '80186',
+     '80286',
+     '80386',
+     'PENTIUM',
+     'PENTIUM2',
+     'PENTIUM3',
+     'PENTIUM4',
+     'PENTIUMM'
+   );
+
+   fputypestr : array[tfputype] of string[6] = ('',
+//     'SOFT',
+     'X87',
+     'SSE',
+     'SSE2',
+     'SSE3',
+     'SSSE3',
+     'SSE41',
+     'SSE42',
+     'AVX'
+   );
+
+   sse_singlescalar : set of tfputype = [fpu_sse,fpu_sse2,fpu_sse3];
+   sse_doublescalar : set of tfputype = [fpu_sse2,fpu_sse3];
+
+   { Supported optimizations, only used for information }
+   supported_optimizerswitches = genericlevel1optimizerswitches+
+                                 genericlevel2optimizerswitches+
+                                 genericlevel3optimizerswitches-
+                                 { no need to write info about those }
+                                 [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
+                                 [cs_opt_peephole,cs_opt_regvar,cs_opt_stackframe,
+                                  cs_opt_asmcse,cs_opt_loopunroll,cs_opt_uncertain,
+                                  cs_opt_tailrecursion,cs_opt_nodecse,cs_useebp,
+				  cs_opt_reorder_fields,cs_opt_fastmath];
+
+   level1optimizerswitches = genericlevel1optimizerswitches + [cs_opt_peephole];
+   level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches +
+     [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion,cs_opt_nodecse];
+   level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
+   level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [cs_useebp];
+
+Implementation
+
+end.

+ 60 - 0
compiler/i8086/cpunode.pas

@@ -0,0 +1,60 @@
+{
+    Copyright (c) 2000-2002 by Florian Klaempfl
+
+    Includes the i8086 code generator
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit cpunode;
+
+{$i fpcdefs.inc}
+
+  interface
+
+  implementation
+
+    uses
+       { generic nodes }
+       ncgbas,
+       ncgld,
+       ncgflw,
+       ncgcnv,
+       ncgmem,
+       ncgmat,
+       ncgcon,
+       ncgcal,
+       ncgset,
+       ncginl,
+       ncgopt,
+       ncgobjc,
+       { to be able to only parts of the generic code,
+         the processor specific nodes must be included
+         after the generic one (FK)
+       }
+       nx86set,
+       nx86con,
+       nx86cnv,
+
+       n8086add{,
+       n386cal,
+       n386mem,
+       n386set},
+       n8086inl,
+       n8086mat
+       ;
+
+end.

+ 716 - 0
compiler/i8086/cpupara.pas

@@ -0,0 +1,716 @@
+{
+    Copyright (c) 2002 by Florian Klaempfl
+
+    Generates the argument location information for i8086
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit cpupara;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+       globtype,
+       aasmtai,aasmdata,cpubase,cgbase,cgutils,
+       symconst,symtype,symsym,symdef,
+       parabase,paramgr;
+
+    type
+       ti8086paramanager = class(tparamanager)
+          function param_use_paraloc(const cgpara:tcgpara):boolean;override;
+          function ret_in_param(def:tdef;pd:tabstractprocdef):boolean;override;
+          function push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;override;
+          function get_para_align(calloption : tproccalloption):byte;override;
+          function get_volatile_registers_int(calloption : tproccalloption):tcpuregisterset;override;
+          function get_volatile_registers_fpu(calloption : tproccalloption):tcpuregisterset;override;
+          function get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;override;
+          { Returns the location for the nr-st 16 Bit int parameter
+            if every parameter before is an 16 Bit int parameter as well
+            and if the calling conventions for the helper routines of the
+            rtl are used.
+
+            TODO: This allocates 32-bit ints on other CPU architectures. Since
+            we're small/tiny model only, for now we can get away with allocating
+            always 16-bit int parameters, but in the future, when we implement
+            other memory models, this mechanism has to be extended somehow to
+            support 32-bit addresses on a 16-bit CPU.
+          }
+          procedure getintparaloc(pd : tabstractprocdef; nr : longint; var cgpara : tcgpara);override;
+          function create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;override;
+          function create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargsparalist):longint;override;
+          procedure createtempparaloc(list: TAsmList;calloption : tproccalloption;parasym : tparavarsym;can_use_final_stack_loc : boolean;var cgpara:TCGPara);override;
+          function get_funcretloc(p : tabstractprocdef; side: tcallercallee; forcetempdef: tdef): TCGPara;override;
+       private
+          procedure create_stdcall_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tparalist;var parasize:longint);
+          procedure create_register_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tparalist;var parareg,parasize:longint);
+       end;
+
+
+  implementation
+
+    uses
+       cutils,
+       systems,verbose,
+       symtable,
+       defutil;
+
+      const
+        parasupregs : array[0..2] of tsuperregister = (RS_AX,RS_DX,RS_CX);
+
+{****************************************************************************
+                                ti8086paramanager
+****************************************************************************}
+
+    function ti8086paramanager.param_use_paraloc(const cgpara:tcgpara):boolean;
+      var
+        paraloc : pcgparalocation;
+      begin
+        if not assigned(cgpara.location) then
+          internalerror(200410102);
+        result:=true;
+        { All locations are LOC_REFERENCE }
+        paraloc:=cgpara.location;
+        while assigned(paraloc) do
+          begin
+            if (paraloc^.loc<>LOC_REFERENCE) then
+              begin
+                result:=false;
+                exit;
+              end;
+            paraloc:=paraloc^.next;
+          end;
+      end;
+
+
+    function ti8086paramanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean;
+      var
+        size: longint;
+      begin
+        if handle_common_ret_in_param(def,pd,result) then
+          exit;
+
+        { 64-bit types are returned as a parameter pointer, since putting them
+          in registers would require 4 registers on the i8086 }
+        if (def.size > 4) and (def.typ <> floatdef) then
+          begin
+            result:=true;
+            exit;
+          end;
+
+        result:=inherited ret_in_param(def,pd);
+      end;
+
+
+    function ti8086paramanager.push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;
+      begin
+        result:=false;
+        { var,out,constref always require address }
+        if varspez in [vs_var,vs_out,vs_constref] then
+          begin
+            result:=true;
+            exit;
+          end;
+        { Only vs_const, vs_value here }
+        case def.typ of
+          variantdef :
+            begin
+              { variants are small enough to be passed by value except if
+                required by the windows api
+
+                variants are somethings very delphi/windows specific so do it like
+                windows/delphi (FK)
+              }
+              if ((target_info.system=system_i386_win32) and
+                 (calloption in [pocall_stdcall,pocall_safecall]) and
+                 (varspez=vs_const)) or
+                 (calloption=pocall_register) then
+                result:=true
+              else
+                result:=false;
+            end;
+          formaldef :
+            result:=true;
+          recorddef :
+            begin
+              { Delphi stdcall passes records on the stack for call by value }
+              if (target_info.system=system_i386_win32) and
+                 (calloption=pocall_stdcall) and
+                 (varspez=vs_value) then
+                result:=false
+              else
+                result:=
+                  (not(calloption in (cdecl_pocalls)) and
+                   (def.size>sizeof(aint))) or
+                  (((calloption = pocall_mwpascal) or (target_info.system=system_i386_wince)) and
+                   (varspez=vs_const));
+            end;
+          arraydef :
+            begin
+              { array of const values are pushed on the stack as
+                well as dyn. arrays }
+              if (calloption in cdecl_pocalls) then
+                result:=not(is_array_of_const(def) or
+                        is_dynamic_array(def))
+              else
+                begin
+                  result:=(
+                           (tarraydef(def).highrange>=tarraydef(def).lowrange) and
+                           (def.size>sizeof(aint))
+                          ) or
+                          is_open_array(def) or
+                          is_array_of_const(def) or
+                          is_array_constructor(def);
+                end;
+            end;
+          objectdef :
+            result:=is_object(def);
+          stringdef :
+            result:= (tstringdef(def).stringtype in [st_shortstring,st_longstring]);
+          procvardef :
+            result:=not(calloption in cdecl_pocalls) and not tprocvardef(def).is_addressonly;
+          setdef :
+            result:=not(calloption in cdecl_pocalls) and (not is_smallset(def));
+        end;
+      end;
+
+
+    function ti8086paramanager.get_para_align(calloption : tproccalloption):byte;
+      begin
+        result:=std_param_align;
+      end;
+
+
+    function ti8086paramanager.get_volatile_registers_int(calloption : tproccalloption):tcpuregisterset;
+      begin
+        case calloption of
+          pocall_internproc :
+            result:=[];
+          pocall_register,
+          pocall_safecall,
+          pocall_stdcall,
+          pocall_cdecl,
+          pocall_cppdecl,
+          pocall_mwpascal :
+            result:=[RS_AX,RS_DX,RS_CX];
+          pocall_far16,
+          pocall_pascal,
+          pocall_oldfpccall :
+            result:=[RS_AX,RS_DX,RS_CX,RS_SI,RS_DI,RS_BX];
+          else
+            internalerror(200309071);
+        end;
+      end;
+
+
+    function ti8086paramanager.get_volatile_registers_fpu(calloption : tproccalloption):tcpuregisterset;
+      begin
+        result:=[0..first_fpu_imreg-1];
+      end;
+
+
+    function ti8086paramanager.get_volatile_registers_mm(calloption : tproccalloption):tcpuregisterset;
+      begin
+        result:=[0..first_mm_imreg-1];
+      end;
+
+
+    procedure ti8086paramanager.getintparaloc(pd : tabstractprocdef; nr : longint; var cgpara : tcgpara);
+      var
+        paraloc : pcgparalocation;
+        def : tdef;
+      begin
+        def:=tparavarsym(pd.paras[nr-1]).vardef;
+        cgpara.reset;
+        cgpara.size:=def_cgsize(def);
+        cgpara.intsize:=tcgsize2size[cgpara.size];
+        cgpara.alignment:=get_para_align(pd.proccalloption);
+        cgpara.def:=def;
+        paraloc:=cgpara.add_location;
+        with paraloc^ do
+         begin
+           size:=OS_INT;
+           if pd.proccalloption=pocall_register then
+             begin
+               if (nr<=length(parasupregs)) then
+                 begin
+                   if nr=0 then
+                     internalerror(200309271);
+                   loc:=LOC_REGISTER;
+                   register:=newreg(R_INTREGISTER,parasupregs[nr-1],R_SUBWHOLE);
+                 end
+               else
+                 begin
+                   loc:=LOC_REFERENCE;
+                   reference.index:=NR_STACK_POINTER_REG;
+                   { the previous parameters didn't take up room in memory }
+                   reference.offset:=sizeof(aint)*(nr-length(parasupregs)-1)
+                 end;
+             end
+           else
+             begin
+               loc:=LOC_REFERENCE;
+               reference.index:=NR_STACK_POINTER_REG;
+               reference.offset:=sizeof(aint)*nr;
+             end;
+          end;
+      end;
+
+
+    function  ti8086paramanager.get_funcretloc(p : tabstractprocdef; side: tcallercallee; forcetempdef: tdef): TCGPara;
+      var
+        retcgsize  : tcgsize;
+        paraloc : pcgparalocation;
+        sym: tfieldvarsym;
+        usedef: tdef;
+        handled: boolean;
+      begin
+        if not assigned(forcetempdef) then
+          usedef:=p.returndef
+        else
+          usedef:=forcetempdef;
+        { on darwin/i386, if a record has only one field and that field is a
+          single or double, it has to be returned like a single/double }
+        if (target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+           ((usedef.typ=recorddef) or
+            is_object(usedef)) and
+           tabstractrecordsymtable(tabstractrecorddef(usedef).symtable).has_single_field(sym) and
+           (sym.vardef.typ=floatdef) and
+           (tfloatdef(sym.vardef).floattype in [s32real,s64real]) then
+          usedef:=sym.vardef;
+
+        handled:=set_common_funcretloc_info(p,usedef,retcgsize,result);
+        { normally forcetempdef is passed straight through to
+          set_common_funcretloc_info and that one will correctly determine whether
+          the location is a temporary one, but that doesn't work here because we
+          sometimes have to change the type }
+        result.temporary:=assigned(forcetempdef);
+        if handled then
+          exit;
+
+        { darwin/x86 requires that results < sizeof(aint) are sign/zero
+          extended to sizeof(aint) }
+        if (target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+           (side=calleeside) and
+           (result.intsize>0) and
+           (result.intsize<sizeof(aint)) then
+          begin
+            result.def:=sinttype;
+            result.intsize:=sizeof(aint);
+            retcgsize:=OS_SINT;
+            result.size:=retcgsize;
+          end;
+
+        { Return in FPU register? }
+        if result.def.typ=floatdef then
+          begin
+            paraloc:=result.add_location;
+            paraloc^.loc:=LOC_FPUREGISTER;
+            paraloc^.register:=NR_FPU_RESULT_REG;
+            paraloc^.size:=retcgsize;
+          end
+        else
+         { Return in register }
+          begin
+            paraloc:=result.add_location;
+            paraloc^.loc:=LOC_REGISTER;
+            if retcgsize in [OS_64,OS_S64] then
+              internalerror(2013031201);
+            if retcgsize in [OS_32,OS_S32] then
+             begin
+               { low 16bits }
+               if side=callerside then
+                 paraloc^.register:=NR_FUNCTION_RESULT32_LOW_REG
+               else
+                 paraloc^.register:=NR_FUNCTION_RETURN32_LOW_REG;
+               paraloc^.size:=OS_16;
+
+               { high 16bits }
+               paraloc:=result.add_location;
+               paraloc^.loc:=LOC_REGISTER;
+               if side=callerside then
+                 paraloc^.register:=NR_FUNCTION_RESULT32_HIGH_REG
+               else
+                 paraloc^.register:=NR_FUNCTION_RETURN32_HIGH_REG;
+               paraloc^.size:=OS_16;
+             end
+            else
+             begin
+               paraloc^.size:=retcgsize;
+               if side=callerside then
+                 paraloc^.register:=newreg(R_INTREGISTER,RS_FUNCTION_RESULT_REG,cgsize2subreg(R_INTREGISTER,retcgsize))
+               else
+                 paraloc^.register:=newreg(R_INTREGISTER,RS_FUNCTION_RETURN_REG,cgsize2subreg(R_INTREGISTER,retcgsize));
+             end;
+          end;
+      end;
+
+
+    procedure ti8086paramanager.create_stdcall_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tparalist;var parasize:longint);
+      var
+        i  : integer;
+        hp : tparavarsym;
+        paradef : tdef;
+        paraloc : pcgparalocation;
+        l,
+        paralen,
+        varalign   : longint;
+        paraalign  : shortint;
+        pushaddr   : boolean;
+        paracgsize : tcgsize;
+      begin
+        paraalign:=get_para_align(p.proccalloption);
+        { we push Flags and CS as long
+          to cope with the IRETD
+          and we save 6 register + 4 selectors }
+        if po_interrupt in p.procoptions then
+          inc(parasize,8+6*4+4*2);
+        { Offset is calculated like:
+           sub esp,12
+           mov [esp+8],para3
+           mov [esp+4],para2
+           mov [esp],para1
+           call function
+          That means for pushes the para with the
+          highest offset (see para3) needs to be pushed first
+        }
+        if p.proccalloption in pushleftright_pocalls then
+          i:=paras.count-1
+        else
+          i:=0;
+        while ((p.proccalloption in pushleftright_pocalls) and (i>=0)) or
+              (not(p.proccalloption in pushleftright_pocalls) and (i<=paras.count-1)) do
+          begin
+            hp:=tparavarsym(paras[i]);
+            paradef:=hp.vardef;
+            pushaddr:=push_addr_param(hp.varspez,paradef,p.proccalloption);
+            if pushaddr then
+              begin
+                paralen:=sizeof(aint);
+                paracgsize:=OS_ADDR;
+                paradef:=getpointerdef(paradef);
+              end
+            else
+              begin
+                paralen:=push_size(hp.varspez,paradef,p.proccalloption);
+                { darwin/x86 requires that parameters < sizeof(aint) are sign/ }
+                { zero extended to sizeof(aint)                                }
+                if (target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+                   (side = callerside) and
+                   (paralen > 0) and
+                   (paralen < sizeof(aint)) then
+                  begin
+                    paralen:=sizeof(aint);
+                    paracgsize:=OS_SINT;
+                    paradef:=sinttype;
+                  end
+                else
+                  paracgsize:=def_cgsize(paradef);
+              end;
+            hp.paraloc[side].reset;
+            hp.paraloc[side].size:=paracgsize;
+            hp.paraloc[side].intsize:=paralen;
+            hp.paraloc[side].def:=paradef;
+            hp.paraloc[side].Alignment:=paraalign;
+            { Copy to stack? }
+            if (paracgsize=OS_NO) or
+               (use_fixed_stack) then
+              begin
+                paraloc:=hp.paraloc[side].add_location;
+                paraloc^.loc:=LOC_REFERENCE;
+                paraloc^.size:=paracgsize;
+                if side=callerside then
+                  paraloc^.reference.index:=NR_STACK_POINTER_REG
+                else
+                  paraloc^.reference.index:=NR_FRAME_POINTER_REG;
+                varalign:=used_align(size_2_align(paralen),paraalign,paraalign);
+
+                { don't let push_size return 16, because then we can    }
+                { read past the end of the heap since the value is only }
+                { 10 bytes long (JM)                                    }
+                if (paracgsize = OS_F80) and
+                   (target_info.system in [system_i386_darwin,system_i386_iphonesim]) then
+                  paralen:=16;
+                paraloc^.reference.offset:=parasize;
+                if side=calleeside then
+                  inc(paraloc^.reference.offset,target_info.first_parm_offset);
+                parasize:=align(parasize+paralen,varalign);
+              end
+            else
+              begin
+                if paralen=0 then
+                  internalerror(200501163);
+                while (paralen>0) do
+                  begin
+                    paraloc:=hp.paraloc[side].add_location;
+                    paraloc^.loc:=LOC_REFERENCE;
+                    { single and double need a single location }
+                    if (paracgsize in [OS_F64,OS_F32]) then
+                      begin
+                        paraloc^.size:=paracgsize;
+                        l:=paralen;
+                      end
+                    else
+                      begin
+                        { We can allocate at maximum 32 bits per location }
+                        if paralen>sizeof(aint) then
+                          l:=sizeof(aint)
+                        else
+                          l:=paralen;
+                        paraloc^.size:=int_cgsize(l);
+                      end;
+                    if (side=callerside) or
+                       (po_nostackframe in p.procoptions) then
+                      paraloc^.reference.index:=NR_STACK_POINTER_REG
+                    else
+                      paraloc^.reference.index:=NR_FRAME_POINTER_REG;
+                    varalign:=used_align(size_2_align(l),paraalign,paraalign);
+                    paraloc^.reference.offset:=parasize;
+                    if side=calleeside then
+                      if not(po_nostackframe in p.procoptions) then
+                        inc(paraloc^.reference.offset,target_info.first_parm_offset)
+                      else
+                        { return addres }
+                        inc(paraloc^.reference.offset,4);
+                    parasize:=align(parasize+l,varalign);
+                    dec(paralen,l);
+                  end;
+              end;
+            if p.proccalloption in pushleftright_pocalls then
+              dec(i)
+            else
+              inc(i);
+          end;
+      end;
+
+
+    procedure ti8086paramanager.create_register_paraloc_info(p : tabstractprocdef; side: tcallercallee;paras:tparalist;
+                                                            var parareg,parasize:longint);
+      var
+        hp : tparavarsym;
+        paradef : tdef;
+        paraloc : pcgparalocation;
+        paracgsize : tcgsize;
+        i : integer;
+        l,
+        paralen,
+        varalign : longint;
+        pushaddr : boolean;
+        paraalign : shortint;
+        pass : byte;
+      begin
+        if paras.count=0 then
+          exit;
+        paraalign:=get_para_align(p.proccalloption);
+
+        { clean up here so we can later detect properly if a parameter has been
+          assigned or not
+        }
+        for i:=0 to paras.count-1 do
+          tparavarsym(paras[i]).paraloc[side].reset;
+        { Register parameters are assigned from left to right,
+          stack parameters from right to left so assign first the
+          register parameters in a first pass, in the second
+          pass all unhandled parameters are done }
+        for pass:=1 to 2 do
+          begin
+            if pass=1 then
+              i:=0
+            else
+              i:=paras.count-1;
+            while true do
+              begin
+                hp:=tparavarsym(paras[i]);
+                paradef:=hp.vardef;
+                if not(assigned(hp.paraloc[side].location)) then
+                  begin
+                    pushaddr:=push_addr_param(hp.varspez,hp.vardef,p.proccalloption);
+                    if pushaddr then
+                      begin
+                        paralen:=sizeof(aint);
+                        paracgsize:=OS_ADDR;
+                        paradef:=getpointerdef(paradef);
+                      end
+                    else
+                      begin
+                        paralen:=push_size(hp.varspez,hp.vardef,p.proccalloption);
+                        paracgsize:=def_cgsize(hp.vardef);
+                      end;
+                    hp.paraloc[side].size:=paracgsize;
+                    hp.paraloc[side].intsize:=paralen;
+                    hp.paraloc[side].Alignment:=paraalign;
+                    hp.paraloc[side].def:=paradef;
+                    {
+                      EAX
+                      EDX
+                      ECX
+                      Stack
+                      Stack
+
+                      64bit values,floats,arrays and records are always
+                      on the stack.
+
+                      In case of po_delphi_nested_cc, the parent frame pointer
+                      is also always passed on the stack.
+                    }
+                    if (parareg<=high(parasupregs)) and
+                       (paralen<=sizeof(aint)) and
+                       (not(hp.vardef.typ in [floatdef,recorddef,arraydef]) or
+                        pushaddr) and
+                       (not(vo_is_parentfp in hp.varoptions) or
+                        not(po_delphi_nested_cc in p.procoptions)) then
+                      begin
+                        if pass=1 then
+                          begin
+                            paraloc:=hp.paraloc[side].add_location;
+                            paraloc^.size:=paracgsize;
+                            paraloc^.loc:=LOC_REGISTER;
+                            paraloc^.register:=newreg(R_INTREGISTER,parasupregs[parareg],cgsize2subreg(R_INTREGISTER,paracgsize));
+                            inc(parareg);
+                          end;
+                      end
+                    else
+                      if pass=2 then
+                        begin
+                          { Copy to stack? }
+                          if (use_fixed_stack) or
+                             (paracgsize=OS_NO) then
+                            begin
+                              paraloc:=hp.paraloc[side].add_location;
+                              paraloc^.loc:=LOC_REFERENCE;
+                              paraloc^.size:=paracgsize;
+                              if side=callerside then
+                                paraloc^.reference.index:=NR_STACK_POINTER_REG
+                              else
+                                paraloc^.reference.index:=NR_FRAME_POINTER_REG;
+                              varalign:=used_align(size_2_align(paralen),paraalign,paraalign);
+                              paraloc^.reference.offset:=parasize;
+                              if side=calleeside then
+                                inc(paraloc^.reference.offset,target_info.first_parm_offset);
+                              parasize:=align(parasize+paralen,varalign);
+                            end
+                          else
+                            begin
+                              if paralen=0 then
+                                internalerror(200501163);
+                              while (paralen>0) do
+                                begin
+                                  paraloc:=hp.paraloc[side].add_location;
+                                  paraloc^.loc:=LOC_REFERENCE;
+                                  { Extended and double need a single location }
+                                  if (paracgsize in [OS_F64,OS_F32]) then
+                                    begin
+                                      paraloc^.size:=paracgsize;
+                                      l:=paralen;
+                                    end
+                                  else
+                                    begin
+                                      { We can allocate at maximum 32 bits per location }
+                                      if paralen>sizeof(aint) then
+                                        l:=sizeof(aint)
+                                      else
+                                        l:=paralen;
+                                      paraloc^.size:=int_cgsize(l);
+                                    end;
+                                  if side=callerside then
+                                    paraloc^.reference.index:=NR_STACK_POINTER_REG
+                                  else
+                                    paraloc^.reference.index:=NR_FRAME_POINTER_REG;
+                                  varalign:=used_align(size_2_align(l),paraalign,paraalign);
+                                  paraloc^.reference.offset:=parasize;
+                                  if side=calleeside then
+                                    inc(paraloc^.reference.offset,target_info.first_parm_offset);
+                                  parasize:=align(parasize+l,varalign);
+                                  dec(paralen,l);
+                                end;
+                            end;
+                        end;
+                  end;
+                case pass of
+                  1:
+                    begin
+                      if i=paras.count-1 then
+                        break;
+                      inc(i);
+                    end;
+                  2:
+                    begin
+                      if i=0 then
+                        break;
+                      dec(i);
+                    end;
+                end;
+              end;
+          end;
+      end;
+
+
+    function ti8086paramanager.create_paraloc_info(p : tabstractprocdef; side: tcallercallee):longint;
+      var
+        parasize,
+        parareg : longint;
+      begin
+        parasize:=0;
+        parareg:=0;
+        case p.proccalloption of
+          pocall_register :
+            create_register_paraloc_info(p,side,p.paras,parareg,parasize);
+          pocall_internproc :
+            begin
+              { Use default calling }
+{$warnings off}
+              if (pocall_default=pocall_register) then
+                create_register_paraloc_info(p,side,p.paras,parareg,parasize)
+              else
+                create_stdcall_paraloc_info(p,side,p.paras,parasize);
+{$warnings on}
+            end;
+          else
+            create_stdcall_paraloc_info(p,side,p.paras,parasize);
+        end;
+        create_funcretloc_info(p,side);
+        result:=parasize;
+      end;
+
+
+    function ti8086paramanager.create_varargs_paraloc_info(p : tabstractprocdef; varargspara:tvarargsparalist):longint;
+      var
+        parasize : longint;
+      begin
+        parasize:=0;
+        { calculate the registers for the normal parameters }
+        create_stdcall_paraloc_info(p,callerside,p.paras,parasize);
+        { append the varargs }
+        create_stdcall_paraloc_info(p,callerside,varargspara,parasize);
+        result:=parasize;
+      end;
+
+
+    procedure ti8086paramanager.createtempparaloc(list: TAsmList;calloption : tproccalloption;parasym : tparavarsym;can_use_final_stack_loc : boolean;var cgpara:TCGPara);
+      begin
+        { Never a need for temps when value is pushed (calls inside parameters
+          will simply allocate even more stack space for their parameters) }
+        if not(use_fixed_stack) then
+          can_use_final_stack_loc:=true;
+        inherited createtempparaloc(list,calloption,parasym,can_use_final_stack_loc,cgpara);
+      end;
+
+
+begin
+   paramanager:=ti8086paramanager.create;
+end.

+ 100 - 0
compiler/i8086/cpupi.pas

@@ -0,0 +1,100 @@
+{
+    Copyright (c) 2002 by Florian Klaempfl
+
+    This unit contains the CPU specific part of tprocinfo
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+
+{ This unit contains the CPU specific part of tprocinfo. }
+unit cpupi;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+       psub,procinfo,aasmdata;
+
+    type
+       ti8086procinfo = class(tcgprocinfo)
+         constructor create(aparent:tprocinfo);override;
+         procedure set_first_temp_offset;override;
+         function calc_stackframe_size:longint;override;
+         procedure generate_parameter_info;override;
+       end;
+
+
+  implementation
+
+    uses
+      cutils,
+      systems,globals,globtype,
+      cgobj,tgobj,paramgr,
+      cpubase,
+      cgutils,
+      symconst;
+
+    constructor ti8086procinfo.create(aparent:tprocinfo);
+      begin
+        inherited create(aparent);
+        got:=NR_EBX;
+      end;
+
+
+    procedure ti8086procinfo.set_first_temp_offset;
+      begin
+        if paramanager.use_fixed_stack then
+          begin
+            if not(po_assembler in procdef.procoptions) and
+               (tg.direction > 0) then
+              tg.setfirsttemp(tg.direction*maxpushedparasize);
+            if (tg.direction < 0) and
+               not(po_nostackframe in procdef.procoptions) then
+              { compensate for the return address and the "pushl %ebp" }
+              tg.setalignmentmismatch(sizeof(pint)*2);
+          end;
+      end;
+
+
+    function ti8086procinfo.calc_stackframe_size:longint;
+      begin
+        { ???:
+          align to 4 bytes at least
+          otherwise all those subl $2,%esp are meaningless PM }
+        if target_info.stackalign<=2 then
+          result:=Align(tg.direction*tg.lasttemp,min(current_settings.alignment.localalignmax,2))
+        else
+          { aligned during stack frame allocation, because also depends number
+            of saved registers }
+          result:=tg.direction*tg.lasttemp+maxpushedparasize;
+      end;
+
+
+    procedure ti8086procinfo.generate_parameter_info;
+      begin
+        inherited generate_parameter_info;
+        { Para_stack_size is only used to determine how many bytes to remove }
+        { from the stack at the end of the procedure (in the "ret $xx").     }
+        { If the stack is fixed, nothing has to be removed by the callee     }
+        if paramanager.use_fixed_stack then
+          para_stack_size := 0;
+      end;
+
+begin
+   cprocinfo:=ti8086procinfo;
+end.

+ 88 - 0
compiler/i8086/cputarg.pas

@@ -0,0 +1,88 @@
+{
+    Copyright (c) 2001-2002 by Peter Vreman
+
+    Includes the i8086 dependent target units
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit cputarg;
+
+{$i fpcdefs.inc}
+
+interface
+
+
+implementation
+
+    uses
+      systems { prevent a syntax error when nothing is included }
+
+{**************************************
+             Targets
+**************************************}
+
+    {$ifndef NOTARGETMSDOS}
+      ,t_msdos
+    {$endif}
+
+{**************************************
+             Assemblers
+**************************************}
+
+    {$ifndef NOAG386ATT}
+//      ,agx86att
+    {$endif}
+    {$ifndef NOAG386NSM}
+      ,agx86nsm
+    {$endif}
+    {$ifndef NOAG386INT}
+//      ,agx86int
+    {$endif}
+
+//      ,ogcoff
+//      ,ogelf
+//      ,ogmacho
+//      ,cpuelf
+
+{**************************************
+        Assembler Readers
+**************************************}
+
+  {$ifndef NoRa8086Int}
+       ,ra8086int
+  {$endif NoRa8086Int}
+  {$ifndef NoRa8086Att}
+       ,ra8086att
+  {$endif NoRa8086Att}
+
+{**************************************
+             Debuginfo
+**************************************}
+
+  {$ifndef NoCFIDwarf}
+      ,cfidwarf
+  {$endif NoCFIDwarf}
+  {$ifndef NoDbgStabs}
+      ,dbgstabs
+  {$endif NoDbgStabs}
+  {$ifndef NoDbgDwarf}
+      ,dbgdwarf
+  {$endif NoDbgDwarf}
+
+      ;
+
+end.

+ 203 - 0
compiler/i8086/hlcgcpu.pas

@@ -0,0 +1,203 @@
+{
+    Copyright (c) 1998-2010 by Florian Klaempfl and Jonas Maebe
+    Member of the Free Pascal development team
+
+    This unit contains routines to create a pass-through high-level code
+    generator. This is used by most regular code generators.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+
+unit hlcgcpu;
+
+{$i fpcdefs.inc}
+
+interface
+
+  uses
+    aasmdata,
+    symtype,symdef,parabase,
+    cgbase,cgutils,
+    hlcgobj, hlcgx86;
+
+
+  type
+    thlcgcpu = class(thlcgx86)
+     protected
+      procedure gen_loadfpu_loc_cgpara(list: TAsmList; size: tdef; const l: tlocation; const cgpara: tcgpara; locintsize: longint); override;
+     public
+      procedure g_copyvaluepara_openarray(list: TAsmList; const ref: treference; const lenloc: tlocation; arrdef: tarraydef; destreg: tregister); override;
+      procedure g_releasevaluepara_openarray(list: TAsmList; arrdef: tarraydef; const l: tlocation); override;
+    end;
+
+  procedure create_hlcodegen;
+
+implementation
+
+  uses
+    globtype,verbose,
+    paramgr,
+    cpubase,tgobj,cgobj,cgcpu;
+
+  { thlcgcpu }
+
+  procedure thlcgcpu.gen_loadfpu_loc_cgpara(list: TAsmList; size: tdef; const l: tlocation; const cgpara: tcgpara; locintsize: longint);
+    var
+      locsize : tcgsize;
+      tmploc : tlocation;
+      href   : treference;
+      stacksize   : longint;
+    begin
+      if not(l.size in [OS_32,OS_S32,OS_64,OS_S64,OS_128,OS_S128]) then
+        locsize:=l.size
+      else
+        locsize:=int_float_cgsize(tcgsize2size[l.size]);
+      case l.loc of
+        LOC_FPUREGISTER,
+        LOC_CFPUREGISTER:
+          begin
+            case cgpara.location^.loc of
+              LOC_REFERENCE:
+                begin
+                  stacksize:=align(locintsize,cgpara.alignment);
+                  if (not paramanager.use_fixed_stack) and
+                     (cgpara.location^.reference.index=NR_STACK_POINTER_REG) then
+                    begin
+                      cg.g_stackpointer_alloc(list,stacksize);
+                      reference_reset_base(href,NR_STACK_POINTER_REG,0,sizeof(pint));
+                    end
+                  else
+                    reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.alignment);
+                  cg.a_loadfpu_reg_ref(list,locsize,locsize,l.register,href);
+                end;
+              LOC_FPUREGISTER:
+                begin
+                  cg.a_loadfpu_reg_reg(list,locsize,cgpara.location^.size,l.register,cgpara.location^.register);
+                end;
+              { can happen if a record with only 1 "single field" is
+                returned in a floating point register and then is directly
+                passed to a regcall parameter }
+              LOC_REGISTER:
+                begin
+                  tmploc:=l;
+                  location_force_mem(list,tmploc,size);
+                  case locsize of
+                    OS_F32:
+                      tmploc.size:=OS_32;
+                    OS_F64:
+                      tmploc.size:=OS_64;
+                    else
+                      internalerror(2010053116);
+                  end;
+                  cg.a_load_loc_cgpara(list,tmploc,cgpara);
+                  location_freetemp(list,tmploc);
+                end
+              else
+                internalerror(2010053003);
+            end;
+          end;
+        LOC_MMREGISTER,
+        LOC_CMMREGISTER:
+          begin
+            case cgpara.location^.loc of
+              LOC_REFERENCE:
+                begin
+                  { can't use TCGSize2Size[l.size], because the size of an
+                    80 bit extended parameter can be either 10 or 12 bytes }
+                  stacksize:=align(locintsize,cgpara.alignment);
+                  if (not paramanager.use_fixed_stack) and
+                     (cgpara.location^.reference.index=NR_STACK_POINTER_REG) then
+                    begin
+                      cg.g_stackpointer_alloc(list,stacksize);
+                      reference_reset_base(href,NR_STACK_POINTER_REG,0,sizeof(pint));
+                    end
+                  else
+                    reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.alignment);
+                  cg.a_loadmm_reg_ref(list,locsize,locsize,l.register,href,mms_movescalar);
+                end;
+              LOC_FPUREGISTER:
+                begin
+                  tmploc:=l;
+                  location_force_mem(list,tmploc,size);
+                  cg.a_loadfpu_ref_cgpara(list,tmploc.size,tmploc.reference,cgpara);
+                  location_freetemp(list,tmploc);
+                end;
+              else
+                internalerror(2010053004);
+            end;
+          end;
+        LOC_REFERENCE,
+        LOC_CREFERENCE :
+          begin
+            case cgpara.location^.loc of
+              LOC_REFERENCE:
+                begin
+                  stacksize:=align(locintsize,cgpara.alignment);
+                  if (not paramanager.use_fixed_stack) and
+                     (cgpara.location^.reference.index=NR_STACK_POINTER_REG) then
+                    cg.a_load_ref_cgpara(list,locsize,l.reference,cgpara)
+                  else
+                    begin
+                      reference_reset_base(href,cgpara.location^.reference.index,cgpara.location^.reference.offset,cgpara.alignment);
+                      cg.g_concatcopy(list,l.reference,href,stacksize);
+                    end;
+                end;
+              LOC_FPUREGISTER:
+                begin
+                  cg.a_loadfpu_ref_cgpara(list,locsize,l.reference,cgpara);
+                end;
+              else
+                internalerror(2010053005);
+            end;
+          end;
+        else
+          internalerror(2002042430);
+      end;
+    end;
+
+
+  procedure thlcgcpu.g_copyvaluepara_openarray(list: TAsmList; const ref: treference; const lenloc: tlocation; arrdef: tarraydef; destreg: tregister);
+    begin
+      if paramanager.use_fixed_stack then
+        begin
+          inherited;
+          exit;
+        end;
+      tcg8086(cg).g_copyvaluepara_openarray(list,ref,lenloc,arrdef.elesize,destreg);
+    end;
+
+
+  procedure thlcgcpu.g_releasevaluepara_openarray(list: TAsmList; arrdef: tarraydef; const l: tlocation);
+    begin
+      if paramanager.use_fixed_stack then
+        begin
+          inherited;
+          exit;
+        end;
+      tcg8086(cg).g_releasevaluepara_openarray(list,l);
+    end;
+
+
+  procedure create_hlcodegen;
+    begin
+      hlcg:=thlcgcpu.create;
+      create_codegen;
+    end;
+
+
+
+end.

+ 947 - 0
compiler/i8086/i8086att.inc

@@ -0,0 +1,947 @@
+{ don't edit, this file is generated from x86ins.dat }
+(
+'none',
+'aaa',
+'aad',
+'aam',
+'aas',
+'adc',
+'add',
+'and',
+'arpl',
+'bound',
+'bsf',
+'bsr',
+'bswap',
+'bt',
+'btc',
+'btr',
+'bts',
+'call',
+'cbtw',
+'cltd',
+'clc',
+'cld',
+'cli',
+'clts',
+'cmc',
+'cmp',
+'cmpsb',
+'cmpsl',
+'cmpsw',
+'cmpxchg',
+'cmpxchg486',
+'cmpxchg8b',
+'cpuid',
+'cwd',
+'cwtl',
+'daa',
+'das',
+'dec',
+'div',
+'emms',
+'enter',
+'f2xm1',
+'fabs',
+'fadd',
+'faddp',
+'fbld',
+'fbstp',
+'fchs',
+'fclex',
+'fcmovb',
+'fcmovbe',
+'fcmove',
+'fcmovnb',
+'fcmovnbe',
+'fcmovne',
+'fcmovnu',
+'fcmovu',
+'fcom',
+'fcomi',
+'fcomip',
+'fcomp',
+'fcompp',
+'fcos',
+'fdecstp',
+'fdisi',
+'fdiv',
+'fdivp',
+'fdivr',
+'fdivrp',
+'femms',
+'feni',
+'ffree',
+'fiadd',
+'ficom',
+'ficomp',
+'fidiv',
+'fidivr',
+'fild',
+'fimul',
+'fincstp',
+'finit',
+'fist',
+'fistp',
+'fisttp',
+'fisub',
+'fisubr',
+'fld',
+'fld1',
+'fldcw',
+'fldenv',
+'fldl2e',
+'fldl2t',
+'fldlg2',
+'fldln2',
+'fldpi',
+'fldz',
+'fmul',
+'fmulp',
+'fnclex',
+'fndisi',
+'fneni',
+'fninit',
+'fnop',
+'fnsave',
+'fnstcw',
+'fnstenv',
+'fnstsw',
+'fpatan',
+'fprem',
+'fprem1',
+'fptan',
+'frndint',
+'frstor',
+'fsave',
+'fscale',
+'fsetpm',
+'fsin',
+'fsincos',
+'fsqrt',
+'fst',
+'fstcw',
+'fstenv',
+'fstp',
+'fstsw',
+'fsub',
+'fsubp',
+'fsubr',
+'fsubrp',
+'ftst',
+'fucom',
+'fucomi',
+'fucomip',
+'fucomp',
+'fucompp',
+'fwait',
+'fxam',
+'fxch',
+'fxtract',
+'fyl2x',
+'fyl2xp1',
+'hlt',
+'ibts',
+'icebp',
+'idiv',
+'imul',
+'in',
+'inc',
+'insb',
+'insl',
+'insw',
+'int',
+'int01',
+'int1',
+'int03',
+'int3',
+'into',
+'invd',
+'invlpg',
+'iret',
+'iret',
+'iretw',
+'iretq',
+'jcxz',
+'jecxz',
+'jrcxz',
+'jmp',
+'lahf',
+'lar',
+'lcall',
+'lds',
+'lea',
+'leave',
+'les',
+'lfs',
+'lgdt',
+'lgs',
+'lidt',
+'ljmp',
+'lldt',
+'lmsw',
+'loadall',
+'loadall286',
+'lock',
+'lodsb',
+'lodsl',
+'lodsw',
+'loop',
+'loope',
+'loopne',
+'loopnz',
+'loopz',
+'lsl',
+'lss',
+'ltr',
+'monitor',
+'mov',
+'movd',
+'movq',
+'movsb',
+'movsl',
+'movsq',
+'movsw',
+'movs',
+'movz',
+'mul',
+'mwait',
+'neg',
+'nop',
+'not',
+'or',
+'out',
+'outsb',
+'outsl',
+'outsw',
+'packssdw',
+'packsswb',
+'packuswb',
+'paddb',
+'paddd',
+'paddsb',
+'paddsiw',
+'paddsw',
+'paddusb',
+'paddusw',
+'paddw',
+'pand',
+'pandn',
+'paveb',
+'pavgusb',
+'pcmpeqb',
+'pcmpeqd',
+'pcmpeqw',
+'pcmpgtb',
+'pcmpgtd',
+'pcmpgtw',
+'pdistib',
+'pf2id',
+'pfacc',
+'pfadd',
+'pfcmpeq',
+'pfcmpge',
+'pfcmpgt',
+'pfmax',
+'pfmin',
+'pfmul',
+'pfrcp',
+'pfrcpit1',
+'pfrcpit2',
+'pfrsqit1',
+'pfrsqrt',
+'pfsub',
+'pfsubr',
+'pi2fd',
+'pmachriw',
+'pmaddwd',
+'pmagw',
+'pmulhriw',
+'pmulhrwa',
+'pmulhrwc',
+'pmulhw',
+'pmullw',
+'pmvgezb',
+'pmvlzb',
+'pmvnzb',
+'pmvzb',
+'pop',
+'popa',
+'popal',
+'popaw',
+'popf',
+'popfl',
+'popfw',
+'popfq',
+'por',
+'prefetch',
+'prefetchw',
+'pslld',
+'pslldq',
+'psllq',
+'psllw',
+'psrad',
+'psraw',
+'psrld',
+'psrlq',
+'psrlw',
+'psubb',
+'psubd',
+'psubsb',
+'psubsiw',
+'psubsw',
+'psubusb',
+'psubusw',
+'psubw',
+'punpckhbw',
+'punpckhdq',
+'punpckhwd',
+'punpcklbw',
+'punpckldq',
+'punpcklwd',
+'push',
+'pusha',
+'pushal',
+'pushaw',
+'pushf',
+'pushfl',
+'pushfw',
+'pushfq',
+'pxor',
+'rcl',
+'rcr',
+'rdshr',
+'rdmsr',
+'rdpmc',
+'rdtsc',
+'rep',
+'repe',
+'repne',
+'repnz',
+'repz',
+'ret',
+'lret',
+'ret',
+'rol',
+'ror',
+'rsdc',
+'rsldt',
+'rsm',
+'sahf',
+'sal',
+'salc',
+'sar',
+'sbb',
+'scasb',
+'scasl',
+'scasq',
+'scasw',
+'cs',
+'ds',
+'es',
+'fs',
+'gs',
+'ss',
+'sgdt',
+'shl',
+'shld',
+'shr',
+'shrd',
+'sidt',
+'sldt',
+'smi',
+'smint',
+'smintold',
+'smsw',
+'stc',
+'std',
+'sti',
+'stosb',
+'stosl',
+'stosw',
+'str',
+'sub',
+'svdc',
+'svldt',
+'svts',
+'syscall',
+'sysenter',
+'sysexit',
+'sysret',
+'test',
+'ud1',
+'ud2',
+'umov',
+'verr',
+'verw',
+'wait',
+'wbinvd',
+'wrshr',
+'wrmsr',
+'xadd',
+'xbts',
+'xchg',
+'xlat',
+'xlatb',
+'xor',
+'xstore',
+'xcryptecb',
+'xcryptcbc',
+'xcryptcfb',
+'xcryptofb',
+'cmov',
+'j',
+'set',
+'addps',
+'addss',
+'andnps',
+'andps',
+'cmpeqps',
+'cmpeqss',
+'cmpleps',
+'cmpless',
+'cmpltps',
+'cmpltss',
+'cmpneqps',
+'cmpneqss',
+'cmpnleps',
+'cmpnless',
+'cmpnltps',
+'cmpnltss',
+'cmpordps',
+'cmpordss',
+'cmpunordps',
+'cmpunordss',
+'cmpps',
+'cmpss',
+'comiss',
+'cvtpi2ps',
+'cvtps2pi',
+'cvtsi2ss',
+'cvtss2si',
+'cvttps2pi',
+'cvttss2si',
+'divps',
+'divss',
+'ldmxcsr',
+'maxps',
+'maxss',
+'minps',
+'minss',
+'movaps',
+'movhps',
+'movlhps',
+'movlps',
+'movhlps',
+'movmskps',
+'movntps',
+'movss',
+'movups',
+'mulps',
+'mulss',
+'orps',
+'rcpps',
+'rcpss',
+'rsqrtps',
+'rsqrtss',
+'shufps',
+'sqrtps',
+'sqrtss',
+'stmxcsr',
+'subps',
+'subss',
+'ucomiss',
+'unpckhps',
+'unpcklps',
+'xorps',
+'fxrstor',
+'fxsave',
+'prefetchnta',
+'prefetcht0',
+'prefetcht1',
+'prefetcht2',
+'sfence',
+'maskmovq',
+'movntq',
+'pavgb',
+'pavgw',
+'pextrw',
+'pinsrw',
+'pmaxsw',
+'pmaxub',
+'pminsw',
+'pminub',
+'pmovmskb',
+'pmulhuw',
+'psadbw',
+'pshufw',
+'pfnacc',
+'pfpnacc',
+'pi2fw',
+'pf2iw',
+'pswapd',
+'ffreep',
+'maskmovdqu',
+'clflush',
+'movntdq',
+'movnti',
+'movntpd',
+'pause',
+'lfence',
+'mfence',
+'movdqa',
+'movdqu',
+'movdq2q',
+'movq2dq',
+'paddq',
+'pmuludq',
+'pshufd',
+'pshufhw',
+'pshuflw',
+'psrldq',
+'psubq',
+'punpckhqdq',
+'punpcklqdq',
+'addpd',
+'addsd',
+'andnpd',
+'andpd',
+'cmpeqpd',
+'cmpeqsd',
+'cmplepd',
+'cmplesd',
+'cmpltpd',
+'cmpltsd',
+'cmpneqpd',
+'cmpneqsd',
+'cmpnlepd',
+'cmpnlesd',
+'cmpnltpd',
+'cmpnltsd',
+'cmpordpd',
+'cmpordsd',
+'cmpunordpd',
+'cmpunordsd',
+'cmppd',
+'comisd',
+'cvtdq2pd',
+'cvtdq2ps',
+'cvtpd2dq',
+'cvtpd2pi',
+'cvtpd2ps',
+'cvtpi2pd',
+'cvtps2dq',
+'cvtps2pd',
+'cvtsd2si',
+'cvtsd2ss',
+'cvtsi2sd',
+'cvtss2sd',
+'cvttpd2pi',
+'cvttpd2dq',
+'cvttps2dq',
+'cvttsd2si',
+'divpd',
+'divsd',
+'maxpd',
+'maxsd',
+'minpd',
+'minsd',
+'movapd',
+'movhpd',
+'movlpd',
+'movmskpd',
+'movupd',
+'mulpd',
+'mulsd',
+'orpd',
+'shufpd',
+'sqrtpd',
+'sqrtsd',
+'subpd',
+'subsd',
+'ucomisd',
+'unpckhpd',
+'unpcklpd',
+'xorpd',
+'addsubpd',
+'addsubps',
+'haddpd',
+'haddps',
+'hsubpd',
+'hsubps',
+'lddqu',
+'movddup',
+'movshdup',
+'movsldup',
+'vmread',
+'vmwrite',
+'vmcall',
+'vmlaunch',
+'vmresume',
+'vmxoff',
+'vmxon',
+'vmclear',
+'vmptrld',
+'vmptrst',
+'vmrun',
+'vmmcall',
+'vmload',
+'vmsave',
+'stgi',
+'clgi',
+'skinit',
+'invlpga',
+'montmul',
+'xsha1',
+'xsha256',
+'dmint',
+'rdm',
+'movabs',
+'movslq',
+'cqto',
+'cmpxchg16b',
+'movntss',
+'movntsd',
+'insertq',
+'extrq',
+'lzcnt',
+'pabsb',
+'pabsw',
+'pabsd',
+'palignr',
+'phaddw',
+'phaddd',
+'phaddsw',
+'phsubw',
+'phsubd',
+'phsubsw',
+'pmaddubsw',
+'pmulhrsw',
+'pshufb',
+'psignb',
+'psignw',
+'psignd',
+'blendps',
+'blendpd',
+'blendvps',
+'blendvpd',
+'dpps',
+'dppd',
+'extractps',
+'insertps',
+'movntdqa',
+'mpsadbw',
+'packusdw',
+'pblendvb',
+'pblendw',
+'pcmpeqq',
+'pextrb',
+'pextrd',
+'pextrq',
+'phminposuw',
+'pinsrb',
+'pinsrd',
+'pinsrq',
+'pmaxsb',
+'pmaxsd',
+'pmaxud',
+'pmaxuw',
+'pminsb',
+'pminsd',
+'pminuw',
+'pminud',
+'pmovsxbw',
+'pmovsxbd',
+'pmovsxbq',
+'pmovsxwd',
+'pmovsxwq',
+'pmovsxdq',
+'pmovzxbw',
+'pmovzxbd',
+'pmovzxbq',
+'pmovzxwd',
+'pmovzxwq',
+'pmovzxdq',
+'pmuldq',
+'pmulld',
+'ptest',
+'roundps',
+'roundpd',
+'roundss',
+'roundsd',
+'crc32',
+'pcmpestri',
+'pcmpestrm',
+'pcmpistri',
+'pcmpistrm',
+'pcmpgtq',
+'popcnt',
+'aesenc',
+'aesenclast',
+'aesdec',
+'aesdeclast',
+'aesimc',
+'aeskeygenassist',
+'stosq',
+'lodsq',
+'cmpsq',
+'vaddpd',
+'vaddps',
+'vaddsd',
+'vaddss',
+'vaddsubpd',
+'vaddsubps',
+'vaesdec',
+'vaesdeclast',
+'vaesenc',
+'vaesenclast',
+'vaesimc',
+'vaeskeygenassist',
+'vandnpd',
+'vandnps',
+'vandpd',
+'vandps',
+'vblendpd',
+'vblendps',
+'vblendvpd',
+'vblendvps',
+'vbroadcastf128',
+'vbroadcastsd',
+'vbroadcastss',
+'vcmppd',
+'vcmpps',
+'vcmpsd',
+'vcmpss',
+'vcomisd',
+'vcomiss',
+'vcvtdq2pd',
+'vcvtdq2ps',
+'vcvtpd2dq',
+'vcvtpd2ps',
+'vcvtps2dq',
+'vcvtps2pd',
+'vcvtsd2si',
+'vcvtsd2ss',
+'vcvtsi2sd',
+'vcvtsi2ss',
+'vcvtss2sd',
+'vcvtss2si',
+'vcvttpd2dq',
+'vcvttps2dq',
+'vcvttsd2si',
+'vcvttss2si',
+'vdivpd',
+'vdivps',
+'vdivsd',
+'vdivss',
+'vdppd',
+'vdpps',
+'vextractf128',
+'vextractps',
+'vhaddpd',
+'vhaddps',
+'vhsubpd',
+'vhsubps',
+'vinsertf128',
+'vinsertps',
+'vlddqu',
+'vldmxcsr',
+'vmaskmovdqu',
+'vmaskmovpd',
+'vmaskmovps',
+'vmaxpd',
+'vmaxps',
+'vmaxsd',
+'vmaxss',
+'vminpd',
+'vminps',
+'vminsd',
+'vminss',
+'vmovapd',
+'vmovaps',
+'vmovd',
+'vmovddup',
+'vmovdqa',
+'vmovdqu',
+'vmovhlps',
+'vmovhpd',
+'vmovhps',
+'vmovlhps',
+'vmovlpd',
+'vmovlps',
+'vmovmskpd',
+'vmovmskps',
+'vmovntdq',
+'vmovntdqa',
+'vmovntpd',
+'vmovntps',
+'vmovq',
+'vmovsd',
+'vmovshdup',
+'vmovsldup',
+'vmovss',
+'vmovupd',
+'vmovups',
+'vmpsadbw',
+'vmulpd',
+'vmulps',
+'vmulsd',
+'vmulss',
+'vorpd',
+'vorps',
+'vpabsb',
+'vpabsd',
+'vpabsw',
+'vpackssdw',
+'vpacksswb',
+'vpackusdw',
+'vpackuswb',
+'vpaddb',
+'vpaddd',
+'vpaddq',
+'vpaddsb',
+'vpaddsw',
+'vpaddusb',
+'vpaddusw',
+'vpaddw',
+'vpalignr',
+'vpand',
+'vpandn',
+'vpavgb',
+'vpavgw',
+'vpblendvb',
+'vpblendw',
+'vpclmulqdq',
+'vpcmpeqb',
+'vpcmpeqd',
+'vpcmpeqq',
+'vpcmpeqw',
+'vpcmpestri',
+'vpcmpestrm',
+'vpcmpgtb',
+'vpcmpgtd',
+'vpcmpgtq',
+'vpcmpgtw',
+'vpcmpistri',
+'vpcmpistrm',
+'vperm2f128',
+'vpermilpd',
+'vpermilps',
+'vpextrb',
+'vpextrd',
+'vpextrq',
+'vpextrw',
+'vphaddd',
+'vphaddsw',
+'vphaddw',
+'vphminposuw',
+'vphsubd',
+'vphsubsw',
+'vphsubw',
+'vpinsrb',
+'vpinsrd',
+'vpinsrq',
+'vpinsrw',
+'vpmaddubsw',
+'vpmaddwd',
+'vpmaxsb',
+'vpmaxsd',
+'vpmaxsw',
+'vpmaxub',
+'vpmaxud',
+'vpmaxuw',
+'vpminsb',
+'vpminsd',
+'vpminsw',
+'vpminub',
+'vpminud',
+'vpminuw',
+'vpmovmskb',
+'vpmovsxbd',
+'vpmovsxbq',
+'vpmovsxbw',
+'vpmovsxdq',
+'vpmovsxwd',
+'vpmovsxwq',
+'vpmovzxbd',
+'vpmovzxbq',
+'vpmovzxbw',
+'vpmovzxdq',
+'vpmovzxwd',
+'vpmovzxwq',
+'vpmuldq',
+'vpmulhrsw',
+'vpmulhuw',
+'vpmulhw',
+'vpmulld',
+'vpmullw',
+'vpmuludq',
+'vpor',
+'vpsadbw',
+'vpshufb',
+'vpshufd',
+'vpshufhw',
+'vpshuflw',
+'vpsignb',
+'vpsignd',
+'vpsignw',
+'vpslld',
+'vpslldq',
+'vpsllq',
+'vpsllw',
+'vpsrad',
+'vpsraw',
+'vpsrld',
+'vpsrldq',
+'vpsrlq',
+'vpsrlw',
+'vpsubb',
+'vpsubd',
+'vpsubq',
+'vpsubsb',
+'vpsubsw',
+'vpsubusb',
+'vpsubusw',
+'vpsubw',
+'vptest',
+'vpunpckhbw',
+'vpunpckhdq',
+'vpunpckhqdq',
+'vpunpckhwd',
+'vpunpcklbw',
+'vpunpckldq',
+'vpunpcklqdq',
+'vpunpcklwd',
+'vpxor',
+'vrcpps',
+'vrcpss',
+'vroundpd',
+'vroundps',
+'vroundsd',
+'vroundss',
+'vrsqrtps',
+'vrsqrtss',
+'vshufpd',
+'vshufps',
+'vsqrtpd',
+'vsqrtps',
+'vsqrtsd',
+'vsqrtss',
+'vstmxcsr',
+'vsubpd',
+'vsubps',
+'vsubsd',
+'vsubss',
+'vtestpd',
+'vtestps',
+'vucomisd',
+'vucomiss',
+'vunpckhpd',
+'vunpckhps',
+'vunpcklpd',
+'vunpcklps',
+'vxorpd',
+'vxorps',
+'vzeroall',
+'vzeroupper'
+);

+ 947 - 0
compiler/i8086/i8086atts.inc

@@ -0,0 +1,947 @@
+{ don't edit, this file is generated from x86ins.dat }
+(
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufNONE,
+attsufNONE,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPUint,
+attsufFPU,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufINT,
+attsufNONE,
+attsufFPU,
+attsufINT,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufFPU,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINTdual,
+attsufINTdual,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufINT,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufMM,
+attsufINT,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufMM,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufINT,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufMM,
+attsufMM,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufMM,
+attsufMM,
+attsufNONE,
+attsufNONE,
+attsufMM,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE,
+attsufNONE
+);

+ 947 - 0
compiler/i8086/i8086int.inc

@@ -0,0 +1,947 @@
+{ don't edit, this file is generated from x86ins.dat }
+(
+'none',
+'aaa',
+'aad',
+'aam',
+'aas',
+'adc',
+'add',
+'and',
+'arpl',
+'bound',
+'bsf',
+'bsr',
+'bswap',
+'bt',
+'btc',
+'btr',
+'bts',
+'call',
+'cbw',
+'cdq',
+'clc',
+'cld',
+'cli',
+'clts',
+'cmc',
+'cmp',
+'cmpsb',
+'cmpsd',
+'cmpsw',
+'cmpxchg',
+'cmpxchg486',
+'cmpxchg8b',
+'cpuid',
+'cwd',
+'cwde',
+'daa',
+'das',
+'dec',
+'div',
+'emms',
+'enter',
+'f2xm1',
+'fabs',
+'fadd',
+'faddp',
+'fbld',
+'fbstp',
+'fchs',
+'fclex',
+'fcmovb',
+'fcmovbe',
+'fcmove',
+'fcmovnb',
+'fcmovnbe',
+'fcmovne',
+'fcmovnu',
+'fcmovu',
+'fcom',
+'fcomi',
+'fcomip',
+'fcomp',
+'fcompp',
+'fcos',
+'fdecstp',
+'fdisi',
+'fdiv',
+'fdivp',
+'fdivr',
+'fdivrp',
+'femms',
+'feni',
+'ffree',
+'fiadd',
+'ficom',
+'ficomp',
+'fidiv',
+'fidivr',
+'fild',
+'fimul',
+'fincstp',
+'finit',
+'fist',
+'fistp',
+'fisttp',
+'fisub',
+'fisubr',
+'fld',
+'fld1',
+'fldcw',
+'fldenv',
+'fldl2e',
+'fldl2t',
+'fldlg2',
+'fldln2',
+'fldpi',
+'fldz',
+'fmul',
+'fmulp',
+'fnclex',
+'fndisi',
+'fneni',
+'fninit',
+'fnop',
+'fnsave',
+'fnstcw',
+'fnstenv',
+'fnstsw',
+'fpatan',
+'fprem',
+'fprem1',
+'fptan',
+'frndint',
+'frstor',
+'fsave',
+'fscale',
+'fsetpm',
+'fsin',
+'fsincos',
+'fsqrt',
+'fst',
+'fstcw',
+'fstenv',
+'fstp',
+'fstsw',
+'fsub',
+'fsubp',
+'fsubr',
+'fsubrp',
+'ftst',
+'fucom',
+'fucomi',
+'fucomip',
+'fucomp',
+'fucompp',
+'fwait',
+'fxam',
+'fxch',
+'fxtract',
+'fyl2x',
+'fyl2xp1',
+'hlt',
+'ibts',
+'icebp',
+'idiv',
+'imul',
+'in',
+'inc',
+'insb',
+'insd',
+'insw',
+'int',
+'int01',
+'int1',
+'int03',
+'int3',
+'into',
+'invd',
+'invlpg',
+'iret',
+'iretd',
+'iretw',
+'iretq',
+'jcxz',
+'jecxz',
+'jrcxz',
+'jmp',
+'lahf',
+'lar',
+'lcall',
+'lds',
+'lea',
+'leave',
+'les',
+'lfs',
+'lgdt',
+'lgs',
+'lidt',
+'ljmp',
+'lldt',
+'lmsw',
+'loadall',
+'loadall286',
+'lock',
+'lodsb',
+'lodsd',
+'lodsw',
+'loop',
+'loope',
+'loopne',
+'loopnz',
+'loopz',
+'lsl',
+'lss',
+'ltr',
+'monitor',
+'mov',
+'movd',
+'movq',
+'movsb',
+'movsd',
+'movsq',
+'movsw',
+'movsx',
+'movzx',
+'mul',
+'mwait',
+'neg',
+'nop',
+'not',
+'or',
+'out',
+'outsb',
+'outsd',
+'outsw',
+'packssdw',
+'packsswb',
+'packuswb',
+'paddb',
+'paddd',
+'paddsb',
+'paddsiw',
+'paddsw',
+'paddusb',
+'paddusw',
+'paddw',
+'pand',
+'pandn',
+'paveb',
+'pavgusb',
+'pcmpeqb',
+'pcmpeqd',
+'pcmpeqw',
+'pcmpgtb',
+'pcmpgtd',
+'pcmpgtw',
+'pdistib',
+'pf2id',
+'pfacc',
+'pfadd',
+'pfcmpeq',
+'pfcmpge',
+'pfcmpgt',
+'pfmax',
+'pfmin',
+'pfmul',
+'pfrcp',
+'pfrcpit1',
+'pfrcpit2',
+'pfrsqit1',
+'pfrsqrt',
+'pfsub',
+'pfsubr',
+'pi2fd',
+'pmachriw',
+'pmaddwd',
+'pmagw',
+'pmulhriw',
+'pmulhrwa',
+'pmulhrwc',
+'pmulhw',
+'pmullw',
+'pmvgezb',
+'pmvlzb',
+'pmvnzb',
+'pmvzb',
+'pop',
+'popa',
+'popad',
+'popaw',
+'popf',
+'popfd',
+'popfw',
+'popfq',
+'por',
+'prefetch',
+'prefetchw',
+'pslld',
+'pslldq',
+'psllq',
+'psllw',
+'psrad',
+'psraw',
+'psrld',
+'psrlq',
+'psrlw',
+'psubb',
+'psubd',
+'psubsb',
+'psubsiw',
+'psubsw',
+'psubusb',
+'psubusw',
+'psubw',
+'punpckhbw',
+'punpckhdq',
+'punpckhwd',
+'punpcklbw',
+'punpckldq',
+'punpcklwd',
+'push',
+'pusha',
+'pushad',
+'pushaw',
+'pushf',
+'pushfd',
+'pushfw',
+'pushfq',
+'pxor',
+'rcl',
+'rcr',
+'rdshr',
+'rdmsr',
+'rdpmc',
+'rdtsc',
+'rep',
+'repe',
+'repne',
+'repnz',
+'repz',
+'ret',
+'retf',
+'retn',
+'rol',
+'ror',
+'rsdc',
+'rsldt',
+'rsm',
+'sahf',
+'sal',
+'salc',
+'sar',
+'sbb',
+'scasb',
+'scasd',
+'scasq',
+'scasw',
+'segcs',
+'segds',
+'seges',
+'segfs',
+'seggs',
+'segss',
+'sgdt',
+'shl',
+'shld',
+'shr',
+'shrd',
+'sidt',
+'sldt',
+'smi',
+'smint',
+'smintold',
+'smsw',
+'stc',
+'std',
+'sti',
+'stosb',
+'stosd',
+'stosw',
+'str',
+'sub',
+'svdc',
+'svldt',
+'svts',
+'syscall',
+'sysenter',
+'sysexit',
+'sysret',
+'test',
+'ud1',
+'ud2',
+'umov',
+'verr',
+'verw',
+'wait',
+'wbinvd',
+'wrshr',
+'wrmsr',
+'xadd',
+'xbts',
+'xchg',
+'xlat',
+'xlatb',
+'xor',
+'xstore',
+'xcryptecb',
+'xcryptcbc',
+'xcryptcfb',
+'xcryptofb',
+'cmov',
+'j',
+'set',
+'addps',
+'addss',
+'andnps',
+'andps',
+'cmpeqps',
+'cmpeqss',
+'cmpleps',
+'cmpless',
+'cmpltps',
+'cmpltss',
+'cmpneqps',
+'cmpneqss',
+'cmpnleps',
+'cmpnless',
+'cmpnltps',
+'cmpnltss',
+'cmpordps',
+'cmpordss',
+'cmpunordps',
+'cmpunordss',
+'cmpps',
+'cmpss',
+'comiss',
+'cvtpi2ps',
+'cvtps2pi',
+'cvtsi2ss',
+'cvtss2si',
+'cvttps2pi',
+'cvttss2si',
+'divps',
+'divss',
+'ldmxcsr',
+'maxps',
+'maxss',
+'minps',
+'minss',
+'movaps',
+'movhps',
+'movlhps',
+'movlps',
+'movhlps',
+'movmskps',
+'movntps',
+'movss',
+'movups',
+'mulps',
+'mulss',
+'orps',
+'rcpps',
+'rcpss',
+'rsqrtps',
+'rsqrtss',
+'shufps',
+'sqrtps',
+'sqrtss',
+'stmxcsr',
+'subps',
+'subss',
+'ucomiss',
+'unpckhps',
+'unpcklps',
+'xorps',
+'fxrstor',
+'fxsave',
+'prefetchnta',
+'prefetcht0',
+'prefetcht1',
+'prefetcht2',
+'sfence',
+'maskmovq',
+'movntq',
+'pavgb',
+'pavgw',
+'pextrw',
+'pinsrw',
+'pmaxsw',
+'pmaxub',
+'pminsw',
+'pminub',
+'pmovmskb',
+'pmulhuw',
+'psadbw',
+'pshufw',
+'pfnacc',
+'pfpnacc',
+'pi2fw',
+'pf2iw',
+'pswapd',
+'ffreep',
+'maskmovdqu',
+'clflush',
+'movntdq',
+'movnti',
+'movntpd',
+'pause',
+'lfence',
+'mfence',
+'movdqa',
+'movdqu',
+'movdq2q',
+'movq2dq',
+'paddq',
+'pmuludq',
+'pshufd',
+'pshufhw',
+'pshuflw',
+'psrldq',
+'psubq',
+'punpckhqdq',
+'punpcklqdq',
+'addpd',
+'addsd',
+'andnpd',
+'andpd',
+'cmpeqpd',
+'cmpeqsd',
+'cmplepd',
+'cmplesd',
+'cmpltpd',
+'cmpltsd',
+'cmpneqpd',
+'cmpneqsd',
+'cmpnlepd',
+'cmpnlesd',
+'cmpnltpd',
+'cmpnltsd',
+'cmpordpd',
+'cmpordsd',
+'cmpunordpd',
+'cmpunordsd',
+'cmppd',
+'comisd',
+'cvtdq2pd',
+'cvtdq2ps',
+'cvtpd2dq',
+'cvtpd2pi',
+'cvtpd2ps',
+'cvtpi2pd',
+'cvtps2dq',
+'cvtps2pd',
+'cvtsd2si',
+'cvtsd2ss',
+'cvtsi2sd',
+'cvtss2sd',
+'cvttpd2pi',
+'cvttpd2dq',
+'cvttps2dq',
+'cvttsd2si',
+'divpd',
+'divsd',
+'maxpd',
+'maxsd',
+'minpd',
+'minsd',
+'movapd',
+'movhpd',
+'movlpd',
+'movmskpd',
+'movupd',
+'mulpd',
+'mulsd',
+'orpd',
+'shufpd',
+'sqrtpd',
+'sqrtsd',
+'subpd',
+'subsd',
+'ucomisd',
+'unpckhpd',
+'unpcklpd',
+'xorpd',
+'addsubpd',
+'addsubps',
+'haddpd',
+'haddps',
+'hsubpd',
+'hsubps',
+'lddqu',
+'movddup',
+'movshdup',
+'movsldup',
+'vmread',
+'vmwrite',
+'vmcall',
+'vmlaunch',
+'vmresume',
+'vmxoff',
+'vmxon',
+'vmclear',
+'vmptrld',
+'vmptrst',
+'vmrun',
+'vmmcall',
+'vmload',
+'vmsave',
+'stgi',
+'clgi',
+'skinit',
+'invlpga',
+'montmul',
+'xsha1',
+'xsha256',
+'dmint',
+'rdm',
+'movabs',
+'movsxd',
+'cqo',
+'cmpxchg16b',
+'movntss',
+'movntsd',
+'insertq',
+'extrq',
+'lzcnt',
+'pabsb',
+'pabsw',
+'pabsd',
+'palignr',
+'phaddw',
+'phaddd',
+'phaddsw',
+'phsubw',
+'phsubd',
+'phsubsw',
+'pmaddubsw',
+'pmulhrsw',
+'pshufb',
+'psignb',
+'psignw',
+'psignd',
+'blendps',
+'blendpd',
+'blendvps',
+'blendvpd',
+'dpps',
+'dppd',
+'extractps',
+'insertps',
+'movntdqa',
+'mpsadbw',
+'packusdw',
+'pblendvb',
+'pblendw',
+'pcmpeqq',
+'pextrb',
+'pextrd',
+'pextrq',
+'phminposuw',
+'pinsrb',
+'pinsrd',
+'pinsrq',
+'pmaxsb',
+'pmaxsd',
+'pmaxud',
+'pmaxuw',
+'pminsb',
+'pminsd',
+'pminuw',
+'pminud',
+'pmovsxbw',
+'pmovsxbd',
+'pmovsxbq',
+'pmovsxwd',
+'pmovsxwq',
+'pmovsxdq',
+'pmovzxbw',
+'pmovzxbd',
+'pmovzxbq',
+'pmovzxwd',
+'pmovzxwq',
+'pmovzxdq',
+'pmuldq',
+'pmulld',
+'ptest',
+'roundps',
+'roundpd',
+'roundss',
+'roundsd',
+'crc32',
+'pcmpestri',
+'pcmpestrm',
+'pcmpistri',
+'pcmpistrm',
+'pcmpgtq',
+'popcnt',
+'aesenc',
+'aesenclast',
+'aesdec',
+'aesdeclast',
+'aesimc',
+'aeskeygenassist',
+'stosq',
+'lodsq',
+'cmpsq',
+'vaddpd',
+'vaddps',
+'vaddsd',
+'vaddss',
+'vaddsubpd',
+'vaddsubps',
+'vaesdec',
+'vaesdeclast',
+'vaesenc',
+'vaesenclast',
+'vaesimc',
+'vaeskeygenassist',
+'vandnpd',
+'vandnps',
+'vandpd',
+'vandps',
+'vblendpd',
+'vblendps',
+'vblendvpd',
+'vblendvps',
+'vbroadcastf128',
+'vbroadcastsd',
+'vbroadcastss',
+'vcmppd',
+'vcmpps',
+'vcmpsd',
+'vcmpss',
+'vcomisd',
+'vcomiss',
+'vcvtdq2pd',
+'vcvtdq2ps',
+'vcvtpd2dq',
+'vcvtpd2ps',
+'vcvtps2dq',
+'vcvtps2pd',
+'vcvtsd2si',
+'vcvtsd2ss',
+'vcvtsi2sd',
+'vcvtsi2ss',
+'vcvtss2sd',
+'vcvtss2si',
+'vcvttpd2dq',
+'vcvttps2dq',
+'vcvttsd2si',
+'vcvttss2si',
+'vdivpd',
+'vdivps',
+'vdivsd',
+'vdivss',
+'vdppd',
+'vdpps',
+'vextractf128',
+'vextractps',
+'vhaddpd',
+'vhaddps',
+'vhsubpd',
+'vhsubps',
+'vinsertf128',
+'vinsertps',
+'vlddqu',
+'vldmxcsr',
+'vmaskmovdqu',
+'vmaskmovpd',
+'vmaskmovps',
+'vmaxpd',
+'vmaxps',
+'vmaxsd',
+'vmaxss',
+'vminpd',
+'vminps',
+'vminsd',
+'vminss',
+'vmovapd',
+'vmovaps',
+'vmovd',
+'vmovddup',
+'vmovdqa',
+'vmovdqu',
+'vmovhlps',
+'vmovhpd',
+'vmovhps',
+'vmovlhps',
+'vmovlpd',
+'vmovlps',
+'vmovmskpd',
+'vmovmskps',
+'vmovntdq',
+'vmovntdqa',
+'vmovntpd',
+'vmovntps',
+'vmovq',
+'vmovsd',
+'vmovshdup',
+'vmovsldup',
+'vmovss',
+'vmovupd',
+'vmovups',
+'vmpsadbw',
+'vmulpd',
+'vmulps',
+'vmulsd',
+'vmulss',
+'vorpd',
+'vorps',
+'vpabsb',
+'vpabsd',
+'vpabsw',
+'vpackssdw',
+'vpacksswb',
+'vpackusdw',
+'vpackuswb',
+'vpaddb',
+'vpaddd',
+'vpaddq',
+'vpaddsb',
+'vpaddsw',
+'vpaddusb',
+'vpaddusw',
+'vpaddw',
+'vpalignr',
+'vpand',
+'vpandn',
+'vpavgb',
+'vpavgw',
+'vpblendvb',
+'vpblendw',
+'vpclmulqdq',
+'vpcmpeqb',
+'vpcmpeqd',
+'vpcmpeqq',
+'vpcmpeqw',
+'vpcmpestri',
+'vpcmpestrm',
+'vpcmpgtb',
+'vpcmpgtd',
+'vpcmpgtq',
+'vpcmpgtw',
+'vpcmpistri',
+'vpcmpistrm',
+'vperm2f128',
+'vpermilpd',
+'vpermilps',
+'vpextrb',
+'vpextrd',
+'vpextrq',
+'vpextrw',
+'vphaddd',
+'vphaddsw',
+'vphaddw',
+'vphminposuw',
+'vphsubd',
+'vphsubsw',
+'vphsubw',
+'vpinsrb',
+'vpinsrd',
+'vpinsrq',
+'vpinsrw',
+'vpmaddubsw',
+'vpmaddwd',
+'vpmaxsb',
+'vpmaxsd',
+'vpmaxsw',
+'vpmaxub',
+'vpmaxud',
+'vpmaxuw',
+'vpminsb',
+'vpminsd',
+'vpminsw',
+'vpminub',
+'vpminud',
+'vpminuw',
+'vpmovmskb',
+'vpmovsxbd',
+'vpmovsxbq',
+'vpmovsxbw',
+'vpmovsxdq',
+'vpmovsxwd',
+'vpmovsxwq',
+'vpmovzxbd',
+'vpmovzxbq',
+'vpmovzxbw',
+'vpmovzxdq',
+'vpmovzxwd',
+'vpmovzxwq',
+'vpmuldq',
+'vpmulhrsw',
+'vpmulhuw',
+'vpmulhw',
+'vpmulld',
+'vpmullw',
+'vpmuludq',
+'vpor',
+'vpsadbw',
+'vpshufb',
+'vpshufd',
+'vpshufhw',
+'vpshuflw',
+'vpsignb',
+'vpsignd',
+'vpsignw',
+'vpslld',
+'vpslldq',
+'vpsllq',
+'vpsllw',
+'vpsrad',
+'vpsraw',
+'vpsrld',
+'vpsrldq',
+'vpsrlq',
+'vpsrlw',
+'vpsubb',
+'vpsubd',
+'vpsubq',
+'vpsubsb',
+'vpsubsw',
+'vpsubusb',
+'vpsubusw',
+'vpsubw',
+'vptest',
+'vpunpckhbw',
+'vpunpckhdq',
+'vpunpckhqdq',
+'vpunpckhwd',
+'vpunpcklbw',
+'vpunpckldq',
+'vpunpcklqdq',
+'vpunpcklwd',
+'vpxor',
+'vrcpps',
+'vrcpss',
+'vroundpd',
+'vroundps',
+'vroundsd',
+'vroundss',
+'vrsqrtps',
+'vrsqrtss',
+'vshufpd',
+'vshufps',
+'vsqrtpd',
+'vsqrtps',
+'vsqrtsd',
+'vsqrtss',
+'vstmxcsr',
+'vsubpd',
+'vsubps',
+'vsubsd',
+'vsubss',
+'vtestpd',
+'vtestps',
+'vucomisd',
+'vucomiss',
+'vunpckhpd',
+'vunpckhps',
+'vunpcklpd',
+'vunpcklps',
+'vxorpd',
+'vxorps',
+'vzeroall',
+'vzeroupper'
+);

+ 2 - 0
compiler/i8086/i8086nop.inc

@@ -0,0 +1,2 @@
+{ don't edit, this file is generated from x86ins.dat }
+1652;

+ 947 - 0
compiler/i8086/i8086op.inc

@@ -0,0 +1,947 @@
+{ don't edit, this file is generated from x86ins.dat }
+(
+A_NONE,
+A_AAA,
+A_AAD,
+A_AAM,
+A_AAS,
+A_ADC,
+A_ADD,
+A_AND,
+A_ARPL,
+A_BOUND,
+A_BSF,
+A_BSR,
+A_BSWAP,
+A_BT,
+A_BTC,
+A_BTR,
+A_BTS,
+A_CALL,
+A_CBW,
+A_CDQ,
+A_CLC,
+A_CLD,
+A_CLI,
+A_CLTS,
+A_CMC,
+A_CMP,
+A_CMPSB,
+A_CMPSD,
+A_CMPSW,
+A_CMPXCHG,
+A_CMPXCHG486,
+A_CMPXCHG8B,
+A_CPUID,
+A_CWD,
+A_CWDE,
+A_DAA,
+A_DAS,
+A_DEC,
+A_DIV,
+A_EMMS,
+A_ENTER,
+A_F2XM1,
+A_FABS,
+A_FADD,
+A_FADDP,
+A_FBLD,
+A_FBSTP,
+A_FCHS,
+A_FCLEX,
+A_FCMOVB,
+A_FCMOVBE,
+A_FCMOVE,
+A_FCMOVNB,
+A_FCMOVNBE,
+A_FCMOVNE,
+A_FCMOVNU,
+A_FCMOVU,
+A_FCOM,
+A_FCOMI,
+A_FCOMIP,
+A_FCOMP,
+A_FCOMPP,
+A_FCOS,
+A_FDECSTP,
+A_FDISI,
+A_FDIV,
+A_FDIVP,
+A_FDIVR,
+A_FDIVRP,
+A_FEMMS,
+A_FENI,
+A_FFREE,
+A_FIADD,
+A_FICOM,
+A_FICOMP,
+A_FIDIV,
+A_FIDIVR,
+A_FILD,
+A_FIMUL,
+A_FINCSTP,
+A_FINIT,
+A_FIST,
+A_FISTP,
+A_FISTTP,
+A_FISUB,
+A_FISUBR,
+A_FLD,
+A_FLD1,
+A_FLDCW,
+A_FLDENV,
+A_FLDL2E,
+A_FLDL2T,
+A_FLDLG2,
+A_FLDLN2,
+A_FLDPI,
+A_FLDZ,
+A_FMUL,
+A_FMULP,
+A_FNCLEX,
+A_FNDISI,
+A_FNENI,
+A_FNINIT,
+A_FNOP,
+A_FNSAVE,
+A_FNSTCW,
+A_FNSTENV,
+A_FNSTSW,
+A_FPATAN,
+A_FPREM,
+A_FPREM1,
+A_FPTAN,
+A_FRNDINT,
+A_FRSTOR,
+A_FSAVE,
+A_FSCALE,
+A_FSETPM,
+A_FSIN,
+A_FSINCOS,
+A_FSQRT,
+A_FST,
+A_FSTCW,
+A_FSTENV,
+A_FSTP,
+A_FSTSW,
+A_FSUB,
+A_FSUBP,
+A_FSUBR,
+A_FSUBRP,
+A_FTST,
+A_FUCOM,
+A_FUCOMI,
+A_FUCOMIP,
+A_FUCOMP,
+A_FUCOMPP,
+A_FWAIT,
+A_FXAM,
+A_FXCH,
+A_FXTRACT,
+A_FYL2X,
+A_FYL2XP1,
+A_HLT,
+A_IBTS,
+A_ICEBP,
+A_IDIV,
+A_IMUL,
+A_IN,
+A_INC,
+A_INSB,
+A_INSD,
+A_INSW,
+A_INT,
+A_INT01,
+A_INT1,
+A_INT03,
+A_INT3,
+A_INTO,
+A_INVD,
+A_INVLPG,
+A_IRET,
+A_IRETD,
+A_IRETW,
+A_IRETQ,
+A_JCXZ,
+A_JECXZ,
+A_JRCXZ,
+A_JMP,
+A_LAHF,
+A_LAR,
+A_LCALL,
+A_LDS,
+A_LEA,
+A_LEAVE,
+A_LES,
+A_LFS,
+A_LGDT,
+A_LGS,
+A_LIDT,
+A_LJMP,
+A_LLDT,
+A_LMSW,
+A_LOADALL,
+A_LOADALL286,
+A_LOCK,
+A_LODSB,
+A_LODSD,
+A_LODSW,
+A_LOOP,
+A_LOOPE,
+A_LOOPNE,
+A_LOOPNZ,
+A_LOOPZ,
+A_LSL,
+A_LSS,
+A_LTR,
+A_MONITOR,
+A_MOV,
+A_MOVD,
+A_MOVQ,
+A_MOVSB,
+A_MOVSD,
+A_MOVSQ,
+A_MOVSW,
+A_MOVSX,
+A_MOVZX,
+A_MUL,
+A_MWAIT,
+A_NEG,
+A_NOP,
+A_NOT,
+A_OR,
+A_OUT,
+A_OUTSB,
+A_OUTSD,
+A_OUTSW,
+A_PACKSSDW,
+A_PACKSSWB,
+A_PACKUSWB,
+A_PADDB,
+A_PADDD,
+A_PADDSB,
+A_PADDSIW,
+A_PADDSW,
+A_PADDUSB,
+A_PADDUSW,
+A_PADDW,
+A_PAND,
+A_PANDN,
+A_PAVEB,
+A_PAVGUSB,
+A_PCMPEQB,
+A_PCMPEQD,
+A_PCMPEQW,
+A_PCMPGTB,
+A_PCMPGTD,
+A_PCMPGTW,
+A_PDISTIB,
+A_PF2ID,
+A_PFACC,
+A_PFADD,
+A_PFCMPEQ,
+A_PFCMPGE,
+A_PFCMPGT,
+A_PFMAX,
+A_PFMIN,
+A_PFMUL,
+A_PFRCP,
+A_PFRCPIT1,
+A_PFRCPIT2,
+A_PFRSQIT1,
+A_PFRSQRT,
+A_PFSUB,
+A_PFSUBR,
+A_PI2FD,
+A_PMACHRIW,
+A_PMADDWD,
+A_PMAGW,
+A_PMULHRIW,
+A_PMULHRWA,
+A_PMULHRWC,
+A_PMULHW,
+A_PMULLW,
+A_PMVGEZB,
+A_PMVLZB,
+A_PMVNZB,
+A_PMVZB,
+A_POP,
+A_POPA,
+A_POPAD,
+A_POPAW,
+A_POPF,
+A_POPFD,
+A_POPFW,
+A_POPFQ,
+A_POR,
+A_PREFETCH,
+A_PREFETCHW,
+A_PSLLD,
+A_PSLLDQ,
+A_PSLLQ,
+A_PSLLW,
+A_PSRAD,
+A_PSRAW,
+A_PSRLD,
+A_PSRLQ,
+A_PSRLW,
+A_PSUBB,
+A_PSUBD,
+A_PSUBSB,
+A_PSUBSIW,
+A_PSUBSW,
+A_PSUBUSB,
+A_PSUBUSW,
+A_PSUBW,
+A_PUNPCKHBW,
+A_PUNPCKHDQ,
+A_PUNPCKHWD,
+A_PUNPCKLBW,
+A_PUNPCKLDQ,
+A_PUNPCKLWD,
+A_PUSH,
+A_PUSHA,
+A_PUSHAD,
+A_PUSHAW,
+A_PUSHF,
+A_PUSHFD,
+A_PUSHFW,
+A_PUSHFQ,
+A_PXOR,
+A_RCL,
+A_RCR,
+A_RDSHR,
+A_RDMSR,
+A_RDPMC,
+A_RDTSC,
+A_REP,
+A_REPE,
+A_REPNE,
+A_REPNZ,
+A_REPZ,
+A_RET,
+A_RETF,
+A_RETN,
+A_ROL,
+A_ROR,
+A_RSDC,
+A_RSLDT,
+A_RSM,
+A_SAHF,
+A_SAL,
+A_SALC,
+A_SAR,
+A_SBB,
+A_SCASB,
+A_SCASD,
+A_SCASQ,
+A_SCASW,
+A_SEGCS,
+A_SEGDS,
+A_SEGES,
+A_SEGFS,
+A_SEGGS,
+A_SEGSS,
+A_SGDT,
+A_SHL,
+A_SHLD,
+A_SHR,
+A_SHRD,
+A_SIDT,
+A_SLDT,
+A_SMI,
+A_SMINT,
+A_SMINTOLD,
+A_SMSW,
+A_STC,
+A_STD,
+A_STI,
+A_STOSB,
+A_STOSD,
+A_STOSW,
+A_STR,
+A_SUB,
+A_SVDC,
+A_SVLDT,
+A_SVTS,
+A_SYSCALL,
+A_SYSENTER,
+A_SYSEXIT,
+A_SYSRET,
+A_TEST,
+A_UD1,
+A_UD2,
+A_UMOV,
+A_VERR,
+A_VERW,
+A_WAIT,
+A_WBINVD,
+A_WRSHR,
+A_WRMSR,
+A_XADD,
+A_XBTS,
+A_XCHG,
+A_XLAT,
+A_XLATB,
+A_XOR,
+A_XSTORE,
+A_XCRYPTECB,
+A_XCRYPTCBC,
+A_XCRYPTCFB,
+A_XCRYPTOFB,
+A_CMOVcc,
+A_Jcc,
+A_SETcc,
+A_ADDPS,
+A_ADDSS,
+A_ANDNPS,
+A_ANDPS,
+A_CMPEQPS,
+A_CMPEQSS,
+A_CMPLEPS,
+A_CMPLESS,
+A_CMPLTPS,
+A_CMPLTSS,
+A_CMPNEQPS,
+A_CMPNEQSS,
+A_CMPNLEPS,
+A_CMPNLESS,
+A_CMPNLTPS,
+A_CMPNLTSS,
+A_CMPORDPS,
+A_CMPORDSS,
+A_CMPUNORDPS,
+A_CMPUNORDSS,
+A_CMPPS,
+A_CMPSS,
+A_COMISS,
+A_CVTPI2PS,
+A_CVTPS2PI,
+A_CVTSI2SS,
+A_CVTSS2SI,
+A_CVTTPS2PI,
+A_CVTTSS2SI,
+A_DIVPS,
+A_DIVSS,
+A_LDMXCSR,
+A_MAXPS,
+A_MAXSS,
+A_MINPS,
+A_MINSS,
+A_MOVAPS,
+A_MOVHPS,
+A_MOVLHPS,
+A_MOVLPS,
+A_MOVHLPS,
+A_MOVMSKPS,
+A_MOVNTPS,
+A_MOVSS,
+A_MOVUPS,
+A_MULPS,
+A_MULSS,
+A_ORPS,
+A_RCPPS,
+A_RCPSS,
+A_RSQRTPS,
+A_RSQRTSS,
+A_SHUFPS,
+A_SQRTPS,
+A_SQRTSS,
+A_STMXCSR,
+A_SUBPS,
+A_SUBSS,
+A_UCOMISS,
+A_UNPCKHPS,
+A_UNPCKLPS,
+A_XORPS,
+A_FXRSTOR,
+A_FXSAVE,
+A_PREFETCHNTA,
+A_PREFETCHT0,
+A_PREFETCHT1,
+A_PREFETCHT2,
+A_SFENCE,
+A_MASKMOVQ,
+A_MOVNTQ,
+A_PAVGB,
+A_PAVGW,
+A_PEXTRW,
+A_PINSRW,
+A_PMAXSW,
+A_PMAXUB,
+A_PMINSW,
+A_PMINUB,
+A_PMOVMSKB,
+A_PMULHUW,
+A_PSADBW,
+A_PSHUFW,
+A_PFNACC,
+A_PFPNACC,
+A_PI2FW,
+A_PF2IW,
+A_PSWAPD,
+A_FFREEP,
+A_MASKMOVDQU,
+A_CLFLUSH,
+A_MOVNTDQ,
+A_MOVNTI,
+A_MOVNTPD,
+A_PAUSE,
+A_LFENCE,
+A_MFENCE,
+A_MOVDQA,
+A_MOVDQU,
+A_MOVDQ2Q,
+A_MOVQ2DQ,
+A_PADDQ,
+A_PMULUDQ,
+A_PSHUFD,
+A_PSHUFHW,
+A_PSHUFLW,
+A_PSRLDQ,
+A_PSUBQ,
+A_PUNPCKHQDQ,
+A_PUNPCKLQDQ,
+A_ADDPD,
+A_ADDSD,
+A_ANDNPD,
+A_ANDPD,
+A_CMPEQPD,
+A_CMPEQSD,
+A_CMPLEPD,
+A_CMPLESD,
+A_CMPLTPD,
+A_CMPLTSD,
+A_CMPNEQPD,
+A_CMPNEQSD,
+A_CMPNLEPD,
+A_CMPNLESD,
+A_CMPNLTPD,
+A_CMPNLTSD,
+A_CMPORDPD,
+A_CMPORDSD,
+A_CMPUNORDPD,
+A_CMPUNORDSD,
+A_CMPPD,
+A_COMISD,
+A_CVTDQ2PD,
+A_CVTDQ2PS,
+A_CVTPD2DQ,
+A_CVTPD2PI,
+A_CVTPD2PS,
+A_CVTPI2PD,
+A_CVTPS2DQ,
+A_CVTPS2PD,
+A_CVTSD2SI,
+A_CVTSD2SS,
+A_CVTSI2SD,
+A_CVTSS2SD,
+A_CVTTPD2PI,
+A_CVTTPD2DQ,
+A_CVTTPS2DQ,
+A_CVTTSD2SI,
+A_DIVPD,
+A_DIVSD,
+A_MAXPD,
+A_MAXSD,
+A_MINPD,
+A_MINSD,
+A_MOVAPD,
+A_MOVHPD,
+A_MOVLPD,
+A_MOVMSKPD,
+A_MOVUPD,
+A_MULPD,
+A_MULSD,
+A_ORPD,
+A_SHUFPD,
+A_SQRTPD,
+A_SQRTSD,
+A_SUBPD,
+A_SUBSD,
+A_UCOMISD,
+A_UNPCKHPD,
+A_UNPCKLPD,
+A_XORPD,
+A_ADDSUBPD,
+A_ADDSUBPS,
+A_HADDPD,
+A_HADDPS,
+A_HSUBPD,
+A_HSUBPS,
+A_LDDQU,
+A_MOVDDUP,
+A_MOVSHDUP,
+A_MOVSLDUP,
+A_VMREAD,
+A_VMWRITE,
+A_VMCALL,
+A_VMLAUNCH,
+A_VMRESUME,
+A_VMXOFF,
+A_VMXON,
+A_VMCLEAR,
+A_VMPTRLD,
+A_VMPTRST,
+A_VMRUN,
+A_VMMCALL,
+A_VMLOAD,
+A_VMSAVE,
+A_STGI,
+A_CLGI,
+A_SKINIT,
+A_INVLPGA,
+A_MONTMUL,
+A_XSHA1,
+A_XSHA256,
+A_DMINT,
+A_RDM,
+A_MOVABS,
+A_MOVSXD,
+A_CQO,
+A_CMPXCHG16B,
+A_MOVNTSS,
+A_MOVNTSD,
+A_INSERTQ,
+A_EXTRQ,
+A_LZCNT,
+A_PABSB,
+A_PABSW,
+A_PABSD,
+A_PALIGNR,
+A_PHADDW,
+A_PHADDD,
+A_PHADDSW,
+A_PHSUBW,
+A_PHSUBD,
+A_PHSUBSW,
+A_PMADDUBSW,
+A_PMULHRSW,
+A_PSHUFB,
+A_PSIGNB,
+A_PSIGNW,
+A_PSIGND,
+A_BLENDPS,
+A_BLENDPD,
+A_BLENDVPS,
+A_BLENDVPD,
+A_DPPS,
+A_DPPD,
+A_EXTRACTPS,
+A_INSERTPS,
+A_MOVNTDQA,
+A_MPSADBW,
+A_PACKUSDW,
+A_PBLENDVB,
+A_PBLENDW,
+A_PCMPEQQ,
+A_PEXTRB,
+A_PEXTRD,
+A_PEXTRQ,
+A_PHMINPOSUW,
+A_PINSRB,
+A_PINSRD,
+A_PINSRQ,
+A_PMAXSB,
+A_PMAXSD,
+A_PMAXUD,
+A_PMAXUW,
+A_PMINSB,
+A_PMINSD,
+A_PMINUW,
+A_PMINUD,
+A_PMOVSXBW,
+A_PMOVSXBD,
+A_PMOVSXBQ,
+A_PMOVSXWD,
+A_PMOVSXWQ,
+A_PMOVSXDQ,
+A_PMOVZXBW,
+A_PMOVZXBD,
+A_PMOVZXBQ,
+A_PMOVZXWD,
+A_PMOVZXWQ,
+A_PMOVZXDQ,
+A_PMULDQ,
+A_PMULLD,
+A_PTEST,
+A_ROUNDPS,
+A_ROUNDPD,
+A_ROUNDSS,
+A_ROUNDSD,
+A_CRC32,
+A_PCMPESTRI,
+A_PCMPESTRM,
+A_PCMPISTRI,
+A_PCMPISTRM,
+A_PCMPGTQ,
+A_POPCNT,
+A_AESENC,
+A_AESENCLAST,
+A_AESDEC,
+A_AESDECLAST,
+A_AESIMC,
+A_AESKEYGENASSIST,
+A_STOSQ,
+A_LODSQ,
+A_CMPSQ,
+A_VADDPD,
+A_VADDPS,
+A_VADDSD,
+A_VADDSS,
+A_VADDSUBPD,
+A_VADDSUBPS,
+A_VAESDEC,
+A_VAESDECLAST,
+A_VAESENC,
+A_VAESENCLAST,
+A_VAESIMC,
+A_VAESKEYGENASSIST,
+A_VANDNPD,
+A_VANDNPS,
+A_VANDPD,
+A_VANDPS,
+A_VBLENDPD,
+A_VBLENDPS,
+A_VBLENDVPD,
+A_VBLENDVPS,
+A_VBROADCASTF128,
+A_VBROADCASTSD,
+A_VBROADCASTSS,
+A_VCMPPD,
+A_VCMPPS,
+A_VCMPSD,
+A_VCMPSS,
+A_VCOMISD,
+A_VCOMISS,
+A_VCVTDQ2PD,
+A_VCVTDQ2PS,
+A_VCVTPD2DQ,
+A_VCVTPD2PS,
+A_VCVTPS2DQ,
+A_VCVTPS2PD,
+A_VCVTSD2SI,
+A_VCVTSD2SS,
+A_VCVTSI2SD,
+A_VCVTSI2SS,
+A_VCVTSS2SD,
+A_VCVTSS2SI,
+A_VCVTTPD2DQ,
+A_VCVTTPS2DQ,
+A_VCVTTSD2SI,
+A_VCVTTSS2SI,
+A_VDIVPD,
+A_VDIVPS,
+A_VDIVSD,
+A_VDIVSS,
+A_VDPPD,
+A_VDPPS,
+A_VEXTRACTF128,
+A_VEXTRACTPS,
+A_VHADDPD,
+A_VHADDPS,
+A_VHSUBPD,
+A_VHSUBPS,
+A_VINSERTF128,
+A_VINSERTPS,
+A_VLDDQU,
+A_VLDMXCSR,
+A_VMASKMOVDQU,
+A_VMASKMOVPD,
+A_VMASKMOVPS,
+A_VMAXPD,
+A_VMAXPS,
+A_VMAXSD,
+A_VMAXSS,
+A_VMINPD,
+A_VMINPS,
+A_VMINSD,
+A_VMINSS,
+A_VMOVAPD,
+A_VMOVAPS,
+A_VMOVD,
+A_VMOVDDUP,
+A_VMOVDQA,
+A_VMOVDQU,
+A_VMOVHLPS,
+A_VMOVHPD,
+A_VMOVHPS,
+A_VMOVLHPS,
+A_VMOVLPD,
+A_VMOVLPS,
+A_VMOVMSKPD,
+A_VMOVMSKPS,
+A_VMOVNTDQ,
+A_VMOVNTDQA,
+A_VMOVNTPD,
+A_VMOVNTPS,
+A_VMOVQ,
+A_VMOVSD,
+A_VMOVSHDUP,
+A_VMOVSLDUP,
+A_VMOVSS,
+A_VMOVUPD,
+A_VMOVUPS,
+A_VMPSADBW,
+A_VMULPD,
+A_VMULPS,
+A_VMULSD,
+A_VMULSS,
+A_VORPD,
+A_VORPS,
+A_VPABSB,
+A_VPABSD,
+A_VPABSW,
+A_VPACKSSDW,
+A_VPACKSSWB,
+A_VPACKUSDW,
+A_VPACKUSWB,
+A_VPADDB,
+A_VPADDD,
+A_VPADDQ,
+A_VPADDSB,
+A_VPADDSW,
+A_VPADDUSB,
+A_VPADDUSW,
+A_VPADDW,
+A_VPALIGNR,
+A_VPAND,
+A_VPANDN,
+A_VPAVGB,
+A_VPAVGW,
+A_VPBLENDVB,
+A_VPBLENDW,
+A_VPCLMULQDQ,
+A_VPCMPEQB,
+A_VPCMPEQD,
+A_VPCMPEQQ,
+A_VPCMPEQW,
+A_VPCMPESTRI,
+A_VPCMPESTRM,
+A_VPCMPGTB,
+A_VPCMPGTD,
+A_VPCMPGTQ,
+A_VPCMPGTW,
+A_VPCMPISTRI,
+A_VPCMPISTRM,
+A_VPERM2F128,
+A_VPERMILPD,
+A_VPERMILPS,
+A_VPEXTRB,
+A_VPEXTRD,
+A_VPEXTRQ,
+A_VPEXTRW,
+A_VPHADDD,
+A_VPHADDSW,
+A_VPHADDW,
+A_VPHMINPOSUW,
+A_VPHSUBD,
+A_VPHSUBSW,
+A_VPHSUBW,
+A_VPINSRB,
+A_VPINSRD,
+A_VPINSRQ,
+A_VPINSRW,
+A_VPMADDUBSW,
+A_VPMADDWD,
+A_VPMAXSB,
+A_VPMAXSD,
+A_VPMAXSW,
+A_VPMAXUB,
+A_VPMAXUD,
+A_VPMAXUW,
+A_VPMINSB,
+A_VPMINSD,
+A_VPMINSW,
+A_VPMINUB,
+A_VPMINUD,
+A_VPMINUW,
+A_VPMOVMSKB,
+A_VPMOVSXBD,
+A_VPMOVSXBQ,
+A_VPMOVSXBW,
+A_VPMOVSXDQ,
+A_VPMOVSXWD,
+A_VPMOVSXWQ,
+A_VPMOVZXBD,
+A_VPMOVZXBQ,
+A_VPMOVZXBW,
+A_VPMOVZXDQ,
+A_VPMOVZXWD,
+A_VPMOVZXWQ,
+A_VPMULDQ,
+A_VPMULHRSW,
+A_VPMULHUW,
+A_VPMULHW,
+A_VPMULLD,
+A_VPMULLW,
+A_VPMULUDQ,
+A_VPOR,
+A_VPSADBW,
+A_VPSHUFB,
+A_VPSHUFD,
+A_VPSHUFHW,
+A_VPSHUFLW,
+A_VPSIGNB,
+A_VPSIGND,
+A_VPSIGNW,
+A_VPSLLD,
+A_VPSLLDQ,
+A_VPSLLQ,
+A_VPSLLW,
+A_VPSRAD,
+A_VPSRAW,
+A_VPSRLD,
+A_VPSRLDQ,
+A_VPSRLQ,
+A_VPSRLW,
+A_VPSUBB,
+A_VPSUBD,
+A_VPSUBQ,
+A_VPSUBSB,
+A_VPSUBSW,
+A_VPSUBUSB,
+A_VPSUBUSW,
+A_VPSUBW,
+A_VPTEST,
+A_VPUNPCKHBW,
+A_VPUNPCKHDQ,
+A_VPUNPCKHQDQ,
+A_VPUNPCKHWD,
+A_VPUNPCKLBW,
+A_VPUNPCKLDQ,
+A_VPUNPCKLQDQ,
+A_VPUNPCKLWD,
+A_VPXOR,
+A_VRCPPS,
+A_VRCPSS,
+A_VROUNDPD,
+A_VROUNDPS,
+A_VROUNDSD,
+A_VROUNDSS,
+A_VRSQRTPS,
+A_VRSQRTSS,
+A_VSHUFPD,
+A_VSHUFPS,
+A_VSQRTPD,
+A_VSQRTPS,
+A_VSQRTSD,
+A_VSQRTSS,
+A_VSTMXCSR,
+A_VSUBPD,
+A_VSUBPS,
+A_VSUBSD,
+A_VSUBSS,
+A_VTESTPD,
+A_VTESTPS,
+A_VUCOMISD,
+A_VUCOMISS,
+A_VUNPCKHPD,
+A_VUNPCKHPS,
+A_VUNPCKLPD,
+A_VUNPCKLPS,
+A_VXORPD,
+A_VXORPS,
+A_VZEROALL,
+A_VZEROUPPER
+);

+ 947 - 0
compiler/i8086/i8086prop.inc

@@ -0,0 +1,947 @@
+{ don't edit, this file is generated from x86ins.dat }
+(
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_MEAX, Ch_WFlags, Ch_None)),
+(Ch: (Ch_MEAX, Ch_WFlags, Ch_None)),
+(Ch: (Ch_MEAX, Ch_WFlags, Ch_None)),
+(Ch: (Ch_MEAX, Ch_WFlags, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_Rop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_WFlags, Ch_Rop1)),
+(Ch: (Ch_Wop2, Ch_WFlags, Ch_Rop1)),
+(Ch: (Ch_MOp1, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_Rop1, Ch_Rop2)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_ROp1, Ch_All, Ch_None)),
+(Ch: (Ch_MEAX, Ch_None, Ch_None)),
+(Ch: (Ch_MEAX, Ch_WEDX, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_CDirFlag, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_ROp2, Ch_WFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_none)),
+(Ch: (Ch_MEAX, Ch_WEDX, Ch_None)),
+(Ch: (Ch_MEAX, Ch_None, Ch_None)),
+(Ch: (Ch_MEAX, Ch_None, Ch_None)),
+(Ch: (Ch_MEAX, Ch_None, Ch_None)),
+(Ch: (Ch_Mop1, Ch_WFlags, Ch_None)),
+(Ch: (Ch_RWEAX, Ch_WEDX, Ch_WFlags)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_RWESP, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_Rop1, Ch_FPU, Ch_None)),
+(Ch: (Ch_Wop1, Ch_FPU, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_WFLAGS, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_WFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_FPU, Ch_ROp1, Ch_None)),
+(Ch: (Ch_Rop1, Ch_FPU, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_FPU, Ch_None)),
+(Ch: (Ch_ROp1, Ch_FPU, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_FPU, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_FPU, Ch_None)),
+(Ch: (Ch_ROp1, Ch_FPU, Ch_None)),
+(Ch: (Ch_ROp1, Ch_FPU, Ch_None)),
+(Ch: (Ch_ROp1, Ch_FPU, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_WFLAGS, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_WFLAGS, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_FPU, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RWEAX, Ch_WEDX, Ch_WFlags)),
+(Ch: (Ch_RWEAX, Ch_WEDX, Ch_WFlags)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop1, Ch_WFlags, Ch_None)),
+(Ch: (Ch_WMemEDI, Ch_RWEDI, Ch_REDX)),
+(Ch: (Ch_WMemEDI, Ch_RWEDI, Ch_REDX)),
+(Ch: (Ch_WMemEDI, Ch_RWEDI, Ch_REDX)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RECX, Ch_None, Ch_None)),
+(Ch: (Ch_RECX, Ch_None, Ch_None)),
+(Ch: (Ch_RECX, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_None, Ch_None)),
+(Ch: (Ch_WEAX, Ch_RFlags, Ch_None)),
+(Ch: (Ch_Wop2, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_RWESP, Ch_WEBP, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_WEAX, Ch_RWESI, Ch_None)),
+(Ch: (Ch_WEAX, Ch_RWESI, Ch_None)),
+(Ch: (Ch_WEAX, Ch_RWESI, Ch_None)),
+(Ch: (Ch_RWECX, Ch_None, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RFlags, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RFlags, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RFlags, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RFlags, Ch_None)),
+(Ch: (Ch_Wop2, Ch_WFlags, Ch_None)),
+(Ch: (Ch_Wop2, Ch_ROP1, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Rop1, Ch_Wop2, Ch_None)),
+(Ch: (Ch_Rop1, Ch_Wop2, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_RWEAX, Ch_WEDX, Ch_WFlags)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_Mop1, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_Mop1, Ch_WFlags, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_Rop1, Ch_Rop2, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_RWESP, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RWESP, Ch_WFlags, Ch_None)),
+(Ch: (Ch_RWESP, Ch_WFlags, Ch_None)),
+(Ch: (Ch_RWESP, Ch_WFLAGS, Ch_None)),
+(Ch: (Ch_RWESP, Ch_WFlags, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Rop1, Ch_RWESP, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RWESP, Ch_RFlags, Ch_None)),
+(Ch: (Ch_RWESP, Ch_RFlags, Ch_None)),
+(Ch: (Ch_RWESP, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_RWESP, Ch_RFlags, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_WEAX, Ch_WEDX, Ch_None)),
+(Ch: (Ch_WEAX, Ch_WEDX, Ch_None)),
+(Ch: (Ch_WEAX, Ch_WEDX, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RWFlags, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RWFlags, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RWFlags, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RWFLAGS, Ch_None)),
+(Ch: (Ch_RWECX, Ch_RWFLAGS, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_REAX, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_WEAX, Ch_RFLAGS, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_RWFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_MOp3, Ch_RWFlags, Ch_Rop2)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_MOp3, Ch_RWFlags, Ch_Rop2)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_SDirFlag, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_REAX, Ch_WMemEDI, Ch_RWEDI)),
+(Ch: (Ch_REAX, Ch_WMemEDI, Ch_RWEDI)),
+(Ch: (Ch_REAX, Ch_WMemEDI, Ch_RWEDI)),
+(Ch: (Ch_Wop1, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_Rop1, Ch_Rop2)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_WFlags, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_None, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RWop1, Ch_RWop2, Ch_None)),
+(Ch: (Ch_WEAX, Ch_REBX, Ch_None)),
+(Ch: (Ch_WEAX, Ch_REBX, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_WFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_WOp2, Ch_RFLAGS)),
+(Ch: (Ch_RFLAGS, Ch_None, Ch_None)),
+(Ch: (Ch_RFLAGS, Ch_WOp1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Rop1, Ch_Rop2, Ch_WFlags)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_WOp2, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop3, Ch_Rop2, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Rop1, Ch_Rop2, Ch_WFlags)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Rop1, Ch_Rop2, Ch_WFlags)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_ROp1, Ch_WOp2, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop3, Ch_Rop2, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Rop1, Ch_Rop2, Ch_WFlags)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Mop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
+(Ch: (Ch_MRAX, Ch_WRDX, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop1, Ch_Rop2, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_RRAX, Ch_WMemEDI, Ch_RWRDI)),
+(Ch: (Ch_WRAX, Ch_RWRSI, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None))
+);

+ 11567 - 0
compiler/i8086/i8086tab.inc

@@ -0,0 +1,11567 @@
+{ don't edit, this file is generated from x86ins.dat }
+(
+  (
+    opcode  : A_NONE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #0;
+    flags   : if_none
+  ),
+  (
+    opcode  : A_AAA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#55;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_AAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#213#10;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_AAD;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #1#213#20;
+    flags   : if_8086 or if_sb or if_nox86_64
+  ),
+  (
+    opcode  : A_AAM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#212#10;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_AAM;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #1#212#20;
+    flags   : if_8086 or if_sb or if_nox86_64
+  ),
+  (
+    opcode  : A_AAS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#63;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#17#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#19#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#16#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#18#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#130#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#21#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#129#130#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#21#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#130#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#20#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_ADC;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#130#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#1#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#3#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#0#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#2#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#128#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #208#1#5#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#129#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#5#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#128#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#4#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_ADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#128#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#33#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#35#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#32#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#34#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#132#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#37#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#129#132#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#37#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#132#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#36#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_AND;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#132#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_ARPL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none,ot_none);
+    code    : #1#99#65;
+    flags   : if_286 or if_prot or if_nox86_64
+  ),
+  (
+    opcode  : A_ARPL;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16,ot_none,ot_none);
+    code    : #1#99#65;
+    flags   : if_286 or if_prot or if_sm or if_nox86_64
+  ),
+  (
+    opcode  : A_BOUND;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32,ot_memory,ot_none,ot_none);
+    code    : #208#1#98#72;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_BSF;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#2#15#188#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BSR;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#2#15#189#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BSWAP;
+    ops     : 1;
+    optypes : (ot_reg32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#15#8#200;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#163#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BT;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#2#15#186#132#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#187#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTC;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#2#15#186#135#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#179#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#2#15#186#134#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#171#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_BTS;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#2#15#186#133#21;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#255#130;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #208#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_near,ot_none,ot_none,ot_none);
+    code    : #208#1#232#52;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_immediate or ot_far,ot_none,ot_none,ot_none);
+    code    : #208#1#154#28#31;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none,ot_none);
+    code    : #208#1#255#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none,ot_none);
+    code    : #208#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate,ot_none,ot_none);
+    code    : #215#1#154#29#24;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 2;
+    optypes : (ot_immediate or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#154#25#24;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #212#1#154#25#24;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 2;
+    optypes : (ot_immediate or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#154#33#24;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_CALL;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #213#1#154#33#24;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_CBW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#152;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CDQ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#153;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CLC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#248;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CLD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#252;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CLI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#250;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CLTS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#6;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_CMC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#245;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#57#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#59#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#56#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#58#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#135#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#61#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#129#135#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#61#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#135#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#60#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#135#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #213#1#129#135#33;
+    flags   : if_386 or if_sd
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #212#1#129#135#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_CMP;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none,ot_none);
+    code    : #1#128#135#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_CMPSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #218#1#166;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMPSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #218#213#1#167;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_CMPSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #220#2#15#194#72#22;
+    flags   : if_willamette or if_sse2 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_CMPSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #218#212#1#167;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#177#65;
+    flags   : if_pent or if_sm
+  ),
+  (
+    opcode  : A_CMPXCHG;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #2#15#176#65;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#167#65;
+    flags   : if_486 or if_sm
+  ),
+  (
+    opcode  : A_CMPXCHG486;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #2#15#166#65;
+    flags   : if_486 or if_undoc
+  ),
+  (
+    opcode  : A_CMPXCHG8B;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#199#129;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CPUID;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#162;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_CWD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#153;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_CWDE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#152;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_DAA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#39;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_DAS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#47;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_reg16 or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #208#8#72;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#255#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DEC;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#254#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DIV;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#247#134;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_DIV;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#246#134;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_EMMS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#119;
+    flags   : if_pent or if_mmx
+  ),
+  (
+    opcode  : A_ENTER;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate,ot_none,ot_none);
+    code    : #1#200#24#21;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_F2XM1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FABS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#193;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none,ot_none);
+    code    : #1#220#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#220#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADD;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADDP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#193;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADDP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#222#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FADDP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#222#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #1#223#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBLD;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#223#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #1#223#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FBSTP;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#223#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCHS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCLEX;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#155#219#226;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#218#193;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVB;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#218#8#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVB;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#218#9#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVBE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#218#209;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVBE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#218#8#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVBE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#218#9#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#218#201;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#218#8#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#218#9#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#193;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNB;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#219#8#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNB;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#219#9#192;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNBE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#209;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNBE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#219#8#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNBE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#219#9#208;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#201;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#219#8#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNE;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#219#9#200;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNU;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#217;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNU;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#219#8#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVNU;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#219#9#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVU;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#218#217;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVU;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#218#8#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCMOVU;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#218#9#216;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#216#209;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOM;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#241;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMI;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#219#8#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMI;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#219#9#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMIP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#223#241;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMIP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#223#8#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMIP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#223#9#240;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#216#217;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#216;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#216;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOMPP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#217;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FCOS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#255;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FDECSTP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#246;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDISI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#155#219#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#220#241;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none,ot_none);
+    code    : #1#220#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#220#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIV;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#241;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#222#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#222#8#240;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#220#249;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none,ot_none);
+    code    : #1#220#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#220#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVR;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVRP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#249;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVRP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#222#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FDIVRP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#222#8#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FEMMS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#14;
+    flags   : if_pent or if_3dnow
+  ),
+  (
+    opcode  : A_FENI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#155#219#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FFREE;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#221#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIADD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOM;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FICOMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIV;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIDIVR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FILD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#219#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FILD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#223#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FILD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#223#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FINCSTP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#247;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FINIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#155#219#227;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#219#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FIST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#223#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#219#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#223#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#223#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISTTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#219#129;
+    flags   : if_prescott or if_fpu
+  ),
+  (
+    opcode  : A_FISTTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#223#129;
+    flags   : if_prescott or if_fpu
+  ),
+  (
+    opcode  : A_FISTTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#221#129;
+    flags   : if_prescott or if_fpu
+  ),
+  (
+    opcode  : A_FISUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #1#222#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FISUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#218#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#217#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#221#128;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #1#219#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#217#8#192;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLD1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDCW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#217#133;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FLDENV;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#217#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDL2E;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#234;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDL2T;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#233;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDLG2;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#236;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDLN2;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#237;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDPI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#235;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FLDZ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#238;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#129;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#220#201;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none,ot_none);
+    code    : #1#220#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#220#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMUL;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMULP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#201;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMULP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#222#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FMULP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#222#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNCLEX;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#226;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNDISI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNENI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNINIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#227;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNOP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNSAVE;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#221#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNSTCW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#217#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FNSTENV;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#217#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FNSTSW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#221#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FNSTSW;
+    ops     : 1;
+    optypes : (ot_reg_ax,ot_none,ot_none,ot_none);
+    code    : #2#223#224;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FPATAN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#243;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FPREM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#248;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FPREM1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#245;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FPTAN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#242;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FRNDINT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#252;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FRSTOR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #1#221#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSAVE;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#155#221#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSCALE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#253;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSETPM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#228;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FSIN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#254;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FSINCOS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#251;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FSQRT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#250;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#217#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FST;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#221#130;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FST;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#221#8#208;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTCW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#155#217#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FSTENV;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#155#217#134;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#217#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#221#131;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #1#219#135;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#221#8#216;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSTSW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#155#221#135;
+    flags   : if_8086 or if_fpu or if_sw
+  ),
+  (
+    opcode  : A_FSTSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#155#223#224;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FSTSW;
+    ops     : 1;
+    optypes : (ot_reg_ax,ot_none,ot_none,ot_none);
+    code    : #3#155#223#224;
+    flags   : if_286 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#132;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#220#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none,ot_none);
+    code    : #1#220#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#220#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUB;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#225;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#222#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#222#8#224;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #1#216#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #1#220#133;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#220#233;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_fpureg or ot_to,ot_none,ot_none,ot_none);
+    code    : #1#220#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#220#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#216#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBR;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#216#9#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBRP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#222#233;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBRP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#222#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FSUBRP;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#222#8#232;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FTST;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#228;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#221#225;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOM;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#221#8#224;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOM;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#221#9#224;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#219#233;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMI;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#219#8#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMI;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#219#9#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMIP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#223#233;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMIP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#223#8#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMIP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#223#9#232;
+    flags   : if_p6 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#221#233;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#221#8#232;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMP;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#221#9#232;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FUCOMPP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#218#233;
+    flags   : if_386 or if_fpu
+  ),
+  (
+    opcode  : A_FWAIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#155;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXAM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#229;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#201;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#217#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 2;
+    optypes : (ot_fpureg,ot_fpu0,ot_none,ot_none);
+    code    : #1#217#8#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXCH;
+    ops     : 2;
+    optypes : (ot_fpu0,ot_fpureg,ot_none,ot_none);
+    code    : #1#217#9#200;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FXTRACT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#244;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FYL2X;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#241;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_FYL2XP1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#217#249;
+    flags   : if_8086 or if_fpu
+  ),
+  (
+    opcode  : A_HLT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#244;
+    flags   : if_8086 or if_priv
+  ),
+  (
+    opcode  : A_IBTS;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#167#65;
+    flags   : if_386 or if_sm or if_undoc
+  ),
+  (
+    opcode  : A_ICEBP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IDIV;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#247#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IDIV;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#246#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#2#15#175#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#247#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg32 or ot_bits64,ot_rm_gpr,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #208#1#107#72#14;
+    flags   : if_286 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg32 or ot_bits64,ot_rm_gpr,ot_immediate,ot_none);
+    code    : #208#1#105#72#34;
+    flags   : if_286 or if_sm or if_sd or if_ar2
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#107#64#13;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#105#64#33;
+    flags   : if_286 or if_sd
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg16,ot_rm_gpr,ot_immediate or ot_bits8 or ot_signed,ot_none);
+    code    : #212#1#107#72#14;
+    flags   : if_286 or if_sm
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 3;
+    optypes : (ot_reg16,ot_rm_gpr,ot_immediate,ot_none);
+    code    : #212#1#105#72#26;
+    flags   : if_286 or if_sm or if_sw or if_ar2
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #212#1#107#64#13;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 2;
+    optypes : (ot_reg16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#105#64#25;
+    flags   : if_286 or if_sw
+  ),
+  (
+    opcode  : A_IMUL;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#246#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#228#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_ax or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #208#1#229#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_reg_dx,ot_none,ot_none);
+    code    : #1#236;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IN;
+    ops     : 2;
+    optypes : (ot_reg_ax or ot_bits32,ot_reg_dx,ot_none,ot_none);
+    code    : #208#1#237;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_reg16 or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #208#8#64;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#255#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INC;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#254#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#108;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_INSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#109;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#109;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_INT;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #1#205#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_INT01;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INT1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_INT03;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#204;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INT3;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#204;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_INTO;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#206;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_INVD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#8;
+    flags   : if_486 or if_priv
+  ),
+  (
+    opcode  : A_INVLPG;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#1#135;
+    flags   : if_486 or if_priv
+  ),
+  (
+    opcode  : A_IRET;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #215#1#207;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_IRETD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#207;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_IRETW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#207;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JCXZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #200#1#227#40;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_JECXZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #201#1#227#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#235#40;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #208#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#255#132;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_short,ot_none,ot_none,ot_none);
+    code    : #1#235#40;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_near,ot_none,ot_none,ot_none);
+    code    : #208#1#233#52;
+    flags   : if_8086 or if_pass2
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_immediate or ot_far,ot_none,ot_none,ot_none);
+    code    : #208#1#234#28#31;
+    flags   : if_8086 or if_pass2 or if_nox86_64
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_near,ot_none,ot_none,ot_none);
+    code    : #208#1#255#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_far,ot_none,ot_none,ot_none);
+    code    : #208#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate,ot_none,ot_none);
+    code    : #215#1#234#29#24;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #212#1#234#25#24;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_JMP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #213#1#234#33#24;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_LAHF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#159;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LAR;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#2#15#2#72;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#255#131;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_LCALL;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#255#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LDS;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32,ot_memory,ot_none,ot_none);
+    code    : #208#1#197#72;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LEA;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_memory,ot_none,ot_none);
+    code    : #208#1#141#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LEA;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#141#72;
+    flags   : if_8086 or if_sd
+  ),
+  (
+    opcode  : A_LEAVE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#201;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_LES;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32,ot_memory,ot_none,ot_none);
+    code    : #208#1#196#72;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LFS;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32,ot_memory,ot_none,ot_none);
+    code    : #208#2#15#180#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LGDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#1#130;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LGS;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32,ot_memory,ot_none,ot_none);
+    code    : #208#2#15#181#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LIDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#1#131;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#255#133;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_LJMP;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#255#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LLDT;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #2#15#0#130;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_LMSW;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #2#15#1#134;
+    flags   : if_286 or if_priv
+  ),
+  (
+    opcode  : A_LOADALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#7;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_LOADALL286;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#5;
+    flags   : if_286 or if_undoc
+  ),
+  (
+    opcode  : A_LOCK;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#240;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_LODSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#172;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LODSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#173;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LODSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#173;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOP;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #202#1#226#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none,ot_none);
+    code    : #200#1#226#40;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LOOP;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx or ot_bits64,ot_none,ot_none);
+    code    : #201#1#226#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPE;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #202#1#225#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none,ot_none);
+    code    : #200#1#225#40;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LOOPE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx or ot_bits64,ot_none,ot_none);
+    code    : #201#1#225#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPNE;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #202#1#224#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPNE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none,ot_none);
+    code    : #200#1#224#40;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LOOPNE;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx or ot_bits64,ot_none,ot_none);
+    code    : #201#1#224#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPNZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #202#1#224#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPNZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none,ot_none);
+    code    : #200#1#224#40;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LOOPNZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx or ot_bits64,ot_none,ot_none);
+    code    : #201#1#224#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LOOPZ;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #202#1#225#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_LOOPZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_cx,ot_none,ot_none);
+    code    : #200#1#225#40;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_LOOPZ;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ecx or ot_bits64,ot_none,ot_none);
+    code    : #201#1#225#40;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LSL;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#2#15#3#72;
+    flags   : if_286 or if_prot or if_sm
+  ),
+  (
+    opcode  : A_LSS;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_memory,ot_none,ot_none);
+    code    : #208#2#15#178#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_LTR;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #2#15#0#131;
+    flags   : if_286 or if_prot or if_priv
+  ),
+  (
+    opcode  : A_MONITOR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#200;
+    flags   : if_prescott
+  ),
+  (
+    opcode  : A_MONITOR;
+    ops     : 3;
+    optypes : (ot_reg_eax,ot_reg_ecx,ot_reg_edx,ot_none);
+    code    : #3#15#1#200;
+    flags   : if_prescott
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_mem_offs,ot_reg_ax,ot_none,ot_none);
+    code    : #212#1#163#36;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_mem_offs,ot_reg_eax,ot_none,ot_none);
+    code    : #213#1#163#36;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#137#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_mem_offs,ot_none,ot_none);
+    code    : #212#1#161#37;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_mem_offs,ot_none,ot_none);
+    code    : #213#1#161#37;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#139#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_immediate,ot_none,ot_none);
+    code    : #213#8#184#33;
+    flags   : if_386 or if_sd
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#199#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg16,ot_immediate,ot_none,ot_none);
+    code    : #212#8#184#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#199#128#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_mem_offs,ot_reg_al,ot_none,ot_none);
+    code    : #1#162#36;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#136#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_mem_offs,ot_none,ot_none);
+    code    : #1#160#37;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#138#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_immediate,ot_none,ot_none);
+    code    : #8#176#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#198#128#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32,ot_reg_cs,ot_none,ot_none);
+    code    : #208#1#140#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32,ot_reg_dess,ot_none,ot_none);
+    code    : #208#1#140#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32,ot_reg_fsgs,ot_none,ot_none);
+    code    : #208#1#140#65;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_dess,ot_rm_gpr or ot_bits16 or ot_bits32,ot_none,ot_none);
+    code    : #209#1#142#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_fsgs,ot_rm_gpr or ot_bits16 or ot_bits32,ot_none,ot_none);
+    code    : #209#1#142#72;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_cr4,ot_none,ot_none);
+    code    : #2#15#32#132;
+    flags   : if_pent or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_creg,ot_none,ot_none);
+    code    : #2#15#32#65;
+    flags   : if_386 or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_dreg,ot_none,ot_none);
+    code    : #2#15#33#65;
+    flags   : if_386 or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_treg,ot_none,ot_none);
+    code    : #2#15#36#65;
+    flags   : if_386 or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_cr4,ot_reg32,ot_none,ot_none);
+    code    : #2#15#34#140;
+    flags   : if_pent or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_creg,ot_reg32,ot_none,ot_none);
+    code    : #2#15#34#72;
+    flags   : if_386 or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_dreg,ot_reg32,ot_none,ot_none);
+    code    : #2#15#35#72;
+    flags   : if_386 or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOV;
+    ops     : 2;
+    optypes : (ot_reg_treg,ot_reg32,ot_none,ot_none);
+    code    : #2#15#38#72;
+    flags   : if_386 or if_priv or if_nox86_64
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_rm_gpr or ot_bits32,ot_none,ot_none);
+    code    : #2#15#110#72;
+    flags   : if_pent or if_mmx or if_sd
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_mmxreg,ot_none,ot_none);
+    code    : #2#15#126#65;
+    flags   : if_pent or if_mmx or if_sd
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_rm_gpr or ot_bits32,ot_none,ot_none);
+    code    : #241#2#15#110#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#126#65;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#111#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_mmxrm,ot_mmxreg,ot_none,ot_none);
+    code    : #2#15#127#65;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#126#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVQ;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#214#65;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#164;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOVSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#165;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#16#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVSD;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #220#2#15#17#65;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#165;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MOVSX;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_rm_gpr or ot_bits16,ot_none,ot_none);
+    code    : #208#2#15#191#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVSX;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #208#2#15#190#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVZX;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_rm_gpr or ot_bits16,ot_none,ot_none);
+    code    : #208#2#15#183#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MOVZX;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #208#2#15#182#72;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_MUL;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#247#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MUL;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#246#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_MWAIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#201;
+    flags   : if_prescott
+  ),
+  (
+    opcode  : A_MWAIT;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_reg_ecx,ot_none,ot_none);
+    code    : #3#15#1#201;
+    flags   : if_prescott
+  ),
+  (
+    opcode  : A_NEG;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#247#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NEG;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#246#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NOP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#144;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NOT;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#1#247#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_NOT;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#246#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#9#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#11#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#8#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#10#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#129#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#13#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#129#129#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#13#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#129#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#12#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_OR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#129#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_al,ot_none,ot_none);
+    code    : #1#230#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_ax,ot_none,ot_none);
+    code    : #212#1#231#20;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_immediate,ot_reg_eax,ot_none,ot_none);
+    code    : #213#1#231#20;
+    flags   : if_386 or if_sb
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_reg_dx,ot_reg_al,ot_none,ot_none);
+    code    : #1#238;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_reg_dx,ot_reg_ax,ot_none,ot_none);
+    code    : #212#1#239;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_OUT;
+    ops     : 2;
+    optypes : (ot_reg_dx,ot_reg_eax,ot_none,ot_none);
+    code    : #213#1#239;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OUTSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#110;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_OUTSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#111;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_OUTSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#111;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PACKSSDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#107#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PACKSSDW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#107#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PACKSSWB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#99#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PACKSSWB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#99#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PACKUSWB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#103#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PACKUSWB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#103#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#252#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#252#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#254#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#254#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#236#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#236#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#81#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PADDSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#237#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#237#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#220#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDUSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#220#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDUSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#221#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDUSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#221#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#253#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PADDW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#253#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PAND;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#219#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAND;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#219#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PANDN;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#223#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PANDN;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#223#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PAVEB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#80#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PAVGUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#191;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#116#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#116#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#118#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#118#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#117#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPEQW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#117#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#100#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#100#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#102#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#102#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#101#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PCMPGTW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#101#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PDISTIB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#84#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PF2ID;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#29;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#174;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFADD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#158;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFCMPEQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#176;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFCMPGE;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#144;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFCMPGT;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#160;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFMAX;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#164;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFMIN;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#148;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFMUL;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#180;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRCP;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#150;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRCPIT1;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#166;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRCPIT2;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#182;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRSQIT1;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#167;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFRSQRT;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#151;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFSUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#154;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFSUBR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#170;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PI2FD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#13;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PMACHRIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#94#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMADDWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#245#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMADDWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#245#72;
+    flags   : if_willamette or if_sm or if_sse2
+  ),
+  (
+    opcode  : A_PMAGW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#82#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHRIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#93#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHRWA;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#183;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PMULHRWC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#89#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMULHW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#229#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMULHW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#229#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMULLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#213#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMULLW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#213#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMVGEZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#92#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMVLZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#91#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMVNZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#90#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PMVZB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#88#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none,ot_none);
+    code    : #212#8#88;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none,ot_none);
+    code    : #213#8#88;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#143#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#143#128;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg_cs,ot_none,ot_none,ot_none);
+    code    : #1#15;
+    flags   : if_8086 or if_undoc
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg_dess,ot_none,ot_none,ot_none);
+    code    : #4;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_POP;
+    ops     : 1;
+    optypes : (ot_reg_fsgs,ot_none,ot_none,ot_none);
+    code    : #1#15#5#221;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_POPA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #215#1#97;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_POPAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#97;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_POPAW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#97;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_POPF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #215#1#157;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_POPFD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#157;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_POPFW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#157;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_POR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#235#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_POR;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#235#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PREFETCH;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#13#128;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PREFETCHW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#13#129;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#242#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#114#134#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#242#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSLLD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#114#134#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSLLDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#115#135#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#243#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#115#134#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#243#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSLLQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#115#134#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#241#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#113#134#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#241#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSLLW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#113#134#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#226#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#114#132#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#226#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSRAD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#114#132#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#225#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#113#132#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#225#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSRAW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#113#132#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#210#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#114#130#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#210#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSRLD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#114#130#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#211#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#115#130#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#211#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSRLQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#115#130#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#209#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_immediate,ot_none,ot_none);
+    code    : #2#15#113#130#21;
+    flags   : if_pent or if_mmx or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#209#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSRLW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#113#130#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSUBB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#248#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#248#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#250#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#250#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#232#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#232#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#85#72;
+    flags   : if_pent or if_mmx or if_sm or if_cyrix
+  ),
+  (
+    opcode  : A_PSUBSIW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none,ot_none);
+    code    : #2#15#85#72;
+    flags   : if_pent or if_mmx or if_cyrix
+  ),
+  (
+    opcode  : A_PSUBSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#233#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#233#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBUSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#216#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBUSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#216#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBUSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#217#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBUSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#217#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#249#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSUBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#249#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#104#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#104#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#106#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#106#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#105#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#105#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#96#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#96#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#98#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#98#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLWD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#97#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#97#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none,ot_none);
+    code    : #212#8#80;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg32,ot_none,ot_none,ot_none);
+    code    : #213#8#80;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#255#134;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#255#134;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #213#1#104#32#221;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #212#1#104#24#221;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none,ot_none);
+    code    : #1#106#12#221;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg_fsgs,ot_none,ot_none,ot_none);
+    code    : #1#15#7#221;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSH;
+    ops     : 1;
+    optypes : (ot_reg_sreg,ot_none,ot_none,ot_none);
+    code    : #6;
+    flags   : if_8086 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSHA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #215#1#96;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSHAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#96;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSHAW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#96;
+    flags   : if_186 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSHF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #215#1#156;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PUSHFD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#156;
+    flags   : if_386 or if_nox86_64
+  ),
+  (
+    opcode  : A_PUSHFW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#156;
+    flags   : if_186
+  ),
+  (
+    opcode  : A_PXOR;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#239#72;
+    flags   : if_pent or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PXOR;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#239#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#130#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#130;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#130#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#131#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#131;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RCR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#131#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RDSHR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#54;
+    flags   : if_p6 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_RDMSR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#50;
+    flags   : if_pent or if_priv
+  ),
+  (
+    opcode  : A_RDPMC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#51;
+    flags   : if_p6
+  ),
+  (
+    opcode  : A_RDTSC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#49;
+    flags   : if_pent
+  ),
+  (
+    opcode  : A_REP;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#243;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#243;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPNE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#242;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPNZ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#242;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_REPZ;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#243;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_RET;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#195;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RET;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #1#194#24;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_RETF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#203;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RETF;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #1#202#24;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_RETN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#195;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_RETN;
+    ops     : 1;
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
+    code    : #1#194#24;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#128#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#128;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#128#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#129#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#129;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_ROR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#129#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_RSDC;
+    ops     : 2;
+    optypes : (ot_reg_sreg,ot_memory or ot_bits80,ot_none,ot_none);
+    code    : #2#15#121#65;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_RSLDT;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #2#15#123#128;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_RSM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#170;
+    flags   : if_pent or if_smm
+  ),
+  (
+    opcode  : A_SAHF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#158;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#132#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#132#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SALC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#214;
+    flags   : if_8086 or if_undoc or if_nox86_64
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#135#21;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#135;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SAR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#135#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#25#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#27#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#131#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#24#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#26#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#29#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #208#1#129#131#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#29#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #208#1#129#131#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#28#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_SBB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#131#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_SCASB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #218#1#174;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SCASD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #218#213#1#175;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_SCASW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #218#212#1#175;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SEGCS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#46;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGDS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#62;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGES;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#38;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGFS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#100;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGGS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#101;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SEGSS;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#54;
+    flags   : if_8086 or if_pre
+  ),
+  (
+    opcode  : A_SGDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#1#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#132#21;
+    flags   : if_186 or if_sw
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#132;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHL;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#132#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
+    code    : #209#2#15#164#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHLD;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none);
+    code    : #209#2#15#165#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_unity,ot_none,ot_none);
+    code    : #208#1#209#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none,ot_none);
+    code    : #208#1#211#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none,ot_none);
+    code    : #208#1#193#133#21;
+    flags   : if_186 or if_sw
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_unity,ot_none,ot_none);
+    code    : #1#208#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg_cl,ot_none,ot_none);
+    code    : #1#210#133;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SHR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#192#133#21;
+    flags   : if_186 or if_sb
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
+    code    : #209#2#15#172#65#22;
+    flags   : if_386 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SHRD;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_reg16 or ot_bits32 or ot_bits64,ot_reg_cl,ot_none);
+    code    : #209#2#15#173#65;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SIDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#1#129;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SLDT;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#0#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SLDT;
+    ops     : 1;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#2#15#0#128;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_SMI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#241;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_SMINT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#56;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_SMINTOLD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#126;
+    flags   : if_486 or if_cyrix
+  ),
+  (
+    opcode  : A_SMSW;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#2#15#1#132;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_STC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#249;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#253;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#251;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STOSB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#170;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STOSD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #213#1#171;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_STOSW;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #212#1#171;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_STR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#0#129;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_STR;
+    ops     : 1;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
+    code    : #208#2#15#0#129;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#41#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#43#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#40#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#42#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#133#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#45#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #208#1#129#133#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#45#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#133#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#44#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_SUB;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#133#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_SVDC;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits80,ot_reg_sreg,ot_none,ot_none);
+    code    : #2#15#120#65;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_SVLDT;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #2#15#122#128;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_SVTS;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits80,ot_none,ot_none,ot_none);
+    code    : #2#15#124#128;
+    flags   : if_486 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_SYSCALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#5;
+    flags   : if_p6 or if_amd
+  ),
+  (
+    opcode  : A_SYSENTER;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#52;
+    flags   : if_p6
+  ),
+  (
+    opcode  : A_SYSEXIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#53;
+    flags   : if_p6 or if_priv
+  ),
+  (
+    opcode  : A_SYSRET;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#7;
+    flags   : if_p6 or if_priv or if_amd
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#133#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_memory,ot_none,ot_none);
+    code    : #208#1#133#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none,ot_none);
+    code    : #1#132#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#132#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#169#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#169#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#168#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #213#1#247#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#247#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#246#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits32,ot_none,ot_none);
+    code    : #213#1#247#128#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits16,ot_none,ot_none);
+    code    : #212#1#247#128#25;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_TEST;
+    ops     : 2;
+    optypes : (ot_memory,ot_immediate or ot_bits8,ot_none,ot_none);
+    code    : #1#246#128#17;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_UD1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#185;
+    flags   : if_286 or if_undoc
+  ),
+  (
+    opcode  : A_UD2;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#11;
+    flags   : if_286
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#17#65;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_memory,ot_none,ot_none);
+    code    : #208#2#15#19#72;
+    flags   : if_386 or if_undoc or if_sm
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #2#15#16#65;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_UMOV;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #2#15#18#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_VERR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#0#132;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #2#15#0#132;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERR;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none,ot_none);
+    code    : #2#15#0#132;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERW;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#0#133;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERW;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits16,ot_none,ot_none,ot_none);
+    code    : #2#15#0#133;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_VERW;
+    ops     : 1;
+    optypes : (ot_reg16,ot_none,ot_none,ot_none);
+    code    : #2#15#0#133;
+    flags   : if_286 or if_prot
+  ),
+  (
+    opcode  : A_WAIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#155;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_WBINVD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#9;
+    flags   : if_486 or if_priv
+  ),
+  (
+    opcode  : A_WRSHR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#55;
+    flags   : if_p6 or if_cyrix or if_smm
+  ),
+  (
+    opcode  : A_WRMSR;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#48;
+    flags   : if_pent or if_priv
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#193#65;
+    flags   : if_486 or if_sm
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #2#15#192#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_reg8,ot_reg8,ot_none,ot_none);
+    code    : #2#15#192#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none,ot_none);
+    code    : #208#2#15#193#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XADD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none,ot_none);
+    code    : #209#2#15#193#65;
+    flags   : if_486
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_memory,ot_none,ot_none);
+    code    : #212#2#15#166#72;
+    flags   : if_386 or if_sw or if_undoc
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg16,ot_none,ot_none);
+    code    : #212#2#15#166#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none,ot_none);
+    code    : #213#2#15#166#72;
+    flags   : if_386 or if_sd or if_undoc
+  ),
+  (
+    opcode  : A_XBTS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none,ot_none);
+    code    : #213#2#15#166#72;
+    flags   : if_386 or if_undoc
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_reg16,ot_none,ot_none);
+    code    : #212#9#144;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_reg32,ot_none,ot_none);
+    code    : #213#9#144;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg16,ot_reg_ax,ot_none,ot_none);
+    code    : #212#8#144;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg_eax,ot_none,ot_none);
+    code    : #213#8#144;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#135#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#135#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#134#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XCHG;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#134#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XLAT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#215;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XLATB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #1#215;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_rm_gpr,ot_reg16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    code    : #208#1#49#65;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#51#72;
+    flags   : if_8086 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
+    code    : #1#48#65;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg8,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #1#50#72;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8 or ot_signed,ot_none,ot_none);
+    code    : #208#1#131#134#13;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg_eax,ot_immediate,ot_none,ot_none);
+    code    : #213#1#53#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_immediate,ot_none,ot_none);
+    code    : #208#1#129#134#33;
+    flags   : if_386 or if_sm
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg_ax,ot_immediate,ot_none,ot_none);
+    code    : #212#1#53#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits16,ot_immediate,ot_none,ot_none);
+    code    : #212#1#129#134#25;
+    flags   : if_8086 or if_sw
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_reg_al,ot_immediate,ot_none,ot_none);
+    code    : #1#52#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_XOR;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits8,ot_immediate,ot_none,ot_none);
+    code    : #1#128#134#17;
+    flags   : if_8086 or if_sb
+  ),
+  (
+    opcode  : A_XSTORE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#167#192;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_XCRYPTECB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#167#200;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_XCRYPTCBC;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#167#208;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_XCRYPTCFB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#167#224;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_XCRYPTOFB;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#167#232;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_CMOVcc;
+    ops     : 2;
+    optypes : (ot_reg16 or ot_bits32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#1#15#11#64#72;
+    flags   : if_p6 or if_sm
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #11#112#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_bits16 or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #208#1#15#11#128#52;
+    flags   : if_386 or if_pass2
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_short,ot_none,ot_none,ot_none);
+    code    : #11#112#40;
+    flags   : if_8086
+  ),
+  (
+    opcode  : A_Jcc;
+    ops     : 1;
+    optypes : (ot_immediate or ot_near,ot_none,ot_none,ot_none);
+    code    : #208#1#15#11#128#52;
+    flags   : if_386 or if_pass2
+  ),
+  (
+    opcode  : A_SETcc;
+    ops     : 1;
+    optypes : (ot_rm_gpr or ot_bits8,ot_none,ot_none,ot_none);
+    code    : #1#15#11#144#128;
+    flags   : if_386
+  ),
+  (
+    opcode  : A_ADDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#88#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ADDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#88#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ANDNPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#85#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ANDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#84#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPEQPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#0;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPEQSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#0;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLEPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#2;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLESS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#2;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#1;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPLTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#1;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNEQPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#4;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNEQSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#4;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLEPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#6;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLESS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#6;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#5;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPNLTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#5;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPORDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#7;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPORDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#7;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPUNORDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#194#72#1#3;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPUNORDSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#194#72#1#3;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CMPPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #217#2#15#194#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_CMPSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #219#2#15#194#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_COMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#47#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTPI2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#2#15#42#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #217#2#15#45#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmreg,ot_none,ot_none);
+    code    : #217#2#15#45#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTSI2SS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_rm_gpr or ot_bits32,ot_none,ot_none);
+    code    : #219#209#2#15#42#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#208#2#15#45#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #219#208#2#15#45#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #217#2#15#44#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTTPS2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmreg,ot_none,ot_none);
+    code    : #217#2#15#44#72;
+    flags   : if_katmai or if_sse or if_mmx
+  ),
+  (
+    opcode  : A_CVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#208#2#15#44#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_CVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #219#208#2#15#44#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_DIVPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#94#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_DIVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#94#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_LDMXCSR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#174#130;
+    flags   : if_katmai or if_sse or if_sd
+  ),
+  (
+    opcode  : A_MAXPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#95#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MAXSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#95#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MINPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#93#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MINSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#93#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#40#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#41#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#22#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#23#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#22#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
+    code    : #2#15#18#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVLPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#19#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVHLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#18#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVMSKPS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#80#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVNTPS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#43#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#16#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVSS;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #219#2#15#17#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#16#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #217#2#15#17#65;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MULPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#89#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_MULSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#89#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_ORPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#86#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RCPPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#83#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RCPSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#83#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RSQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#82#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_RSQRTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#82#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SHUFPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #2#15#198#72#18;
+    flags   : if_katmai or if_sse or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#81#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SQRTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#81#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_STMXCSR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#174#131;
+    flags   : if_katmai or if_sse or if_sd
+  ),
+  (
+    opcode  : A_SUBPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #217#2#15#92#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_SUBSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#92#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#46#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UNPCKHPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#21#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_UNPCKLPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#20#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_XORPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#87#72;
+    flags   : if_katmai or if_sse
+  ),
+  (
+    opcode  : A_FXRSTOR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#174#129;
+    flags   : if_p6 or if_sse or if_fpu
+  ),
+  (
+    opcode  : A_FXSAVE;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#174#128;
+    flags   : if_p6 or if_sse or if_fpu
+  ),
+  (
+    opcode  : A_PREFETCHNTA;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#24#128;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_PREFETCHT0;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#24#129;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_PREFETCHT1;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#24#130;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_PREFETCHT2;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#24#131;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_SFENCE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#174#248;
+    flags   : if_katmai
+  ),
+  (
+    opcode  : A_MASKMOVQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxreg,ot_none,ot_none);
+    code    : #2#15#247#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_MOVNTQ;
+    ops     : 2;
+    optypes : (ot_memory,ot_mmxreg,ot_none,ot_none);
+    code    : #2#15#231#65;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAVGB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#224#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAVGB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#224#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PAVGW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#227#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PAVGW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#227#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PEXTRW;
+    ops     : 3;
+    optypes : (ot_reg32,ot_mmxreg,ot_immediate,ot_none);
+    code    : #2#15#197#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PEXTRW;
+    ops     : 3;
+    optypes : (ot_reg32,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#2#15#197#72#22;
+    flags   : if_sse41
+  ),
+  (
+    opcode  : A_PEXTRW;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits32,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#3#15#58#21#65#22;
+    flags   : if_sse41
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_reg16,ot_immediate,ot_none);
+    code    : #2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_reg32,ot_immediate,ot_none);
+    code    : #2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_memory,ot_immediate,ot_none);
+    code    : #2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_memory or ot_bits16,ot_immediate,ot_none);
+    code    : #2#15#196#72#18;
+    flags   : if_katmai or if_mmx or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_reg16,ot_immediate,ot_none);
+    code    : #241#2#15#196#72#22;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_reg32,ot_immediate,ot_none);
+    code    : #241#2#15#196#72#22;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory,ot_immediate,ot_none);
+    code    : #241#2#15#196#72#22;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory or ot_bits16,ot_immediate,ot_none);
+    code    : #241#2#15#196#72#22;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PMAXSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#238#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMAXSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#238#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMAXUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#222#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMAXUB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#222#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMINSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#234#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMINSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#234#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMINUB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#218#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMINUB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#218#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMOVMSKB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_mmxreg,ot_none,ot_none);
+    code    : #2#15#215#72;
+    flags   : if_katmai or if_mmx
+  ),
+  (
+    opcode  : A_PMOVMSKB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#215#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_PMULHUW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#228#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMULHUW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#228#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSADBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#246#72;
+    flags   : if_katmai or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSADBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#246#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSHUFW;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_immediate,ot_none);
+    code    : #2#15#112#72#18;
+    flags   : if_katmai or if_mmx or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PFNACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#138;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PFPNACC;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#142;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PI2FW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#12;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PF2IW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#28;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_PSWAPD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#15#72#1#187;
+    flags   : if_pent or if_3dnow or if_sm
+  ),
+  (
+    opcode  : A_FFREEP;
+    ops     : 1;
+    optypes : (ot_fpureg,ot_none,ot_none,ot_none);
+    code    : #1#223#8#192;
+    flags   : if_pent or if_3dnow or if_fpu
+  ),
+  (
+    opcode  : A_MASKMOVDQU;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#247#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CLFLUSH;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#174#135;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVNTDQ;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#231#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVNTI;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32 or ot_bits64,ot_none,ot_none);
+    code    : #208#2#15#195#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVNTPD;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#43#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PAUSE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#1#144;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_LFENCE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#174#232;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MFENCE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#174#240;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVDQA;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#127#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVDQA;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#111#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVDQU;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #219#2#15#127#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVDQU;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#111#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVDQ2Q;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmreg,ot_none,ot_none);
+    code    : #220#2#15#214#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVQ2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_mmxreg,ot_none,ot_none);
+    code    : #219#2#15#214#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_PADDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#212#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PADDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#212#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMULUDQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#244#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PMULUDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#244#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSHUFD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#2#15#112#72#18;
+    flags   : if_willamette or if_sse2 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PSHUFHW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #219#2#15#112#72#18;
+    flags   : if_willamette or if_sse2 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PSHUFLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #220#2#15#112#72#18;
+    flags   : if_willamette or if_sse2 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PSRLDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_immediate,ot_none,ot_none);
+    code    : #241#2#15#115#131#21;
+    flags   : if_willamette or if_sse2 or if_sb or if_ar1
+  ),
+  (
+    opcode  : A_PSUBQ;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #2#15#251#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PSUBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#251#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKHQDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#109#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_PUNPCKLQDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#108#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_ADDPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#88#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_ADDSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#88#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_ANDNPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#85#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_ANDPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#84#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPEQPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#0;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPEQSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#0;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPLEPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#2;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPLESD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#2;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPLTPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#1;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPLTSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#1;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPNEQPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#4;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPNEQSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#4;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPNLEPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#6;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPNLESD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#6;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPNLTPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#5;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPNLTSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#5;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPORDPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#7;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPORDSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#7;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPUNORDPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#194#72#1#3;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CMPUNORDSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#194#72#1#3;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CMPPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#2#15#194#72#22;
+    flags   : if_willamette or if_sse2 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_COMISD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#47#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTDQ2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #219#2#15#230#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTDQ2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #219#2#15#230#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTDQ2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #2#15#91#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CVTPD2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#230#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CVTPD2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#45#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTPD2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#90#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CVTPI2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_mmxrm,ot_none,ot_none);
+    code    : #241#2#15#42#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTPS2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#91#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CVTPS2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #2#15#90#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTPS2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #2#15#90#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #220#2#15#45#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#2#15#45#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSD2SS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #220#2#15#90#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSD2SS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#2#15#90#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSI2SD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_rm_gpr or ot_bits32,ot_none,ot_none);
+    code    : #220#2#15#42#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSS2SD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #219#2#15#90#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTSS2SD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#2#15#90#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTTPD2PI;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#44#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTTPD2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#230#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CVTTPS2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#91#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_CVTTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #220#208#2#15#44#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_CVTTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#208#2#15#44#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_DIVPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#94#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_DIVSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#94#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MAXPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#95#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MAXSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#95#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MINPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#93#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MINSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#93#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVAPD;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#41#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVAPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#40#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVHPD;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#23#65;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVHPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
+    code    : #241#2#15#22#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVLPD;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#19#65;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVLPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
+    code    : #241#2#15#18#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVMSKPD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#80#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_MOVUPD;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#17#65;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MOVUPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#16#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MULPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#89#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_MULSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#89#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_ORPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#86#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_SHUFPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#2#15#198#72#22;
+    flags   : if_willamette or if_sse2 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_SQRTPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#81#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_SQRTSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#81#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_SUBPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#92#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_SUBSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#92#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_UCOMISD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#46#72;
+    flags   : if_willamette or if_sse2
+  ),
+  (
+    opcode  : A_UNPCKHPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#21#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_UNPCKLPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#20#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_XORPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#87#72;
+    flags   : if_willamette or if_sse2 or if_sm
+  ),
+  (
+    opcode  : A_ADDSUBPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#208#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_ADDSUBPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#208#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_HADDPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#124#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_HADDPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#124#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_HSUBPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#2#15#125#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_HSUBPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#125#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_LDDQU;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
+    code    : #220#2#15#240#72;
+    flags   : if_prescott or if_sse3
+  ),
+  (
+    opcode  : A_MOVDDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#2#15#18#72;
+    flags   : if_prescott or if_sse3
+  ),
+  (
+    opcode  : A_MOVSHDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#22#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_MOVSLDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#2#15#18#72;
+    flags   : if_prescott or if_sse3 or if_sm
+  ),
+  (
+    opcode  : A_VMREAD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none,ot_none);
+    code    : #2#15#120#65;
+    flags   : if_386 or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMREAD;
+    ops     : 2;
+    optypes : (ot_memory,ot_reg32,ot_none,ot_none);
+    code    : #2#15#120#65;
+    flags   : if_386 or if_priv or if_prot or if_sm
+  ),
+  (
+    opcode  : A_VMWRITE;
+    ops     : 2;
+    optypes : (ot_reg32,ot_reg32,ot_none,ot_none);
+    code    : #2#15#121#72;
+    flags   : if_386 or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMWRITE;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory,ot_none,ot_none);
+    code    : #2#15#121#72;
+    flags   : if_386 or if_priv or if_prot or if_sm
+  ),
+  (
+    opcode  : A_VMCALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#193;
+    flags   : if_386 or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMLAUNCH;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#194;
+    flags   : if_386 or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMRESUME;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#195;
+    flags   : if_386 or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMXOFF;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#196;
+    flags   : if_386 or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMXON;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #219#2#15#199#134;
+    flags   : if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMCLEAR;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #241#2#15#199#134;
+    flags   : if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMPTRLD;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#199#134;
+    flags   : if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMPTRST;
+    ops     : 1;
+    optypes : (ot_memory,ot_none,ot_none,ot_none);
+    code    : #2#15#199#135;
+    flags   : if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMRUN;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#216;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMMCALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#217;
+    flags   : if_386 or if_svm
+  ),
+  (
+    opcode  : A_VMLOAD;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#218;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_VMSAVE;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#219;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_STGI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#220;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_CLGI;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#221;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_SKINIT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#222;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_INVLPGA;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #3#15#1#223;
+    flags   : if_386 or if_svm or if_priv or if_prot
+  ),
+  (
+    opcode  : A_MONTMUL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#166#192;
+    flags   : if_centaur
+  ),
+  (
+    opcode  : A_XSHA1;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#166#200;
+    flags   : if_centaur
+  ),
+  (
+    opcode  : A_XSHA256;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #219#3#15#166#208;
+    flags   : if_centaur
+  ),
+  (
+    opcode  : A_DMINT;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#57;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_RDM;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #2#15#58;
+    flags   : if_p6 or if_cyrix
+  ),
+  (
+    opcode  : A_MOVNTSS;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #219#2#15#43#65;
+    flags   : if_sse4 or if_sd
+  ),
+  (
+    opcode  : A_MOVNTSD;
+    ops     : 2;
+    optypes : (ot_memory,ot_xmmreg,ot_none,ot_none);
+    code    : #220#213#2#15#43#65;
+    flags   : if_sse4
+  ),
+  (
+    opcode  : A_INSERTQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #220#2#15#121#72;
+    flags   : if_sse4
+  ),
+  (
+    opcode  : A_INSERTQ;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate,ot_immediate);
+    code    : #220#2#15#120#72#22#23;
+    flags   : if_sse4 or if_sb
+  ),
+  (
+    opcode  : A_EXTRQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_immediate,ot_immediate,ot_none);
+    code    : #241#2#15#120#128#21#22;
+    flags   : if_sse4 or if_sb
+  ),
+  (
+    opcode  : A_EXTRQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#2#15#121#72;
+    flags   : if_sse4
+  ),
+  (
+    opcode  : A_LZCNT;
+    ops     : 2;
+    optypes : (ot_reg16,ot_rm_gpr,ot_none,ot_none);
+    code    : #208#219#2#15#189#72;
+    flags   : if_386 or if_sm or if_sse4
+  ),
+  (
+    opcode  : A_LZCNT;
+    ops     : 2;
+    optypes : (ot_reg32 or ot_bits64,ot_rm_gpr,ot_none,ot_none);
+    code    : #209#219#2#15#189#72;
+    flags   : if_386 or if_sm or if_sse4
+  ),
+  (
+    opcode  : A_PABSB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#28#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PABSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#28#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PABSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#29#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PABSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#29#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PABSD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#30#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PABSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#30#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PALIGNR;
+    ops     : 3;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_immediate,ot_none);
+    code    : #217#3#15#58#15#72#22;
+    flags   : if_ssse3 or if_mmx or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PALIGNR;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#15#72#22;
+    flags   : if_ssse3 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PHADDW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#1#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PHADDW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#1#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PHADDD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#2#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PHADDD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#2#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PHADDSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#3#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PHADDSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#3#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PHSUBW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#5#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PHSUBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#5#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PHSUBD;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#6#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PHSUBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#6#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PHSUBSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#7#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PHSUBSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#7#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PMADDUBSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#4#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMADDUBSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#4#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PMULHRSW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#11#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PMULHRSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#11#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PSHUFB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#0#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSHUFB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#0#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PSIGNB;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#8#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSIGNB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#8#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PSIGNW;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#9#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSIGNW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#9#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_PSIGND;
+    ops     : 2;
+    optypes : (ot_mmxreg,ot_mmxrm,ot_none,ot_none);
+    code    : #217#3#15#56#10#72;
+    flags   : if_ssse3 or if_mmx or if_sm
+  ),
+  (
+    opcode  : A_PSIGND;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#10#72;
+    flags   : if_ssse3 or if_sm
+  ),
+  (
+    opcode  : A_BLENDPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#12#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_BLENDPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#13#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_BLENDVPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#20#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_BLENDVPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#21#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_DPPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#64#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_DPPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#65#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_EXTRACTPS;
+    ops     : 3;
+    optypes : (ot_memory,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#213#3#15#58#23#65#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_EXTRACTPS;
+    ops     : 3;
+    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#3#15#58#23#65#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_INSERTPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#33#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_MOVNTDQA;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
+    code    : #241#3#15#56#42#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_MPSADBW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#66#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PACKUSDW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#43#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PBLENDVB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#16#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PBLENDW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#14#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PCMPEQQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#41#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PEXTRB;
+    ops     : 3;
+    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#3#15#58#20#65#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PEXTRB;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits8,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#3#15#58#20#65#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PEXTRD;
+    ops     : 3;
+    optypes : (ot_reg32,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#3#15#58#22#65#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PEXTRD;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits32,ot_xmmreg,ot_immediate,ot_none);
+    code    : #241#3#15#58#22#65#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PHMINPOSUW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#65#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PINSRB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_reg32 or ot_bits64,ot_immediate,ot_none);
+    code    : #241#3#15#58#32#72#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory or ot_bits8,ot_immediate,ot_none);
+    code    : #241#3#15#58#32#72#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_reg32,ot_immediate,ot_none);
+    code    : #241#3#15#58#34#72#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PINSRD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_immediate,ot_none);
+    code    : #241#3#15#58#34#72#22;
+    flags   : if_sse41 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PMAXSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#60#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMAXSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#61#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMAXUD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#63#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMAXUW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#62#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMINSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#56#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMINSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#57#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMINUW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#58#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMINUD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#59#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVSXBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#32#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVSXBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#33#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVSXBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#34#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVSXWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#35#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVSXWQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#36#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVSXDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#37#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVZXBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#48#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVZXBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#49#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVZXBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#50#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVZXWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#51#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVZXWQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#52#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMOVZXDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#53#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMULDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#40#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PMULLD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#64#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_PTEST;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#23#72;
+    flags   : if_sse41 or if_sm
+  ),
+  (
+    opcode  : A_ROUNDPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#8#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_ROUNDPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#9#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_ROUNDSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#10#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_ROUNDSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#11#72#22;
+    flags   : if_sse41 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_CRC32;
+    ops     : 2;
+    optypes : (ot_reg32,ot_rm_gpr or ot_bits8,ot_none,ot_none);
+    code    : #220#3#15#56#240#72;
+    flags   : if_sse42
+  ),
+  (
+    opcode  : A_CRC32;
+    ops     : 2;
+    optypes : (ot_reg32,ot_rm_gpr or ot_bits16 or ot_bits32,ot_none,ot_none);
+    code    : #209#220#3#15#56#241#72;
+    flags   : if_sse42
+  ),
+  (
+    opcode  : A_PCMPESTRI;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#97#72#22;
+    flags   : if_sse42 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PCMPESTRM;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#96#72#22;
+    flags   : if_sse42 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PCMPISTRI;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#99#72#22;
+    flags   : if_sse42 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PCMPISTRM;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#98#72#22;
+    flags   : if_sse42 or if_sm2 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_PCMPGTQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#55#72;
+    flags   : if_sse42 or if_sm
+  ),
+  (
+    opcode  : A_POPCNT;
+    ops     : 2;
+    optypes : (ot_reg16,ot_rm_gpr or ot_bits16,ot_none,ot_none);
+    code    : #219#208#2#15#184#72;
+    flags   : if_386 or if_sm or if_sse4
+  ),
+  (
+    opcode  : A_POPCNT;
+    ops     : 2;
+    optypes : (ot_reg32,ot_rm_gpr or ot_bits32,ot_none,ot_none);
+    code    : #219#208#2#15#184#72;
+    flags   : if_386 or if_sm or if_sse4
+  ),
+  (
+    opcode  : A_AESENC;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#220#72;
+    flags   : if_sse4 or if_sm
+  ),
+  (
+    opcode  : A_AESENCLAST;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#221#72;
+    flags   : if_sse4 or if_sm
+  ),
+  (
+    opcode  : A_AESDEC;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#222#72;
+    flags   : if_sse4 or if_sm
+  ),
+  (
+    opcode  : A_AESDECLAST;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#223#72;
+    flags   : if_sse4 or if_sm
+  ),
+  (
+    opcode  : A_AESIMC;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#3#15#56#219#72;
+    flags   : if_sse4 or if_sm
+  ),
+  (
+    opcode  : A_AESKEYGENASSIST;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate,ot_none);
+    code    : #241#3#15#58#223#72#22;
+    flags   : if_sse4 or if_sb or if_ar2
+  ),
+  (
+    opcode  : A_VADDPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#88#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSUBPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#208#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSUBPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#208#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSUBPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #220#242#244#248#1#208#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VADDSUBPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #220#242#248#1#208#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VAESDEC;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#222#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VAESDECLAST;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#223#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VAESENC;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#220#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VAESENCLAST;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#221#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VAESIMC;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#219#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VAESKEYGENASSIST;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#223#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDNPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#85#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDNPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#85#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDNPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#85#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDNPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#85#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#84#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#84#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#84#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VANDPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#84#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDPD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#13#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDPD;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#250#1#13#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#12#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDPS;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#250#1#12#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDVPD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_xmmreg);
+    code    : #241#242#250#1#75#61#80#247;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDVPD;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_ymmreg);
+    code    : #241#242#244#250#1#75#61#80#247;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDVPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_xmmreg);
+    code    : #241#242#250#1#74#61#80#247;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBLENDVPS;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_ymmreg);
+    code    : #241#242#244#250#1#74#61#80#247;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBROADCASTF128;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_memory or ot_bits128,ot_none,ot_none);
+    code    : #241#242#244#249#1#26#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBROADCASTSD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#244#249#1#25#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBROADCASTSS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #241#242#244#249#1#24#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VBROADCASTSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #241#242#249#1#24#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPPD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPPD;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #242#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPPS;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #242#244#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPSD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_immediate or ot_bits8);
+    code    : #220#242#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPSD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8);
+    code    : #220#242#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPSS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_immediate or ot_bits8);
+    code    : #219#242#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCMPSS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8);
+    code    : #219#242#248#1#194#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCOMISD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#248#1#47#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCOMISD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#47#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #242#248#1#47#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#47#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTDQ2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #219#242#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTDQ2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTDQ2PD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_none,ot_none);
+    code    : #219#242#244#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTDQ2PD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_memory or ot_bits128,ot_none,ot_none);
+    code    : #219#242#244#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTDQ2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#248#1#91#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTDQ2PS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #242#244#248#1#91#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPD2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #220#242#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPD2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #220#242#244#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPD2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#90#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPD2PS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#90#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPS2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#91#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPS2DQ;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#91#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPS2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #242#248#1#90#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPS2PD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#90#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTPS2PD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#244#248#1#90#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#242#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #220#242#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#242#243#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #220#242#243#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSD2SS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#90#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSD2SS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#90#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSI2SD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits32,ot_none);
+    code    : #220#242#248#1#42#61#80;
+    flags   : if_avx or if_sandybridge or if_sd
+  ),
+  (
+    opcode  : A_VCVTSI2SD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
+    code    : #220#242#243#248#1#42#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSI2SS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits32,ot_none);
+    code    : #219#242#248#1#42#61#80;
+    flags   : if_avx or if_sandybridge or if_sd
+  ),
+  (
+    opcode  : A_VCVTSI2SS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none);
+    code    : #219#242#243#248#1#42#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSS2SD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#90#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSS2SD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#90#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#242#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#242#243#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#243#248#1#45#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTPD2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTPD2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#230#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTPS2DQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#242#248#1#91#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTPS2DQ;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #219#242#244#248#1#91#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#242#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #220#242#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#242#243#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSD2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #220#242#243#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#242#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #219#242#243#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VCVTTSS2SI;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#243#248#1#44#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDIVSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#94#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDPPD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#65#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDPPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#64#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VDPPS;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#250#1#64#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VEXTRACTF128;
+    ops     : 3;
+    optypes : (ot_xmmrm,ot_ymmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#244#250#1#25#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VEXTRACTPS;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits32,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#23#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHADDPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#124#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHADDPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#124#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHADDPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #220#242#248#1#124#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHADDPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #220#242#244#248#1#124#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHSUBPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#125#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHSUBPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#125#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHSUBPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #220#242#248#1#125#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VHSUBPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #220#242#244#248#1#125#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VINSERTF128;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#250#1#24#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VINSERTPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#33#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VINSERTPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#33#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VLDDQU;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits128,ot_none,ot_none);
+    code    : #220#242#248#1#240#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VLDDQU;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_memory or ot_bits256,ot_none,ot_none);
+    code    : #220#242#244#248#1#240#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VLDMXCSR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #242#248#1#174#130;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVDQU;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#247#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPD;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits256,ot_ymmreg,ot_ymmreg,ot_none);
+    code    : #241#242#244#249#1#47#61#66;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPD;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits128,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #241#242#249#1#47#61#66;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_memory or ot_bits256,ot_none);
+    code    : #241#242#244#249#1#45#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits128,ot_none);
+    code    : #241#242#249#1#45#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPS;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits256,ot_ymmreg,ot_ymmreg,ot_none);
+    code    : #241#242#244#249#1#46#61#66;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPS;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits128,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #241#242#249#1#46#61#66;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_memory or ot_bits256,ot_none);
+    code    : #241#242#244#249#1#44#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMASKMOVPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits128,ot_none);
+    code    : #241#242#249#1#44#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMAXSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#95#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMINSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#93#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#40#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPD;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#41#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#40#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPD;
+    ops     : 2;
+    optypes : (ot_ymmrm,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#41#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#248#1#40#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPS;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#41#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #242#244#248#1#40#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVAPS;
+    ops     : 2;
+    optypes : (ot_ymmrm,ot_ymmreg,ot_none,ot_none);
+    code    : #242#244#248#1#41#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_rm_gpr or ot_bits32,ot_none,ot_none);
+    code    : #241#242#248#1#110#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVD;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits32,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#126#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDDUP;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #220#242#244#248#1#18#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#242#248#1#18#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #220#242#248#1#18#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQA;
+    ops     : 2;
+    optypes : (ot_ymmrm,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#127#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQA;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#111#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQA;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#127#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQA;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#111#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQU;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #219#242#244#248#1#111#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQU;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#242#248#1#111#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQU;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#248#1#127#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVDQU;
+    ops     : 2;
+    optypes : (ot_ymmrm,ot_ymmreg,ot_none,ot_none);
+    code    : #219#242#244#248#1#127#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVHLPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #242#248#1#18#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVHPD;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#23#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVHPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #241#242#248#1#22#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVHPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #242#248#1#22#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVHPS;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#23#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVLHPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #242#248#1#22#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVLPD;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#19#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVLPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #241#242#248#1#18#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVLPS;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#19#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVLPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #242#248#1#18#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPD;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPD;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPD;
+    ops     : 2;
+    optypes : (ot_reg64,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_ymmreg,ot_none,ot_none);
+    code    : #242#244#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPS;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPS;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVMSKPS;
+    ops     : 2;
+    optypes : (ot_reg64,ot_ymmreg,ot_none,ot_none);
+    code    : #242#244#248#1#80#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTDQ;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits128,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#231#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTDQ;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits256,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#231#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTDQA;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits128,ot_none,ot_none);
+    code    : #241#242#249#1#42#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTPD;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits256,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#43#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTPD;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits128,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#43#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTPS;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits128,ot_ymmreg,ot_none,ot_none);
+    code    : #242#244#248#1#43#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVNTPS;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits128,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#43#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVQ;
+    ops     : 2;
+    optypes : (ot_rm_gpr or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#243#248#1#126#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_rm_gpr or ot_bits64,ot_none,ot_none);
+    code    : #241#242#243#248#1#110#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#16#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #220#242#248#1#16#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#17#61#66;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSD;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #220#242#248#1#17#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSHDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#242#248#1#22#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSHDUP;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #219#242#244#248#1#22#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSLDUP;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #219#242#248#1#18#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSLDUP;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #219#242#244#248#1#18#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#16#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #219#242#248#1#16#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#17#61#66;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVSS;
+    ops     : 2;
+    optypes : (ot_memory or ot_bits64,ot_xmmreg,ot_none,ot_none);
+    code    : #219#242#248#1#17#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#16#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPD;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#17#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#16#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPD;
+    ops     : 2;
+    optypes : (ot_ymmrm,ot_ymmreg,ot_none,ot_none);
+    code    : #241#242#244#248#1#17#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#248#1#16#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPS;
+    ops     : 2;
+    optypes : (ot_xmmrm,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#17#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #242#244#248#1#16#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMOVUPS;
+    ops     : 2;
+    optypes : (ot_ymmrm,ot_ymmreg,ot_none,ot_none);
+    code    : #242#244#248#1#17#65;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMPSADBW;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#66#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VMULSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#89#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VORPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#86#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VORPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#86#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VORPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#86#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPABSB;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#28#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPABSD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#30#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPABSW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#29#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPACKSSDW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#107#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPACKSSWB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#99#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPACKUSDW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#43#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPACKUSWB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#103#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#252#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#254#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#212#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDSB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#236#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#237#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDUSB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#220#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDUSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#221#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPADDW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#253#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPALIGNR;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#15#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPAND;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#219#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPANDN;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#223#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPAVGB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#224#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPAVGW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#227#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPBLENDVB;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_xmmreg);
+    code    : #241#242#250#1#76#61#80#247;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPBLENDW;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#14#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCLMULQDQ;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#68#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPEQB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#116#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPEQD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#118#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPEQQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#41#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPEQW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#117#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPESTRI;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#97#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPESTRM;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#96#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPGTB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#100#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPGTD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#102#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPGTQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#55#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPGTW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#101#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPISTRI;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#99#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPCMPISTRM;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#98#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERM2F128;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#250#1#6#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#249#1#13#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#5#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#244#250#1#5#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#13#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#249#1#12#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#4#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#244#250#1#4#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPERMILPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#12#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRB;
+    ops     : 3;
+    optypes : (ot_reg32,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#20#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRB;
+    ops     : 3;
+    optypes : (ot_reg64,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#20#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRB;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits8,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#20#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRD;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits32,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#22#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRQ;
+    ops     : 3;
+    optypes : (ot_rm_gpr or ot_bits64,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#243#250#1#22#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRW;
+    ops     : 3;
+    optypes : (ot_reg32,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#197#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRW;
+    ops     : 3;
+    optypes : (ot_reg64,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#197#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRW;
+    ops     : 3;
+    optypes : (ot_reg32,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#21#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRW;
+    ops     : 3;
+    optypes : (ot_reg64,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#21#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPEXTRW;
+    ops     : 3;
+    optypes : (ot_memory or ot_bits16,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#21#65#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHADDD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#2#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHADDSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#3#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHADDW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#1#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHMINPOSUW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#65#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHSUBD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#6#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHSUBSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#7#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPHSUBW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#5#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPINSRB;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_reg32,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#32#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPINSRB;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits8,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#32#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPINSRD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits32,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#34#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPINSRQ;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_rm_gpr or ot_bits64,ot_immediate or ot_bits8);
+    code    : #241#242#243#250#1#34#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPINSRW;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_reg32,ot_immediate or ot_bits8);
+    code    : #241#242#248#1#196#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPINSRW;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits16,ot_immediate or ot_bits8);
+    code    : #241#242#248#1#196#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMADDUBSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#4#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMADDWD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#245#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMAXSB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#60#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMAXSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#61#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMAXSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#238#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMAXUB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#222#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMAXUD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#63#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMAXUW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#62#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMINSB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#56#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMINSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#57#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMINSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#234#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMINUB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#218#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMINUD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#59#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMINUW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#58#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVMSKB;
+    ops     : 2;
+    optypes : (ot_reg64,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#215#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVMSKB;
+    ops     : 2;
+    optypes : (ot_reg32,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#215#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #241#242#249#1#33#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#33#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #241#242#249#1#34#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#34#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#249#1#32#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#32#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#249#1#37#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#37#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#249#1#35#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#35#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXWQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #241#242#249#1#36#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVSXWQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#36#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #241#242#249#1#49#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXBD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#49#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits16,ot_none,ot_none);
+    code    : #241#242#249#1#50#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXBQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#50#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#249#1#48#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXBW;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#48#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#249#1#53#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXDQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#53#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#249#1#51#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXWD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#51#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXWQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #241#242#249#1#52#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMOVZXWQ;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#249#1#52#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#40#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULHRSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#11#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULHUW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#228#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULHW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#229#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULLD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#64#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#213#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPMULUDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#244#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPOR;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#235#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSADBW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#246#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSHUFB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#0#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSHUFD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#112#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSHUFHW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #219#242#248#1#112#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSHUFLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #220#242#248#1#112#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSIGNB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#8#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSIGND;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#10#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSIGNW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#249#1#9#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#114#60#142#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#242#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#115#60#143#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#243#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#115#60#142#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#113#60#142#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSLLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#241#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRAD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#114#60#140#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRAD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#226#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRAW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#113#60#140#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRAW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#225#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#114#60#138#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#210#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#115#60#139#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#115#60#138#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#211#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#248#1#113#60#138#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSRLW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#209#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#248#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#250#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#251#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBSB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#232#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#233#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBUSB;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#216#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBUSW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#217#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPSUBW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#249#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPTEST;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#249#1#23#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPTEST;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#23#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKHBW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#104#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKHDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#106#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKHQDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#109#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKHWD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#105#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKLBW;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#96#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKLDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#98#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKLQDQ;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#108#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPUNPCKLWD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#97#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VPXOR;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#239#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRCPPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#248#1#83#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRCPPS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #242#244#248#1#83#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRCPSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#83#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRCPSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#83#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#244#250#1#9#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#9#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#244#250#1#8#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8,ot_none);
+    code    : #241#242#250#1#8#72#22;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDSD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#11#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDSD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#11#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDSS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#10#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VROUNDSS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_immediate or ot_bits8);
+    code    : #241#242#250#1#10#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRSQRTPS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #242#244#248#1#82#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRSQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#248#1#82#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRSQRTSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#82#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VRSQRTSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#82#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSHUFPD;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #241#242#248#1#198#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSHUFPD;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #241#242#244#248#1#198#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSHUFPS;
+    ops     : 4;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_immediate or ot_bits8);
+    code    : #242#248#1#198#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSHUFPS;
+    ops     : 4;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_immediate or ot_bits8);
+    code    : #242#244#248#1#198#61#80#23;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#248#1#81#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTPD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#248#1#81#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #242#248#1#81#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTPS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #242#244#248#1#81#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#81#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#81#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#81#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSQRTSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#81#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSTMXCSR;
+    ops     : 1;
+    optypes : (ot_memory or ot_bits32,ot_none,ot_none,ot_none);
+    code    : #242#248#1#174#131;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits64,ot_none);
+    code    : #220#242#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBSD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #220#242#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_memory or ot_bits32,ot_none);
+    code    : #219#242#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VSUBSS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmreg,ot_none);
+    code    : #219#242#248#1#92#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VTESTPD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#15#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VTESTPD;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#249#1#15#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VTESTPS;
+    ops     : 2;
+    optypes : (ot_ymmreg,ot_ymmrm,ot_none,ot_none);
+    code    : #241#242#244#249#1#14#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VTESTPS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
+    code    : #241#242#249#1#14#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUCOMISD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits64,ot_none,ot_none);
+    code    : #241#242#248#1#46#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUCOMISD;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #241#242#248#1#46#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_memory or ot_bits32,ot_none,ot_none);
+    code    : #242#248#1#46#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUCOMISS;
+    ops     : 2;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_none,ot_none);
+    code    : #242#248#1#46#72;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKHPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#21#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKHPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#21#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKHPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#21#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKHPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#21#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKLPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#20#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKLPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#20#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKLPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#20#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VUNPCKLPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#20#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VXORPD;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #241#242#248#1#87#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VXORPD;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #241#242#244#248#1#87#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VXORPS;
+    ops     : 3;
+    optypes : (ot_xmmreg,ot_xmmreg,ot_xmmrm,ot_none);
+    code    : #242#248#1#87#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VXORPS;
+    ops     : 3;
+    optypes : (ot_ymmreg,ot_ymmreg,ot_ymmrm,ot_none);
+    code    : #242#244#248#1#87#61#80;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VZEROALL;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #242#244#248#1#119;
+    flags   : if_avx or if_sandybridge
+  ),
+  (
+    opcode  : A_VZEROUPPER;
+    ops     : 0;
+    optypes : (ot_none,ot_none,ot_none,ot_none);
+    code    : #242#248#1#119;
+    flags   : if_avx or if_sandybridge
+  )
+);

+ 682 - 0
compiler/i8086/n8086add.pas

@@ -0,0 +1,682 @@
+{
+    Copyright (c) 2000-2002 by Florian Klaempfl
+
+    Code generation for add nodes on the i8086
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit n8086add;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+       node,nadd,cpubase,nx86add;
+
+    type
+
+       { ti8086addnode }
+
+       ti8086addnode = class(tx86addnode)
+         function use_generic_mul32to64: boolean; override;
+         procedure second_addordinal; override;
+         procedure second_add64bit;override;
+         procedure second_cmp64bit;override;
+         procedure second_cmp32bit;
+         procedure second_cmpordinal;override;
+         procedure second_mul(unsigned: boolean);
+       end;
+
+  implementation
+
+    uses
+      globtype,systems,
+      cutils,verbose,globals,
+      symconst,symdef,paramgr,defutil,
+      aasmbase,aasmtai,aasmdata,aasmcpu,
+      cgbase,procinfo,
+      ncon,nset,cgutils,tgobj,
+      cga,ncgutil,cgobj,cg64f32,cgx86,
+      hlcgobj;
+
+{*****************************************************************************
+                                use_generic_mul32to64
+*****************************************************************************}
+
+    function ti8086addnode.use_generic_mul32to64: boolean;
+    begin
+      result := True;
+    end;
+
+    { handles all multiplications }
+    procedure ti8086addnode.second_addordinal;
+    var
+      unsigned: boolean;
+    begin
+      unsigned:=not(is_signed(left.resultdef)) or
+                not(is_signed(right.resultdef));
+      if nodetype=muln then
+        second_mul(unsigned)
+      else
+        inherited second_addordinal;
+    end;
+
+{*****************************************************************************
+                                Add64bit
+*****************************************************************************}
+
+    procedure ti8086addnode.second_add64bit;
+      var
+        op         : TOpCG;
+        op1,op2    : TAsmOp;
+        opsize     : TOpSize;
+        hregister,
+        hregister2 : tregister;
+        hl4        : tasmlabel;
+        mboverflow,
+        unsigned:boolean;
+        r:Tregister;
+      begin
+        pass_left_right;
+
+        op1:=A_NONE;
+        op2:=A_NONE;
+        mboverflow:=false;
+        opsize:=S_L;
+        unsigned:=((left.resultdef.typ=orddef) and
+                   (torddef(left.resultdef).ordtype=u64bit)) or
+                  ((right.resultdef.typ=orddef) and
+                   (torddef(right.resultdef).ordtype=u64bit));
+        case nodetype of
+          addn :
+            begin
+              op:=OP_ADD;
+              mboverflow:=true;
+            end;
+          subn :
+            begin
+              op:=OP_SUB;
+              op1:=A_SUB;
+              op2:=A_SBB;
+              mboverflow:=true;
+            end;
+          xorn:
+            op:=OP_XOR;
+          orn:
+            op:=OP_OR;
+          andn:
+            op:=OP_AND;
+          else
+            begin
+              { everything should be handled in pass_1 (JM) }
+              internalerror(200109051);
+            end;
+        end;
+
+        { left and right no register?  }
+        { then one must be demanded    }
+        if (left.location.loc<>LOC_REGISTER) then
+         begin
+           if (right.location.loc<>LOC_REGISTER) then
+            begin
+              hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+              hregister2:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+              cg64.a_load64_loc_reg(current_asmdata.CurrAsmList,left.location,joinreg64(hregister,hregister2));
+              location_reset(left.location,LOC_REGISTER,left.location.size);
+              left.location.register64.reglo:=hregister;
+              left.location.register64.reghi:=hregister2;
+            end
+           else
+            begin
+              location_swap(left.location,right.location);
+              toggleflag(nf_swapped);
+            end;
+         end;
+
+        { at this point, left.location.loc should be LOC_REGISTER }
+        if right.location.loc=LOC_REGISTER then
+         begin
+           { when swapped another result register }
+           if (nodetype=subn) and (nf_swapped in flags) then
+            begin
+              cg64.a_op64_reg_reg(current_asmdata.CurrAsmList,op,location.size,
+                left.location.register64,
+                right.location.register64);
+              location_swap(left.location,right.location);
+              toggleflag(nf_swapped);
+            end
+           else
+            begin
+              cg64.a_op64_reg_reg(current_asmdata.CurrAsmList,op,location.size,
+                right.location.register64,
+                left.location.register64);
+            end;
+         end
+        else
+         begin
+           { right.location<>LOC_REGISTER }
+           if (nodetype=subn) and (nf_swapped in flags) then
+            begin
+              r:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+              cg64.a_load64low_loc_reg(current_asmdata.CurrAsmList,right.location,r);
+              emit_reg_reg(op1,opsize,left.location.register64.reglo,r);
+              emit_reg_reg(op2,opsize,GetNextReg(left.location.register64.reglo),GetNextReg(r));
+              emit_reg_reg(A_MOV,opsize,r,left.location.register64.reglo);
+              emit_reg_reg(A_MOV,opsize,GetNextReg(r),GetNextReg(left.location.register64.reglo));
+              cg64.a_load64high_loc_reg(current_asmdata.CurrAsmList,right.location,r);
+              { the carry flag is still ok }
+              emit_reg_reg(op2,opsize,left.location.register64.reghi,r);
+              emit_reg_reg(op2,opsize,GetNextReg(left.location.register64.reghi),GetNextReg(r));
+              emit_reg_reg(A_MOV,opsize,r,left.location.register64.reghi);
+              emit_reg_reg(A_MOV,opsize,GetNextReg(r),GetNextReg(left.location.register64.reghi));
+            end
+           else
+            begin
+              cg64.a_op64_loc_reg(current_asmdata.CurrAsmList,op,location.size,right.location,
+                left.location.register64);
+            end;
+          location_freetemp(current_asmdata.CurrAsmList,right.location);
+         end;
+
+        { only in case of overflow operations }
+        { produce overflow code }
+        { we must put it here directly, because sign of operation }
+        { is in unsigned VAR!!                              }
+        if mboverflow then
+         begin
+           if cs_check_overflow in current_settings.localswitches  then
+            begin
+              current_asmdata.getjumplabel(hl4);
+              if unsigned then
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_AE,hl4)
+              else
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NO,hl4);
+              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
+              cg.a_label(current_asmdata.CurrAsmList,hl4);
+            end;
+         end;
+
+        location_copy(location,left.location);
+      end;
+
+
+    procedure ti8086addnode.second_cmp64bit;
+      var
+        hregister,
+        hregister2 : tregister;
+        href       : treference;
+        unsigned   : boolean;
+
+      procedure firstjmp64bitcmp;
+
+        var
+           oldnodetype : tnodetype;
+
+        begin
+{$ifdef OLDREGVARS}
+           load_all_regvars(current_asmdata.CurrAsmList);
+{$endif OLDREGVARS}
+           { the jump the sequence is a little bit hairy }
+           case nodetype of
+              ltn,gtn:
+                begin
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrTrueLabel);
+                   { cheat a little bit for the negative test }
+                   toggleflag(nf_swapped);
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrFalseLabel);
+                   toggleflag(nf_swapped);
+                end;
+              lten,gten:
+                begin
+                   oldnodetype:=nodetype;
+                   if nodetype=lten then
+                     nodetype:=ltn
+                   else
+                     nodetype:=gtn;
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrTrueLabel);
+                   { cheat for the negative test }
+                   if nodetype=ltn then
+                     nodetype:=gtn
+                   else
+                     nodetype:=ltn;
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrFalseLabel);
+                   nodetype:=oldnodetype;
+                end;
+              equaln:
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrFalseLabel);
+              unequaln:
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrTrueLabel);
+           end;
+        end;
+
+      procedure middlejmp64bitcmp;
+
+        var
+           oldnodetype : tnodetype;
+
+        begin
+{$ifdef OLDREGVARS}
+           load_all_regvars(current_asmdata.CurrAsmList);
+{$endif OLDREGVARS}
+           { the jump the sequence is a little bit hairy }
+           case nodetype of
+              ltn,gtn:
+                begin
+                   { the comparisaion of the low word have to be }
+                   {  always unsigned!                           }
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrTrueLabel);
+                   { cheat a little bit for the negative test }
+                   toggleflag(nf_swapped);
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrFalseLabel);
+                   toggleflag(nf_swapped);
+                end;
+              lten,gten:
+                begin
+                   oldnodetype:=nodetype;
+                   if nodetype=lten then
+                     nodetype:=ltn
+                   else
+                     nodetype:=gtn;
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrTrueLabel);
+                   { cheat for the negative test }
+                   if nodetype=ltn then
+                     nodetype:=gtn
+                   else
+                     nodetype:=ltn;
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrFalseLabel);
+                   nodetype:=oldnodetype;
+                end;
+              equaln:
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrFalseLabel);
+              unequaln:
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrTrueLabel);
+           end;
+        end;
+
+      procedure lastjmp64bitcmp;
+
+        begin
+           { the jump the sequence is a little bit hairy }
+           case nodetype of
+              ltn,gtn,lten,gten:
+                begin
+                   { the comparisaion of the low word have to be }
+                   {  always unsigned!                           }
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrTrueLabel);
+                   cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+                end;
+              equaln:
+                begin
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrFalseLabel);
+                   cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
+                end;
+              unequaln:
+                begin
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrTrueLabel);
+                   cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+                end;
+           end;
+        end;
+
+      begin
+        pass_left_right;
+
+        unsigned:=((left.resultdef.typ=orddef) and
+                   (torddef(left.resultdef).ordtype=u64bit)) or
+                  ((right.resultdef.typ=orddef) and
+                   (torddef(right.resultdef).ordtype=u64bit));
+
+        { left and right no register?  }
+        { then one must be demanded    }
+        if (left.location.loc<>LOC_REGISTER) then
+         begin
+           if (right.location.loc<>LOC_REGISTER) then
+            begin
+              { we can reuse a CREGISTER for comparison }
+              if (left.location.loc<>LOC_CREGISTER) then
+               begin
+                 hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+                 hregister2:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+                 cg64.a_load64_loc_reg(current_asmdata.CurrAsmList,left.location,joinreg64(hregister,hregister2));
+                 location_freetemp(current_asmdata.CurrAsmList,left.location);
+                 location_reset(left.location,LOC_REGISTER,left.location.size);
+                 left.location.register64.reglo:=hregister;
+                 left.location.register64.reghi:=hregister2;
+               end;
+            end
+           else
+            begin
+              location_swap(left.location,right.location);
+              toggleflag(nf_swapped);
+            end;
+         end;
+
+        { at this point, left.location.loc should be LOC_REGISTER }
+        if right.location.loc=LOC_REGISTER then
+         begin
+           emit_reg_reg(A_CMP,S_W,GetNextReg(right.location.register64.reghi),GetNextReg(left.location.register64.reghi));
+           firstjmp64bitcmp;
+           emit_reg_reg(A_CMP,S_W,right.location.register64.reghi,left.location.register64.reghi);
+           middlejmp64bitcmp;
+           emit_reg_reg(A_CMP,S_W,GetNextReg(right.location.register64.reglo),GetNextReg(left.location.register64.reglo));
+           middlejmp64bitcmp;
+           emit_reg_reg(A_CMP,S_W,right.location.register64.reglo,left.location.register64.reglo);
+           lastjmp64bitcmp;
+         end
+        else
+         begin
+           case right.location.loc of
+             LOC_CREGISTER :
+               begin
+                 emit_reg_reg(A_CMP,S_W,GetNextReg(right.location.register64.reghi),GetNextReg(left.location.register64.reghi));
+                 firstjmp64bitcmp;
+                 emit_reg_reg(A_CMP,S_W,right.location.register64.reghi,left.location.register64.reghi);
+                 middlejmp64bitcmp;
+                 emit_reg_reg(A_CMP,S_W,GetNextReg(right.location.register64.reglo),GetNextReg(left.location.register64.reglo));
+                 middlejmp64bitcmp;
+                 emit_reg_reg(A_CMP,S_W,right.location.register64.reglo,left.location.register64.reglo);
+                 lastjmp64bitcmp;
+               end;
+             LOC_CREFERENCE,
+             LOC_REFERENCE :
+               begin
+                 tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,right.location.reference);
+                 href:=right.location.reference;
+                 inc(href.offset,6);
+                 emit_ref_reg(A_CMP,S_W,href,GetNextReg(left.location.register64.reghi));
+                 firstjmp64bitcmp;
+                 dec(href.offset,2);
+                 emit_ref_reg(A_CMP,S_W,href,left.location.register64.reghi);
+                 middlejmp64bitcmp;
+                 dec(href.offset,2);
+                 emit_ref_reg(A_CMP,S_W,href,GetNextReg(left.location.register64.reglo));
+                 middlejmp64bitcmp;
+                 emit_ref_reg(A_CMP,S_W,right.location.reference,left.location.register64.reglo);
+                 lastjmp64bitcmp;
+                 cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+                 location_freetemp(current_asmdata.CurrAsmList,right.location);
+               end;
+             LOC_CONSTANT :
+               begin
+                 current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint((right.location.value64 shr 48) and $FFFF),GetNextReg(left.location.register64.reghi)));
+                 firstjmp64bitcmp;
+                 current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint((right.location.value64 shr 32) and $FFFF),left.location.register64.reghi));
+                 middlejmp64bitcmp;
+                 current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint((right.location.value64 shr 16) and $FFFF),GetNextReg(left.location.register64.reglo)));
+                 middlejmp64bitcmp;
+                 current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint(right.location.value64 and $FFFF),left.location.register64.reglo));
+                 lastjmp64bitcmp;
+               end;
+             else
+               internalerror(200203282);
+           end;
+         end;
+
+        { we have LOC_JUMP as result }
+        location_reset(location,LOC_JUMP,OS_NO)
+      end;
+
+    procedure ti8086addnode.second_cmp32bit;
+      var
+        hregister : tregister;
+        href      : treference;
+        unsigned  : boolean;
+
+      procedure firstjmp32bitcmp;
+
+        var
+           oldnodetype : tnodetype;
+
+        begin
+{$ifdef OLDREGVARS}
+           load_all_regvars(current_asmdata.CurrAsmList);
+{$endif OLDREGVARS}
+           { the jump the sequence is a little bit hairy }
+           case nodetype of
+              ltn,gtn:
+                begin
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrTrueLabel);
+                   { cheat a little bit for the negative test }
+                   toggleflag(nf_swapped);
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrFalseLabel);
+                   toggleflag(nf_swapped);
+                end;
+              lten,gten:
+                begin
+                   oldnodetype:=nodetype;
+                   if nodetype=lten then
+                     nodetype:=ltn
+                   else
+                     nodetype:=gtn;
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrTrueLabel);
+                   { cheat for the negative test }
+                   if nodetype=ltn then
+                     nodetype:=gtn
+                   else
+                     nodetype:=ltn;
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(unsigned),current_procinfo.CurrFalseLabel);
+                   nodetype:=oldnodetype;
+                end;
+              equaln:
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrFalseLabel);
+              unequaln:
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrTrueLabel);
+           end;
+        end;
+
+      procedure secondjmp32bitcmp;
+
+        begin
+           { the jump the sequence is a little bit hairy }
+           case nodetype of
+              ltn,gtn,lten,gten:
+                begin
+                   { the comparisaion of the low dword have to be }
+                   {  always unsigned!                            }
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,getresflags(true),current_procinfo.CurrTrueLabel);
+                   cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+                end;
+              equaln:
+                begin
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrFalseLabel);
+                   cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
+                end;
+              unequaln:
+                begin
+                   cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NE,current_procinfo.CurrTrueLabel);
+                   cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+                end;
+           end;
+        end;
+
+      begin
+        pass_left_right;
+
+        unsigned:=((left.resultdef.typ=orddef) and
+                   (torddef(left.resultdef).ordtype=u32bit)) or
+                  ((right.resultdef.typ=orddef) and
+                   (torddef(right.resultdef).ordtype=u32bit));
+
+        { left and right no register?  }
+        { then one must be demanded    }
+        if (left.location.loc<>LOC_REGISTER) then
+         begin
+           if (right.location.loc<>LOC_REGISTER) then
+            begin
+              { we can reuse a CREGISTER for comparison }
+              if (left.location.loc<>LOC_CREGISTER) then
+               begin
+                 hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+                 cg.a_load_loc_reg(current_asmdata.CurrAsmList,OS_32,left.location,hregister);
+                 location_freetemp(current_asmdata.CurrAsmList,left.location);
+                 location_reset(left.location,LOC_REGISTER,left.location.size);
+                 left.location.register:=hregister;
+               end;
+            end
+           else
+            begin
+              location_swap(left.location,right.location);
+              toggleflag(nf_swapped);
+            end;
+         end;
+
+        { at this point, left.location.loc should be LOC_REGISTER }
+        if right.location.loc=LOC_REGISTER then
+         begin
+           emit_reg_reg(A_CMP,S_W,GetNextReg(right.location.register),GetNextReg(left.location.register));
+           firstjmp32bitcmp;
+           emit_reg_reg(A_CMP,S_W,right.location.register,left.location.register);
+           secondjmp32bitcmp;
+         end
+        else
+         begin
+           case right.location.loc of
+             LOC_CREGISTER :
+               begin
+                 emit_reg_reg(A_CMP,S_W,GetNextReg(right.location.register),GetNextReg(left.location.register));
+                 firstjmp32bitcmp;
+                 emit_reg_reg(A_CMP,S_W,right.location.register,left.location.register);
+                 secondjmp32bitcmp;
+               end;
+             LOC_CREFERENCE,
+             LOC_REFERENCE :
+               begin
+                 tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,right.location.reference);
+                 href:=right.location.reference;
+                 inc(href.offset,2);
+                 emit_ref_reg(A_CMP,S_W,href,GetNextReg(left.location.register));
+                 firstjmp32bitcmp;
+                 emit_ref_reg(A_CMP,S_W,right.location.reference,left.location.register);
+                 secondjmp32bitcmp;
+                 cg.a_jmp_always(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+                 location_freetemp(current_asmdata.CurrAsmList,right.location);
+               end;
+             LOC_CONSTANT :
+               begin
+                 current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint((right.location.value shr 16) and $FFFF),GetNextReg(left.location.register)));
+                 firstjmp32bitcmp;
+                 current_asmdata.CurrAsmList.concat(taicpu.op_const_reg(A_CMP,S_W,aint(right.location.value and $FFFF),left.location.register));
+                 secondjmp32bitcmp;
+               end;
+             else
+               internalerror(200203282);
+           end;
+         end;
+
+        { we have LOC_JUMP as result }
+        location_reset(location,LOC_JUMP,OS_NO)
+      end;
+
+    procedure ti8086addnode.second_cmpordinal;
+      begin
+        if is_32bit(left.resultdef) then
+          second_cmp32bit
+        else
+          inherited second_cmpordinal;
+      end;
+
+
+{*****************************************************************************
+                                x86 MUL
+*****************************************************************************}
+
+    procedure ti8086addnode.second_mul(unsigned: boolean);
+
+      procedure add_mov(instr: Taicpu);
+        begin
+          { Notify the register allocator that we have written a move instruction so
+            it can try to eliminate it. }
+          if (instr.oper[0]^.reg<>current_procinfo.framepointer) and (instr.oper[0]^.reg<>NR_STACK_POINTER_REG) then
+            tcgx86(cg).add_move_instruction(instr);
+          current_asmdata.CurrAsmList.concat(instr);
+        end;
+
+    var reg:Tregister;
+        ref:Treference;
+        use_ref:boolean;
+        hl4 : tasmlabel;
+
+    const
+      asmops: array[boolean] of tasmop = (A_IMUL, A_MUL);
+
+    begin
+      pass_left_right;
+
+      {The location.register will be filled in later (JM)}
+      location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
+      { Mul supports registers and references, so if not register/reference,
+        load the location into a register. }
+      use_ref:=false;
+      if left.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
+        reg:=left.location.register
+      else if left.location.loc in [LOC_REFERENCE,LOC_CREFERENCE] then
+        begin
+          tcgx86(cg).make_simple_ref(current_asmdata.CurrAsmList,left.location.reference);
+          ref:=left.location.reference;
+          use_ref:=true;
+        end
+      else
+        begin
+          {LOC_CONSTANT for example.}
+          reg:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+          hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,left.resultdef,osuinttype,left.location,reg);
+        end;
+      {Allocate AX.}
+      cg.getcpuregister(current_asmdata.CurrAsmList,NR_AX);
+      {Load the right value.}
+      hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,right.resultdef,osuinttype,right.location,NR_AX);
+      {Also allocate DX, since it is also modified by a mul (JM).}
+      cg.getcpuregister(current_asmdata.CurrAsmList,NR_DX);
+      if use_ref then
+        emit_ref(asmops[unsigned],S_W,ref)
+      else
+        emit_reg(asmops[unsigned],S_W,reg);
+      if (cs_check_overflow in current_settings.localswitches) and
+        { 16->32 bit cannot overflow }
+        (not is_32bitint(resultdef)) then
+        begin
+          current_asmdata.getjumplabel(hl4);
+          cg.a_jmp_flags(current_asmdata.CurrAsmList,F_AE,hl4);
+          cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
+          cg.a_label(current_asmdata.CurrAsmList,hl4);
+        end;
+      {Free AX,DX}
+      cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_DX);
+      if is_32bitint(resultdef) then
+      begin
+        {Allocate an imaginary 32-bit register, which consists of a pair of
+         16-bit registers and store DX:AX into it}
+        location.register := cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+        add_mov(Taicpu.Op_reg_reg(A_MOV,S_W,NR_AX,location.register));
+        add_mov(Taicpu.Op_reg_reg(A_MOV,S_W,NR_DX,GetNextReg(location.register)));
+      end
+      else
+      begin
+        {Allocate a new register and store the result in AX in it.}
+        location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+        cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_AX);
+        cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_AX,location.register);
+      end;
+      location_freetemp(current_asmdata.CurrAsmList,left.location);
+      location_freetemp(current_asmdata.CurrAsmList,right.location);
+    end;
+
+
+begin
+   caddnode:=ti8086addnode;
+end.

+ 80 - 0
compiler/i8086/n8086inl.pas

@@ -0,0 +1,80 @@
+{
+    Copyright (c) 1998-2002 by Florian Klaempfl
+
+    Generate i8086 inline nodes
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit n8086inl;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+       nx86inl,node;
+
+    type
+
+       { ti8086inlinenode }
+
+       ti8086inlinenode = class(tx86inlinenode)
+         function typecheck_seg: tnode; override;
+         function first_seg: tnode; override;
+         procedure second_seg; override;
+       end;
+
+implementation
+
+  uses
+    ninl,
+    systems,
+    globtype,globals,
+    cutils,verbose,
+    symconst,
+    defutil,
+    aasmbase,aasmtai,aasmdata,aasmcpu,
+    symtype,symdef,
+    cgbase,pass_2,
+    cpuinfo,cpubase,paramgr,
+    nbas,ncon,ncal,ncnv,nld,ncgutil,
+    tgobj,
+    cga,cgutils,cgx86,cgobj,hlcgobj,
+    htypechk;
+
+     function ti8086inlinenode.typecheck_seg: tnode;
+       begin
+         result := nil;
+         resultdef:=u16inttype;
+       end;
+
+     function ti8086inlinenode.first_seg: tnode;
+       begin
+         expectloc:=LOC_REGISTER;
+         result:=nil;
+       end;
+
+     procedure ti8086inlinenode.second_seg;
+       begin
+         location_reset(location,LOC_REGISTER,OS_16);
+         location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_16);
+         current_asmdata.CurrAsmList.Concat(Taicpu.op_reg_reg(A_MOV,S_W,NR_DS,location.register));
+       end;
+
+begin
+   cinlinenode:=ti8086inlinenode;
+end.

+ 475 - 0
compiler/i8086/n8086mat.pas

@@ -0,0 +1,475 @@
+{
+    Copyright (c) 1998-2002 by Florian Klaempfl
+
+    Generate i8086 assembler for math nodes
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit n8086mat;
+
+{$i fpcdefs.inc}
+
+interface
+
+    uses
+      node,nmat,ncgmat,nx86mat;
+
+    type
+      ti8086moddivnode = class(tmoddivnode)
+         procedure pass_generate_code;override;
+      end;
+
+      ti8086shlshrnode = class(tcgshlshrnode)
+         procedure second_64bit;override;
+         function first_shlshr64bitint: tnode; override;
+      end;
+
+      ti8086unaryminusnode = class(tx86unaryminusnode)
+      end;
+
+      ti8086notnode = class(tx86notnode)
+      end;
+
+
+implementation
+
+    uses
+      globtype,systems,constexp,
+      cutils,verbose,globals,
+      symconst,symdef,aasmbase,aasmtai,aasmdata,aasmcpu,defutil,
+      cgbase,pass_2,
+      ncon,
+      cpubase,cpuinfo,
+      cga,ncgutil,cgobj,cgutils,
+      hlcgobj;
+
+{*****************************************************************************
+                             ti8086moddivnode
+*****************************************************************************}
+
+    function log2(i : dword) : dword;
+      begin
+        result:=0;
+        i:=i shr 1;
+        while i<>0 do
+          begin
+            i:=i shr 1;
+            inc(result);
+          end;
+      end;
+
+
+   procedure ti8086moddivnode.pass_generate_code;
+      var
+        hreg1,hreg2:Tregister;
+        power:longint;
+        hl:Tasmlabel;
+        op:Tasmop;
+        e : longint;
+        d,l,r,s,m,a,n,t : dword;
+        m_low,m_high,j,k : qword;
+      begin
+        secondpass(left);
+        if codegenerror then
+          exit;
+        secondpass(right);
+        if codegenerror then
+          exit;
+
+        if is_64bitint(resultdef) then
+          { should be handled in pass_1 (JM) }
+          internalerror(200109052);
+        { put numerator in register }
+        location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
+        hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,resultdef,false);
+        hreg1:=left.location.register;
+
+        if (nodetype=divn) and (right.nodetype=ordconstn) then
+          begin
+            if ispowerof2(tordconstnode(right).value.svalue,power) then
+              begin
+                { for signed numbers, the numerator must be adjusted before the
+                  shift instruction, but not wih unsigned numbers! Otherwise,
+                  "Cardinal($ffffffff) div 16" overflows! (JM) }
+                if is_signed(left.resultdef) Then
+                  begin
+                    if (current_settings.optimizecputype <> cpu_386) and
+                       not(cs_opt_size in current_settings.optimizerswitches) then
+                      { use a sequence without jumps, saw this in
+                        comp.compilers (JM) }
+                      begin
+                        { no jumps, but more operations }
+                        hreg2:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                        emit_reg_reg(A_MOV,S_L,hreg1,hreg2);
+                        {If the left value is signed, hreg2=$ffffffff, otherwise 0.}
+                        emit_const_reg(A_SAR,S_L,31,hreg2);
+                        {If signed, hreg2=right value-1, otherwise 0.}
+                        emit_const_reg(A_AND,S_L,tordconstnode(right).value.svalue-1,hreg2);
+                        { add to the left value }
+                        emit_reg_reg(A_ADD,S_L,hreg2,hreg1);
+                        { do the shift }
+                        emit_const_reg(A_SAR,S_L,power,hreg1);
+                      end
+                    else
+                      begin
+                        { a jump, but less operations }
+                        emit_reg_reg(A_TEST,S_L,hreg1,hreg1);
+                        current_asmdata.getjumplabel(hl);
+                        cg.a_jmp_flags(current_asmdata.CurrAsmList,F_NS,hl);
+                        if power=1 then
+                          emit_reg(A_INC,S_L,hreg1)
+                        else
+                          emit_const_reg(A_ADD,S_L,tordconstnode(right).value.svalue-1,hreg1);
+                        cg.a_label(current_asmdata.CurrAsmList,hl);
+                        emit_const_reg(A_SAR,S_L,power,hreg1);
+                      end
+                  end
+                else
+                  emit_const_reg(A_SHR,S_L,power,hreg1);
+                location.register:=hreg1;
+              end
+            else
+              begin
+                if is_signed(left.resultdef) then
+                  begin
+                    e:=tordconstnode(right).value.svalue;
+                    d:=abs(e);
+                    { Determine algorithm (a), multiplier (m), and shift factor (s) for 32-bit
+                      signed integer division. Based on: Granlund, T.; Montgomery, P.L.:
+                      "Division by Invariant Integers using Multiplication". SIGPLAN Notices,
+                      Vol. 29, June 1994, page 61.
+                    }
+
+                    l:=log2(d);
+                    j:=qword($80000000) mod qword(d);
+                    k:=(qword(1) shl (32+l)) div (qword($80000000-j));
+                    m_low:=((qword(1)) shl (32+l)) div d;
+                    m_high:=(((qword(1)) shl (32+l)) + k) div d;
+                    while ((m_low shr 1) < (m_high shr 1)) and (l > 0) do
+                      begin
+                        m_low:=m_low shr 1;
+                        m_high:=m_high shr 1;
+                        dec(l);
+                      end;
+                    m:=dword(m_high);
+                    s:=l;
+                    if (m_high shr 31)<>0 then
+                      a:=1
+                    else
+                      a:=0;
+                    cg.getcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+                    emit_const_reg(A_MOV,S_L,aint(m),NR_EAX);
+                    cg.getcpuregister(current_asmdata.CurrAsmList,NR_EDX);
+                    emit_reg(A_IMUL,S_L,hreg1);
+                    emit_reg_reg(A_MOV,S_L,hreg1,NR_EAX);
+                    if a<>0 then
+                      begin
+                        emit_reg_reg(A_ADD,S_L,NR_EAX,NR_EDX);
+                        {
+                          printf ("; dividend: memory location or register other than EAX or EDX\n");
+                          printf ("\n");
+                          printf ("MOV EAX, 0%08LXh\n", m);
+                          printf ("IMUL dividend\n");
+                          printf ("MOV EAX, dividend\n");
+                          printf ("ADD EDX, EAX\n");
+                          if (s) printf ("SAR EDX, %d\n", s);
+                          printf ("SHR EAX, 31\n");
+                          printf ("ADD EDX, EAX\n");
+                          if (e < 0) printf ("NEG EDX\n");
+                          printf ("\n");
+                          printf ("; quotient now in EDX\n");
+                        }
+                      end;
+                      {
+                        printf ("; dividend: memory location of register other than EAX or EDX\n");
+                        printf ("\n");
+                        printf ("MOV EAX, 0%08LXh\n", m);
+                        printf ("IMUL dividend\n");
+                        printf ("MOV EAX, dividend\n");
+                        if (s) printf ("SAR EDX, %d\n", s);
+                        printf ("SHR EAX, 31\n");
+                        printf ("ADD EDX, EAX\n");
+                        if (e < 0) printf ("NEG EDX\n");
+                        printf ("\n");
+                        printf ("; quotient now in EDX\n");
+                      }
+                    if s<>0 then
+                      emit_const_reg(A_SAR,S_L,s,NR_EDX);
+                    emit_const_reg(A_SHR,S_L,31,NR_EAX);
+                    emit_reg_reg(A_ADD,S_L,NR_EAX,NR_EDX);
+                    if e<0 then
+                      emit_reg(A_NEG,S_L,NR_EDX);
+                    cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EDX);
+                    cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+                    location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                    cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_EDX,location.register)
+                  end
+                else
+                  begin
+                    d:=tordconstnode(right).value.svalue;
+                    if d>=$80000000 then
+                      begin
+                        emit_const_reg(A_CMP,S_L,aint(d),hreg1);
+                        location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                        emit_const_reg(A_MOV,S_L,0,location.register);
+                        emit_const_reg(A_SBB,S_L,-1,location.register);
+                      end
+                    else
+                      begin
+                        { Reduce divisor until it becomes odd }
+                        n:=0;
+                        t:=d;
+                        while (t and 1)=0 do
+                          begin
+                            t:=t shr 1;
+                            inc(n);
+                          end;
+                        { Generate m, s for algorithm 0. Based on: Granlund, T.; Montgomery,
+                        P.L.: "Division by Invariant Integers using Multiplication".
+                        SIGPLAN Notices, Vol. 29, June 1994, page 61.
+                        }
+                        l:=log2(t)+1;
+                        j:=qword($ffffffff) mod qword(t);
+                        k:=(qword(1) shl (32+l)) div (qword($ffffffff-j));
+                        m_low:=((qword(1)) shl (32+l)) div t;
+                        m_high:=(((qword(1)) shl (32+l)) + k) div t;
+                        while ((m_low shr 1) < (m_high shr 1)) and (l>0) do
+                          begin
+                            m_low:=m_low shr 1;
+                            m_high:=m_high shr 1;
+                            l:=l-1;
+                          end;
+                        if (m_high shr 32)=0 then
+                          begin
+                            m:=dword(m_high);
+                            s:=l;
+                            a:=0;
+                          end
+
+                        { Generate m, s for algorithm 1. Based on: Magenheimer, D.J.; et al:
+                        "Integer Multiplication and Division on the HP Precision Architecture".
+                        IEEE Transactions on Computers, Vol 37, No. 8, August 1988, page 980.
+                        }
+                        else
+                          begin
+                            s:=log2(t);
+                            m_low:=(qword(1) shl (32+s)) div qword(t);
+                            r:=dword(((qword(1)) shl (32+s)) mod qword(t));
+                            if (r < ((t>>1)+1)) then
+                              m:=dword(m_low)
+                            else
+                              m:=dword(m_low)+1;
+                            a:=1;
+                          end;
+                        { Reduce multiplier for either algorithm to smallest possible }
+                        while (m and 1)=0 do
+                          begin
+                            m:=m shr 1;
+                            dec(s);
+                          end;
+                        { Adjust multiplier for reduction of even divisors }
+                        inc(s,n);
+                        cg.getcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+                        emit_const_reg(A_MOV,S_L,aint(m),NR_EAX);
+                        cg.getcpuregister(current_asmdata.CurrAsmList,NR_EDX);
+                        emit_reg(A_MUL,S_L,hreg1);
+                        if a<>0 then
+                          begin
+                            {
+                            printf ("; dividend: register other than EAX or memory location\n");
+                            printf ("\n");
+                            printf ("MOV EAX, 0%08lXh\n", m);
+                            printf ("MUL dividend\n");
+                            printf ("ADD EAX, 0%08lXh\n", m);
+                            printf ("ADC EDX, 0\n");
+                            if (s) printf ("SHR EDX, %d\n", s);
+                            printf ("\n");
+                            printf ("; quotient now in EDX\n");
+                            }
+                            emit_const_reg(A_ADD,S_L,aint(m),NR_EAX);
+                            emit_const_reg(A_ADC,S_L,0,NR_EDX);
+                          end;
+                        if s<>0 then
+                          emit_const_reg(A_SHR,S_L,aint(s),NR_EDX);
+                        cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EDX);
+                        cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+                        location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                        cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_EDX,location.register)
+                      end;
+                  end
+              end
+          end
+        else
+          begin
+            cg.getcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+            emit_reg_reg(A_MOV,S_L,hreg1,NR_EAX);
+            cg.getcpuregister(current_asmdata.CurrAsmList,NR_EDX);
+            {Sign extension depends on the left type.}
+            if torddef(left.resultdef).ordtype=u32bit then
+              emit_reg_reg(A_XOR,S_L,NR_EDX,NR_EDX)
+            else
+              emit_none(A_CDQ,S_NO);
+
+            {Division depends on the right type.}
+            if Torddef(right.resultdef).ordtype=u32bit then
+              op:=A_DIV
+            else
+              op:=A_IDIV;
+
+            if right.location.loc in [LOC_REFERENCE,LOC_CREFERENCE] then
+              emit_ref(op,S_L,right.location.reference)
+            else if right.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
+              emit_reg(op,S_L,right.location.register)
+            else
+              begin
+                hreg1:=cg.getintregister(current_asmdata.CurrAsmList,right.location.size);
+                hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,right.resultdef,u32inttype,right.location,hreg1);
+                emit_reg(op,S_L,hreg1);
+              end;
+
+            {Copy the result into a new register. Release EAX & EDX.}
+            cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EDX);
+            cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_EAX);
+            location.register:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+            if nodetype=divn then
+              cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_EAX,location.register)
+            else
+              cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_EDX,location.register);
+          end;
+      end;
+
+
+{*****************************************************************************
+                             TI8086SHLRSHRNODE
+*****************************************************************************}
+
+
+    function ti8086shlshrnode.first_shlshr64bitint: tnode;
+      begin
+        result := nil;
+      end;
+
+    procedure ti8086shlshrnode.second_64bit;
+      var
+        hreg64hi,hreg64lo:Tregister;
+        v : TConstExprInt;
+        l1,l2,l3:Tasmlabel;
+        ai: taicpu;
+      begin
+        location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
+
+        { load left operator in a register }
+        hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,resultdef,false);
+        hreg64hi:=left.location.register64.reghi;
+        hreg64lo:=left.location.register64.reglo;
+
+        if right.nodetype=ordconstn then
+          v:=Tordconstnode(right).value and 63;
+
+        { shifting by 0 directly coded: }
+        if (right.nodetype=ordconstn) and (v=0) then
+          begin
+            { ultra hyper fast shift by 0 }
+          end
+        { shifting by 1 directly coded: }
+        else if (right.nodetype=ordconstn) and (v=1) then
+          begin
+            if nodetype=shln then
+              begin
+                emit_const_reg(A_SHL,S_W,1,hreg64lo);
+                emit_const_reg(A_RCL,S_W,1,GetNextReg(hreg64lo));
+                emit_const_reg(A_RCL,S_W,1,hreg64hi);
+                emit_const_reg(A_RCL,S_W,1,GetNextReg(hreg64hi));
+              end
+            else
+              begin
+                emit_const_reg(A_SHR,S_W,1,GetNextReg(hreg64hi));
+                emit_const_reg(A_RCR,S_W,1,hreg64hi);
+                emit_const_reg(A_RCR,S_W,1,GetNextReg(hreg64lo));
+                emit_const_reg(A_RCR,S_W,1,hreg64lo);
+              end;
+          end
+        else
+          begin
+            { load right operators in a register }
+            cg.getcpuregister(current_asmdata.CurrAsmList,NR_CX);
+
+            { shifting by a constant? }
+            if right.nodetype=ordconstn then
+              begin
+                v:=Tordconstnode(right).value and 63;
+                hlcg.a_load_const_reg(current_asmdata.CurrAsmList,u16inttype,v,NR_CX);
+              end
+            else
+              begin
+                hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,right.resultdef,u16inttype,right.location,NR_CX);
+
+                { left operator is already in a register }
+                { hence are both in a register }
+                { is it in the case CX ? }
+              end;
+
+            current_asmdata.getjumplabel(l1);
+            current_asmdata.getjumplabel(l2);
+            current_asmdata.getjumplabel(l3);
+            { for consts, we don't need the extra checks for 0 or >= 64, since
+              we've already handled them earlier as a special case }
+            if right.nodetype<>ordconstn then
+              begin
+                emit_const_reg(A_CMP,S_L,64,NR_CX);
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_L,l1);
+                cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_32,hreg64lo,hreg64lo);
+                cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_32,hreg64hi,hreg64hi);
+                cg.a_jmp_always(current_asmdata.CurrAsmList,l3);
+                cg.a_label(current_asmdata.CurrAsmList,l1);
+                emit_reg_reg(A_TEST,S_W,NR_CX,NR_CX);
+                cg.a_jmp_flags(current_asmdata.CurrAsmList,F_E,l3);
+              end;
+            cg.a_label(current_asmdata.CurrAsmList,l2);
+            if nodetype=shln then
+              begin
+                emit_const_reg(A_SHL,S_W,1,hreg64lo);
+                emit_const_reg(A_RCL,S_W,1,GetNextReg(hreg64lo));
+                emit_const_reg(A_RCL,S_W,1,hreg64hi);
+                emit_const_reg(A_RCL,S_W,1,GetNextReg(hreg64hi));
+              end
+            else
+              begin
+                emit_const_reg(A_SHR,S_W,1,GetNextReg(hreg64hi));
+                emit_const_reg(A_RCR,S_W,1,hreg64hi);
+                emit_const_reg(A_RCR,S_W,1,GetNextReg(hreg64lo));
+                emit_const_reg(A_RCR,S_W,1,hreg64lo);
+              end;
+            ai:=Taicpu.Op_Sym(A_LOOP,S_W,l2);
+            ai.is_jmp := True;
+            current_asmdata.CurrAsmList.Concat(ai);
+            cg.a_label(current_asmdata.CurrAsmList,l3);
+
+            cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_CX);
+          end;
+
+        location.register64.reglo:=hreg64lo;
+        location.register64.reghi:=hreg64hi;
+      end;
+
+
+begin
+   cunaryminusnode:=ti8086unaryminusnode;
+   cmoddivnode:=ti8086moddivnode;
+   cshlshrnode:=ti8086shlshrnode;
+   cnotnode:=ti8086notnode;
+end.

+ 82 - 0
compiler/i8086/r8086ari.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+2,
+1,
+3,
+14,
+13,
+21,
+15,
+6,
+5,
+39,
+40,
+41,
+42,
+26,
+7,
+10,
+19,
+9,
+33,
+34,
+35,
+36,
+37,
+38,
+27,
+11,
+4,
+22,
+16,
+8,
+20,
+12,
+25,
+28,
+18,
+24,
+32,
+30,
+31,
+57,
+58,
+59,
+60,
+61,
+62,
+63,
+64,
+17,
+23,
+29,
+56,
+48,
+49,
+50,
+51,
+52,
+53,
+54,
+55,
+43,
+44,
+45,
+46,
+47,
+65,
+66,
+67,
+68,
+69,
+70,
+71,
+72,
+73,
+74,
+75,
+76,
+77,
+78,
+79,
+80,
+0

+ 82 - 0
compiler/i8086/r8086att.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+'INVALID',
+'%al',
+'%ah',
+'%ax',
+'%eax',
+'%cl',
+'%ch',
+'%cx',
+'%ecx',
+'%dl',
+'%dh',
+'%dx',
+'%edx',
+'%bl',
+'%bh',
+'%bx',
+'%ebx',
+'%si',
+'%esi',
+'%di',
+'%edi',
+'%bp',
+'%ebp',
+'%sp',
+'%esp',
+'%eip',
+'%cs',
+'%ds',
+'%es',
+'%ss',
+'%fs',
+'%gs',
+'%flags',
+'%dr0',
+'%dr1',
+'%dr2',
+'%dr3',
+'%dr6',
+'%dr7',
+'%cr0',
+'%cr2',
+'%cr3',
+'%cr4',
+'%tr3',
+'%tr4',
+'%tr5',
+'%tr6',
+'%tr7',
+'%st(0)',
+'%st(1)',
+'%st(2)',
+'%st(3)',
+'%st(4)',
+'%st(5)',
+'%st(6)',
+'%st(7)',
+'%st',
+'%mm0',
+'%mm1',
+'%mm2',
+'%mm3',
+'%mm4',
+'%mm5',
+'%mm6',
+'%mm7',
+'%xmm0',
+'%xmm1',
+'%xmm2',
+'%xmm3',
+'%xmm4',
+'%xmm5',
+'%xmm6',
+'%xmm7',
+'%ymm0',
+'%ymm1',
+'%ymm2',
+'%ymm3',
+'%ymm4',
+'%ymm5',
+'%ymm6',
+'%ymm7'

+ 82 - 0
compiler/i8086/r8086con.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+NR_NO = tregister($00000000);
+NR_AL = tregister($01010000);
+NR_AH = tregister($01020000);
+NR_AX = tregister($01030000);
+NR_EAX = tregister($01040000);
+NR_CL = tregister($01010001);
+NR_CH = tregister($01020001);
+NR_CX = tregister($01030001);
+NR_ECX = tregister($01040001);
+NR_DL = tregister($01010002);
+NR_DH = tregister($01020002);
+NR_DX = tregister($01030002);
+NR_EDX = tregister($01040002);
+NR_BL = tregister($01010003);
+NR_BH = tregister($01020003);
+NR_BX = tregister($01030003);
+NR_EBX = tregister($01040003);
+NR_SI = tregister($01030004);
+NR_ESI = tregister($01040004);
+NR_DI = tregister($01030005);
+NR_EDI = tregister($01040005);
+NR_BP = tregister($01030006);
+NR_EBP = tregister($01040006);
+NR_SP = tregister($01030007);
+NR_ESP = tregister($01040007);
+NR_EIP = tregister($05040000);
+NR_CS = tregister($05000001);
+NR_DS = tregister($05000002);
+NR_ES = tregister($05000003);
+NR_SS = tregister($05000004);
+NR_FS = tregister($05000005);
+NR_GS = tregister($05000006);
+NR_FLAGS = tregister($05000007);
+NR_DR0 = tregister($05000007);
+NR_DR1 = tregister($05000008);
+NR_DR2 = tregister($05000009);
+NR_DR3 = tregister($0500000a);
+NR_DR6 = tregister($0500000b);
+NR_DR7 = tregister($0500000c);
+NR_CR0 = tregister($0500000d);
+NR_CR2 = tregister($0500000e);
+NR_CR3 = tregister($0500000f);
+NR_CR4 = tregister($05000010);
+NR_TR3 = tregister($05000011);
+NR_TR4 = tregister($05000012);
+NR_TR5 = tregister($05000013);
+NR_TR6 = tregister($05000014);
+NR_TR7 = tregister($05000015);
+NR_ST0 = tregister($02000000);
+NR_ST1 = tregister($02000001);
+NR_ST2 = tregister($02000002);
+NR_ST3 = tregister($02000003);
+NR_ST4 = tregister($02000004);
+NR_ST5 = tregister($02000005);
+NR_ST6 = tregister($02000006);
+NR_ST7 = tregister($02000007);
+NR_ST = tregister($02000008);
+NR_MM0 = tregister($03000000);
+NR_MM1 = tregister($03000001);
+NR_MM2 = tregister($03000002);
+NR_MM3 = tregister($03000003);
+NR_MM4 = tregister($03000004);
+NR_MM5 = tregister($03000005);
+NR_MM6 = tregister($03000006);
+NR_MM7 = tregister($03000007);
+NR_XMM0 = tregister($040C0000);
+NR_XMM1 = tregister($040C0001);
+NR_XMM2 = tregister($040C0002);
+NR_XMM3 = tregister($040C0003);
+NR_XMM4 = tregister($040C0004);
+NR_XMM5 = tregister($040C0005);
+NR_XMM6 = tregister($040C0006);
+NR_XMM7 = tregister($040C0007);
+NR_YMM0 = tregister($040D0000);
+NR_YMM1 = tregister($040D0001);
+NR_YMM2 = tregister($040D0002);
+NR_YMM3 = tregister($040D0003);
+NR_YMM4 = tregister($040D0004);
+NR_YMM5 = tregister($040D0005);
+NR_YMM6 = tregister($040D0006);
+NR_YMM7 = tregister($040D0007);

+ 82 - 0
compiler/i8086/r8086dwrf.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+-1,
+0,
+0,
+0,
+0,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+3,
+3,
+3,
+3,
+6,
+6,
+7,
+7,
+5,
+5,
+4,
+4,
+8,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+11,
+12,
+13,
+14,
+15,
+16,
+17,
+18,
+11,
+29,
+30,
+31,
+32,
+33,
+34,
+35,
+36,
+21,
+22,
+23,
+24,
+25,
+26,
+27,
+28,
+21,
+22,
+23,
+24,
+25,
+26,
+27,
+28

+ 82 - 0
compiler/i8086/r8086int.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+'INVALID',
+'al',
+'ah',
+'ax',
+'eax',
+'cl',
+'ch',
+'cx',
+'ecx',
+'dl',
+'dh',
+'dx',
+'edx',
+'bl',
+'bh',
+'bx',
+'ebx',
+'si',
+'esi',
+'di',
+'edi',
+'bp',
+'ebp',
+'sp',
+'esp',
+'eip',
+'cs',
+'ds',
+'es',
+'ss',
+'fs',
+'gs',
+'flags',
+'dr0',
+'dr1',
+'dr2',
+'dr3',
+'dr6',
+'dr7',
+'cr0',
+'cr2',
+'cr3',
+'cr4',
+'tr3',
+'tr4',
+'tr5',
+'tr6',
+'tr7',
+'st(0)',
+'st(1)',
+'st(2)',
+'st(3)',
+'st(4)',
+'st(5)',
+'st(6)',
+'st(7)',
+'st',
+'mm0',
+'mm1',
+'mm2',
+'mm3',
+'mm4',
+'mm5',
+'mm6',
+'mm7',
+'xmm0',
+'xmm1',
+'xmm2',
+'xmm3',
+'xmm4',
+'xmm5',
+'xmm6',
+'xmm7',
+'ymm0',
+'ymm1',
+'ymm2',
+'ymm3',
+'ymm4',
+'ymm5',
+'ymm6',
+'ymm7'

+ 82 - 0
compiler/i8086/r8086iri.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+0,
+2,
+1,
+3,
+14,
+13,
+21,
+15,
+6,
+5,
+39,
+40,
+41,
+42,
+26,
+7,
+10,
+19,
+9,
+33,
+34,
+35,
+36,
+37,
+38,
+27,
+11,
+4,
+22,
+16,
+8,
+20,
+12,
+25,
+28,
+18,
+24,
+32,
+30,
+31,
+57,
+58,
+59,
+60,
+61,
+62,
+63,
+64,
+17,
+23,
+29,
+56,
+48,
+49,
+50,
+51,
+52,
+53,
+54,
+55,
+43,
+44,
+45,
+46,
+47,
+65,
+66,
+67,
+68,
+69,
+70,
+71,
+72,
+73,
+74,
+75,
+76,
+77,
+78,
+79,
+80

+ 82 - 0
compiler/i8086/r8086nasm.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+'INVALID',
+'al',
+'ah',
+'ax',
+'eax',
+'cl',
+'ch',
+'cx',
+'ecx',
+'dl',
+'dh',
+'dx',
+'edx',
+'bl',
+'bh',
+'bx',
+'ebx',
+'si',
+'esi',
+'di',
+'edi',
+'bp',
+'ebp',
+'sp',
+'esp',
+'eip',
+'cs',
+'ds',
+'es',
+'ss',
+'fs',
+'gs',
+'flags',
+'dr0',
+'dr1',
+'dr2',
+'dr3',
+'dr6',
+'dr7',
+'cr0',
+'cr2',
+'cr3',
+'cr4',
+'tr3',
+'tr4',
+'tr5',
+'tr6',
+'tr7',
+'st0',
+'st1',
+'st2',
+'st3',
+'st4',
+'st5',
+'st6',
+'st7',
+'st0',
+'mm0',
+'mm1',
+'mm2',
+'mm3',
+'mm4',
+'mm5',
+'mm6',
+'mm7',
+'xmm0',
+'xmm1',
+'xmm2',
+'xmm3',
+'xmm4',
+'xmm5',
+'xmm6',
+'xmm7',
+'ymm0',
+'ymm1',
+'ymm2',
+'ymm3',
+'ymm4',
+'ymm5',
+'ymm6',
+'ymm7'

+ 2 - 0
compiler/i8086/r8086nor.inc

@@ -0,0 +1,2 @@
+{ don't edit, this file is generated from x86reg.dat }
+81

+ 82 - 0
compiler/i8086/r8086nri.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+0,
+2,
+1,
+3,
+14,
+13,
+21,
+15,
+6,
+5,
+39,
+40,
+41,
+42,
+26,
+7,
+10,
+19,
+9,
+33,
+34,
+35,
+36,
+37,
+38,
+27,
+11,
+4,
+22,
+16,
+8,
+20,
+12,
+25,
+28,
+18,
+24,
+32,
+30,
+31,
+57,
+58,
+59,
+60,
+61,
+62,
+63,
+64,
+17,
+23,
+29,
+56,
+48,
+49,
+50,
+51,
+52,
+53,
+54,
+55,
+43,
+44,
+45,
+46,
+47,
+65,
+66,
+67,
+68,
+69,
+70,
+71,
+72,
+73,
+74,
+75,
+76,
+77,
+78,
+79,
+80

+ 82 - 0
compiler/i8086/r8086num.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+tregister($00000000),
+tregister($01010000),
+tregister($01020000),
+tregister($01030000),
+tregister($01040000),
+tregister($01010001),
+tregister($01020001),
+tregister($01030001),
+tregister($01040001),
+tregister($01010002),
+tregister($01020002),
+tregister($01030002),
+tregister($01040002),
+tregister($01010003),
+tregister($01020003),
+tregister($01030003),
+tregister($01040003),
+tregister($01030004),
+tregister($01040004),
+tregister($01030005),
+tregister($01040005),
+tregister($01030006),
+tregister($01040006),
+tregister($01030007),
+tregister($01040007),
+tregister($05040000),
+tregister($05000001),
+tregister($05000002),
+tregister($05000003),
+tregister($05000004),
+tregister($05000005),
+tregister($05000006),
+tregister($05000007),
+tregister($05000007),
+tregister($05000008),
+tregister($05000009),
+tregister($0500000a),
+tregister($0500000b),
+tregister($0500000c),
+tregister($0500000d),
+tregister($0500000e),
+tregister($0500000f),
+tregister($05000010),
+tregister($05000011),
+tregister($05000012),
+tregister($05000013),
+tregister($05000014),
+tregister($05000015),
+tregister($02000000),
+tregister($02000001),
+tregister($02000002),
+tregister($02000003),
+tregister($02000004),
+tregister($02000005),
+tregister($02000006),
+tregister($02000007),
+tregister($02000008),
+tregister($03000000),
+tregister($03000001),
+tregister($03000002),
+tregister($03000003),
+tregister($03000004),
+tregister($03000005),
+tregister($03000006),
+tregister($03000007),
+tregister($040C0000),
+tregister($040C0001),
+tregister($040C0002),
+tregister($040C0003),
+tregister($040C0004),
+tregister($040C0005),
+tregister($040C0006),
+tregister($040C0007),
+tregister($040D0000),
+tregister($040D0001),
+tregister($040D0002),
+tregister($040D0003),
+tregister($040D0004),
+tregister($040D0005),
+tregister($040D0006),
+tregister($040D0007)

+ 82 - 0
compiler/i8086/r8086op.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+0,
+0,
+4,
+0,
+0,
+1,
+5,
+1,
+1,
+2,
+6,
+2,
+2,
+3,
+7,
+3,
+3,
+6,
+6,
+7,
+7,
+5,
+5,
+4,
+4,
+0,
+1,
+3,
+0,
+2,
+4,
+5,
+0,
+0,
+1,
+2,
+3,
+6,
+7,
+0,
+2,
+3,
+4,
+3,
+4,
+5,
+6,
+7,
+0,
+1,
+2,
+3,
+4,
+5,
+6,
+7,
+0,
+0,
+1,
+2,
+3,
+4,
+5,
+6,
+7,
+0,
+1,
+2,
+3,
+4,
+5,
+6,
+7,
+0,
+1,
+2,
+3,
+4,
+5,
+6,
+7

+ 82 - 0
compiler/i8086/r8086ot.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+OT_NONE,
+OT_REG_AL,
+OT_REG8,
+OT_REG_AX,
+OT_REG_EAX,
+OT_REG_CL,
+OT_REG8,
+OT_REG_CX,
+OT_REG_ECX,
+OT_REG8,
+OT_REG8,
+OT_REG_DX,
+OT_REG32,
+OT_REG8,
+OT_REG8,
+OT_REG16,
+OT_REG32,
+OT_REG16,
+OT_REG32,
+OT_REG16,
+OT_REG32,
+OT_REG16,
+OT_REG32,
+OT_REG16,
+OT_REG32,
+OT_NONE,
+OT_REG_CS,
+OT_REG_DESS,
+OT_REG_DESS,
+OT_REG_DESS,
+OT_REG_FSGS,
+OT_REG_FSGS,
+OT_NONE,
+OT_REG_DREG,
+OT_REG_DREG,
+OT_REG_DREG,
+OT_REG_DREG,
+OT_REG_DREG,
+OT_REG_DREG,
+OT_REG_CREG,
+OT_REG_CREG,
+OT_REG_CREG,
+OT_REG_CR4,
+OT_REG_TREG,
+OT_REG_TREG,
+OT_REG_TREG,
+OT_REG_TREG,
+OT_REG_TREG,
+OT_FPU0,
+OT_FPUREG,
+OT_FPUREG,
+OT_FPUREG,
+OT_FPUREG,
+OT_FPUREG,
+OT_FPUREG,
+OT_FPUREG,
+OT_FPU0,
+OT_MMXREG,
+OT_MMXREG,
+OT_MMXREG,
+OT_MMXREG,
+OT_MMXREG,
+OT_MMXREG,
+OT_MMXREG,
+OT_MMXREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_XMMREG,
+OT_YMMREG,
+OT_YMMREG,
+OT_YMMREG,
+OT_YMMREG,
+OT_YMMREG,
+OT_YMMREG,
+OT_YMMREG,
+OT_YMMREG

+ 82 - 0
compiler/i8086/r8086rni.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+0,
+1,
+5,
+9,
+13,
+2,
+6,
+10,
+14,
+3,
+7,
+11,
+15,
+17,
+19,
+21,
+23,
+4,
+8,
+12,
+16,
+18,
+20,
+22,
+24,
+48,
+49,
+50,
+51,
+52,
+53,
+54,
+55,
+56,
+57,
+58,
+59,
+60,
+61,
+62,
+63,
+64,
+65,
+66,
+67,
+68,
+69,
+70,
+71,
+72,
+73,
+74,
+75,
+76,
+77,
+78,
+79,
+80,
+26,
+27,
+28,
+29,
+30,
+31,
+33,
+32,
+34,
+35,
+36,
+37,
+38,
+39,
+40,
+41,
+42,
+43,
+44,
+45,
+46,
+47,
+25

+ 82 - 0
compiler/i8086/r8086sri.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+0,
+2,
+1,
+3,
+14,
+13,
+21,
+15,
+6,
+5,
+39,
+40,
+41,
+42,
+26,
+7,
+10,
+19,
+9,
+33,
+34,
+35,
+36,
+37,
+38,
+27,
+11,
+4,
+22,
+16,
+8,
+20,
+12,
+25,
+28,
+18,
+24,
+32,
+30,
+31,
+57,
+58,
+59,
+60,
+61,
+62,
+63,
+64,
+17,
+23,
+29,
+56,
+48,
+49,
+50,
+51,
+52,
+53,
+54,
+55,
+43,
+44,
+45,
+46,
+47,
+65,
+66,
+67,
+68,
+69,
+70,
+71,
+72,
+73,
+74,
+75,
+76,
+77,
+78,
+79,
+80

+ 82 - 0
compiler/i8086/r8086stab.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+-1,
+0,
+0,
+0,
+0,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+3,
+3,
+3,
+3,
+6,
+6,
+7,
+7,
+5,
+5,
+4,
+4,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+12,
+13,
+14,
+15,
+16,
+17,
+18,
+19,
+12,
+29,
+30,
+31,
+32,
+33,
+34,
+35,
+36,
+21,
+22,
+23,
+24,
+25,
+26,
+27,
+28,
+21,
+22,
+23,
+24,
+25,
+26,
+27,
+28

+ 82 - 0
compiler/i8086/r8086std.inc

@@ -0,0 +1,82 @@
+{ don't edit, this file is generated from x86reg.dat }
+'INVALID',
+'al',
+'ah',
+'ax',
+'eax',
+'cl',
+'ch',
+'cx',
+'ecx',
+'dl',
+'dh',
+'dx',
+'edx',
+'bl',
+'bh',
+'bx',
+'ebx',
+'si',
+'esi',
+'di',
+'edi',
+'bp',
+'ebp',
+'sp',
+'esp',
+'eip',
+'cs',
+'ds',
+'es',
+'ss',
+'fs',
+'gs',
+'flags',
+'dr0',
+'dr1',
+'dr2',
+'dr3',
+'dr6',
+'dr7',
+'cr0',
+'cr2',
+'cr3',
+'cr4',
+'tr3',
+'tr4',
+'tr5',
+'tr6',
+'tr7',
+'st(0)',
+'st(1)',
+'st(2)',
+'st(3)',
+'st(4)',
+'st(5)',
+'st(6)',
+'st(7)',
+'st',
+'mm0',
+'mm1',
+'mm2',
+'mm3',
+'mm4',
+'mm5',
+'mm6',
+'mm7',
+'xmm0',
+'xmm1',
+'xmm2',
+'xmm3',
+'xmm4',
+'xmm5',
+'xmm6',
+'xmm7',
+'ymm0',
+'ymm1',
+'ymm2',
+'ymm3',
+'ymm4',
+'ymm5',
+'ymm6',
+'ymm7'

+ 59 - 0
compiler/i8086/ra8086att.pas

@@ -0,0 +1,59 @@
+{
+    Copyright (c) 1998-2002 by Carl Eric Codere and Peter Vreman
+
+    Does the parsing for the i8086 GNU AS styled inline assembler.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+Unit ra8086att;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+      rax86att;
+
+    type
+      ti8086attreader = class(tx86attreader)
+      end;
+
+
+  implementation
+
+    uses
+      rabase,systems;
+
+const
+  asmmode_i8086_att_info : tasmmodeinfo =
+          (
+            id    : asmmode_i8086_att;
+            idtxt : 'ATT';
+            casmreader : ti8086attreader;
+          );
+
+  asmmode_i8086_standard_info : tasmmodeinfo =
+          (
+            id    : asmmode_standard;
+            idtxt : 'STANDARD';
+            casmreader : ti8086attreader;
+          );
+
+initialization
+  RegisterAsmMode(asmmode_i8086_att_info);
+  RegisterAsmMode(asmmode_i8086_standard_info);
+end.

+ 74 - 0
compiler/i8086/ra8086int.pas

@@ -0,0 +1,74 @@
+{
+    Copyright (c) 1998-2006 by Carl Eric Codere and Peter Vreman
+
+    Does the parsing for the i8086 intel styled inline assembler.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+Unit ra8086int;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+      rax86int;
+
+    type
+      ti8086intreader = class(tx86intreader)
+        // procedure handleopcode;override;
+      end;
+
+
+  implementation
+
+    uses
+      rabase,systems,rax86,aasmcpu;
+
+(*
+    procedure ti386intreader.handleopcode;
+      var
+        instr : Tx86Instruction;
+      begin
+        instr:=Tx86Instruction.Create(Tx86Operand);
+        instr.OpOrder:=op_att;
+        BuildOpcode(instr);
+        instr.AddReferenceSizes;
+        instr.SetInstructionOpsize;
+        {
+        instr.CheckOperandSizes;
+        }
+        instr.ConcatInstruction(curlist);
+        instr.Free;
+      end;
+*)
+
+{*****************************************************************************
+                               Initialize
+*****************************************************************************}
+
+const
+  asmmode_i8086_intel_info : tasmmodeinfo =
+          (
+            id    : asmmode_i8086_intel;
+            idtxt : 'INTEL';
+            casmreader : ti8086intreader;
+          );
+
+begin
+  RegisterAsmMode(asmmode_i8086_intel_info);
+end.

+ 111 - 0
compiler/i8086/rgcpu.pas

@@ -0,0 +1,111 @@
+{
+    Copyright (c) 1998-2002 by Florian Klaempfl
+
+    This unit implements the i386 specific class for the register
+    allocator
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+
+unit rgcpu;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+      cpubase,
+      cpuinfo,
+      aasmbase,aasmtai,aasmdata,
+      cclasses,globtype,cgbase,rgobj,rgx86;
+
+    type
+       trgcpu = class(trgx86)
+          procedure add_constraints(reg:Tregister);override;
+       end;
+
+       trgintcpu = class(trgcpu)
+         procedure add_cpu_interferences(p : tai);override;
+       end;
+
+
+implementation
+
+    uses
+      systems,
+      verbose,
+      aasmcpu,
+      cgutils;
+
+    const
+       { This value is used in tsaved. If the array value is equal
+         to this, then this means that this register is not used.}
+       reg_not_saved = $7fffffff;
+
+{************************************************************************
+                                 trgcpu
+*************************************************************************}
+
+    procedure trgcpu.add_constraints(reg:Tregister);
+      var
+        supreg : tsuperregister;
+      begin
+        if getsubreg(reg) in [R_SUBL,R_SUBH] then
+          begin
+            { Some registers have no 8-bit subregister }
+            supreg:=getsupreg(reg);
+            add_edge(supreg,RS_SI);
+            add_edge(supreg,RS_DI);
+            add_edge(supreg,RS_BP);
+          end;
+      end;
+
+
+    procedure trgintcpu.add_cpu_interferences(p : tai);
+      var
+        href : treference;
+        i : integer;
+      begin
+        if p.typ=ait_instruction then
+          begin
+            for i:=0 to taicpu(p).ops-1 do
+              begin
+                if taicpu(p).oper[i]^.typ=top_ref then
+                  begin
+                    href:=taicpu(p).oper[i]^.ref^;
+                    if (href.base<>NR_NO) and (getsupreg(href.base)>=first_int_imreg) then
+                      begin
+                        add_edge(getsupreg(href.base),RS_AX);
+                        add_edge(getsupreg(href.base),RS_CX);
+                        add_edge(getsupreg(href.base),RS_DX);
+                        add_edge(getsupreg(href.base),RS_SI);
+                        add_edge(getsupreg(href.base),RS_DI);
+                      end;
+                    if (href.index<>NR_NO) and (getsupreg(href.index)>=first_int_imreg) then
+                      begin
+                        add_edge(getsupreg(href.index),RS_AX);
+                        add_edge(getsupreg(href.index),RS_BX);
+                        add_edge(getsupreg(href.index),RS_CX);
+                        add_edge(getsupreg(href.index),RS_DX);
+                        add_edge(getsupreg(href.index),RS_BP);
+                      end;
+                  end;
+              end;
+          end;
+      end;
+
+end.

+ 36 - 36
compiler/jvm/hlcgcpu.pas

@@ -48,32 +48,32 @@ uses
 
 
       function def2regtyp(def: tdef): tregistertype; override;
       function def2regtyp(def: tdef): tregistertype; override;
 
 
-      procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : aint;const cgpara : TCGPara);override;
+      procedure a_load_const_cgpara(list : TAsmList;tosize : tdef;a : tcgint;const cgpara : TCGPara);override;
 
 
       function a_call_name(list : TAsmList;pd : tprocdef;const s : TSymStr; forceresdef: tdef; weak: boolean): tcgpara;override;
       function a_call_name(list : TAsmList;pd : tprocdef;const s : TSymStr; forceresdef: tdef; weak: boolean): tcgpara;override;
       procedure a_call_name_inherited(list : TAsmList;pd : tprocdef;const s : TSymStr);override;
       procedure a_call_name_inherited(list : TAsmList;pd : tprocdef;const s : TSymStr);override;
       procedure a_call_reg(list: TAsmList; pd: tabstractprocdef; reg: tregister); override;
       procedure a_call_reg(list: TAsmList; pd: tabstractprocdef; reg: tregister); override;
 
 
-      procedure a_load_const_reg(list : TAsmList;tosize : tdef;a : aint;register : tregister);override;
-      procedure a_load_const_ref(list : TAsmList;tosize : tdef;a : aint;const ref : treference);override;
+      procedure a_load_const_reg(list : TAsmList;tosize : tdef;a : tcgint;register : tregister);override;
+      procedure a_load_const_ref(list : TAsmList;tosize : tdef;a : tcgint;const ref : treference);override;
       procedure a_load_reg_ref(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);override;
       procedure a_load_reg_ref(list : TAsmList;fromsize, tosize : tdef;register : tregister;const ref : treference);override;
       procedure a_load_reg_reg(list : TAsmList;fromsize, tosize : tdef;reg1,reg2 : tregister);override;
       procedure a_load_reg_reg(list : TAsmList;fromsize, tosize : tdef;reg1,reg2 : tregister);override;
       procedure a_load_ref_reg(list : TAsmList;fromsize, tosize : tdef;const ref : treference;register : tregister);override;
       procedure a_load_ref_reg(list : TAsmList;fromsize, tosize : tdef;const ref : treference;register : tregister);override;
       procedure a_load_ref_ref(list : TAsmList;fromsize, tosize : tdef;const sref : treference;const dref : treference);override;
       procedure a_load_ref_ref(list : TAsmList;fromsize, tosize : tdef;const sref : treference;const dref : treference);override;
       procedure a_loadaddr_ref_reg(list : TAsmList;fromsize, tosize : tdef;const ref : treference;r : tregister);override;
       procedure a_loadaddr_ref_reg(list : TAsmList;fromsize, tosize : tdef;const ref : treference;r : tregister);override;
 
 
-      procedure a_op_const_reg(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; reg: TRegister); override;
-      procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister); override;
-      procedure a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; const ref: TReference); override;
+      procedure a_op_const_reg(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; reg: TRegister); override;
+      procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister); override;
+      procedure a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; const ref: TReference); override;
 
 
       procedure a_op_ref_reg(list: TAsmList; Op: TOpCG; size: tdef; const ref: TReference; reg: TRegister); override;
       procedure a_op_ref_reg(list: TAsmList; Op: TOpCG; size: tdef; const ref: TReference; reg: TRegister); override;
       procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister); override;
       procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister); override;
       procedure a_op_reg_reg(list: TAsmList; Op: TOpCG; size: tdef; reg1, reg2: TRegister); override;
       procedure a_op_reg_reg(list: TAsmList; Op: TOpCG; size: tdef; reg1, reg2: TRegister); override;
-      procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
+      procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
       procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
       procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); override;
 
 
-      procedure a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; const ref: treference; l: tasmlabel); override;
-      procedure a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; reg: tregister; l: tasmlabel); override;
+      procedure a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; const ref: treference; l: tasmlabel); override;
+      procedure a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel); override;
       procedure a_cmp_ref_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; const ref: treference; reg: tregister; l: tasmlabel); override;
       procedure a_cmp_ref_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; const ref: treference; reg: tregister; l: tasmlabel); override;
       procedure a_cmp_reg_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; reg: tregister; const ref: treference; l: tasmlabel); override;
       procedure a_cmp_reg_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; reg: tregister; const ref: treference; l: tasmlabel); override;
       procedure a_cmp_reg_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
       procedure a_cmp_reg_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
@@ -129,7 +129,7 @@ uses
       { extra_slots are the slots that are used by the reference, and that
       { extra_slots are the slots that are used by the reference, and that
         will be removed by the load operation }
         will be removed by the load operation }
       procedure a_load_ref_stack(list : TAsmList;size: tdef;const ref: treference;extra_slots: longint);
       procedure a_load_ref_stack(list : TAsmList;size: tdef;const ref: treference;extra_slots: longint);
-      procedure a_load_const_stack(list : TAsmList;size: tdef;a :aint; typ: TRegisterType);
+      procedure a_load_const_stack(list : TAsmList;size: tdef;a :tcgint; typ: TRegisterType);
 
 
       procedure a_load_stack_loc(list : TAsmList;size: tdef;const loc: tlocation);
       procedure a_load_stack_loc(list : TAsmList;size: tdef;const loc: tlocation);
       procedure a_load_loc_stack(list : TAsmList;size: tdef;const loc: tlocation);
       procedure a_load_loc_stack(list : TAsmList;size: tdef;const loc: tlocation);
@@ -137,7 +137,7 @@ uses
       procedure a_loadfpu_const_stack(list : TAsmList;size: tdef;a :double);
       procedure a_loadfpu_const_stack(list : TAsmList;size: tdef;a :double);
 
 
       procedure a_op_stack(list : TAsmList;op: topcg; size: tdef; trunc32: boolean);
       procedure a_op_stack(list : TAsmList;op: topcg; size: tdef; trunc32: boolean);
-      procedure a_op_const_stack(list : TAsmList;op: topcg; size: tdef;a : aint);
+      procedure a_op_const_stack(list : TAsmList;op: topcg; size: tdef;a : tcgint);
       procedure a_op_reg_stack(list : TAsmList;op: topcg; size: tdef;reg: tregister);
       procedure a_op_reg_stack(list : TAsmList;op: topcg; size: tdef;reg: tregister);
       procedure a_op_ref_stack(list : TAsmList;op: topcg; size: tdef;const ref: treference);
       procedure a_op_ref_stack(list : TAsmList;op: topcg; size: tdef;const ref: treference);
       procedure a_op_loc_stack(list : TAsmList;op: topcg; size: tdef;const loc: tlocation);
       procedure a_op_loc_stack(list : TAsmList;op: topcg; size: tdef;const loc: tlocation);
@@ -158,7 +158,7 @@ uses
       procedure a_cmp_stack_label(list : TAsmlist; size: tdef; cmp_op: topcmp; lab: tasmlabel);
       procedure a_cmp_stack_label(list : TAsmlist; size: tdef; cmp_op: topcmp; lab: tasmlabel);
       { these 2 routines perform the massaging expected by the previous one }
       { these 2 routines perform the massaging expected by the previous one }
       procedure maybe_adjust_cmp_stackval(list : TAsmlist; size: tdef; cmp_op: topcmp);
       procedure maybe_adjust_cmp_stackval(list : TAsmlist; size: tdef; cmp_op: topcmp);
-      function maybe_adjust_cmp_constval(size: tdef; cmp_op: topcmp; a: aint): aint;
+      function maybe_adjust_cmp_constval(size: tdef; cmp_op: topcmp; a: tcgint): tcgint;
       { truncate/sign extend after performing operations on values < 32 bit
       { truncate/sign extend after performing operations on values < 32 bit
         that may have overflowed outside the range }
         that may have overflowed outside the range }
       procedure maybe_adjust_op_result(list: TAsmList; op: TOpCg; size: tdef);
       procedure maybe_adjust_op_result(list: TAsmList; op: TOpCg; size: tdef);
@@ -181,7 +181,7 @@ uses
 
 
       procedure gen_typecheck(list: TAsmList; checkop: tasmop; checkdef: tdef);
       procedure gen_typecheck(list: TAsmList; checkop: tasmop; checkdef: tdef);
      protected
      protected
-      procedure a_load_const_stack_intern(list : TAsmList;size : tdef;a : aint; typ: TRegisterType; legalize_const: boolean);
+      procedure a_load_const_stack_intern(list : TAsmList;size : tdef;a : tcgint; typ: TRegisterType; legalize_const: boolean);
 
 
       function get_enum_init_val_ref(def: tdef; out ref: treference): boolean;
       function get_enum_init_val_ref(def: tdef; out ref: treference): boolean;
 
 
@@ -206,11 +206,11 @@ uses
       { return the load/store opcode to load/store from/to ref; if the result
       { return the load/store opcode to load/store from/to ref; if the result
         has to be and'ed after a load to get the final value, that constant
         has to be and'ed after a load to get the final value, that constant
         is returned in finishandval (otherwise that value is set to -1) }
         is returned in finishandval (otherwise that value is set to -1) }
-      function loadstoreopcref(def: tdef; isload: boolean; const ref: treference; out finishandval: aint): tasmop;
+      function loadstoreopcref(def: tdef; isload: boolean; const ref: treference; out finishandval: tcgint): tasmop;
       { return the load/store opcode to load/store from/to reg; if the result
       { return the load/store opcode to load/store from/to reg; if the result
         has to be and'ed after a load to get the final value, that constant
         has to be and'ed after a load to get the final value, that constant
         is returned in finishandval (otherwise that value is set to -1) }
         is returned in finishandval (otherwise that value is set to -1) }
-      function loadstoreopc(def: tdef; isload, isarray: boolean; out finishandval: aint): tasmop;
+      function loadstoreopc(def: tdef; isload, isarray: boolean; out finishandval: tcgint): tasmop;
       procedure resizestackfpuval(list: TAsmList; fromsize, tosize: tcgsize);
       procedure resizestackfpuval(list: TAsmList; fromsize, tosize: tcgsize);
       { in case of an OS_32 OP_DIV, we have to use an OS_S64 OP_IDIV because the
       { in case of an OS_32 OP_DIV, we have to use an OS_S64 OP_IDIV because the
         JVM does not support unsigned divisions }
         JVM does not support unsigned divisions }
@@ -298,7 +298,7 @@ implementation
       end;
       end;
     end;
     end;
 
 
-  procedure thlcgjvm.a_load_const_cgpara(list: TAsmList; tosize: tdef; a: aint; const cgpara: TCGPara);
+  procedure thlcgjvm.a_load_const_cgpara(list: TAsmList; tosize: tdef; a: tcgint; const cgpara: TCGPara);
     begin
     begin
       tosize:=get_para_push_size(tosize);
       tosize:=get_para_push_size(tosize);
       if tosize=s8inttype then
       if tosize=s8inttype then
@@ -325,7 +325,7 @@ implementation
     end;
     end;
 
 
 
 
-  procedure thlcgjvm.a_load_const_stack_intern(list : TAsmList;size : tdef;a : aint; typ: TRegisterType; legalize_const: boolean);
+  procedure thlcgjvm.a_load_const_stack_intern(list : TAsmList;size : tdef;a : tcgint; typ: TRegisterType; legalize_const: boolean);
     begin
     begin
       if legalize_const and
       if legalize_const and
          (typ=R_INTREGISTER) and
          (typ=R_INTREGISTER) and
@@ -344,7 +344,7 @@ implementation
     end;
     end;
 
 
 
 
-  procedure thlcgjvm.a_load_const_stack(list : TAsmList;size : tdef;a : aint; typ: TRegisterType);
+  procedure thlcgjvm.a_load_const_stack(list : TAsmList;size : tdef;a : tcgint; typ: TRegisterType);
     const
     const
       int2opc: array[-1..5] of tasmop = (a_iconst_m1,a_iconst_0,a_iconst_1,
       int2opc: array[-1..5] of tasmop = (a_iconst_m1,a_iconst_0,a_iconst_1,
         a_iconst_2,a_iconst_3,a_iconst_4,a_iconst_5);
         a_iconst_2,a_iconst_3,a_iconst_4,a_iconst_5);
@@ -530,7 +530,7 @@ implementation
         end;
         end;
     end;
     end;
 
 
-  procedure thlcgjvm.a_op_const_stack(list: TAsmList;op: topcg;size: tdef;a: aint);
+  procedure thlcgjvm.a_op_const_stack(list: TAsmList;op: topcg;size: tdef;a: tcgint);
     var
     var
       trunc32: boolean;
       trunc32: boolean;
     begin
     begin
@@ -849,11 +849,11 @@ implementation
           OS_32,OS_S32:
           OS_32,OS_S32:
             a_op_const_stack(list,OP_XOR,size,cardinal($80000000));
             a_op_const_stack(list,OP_XOR,size,cardinal($80000000));
           OS_64,OS_S64:
           OS_64,OS_S64:
-            a_op_const_stack(list,OP_XOR,size,aint($8000000000000000));
+            a_op_const_stack(list,OP_XOR,size,tcgint($8000000000000000));
         end;
         end;
       end;
       end;
 
 
-    function thlcgjvm.maybe_adjust_cmp_constval(size: tdef; cmp_op: topcmp; a: aint): aint;
+    function thlcgjvm.maybe_adjust_cmp_constval(size: tdef; cmp_op: topcmp; a: tcgint): tcgint;
       begin
       begin
         result:=a;
         result:=a;
         { use cmp_op because eventually that's what indicates the
         { use cmp_op because eventually that's what indicates the
@@ -865,7 +865,7 @@ implementation
           OS_32,OS_S32:
           OS_32,OS_S32:
             result:=a xor cardinal($80000000);
             result:=a xor cardinal($80000000);
           OS_64,OS_S64:
           OS_64,OS_S64:
-            result:=a xor aint($8000000000000000);
+            result:=a xor tcgint($8000000000000000);
         end;
         end;
       end;
       end;
 
 
@@ -1050,13 +1050,13 @@ implementation
         end;
         end;
     end;
     end;
 
 
-  procedure thlcgjvm.a_load_const_reg(list: TAsmList; tosize: tdef; a: aint; register: tregister);
+  procedure thlcgjvm.a_load_const_reg(list: TAsmList; tosize: tdef; a: tcgint; register: tregister);
     begin
     begin
       a_load_const_stack(list,tosize,a,def2regtyp(tosize));
       a_load_const_stack(list,tosize,a,def2regtyp(tosize));
       a_load_stack_reg(list,tosize,register);
       a_load_stack_reg(list,tosize,register);
     end;
     end;
 
 
-  procedure thlcgjvm.a_load_const_ref(list: TAsmList; tosize: tdef; a: aint; const ref: treference);
+  procedure thlcgjvm.a_load_const_ref(list: TAsmList; tosize: tdef; a: tcgint; const ref: treference);
     var
     var
       extra_slots: longint;
       extra_slots: longint;
     begin
     begin
@@ -1121,19 +1121,19 @@ implementation
       a_load_ref_reg(list,java_jlobject,java_jlobject,ref,r);
       a_load_ref_reg(list,java_jlobject,java_jlobject,ref,r);
     end;
     end;
 
 
-  procedure thlcgjvm.a_op_const_reg(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; reg: TRegister);
+  procedure thlcgjvm.a_op_const_reg(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; reg: TRegister);
     begin
     begin
       a_op_const_reg_reg(list,op,size,a,reg,reg);
       a_op_const_reg_reg(list,op,size,a,reg,reg);
     end;
     end;
 
 
-  procedure thlcgjvm.a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister);
+  procedure thlcgjvm.a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister);
     begin
     begin
       a_load_reg_stack(list,size,src);
       a_load_reg_stack(list,size,src);
       a_op_const_stack(list,op,size,a);
       a_op_const_stack(list,op,size,a);
       a_load_stack_reg(list,size,dst);
       a_load_stack_reg(list,size,dst);
     end;
     end;
 
 
-  procedure thlcgjvm.a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: Aint; const ref: TReference);
+  procedure thlcgjvm.a_op_const_ref(list: TAsmList; Op: TOpCG; size: tdef; a: tcgint; const ref: TReference);
     var
     var
       extra_slots: longint;
       extra_slots: longint;
     begin
     begin
@@ -1168,7 +1168,7 @@ implementation
       a_op_reg_reg_reg(list,op,size,reg1,reg2,reg2);
       a_op_reg_reg_reg(list,op,size,reg1,reg2,reg2);
     end;
     end;
 
 
-  procedure thlcgjvm.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: aint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
+  procedure thlcgjvm.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tdef; a: tcgint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
     var
     var
       tmpreg: tregister;
       tmpreg: tregister;
     begin
     begin
@@ -1267,7 +1267,7 @@ implementation
         ovloc.loc:=LOC_VOID;
         ovloc.loc:=LOC_VOID;
     end;
     end;
 
 
-  procedure thlcgjvm.a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; const ref: treference; l: tasmlabel);
+  procedure thlcgjvm.a_cmp_const_ref_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; const ref: treference; l: tasmlabel);
     begin
     begin
       if ref.base<>NR_EVAL_STACK_BASE then
       if ref.base<>NR_EVAL_STACK_BASE then
         a_load_ref_stack(list,size,ref,prepare_stack_for_ref(list,ref,false));
         a_load_ref_stack(list,size,ref,prepare_stack_for_ref(list,ref,false));
@@ -1276,7 +1276,7 @@ implementation
       a_cmp_stack_label(list,size,cmp_op,l);
       a_cmp_stack_label(list,size,cmp_op,l);
     end;
     end;
 
 
-  procedure thlcgjvm.a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: aint; reg: tregister; l: tasmlabel);
+  procedure thlcgjvm.a_cmp_const_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);
     begin
     begin
       a_load_reg_stack(list,size,reg);
       a_load_reg_stack(list,size,reg);
       maybe_adjust_cmp_stackval(list,size,cmp_op);
       maybe_adjust_cmp_stackval(list,size,cmp_op);
@@ -1904,7 +1904,7 @@ implementation
   procedure thlcgjvm.a_load_stack_reg(list: TAsmList; size: tdef; reg: tregister);
   procedure thlcgjvm.a_load_stack_reg(list: TAsmList; size: tdef; reg: tregister);
     var
     var
       opc: tasmop;
       opc: tasmop;
-      finishandval: aint;
+      finishandval: tcgint;
     begin
     begin
       opc:=loadstoreopc(size,false,false,finishandval);
       opc:=loadstoreopc(size,false,false,finishandval);
       list.concat(taicpu.op_reg(opc,reg));
       list.concat(taicpu.op_reg(opc,reg));
@@ -1917,7 +1917,7 @@ implementation
   procedure thlcgjvm.a_load_stack_ref(list: TAsmList; size: tdef; const ref: treference; extra_slots: longint);
   procedure thlcgjvm.a_load_stack_ref(list: TAsmList; size: tdef; const ref: treference; extra_slots: longint);
     var
     var
       opc: tasmop;
       opc: tasmop;
-      finishandval: aint;
+      finishandval: tcgint;
     begin
     begin
       { fake location that indicates the value has to remain on the stack }
       { fake location that indicates the value has to remain on the stack }
       if ref.base=NR_EVAL_STACK_BASE then
       if ref.base=NR_EVAL_STACK_BASE then
@@ -1936,7 +1936,7 @@ implementation
   procedure thlcgjvm.a_load_reg_stack(list: TAsmList; size: tdef; reg: tregister);
   procedure thlcgjvm.a_load_reg_stack(list: TAsmList; size: tdef; reg: tregister);
     var
     var
       opc: tasmop;
       opc: tasmop;
-      finishandval: aint;
+      finishandval: tcgint;
     begin
     begin
       opc:=loadstoreopc(size,true,false,finishandval);
       opc:=loadstoreopc(size,true,false,finishandval);
       list.concat(taicpu.op_reg(opc,reg));
       list.concat(taicpu.op_reg(opc,reg));
@@ -1951,7 +1951,7 @@ implementation
   procedure thlcgjvm.a_load_ref_stack(list: TAsmList; size: tdef; const ref: treference; extra_slots: longint);
   procedure thlcgjvm.a_load_ref_stack(list: TAsmList; size: tdef; const ref: treference; extra_slots: longint);
     var
     var
       opc: tasmop;
       opc: tasmop;
-      finishandval: aint;
+      finishandval: tcgint;
     begin
     begin
       { fake location that indicates the value is already on the stack? }
       { fake location that indicates the value is already on the stack? }
       if (ref.base=NR_EVAL_STACK_BASE) then
       if (ref.base=NR_EVAL_STACK_BASE) then
@@ -1971,7 +1971,7 @@ implementation
         gen_typecheck(list,a_checkcast,size);
         gen_typecheck(list,a_checkcast,size);
     end;
     end;
 
 
-  function thlcgjvm.loadstoreopcref(def: tdef; isload: boolean; const ref: treference; out finishandval: aint): tasmop;
+  function thlcgjvm.loadstoreopcref(def: tdef; isload: boolean; const ref: treference; out finishandval: tcgint): tasmop;
     const
     const
                      { isload  static }
                      { isload  static }
       getputopc: array[boolean,boolean] of tasmop =
       getputopc: array[boolean,boolean] of tasmop =
@@ -2002,7 +2002,7 @@ implementation
         result:=loadstoreopc(def,isload,ref.arrayreftype<>art_none,finishandval);
         result:=loadstoreopc(def,isload,ref.arrayreftype<>art_none,finishandval);
     end;
     end;
 
 
-  function thlcgjvm.loadstoreopc(def: tdef; isload, isarray: boolean; out finishandval: aint): tasmop;
+  function thlcgjvm.loadstoreopc(def: tdef; isload, isarray: boolean; out finishandval: tcgint): tasmop;
     var
     var
       size: longint;
       size: longint;
     begin
     begin

+ 7 - 0
compiler/link.pas

@@ -1571,9 +1571,16 @@ Implementation
             arfinishcmd : 'gar s $LIB'
             arfinishcmd : 'gar s $LIB'
           );
           );
 
 
+      ar_watcom_wlib_omf_info : tarinfo =
+          ( id          : ar_watcom_wlib_omf;
+            arcmd       : 'wlib -q -fo -c $LIB $FILES';
+            arfinishcmd : ''
+          );
+
 
 
 initialization
 initialization
   RegisterAr(ar_gnu_ar_info);
   RegisterAr(ar_gnu_ar_info);
   RegisterAr(ar_gnu_ar_scripted_info);
   RegisterAr(ar_gnu_ar_scripted_info);
   RegisterAr(ar_gnu_gar_info);
   RegisterAr(ar_gnu_gar_info);
+  RegisterAr(ar_watcom_wlib_omf_info);
 end.
 end.

+ 37 - 30
compiler/nadd.pas

@@ -1067,12 +1067,12 @@ implementation
           operation on a float and int are also handled }
           operation on a float and int are also handled }
 {$ifdef x86}
 {$ifdef x86}
         { use extended as default real type only when the x87 fpu is used }
         { use extended as default real type only when the x87 fpu is used }
-  {$ifdef i386}
+  {$if defined(i386) or defined(i8086)}
         if not(current_settings.fputype=fpu_x87) then
         if not(current_settings.fputype=fpu_x87) then
           resultrealdef:=s64floattype
           resultrealdef:=s64floattype
         else
         else
           resultrealdef:=pbestrealtype^;
           resultrealdef:=pbestrealtype^;
-  {$endif i386}
+  {$endif i386 or i8086}
   {$ifdef x86_64}
   {$ifdef x86_64}
         { x86-64 has no x87 only mode, so use always double as default }
         { x86-64 has no x87 only mode, so use always double as default }
         resultrealdef:=s64floattype;
         resultrealdef:=s64floattype;
@@ -1416,22 +1416,27 @@ implementation
                   if (torddef(rd).ordtype<>u64bit) then
                   if (torddef(rd).ordtype<>u64bit) then
                    inserttypeconv(right,u64inttype);
                    inserttypeconv(right,u64inttype);
                end
                end
-             { 64 bit cpus do calculations always in 64 bit }
-{$ifndef cpu64bitaddr}
-             { is there a cardinal? }
-             else if ((torddef(rd).ordtype=u32bit) or (torddef(ld).ordtype=u32bit)) then
+             { is there a larger int? }
+             else if is_oversizedint(rd) or is_oversizedint(ld) then
+               begin
+                 nd:=get_common_intdef(torddef(ld),torddef(rd),false);
+                 inserttypeconv(right,nd);
+                 inserttypeconv(left,nd);
+               end
+             { is there a native unsigned int? }
+             else if is_nativeuint(rd) or is_nativeuint(ld) then
                begin
                begin
-                 { convert positive constants to u32bit }
-                 if (torddef(ld).ordtype<>u32bit) and
+                 { convert positive constants to uinttype }
+                 if (not is_nativeuint(ld)) and
                     is_constintnode(left) and
                     is_constintnode(left) and
                     (tordconstnode(left).value >= 0) then
                     (tordconstnode(left).value >= 0) then
-                   inserttypeconv(left,u32inttype);
-                 if (torddef(rd).ordtype<>u32bit) and
+                   inserttypeconv(left,uinttype);
+                 if (not is_nativeuint(rd)) and
                     is_constintnode(right) and
                     is_constintnode(right) and
                     (tordconstnode(right).value >= 0) then
                     (tordconstnode(right).value >= 0) then
-                   inserttypeconv(right,u32inttype);
+                   inserttypeconv(right,uinttype);
                  { when one of the operand is signed or the operation is subn then perform
                  { when one of the operand is signed or the operation is subn then perform
-                   the operation in 64bit, can't use rd/ld here because there
+                   the operation in a larger signed type, can't use rd/ld here because there
                    could be already typeconvs inserted.
                    could be already typeconvs inserted.
                    This is compatible with the code below for other unsigned types (PFV) }
                    This is compatible with the code below for other unsigned types (PFV) }
                  if is_signed(left.resultdef) or
                  if is_signed(left.resultdef) or
@@ -1441,7 +1446,7 @@ implementation
                      if nodetype<>subn then
                      if nodetype<>subn then
                        CGMessage(type_h_mixed_signed_unsigned);
                        CGMessage(type_h_mixed_signed_unsigned);
                      { mark as internal in case added for a subn, so }
                      { mark as internal in case added for a subn, so }
-                     { ttypeconvnode.simplify can remove the 64 bit  }
+                     { ttypeconvnode.simplify can remove the larger  }
                      { typecast again if semantically correct. Even  }
                      { typecast again if semantically correct. Even  }
                      { if we could detect that here already, we      }
                      { if we could detect that here already, we      }
                      { mustn't do it here because that would change  }
                      { mustn't do it here because that would change  }
@@ -1451,18 +1456,19 @@ implementation
                          not is_signed(right.resultdef)) or
                          not is_signed(right.resultdef)) or
                         (nodetype in [orn,xorn]) then
                         (nodetype in [orn,xorn]) then
                        include(flags,nf_internal);
                        include(flags,nf_internal);
-                     inserttypeconv(left,s64inttype);
-                     inserttypeconv(right,s64inttype);
+                     { get next larger signed int type }
+                     nd:=get_common_intdef(torddef(sinttype),torddef(uinttype),false);
+                     inserttypeconv(left,nd);
+                     inserttypeconv(right,nd);
                    end
                    end
                  else
                  else
                    begin
                    begin
-                     if (torddef(left.resultdef).ordtype<>u32bit) then
-                       inserttypeconv(left,u32inttype);
-                     if (torddef(right.resultdef).ordtype<>u32bit) then
-                       inserttypeconv(right,u32inttype);
+                     if not is_nativeuint(left.resultdef) then
+                       inserttypeconv(left,uinttype);
+                     if not is_nativeuint(right.resultdef) then
+                       inserttypeconv(right,uinttype);
                    end;
                    end;
                end
                end
-{$endif cpu64bitaddr}
              { generic ord conversion is sinttype }
              { generic ord conversion is sinttype }
              else
              else
                begin
                begin
@@ -1473,15 +1479,8 @@ implementation
                     is_signed(rd) or
                     is_signed(rd) or
                     (nodetype=subn) then
                     (nodetype=subn) then
                    begin
                    begin
-{$ifdef cpunodefaultint}
-                     { for small cpus we use the smallest common type }
-                     nd:=get_common_intdef(torddef(ld),torddef(rd),false);
-                     inserttypeconv(right,nd);
-                     inserttypeconv(left,nd);
-{$else cpunodefaultint}
                      inserttypeconv(right,sinttype);
                      inserttypeconv(right,sinttype);
                      inserttypeconv(left,sinttype);
                      inserttypeconv(left,sinttype);
-{$endif cpunodefaultint}
                    end
                    end
                  else
                  else
                    begin
                    begin
@@ -1568,7 +1567,7 @@ implementation
                         llow:=rlow;
                         llow:=rlow;
                         lhigh:=rhigh;
                         lhigh:=rhigh;
                       end;
                       end;
-                    nd:=tsetdef.create(tsetdef(ld).elementdef,min(llow,rlow),max(lhigh,rhigh));
+                    nd:=tsetdef.create(tsetdef(ld).elementdef,min(llow,rlow).svalue,max(lhigh,rhigh).svalue);
                     inserttypeconv(left,nd);
                     inserttypeconv(left,nd);
                     if (rd.typ=setdef) then
                     if (rd.typ=setdef) then
                       inserttypeconv(right,nd)
                       inserttypeconv(right,nd)
@@ -2847,14 +2846,18 @@ implementation
                   if nodetype in [addn,subn,muln,andn,orn,xorn] then
                   if nodetype in [addn,subn,muln,andn,orn,xorn] then
                     expectloc:=LOC_REGISTER
                     expectloc:=LOC_REGISTER
                   else
                   else
+{$ifdef cpu16bitalu}
+                    expectloc:=LOC_JUMP;
+{$else cpu16bitalu}
                     expectloc:=LOC_FLAGS;
                     expectloc:=LOC_FLAGS;
+{$endif cpu16bitalu}
                end
                end
 {$endif cpuneedsmulhelper}
 {$endif cpuneedsmulhelper}
              { generic s32bit conversion }
              { generic s32bit conversion }
              else
              else
                begin
                begin
 {$ifdef cpuneedsmulhelper}
 {$ifdef cpuneedsmulhelper}
-                 if (nodetype=muln) and not(torddef(resultdef).ordtype in [u8bit,s8bit]) then
+                 if (nodetype=muln) and not(torddef(resultdef).ordtype in [u8bit,s8bit{$ifdef cpu16bitalu},u16bit,s16bit{$endif}]) then
                    begin
                    begin
                      result := nil;
                      result := nil;
 
 
@@ -2883,8 +2886,12 @@ implementation
                   if nodetype in [addn,subn,muln,andn,orn,xorn] then
                   if nodetype in [addn,subn,muln,andn,orn,xorn] then
                     expectloc:=LOC_REGISTER
                     expectloc:=LOC_REGISTER
                   else
                   else
+{$ifdef cpu16bitalu}
+                    expectloc:=LOC_JUMP;
+{$else cpu16bitalu}
                     expectloc:=LOC_FLAGS;
                     expectloc:=LOC_FLAGS;
-               end;
+{$endif cpu16bitalu}
+              end;
            end
            end
 
 
          { left side a setdef, must be before string processing,
          { left side a setdef, must be before string processing,

+ 4 - 3
compiler/ncal.pas

@@ -51,7 +51,8 @@ interface
          cnf_create_failed,      { exception thrown in constructor -> don't call beforedestruction }
          cnf_create_failed,      { exception thrown in constructor -> don't call beforedestruction }
          cnf_objc_processed,     { the procedure name has been set to the appropriate objc_msgSend* variant -> don't process again }
          cnf_objc_processed,     { the procedure name has been set to the appropriate objc_msgSend* variant -> don't process again }
          cnf_objc_id_call,       { the procedure is a member call via id -> any ObjC method of any ObjC type in scope is fair game }
          cnf_objc_id_call,       { the procedure is a member call via id -> any ObjC method of any ObjC type in scope is fair game }
-         cnf_unit_specified      { the unit in which the procedure has to be searched has been specified }
+         cnf_unit_specified,     { the unit in which the procedure has to be searched has been specified }
+         cnf_call_never_returns  { information for the dfa that a subroutine never returns }
        );
        );
        tcallnodeflags = set of tcallnodeflag;
        tcallnodeflags = set of tcallnodeflag;
 
 
@@ -3329,8 +3330,8 @@ implementation
                               That means the for pushes the para with the
                               That means the for pushes the para with the
                               highest offset (see para3) needs to be pushed first
                               highest offset (see para3) needs to be pushed first
                             }
                             }
-{$if defined(i386) or defined(m68k)}
-                            { the i386, m68k and jvm code generators expect all reference }
+{$if defined(i386) or defined(i8086) or defined(m68k)}
+                            { the i386, i8086, m68k and jvm code generators expect all reference }
                             { parameters to be in this order so they can use   }
                             { parameters to be in this order so they can use   }
                             { pushes in case of no fixed stack                 }
                             { pushes in case of no fixed stack                 }
                             if (not paramanager.use_fixed_stack and
                             if (not paramanager.use_fixed_stack and

+ 0 - 89
compiler/ncgflw.pas

@@ -72,10 +72,6 @@ interface
           procedure pass_generate_code;override;
           procedure pass_generate_code;override;
        end;
        end;
 
 
-       tcgraisenode = class(traisenode)
-          procedure pass_generate_code;override;
-       end;
-
        tcgtryexceptnode = class(ttryexceptnode)
        tcgtryexceptnode = class(ttryexceptnode)
           procedure pass_generate_code;override;
           procedure pass_generate_code;override;
        end;
        end;
@@ -949,89 +945,6 @@ implementation
       end;
       end;
 
 
 
 
-{*****************************************************************************
-                             SecondRaise
-*****************************************************************************}
-
-    procedure tcgraisenode.pass_generate_code;
-
-      var
-         a : tasmlabel;
-         href2: treference;
-         paraloc1,paraloc2,paraloc3 : tcgpara;
-         pd : tprocdef;
-      begin
-         location_reset(location,LOC_VOID,OS_NO);
-
-         if assigned(left) then
-           begin
-              pd:=search_system_proc('fpc_raiseexception');
-              paraloc1.init;
-              paraloc2.init;
-              paraloc3.init;
-              paramanager.getintparaloc(pd,1,paraloc1);
-              paramanager.getintparaloc(pd,2,paraloc2);
-              paramanager.getintparaloc(pd,3,paraloc3);
-
-              { multiple parameters? }
-              if assigned(right) then
-                begin
-                  { frame tree }
-                  if assigned(third) then
-                    secondpass(third);
-                  secondpass(right);
-                end;
-              secondpass(left);
-              if codegenerror then
-                exit;
-
-              { Push parameters }
-              if assigned(right) then
-                begin
-                  { frame tree }
-                  if assigned(third) then
-                    cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,third.location,paraloc3)
-                  else
-                    cg.a_load_const_cgpara(current_asmdata.CurrAsmList,OS_ADDR,0,paraloc3);
-                  { push address }
-                  cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
-                end
-              else
-                begin
-                   { get current address }
-                   current_asmdata.getaddrlabel(a);
-                   cg.a_label(current_asmdata.CurrAsmList,a);
-                   reference_reset_symbol(href2,a,0,1);
-                   { push current frame }
-                   cg.a_load_reg_cgpara(current_asmdata.CurrAsmList,OS_ADDR,NR_FRAME_POINTER_REG,paraloc3);
-                   { push current address }
-                   if target_info.system <> system_powerpc_macos then
-                     cg.a_loadaddr_ref_cgpara(current_asmdata.CurrAsmList,href2,paraloc2)
-                   else
-                     cg.a_load_const_cgpara(current_asmdata.CurrAsmList,OS_ADDR,0,paraloc2);
-                end;
-              cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
-              paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
-              paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
-              paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc3);
-              cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RAISEEXCEPTION',false);
-              cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
-
-              paraloc1.done;
-              paraloc2.done;
-              paraloc3.done;
-           end
-         else
-           begin
-              cg.allocallcpuregisters(current_asmdata.CurrAsmList);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPADDRSTACK',false);
-              cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
-              cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
-           end;
-       end;
-
-
 {*****************************************************************************
 {*****************************************************************************
                              SecondTryExcept
                              SecondTryExcept
 *****************************************************************************}
 *****************************************************************************}
@@ -1039,7 +952,6 @@ implementation
     var
     var
        endexceptlabel : tasmlabel;
        endexceptlabel : tasmlabel;
 
 
-
     { does the necessary things to clean up the object stack }
     { does the necessary things to clean up the object stack }
     { in the except block                                    }
     { in the except block                                    }
     procedure cleanupobjectstack;
     procedure cleanupobjectstack;
@@ -1660,7 +1572,6 @@ begin
    ccontinuenode:=tcgcontinuenode;
    ccontinuenode:=tcgcontinuenode;
    cgotonode:=tcggotonode;
    cgotonode:=tcggotonode;
    clabelnode:=tcglabelnode;
    clabelnode:=tcglabelnode;
-   craisenode:=tcgraisenode;
    ctryexceptnode:=tcgtryexceptnode;
    ctryexceptnode:=tcgtryexceptnode;
    ctryfinallynode:=tcgtryfinallynode;
    ctryfinallynode:=tcgtryfinallynode;
    connode:=tcgonnode;
    connode:=tcgonnode;

+ 3 - 0
compiler/ncginl.pas

@@ -59,6 +59,7 @@ interface
           procedure second_setlength; virtual; abstract;
           procedure second_setlength; virtual; abstract;
           procedure second_box; virtual; abstract;
           procedure second_box; virtual; abstract;
           procedure second_popcnt; virtual;
           procedure second_popcnt; virtual;
+          procedure second_seg; virtual; abstract;
        end;
        end;
 
 
 implementation
 implementation
@@ -187,6 +188,8 @@ implementation
                second_box;
                second_box;
             in_popcnt_x:
             in_popcnt_x:
                second_popcnt;
                second_popcnt;
+            in_seg_x:
+               second_seg;
             else internalerror(9);
             else internalerror(9);
          end;
          end;
       end;
       end;

+ 35 - 13
compiler/ncgmat.pas

@@ -179,20 +179,20 @@ implementation
       begin
       begin
         secondpass(left);
         secondpass(left);
         location_reset(location,LOC_REGISTER,left.location.size);
         location_reset(location,LOC_REGISTER,left.location.size);
-        location.register64.reglo:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-        location.register64.reghi:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+        location.register64.reglo:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+        location.register64.reghi:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
         cg64.a_op64_loc_reg(current_asmdata.CurrAsmList,OP_NEG,OS_S64,
         cg64.a_op64_loc_reg(current_asmdata.CurrAsmList,OP_NEG,OS_S64,
           left.location,joinreg64(location.register64.reglo,location.register64.reghi));
           left.location,joinreg64(location.register64.reglo,location.register64.reghi));
         { there's only overflow in case left was low(int64) -> -left = left }
         { there's only overflow in case left was low(int64) -> -left = left }
         if (cs_check_overflow in current_settings.localswitches) then
         if (cs_check_overflow in current_settings.localswitches) then
           begin
           begin
-            tr:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-            cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_INT,
+            tr:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+            cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_XOR,OS_32,
               aint($80000000),location.register64.reghi,tr);
               aint($80000000),location.register64.reghi,tr);
-            cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_INT,
+            cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,
               location.register64.reglo,tr);
               location.register64.reglo,tr);
             current_asmdata.getjumplabel(hl);
             current_asmdata.getjumplabel(hl);
-            cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_NE,0,tr,hl);
+            cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_32,OC_NE,0,tr,hl);
             cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
             cg.a_call_name(current_asmdata.CurrAsmList,'FPC_OVERFLOW',false);
             cg.a_label(current_asmdata.CurrAsmList,hl);
             cg.a_label(current_asmdata.CurrAsmList,hl);
           end;
           end;
@@ -245,7 +245,7 @@ implementation
         if (left.resultdef.size<=sinttype.size) then
         if (left.resultdef.size<=sinttype.size) then
           opsize:=sinttype
           opsize:=sinttype
         else
         else
-          opsize:=s64inttype;
+          opsize:={$ifdef cpu16bitalu}s32inttype{$else}s64inttype{$endif};
 {$endif cpunodefaultint}
 {$endif cpunodefaultint}
         hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,opsize,false);
         hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,opsize,false);
         hlcg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,opsize,location.register,location.register);
         hlcg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,opsize,location.register,location.register);
@@ -304,6 +304,7 @@ implementation
          paraloc1 : tcgpara;
          paraloc1 : tcgpara;
          opsize : tcgsize;
          opsize : tcgsize;
          opdef : tdef;
          opdef : tdef;
+         pd: tprocdef;
       begin
       begin
          secondpass(left);
          secondpass(left);
          if codegenerror then
          if codegenerror then
@@ -384,7 +385,8 @@ implementation
                   current_asmdata.getjumplabel(hl);
                   current_asmdata.getjumplabel(hl);
                   cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_NE,0,hdenom,hl);
                   cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,OS_INT,OC_NE,0,hdenom,hl);
                   paraloc1.init;
                   paraloc1.init;
-                  paramanager.getintparaloc(search_system_proc('fpc_handleerror'),1,paraloc1);
+                  pd:=search_system_proc('fpc_handleerror');
+                  paramanager.getintparaloc(pd,1,paraloc1);
                   cg.a_load_const_cgpara(current_asmdata.CurrAsmList,OS_S32,aint(200),paraloc1);
                   cg.a_load_const_cgpara(current_asmdata.CurrAsmList,OS_S32,aint(200),paraloc1);
                   paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
                   paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
                   cg.a_call_name(current_asmdata.CurrAsmList,'FPC_HANDLEERROR',false);
                   cg.a_call_name(current_asmdata.CurrAsmList,'FPC_HANDLEERROR',false);
@@ -435,14 +437,34 @@ implementation
          { load left operators in a register }
          { load left operators in a register }
          if is_signed(left.resultdef) then
          if is_signed(left.resultdef) then
            begin
            begin
-             opsize:=OS_SINT;
-             opdef:=ossinttype
+             {$ifdef cpu16bitalu}
+               if left.resultdef.size > 2 then
+                 begin
+                   opsize:=OS_S32;
+                   opdef:=s32inttype;
+                 end
+               else
+             {$endif cpu16bitalu}
+                 begin
+                   opsize:=OS_SINT;
+                   opdef:=ossinttype
+                 end;
            end
            end
          else
          else
            begin
            begin
-             opsize:=OS_INT;
-             opdef:=osuinttype;
-           end;
+             {$ifdef cpu16bitalu}
+               if left.resultdef.size > 2 then
+                 begin
+                   opsize:=OS_32;
+                   opdef:=u32inttype;
+                 end
+               else
+             {$endif cpu16bitalu}
+                 begin
+                   opsize:=OS_INT;
+                   opdef:=osuinttype;
+                 end;
+             end;
 {$endif cpunodefaultint}
 {$endif cpunodefaultint}
 
 
          hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,opdef,true);
          hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,opdef,true);

+ 20 - 4
compiler/ncgmem.pas

@@ -721,8 +721,16 @@ implementation
                pd:=search_system_proc('fpc_dynarray_rangecheck');
                pd:=search_system_proc('fpc_dynarray_rangecheck');
                paramanager.getintparaloc(pd,1,paraloc1);
                paramanager.getintparaloc(pd,1,paraloc1);
                paramanager.getintparaloc(pd,2,paraloc2);
                paramanager.getintparaloc(pd,2,paraloc2);
-               cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
-               cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
+               if pd.is_pushleftright then
+                 begin
+                   cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
+                   cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
+                 end
+               else
+                 begin
+                   cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
+                   cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
+                 end;
                paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
                paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
                paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
                paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
                cg.allocallcpuregisters(current_asmdata.CurrAsmList);
                cg.allocallcpuregisters(current_asmdata.CurrAsmList);
@@ -755,8 +763,16 @@ implementation
               pd:=search_system_proc(helpername);
               pd:=search_system_proc(helpername);
               paramanager.getintparaloc(pd,1,paraloc1);
               paramanager.getintparaloc(pd,1,paraloc1);
               paramanager.getintparaloc(pd,2,paraloc2);
               paramanager.getintparaloc(pd,2,paraloc2);
-              cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
-              cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
+              if pd.is_pushleftright then
+                begin
+                  cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
+                  cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
+                end
+              else
+                begin
+                  cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,right.location,paraloc2);
+                  cg.a_load_loc_cgpara(current_asmdata.CurrAsmList,left.location,paraloc1);
+                end;
 
 
               paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
               paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc1);
               paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);
               paramanager.freecgpara(current_asmdata.CurrAsmList,paraloc2);

+ 89 - 6
compiler/ncgset.pas

@@ -626,7 +626,7 @@ implementation
              genitem(t^.less);
              genitem(t^.less);
            if t^._low=t^._high then
            if t^._low=t^._high then
              begin
              begin
-{$ifndef cpu64bitalu}
+{$ifdef cpu32bitalu}
                 if def_cgsize(opsize) in [OS_S64,OS_64] then
                 if def_cgsize(opsize) in [OS_S64,OS_64] then
                   begin
                   begin
                      current_asmdata.getjumplabel(l1);
                      current_asmdata.getjumplabel(l1);
@@ -635,7 +635,26 @@ implementation
                      cg.a_label(current_asmdata.CurrAsmList,l1);
                      cg.a_label(current_asmdata.CurrAsmList,l1);
                   end
                   end
                 else
                 else
-{$endif not cpu64bitalu}
+{$endif cpu32bitalu}
+{$ifdef cpu16bitalu)}
+                if def_cgsize(opsize) in [OS_S64,OS_64] then
+                  begin
+                     current_asmdata.getjumplabel(l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_NE, aint(hi(hi(int64(t^._low.svalue)))),GetNextReg(hregister2),l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_NE, aint(lo(hi(int64(t^._low.svalue)))),hregister2,l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_NE, aint(hi(lo(int64(t^._low.svalue)))),GetNextReg(hregister),l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_EQ, aint(lo(lo(int64(t^._low.svalue)))),hregister, blocklabel(t^.blockid));
+                     cg.a_label(current_asmdata.CurrAsmList,l1);
+                  end
+                else if def_cgsize(opsize) in [OS_S32,OS_32] then
+                  begin
+                     current_asmdata.getjumplabel(l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_NE, aint(hi(int32(t^._low.svalue))),GetNextReg(hregister),l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_EQ, aint(lo(int32(t^._low.svalue))),hregister, blocklabel(t^.blockid));
+                     cg.a_label(current_asmdata.CurrAsmList,l1);
+                  end
+                else
+{$endif cpu16bitalu}
                   begin
                   begin
                      hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, OC_EQ, aint(t^._low.svalue),hregister, blocklabel(t^.blockid));
                      hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, OC_EQ, aint(t^._low.svalue),hregister, blocklabel(t^.blockid));
                   end;
                   end;
@@ -650,7 +669,7 @@ implementation
                 { ELSE-label                                }
                 { ELSE-label                                }
                 if not lastwasrange or (t^._low-last>1) then
                 if not lastwasrange or (t^._low-last>1) then
                   begin
                   begin
-{$ifndef cpu64bitalu}
+{$ifdef cpu32bitalu}
                      if def_cgsize(opsize) in [OS_64,OS_S64] then
                      if def_cgsize(opsize) in [OS_64,OS_S64] then
                        begin
                        begin
                           current_asmdata.getjumplabel(l1);
                           current_asmdata.getjumplabel(l1);
@@ -663,13 +682,46 @@ implementation
                           cg.a_label(current_asmdata.CurrAsmList,l1);
                           cg.a_label(current_asmdata.CurrAsmList,l1);
                        end
                        end
                      else
                      else
-{$endif not cpu64bitalu}
+{$endif cpu32bitalu}
+{$ifdef cpu16bitalu}
+                     if def_cgsize(opsize) in [OS_64,OS_S64] then
+                       begin
+                          current_asmdata.getjumplabel(l1);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_lt, aint(hi(hi(int64(t^._low.svalue)))),
+                               GetNextReg(hregister2), elselabel);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_gt, aint(hi(hi(int64(t^._low.svalue)))),
+                               GetNextReg(hregister2), l1);
+                          { the comparison of the low words must be always unsigned! }
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_B, aint(lo(hi(int64(t^._low.svalue)))),
+                               hregister2, elselabel);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_A, aint(lo(hi(int64(t^._low.svalue)))),
+                               hregister2, l1);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_B, aint(hi(lo(int64(t^._low.svalue)))),
+                               GetNextReg(hregister), elselabel);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_A, aint(hi(lo(int64(t^._low.svalue)))),
+                               GetNextReg(hregister), l1);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_B, aint(lo(lo(int64(t^._low.svalue)))), hregister, elselabel);
+                          cg.a_label(current_asmdata.CurrAsmList,l1);
+                       end
+                     else if def_cgsize(opsize) in [OS_32,OS_S32] then
+                       begin
+                          current_asmdata.getjumplabel(l1);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_lt, aint(hi(int32(t^._low.svalue))),
+                               GetNextReg(hregister), elselabel);
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_gt, aint(hi(int32(t^._low.svalue))),
+                               GetNextReg(hregister), l1);
+                          { the comparisation of the low dword must be always unsigned! }
+                          cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_B, aint(lo(int32(t^._low.svalue))), hregister, elselabel);
+                          cg.a_label(current_asmdata.CurrAsmList,l1);
+                       end
+                     else
+{$endif cpu16bitalu}
                        begin
                        begin
                         hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, jmp_lt, aint(t^._low.svalue), hregister,
                         hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, jmp_lt, aint(t^._low.svalue), hregister,
                            elselabel);
                            elselabel);
                        end;
                        end;
                   end;
                   end;
-{$ifndef cpu64bitalu}
+{$ifdef cpu32bitalu}
                 if def_cgsize(opsize) in [OS_S64,OS_64] then
                 if def_cgsize(opsize) in [OS_S64,OS_64] then
                   begin
                   begin
                      current_asmdata.getjumplabel(l1);
                      current_asmdata.getjumplabel(l1);
@@ -681,7 +733,38 @@ implementation
                     cg.a_label(current_asmdata.CurrAsmList,l1);
                     cg.a_label(current_asmdata.CurrAsmList,l1);
                   end
                   end
                 else
                 else
-{$endif not cpu64bitalu}
+{$endif cpu32bitalu}
+{$ifdef cpu16bitalu}
+                if def_cgsize(opsize) in [OS_S64,OS_64] then
+                  begin
+                     current_asmdata.getjumplabel(l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_lt, aint(hi(hi(int64(t^._high.svalue)))), GetNextReg(hregister2),
+                           blocklabel(t^.blockid));
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_gt, aint(hi(hi(int64(t^._high.svalue)))), GetNextReg(hregister2),
+                           l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_B, aint(lo(hi(int64(t^._high.svalue)))), hregister2,
+                           blocklabel(t^.blockid));
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_A, aint(lo(hi(int64(t^._high.svalue)))), hregister2,
+                           l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_B, aint(hi(lo(int64(t^._high.svalue)))), GetNextReg(hregister),
+                           blocklabel(t^.blockid));
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_A, aint(hi(lo(int64(t^._high.svalue)))), GetNextReg(hregister),
+                           l1);
+                    cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_BE, aint(lo(lo(int64(t^._high.svalue)))), hregister, blocklabel(t^.blockid));
+                    cg.a_label(current_asmdata.CurrAsmList,l1);
+                  end
+                else if def_cgsize(opsize) in [OS_S32,OS_32] then
+                  begin
+                     current_asmdata.getjumplabel(l1);
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_lt, aint(hi(int32(t^._high.svalue))), GetNextReg(hregister),
+                           blocklabel(t^.blockid));
+                     cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, jmp_gt, aint(hi(int32(t^._high.svalue))), GetNextReg(hregister),
+                           l1);
+                    cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, OS_16, OC_BE, aint(lo(int32(t^._high.svalue))), hregister, blocklabel(t^.blockid));
+                    cg.a_label(current_asmdata.CurrAsmList,l1);
+                  end
+                else
+{$endif cpu16bitalu}
                   begin
                   begin
                      hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, jmp_le, aint(t^._high.svalue), hregister, blocklabel(t^.blockid));
                      hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, jmp_le, aint(t^._high.svalue), hregister, blocklabel(t^.blockid));
                   end;
                   end;

+ 29 - 7
compiler/ncgutil.pas

@@ -408,6 +408,14 @@ implementation
 
 
 
 
     procedure new_exception(list:TAsmList;const t:texceptiontemps;exceptlabel:tasmlabel);
     procedure new_exception(list:TAsmList;const t:texceptiontemps;exceptlabel:tasmlabel);
+      const
+{$ifdef cpu16bitaddr}
+        pushexceptaddr_frametype_cgsize = OS_S16;
+        setjmp_result_cgsize = OS_S16;
+{$else cpu16bitaddr}
+        pushexceptaddr_frametype_cgsize = OS_S32;
+        setjmp_result_cgsize = OS_S32;
+{$endif cpu16bitaddr}
       var
       var
         paraloc1,paraloc2,paraloc3 : tcgpara;
         paraloc1,paraloc2,paraloc3 : tcgpara;
         pd: tprocdef;
         pd: tprocdef;
@@ -419,10 +427,20 @@ implementation
         paramanager.getintparaloc(pd,1,paraloc1);
         paramanager.getintparaloc(pd,1,paraloc1);
         paramanager.getintparaloc(pd,2,paraloc2);
         paramanager.getintparaloc(pd,2,paraloc2);
         paramanager.getintparaloc(pd,3,paraloc3);
         paramanager.getintparaloc(pd,3,paraloc3);
-        cg.a_loadaddr_ref_cgpara(list,t.envbuf,paraloc3);
-        cg.a_loadaddr_ref_cgpara(list,t.jmpbuf,paraloc2);
-        { push type of exceptionframe }
-        cg.a_load_const_cgpara(list,OS_S32,1,paraloc1);
+        if pd.is_pushleftright then
+          begin
+            { push type of exceptionframe }
+            cg.a_load_const_cgpara(list,pushexceptaddr_frametype_cgsize,1,paraloc1);
+            cg.a_loadaddr_ref_cgpara(list,t.jmpbuf,paraloc2);
+            cg.a_loadaddr_ref_cgpara(list,t.envbuf,paraloc3);
+          end
+        else
+          begin
+            cg.a_loadaddr_ref_cgpara(list,t.envbuf,paraloc3);
+            cg.a_loadaddr_ref_cgpara(list,t.jmpbuf,paraloc2);
+            { push type of exceptionframe }
+            cg.a_load_const_cgpara(list,pushexceptaddr_frametype_cgsize,1,paraloc1);
+          end;
         paramanager.freecgpara(list,paraloc3);
         paramanager.freecgpara(list,paraloc3);
         paramanager.freecgpara(list,paraloc2);
         paramanager.freecgpara(list,paraloc2);
         paramanager.freecgpara(list,paraloc1);
         paramanager.freecgpara(list,paraloc1);
@@ -440,7 +458,7 @@ implementation
         cg.alloccpuregisters(list,R_INTREGISTER,[RS_FUNCTION_RESULT_REG]);
         cg.alloccpuregisters(list,R_INTREGISTER,[RS_FUNCTION_RESULT_REG]);
 
 
         cg.g_exception_reason_save(list, t.reasonbuf);
         cg.g_exception_reason_save(list, t.reasonbuf);
-        cg.a_cmp_const_reg_label(list,OS_S32,OC_NE,0,cg.makeregsize(list,NR_FUNCTION_RESULT_REG,OS_S32),exceptlabel);
+        cg.a_cmp_const_reg_label(list,setjmp_result_cgsize,OC_NE,0,cg.makeregsize(list,NR_FUNCTION_RESULT_REG,setjmp_result_cgsize),exceptlabel);
         cg.dealloccpuregisters(list,R_INTREGISTER,[RS_FUNCTION_RESULT_REG]);
         cg.dealloccpuregisters(list,R_INTREGISTER,[RS_FUNCTION_RESULT_REG]);
         paraloc1.done;
         paraloc1.done;
         paraloc2.done;
         paraloc2.done;
@@ -1027,10 +1045,14 @@ implementation
                         begin
                         begin
                           unget_para(paraloc^);
                           unget_para(paraloc^);
                           gen_alloc_regloc(list,destloc);
                           gen_alloc_regloc(list,destloc);
-                          cg.a_load_cgparaloc_anyreg(list,OS_32,paraloc^,destloc.register,sizeof(aint));
+                          cg.a_load_cgparaloc_anyreg(list,OS_INT,paraloc^,destloc.register,sizeof(aint));
                           unget_para(paraloc^.Next^);
                           unget_para(paraloc^.Next^);
                           gen_alloc_regloc(list,destloc);
                           gen_alloc_regloc(list,destloc);
-                          cg.a_load_cgparaloc_anyreg(list,OS_32,paraloc^.Next^,destloc.registerhi,sizeof(aint));
+                          {$if defined(cpu16bitalu) or defined(cpu8bitalu)}
+                            cg.a_load_cgparaloc_anyreg(list,OS_INT,paraloc^.Next^,GetNextReg(destloc.register),sizeof(aint));
+                          {$else}
+                            cg.a_load_cgparaloc_anyreg(list,OS_INT,paraloc^.Next^,destloc.registerhi,sizeof(aint));
+                          {$endif}
                         end
                         end
                       else
                       else
                         internalerror(200410105);
                         internalerror(200410105);

+ 1 - 1
compiler/ncnv.pas

@@ -3086,7 +3086,7 @@ implementation
          { convert to a 64bit int (only necessary for 32bit processors) (JM) }
          { convert to a 64bit int (only necessary for 32bit processors) (JM) }
          if resultdef.size > sizeof(aint) then
          if resultdef.size > sizeof(aint) then
            begin
            begin
-             result := ctypeconvnode.create_internal(left,s32inttype);
+             result := ctypeconvnode.create_internal(left,sinttype);
              result := ctypeconvnode.create(result,resultdef);
              result := ctypeconvnode.create(result,resultdef);
              left := nil;
              left := nil;
              firstpass(result);
              firstpass(result);

+ 47 - 18
compiler/nflw.pas

@@ -1937,26 +1937,55 @@ implementation
 
 
 
 
     function traisenode.pass_1 : tnode;
     function traisenode.pass_1 : tnode;
+      var
+        statements : tstatementnode;
+        current_addr : tlabelnode;
+        raisenode : tcallnode;
       begin
       begin
-         result:=nil;
-         include(current_procinfo.flags,pi_do_call);
-         expectloc:=LOC_VOID;
-         if assigned(left) then
-           begin
-              { first para must be a _class_ }
-              firstpass(left);
-              { insert needed typeconvs for addr,frame }
-              if assigned(right) then
-               begin
-                 { addr }
-                 firstpass(right);
-                 { frame }
-                 if assigned(third) then
-                  firstpass(third);
-               end;
-           end;
-      end;
+        result:=internalstatements(statements);
 
 
+        if assigned(left) then
+          begin
+            { first para must be a class }
+            firstpass(left);
+            { insert needed typeconvs for addr,frame }
+            if assigned(right) then
+              begin
+                { addr }
+                firstpass(right);
+                { frame }
+                if assigned(third) then
+                  firstpass(third)
+                else
+                  third:=cpointerconstnode.Create(0,voidpointertype);
+              end
+            else
+              begin
+                right:=cloadparentfpnode.create(current_procinfo.procdef);
+                current_addr:=clabelnode.create(cnothingnode.create,tlabelsym.create('$raiseaddr'));
+                addstatement(statements,current_addr);
+                third:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
+              end;
+
+            raisenode:=ccallnode.createintern('fpc_raiseexception',
+              ccallparanode.create(third,
+              ccallparanode.create(right,
+              ccallparanode.create(left,nil)))
+              );
+            include(raisenode.callnodeflags,cnf_call_never_returns);
+            addstatement(statements,raisenode);
+          end
+        else
+          begin
+            addstatement(statements,ccallnode.createintern('fpc_popaddrstack',nil));
+            raisenode:=ccallnode.createintern('fpc_reraise',nil);
+            include(raisenode.callnodeflags,cnf_call_never_returns);
+            addstatement(statements,raisenode);
+          end;
+        left:=nil;
+        right:=nil;
+        third:=nil;
+      end;
 
 
 {*****************************************************************************
 {*****************************************************************************
                              TTRYEXCEPTNODE
                              TTRYEXCEPTNODE

+ 192 - 84
compiler/ninl.pas

@@ -79,6 +79,9 @@ interface
           function first_assigned: tnode; virtual;
           function first_assigned: tnode; virtual;
           function first_assert: tnode; virtual;
           function first_assert: tnode; virtual;
           function first_popcnt: tnode; virtual;
           function first_popcnt: tnode; virtual;
+          { override these for Seg() support }
+          function typecheck_seg: tnode; virtual;
+          function first_seg: tnode; virtual;
 
 
         private
         private
           function handle_str: tnode;
           function handle_str: tnode;
@@ -156,6 +159,39 @@ implementation
       end;
       end;
 
 
 
 
+    function get_str_int_func(def: tdef): string;
+    var
+      ordtype: tordtype;
+    begin
+      ordtype := torddef(def).ordtype;
+      if not (ordtype in [scurrency,s64bit,u64bit,s32bit,u32bit,s16bit,u16bit,s8bit,u8bit]) then
+        internalerror(2013032603);
+
+      if is_oversizedord(def) then
+        begin
+          case ordtype of
+            scurrency,
+            s64bit: exit('int64');
+            u64bit: exit('qword');
+            s32bit: exit('longint');
+            u32bit: exit('longword');
+            s16bit: exit('smallint');
+            u16bit: exit('word');
+            else
+              internalerror(2013032604);
+          end;
+        end
+      else
+        begin
+          if is_nativeuint(def) then
+            exit('uint')
+          else
+            exit('sint');
+        end;
+      internalerror(2013032605);
+    end;
+
+
     function tinlinenode.handle_str : tnode;
     function tinlinenode.handle_str : tnode;
       var
       var
         lenpara,
         lenpara,
@@ -324,23 +360,11 @@ implementation
           procname:=procname+'enum'
           procname:=procname+'enum'
         else
         else
           case torddef(source.resultdef).ordtype of
           case torddef(source.resultdef).ordtype of
-{$ifdef cpu64bitaddr}
-            u64bit:
-              procname := procname + 'uint';
-{$else}
-            u32bit:
-              procname := procname + 'uint';
-            u64bit:
-              procname := procname + 'qword';
-            scurrency,
-            s64bit:
-              procname := procname + 'int64';
-{$endif}
             pasbool8,pasbool16,pasbool32,pasbool64,
             pasbool8,pasbool16,pasbool32,pasbool64,
             bool8bit,bool16bit,bool32bit,bool64bit:
             bool8bit,bool16bit,bool32bit,bool64bit:
               procname := procname + 'bool';
               procname := procname + 'bool';
             else
             else
-              procname := procname + 'sint';
+              procname := procname + get_str_int_func(source.resultdef);
           end;
           end;
 
 
         { for ansistrings insert the encoding argument }
         { for ansistrings insert the encoding argument }
@@ -530,6 +554,75 @@ implementation
       end;
       end;
 
 
 
 
+    procedure get_read_write_int_func(def: tdef; out func_suffix: string; out readfunctype: tdef);
+    var
+      ordtype: tordtype;
+    begin
+      ordtype := torddef(def).ordtype;
+      if not (ordtype in [s64bit,u64bit,s32bit,u32bit,s16bit,u16bit,s8bit,u8bit]) then
+        internalerror(2013032601);
+
+      if is_oversizedint(def) then
+        begin
+          case ordtype of
+            s64bit:
+              begin
+                func_suffix := 'int64';
+                readfunctype:=s64inttype;
+              end;
+            u64bit :
+              begin
+                func_suffix := 'qword';
+                readfunctype:=u64inttype;
+              end;
+            s32bit:
+              begin
+                func_suffix := 'longint';
+                readfunctype:=s32inttype;
+              end;
+            u32bit :
+              begin
+                func_suffix := 'longword';
+                readfunctype:=u32inttype;
+              end;
+            s16bit:
+              begin
+                func_suffix := 'smallint';
+                readfunctype:=s16inttype;
+              end;
+            u16bit :
+              begin
+                func_suffix := 'word';
+                readfunctype:=u16inttype;
+              end;
+            else
+              internalerror(2013032602);
+          end;
+        end
+      else
+        begin
+          case ordtype of
+            s64bit,
+            s32bit,
+            s16bit,
+            s8bit:
+              begin
+                func_suffix := 'sint';
+                readfunctype := sinttype;
+              end;
+            u64bit,
+            u32bit,
+            u16bit,
+            u8bit:
+              begin
+                func_suffix := 'uint';
+                readfunctype := uinttype;
+              end;
+          end;
+        end;
+    end;
+
+
     function Tinlinenode.handle_text_read_write(filepara,params:Ttertiarynode;var newstatement:Tnode):boolean;
     function Tinlinenode.handle_text_read_write(filepara,params:Ttertiarynode;var newstatement:Tnode):boolean;
 
 
     {Read(ln)/write(ln) for text files.}
     {Read(ln)/write(ln) for text files.}
@@ -546,6 +639,7 @@ implementation
         temp:Ttempcreatenode;
         temp:Ttempcreatenode;
         readfunctype:Tdef;
         readfunctype:Tdef;
         name:string[63];
         name:string[63];
+        func_suffix:string[8];
 
 
     begin
     begin
       para:=Tcallparanode(params);
       para:=Tcallparanode(params);
@@ -615,31 +709,19 @@ implementation
             orddef :
             orddef :
               begin
               begin
                 case Torddef(para.left.resultdef).ordtype of
                 case Torddef(para.left.resultdef).ordtype of
-{$ifdef cpu64bitaddr}
-                  s64bit,
-{$endif cpu64bitaddr}
                   s8bit,
                   s8bit,
                   s16bit,
                   s16bit,
-                  s32bit :
-                    begin
-                      name := procprefixes[do_read]+'sint';
-                      { iso pascal needs a different handler }
-                      if (m_iso in current_settings.modeswitches) and do_read then
-                        name:=name+'_iso';
-                      readfunctype:=sinttype;
-                    end;
-{$ifdef cpu64bitaddr}
-                  u64bit,
-{$endif cpu64bitaddr}
+                  s32bit,
+                  s64bit,
                   u8bit,
                   u8bit,
                   u16bit,
                   u16bit,
-                  u32bit :
+                  u32bit,
+                  u64bit:
                     begin
                     begin
-                      name := procprefixes[do_read]+'uint';
-                      { iso pascal needs a different handler }
+                      get_read_write_int_func(para.left.resultdef,func_suffix,readfunctype);
+                      name := procprefixes[do_read]+func_suffix;
                       if (m_iso in current_settings.modeswitches) and do_read then
                       if (m_iso in current_settings.modeswitches) and do_read then
                         name:=name+'_iso';
                         name:=name+'_iso';
-                      readfunctype:=uinttype;
                     end;
                     end;
                   uchar :
                   uchar :
                     begin
                     begin
@@ -654,24 +736,6 @@ implementation
                       name := procprefixes[do_read]+'widechar';
                       name := procprefixes[do_read]+'widechar';
                       readfunctype:=cwidechartype;
                       readfunctype:=cwidechartype;
                     end;
                     end;
-{$ifndef cpu64bitaddr}
-                  s64bit :
-                    begin
-                      name := procprefixes[do_read]+'int64';
-                      { iso pascal needs a different handler }
-                      if (m_iso in current_settings.modeswitches) and do_read then
-                        name:=name+'_iso';
-                      readfunctype:=s64inttype;
-                    end;
-                  u64bit :
-                    begin
-                      name := procprefixes[do_read]+'qword';
-                      { iso pascal needs a different handler }
-                      if (m_iso in current_settings.modeswitches) and do_read then
-                        name:=name+'_iso';
-                      readfunctype:=u64inttype;
-                    end;
-{$endif not cpu64bitaddr}
                   scurrency:
                   scurrency:
                     begin
                     begin
                       name := procprefixes[do_read]+'currency';
                       name := procprefixes[do_read]+'currency';
@@ -1303,6 +1367,40 @@ implementation
       end;
       end;
 
 
 
 
+    function get_val_int_func(def: tdef): string;
+    var
+      ordtype: tordtype;
+    begin
+      ordtype := torddef(def).ordtype;
+      if not (ordtype in [s64bit,u64bit,s32bit,u32bit,s16bit,u16bit,s8bit,u8bit]) then
+        internalerror(2013032603);
+
+      if is_oversizedint(def) then
+        begin
+          case ordtype of
+            s64bit: exit('int64');
+            u64bit: exit('qword');
+            s32bit: exit('longint');
+            u32bit: exit('longword');
+            s16bit: exit('smallint');
+            u16bit: exit('word');
+            else
+              internalerror(2013032604);
+          end;
+        end
+      else
+        begin
+          case ordtype of
+            s64bit,s32bit,s16bit,s8bit: exit('sint');
+            u64bit,u32bit,u16bit,u8bit: exit('uint');
+            else
+              internalerror(2013032604);
+          end;
+        end;
+      internalerror(2013032605);
+    end;
+
+
     function tinlinenode.handle_val: tnode;
     function tinlinenode.handle_val: tnode;
       var
       var
         procname,
         procname,
@@ -1403,11 +1501,12 @@ implementation
             { we need its resultdef later on }
             { we need its resultdef later on }
             codepara.get_paratype;
             codepara.get_paratype;
           end
           end
-        else if (torddef(codepara.resultdef).ordtype = torddef(ptrsinttype).ordtype) then
+        else if (torddef(codepara.resultdef).ordtype <> torddef(ptrsinttype).ordtype) then
           { because code is a var parameter, it must match types exactly    }
           { because code is a var parameter, it must match types exactly    }
-          { however, since it will return values in [0..255], both longints }
-          { and cardinals are fine. Since the formal code para type is      }
-          { longint, insert a typecoversion to longint for cardinal para's  }
+          { however, since it will return values >= 0, both signed and      }
+          { and unsigned ints of the same size are fine. Since the formal   }
+          { code para type is sinttype, insert a typecoversion to sint for  }
+          { unsigned para's  }
           begin
           begin
             codepara.left := ctypeconvnode.create_internal(codepara.left,ptrsinttype);
             codepara.left := ctypeconvnode.create_internal(codepara.left,ptrsinttype);
             { make it explicit, oterwise you may get a nonsense range }
             { make it explicit, oterwise you may get a nonsense range }
@@ -1423,29 +1522,15 @@ implementation
           orddef:
           orddef:
             begin
             begin
               case torddef(destpara.resultdef).ordtype of
               case torddef(destpara.resultdef).ordtype of
-{$ifdef cpu64bitaddr}
-                s64bit,
-{$endif cpu64bitaddr}
-                s8bit,
-                s16bit,
-                s32bit:
+                s8bit,s16bit,s32bit,s64bit,
+                u8bit,u16bit,u32bit,u64bit:
                   begin
                   begin
-                    suffix := 'sint_';
-                    { we also need a destsize para in this case }
-                    sizepara := ccallparanode.create(cordconstnode.create
-                      (destpara.resultdef.size,s32inttype,true),nil);
+                    suffix := get_val_int_func(destpara.resultdef) + '_';
+                    { we also need a destsize para in the case of sint }
+                    if suffix = 'sint_' then
+                      sizepara := ccallparanode.create(cordconstnode.create
+                        (destpara.resultdef.size,s32inttype,true),nil);
                   end;
                   end;
-{$ifdef cpu64bitaddr}
-                u64bit,
-{$endif cpu64bitaddr}
-                u8bit,
-                u16bit,
-                u32bit:
-                   suffix := 'uint_';
-{$ifndef cpu64bitaddr}
-                s64bit: suffix := 'int64_';
-                u64bit: suffix := 'qword_';
-{$endif not cpu64bitaddr}
                 scurrency: suffix := 'currency_';
                 scurrency: suffix := 'currency_';
                 else
                 else
                   internalerror(200304225);
                   internalerror(200304225);
@@ -2453,6 +2538,7 @@ implementation
       var
       var
          hightree,
          hightree,
          hp        : tnode;
          hp        : tnode;
+         temp_pnode: pnode;
       begin
       begin
         result:=nil;
         result:=nil;
         { when handling writeln "left" contains no valid address }
         { when handling writeln "left" contains no valid address }
@@ -2710,10 +2796,7 @@ implementation
 
 
               in_seg_x :
               in_seg_x :
                 begin
                 begin
-                  if target_info.system in systems_managed_vm then
-                    message(parser_e_feature_unsupported_for_vm);
-                  set_varstate(left,vs_read,[]);
-                  result:=cordconstnode.create(0,s32inttype,false);
+                  result := typecheck_seg;
                 end;
                 end;
 
 
               in_pred_x,
               in_pred_x,
@@ -2986,14 +3069,21 @@ implementation
               in_trunc_real,
               in_trunc_real,
               in_round_real :
               in_round_real :
                 begin
                 begin
-                  set_varstate(left,vs_read,[vsf_must_be_valid]);
+                  { on i8086, the int64 result is returned in a var param, because
+                    it's too big to fit in a register or a pair of registers. In
+                    that case we have 2 parameters and left.nodetype is a callparan. }
+                  if left.nodetype = callparan then
+                    temp_pnode := @tcallparanode(left).left
+                  else
+                    temp_pnode := @left;
+                  set_varstate(temp_pnode^,vs_read,[vsf_must_be_valid]);
                   { for direct float rounding, no best real type cast should be necessary }
                   { for direct float rounding, no best real type cast should be necessary }
-                  if not((left.resultdef.typ=floatdef) and
-                         (tfloatdef(left.resultdef).floattype in [s32real,s64real,s80real,sc80real,s128real])) and
+                  if not((temp_pnode^.resultdef.typ=floatdef) and
+                         (tfloatdef(temp_pnode^.resultdef).floattype in [s32real,s64real,s80real,sc80real,s128real])) and
                      { converting an int64 to double on platforms without }
                      { converting an int64 to double on platforms without }
                      { extended can cause precision loss                  }
                      { extended can cause precision loss                  }
-                     not(left.nodetype in [ordconstn,realconstn]) then
-                    inserttypeconv(left,pbestrealtype^);
+                     not(temp_pnode^.nodetype in [ordconstn,realconstn]) then
+                    inserttypeconv(temp_pnode^,pbestrealtype^);
                   resultdef:=s64inttype;
                   resultdef:=s64inttype;
                 end;
                 end;
 
 
@@ -3469,7 +3559,9 @@ implementation
             internalerror(2000101001);
             internalerror(2000101001);
 
 
           in_seg_x :
           in_seg_x :
-            internalerror(200104046);
+            begin
+              result:=first_seg;
+            end;
 
 
           in_settextbuf_file_x,
           in_settextbuf_file_x,
           in_reset_typedfile,
           in_reset_typedfile,
@@ -3894,6 +3986,22 @@ implementation
        end;
        end;
 
 
 
 
+     function tinlinenode.typecheck_seg: tnode;
+       begin
+         if target_info.system in systems_managed_vm then
+           message(parser_e_feature_unsupported_for_vm);
+         set_varstate(left,vs_read,[]);
+         result:=cordconstnode.create(0,s32inttype,false);
+       end;
+
+
+     function tinlinenode.first_seg: tnode;
+       begin
+         internalerror(200104046);
+         result:=nil;
+       end;
+
+
      function tinlinenode.handle_box: tnode;
      function tinlinenode.handle_box: tnode;
        begin
        begin
          result:=nil;
          result:=nil;

+ 77 - 32
compiler/nmat.pas

@@ -192,6 +192,7 @@ implementation
         else_statements,
         else_statements,
         statements : tstatementnode;
         statements : tstatementnode;
         result_data : ttempcreatenode;
         result_data : ttempcreatenode;
+        nd : torddef;
       begin
       begin
          result:=nil;
          result:=nil;
          typecheckpass(left);
          typecheckpass(left);
@@ -242,18 +243,20 @@ implementation
          { Additionally, do the same for cardinal/qwords and other positive types, but    }
          { Additionally, do the same for cardinal/qwords and other positive types, but    }
          { always in a way that a smaller type is converted to a bigger type              }
          { always in a way that a smaller type is converted to a bigger type              }
          { (webtbs/tw8870)                                                                }
          { (webtbs/tw8870)                                                                }
-         if (rd.ordtype in [u32bit,u64bit]) and
+         if (rd.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
             ((is_constintnode(left) and
             ((is_constintnode(left) and
-              (tordconstnode(left).value >= 0)) or
+              (tordconstnode(left).value >= 0) and
+              (tordconstnode(left).value <= get_max_value(rd))) or
              (not is_signed(ld) and
              (not is_signed(ld) and
               (rd.size >= ld.size))) then
               (rd.size >= ld.size))) then
            begin
            begin
              inserttypeconv(left,right.resultdef);
              inserttypeconv(left,right.resultdef);
              ld:=torddef(left.resultdef);
              ld:=torddef(left.resultdef);
            end;
            end;
-         if (ld.ordtype in [u32bit,u64bit]) and
+         if (ld.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
             ((is_constintnode(right) and
             ((is_constintnode(right) and
-              (tordconstnode(right).value >= 0)) or
+              (tordconstnode(right).value >= 0) and
+              (tordconstnode(right).value <= get_max_value(ld))) or
              (not is_signed(rd) and
              (not is_signed(rd) and
               (ld.size >= rd.size))) then
               (ld.size >= rd.size))) then
           begin
           begin
@@ -273,7 +276,6 @@ implementation
              resultdef:=left.resultdef;
              resultdef:=left.resultdef;
            end
            end
          else
          else
-{$ifndef cpu64bitaddr}
           { when there is one 64bit value, everything is done
           { when there is one 64bit value, everything is done
             in 64bit }
             in 64bit }
           if (is_64bitint(left.resultdef) or
           if (is_64bitint(left.resultdef) or
@@ -296,21 +298,33 @@ implementation
              resultdef:=left.resultdef;
              resultdef:=left.resultdef;
            end
            end
          else
          else
-          { when mixing cardinals and signed numbers, convert everythign to 64bit (JM) }
-          if ((rd.ordtype = u32bit) and
+          { is there a larger than the native int? }
+          if is_oversizedint(ld) or is_oversizedint(rd) then
+           begin
+             nd:=get_common_intdef(ld,rd,false);
+             if (ld.ordtype<>nd.ordtype) then
+               inserttypeconv(left,nd);
+             if (rd.ordtype<>nd.ordtype) then
+               inserttypeconv(right,nd);
+             resultdef:=left.resultdef;
+           end
+         else
+          { when mixing unsigned and signed native ints, convert everything to a larger signed type (JM) }
+          if (is_nativeuint(rd) and
               is_signed(ld)) or
               is_signed(ld)) or
-             ((ld.ordtype = u32bit) and
+             (is_nativeuint(ld) and
               is_signed(rd)) then
               is_signed(rd)) then
            begin
            begin
               CGMessage(type_h_mixed_signed_unsigned);
               CGMessage(type_h_mixed_signed_unsigned);
-              if (ld.ordtype<>s64bit) then
-                inserttypeconv(left,s64inttype);
-              if (rd.ordtype<>s64bit) then
-                inserttypeconv(right,s64inttype);
+              { get a signed int, larger than the native int }
+              nd:=get_common_intdef(torddef(sinttype),torddef(uinttype),false);
+              if (ld.ordtype<>nd.ordtype) then
+                inserttypeconv(left,nd);
+              if (rd.ordtype<>nd.ordtype) then
+                inserttypeconv(right,nd);
               resultdef:=left.resultdef;
               resultdef:=left.resultdef;
            end
            end
          else
          else
-{$endif not cpu64bitaddr}
            begin
            begin
               { Make everything always default singed int }
               { Make everything always default singed int }
               if not(rd.ordtype in [torddef(sinttype).ordtype,torddef(uinttype).ordtype]) then
               if not(rd.ordtype in [torddef(sinttype).ordtype,torddef(uinttype).ordtype]) then
@@ -394,6 +408,13 @@ implementation
         left := nil;
         left := nil;
         right := nil;
         right := nil;
         firstpass(result);
         firstpass(result);
+
+        if result.resultdef.typ<>orddef then
+          internalerror(2013031701);
+        if resultdef.typ<>orddef then
+          internalerror(2013031701);
+        if torddef(result.resultdef).ordtype <> torddef(resultdef).ordtype then
+          inserttypeconv(result,resultdef);
       end;
       end;
 {$else cpuneedsdiv32helper}
 {$else cpuneedsdiv32helper}
       begin
       begin
@@ -604,18 +625,34 @@ implementation
            begin
            begin
              { keep singness of orignal type }
              { keep singness of orignal type }
              if is_signed(left.resultdef) then
              if is_signed(left.resultdef) then
-{$ifdef cpunodefaultint}
-               inserttypeconv(left,nd)
-{$else cpunodefaultint}
-               inserttypeconv(left,s32inttype)
-{$endif cpunodefaultint}
+               begin
+{$if defined(cpunodefaultint)}
+                 inserttypeconv(left,nd)
+{$elseif defined(cpu64bitalu) or defined(cpu32bitalu)}
+                 inserttypeconv(left,s32inttype)
+{$elseif defined(cpu16bitalu)}
+                 if (left.resultdef.size > 2) or (right.resultdef.size > 2) then
+                   inserttypeconv(left,s32inttype)
+                 else
+                   inserttypeconv(left,sinttype);
+{$else}
+                 internalerror(2013031301);
+{$endif}
+               end
              else
              else
                begin
                begin
-{$ifdef cpunodefaultint}
+{$if defined(cpunodefaultint)}
                  inserttypeconv(left,nd)
                  inserttypeconv(left,nd)
-{$else cpunodefaultint}
+{$elseif defined(cpu64bitalu) or defined(cpu32bitalu)}
                  inserttypeconv(left,u32inttype);
                  inserttypeconv(left,u32inttype);
-{$endif cpunodefaultint}
+{$elseif defined(cpu16bitalu)}
+                 if (left.resultdef.size > 2) or (right.resultdef.size > 2) then
+                   inserttypeconv(left,u32inttype)
+                 else
+                   inserttypeconv(left,uinttype);
+{$else}
+                 internalerror(2013031301);
+{$endif}
                end
                end
            end;
            end;
 
 
@@ -755,18 +792,21 @@ implementation
                }
                }
              end
              end
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
-{$ifndef cpu64bitaddr}
-         else if is_64bit(left.resultdef) then
+         else if is_oversizedord(left.resultdef) then
            begin
            begin
-             inserttypeconv(left,s64inttype);
-             resultdef:=left.resultdef
+             if is_64bit(left.resultdef) then
+               inserttypeconv(left,s64inttype)
+             else if is_32bit(left.resultdef) then
+               inserttypeconv(left,s32inttype)
+             else if is_16bit(left.resultdef) then
+               inserttypeconv(left,s16inttype)
+             else
+               internalerror(2013040701);
+             resultdef:=left.resultdef;
            end
            end
-{$endif not cpu64bitaddr}
          else if (left.resultdef.typ=orddef) then
          else if (left.resultdef.typ=orddef) then
            begin
            begin
-{$ifndef cpunodefaultint}
              inserttypeconv(left,sinttype);
              inserttypeconv(left,sinttype);
-{$endif cpunodefaultint}
              resultdef:=left.resultdef
              resultdef:=left.resultdef
            end
            end
          else
          else
@@ -893,14 +933,19 @@ implementation
             result:=left;
             result:=left;
             left:=nil;
             left:=nil;
           end
           end
-{$ifndef cpu64bitaddr}
-        else if is_64bit(left.resultdef) then
+        else if is_oversizedord(left.resultdef) then
           begin
           begin
-            inserttypeconv(left,s64inttype);
+            if is_64bit(left.resultdef) then
+              inserttypeconv(left,s64inttype)
+            else if is_32bit(left.resultdef) then
+              inserttypeconv(left,s32inttype)
+            else if is_16bit(left.resultdef) then
+              inserttypeconv(left,s16inttype)
+            else
+              internalerror(2013040702);
             result:=left;
             result:=left;
             left:=nil;
             left:=nil;
           end
           end
-{$endif not cpu64bitaddr}
         else if (left.resultdef.typ=orddef) then
         else if (left.resultdef.typ=orddef) then
           begin
           begin
             inserttypeconv(left,sinttype);
             inserttypeconv(left,sinttype);

+ 2 - 19
compiler/optdfa.pas

@@ -222,7 +222,8 @@ unit optdfa;
               begin
               begin
                 { last node, not exit or raise node and function? }
                 { last node, not exit or raise node and function? }
                 if assigned(resultnode) and
                 if assigned(resultnode) and
-                  not(node.nodetype in [raisen,exitn]) then
+                  not(node.nodetype=exitn) and
+                  not((node.nodetype=calln) and (cnf_call_never_returns in tcallnode(node).callnodeflags)) then
                   begin
                   begin
                     { if yes, result lifes }
                     { if yes, result lifes }
                     DFASetDiff(l,resultnode.optinfo^.life,n.optinfo^.def);
                     DFASetDiff(l,resultnode.optinfo^.life,n.optinfo^.def);
@@ -499,24 +500,6 @@ unit optdfa;
                   end;
                   end;
               end;
               end;
 
 
-            raisen:
-              begin
-                if not(assigned(node.optinfo^.life)) then
-                  begin
-                    dfainfo.use:[email protected]^.use;
-                    dfainfo.def:[email protected]^.def;
-                    dfainfo.map:=map;
-                    foreachnodestatic(pm_postprocess,traisenode(node).left,@AddDefUse,@dfainfo);
-                    foreachnodestatic(pm_postprocess,traisenode(node).right,@AddDefUse,@dfainfo);
-                    foreachnodestatic(pm_postprocess,traisenode(node).third,@AddDefUse,@dfainfo);
-                    { update node }
-                    l:=node.optinfo^.life;
-                    DFASetIncludeSet(l,node.optinfo^.use);
-                    UpdateLifeInfo(node,l);
-                    printdfainfo(output,node);
-                  end;
-              end;
-
             calln:
             calln:
               begin
               begin
                 if not(assigned(node.optinfo^.def)) and
                 if not(assigned(node.optinfo^.def)) and

+ 13 - 2
compiler/options.pas

@@ -2960,6 +2960,17 @@ begin
   def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
   def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
 {$endif}
 {$endif}
 
 
+{$ifdef i8086}
+  def_system_macro('CPU86');  { Borland compatibility }
+  def_system_macro('CPU87');  { Borland compatibility }
+  def_system_macro('CPU8086');
+  def_system_macro('CPUI8086');
+  def_system_macro('CPU16');
+  def_system_macro('FPC_HAS_TYPE_EXTENDED');
+  def_system_macro('FPC_HAS_TYPE_DOUBLE');
+  def_system_macro('FPC_HAS_TYPE_SINGLE');
+{$endif i8086}
+
   { Set up a default prefix for binutils when cross-compiling }
   { Set up a default prefix for binutils when cross-compiling }
   if source_info.system<>target_info.system then
   if source_info.system<>target_info.system then
     case target_info.system of
     case target_info.system of
@@ -3311,12 +3322,12 @@ if (target_info.abi = abi_eabihf) then
 
 
   if init_settings.fputype<>fpu_none then
   if init_settings.fputype<>fpu_none then
     begin
     begin
-{$if defined(i386)}
+{$if defined(i386) or defined(i8086)}
       def_system_macro('FPC_HAS_TYPE_EXTENDED');
       def_system_macro('FPC_HAS_TYPE_EXTENDED');
 {$endif}
 {$endif}
       def_system_macro('FPC_HAS_TYPE_SINGLE');
       def_system_macro('FPC_HAS_TYPE_SINGLE');
       def_system_macro('FPC_HAS_TYPE_DOUBLE');
       def_system_macro('FPC_HAS_TYPE_DOUBLE');
-{$if not defined(i386) and not defined(x86_64)}
+{$if not defined(i386) and not defined(x86_64) and not defined(i8086)}
       def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
       def_system_macro('FPC_INCLUDE_SOFTWARE_INT64_TO_DOUBLE');
 {$endif}
 {$endif}
 {$if defined(m68k)}
 {$if defined(m68k)}

+ 3 - 2
compiler/optutils.pas

@@ -52,7 +52,7 @@ unit optutils;
     uses
     uses
       verbose,
       verbose,
       optbase,
       optbase,
-      nbas,nflw,nutils,nset;
+      ncal,nbas,nflw,nutils,nset;
 
 
     function TIndexedNodeSet.Add(node : tnode) : boolean;
     function TIndexedNodeSet.Add(node : tnode) : boolean;
       var
       var
@@ -264,7 +264,8 @@ unit optutils;
               begin
               begin
                 { not sure if this is enough (FK) }
                 { not sure if this is enough (FK) }
                 result:=p;
                 result:=p;
-                p.successor:=succ;
+                if not(cnf_call_never_returns in tcallnode(p).callnodeflags) then
+                  p.successor:=succ;
               end;
               end;
             inlinen:
             inlinen:
               begin
               begin

+ 4 - 4
compiler/pdecvar.pas

@@ -1225,9 +1225,9 @@ implementation
           abssym : tabsolutevarsym;
           abssym : tabsolutevarsym;
           pt,hp  : tnode;
           pt,hp  : tnode;
           st     : tsymtable;
           st     : tsymtable;
-          {$ifdef i386}
+          {$if defined(i386) or defined(i8086)}
           tmpaddr : int64;
           tmpaddr : int64;
-          {$endif}
+          {$endif defined(i386) or defined(i8086)}
         begin
         begin
           abssym:=nil;
           abssym:=nil;
           { only allowed for one var }
           { only allowed for one var }
@@ -1268,9 +1268,9 @@ implementation
              else
              else
 {$endif}
 {$endif}
                 abssym.addroffset:=Tordconstnode(pt).value.svalue;
                 abssym.addroffset:=Tordconstnode(pt).value.svalue;
-{$ifdef i386}
+{$if defined(i386) or defined(i8086)}
               abssym.absseg:=false;
               abssym.absseg:=false;
-              if (target_info.system in [system_i386_go32v2,system_i386_watcom]) and
+              if (target_info.system in [system_i386_go32v2,system_i386_watcom,system_i8086_msdos]) and
                   try_to_consume(_COLON) then
                   try_to_consume(_COLON) then
                 begin
                 begin
                   pt.free;
                   pt.free;

+ 2 - 2
compiler/pexpr.pas

@@ -1857,8 +1857,8 @@ implementation
                        arraydef:
                        arraydef:
                          begin
                          begin
                            p2:=comp_expr(true,false);
                            p2:=comp_expr(true,false);
-                           { support SEG:OFS for go32v2 Mem[] }
-                           if (target_info.system in [system_i386_go32v2,system_i386_watcom]) and
+                           { support SEG:OFS for go32v2/msdos Mem[] }
+                           if (target_info.system in [system_i386_go32v2,system_i386_watcom,system_i8086_msdos]) and
                               (p1.nodetype=loadn) and
                               (p1.nodetype=loadn) and
                               assigned(tloadnode(p1).symtableentry) and
                               assigned(tloadnode(p1).symtableentry) and
                               assigned(tloadnode(p1).symtableentry.owner.name) and
                               assigned(tloadnode(p1).symtableentry.owner.name) and

+ 2 - 2
compiler/powerpc64/hlcgcpu.pas

@@ -36,7 +36,7 @@ uses
 type
 type
   thlcgcpu = class(thlcgppcgen)
   thlcgcpu = class(thlcgppcgen)
     procedure a_load_subsetreg_reg(list : TAsmList; subsetsize, tosize: tdef; const sreg: tsubsetregister; destreg: tregister); override;
     procedure a_load_subsetreg_reg(list : TAsmList; subsetsize, tosize: tdef; const sreg: tsubsetregister; destreg: tregister); override;
-    procedure a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: aint; const sreg: tsubsetregister); override;
+    procedure a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: tcgint; const sreg: tsubsetregister); override;
    protected
    protected
     procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tdef; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
     procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tdef; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); override;
   end;
   end;
@@ -86,7 +86,7 @@ implementation
     end;
     end;
 
 
 
 
-  procedure thlcgcpu.a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: aint; const sreg: tsubsetregister);
+  procedure thlcgcpu.a_load_const_subsetreg(list: TAsmlist; tosubsetsize: tdef; a: tcgint; const sreg: tsubsetregister);
     var
     var
       tmpreg : TRegister;
       tmpreg : TRegister;
     begin
     begin

+ 7 - 0
compiler/pp.pas

@@ -25,6 +25,7 @@ program pp;
   possible compiler switches:
   possible compiler switches:
   -----------------------------------------------------------------
   -----------------------------------------------------------------
   CMEM                use cmem unit for better memory debugging
   CMEM                use cmem unit for better memory debugging
+  I8086               generate a compiler for the Intel 8086+
   I386                generate a compiler for the Intel i386+
   I386                generate a compiler for the Intel i386+
   x86_64              generate a compiler for the AMD x86-64 architecture
   x86_64              generate a compiler for the AMD x86-64 architecture
   M68K                generate a compiler for the M68000
   M68K                generate a compiler for the M68000
@@ -62,6 +63,12 @@ program pp;
 {$endif}
 {$endif}
 
 
 { exactly one target CPU must be defined }
 { exactly one target CPU must be defined }
+{$ifdef I8086}
+  {$ifdef CPUDEFINED}
+    {$fatal ONLY one of the switches for the CPU type must be defined}
+  {$endif CPUDEFINED}
+  {$define CPUDEFINED}
+{$endif I8086}
 {$ifdef I386}
 {$ifdef I386}
   {$ifdef CPUDEFINED}
   {$ifdef CPUDEFINED}
     {$fatal ONLY one of the switches for the CPU type must be defined}
     {$fatal ONLY one of the switches for the CPU type must be defined}

+ 145 - 0
compiler/ppc8086.lpi

@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+<CONFIG>
+  <ProjectOptions>
+    <Version Value="9"/>
+    <PathDelim Value="\"/>
+    <General>
+      <Flags>
+        <MainUnitHasUsesSectionForAllUnits Value="False"/>
+        <MainUnitHasCreateFormStatements Value="False"/>
+        <MainUnitHasTitleStatement Value="False"/>
+        <LRSInOutputDirectory Value="False"/>
+      </Flags>
+      <SessionStorage Value="InProjectDir"/>
+      <MainUnit Value="0"/>
+      <Title Value="ppc8086"/>
+    </General>
+    <BuildModes Count="1">
+      <Item1 Name="default" Default="True"/>
+    </BuildModes>
+    <PublishOptions>
+      <Version Value="2"/>
+      <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
+      <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
+    </PublishOptions>
+    <RunParams>
+      <local>
+        <FormatVersion Value="1"/>
+        <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
+      </local>
+    </RunParams>
+    <Units Count="15">
+      <Unit0>
+        <Filename Value="pp.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="pp"/>
+      </Unit0>
+      <Unit1>
+        <Filename Value="i8086\cgcpu.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cgcpu"/>
+      </Unit1>
+      <Unit2>
+        <Filename Value="i8086\cpubase.inc"/>
+        <IsPartOfProject Value="True"/>
+      </Unit2>
+      <Unit3>
+        <Filename Value="i8086\cpuinfo.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cpuinfo"/>
+      </Unit3>
+      <Unit4>
+        <Filename Value="i8086\cpunode.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cpunode"/>
+      </Unit4>
+      <Unit5>
+        <Filename Value="i8086\cpupara.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cpupara"/>
+      </Unit5>
+      <Unit6>
+        <Filename Value="i8086\cpupi.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cpupi"/>
+      </Unit6>
+      <Unit7>
+        <Filename Value="i8086\cputarg.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="cputarg"/>
+      </Unit7>
+      <Unit8>
+        <Filename Value="i8086\hlcgcpu.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="hlcgcpu"/>
+      </Unit8>
+      <Unit9>
+        <Filename Value="i8086\ra8086att.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="ra8086att"/>
+      </Unit9>
+      <Unit10>
+        <Filename Value="i8086\ra8086int.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="ra8086int"/>
+      </Unit10>
+      <Unit11>
+        <Filename Value="i8086\rgcpu.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="rgcpu"/>
+      </Unit11>
+      <Unit12>
+        <Filename Value="i8086\n8086add.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="n8086add"/>
+      </Unit12>
+      <Unit13>
+        <Filename Value="i8086\n8086mat.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="n8086mat"/>
+      </Unit13>
+      <Unit14>
+        <Filename Value="i8086\n8086inl.pas"/>
+        <IsPartOfProject Value="True"/>
+        <UnitName Value="n8086inl"/>
+      </Unit14>
+    </Units>
+  </ProjectOptions>
+  <CompilerOptions>
+    <Version Value="11"/>
+    <PathDelim Value="\"/>
+    <Target>
+      <Filename Value="i8086\pp"/>
+    </Target>
+    <SearchPaths>
+      <IncludeFiles Value="i8086;x86"/>
+      <OtherUnitFiles Value="i8086;x86;systems"/>
+      <UnitOutputDirectory Value="i8086\lazbuild"/>
+    </SearchPaths>
+    <Parsing>
+      <SyntaxOptions>
+        <CStyleOperator Value="False"/>
+        <AllowLabel Value="False"/>
+        <CPPInline Value="False"/>
+        <UseAnsiStrings Value="False"/>
+      </SyntaxOptions>
+    </Parsing>
+    <CodeGeneration>
+      <Optimizations>
+        <OptimizationLevel Value="0"/>
+      </Optimizations>
+    </CodeGeneration>
+    <Other>
+      <Verbosity>
+        <ShowWarn Value="False"/>
+        <ShowNotes Value="False"/>
+        <ShowHints Value="False"/>
+      </Verbosity>
+      <ConfigFile>
+        <StopAfterErrCount Value="50"/>
+      </ConfigFile>
+      <CustomOptions Value="-di8086 -dNOOPT -dEXTDEBUG -gl"/>
+      <CompilerPath Value="$(CompPath)"/>
+    </Other>
+  </CompilerOptions>
+</CONFIG>

+ 9 - 5
compiler/ppu.pas

@@ -183,7 +183,8 @@ const
     { 11 } 64 {'powerpc64'},
     { 11 } 64 {'powerpc64'},
     { 12 } 16 {'avr'},
     { 12 } 16 {'avr'},
     { 13 } 32 {'mipsel'},
     { 13 } 32 {'mipsel'},
-    { 14 } 32 {'jvm'}
+    { 14 } 32 {'jvm'},
+    { 15 } 16 {'i8086'}
     );
     );
   CpuAluBitSize : array[tsystemcpu] of longint =
   CpuAluBitSize : array[tsystemcpu] of longint =
     (
     (
@@ -201,7 +202,8 @@ const
     { 11 } 64 {'powerpc64'},
     { 11 } 64 {'powerpc64'},
     { 12 }  8 {'avr'},
     { 12 }  8 {'avr'},
     { 13 } 32 {'mipsel'},
     { 13 } 32 {'mipsel'},
-    { 14 } 64 {'jvm'}
+    { 14 } 64 {'jvm'},
+    { 15 } 16 {'i8086'}
     );
     );
 {$endif generic_cpu}
 {$endif generic_cpu}
 
 
@@ -812,11 +814,13 @@ begin
       result:=0;
       result:=0;
     end;
     end;
 {$else not generic_cpu}
 {$else not generic_cpu}
-{$ifdef cpu64bitaddr}
+{$if defined(cpu64bitaddr)}
   result:=getint64;
   result:=getint64;
-{$else cpu64bitaddr}
+{$elseif defined(cpu32bitaddr)}
   result:=getlongint;
   result:=getlongint;
-{$endif cpu32bitaddr}
+{$elseif defined(cpu16bitaddr)}
+  result:=getword;
+{$endif}
 {$endif not generic_cpu}
 {$endif not generic_cpu}
 end;
 end;
 
 

+ 3 - 3
compiler/psub.pas

@@ -940,7 +940,7 @@ implementation
       begin
       begin
         tg:=tgobjclass.create;
         tg:=tgobjclass.create;
 
 
-{$if defined(x86) or defined(arm)}
+{$if defined(i386) or defined(x86_64) or defined(arm)}
 {$if defined(arm)}
 {$if defined(arm)}
         { frame and stack pointer must be always the same on arm thumb so it makes no
         { frame and stack pointer must be always the same on arm thumb so it makes no
           sense to fiddle with a frame pointer }
           sense to fiddle with a frame pointer }
@@ -1218,11 +1218,11 @@ implementation
         flowcontrol:=[];
         flowcontrol:=[];
         do_firstpass(code);
         do_firstpass(code);
 
 
-{$ifdef i386}
+{$if defined(i386) or defined(i8086)}
         procdef.fpu_used:=node_resources_fpu(code);
         procdef.fpu_used:=node_resources_fpu(code);
         if procdef.fpu_used>0 then
         if procdef.fpu_used>0 then
           include(flags,pi_uses_fpu);
           include(flags,pi_uses_fpu);
-{$endif i386}
+{$endif i386 or i8086}
 
 
         { Print the node to tree.log }
         { Print the node to tree.log }
         if paraprintnodetree=1 then
         if paraprintnodetree=1 then

+ 5 - 2
compiler/ptype.pas

@@ -1107,8 +1107,11 @@ implementation
               orddef :
               orddef :
                 begin
                 begin
                   if torddef(def).ordtype in [uchar,
                   if torddef(def).ordtype in [uchar,
-                    u8bit,u16bit,
-                    s8bit,s16bit,s32bit,
+                    u8bit,
+                    s8bit,s16bit,
+{$if defined(cpu32bitaddr) or defined(cpu64bitaddr)}
+                    u16bit,s32bit,
+{$endif defined(cpu32bitaddr) or defined(cpu64bitaddr)}
 {$ifdef cpu64bitaddr}
 {$ifdef cpu64bitaddr}
                     u32bit,s64bit,
                     u32bit,s64bit,
 {$endif cpu64bitaddr}
 {$endif cpu64bitaddr}

+ 3 - 3
compiler/scanner.pas

@@ -512,14 +512,14 @@ implementation
                init_settings.packenum:=current_settings.packenum;
                init_settings.packenum:=current_settings.packenum;
                init_settings.setalloc:=current_settings.setalloc;
                init_settings.setalloc:=current_settings.setalloc;
              end;
              end;
-{$ifdef i386}
-           { Default to intel assembler for delphi/tp7 on i386 }
+{$if defined(i386) or defined(i8086)}
+           { Default to intel assembler for delphi/tp7 on i386/i8086 }
            if (m_delphi in current_settings.modeswitches) or
            if (m_delphi in current_settings.modeswitches) or
               (m_tp7 in current_settings.modeswitches) then
               (m_tp7 in current_settings.modeswitches) then
              current_settings.asmmode:=asmmode_i386_intel;
              current_settings.asmmode:=asmmode_i386_intel;
            if changeinit then
            if changeinit then
              init_settings.asmmode:=current_settings.asmmode;
              init_settings.asmmode:=current_settings.asmmode;
-{$endif i386}
+{$endif i386 or i8086}
 
 
            { Exception support explicitly turned on (mainly for macpas, to }
            { Exception support explicitly turned on (mainly for macpas, to }
            { compensate for lack of interprocedural goto support)          }
            { compensate for lack of interprocedural goto support)          }

+ 6 - 0
compiler/symconst.pas

@@ -659,6 +659,12 @@ inherited_objectoptions : tobjectoptions = [oo_has_virtual,oo_has_private,oo_has
    }
    }
    pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
    pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
 {$endif}
 {$endif}
+{$ifdef i8086}
+   { we only take this into account on i386, on other platforms we always
+     push in the same order
+   }
+   pushleftright_pocalls : tproccalloptions = [pocall_register,pocall_pascal];
+{$endif}
 
 
      SymTypeName : array[tsymtyp] of string[12] = (
      SymTypeName : array[tsymtyp] of string[12] = (
        'abstractsym','globalvar','localvar','paravar','fieldvar',
        'abstractsym','globalvar','localvar','paravar','fieldvar',

+ 29 - 8
compiler/symdef.pas

@@ -511,6 +511,7 @@ interface
           procedure check_mark_as_nested;
           procedure check_mark_as_nested;
           procedure init_paraloc_info(side: tcallercallee);
           procedure init_paraloc_info(side: tcallercallee);
           function stack_tainting_parameter(side: tcallercallee): boolean;
           function stack_tainting_parameter(side: tcallercallee): boolean;
+          function is_pushleftright: boolean;
        private
        private
           procedure count_para(p:TObject;arg:pointer);
           procedure count_para(p:TObject;arg:pointer);
           procedure insert_para(p:TObject;arg:pointer);
           procedure insert_para(p:TObject;arg:pointer);
@@ -639,9 +640,9 @@ interface
           procendtai   : tai;
           procendtai   : tai;
           import_nr    : word;
           import_nr    : word;
           extnumber    : word;
           extnumber    : word;
-{$ifdef i386}
+{$if defined(i386) or defined(i8086)}
           fpu_used     : byte;
           fpu_used     : byte;
-{$endif i386}
+{$endif i386 or i8086}
 {$if defined(arm)}
 {$if defined(arm)}
           { the arm paramanager might need to know the total size of the stackframe
           { the arm paramanager might need to know the total size of the stackframe
             to avoid cyclic unit dependencies or global variables, this infomatation is
             to avoid cyclic unit dependencies or global variables, this infomatation is
@@ -911,6 +912,9 @@ interface
        java_procvarbase          : tobjectdef;
        java_procvarbase          : tobjectdef;
 
 
     const
     const
+{$ifdef i8086}
+       pbestrealtype : ^tdef = @s80floattype;
+{$endif}
 {$ifdef i386}
 {$ifdef i386}
        pbestrealtype : ^tdef = @s80floattype;
        pbestrealtype : ^tdef = @s80floattype;
 {$endif}
 {$endif}
@@ -2519,10 +2523,18 @@ implementation
 {$ifdef cpu16bitaddr}
 {$ifdef cpu16bitaddr}
         case filetyp of
         case filetyp of
           ft_text :
           ft_text :
-            savesize:=96;
+            {$ifdef avr}
+              savesize:=96;
+            {$else avr}
+              savesize:=576;
+            {$endif avr}
           ft_typed,
           ft_typed,
           ft_untyped :
           ft_untyped :
-            savesize:=76;
+            {$ifdef avr}
+              savesize:=76;
+            {$else avr}
+              savesize:=316;
+            {$endif avr}
         end;
         end;
 {$endif cpu16bitaddr}
 {$endif cpu16bitaddr}
       end;
       end;
@@ -4130,6 +4142,15 @@ implementation
             end;
             end;
       end;
       end;
 
 
+    function tabstractprocdef.is_pushleftright: boolean;
+      begin
+{$if defined(i8086) or defined(i386)}
+        result:=proccalloption in pushleftright_pocalls;
+{$else}
+        result:=false;
+{$endif}
+      end;
+
 
 
 {***************************************************************************
 {***************************************************************************
                                   TPROCDEF
                                   TPROCDEF
@@ -4157,9 +4178,9 @@ implementation
          import_nr:=0;
          import_nr:=0;
          inlininginfo:=nil;
          inlininginfo:=nil;
          deprecatedmsg:=nil;
          deprecatedmsg:=nil;
-{$ifdef i386}
+{$if defined(i386) or defined(i8086)}
           fpu_used:=maxfpuregs;
           fpu_used:=maxfpuregs;
-{$endif i386}
+{$endif i386 or i8086}
       end;
       end;
 
 
 
 
@@ -4583,9 +4604,9 @@ implementation
           tprocdef(result).import_name:=stringdup(import_name^);
           tprocdef(result).import_name:=stringdup(import_name^);
         tprocdef(result).import_nr:=import_nr;
         tprocdef(result).import_nr:=import_nr;
         tprocdef(result).extnumber:=$ffff;
         tprocdef(result).extnumber:=$ffff;
-{$ifdef i386}
+{$if defined(i386) or defined(i8086)}
         tprocdef(result).fpu_used:=fpu_used;
         tprocdef(result).fpu_used:=fpu_used;
-{$endif i386}
+{$endif i386 or i8086}
         tprocdef(result).visibility:=visibility;
         tprocdef(result).visibility:=visibility;
         tprocdef(result).synthetickind:=synthetickind;
         tprocdef(result).synthetickind:=synthetickind;
         { we need a separate implementation for the copied def }
         { we need a separate implementation for the copied def }

+ 2 - 2
compiler/symsym.pas

@@ -273,9 +273,9 @@ interface
       tabsolutevarsym = class(tabstractvarsym)
       tabsolutevarsym = class(tabstractvarsym)
       public
       public
          abstyp  : absolutetyp;
          abstyp  : absolutetyp;
-{$ifdef i386}
+{$if defined(i386) or defined(i8086)}
          absseg  : boolean;
          absseg  : boolean;
-{$endif i386}
+{$endif defined(i386) or defined(i8086)}
          asmname : pshortstring;
          asmname : pshortstring;
          addroffset : aword;
          addroffset : aword;
          ref     : tpropaccesslist;
          ref     : tpropaccesslist;

+ 7 - 2
compiler/systems.inc

@@ -48,7 +48,8 @@
              cpu_powerpc64,                { 11 }
              cpu_powerpc64,                { 11 }
              cpu_avr,                      { 12 }
              cpu_avr,                      { 12 }
              cpu_mipsel,                   { 13 }
              cpu_mipsel,                   { 13 }
-             cpu_jvm                       { 14 }
+             cpu_jvm,                      { 14 }
+             cpu_i8086                     { 15 }
        );
        );
 
 
        tasmmode= (asmmode_none
        tasmmode= (asmmode_none
@@ -65,6 +66,8 @@
             ,asmmode_x86_64_intel
             ,asmmode_x86_64_intel
             ,asmmode_x86_64_att
             ,asmmode_x86_64_att
             ,asmmode_avr_gas
             ,asmmode_avr_gas
+            ,asmmode_i8086_intel
+            ,asmmode_i8086_att
        );
        );
 
 
      (* IMPORTANT NOTE:
      (* IMPORTANT NOTE:
@@ -155,7 +158,8 @@
              system_jvm_java32,         { 75 }
              system_jvm_java32,         { 75 }
              system_jvm_android32,      { 76 }
              system_jvm_android32,      { 76 }
              system_arm_android,        { 77 }
              system_arm_android,        { 77 }
-             system_i386_android        { 78 }
+             system_i386_android,       { 78 }
+             system_i8086_msdos         { 79 }
        );
        );
 
 
      type
      type
@@ -198,6 +202,7 @@
             ,ar_mpw_ar
             ,ar_mpw_ar
             ,ar_gnu_ar_scripted
             ,ar_gnu_ar_scripted
             ,ar_gnu_gar
             ,ar_gnu_gar
+            ,ar_watcom_wlib_omf
        );
        );
 
 
        tres = (res_none
        tres = (res_none

+ 8 - 4
compiler/systems.pas

@@ -340,7 +340,7 @@ interface
 
 
        cpu2str : array[TSystemCpu] of string[10] =
        cpu2str : array[TSystemCpu] of string[10] =
             ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
             ('','i386','m68k','alpha','powerpc','sparc','vm','ia64','x86_64',
-             'mipseb','arm', 'powerpc64', 'avr', 'mipsel','jvm');
+             'mipseb','arm', 'powerpc64', 'avr', 'mipsel','jvm', 'i8086');
 
 
        abi2str : array[tabi] of string[10] =
        abi2str : array[tabi] of string[10] =
          ('DEFAULT','SYSV','AIX','EABI','ARMEB','EABIHF');
          ('DEFAULT','SYSV','AIX','EABI','ARMEB','EABIHF');
@@ -735,10 +735,10 @@ begin
   when the define is the same as the source cpu then we use the source
   when the define is the same as the source cpu then we use the source
   os, else we pick a default }
   os, else we pick a default }
 {$ifdef i386}
 {$ifdef i386}
-  {$ifdef cpu86}
+  {$ifdef cpui386}
     default_target(source_info.system);
     default_target(source_info.system);
     {$define default_target_set}
     {$define default_target_set}
-  {$else cpu86}
+  {$else cpui386}
    {$ifdef linux}
    {$ifdef linux}
     default_target(system_i386_linux);
     default_target(system_i386_linux);
     {$define default_target_set}
     {$define default_target_set}
@@ -759,7 +759,7 @@ begin
     {$define default_target_set}
     {$define default_target_set}
     default_target(system_i386_android);
     default_target(system_i386_android);
    {$endif}
    {$endif}
-  {$endif cpu86}
+  {$endif cpui386}
   { default is linux }
   { default is linux }
   {$ifndef default_target_set}
   {$ifndef default_target_set}
    default_target(system_i386_linux);
    default_target(system_i386_linux);
@@ -919,6 +919,10 @@ begin
 {$ifdef jvm}
 {$ifdef jvm}
   default_target(system_jvm_java32);
   default_target(system_jvm_java32);
 {$endif jvm}
 {$endif jvm}
+
+{$ifdef i8086}
+  default_target(system_i8086_msdos);
+{$endif i8086}
 end;
 end;
 
 
 
 

+ 2 - 2
compiler/systems/i_android.pas

@@ -162,11 +162,11 @@ unit i_android;
 implementation
 implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef android}
   {$ifdef android}
     set_source_info(system_i386_android_info);
     set_source_info(system_i386_android_info);
   {$endif}
   {$endif}
-{$endif CPU86}
+{$endif CPUI386}
 {$ifdef CPUARM}
 {$ifdef CPUARM}
   {$ifdef android}
   {$ifdef android}
     set_source_info(system_arm_android_info);
     set_source_info(system_arm_android_info);

+ 2 - 2
compiler/systems/i_beos.pas

@@ -105,11 +105,11 @@ unit i_beos;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef cpu86}
+{$ifdef cpui386}
   {$ifdef beos}
   {$ifdef beos}
     {$ifndef haiku}
     {$ifndef haiku}
       set_source_info(system_i386_beos_info);
       set_source_info(system_i386_beos_info);
     {$endif haiku}
     {$endif haiku}
   {$endif beos}
   {$endif beos}
-{$endif cpu86}
+{$endif cpui386}
 end.
 end.

+ 2 - 2
compiler/systems/i_bsd.pas

@@ -951,7 +951,7 @@ unit i_bsd;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef cpu86}
+{$ifdef cpui386}
   {$ifdef FreeBSD}
   {$ifdef FreeBSD}
      set_source_info(system_i386_FreeBSD_info);
      set_source_info(system_i386_FreeBSD_info);
   {$endif}
   {$endif}
@@ -964,7 +964,7 @@ initialization
   {$ifdef Darwin}
   {$ifdef Darwin}
      set_source_info(system_i386_Darwin_info);
      set_source_info(system_i386_Darwin_info);
   {$endif Darwin}
   {$endif Darwin}
-{$endif cpu86}
+{$endif cpui386}
 {$ifdef cpux86_64}
 {$ifdef cpux86_64}
    {$ifdef FreeBSD}
    {$ifdef FreeBSD}
      set_source_info(system_x86_64_FreeBSD_info);
      set_source_info(system_x86_64_FreeBSD_info);

+ 2 - 2
compiler/systems/i_emx.pas

@@ -106,7 +106,7 @@ unit i_emx;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef EMX}
   {$ifdef EMX}
     {$IFNDEF VER1_0}
     {$IFNDEF VER1_0}
       set_source_info(system_i386_emx_info);
       set_source_info(system_i386_emx_info);
@@ -115,5 +115,5 @@ initialization
         source_info.scriptext := '.bat';
         source_info.scriptext := '.bat';
     {$ENDIF VER1_0}
     {$ENDIF VER1_0}
   {$endif EMX}
   {$endif EMX}
-{$endif CPU86}
+{$endif CPUI386}
 end.
 end.

+ 2 - 2
compiler/systems/i_go32v2.pas

@@ -94,9 +94,9 @@ unit i_go32v2;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef cpu86}
+{$ifdef cpui386}
   {$ifdef go32v2}
   {$ifdef go32v2}
     set_source_info(system_i386_go32v2_info);
     set_source_info(system_i386_go32v2_info);
   {$endif go32v2}
   {$endif go32v2}
-{$endif cpu86}
+{$endif cpui386}
 end.
 end.

+ 2 - 2
compiler/systems/i_haiku.pas

@@ -106,9 +106,9 @@ unit i_haiku;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef cpu86}
+{$ifdef cpui386}
   {$ifdef haiku}
   {$ifdef haiku}
     set_source_info(system_i386_haiku_info);
     set_source_info(system_i386_haiku_info);
   {$endif haiku}
   {$endif haiku}
-{$endif cpu86}
+{$endif cpui386}
 end.
 end.

+ 2 - 2
compiler/systems/i_linux.pas

@@ -940,14 +940,14 @@ unit i_linux;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef linux}
   {$ifdef linux}
     { some FreeBSD versions define linux as well }
     { some FreeBSD versions define linux as well }
     {$ifndef FreeBSD}
     {$ifndef FreeBSD}
       set_source_info(system_i386_linux_info);
       set_source_info(system_i386_linux_info);
     {$endif FreeBSD}
     {$endif FreeBSD}
   {$endif}
   {$endif}
-{$endif CPU86}
+{$endif CPUI386}
 {$ifdef CPU68}
 {$ifdef CPU68}
   {$ifdef linux}
   {$ifdef linux}
     set_source_info(system_m68k_linux_info);
     set_source_info(system_m68k_linux_info);

+ 102 - 0
compiler/systems/i_msdos.pas

@@ -0,0 +1,102 @@
+{
+    Copyright (c) 1998-2002 by Peter Vreman
+
+    This unit implements support information structures for MS-DOS
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ****************************************************************************
+}
+{ This unit implements support information structures for go32v2. }
+unit i_msdos;
+
+{$i fpcdefs.inc}
+
+  interface
+
+    uses
+       systems;
+
+    const
+       system_i8086_msdos_info : tsysteminfo =
+          (
+            system       : system_i8086_msdos;
+            name         : 'MS-DOS 16-bit real mode';
+            shortname    : 'MSDOS';
+            flags        : [tf_use_8_3,tf_smartlink_library,tf_smartlink_sections];
+            cpu          : cpu_i8086;
+            unit_env     : 'MSDOSUNITS';
+            extradefines : '';
+            exeext       : '.exe';
+            defext       : '.def';
+            scriptext    : '.bat';
+            smartext     : '.sl';
+            unitext      : '.ppu';
+            unitlibext   : '.ppl';
+            asmext       : '.s';
+            objext       : '.o';
+            resext       : '.res';
+            resobjext    : '.or';
+            sharedlibext : '.dll';
+            staticlibext : '.lib';
+            staticlibprefix : '';
+            sharedlibprefix : '';
+            sharedClibext : '.dll';
+            staticClibext : '.a';
+            staticClibprefix : 'lib';
+            sharedClibprefix : '';
+            importlibprefix : '';
+            importlibext : '.al';
+            Cprefix      : '_';
+            newline      : #13#10;
+            dirsep       : '\';
+            assem        : as_i386_nasmobj;
+            assemextern  : as_i386_nasmobj;
+            link         : nil;
+            linkextern   : nil;
+            ar           : ar_watcom_wlib_omf;
+            res          : res_none;
+            dbg          : dbg_stabs;
+            script       : script_dos;
+            endian       : endian_little;
+            alignment    :
+              (
+                procalign       : 2;
+                loopalign       : 2;
+                jumpalign       : 0;
+                constalignmin   : 0;
+                constalignmax   : 2;
+                varalignmin     : 0;
+                varalignmax     : 2;
+                localalignmin   : 0;
+                localalignmax   : 2;
+                recordalignmin  : 0;
+                recordalignmax  : 2;
+                maxCrecordalign : 2
+              );
+            first_parm_offset : 4;
+            stacksize    : 4096;
+            stackalign   : 2;
+            abi          : abi_default;
+          );
+
+  implementation
+
+initialization
+{$ifdef cpu8086}
+  {$ifdef dos16}
+    set_source_info(system_i8086_msdos_info);
+  {$endif dos16}
+{$endif cpu8086}
+end.

+ 2 - 2
compiler/systems/i_nativent.pas

@@ -99,9 +99,9 @@ unit i_nativent;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef NATIVENT}
   {$ifdef NATIVENT}
     set_source_info(system_i386_nativent_info);
     set_source_info(system_i386_nativent_info);
   {$endif NATIVENT}
   {$endif NATIVENT}
-{$endif CPU86}
+{$endif CPUI386}
 end.
 end.

+ 2 - 2
compiler/systems/i_nwl.pas

@@ -94,9 +94,9 @@ unit i_nwl;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef netwlibc}
   {$ifdef netwlibc}
     set_source_info(system_i386_netwlibc_info);
     set_source_info(system_i386_netwlibc_info);
   {$endif netwlibc}
   {$endif netwlibc}
-{$endif CPU86}
+{$endif CPUI386}
 end.
 end.

+ 2 - 2
compiler/systems/i_nwm.pas

@@ -94,9 +94,9 @@ unit i_nwm;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef netware}
   {$ifdef netware}
     set_source_info(system_i386_netware_info);
     set_source_info(system_i386_netware_info);
   {$endif netware}
   {$endif netware}
-{$endif CPU86}
+{$endif CPUI386}
 end.
 end.

+ 2 - 2
compiler/systems/i_os2.pas

@@ -106,7 +106,7 @@ unit i_os2;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef os2}
   {$ifdef os2}
     {$IFNDEF EMX}
     {$IFNDEF EMX}
       set_source_info(system_i386_os2_info);
       set_source_info(system_i386_os2_info);
@@ -115,5 +115,5 @@ initialization
       set_source_info(system_i386_os2_info);
       set_source_info(system_i386_os2_info);
     {$ENDIF VER1_0}
     {$ENDIF VER1_0}
   {$endif os2}
   {$endif os2}
-{$endif CPU86}
+{$endif CPUI386}
 end.
 end.

+ 2 - 2
compiler/systems/i_sunos.pas

@@ -230,11 +230,11 @@ unit i_sunos;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef solaris}
   {$ifdef solaris}
     set_source_info(system_i386_solaris_info);
     set_source_info(system_i386_solaris_info);
   {$endif solaris}
   {$endif solaris}
-{$endif CPU86}
+{$endif CPUI386}
 {$ifdef CPUX86_64}
 {$ifdef CPUX86_64}
   {$ifdef solaris}
   {$ifdef solaris}
     set_source_info(system_x86_64_solaris_info);
     set_source_info(system_x86_64_solaris_info);

+ 2 - 2
compiler/systems/i_symbian.pas

@@ -161,11 +161,11 @@ implementation
 
 
 initialization
 initialization
 
 
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef Symbian}
   {$ifdef Symbian}
   set_source_info(system_i386_symbian_info);
   set_source_info(system_i386_symbian_info);
   {$endif Symbian}
   {$endif Symbian}
-{$endif CPU86}
+{$endif CPUI386}
 
 
 {$ifdef CPUARM}
 {$ifdef CPUARM}
   {$ifdef Symbian}
   {$ifdef Symbian}

+ 2 - 2
compiler/systems/i_watcom.pas

@@ -94,9 +94,9 @@ unit i_watcom;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef cpu86}
+{$ifdef cpui386}
   {$ifdef watcom}
   {$ifdef watcom}
     set_source_info(system_i386_watcom_info);
     set_source_info(system_i386_watcom_info);
   {$endif watcom}
   {$endif watcom}
-{$endif cpu86}
+{$endif cpui386}
 end.
 end.

+ 2 - 2
compiler/systems/i_wdosx.pas

@@ -94,11 +94,11 @@ unit i_wdosx;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef WIN32}
   {$ifdef WIN32}
     {$ifdef WDOSX}
     {$ifdef WDOSX}
       set_source_info(system_i386_wdosx_info);
       set_source_info(system_i386_wdosx_info);
     {$endif WDOSX}
     {$endif WDOSX}
   {$endif WIN32}
   {$endif WIN32}
-{$endif CPU86}
+{$endif CPUI386}
 end.
 end.

+ 2 - 2
compiler/systems/i_win.pas

@@ -297,7 +297,7 @@ unit i_win;
   implementation
   implementation
 
 
 initialization
 initialization
-{$ifdef CPU86}
+{$ifdef CPUI386}
   {$ifdef WIN32}
   {$ifdef WIN32}
     {$ifndef WDOSX}
     {$ifndef WDOSX}
       set_source_info(system_i386_win32_info);
       set_source_info(system_i386_win32_info);
@@ -306,7 +306,7 @@ initialization
   {$ifdef WINCE}
   {$ifdef WINCE}
     set_source_info(system_i386_wince_info);
     set_source_info(system_i386_wince_info);
   {$endif WINCE}
   {$endif WINCE}
-{$endif CPU86}
+{$endif CPUI386}
 
 
 {$ifdef CPUX86_64}
 {$ifdef CPUX86_64}
   {$ifdef WIN64}
   {$ifdef WIN64}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio