Ver código fonte

Rebase to revision 19078 (directly before the merge of cpstrnew)

The changes regarding pretty names for generics and token buffer endianess were integrated into my changes. Not every call to generate_specialization is fixed though, so compilation will fail.

git-svn-id: branches/svenbarth/generics@19674 -
svenbarth 13 anos atrás
pai
commit
461d231daa
100 arquivos alterados com 5459 adições e 3272 exclusões
  1. 104 5
      .gitattributes
  2. 14 168
      Makefile
  3. 1 1
      Makefile.fpc
  4. 22 169
      compiler/Makefile
  5. 13 3
      compiler/Makefile.fpc
  6. 5 0
      compiler/aasmbase.pas
  7. 7 4
      compiler/aasmdata.pas
  8. 244 11
      compiler/aasmtai.pas
  9. 50 17
      compiler/aggas.pas
  10. 0 27
      compiler/alpha/cpubase.pas
  11. 0 2
      compiler/arm/agarmgas.pas
  12. 5 1
      compiler/arm/aoptcpu.pas
  13. 3 1
      compiler/arm/armatt.inc
  14. 2 0
      compiler/arm/armatts.inc
  15. 3 0
      compiler/arm/armins.dat
  16. 3 1
      compiler/arm/armop.inc
  17. 10 3
      compiler/arm/cgcpu.pas
  18. 0 33
      compiler/arm/cpubase.pas
  19. 865 44
      compiler/arm/cpuinfo.pas
  20. 50 11
      compiler/arm/narmset.pas
  21. 23 0
      compiler/arm/rgcpu.pas
  22. 2 0
      compiler/assemble.pas
  23. 173 1
      compiler/avr/aasmcpu.pas
  24. 63 17
      compiler/avr/cgcpu.pas
  25. 13 33
      compiler/avr/cpubase.pas
  26. 88 24
      compiler/avr/cpuinfo.pas
  27. 33 4
      compiler/avr/raavrgas.pas
  28. 1 1
      compiler/cclasses.pas
  29. 12 5
      compiler/cgobj.pas
  30. 13 12
      compiler/comphook.pas
  31. 30 1
      compiler/compiler.pas
  32. 13 5
      compiler/comprsrc.pas
  33. 3 0
      compiler/dbgbase.pas
  34. 16 26
      compiler/dbgstabs.pas
  35. 14 7
      compiler/fmodule.pas
  36. 4 4
      compiler/fppu.pas
  37. 7 5
      compiler/globals.pas
  38. 7 0
      compiler/globtype.pas
  39. 56 30
      compiler/htypechk.pas
  40. 0 26
      compiler/i386/cpubase.inc
  41. 2 0
      compiler/i386/i386att.inc
  42. 2 0
      compiler/i386/i386atts.inc
  43. 2 0
      compiler/i386/i386int.inc
  44. 1 1
      compiler/i386/i386nop.inc
  45. 2 0
      compiler/i386/i386op.inc
  46. 20 18
      compiler/i386/i386prop.inc
  47. 1217 1203
      compiler/i386/i386tab.inc
  48. 0 33
      compiler/mips/cpubase.pas
  49. 195 158
      compiler/msg/errord.msg
  50. 133 49
      compiler/msg/errordu.msg
  51. 36 11
      compiler/msg/errore.msg
  52. 13 5
      compiler/msgidx.inc
  53. 466 454
      compiler/msgtxt.inc
  54. 240 172
      compiler/nadd.pas
  55. 17 17
      compiler/nbas.pas
  56. 17 2
      compiler/ncal.pas
  57. 11 4
      compiler/ncgadd.pas
  58. 31 11
      compiler/ncgutil.pas
  59. 4 1
      compiler/ncnv.pas
  60. 3 3
      compiler/ncon.pas
  61. 10 1
      compiler/nld.pas
  62. 36 0
      compiler/nmem.pas
  63. 7 2
      compiler/nobj.pas
  64. 22 0
      compiler/nutils.pas
  65. 6 4
      compiler/ogbase.pas
  66. 20 5
      compiler/ogcoff.pas
  67. 16 1
      compiler/options.pas
  68. 1 1
      compiler/parser.pas
  69. 39 7
      compiler/pbase.pas
  70. 2 2
      compiler/pdecl.pas
  71. 1 0
      compiler/pdecobj.pas
  72. 5 0
      compiler/pdecsub.pas
  73. 22 6
      compiler/pdecvar.pas
  74. 109 6
      compiler/pexpr.pas
  75. 27 8
      compiler/pgenutil.pas
  76. 159 78
      compiler/pmodules.pas
  77. 5 5
      compiler/powerpc/cgcpu.pas
  78. 1 1
      compiler/pp.lpi
  79. 13 8
      compiler/ppcarm.lpi
  80. 1 1
      compiler/ppcavr.lpi
  81. 0 11
      compiler/ppcgen/cgppc.pas
  82. 62 49
      compiler/ppu.pas
  83. 9 7
      compiler/ppx86_64.lpi
  84. 9 14
      compiler/pstatmnt.pas
  85. 9 2
      compiler/psub.pas
  86. 1 0
      compiler/psystem.pas
  87. 29 4
      compiler/ptconst.pas
  88. 4 3
      compiler/ptype.pas
  89. 29 16
      compiler/rautils.pas
  90. 26 0
      compiler/rgobj.pas
  91. 11 0
      compiler/scandir.pas
  92. 138 24
      compiler/scanner.pas
  93. 1 55
      compiler/sparc/cpubase.pas
  94. 1 12
      compiler/sparc/ncpucnv.pas
  95. 6 3
      compiler/symconst.pas
  96. 51 21
      compiler/symdef.pas
  97. 59 0
      compiler/symsym.pas
  98. 122 68
      compiler/symtable.pas
  99. 5 2
      compiler/symtype.pas
  100. 1 1
      compiler/systems.pas

+ 104 - 5
.gitattributes

@@ -665,6 +665,7 @@ compiler/x86_64/r8664std.inc svneol=native#text/plain
 compiler/x86_64/rax64att.pas svneol=native#text/plain
 compiler/x86_64/rax64int.pas svneol=native#text/plain
 compiler/x86_64/rgcpu.pas svneol=native#text/plain
+compiler/x86_64/win64unw.pas svneol=native#text/plain
 compiler/x86_64/x8664ats.inc svneol=native#text/plain
 compiler/x86_64/x8664att.inc svneol=native#text/plain
 compiler/x86_64/x8664int.inc svneol=native#text/plain
@@ -1015,6 +1016,7 @@ packages/chm/src/paslzx.pas svneol=native#text/plain
 packages/chm/src/paslzxcomp.pas svneol=native#text/plain
 packages/cocoaint/Makefile svneol=native#text/plain
 packages/cocoaint/Makefile.fpc svneol=native#text/plain
+packages/cocoaint/fpmake.pp svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsCoredata.pas svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsQuartzcore.pas svneol=native#text/plain
 packages/cocoaint/src/AnonClassDefinitionsWebkit.pas svneol=native#text/plain
@@ -1636,6 +1638,7 @@ packages/fastcgi/fpmake.pp svneol=native#text/plain
 packages/fastcgi/src/fastcgi.pp svneol=native#text/plain
 packages/fcl-async/Makefile svneol=native#text/plain
 packages/fcl-async/Makefile.fpc svneol=native#text/plain
+packages/fcl-async/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-async/fpmake.pp svneol=native#text/plain
 packages/fcl-async/src/fpasync.pp svneol=native#text/plain
 packages/fcl-async/src/libasync.inc svneol=native#text/plain
@@ -1643,6 +1646,7 @@ packages/fcl-async/src/libasynch.inc svneol=native#text/plain
 packages/fcl-async/src/unix/libasync.pp svneol=native#text/plain
 packages/fcl-base/Makefile svneol=native#text/plain
 packages/fcl-base/Makefile.fpc svneol=native#text/plain
+packages/fcl-base/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-base/examples/Makefile svneol=native#text/plain
 packages/fcl-base/examples/Makefile.fpc svneol=native#text/plain
 packages/fcl-base/examples/README.txt svneol=native#text/plain
@@ -1876,6 +1880,7 @@ packages/fcl-db/src/dbase/tdbf_l.pas svneol=native#text/plain
 packages/fcl-db/src/dbase/testdbf.pp svneol=native#text/plain
 packages/fcl-db/src/export/Makefile svneol=native#text/plain
 packages/fcl-db/src/export/Makefile.fpc svneol=native#text/plain
+packages/fcl-db/src/export/XMLXSDExportReadme.TXT svneol=native#text/plain
 packages/fcl-db/src/export/fpcsvexport.pp svneol=native#text/plain
 packages/fcl-db/src/export/fpdbexport.pp svneol=native#text/plain
 packages/fcl-db/src/export/fpdbfexport.pp svneol=native#text/plain
@@ -1886,6 +1891,7 @@ packages/fcl-db/src/export/fpsimplexmlexport.pp svneol=native#text/plain
 packages/fcl-db/src/export/fpsqlexport.pp svneol=native#text/plain
 packages/fcl-db/src/export/fpstdexports.pp svneol=native#text/plain
 packages/fcl-db/src/export/fptexexport.pp svneol=native#text/plain
+packages/fcl-db/src/export/fpxmlxsdexport.pp svneol=native#text/plain
 packages/fcl-db/src/memds/Makefile svneol=native#text/plain
 packages/fcl-db/src/memds/Makefile.fpc svneol=native#text/plain
 packages/fcl-db/src/memds/README.txt svneol=native#text/plain
@@ -1972,7 +1978,12 @@ packages/fcl-db/src/sqlite/testds.pas svneol=native#text/plain
 packages/fcl-db/tests/Makefile -text
 packages/fcl-db/tests/Makefile.fpc -text
 packages/fcl-db/tests/README.txt svneol=native#text/plain
+packages/fcl-db/tests/XMLXSDExportTest.lpi svneol=native#text/plain
+packages/fcl-db/tests/XMLXSDExportTest.lpr svneol=native#text/plain
 packages/fcl-db/tests/database.ini.txt svneol=native#text/plain
+packages/fcl-db/tests/dbfexporttest.lpi svneol=native#text/plain
+packages/fcl-db/tests/dbfexporttest.lpr svneol=native#text/plain
+packages/fcl-db/tests/dbfexporttestcase1.pas svneol=native#text/plain
 packages/fcl-db/tests/dbftoolsunit.pas svneol=native#text/plain
 packages/fcl-db/tests/dbtestframework.pas svneol=native#text/plain
 packages/fcl-db/tests/memdstoolsunit.pas svneol=native#text/plain
@@ -1993,8 +2004,10 @@ packages/fcl-db/tests/testsqlscanner.lpi svneol=native#text/plain
 packages/fcl-db/tests/testsqlscanner.lpr svneol=native#text/plain
 packages/fcl-db/tests/testsqlscript.pas svneol=native#text/plain
 packages/fcl-db/tests/toolsunit.pas svneol=native#text/plain
+packages/fcl-db/tests/xmlxsdexporttestcase1.pas svneol=native#text/plain
 packages/fcl-extra/Makefile svneol=native#text/plain
 packages/fcl-extra/Makefile.fpc svneol=native#text/plain
+packages/fcl-extra/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-extra/examples/Makefile svneol=native#text/plain
 packages/fcl-extra/examples/Makefile.fpc svneol=native#text/plain
 packages/fcl-extra/examples/daemon.pp svneol=native#text/plain
@@ -2051,6 +2064,7 @@ packages/fcl-fpcunit/src/xmlreporter.pas svneol=native#text/plain
 packages/fcl-fpcunit/src/xmltestreport.pp svneol=native#text/plain
 packages/fcl-image/Makefile svneol=native#text/plain
 packages/fcl-image/Makefile.fpc svneol=native#text/plain
+packages/fcl-image/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-image/examples/Makefile svneol=native#text/plain
 packages/fcl-image/examples/Makefile.fpc svneol=native#text/plain
 packages/fcl-image/examples/drawing.pp svneol=native#text/plain
@@ -2112,6 +2126,7 @@ packages/fcl-image/src/targacmn.pp svneol=native#text/plain
 packages/fcl-image/src/xwdfile.pp svneol=native#text/plain
 packages/fcl-js/Makefile svneol=native#text/plain
 packages/fcl-js/Makefile.fpc svneol=native#text/plain
+packages/fcl-js/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-js/README.TXT svneol=native#text/plain
 packages/fcl-js/fpmake.pp svneol=native#text/plain
 packages/fcl-js/src/jsbase.pp svneol=native#text/plain
@@ -2127,6 +2142,7 @@ packages/fcl-js/tests/testjs.manifest svneol=native#text/plain
 packages/fcl-js/tests/testjs.rc svneol=native#text/plain
 packages/fcl-json/Makefile svneol=native#text/plain
 packages/fcl-json/Makefile.fpc svneol=native#text/plain
+packages/fcl-json/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-json/examples/confdemo.lpi svneol=native#text/plain
 packages/fcl-json/examples/confdemo.pp svneol=native#text/plain
 packages/fcl-json/examples/demoformat.pp svneol=native#text/plain
@@ -2152,6 +2168,7 @@ packages/fcl-json/tests/testjsonparser.pp svneol=native#text/plain
 packages/fcl-json/tests/testjsonrtti.pp svneol=native#text/plain
 packages/fcl-net/Makefile svneol=native#text/plain
 packages/fcl-net/Makefile.fpc svneol=native#text/plain
+packages/fcl-net/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-net/README.txt svneol=native#text/plain
 packages/fcl-net/examples/Makefile svneol=native#text/plain
 packages/fcl-net/examples/Makefile.fpc svneol=native#text/plain
@@ -2183,6 +2200,7 @@ packages/fcl-net/src/unix/resolve.inc svneol=native#text/plain
 packages/fcl-net/src/win/resolve.inc svneol=native#text/plain
 packages/fcl-passrc/Makefile svneol=native#text/plain
 packages/fcl-passrc/Makefile.fpc svneol=native#text/plain
+packages/fcl-passrc/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-passrc/examples/test_parser.pp svneol=native#text/plain
 packages/fcl-passrc/examples/testunit1.pp svneol=native#text/plain
 packages/fcl-passrc/fpmake.pp svneol=native#text/plain
@@ -2216,6 +2234,7 @@ packages/fcl-process/src/wince/process.inc svneol=native#text/plain
 packages/fcl-process/src/wince/simpleipc.inc svneol=native#text/plain
 packages/fcl-registry/Makefile svneol=native#text/plain
 packages/fcl-registry/Makefile.fpc svneol=native#text/plain
+packages/fcl-registry/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-registry/fpmake.pp svneol=native#text/plain
 packages/fcl-registry/src/regdef.inc svneol=native#text/plain
 packages/fcl-registry/src/regini.inc svneol=native#text/plain
@@ -2229,6 +2248,7 @@ packages/fcl-registry/tests/regtestframework.pp -text
 packages/fcl-registry/tests/testbasics.pp svneol=native#text/plain
 packages/fcl-res/Makefile svneol=native#text/plain
 packages/fcl-res/Makefile.fpc svneol=native#text/plain
+packages/fcl-res/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-res/fpmake.pp svneol=native#text/plain
 packages/fcl-res/src/acceleratorsresource.pp svneol=native#text/plain
 packages/fcl-res/src/bitmapresource.pp svneol=native#text/plain
@@ -2310,6 +2330,11 @@ packages/fcl-stl/Makefile.fpc svneol=native#text/plain
 packages/fcl-stl/doc/arrayutils.tex svneol=native#text/plain
 packages/fcl-stl/doc/deque.tex svneol=native#text/plain
 packages/fcl-stl/doc/dequeexample.pp svneol=native#text/plain
+packages/fcl-stl/doc/hashmap.tex svneol=native#text/plain
+packages/fcl-stl/doc/hashmapexample.pp svneol=native#text/plain
+packages/fcl-stl/doc/hashset.tex svneol=native#text/plain
+packages/fcl-stl/doc/hashsetexample.pp svneol=native#text/plain
+packages/fcl-stl/doc/main.pdf -text
 packages/fcl-stl/doc/main.tex svneol=native#text/plain
 packages/fcl-stl/doc/makra.tex svneol=native#text/plain
 packages/fcl-stl/doc/map.tex svneol=native#text/plain
@@ -2326,6 +2351,7 @@ packages/fcl-stl/doc/stackexample.pp svneol=native#text/plain
 packages/fcl-stl/doc/util.tex svneol=native#text/plain
 packages/fcl-stl/doc/vector.tex svneol=native#text/plain
 packages/fcl-stl/doc/vectorexample.pp svneol=native#text/plain
+packages/fcl-stl/fpmake.pp svneol=native#text/pascal
 packages/fcl-stl/src/garrayutils.pp svneol=native#text/plain
 packages/fcl-stl/src/gdeque.pp svneol=native#text/plain
 packages/fcl-stl/src/ghashmap.pp svneol=native#text/plain
@@ -2627,6 +2653,7 @@ packages/fcl-web/src/base/fphttp.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphttpapp.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphttpclient.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphttpserver.pp svneol=native#text/plain
+packages/fcl-web/src/base/fphttpstatus.pas svneol=native#text/plain
 packages/fcl-web/src/base/fpweb.pp svneol=native#text/plain
 packages/fcl-web/src/base/fpwebfile.pp svneol=native#text/plain
 packages/fcl-web/src/base/httpdefs.pp svneol=native#text/plain
@@ -2869,6 +2896,7 @@ packages/gmp/examples/printf_example.pas svneol=native#text/plain
 packages/gmp/examples/printf_example2.pas svneol=native#text/plain
 packages/gmp/examples/scanf_example.pas svneol=native#text/plain
 packages/gmp/examples/scanf_example2.pas svneol=native#text/plain
+packages/gmp/fpmake.pp svneol=native#text/plain
 packages/gmp/readme svneol=native#text/plain
 packages/gmp/src/gmp.pas svneol=native#text/plain
 packages/gnome1/Makefile svneol=native#text/plain
@@ -3647,7 +3675,7 @@ packages/hash/src/unixcrypt.pas svneol=native#text/plain
 packages/hash/src/uuid.pas svneol=native#text/plain
 packages/hermes/Makefile svneol=native#text/plain
 packages/hermes/Makefile.fpc svneol=native#text/plain
-packages/hermes/fpmake_disabled.pp svneol=native#text/plain
+packages/hermes/fpmake.pp svneol=native#text/plain
 packages/hermes/src/d_32.inc svneol=native#text/plain
 packages/hermes/src/factconv.inc svneol=native#text/plain
 packages/hermes/src/headp.inc svneol=native#text/plain
@@ -4917,7 +4945,7 @@ packages/mad/fpmake.pp svneol=native#text/plain
 packages/mad/src/mad.pas svneol=native#text/plain
 packages/matroska/Makefile svneol=native#text/plain
 packages/matroska/Makefile.fpc svneol=native#text/plain
-packages/matroska/fpmake.pp svneol=native#text/plain
+packages/matroska/fpmake.pp_disabled svneol=native#text/plain
 packages/matroska/src/matroska.pas svneol=native#text/plain
 packages/modplug/Makefile svneol=native#text/plain
 packages/modplug/Makefile.fpc svneol=native#text/plain
@@ -5272,8 +5300,10 @@ packages/opengles/Makefile svneol=native#text/plain
 packages/opengles/Makefile.fpc svneol=native#text/plain
 packages/opengles/examples/Makefile svneol=native#text/plain
 packages/opengles/examples/Makefile.fpc svneol=native#text/plain
+packages/opengles/examples/es2example1.pas svneol=native#text/pascal
 packages/opengles/examples/glutdemoes.pp svneol=native#text/plain
 packages/opengles/src/gles11.pp svneol=native#text/plain
+packages/opengles/src/gles20.pas svneol=native#text/pascal
 packages/openssl/Makefile svneol=native#text/plain
 packages/openssl/Makefile.fpc svneol=native#text/plain
 packages/openssl/examples/Makefile svneol=native#text/plain
@@ -5627,7 +5657,7 @@ packages/ptc/examples/timer.pp svneol=native#text/plain
 packages/ptc/examples/tunnel.pp svneol=native#text/plain
 packages/ptc/examples/tunnel3d.pp svneol=native#text/plain
 packages/ptc/examples/tunnel3d.raw -text svneol=unset#raw/binary
-packages/ptc/fpmake_disabled.pp svneol=native#text/plain
+packages/ptc/fpmake.pp svneol=native#text/plain
 packages/ptc/src/c_api/capi_area.inc svneol=native#text/plain
 packages/ptc/src/c_api/capi_aread.inc svneol=native#text/plain
 packages/ptc/src/c_api/capi_clear.inc svneol=native#text/plain
@@ -5813,8 +5843,9 @@ packages/regexpr/examples/Makefile.fpc svneol=native#text/plain
 packages/regexpr/examples/testreg1.pp svneol=native#text/plain
 packages/regexpr/fpmake.pp svneol=native#text/plain
 packages/regexpr/src/old/regexpr.pp svneol=native#text/plain
+packages/regexpr/src/oldregexpr.pp svneol=native#text/pascal
 packages/regexpr/src/regex.pp svneol=native#text/plain
-packages/regexpr/src/regexpr.pp svneol=native#text/plain
+packages/regexpr/src/regexpr.pas svneol=native#text/pascal
 packages/rexx/Makefile svneol=native#text/plain
 packages/rexx/Makefile.fpc svneol=native#text/plain
 packages/rexx/examples/Makefile svneol=native#text/plain
@@ -5886,6 +5917,7 @@ packages/symbolic/doc/optimization.txt svneol=native#text/plain
 packages/symbolic/doc/symbolic.txt svneol=native#text/plain
 packages/symbolic/examples/Makefile svneol=native#text/plain
 packages/symbolic/examples/Makefile.fpc svneol=native#text/plain
+packages/symbolic/examples/easyevalexample.pp svneol=native#text/plain
 packages/symbolic/examples/evaltest.pas svneol=native#text/plain
 packages/symbolic/examples/rpnthing.pas svneol=native#text/plain
 packages/symbolic/fpmake.pp svneol=native#text/plain
@@ -6990,11 +7022,15 @@ rtl/darwin/x86_64/sighnd.inc svneol=native#text/plain
 rtl/embedded/Makefile svneol=native#text/plain
 rtl/embedded/Makefile.fpc svneol=native#text/plain
 rtl/embedded/arm/at91sam7x256.pp svneol=native#text/plain
+rtl/embedded/arm/lm3fury.pp svneol=native#text/pascal
+rtl/embedded/arm/lm3tempest.pp svneol=native#text/pascal
+rtl/embedded/arm/lpc1768.pp svneol=native#text/pascal
 rtl/embedded/arm/lpc21x4.pp svneol=native#text/plain
-rtl/embedded/arm/stellaris.pp svneol=native#text/plain
 rtl/embedded/arm/stm32f103.pp svneol=native#text/plain
 rtl/embedded/avr/atmega128.pp svneol=native#text/plain
 rtl/embedded/avr/start.inc svneol=native#text/plain
+rtl/embedded/buildrtl.lpi svneol=native#text/plain
+rtl/embedded/buildrtl.pp svneol=native#text/plain
 rtl/embedded/check.inc svneol=native#text/plain
 rtl/embedded/empty.cfg svneol=native#text/plain
 rtl/embedded/rtl.cfg svneol=native#text/plain
@@ -9115,6 +9151,11 @@ tests/tbs/tb0573.pp svneol=native#text/plain
 tests/tbs/tb0574.pp svneol=native#text/pascal
 tests/tbs/tb0575.pp svneol=native#text/plain
 tests/tbs/tb0576.pp svneol=native#text/plain
+tests/tbs/tb0577.pp svneol=native#text/plain
+tests/tbs/tb0577a.pp svneol=native#text/plain
+tests/tbs/tb0578.pp svneol=native#text/pascal
+tests/tbs/tb0579.pp svneol=native#text/pascal
+tests/tbs/tb0580.pp svneol=native#text/pascal
 tests/tbs/tb205.pp svneol=native#text/plain
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain
@@ -9731,6 +9772,10 @@ tests/test/tarray6.pp svneol=native#text/plain
 tests/test/tarray7.pp svneol=native#text/plain
 tests/test/tarray8.pp svneol=native#text/plain
 tests/test/tarray9.pp svneol=native#text/plain
+tests/test/tarrconstr1.pp svneol=native#text/pascal
+tests/test/tarrconstr2.pp svneol=native#text/pascal
+tests/test/tarrconstr3.pp svneol=native#text/pascal
+tests/test/tarrconstr4.pp svneol=native#text/pascal
 tests/test/tasm1.pp svneol=native#text/plain
 tests/test/tasm2.pp svneol=native#text/plain
 tests/test/tasm3.pp svneol=native#text/plain
@@ -9873,6 +9918,7 @@ tests/test/tclass13a.pp svneol=native#text/plain
 tests/test/tclass13b.pp svneol=native#text/plain
 tests/test/tclass14a.pp svneol=native#text/pascal
 tests/test/tclass14b.pp svneol=native#text/pascal
+tests/test/tclass15.pp svneol=native#text/pascal
 tests/test/tclass2.pp svneol=native#text/plain
 tests/test/tclass3.pp svneol=native#text/plain
 tests/test/tclass4.pp svneol=native#text/plain
@@ -9897,6 +9943,10 @@ tests/test/tdel2.pp svneol=native#text/plain
 tests/test/tdispinterface1a.pp svneol=native#text/pascal
 tests/test/tdispinterface1b.pp svneol=native#text/pascal
 tests/test/tdispinterface2.pp svneol=native#text/plain
+tests/test/tdotunits1.pp svneol=native#text/pascal
+tests/test/tdotunits2.pp svneol=native#text/pascal
+tests/test/tdotunits3.pp svneol=native#text/pascal
+tests/test/tdotunits4.pp svneol=native#text/pascal
 tests/test/tendian1.pp svneol=native#text/plain
 tests/test/tenum1.pp svneol=native#text/plain
 tests/test/tenum2.pp svneol=native#text/plain
@@ -9922,6 +9972,7 @@ tests/test/terecs_u1.pp svneol=native#text/pascal
 tests/test/testcmem.pp svneol=native#text/plain
 tests/test/testda1.pp svneol=native#text/plain
 tests/test/testfpuc.pp svneol=native#text/plain
+tests/test/testlderror.pp svneol=native#text/pascal
 tests/test/testmovd.pp svneol=native#text/plain
 tests/test/tests.pp svneol=native#text/plain
 tests/test/testsse2.pp svneol=native#text/plain
@@ -10441,6 +10492,7 @@ tests/test/tset5a.pp svneol=native#text/plain
 tests/test/tset6.pp svneol=native#text/plain
 tests/test/tset7.pp svneol=native#text/plain
 tests/test/tsetsize.pp svneol=native#text/plain
+tests/test/tshuffle1.pp svneol=native#text/pascal
 tests/test/tstack.pp svneol=native#text/plain
 tests/test/tstatic1.pp svneol=native#text/pascal
 tests/test/tstatic2.pp svneol=native#text/pascal
@@ -10464,6 +10516,8 @@ tests/test/tstrreal2.pp svneol=native#text/plain
 tests/test/tstrreal3.pp svneol=native#text/plain
 tests/test/tstrreal4.pp svneol=native#text/plain
 tests/test/tstrreal5.pp svneol=native#text/plain
+tests/test/tstrutils1.pp svneol=native#text/plain
+tests/test/tstrutils2.pp svneol=native#text/plain
 tests/test/tsubdecl.pp svneol=native#text/plain
 tests/test/tsymlibrary1.pp svneol=native#text/pascal
 tests/test/ttpara1.pp svneol=native#text/plain
@@ -10512,6 +10566,12 @@ tests/test/twrstr8.pp svneol=native#text/plain
 tests/test/uabstrcl.pp svneol=native#text/plain
 tests/test/uchlp12.pp svneol=native#text/pascal
 tests/test/uchlp18.pp svneol=native#text/pascal
+tests/test/udots.dot.next.pp svneol=native#text/pascal
+tests/test/udots.dot.pp svneol=native#text/pascal
+tests/test/udots.dot.prog.pp svneol=native#text/pascal
+tests/test/udots.pp svneol=native#text/pascal
+tests/test/udots.prog.pp svneol=native#text/pascal
+tests/test/udots.test.pp svneol=native#text/pascal
 tests/test/uenum2a.pp svneol=native#text/plain
 tests/test/uenum2b.pp svneol=native#text/plain
 tests/test/ugeneric10.pp svneol=native#text/plain
@@ -10585,6 +10645,7 @@ tests/test/units/math/tmask2.pp svneol=native#text/plain
 tests/test/units/math/tnaninf.pp svneol=native#text/plain
 tests/test/units/math/tpower.pp svneol=native#text/pascal
 tests/test/units/math/ttrig1.pp svneol=native#text/plain
+tests/test/units/matrix/tinv1.pp svneol=native#text/pascal
 tests/test/units/objects/testobj.pp svneol=native#text/plain
 tests/test/units/objects/testobj1.pp svneol=native#text/plain
 tests/test/units/objects/testobj2.pp svneol=native#text/plain
@@ -10661,6 +10722,7 @@ tests/test/units/system/tvalc.pp svneol=native#text/plain
 tests/test/units/sysutils/strtotimetest.pp svneol=native#text/plain
 tests/test/units/sysutils/tastrcmp.pp svneol=native#text/plain
 tests/test/units/sysutils/tastrcmp1.pp svneol=native#text/plain
+tests/test/units/sysutils/tdirex.pp svneol=native#text/plain
 tests/test/units/sysutils/texec1.pp svneol=native#text/plain
 tests/test/units/sysutils/texec2.pp svneol=native#text/plain
 tests/test/units/sysutils/textractquote.pp svneol=native#text/plain
@@ -10848,6 +10910,9 @@ tests/webtbf/tw1754.pp svneol=native#text/plain
 tests/webtbf/tw1754b.pp svneol=native#text/plain
 tests/webtbf/tw17646a.pp svneol=native#text/plain
 tests/webtbf/tw1782.pp svneol=native#text/plain
+tests/webtbf/tw18058a.pp svneol=native#text/plain
+tests/webtbf/tw18058b.pp svneol=native#text/plain
+tests/webtbf/tw18058c.pp svneol=native#text/plain
 tests/webtbf/tw18096.pp svneol=native#text/pascal
 tests/webtbf/tw18096c.pp svneol=native#text/pascal
 tests/webtbf/tw18267.pp svneol=native#text/plain
@@ -10862,6 +10927,7 @@ tests/webtbf/tw1928.pp svneol=native#text/plain
 tests/webtbf/tw1939.pp svneol=native#text/plain
 tests/webtbf/tw19463.pp svneol=native#text/pascal
 tests/webtbf/tw1949.pp svneol=native#text/plain
+tests/webtbf/tw19591.pp svneol=native#text/plain
 tests/webtbf/tw1969.pp svneol=native#text/plain
 tests/webtbf/tw1995.pp svneol=native#text/plain
 tests/webtbf/tw2018.pp svneol=native#text/plain
@@ -11504,6 +11570,7 @@ tests/webtbs/tw15467.pp svneol=native#text/pascal
 tests/webtbs/tw15500.pp svneol=native#text/plain
 tests/webtbs/tw15504.pp svneol=native#text/plain
 tests/webtbs/tw15530.pp svneol=native#text/pascal
+tests/webtbs/tw15571.pp svneol=native#text/pascal
 tests/webtbs/tw15591.pp svneol=native#text/pascal
 tests/webtbs/tw15592.pp svneol=native#text/plain
 tests/webtbs/tw15599.pp svneol=native#text/plain
@@ -11631,6 +11698,7 @@ tests/webtbs/tw17715.pp svneol=native#text/plain
 tests/webtbs/tw1779.pp svneol=native#text/plain
 tests/webtbs/tw1780.pp svneol=native#text/plain
 tests/webtbs/tw17836.pp svneol=native#text/plain
+tests/webtbs/tw17838.pp svneol=native#text/pascal
 tests/webtbs/tw17846.pp svneol=native#text/plain
 tests/webtbs/tw17862.pp svneol=native#text/plain
 tests/webtbs/tw17904.pas svneol=native#text/plain
@@ -11679,6 +11747,9 @@ tests/webtbs/tw1867.pp svneol=native#text/plain
 tests/webtbs/tw18690.pp svneol=native#text/plain
 tests/webtbs/tw18702.pp svneol=native#text/pascal
 tests/webtbs/tw1873.pp svneol=native#text/plain
+tests/webtbs/tw18767a.pp svneol=native#text/pascal
+tests/webtbs/tw18767b.pp svneol=native#text/pascal
+tests/webtbs/tw18768.pp svneol=native#text/pascal
 tests/webtbs/tw1883.pp svneol=native#text/plain
 tests/webtbs/tw18859.pp svneol=native#text/plain
 tests/webtbs/tw1888.pp svneol=native#text/plain
@@ -11694,6 +11765,7 @@ tests/webtbs/tw1909.pp svneol=native#text/plain
 tests/webtbs/tw1910.pp svneol=native#text/plain
 tests/webtbs/tw1915.pp svneol=native#text/plain
 tests/webtbs/tw1917.pp svneol=native#text/plain
+tests/webtbs/tw19182.pp svneol=native#text/plain
 tests/webtbs/tw1920.pp svneol=native#text/plain
 tests/webtbs/tw19201.pp svneol=native#text/pascal
 tests/webtbs/tw1923.pp svneol=native#text/plain
@@ -11708,11 +11780,31 @@ tests/webtbs/tw1938.pp svneol=native#text/plain
 tests/webtbs/tw1948.pp svneol=native#text/plain
 tests/webtbs/tw1950.pp svneol=native#text/plain
 tests/webtbs/tw19548.pp svneol=native#text/pascal
+tests/webtbs/tw19555.pp svneol=native#text/pascal
 tests/webtbs/tw1964.pp svneol=native#text/plain
+tests/webtbs/tw19651.pp svneol=native#text/plain
+tests/webtbs/tw19700.pp svneol=native#text/plain
+tests/webtbs/tw19851a.pp svneol=native#text/pascal
+tests/webtbs/tw19851b.pp svneol=native#text/pascal
+tests/webtbs/tw19864.pp svneol=native#text/pascal
+tests/webtbs/tw19874.pp svneol=native#text/pascal
+tests/webtbs/tw19910.pp svneol=native#text/pascal
 tests/webtbs/tw1996.pp svneol=native#text/plain
+tests/webtbs/tw19960.pp svneol=native#text/pascal
+tests/webtbs/tw19974.pp svneol=native#text/pascal
+tests/webtbs/tw19977.pp svneol=native#text/pascal
+tests/webtbs/tw20003.pp svneol=native#text/pascal
+tests/webtbs/tw20005.pp svneol=native#text/pascal
 tests/webtbs/tw2001.pp svneol=native#text/plain
 tests/webtbs/tw2002.pp svneol=native#text/plain
+tests/webtbs/tw20035a.pp svneol=native#text/pascal
+tests/webtbs/tw20035b.pp svneol=native#text/pascal
+tests/webtbs/tw20035c.pp svneol=native#text/pascal
 tests/webtbs/tw2004.pp svneol=native#text/plain
+tests/webtbs/tw20093.pp svneol=native#text/pascal
+tests/webtbs/tw20093a.pp svneol=native#text/pascal
+tests/webtbs/tw20119.pp -text svneol=native#test/pascal
+tests/webtbs/tw20257.pp svneol=native#text/plain
 tests/webtbs/tw2028.pp svneol=native#text/plain
 tests/webtbs/tw2030.pp svneol=native#text/plain
 tests/webtbs/tw2031.pp svneol=native#text/plain
@@ -12301,6 +12393,7 @@ tests/webtbs/tw7173.pp svneol=native#text/plain
 tests/webtbs/tw7179.pp svneol=native#text/plain
 tests/webtbs/tw7195.pp svneol=native#text/plain
 tests/webtbs/tw7200.pp svneol=native#text/plain
+tests/webtbs/tw7210.pp svneol=native#text/plain
 tests/webtbs/tw7227.pp svneol=native#text/plain
 tests/webtbs/tw7242.pp svneol=native#text/plain
 tests/webtbs/tw7262.pp svneol=native#text/plain
@@ -12500,8 +12593,13 @@ tests/webtbs/tw9918.pp svneol=native#text/plain
 tests/webtbs/tw9919.pp svneol=native#text/plain
 tests/webtbs/tw9985.pp svneol=native#text/plain
 tests/webtbs/tw9985a.pp svneol=native#text/plain
+tests/webtbs/u_uvmta.pp svneol=native#text/pascal
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
+tests/webtbs/uvmt.pp svneol=native#text/pascal
+tests/webtbs/uvmt_a.pp svneol=native#text/pascal
+tests/webtbs/uvmta.pp svneol=native#text/pascal
+tests/webtbs/uvmta_a.pp svneol=native#text/pascal
 tests/webtbs/uw0555.pp svneol=native#text/plain
 tests/webtbs/uw0701c.pp svneol=native#text/plain
 tests/webtbs/uw0701d.pp svneol=native#text/plain
@@ -12531,6 +12629,7 @@ tests/webtbs/uw18087b.pp svneol=native#text/pascal
 tests/webtbs/uw18909a.pp svneol=native#text/pascal
 tests/webtbs/uw18909b.pp svneol=native#text/pascal
 tests/webtbs/uw19159.pp svneol=native#text/pascal
+tests/webtbs/uw19851.pp svneol=native#text/pascal
 tests/webtbs/uw2004.inc svneol=native#text/plain
 tests/webtbs/uw2040.pp svneol=native#text/plain
 tests/webtbs/uw2266a.inc svneol=native#text/plain

+ 14 - 168
Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/05]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/08/27]
 #
 default: help
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -184,11 +184,21 @@ else
 ARCH=$(CPU_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),arm-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
 else
+ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+else
 TARGETSUFFIX=$(FULL_TARGET)
+endif
 SOURCESUFFIX=$(FULL_SOURCE)
 endif
 ifneq ($(FULL_TARGET),$(FULL_SOURCE))
@@ -284,11 +294,12 @@ export FPCFPMAKE
 export FPMAKE_SKIP_CONFIG
 endif
 else
+FPMAKE_SKIP_CONFIG=-n
 FPCFPMAKE=$(FPC)
 endif
 endif
 override PACKAGE_NAME=fpc
-override PACKAGE_VERSION=2.5.1
+override PACKAGE_VERSION=2.7.1
 ifndef inOS2
 override FPCDIR:=$(BASEDIR)
 export FPCDIR
@@ -794,7 +805,6 @@ SHAREDLIBPREFIX=libfp
 STATICLIBPREFIX=libp
 IMPORTLIBPREFIX=libimp
 RSTEXT=.rst
-ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
 ifeq ($(OS_TARGET),go32v1)
 STATICLIBPREFIX=
 SHORTSUFFIX=v1
@@ -935,161 +945,6 @@ EXEEXT=.dol
 SHAREDLIBEXT=.so
 SHORTSUFFIX=wii
 endif
-else
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-STATICLIBPREFIX=
-SHORTSUFFIX=v1
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v2)
-STATICLIBPREFIX=
-SHORTSUFFIX=dos
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),watcom)
-STATICLIBPREFIX=
-SHORTSUFFIX=wat
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),linux)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=lnx
-endif
-ifeq ($(OS_TARGET),freebsd)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=fbs
-endif
-ifeq ($(OS_TARGET),netbsd)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=nbs
-endif
-ifeq ($(OS_TARGET),openbsd)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=obs
-endif
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-SHORTSUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-BATCHEXT=.cmd
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-AOUTEXT=.out
-SMARTEXT=.sl2
-STATICLIBPREFIX=
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-SHORTSUFFIX=os2
-ECHO=echo
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),amiga)
-EXEEXT=
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.library
-SHORTSUFFIX=amg
-endif
-ifeq ($(OS_TARGET),atari)
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=.ttp
-SHORTSUFFIX=ata
-endif
-ifeq ($(OS_TARGET),beos)
-BATCHEXT=.sh
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-SHORTSUFFIX=be
-endif
-ifeq ($(OS_TARGET),solaris)
-BATCHEXT=.sh
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-SHORTSUFFIX=sun
-endif
-ifeq ($(OS_TARGET),qnx)
-BATCHEXT=.sh
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-SHORTSUFFIX=qnx
-endif
-ifeq ($(OS_TARGET),netware)
-STATICLIBPREFIX=
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.nlm
-EXEEXT=.nlm
-SHORTSUFFIX=nw
-IMPORTLIBPREFIX=imp
-endif
-ifeq ($(OS_TARGET),netwlibc)
-STATICLIBPREFIX=
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.nlm
-EXEEXT=.nlm
-SHORTSUFFIX=nwl
-IMPORTLIBPREFIX=imp
-endif
-ifeq ($(OS_TARGET),macos)
-BATCHEXT=
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-DEBUGSYMEXT=.xcoff
-SHORTSUFFIX=mac
-IMPORTLIBPREFIX=imp
-endif
-endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 FPCMADE=fpcmade.$(SHORTSUFFIX)
 ZIPSUFFIX=$(SHORTSUFFIX)
@@ -1279,15 +1134,6 @@ ASNAME=$(BINUTILSPREFIX)as
 LDNAME=$(BINUTILSPREFIX)ld
 ARNAME=$(BINUTILSPREFIX)ar
 RCNAME=$(BINUTILSPREFIX)rc
-ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
-ifeq ($(OS_TARGET),win32)
-ifeq ($(CROSSBINDIR),)
-ASNAME=asw
-LDNAME=ldw
-ARNAME=arw
-endif
-endif
-endif
 ifndef ASPROG
 ifdef CROSSBINDIR
 ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
@@ -1470,7 +1316,7 @@ override FPCOPT+=-Aas
 endif
 endif
 ifeq ($(findstring 2.0.,$(FPC_VERSION)),)
-ifeq ($(OS_TARGET),linux)
+ifneq ($(findstring $(OS_TARGET),linux solaris),)
 ifeq ($(CPU_TARGET),x86_64)
 override FPCOPT+=-Cg
 endif

+ 1 - 1
Makefile.fpc

@@ -4,7 +4,7 @@
 
 [package]
 name=fpc
-version=2.5.1
+version=2.7.1
 
 [target]
 dirs=compiler rtl utils packages ide installer

+ 22 - 169
compiler/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/07/01]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/09/08]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
@@ -184,11 +184,21 @@ else
 ARCH=$(CPU_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),arm-embedded)
+ifeq ($(SUBARCH),)
+$(error When compiling for arm-embedded, a sub-architecture (e.g. SUBARCH=armv4t or SUBARCH=armv7m) must be defined)
+endif
+override FPCOPT+=-Cp$(SUBARCH)
+endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 TARGETSUFFIX=$(OS_TARGET)
 SOURCESUFFIX=$(OS_SOURCE)
 else
+ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
+TARGETSUFFIX=$(OS_TARGET)
+else
 TARGETSUFFIX=$(FULL_TARGET)
+endif
 SOURCESUFFIX=$(FULL_SOURCE)
 endif
 ifneq ($(FULL_TARGET),$(FULL_SOURCE))
@@ -284,11 +294,12 @@ export FPCFPMAKE
 export FPMAKE_SKIP_CONFIG
 endif
 else
+FPMAKE_SKIP_CONFIG=-n
 FPCFPMAKE=$(FPC)
 endif
 endif
 override PACKAGE_NAME=compiler
-override PACKAGE_VERSION=2.5.1
+override PACKAGE_VERSION=2.7.1
 unexport FPC_VERSION FPC_COMPILERINFO
 CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips avr
 ALLTARGETS=$(CYCLETARGETS)
@@ -1784,7 +1795,6 @@ SHAREDLIBPREFIX=libfp
 STATICLIBPREFIX=libp
 IMPORTLIBPREFIX=libimp
 RSTEXT=.rst
-ifeq ($(findstring 1.0.,$(FPC_VERSION)),)
 ifeq ($(OS_TARGET),go32v1)
 STATICLIBPREFIX=
 SHORTSUFFIX=v1
@@ -1925,161 +1935,6 @@ EXEEXT=.dol
 SHAREDLIBEXT=.so
 SHORTSUFFIX=wii
 endif
-else
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-STATICLIBPREFIX=
-SHORTSUFFIX=v1
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v2)
-STATICLIBPREFIX=
-SHORTSUFFIX=dos
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),watcom)
-STATICLIBPREFIX=
-SHORTSUFFIX=wat
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),linux)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=lnx
-endif
-ifeq ($(OS_TARGET),freebsd)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=fbs
-endif
-ifeq ($(OS_TARGET),netbsd)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=nbs
-endif
-ifeq ($(OS_TARGET),openbsd)
-BATCHEXT=.sh
-EXEEXT=
-HASSHAREDLIB=1
-SHORTSUFFIX=obs
-endif
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-SHORTSUFFIX=w32
-endif
-ifeq ($(OS_TARGET),os2)
-BATCHEXT=.cmd
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-AOUTEXT=.out
-SMARTEXT=.sl2
-STATICLIBPREFIX=
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-SHORTSUFFIX=os2
-ECHO=echo
-IMPORTLIBPREFIX=
-endif
-ifeq ($(OS_TARGET),amiga)
-EXEEXT=
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.library
-SHORTSUFFIX=amg
-endif
-ifeq ($(OS_TARGET),atari)
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=.ttp
-SHORTSUFFIX=ata
-endif
-ifeq ($(OS_TARGET),beos)
-BATCHEXT=.sh
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-SHORTSUFFIX=be
-endif
-ifeq ($(OS_TARGET),solaris)
-BATCHEXT=.sh
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-SHORTSUFFIX=sun
-endif
-ifeq ($(OS_TARGET),qnx)
-BATCHEXT=.sh
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-SHORTSUFFIX=qnx
-endif
-ifeq ($(OS_TARGET),netware)
-STATICLIBPREFIX=
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.nlm
-EXEEXT=.nlm
-SHORTSUFFIX=nw
-IMPORTLIBPREFIX=imp
-endif
-ifeq ($(OS_TARGET),netwlibc)
-STATICLIBPREFIX=
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.nlm
-EXEEXT=.nlm
-SHORTSUFFIX=nwl
-IMPORTLIBPREFIX=imp
-endif
-ifeq ($(OS_TARGET),macos)
-BATCHEXT=
-PPUEXT=.ppu
-ASMEXT=.s
-OEXT=.o
-SMARTEXT=.sl
-STATICLIBEXT=.a
-EXEEXT=
-DEBUGSYMEXT=.xcoff
-SHORTSUFFIX=mac
-IMPORTLIBPREFIX=imp
-endif
-endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 FPCMADE=fpcmade.$(SHORTSUFFIX)
 ZIPSUFFIX=$(SHORTSUFFIX)
@@ -2269,15 +2124,6 @@ ASNAME=$(BINUTILSPREFIX)as
 LDNAME=$(BINUTILSPREFIX)ld
 ARNAME=$(BINUTILSPREFIX)ar
 RCNAME=$(BINUTILSPREFIX)rc
-ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
-ifeq ($(OS_TARGET),win32)
-ifeq ($(CROSSBINDIR),)
-ASNAME=asw
-LDNAME=ldw
-ARNAME=arw
-endif
-endif
-endif
 ifndef ASPROG
 ifdef CROSSBINDIR
 ASPROG=$(CROSSBINDIR)/$(ASNAME)$(SRCEXEEXT)
@@ -3473,9 +3319,12 @@ else
 INSTALLEXEFILE=$(EXENAME)
 endif
 PPC_TARGETS=i386 m68k powerpc sparc arm armeb x86_64 powerpc64 alpha vis ia64 mips mipsel
-.PHONY: $(PPC_TARGETS)
+INSTALL_TARGETS=$(addsuffix _exe_install,$(sort $(CYCLETARGETS) $(PPC_TARGETS)))
+.PHONY: $(PPC_TARGETS) $(INSTALL_TARGETS)
 $(PPC_TARGETS):
 	$(MAKE) PPC_TARGET=$@ CPU_UNITDIR=$@ all
+$(INSTALL_TARGETS):
+	$(MAKE) all exeinstall PPC_TARGET=$(subst _exe_install,,$@) CPU_UNITDIR=$(subst _exe_install,,$@)
 alltargets: $(ALLTARGETS)
 .NOTPARALLEL:
 .PHONY: all compiler echotime ppuclean execlean clean distclean
@@ -3674,7 +3523,7 @@ fullcycle:
 	$(MAKE) $(filter-out $(PPC_TARGET),$(CYCLETARGETS)) 'FPC=$(BASEDIR)/$(EXENAME)'
 htmldocs:
 	$(PASDOC) -p -h -o html$(PATHSEP)$(PPC_TARGET) -d fpc -d gdb -d $(PPC_TARGET) -u $(PPC_TARGET) $(PPC_TARGET)$(PATHSEP)*.pas systems$(PATHSEP)*.pas *.pas
-.PHONY: quickinstall install installsym
+.PHONY: quickinstall exeinstall install installsym
 MSGINSTALLDIR=$(INSTALL_BASEDIR)/msg
 override PPEXEFILE:=$(wildcard $(EXENAME))
 ifdef UNIXHier
@@ -3683,6 +3532,8 @@ else
 PPCCPULOCATION=$(INSTALL_BINDIR)
 endif
 quickinstall: $(addsuffix _install,$(TARGET_DIRS))
+	$(MAKE) exeinstall
+exeinstall:
 ifneq ($(INSTALLEXEFILE),)
 ifdef UPXPROG
 	-$(UPXPROG) $(INSTALLEXEFILE)
@@ -3690,6 +3541,8 @@ endif
 	$(MKDIR) $(PPCCPULOCATION)
 	$(INSTALLEXE) $(INSTALLEXEFILE) $(PPCCPULOCATION)/$(INSTALLEXEFILE)
 endif
+fullinstall:
+	$(MAKE) $(addsuffix _exe_install,$(filter-out $(PPC_TARGET),$(CYCLETARGETS)))
 install: quickinstall
 ifndef CROSSINSTALL
 ifdef UNIXHier

+ 13 - 3
compiler/Makefile.fpc

@@ -4,7 +4,7 @@
 
 [package]
 name=compiler
-version=2.5.1
+version=2.7.1
 
 [target]
 programs=pp
@@ -315,12 +315,16 @@ endif
 #####################################################################
 
 PPC_TARGETS=i386 m68k powerpc sparc arm armeb x86_64 powerpc64 alpha vis ia64 mips mipsel
+INSTALL_TARGETS=$(addsuffix _exe_install,$(sort $(CYCLETARGETS) $(PPC_TARGETS)))
 
-.PHONY: $(PPC_TARGETS)
+.PHONY: $(PPC_TARGETS) $(INSTALL_TARGETS)
 
 $(PPC_TARGETS):
         $(MAKE) PPC_TARGET=$@ CPU_UNITDIR=$@ all
 
+$(INSTALL_TARGETS):
+        $(MAKE) all exeinstall PPC_TARGET=$(subst _exe_install,,$@) CPU_UNITDIR=$(subst _exe_install,,$@)
+
 alltargets: $(ALLTARGETS)
 
 
@@ -647,7 +651,7 @@ htmldocs:
 # Installation
 #####################################################################
 
-.PHONY: quickinstall install installsym
+.PHONY: quickinstall exeinstall install installsym
 
 MSGINSTALLDIR=$(INSTALL_BASEDIR)/msg
 override PPEXEFILE:=$(wildcard $(EXENAME))
@@ -660,9 +664,12 @@ endif
 
 # This will only install the ppcXXX executable, not the message files etc.
 quickinstall: $(addsuffix _install,$(TARGET_DIRS))
+	$(MAKE) exeinstall
+
 # Install ppcXXX executable, for a cross installation we install
 # the ppcrossXXX as ppcXXX. The target native build ppcXXX is not used
 # for this installation type
+exeinstall:
 ifneq ($(INSTALLEXEFILE),)
 ifdef UPXPROG
         -$(UPXPROG) $(INSTALLEXEFILE)
@@ -671,6 +678,9 @@ endif
         $(INSTALLEXE) $(INSTALLEXEFILE) $(PPCCPULOCATION)/$(INSTALLEXEFILE)
 endif
 
+fullinstall:
+        $(MAKE) $(addsuffix _exe_install,$(filter-out $(PPC_TARGET),$(CYCLETARGETS)))
+
 install: quickinstall
 ifndef CROSSINSTALL
 ifdef UNIXHier

+ 5 - 0
compiler/aasmbase.pas

@@ -147,6 +147,11 @@ interface
            TAsmList with loadsym/loadref/const_symbol (PFV) }
          refs       : longint;
        public
+         { on avr the compiler needs to replace cond. jumps with too large offsets
+           so we have to store an offset somewhere to calculate jump distances }
+{$ifdef AVR}
+         offset     : longint;
+{$endif AVR}
          bind       : TAsmsymbind;
          typ        : TAsmsymtype;
          { Alternate symbol which can be used for 'renaming' needed for

+ 7 - 4
compiler/aasmdata.pas

@@ -155,6 +155,7 @@ interface
         AsmLists      : array[TAsmListType] of TAsmList;
         CurrAsmList   : TAsmList;
         WideInits     : TLinkedList;
+        ResStrInits   : TLinkedList;
         { hash tables for reusing constant storage }
         ConstPools    : array[TConstPoolType] of THashSet;
         constructor create(const n:string);
@@ -180,8 +181,8 @@ interface
       TTCInitItem = class(TLinkedListItem)
         sym: tsym;
         offset: aint;
-        datalabel: TAsmLabel;
-        constructor Create(asym: tsym; aoffset: aint; alabel: TAsmLabel);
+        datalabel: TAsmSymbol;
+        constructor Create(asym: tsym; aoffset: aint; alabel: TAsmSymbol);
       end;
 
     var
@@ -256,7 +257,7 @@ implementation
 *****************************************************************************}
 
 
-    constructor TTCInitItem.Create(asym: tsym; aoffset: aint; alabel: TAsmLabel);
+    constructor TTCInitItem.Create(asym: tsym; aoffset: aint; alabel: TAsmSymbol);
       begin
         inherited Create;
         sym:=asym;
@@ -334,6 +335,7 @@ implementation
         for hal:=low(TAsmListType) to high(TAsmListType) do
           AsmLists[hal]:=TAsmList.create;
         WideInits :=TLinkedList.create;
+        ResStrInits:=TLinkedList.create;
         { CFI }
         FAsmCFI:=CAsmCFI.Create;
       end;
@@ -365,6 +367,7 @@ implementation
 {$ifdef MEMDEBUG}
          memasmlists.start;
 {$endif}
+        ResStrInits.free;
         WideInits.free;
          for hal:=low(TAsmListType) to high(TAsmListType) do
            AsmLists[hal].free;
@@ -452,7 +455,7 @@ implementation
     procedure TAsmData.getlabel(out l : TAsmLabel;alt:TAsmLabeltype);
       begin
         if (target_info.system in systems_linux) and
-           (cs_link_smart in current_settings.globalswitches) and
+           (cs_create_smart in current_settings.moduleswitches) and
            (alt = alt_dbgline) then
           l:=TAsmLabel.createglobal(AsmSymbolDict,name,FNextLabelNr[alt],alt)
         else

+ 244 - 11
compiler/aasmtai.pas

@@ -84,7 +84,11 @@ interface
           ait_regalloc,
           ait_tempalloc,
           { used to mark assembler blocks and inlined functions }
-          ait_marker
+          ait_marker,
+          { used to describe a new location of a variable }
+          ait_varloc,
+          { SEH directives used in ARM,MIPS and x86_64 COFF targets }
+          ait_seh_directive
           );
 
         taiconst_type = (
@@ -113,7 +117,9 @@ interface
             relsyms (nor do they support dwarf, for that matter)
           }
           aitconst_darwin_dwarf_delta64,
-          aitconst_darwin_dwarf_delta32
+          aitconst_darwin_dwarf_delta32,
+          { ARM Thumb-2 only }
+          aitconst_half16bit { used for table jumps. The actual value is the 16bit value shifted left once }
         );
 
     const
@@ -168,7 +174,9 @@ interface
           'cut',
           'regalloc',
           'tempalloc',
-          'marker'
+          'marker',
+          'varloc',
+          'seh_directive'
           );
 
     type
@@ -231,20 +239,22 @@ interface
         a new ait type!                                                              }
       SkipInstr = [ait_comment, ait_symbol,ait_section
                    ,ait_stab, ait_function_name, ait_force_line
-                   ,ait_regalloc, ait_tempalloc, ait_symbol_end, ait_directive];
+                   ,ait_regalloc, ait_tempalloc, ait_symbol_end, ait_directive
+                   ,ait_varloc,ait_seh_directive];
 
       { ait_* types which do not have line information (and hence which are of type
         tai, otherwise, they are of type tailineinfo }
       SkipLineInfo =[ait_label,
                      ait_regalloc,ait_tempalloc,
                      ait_stab,ait_function_name,
-                     ait_cutobject,ait_marker,ait_align,ait_section,ait_comment,
+                     ait_cutobject,ait_marker,ait_varloc,ait_align,ait_section,ait_comment,
                      ait_const,
 {$ifdef arm}
                      ait_thumb_func,
 {$endif arm}
                      ait_real_32bit,ait_real_64bit,ait_real_80bit,ait_comp_64bit,ait_real_128bit,
-                     ait_symbol
+                     ait_symbol,
+                     ait_seh_directive
                     ];
 
 
@@ -270,6 +280,15 @@ interface
         asd_weak_definition
       );
 
+      TAsmSehDirective=(
+          ash_proc,ash_endproc,
+          ash_endprologue,ash_handler,ash_handlerdata,
+          ash_eh,ash_32,ash_no32,
+          ash_setframe,ash_stackalloc,ash_pushreg,
+          ash_savereg,ash_savexmm,ash_pushframe
+        );
+
+
     const
       regallocstr : array[tregalloctype] of string[10]=('allocated','released','sync','resized');
       tempallocstr : array[boolean] of string[10]=('released','allocated');
@@ -279,6 +298,13 @@ interface
         'extern','nasm_import', 'tc', 'reference',
         'no_dead_strip','weak_reference','lazy_reference','weak_definition'
       );
+      sehdirectivestr : array[TAsmSehDirective] of string[15]=(
+        'seh_proc','seh_endproc',
+        'seh_endprologue','seh_handler','seh_handlerdata',
+        'seh_eh','seh_32','seh_no32',
+        'seh_setframe','seh_stackalloc','seh_pushreg',
+        'seh_savereg','seh_savexmm','seh_pushframe'
+      );
 
     type
        { abstract assembler item }
@@ -393,7 +419,7 @@ interface
          private
           { this constructor is made private on purpose }
           { because sections should be created via new_section() }
-          constructor Create(Asectype:TAsmSectiontype;Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
+          constructor Create(Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
        end;
 
 
@@ -498,11 +524,14 @@ interface
           procedure ppuwrite(ppufile:tcompilerppufile);override;
        end;
 
+       { tai_stab }
+
        tai_stab = class(tai)
           str : pchar;
           stabtype : TStabType;
           constructor Create(_stabtype:TStabType;_str : pchar);
           constructor Create_str(_stabtype:TStabType;const s:string);
+          constructor create_ansistr(_stabtype: TStabType; const s: ansistring);
           destructor Destroy;override;
        end;
 
@@ -640,6 +669,43 @@ interface
         end;
         tai_align_class = class of tai_align_abstract;
 
+        tai_varloc = class(tai)
+           newlocation,
+           newlocationhi : tregister;
+           varsym : tsym;
+           constructor create(sym : tsym;loc : tregister);
+           constructor create64(sym : tsym;loc,lochi : tregister);
+           constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
+           procedure ppuwrite(ppufile:tcompilerppufile);override;
+           procedure buildderefimpl;override;
+           procedure derefimpl;override;
+        end;
+
+        TSehDirectiveDatatype=(sd_none,sd_string,sd_reg,sd_offset,sd_regoffset);
+
+        TSehDirectiveData=record
+        case typ: TSehDirectiveDatatype of
+          sd_none: ();
+          sd_string: (name:pshortstring);
+          sd_reg,sd_offset,sd_regoffset: (reg:TRegister;offset:dword);
+        end;
+
+        tai_seh_directive = class(tai)
+          kind: TAsmSehDirective;
+          data: TSehDirectiveData;
+          constructor create(_kind:TAsmSehDirective);
+          constructor create_name(_kind:TAsmSehDirective;const _name: string);
+          constructor create_reg(_kind:TAsmSehDirective;r:TRegister);
+          constructor create_offset(_kind:TAsmSehDirective;ofs:dword);
+          constructor create_reg_offset(_kind:TAsmSehDirective;r:TRegister;ofs:dword);
+          constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
+          destructor destroy;override;
+          procedure ppuwrite(ppufile:tcompilerppufile);override;
+          procedure generate_code(objdata:TObjData);virtual;
+          property datatype: TSehDirectiveDatatype read data.typ;
+        end;
+        tai_seh_directive_class=class of tai_seh_directive;
+
     var
       { array with all class types for tais }
       aiclass : taiclassarray;
@@ -647,12 +713,13 @@ interface
       { target specific tais, possibly overwritten in target specific aasmcpu }
       cai_align : tai_align_class = tai_align_abstract;
       cai_cpu   : tai_cpu_class = tai_cpu_abstract;
+      cai_seh_directive: tai_seh_directive_class = tai_seh_directive;
 
       { hook to notify uses of registers }
       add_reg_instruction_hook : tadd_reg_instruction_proc;
 
     procedure maybe_new_object_file(list:TAsmList);
-    procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
+    procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
     procedure section_symbol_start(list:TAsmList;const Aname:string;Asymtyp:Tasmsymtype;
                                    Aglobal:boolean;Asectype:TAsmSectiontype;Aalign:byte);
     procedure section_symbol_end(list:TAsmList;const Aname:string);
@@ -684,7 +751,7 @@ implementation
       end;
 
 
-    procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
+    procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
       begin
         list.concat(tai_section.create(Asectype,Aname,Aalign,Asecorder));
         list.concat(cai_align.create(Aalign));
@@ -752,6 +819,50 @@ implementation
       end;
 
 
+    constructor tai_varloc.create(sym: tsym; loc: tregister);
+      begin
+        inherited Create;
+        typ:=ait_varloc;
+        newlocation:=loc;
+        newlocationhi:=NR_NO;
+        varsym:=sym;
+      end;
+
+
+    constructor tai_varloc.create64(sym: tsym; loc: tregister;lochi : tregister);
+      begin
+        inherited Create;
+        typ:=ait_varloc;
+        newlocation:=loc;
+        newlocationhi:=lochi;
+        varsym:=sym;
+      end;
+
+
+    constructor tai_varloc.ppuload(t: taitype; ppufile: tcompilerppufile);
+      begin
+        inherited ppuload(t, ppufile);
+      end;
+
+
+    procedure tai_varloc.ppuwrite(ppufile: tcompilerppufile);
+      begin
+        inherited ppuwrite(ppufile);
+      end;
+
+
+    procedure tai_varloc.buildderefimpl;
+      begin
+        inherited buildderefimpl;
+      end;
+
+
+    procedure tai_varloc.derefimpl;
+      begin
+        inherited derefimpl;
+      end;
+
+
 {****************************************************************************
                              TAI
  ****************************************************************************}
@@ -828,7 +939,7 @@ implementation
                              TAI_SECTION
  ****************************************************************************}
 
-    constructor tai_section.Create(Asectype:TAsmSectiontype;Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
+    constructor tai_section.Create(Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
       begin
         inherited Create;
         typ:=ait_section;
@@ -1323,6 +1434,8 @@ implementation
             result:=LengthUleb128(qword(value));
           aitconst_sleb128bit :
             result:=LengthSleb128(value);
+          aitconst_half16bit:
+            result:=2;
           else
             internalerror(200603253);
         end;
@@ -1648,6 +1761,15 @@ implementation
          self.create(_stabtype,strpnew(s));
       end;
 
+    constructor tai_stab.create_ansistr(_stabtype:TStabType;const s:ansistring);
+      begin
+         inherited create;
+         typ:=ait_stab;
+         stabtype:=_stabtype;
+         getmem(str,length(s)+1);
+         move(s[1],str^,length(s)+1);
+      end;
+
     destructor tai_stab.destroy;
       begin
          freemem(str);
@@ -2003,7 +2125,11 @@ implementation
             if (cs_create_pic in current_settings.moduleswitches) and
               assigned(r.symbol) and
               not assigned(r.relsymbol) and
-              (r.refaddr=addr_no) then
+              (r.refaddr=addr_no)
+{$ifdef ARM}
+              and not(r.base=NR_R15)
+{$endif ARM}
+              then
               internalerror(200502052);
             typ:=top_ref;
             if assigned(add_reg_instruction_hook) then
@@ -2407,4 +2533,111 @@ implementation
         ppufile.putbyte(byte(use_op));
       end;
 
+{****************************************************************************
+                              tai_seh_directive
+ ****************************************************************************}
+
+    const
+      datatypemap: array[TAsmSehDirective] of TSehDirectiveDatatype=(
+        sd_string,     { proc }
+        sd_none,       { endproc }
+        sd_none,       { endprologue }
+        sd_none,       { TODO: handler }
+        sd_none,       { handlerdata }
+        sd_none,sd_none,sd_none,  { eh, 32, no32 }
+        sd_regoffset,  { setframe }
+        sd_offset,     { stackalloc }
+        sd_reg,        { pushreg }
+        sd_regoffset,  { savereg }
+        sd_regoffset,  { savexmm }
+        sd_none        { pushframe }
+      );
+
+    constructor tai_seh_directive.create(_kind:TAsmSehDirective);
+      begin
+        inherited Create;
+        typ:=ait_seh_directive;
+        kind:=_kind;
+        data.typ:=datatypemap[_kind];
+      end;
+
+    constructor tai_seh_directive.create_name(_kind:TAsmSehDirective;const _name:string);
+      begin
+        create(_kind);
+        data.name:=stringdup(_name);
+      end;
+
+    constructor tai_seh_directive.create_reg(_kind:TAsmSehDirective;r:TRegister);
+      begin
+        create(_kind);
+        data.reg:=r;
+      end;
+
+    constructor tai_seh_directive.create_offset(_kind:TAsmSehDirective;ofs:dword);
+      begin
+        create(_kind);
+        data.offset:=ofs;
+      end;
+
+    constructor tai_seh_directive.create_reg_offset(_kind:TAsmSehDirective;
+      r:TRegister;ofs:dword);
+      begin
+        create(_kind);
+        data.offset:=ofs;
+        data.reg:=r;
+      end;
+
+    constructor tai_seh_directive.ppuload(t:taitype;ppufile:tcompilerppufile);
+      begin
+        inherited ppuload(t, ppufile);
+        kind:=TAsmSehDirective(ppufile.getbyte);
+        data.typ:=datatypemap[kind];
+        case data.typ of
+          sd_none: ;
+          sd_string:
+            data.name:=stringdup(ppufile.getstring);
+
+          sd_reg,sd_offset,sd_regoffset:
+            begin
+              ppufile.getdata(data.reg,sizeof(TRegister));
+              data.offset:=ppufile.getdword;
+            end;
+        else
+          InternalError(2011091201);
+        end;
+      end;
+
+    destructor tai_seh_directive.destroy;
+      begin
+        if data.typ=sd_string then
+          stringdispose(data.name);
+        inherited destroy;
+      end;
+
+    procedure tai_seh_directive.ppuwrite(ppufile:tcompilerppufile);
+      begin
+        inherited ppuwrite(ppufile);
+        ppufile.putbyte(ord(kind));
+        case data.typ of
+          sd_none: ;
+          sd_string:
+            ppufile.putstring(data.name^);
+          sd_reg,sd_offset,sd_regoffset:
+            begin
+              ppufile.putdata(data.reg,sizeof(TRegister));
+              ppufile.putdword(data.offset);
+            end;
+        else
+          InternalError(2011091202);
+        end;
+      end;
+
+    procedure tai_seh_directive.generate_code(objdata:TObjData);
+      begin
+      end;
+
+begin
+  { taitype should fit into a 4 byte set for speed reasons }
+  if ord(high(taitype))>31 then
+    internalerror(201108181);
 end.

+ 50 - 17
compiler/aggas.pas

@@ -94,9 +94,6 @@ interface
        end;
 
 
-     function ReplaceForbiddenChars(const s: string): string;
-
-
 implementation
 
     uses
@@ -195,23 +192,12 @@ implementation
 
 
     const
-      ait_const2str : array[aitconst_128bit..aitconst_darwin_dwarf_delta32] of string[20]=(
+      ait_const2str : array[aitconst_128bit..aitconst_half16bit] of string[20]=(
         #9'.fixme128'#9,#9'.quad'#9,#9'.long'#9,#9'.short'#9,#9'.byte'#9,
         #9'.sleb128'#9,#9'.uleb128'#9,
-        #9'.rva'#9,#9'.secrel32'#9,#9'.quad'#9,#9'.long'#9
+        #9'.rva'#9,#9'.secrel32'#9,#9'.quad'#9,#9'.long'#9,#9'.short'#9
       );
 
-    function ReplaceForbiddenChars(const s: string): string;
-      var
-      i : longint;
-      begin
-        Result:=s;
-        for i:=1 to Length(Result) do
-          if Result[i]='$' then
-            Result[i]:='s';
-      end;
-
-
 {****************************************************************************}
 {                          GNU Assembler writer                              }
 {****************************************************************************}
@@ -704,7 +690,11 @@ implementation
            ait_section :
              begin
                if tai_section(hp).sectype<>sec_none then
+{$ifdef avr}
+                 WriteSection(tai_section(hp).sectype,ReplaceForbiddenChars(tai_section(hp).name^),tai_section(hp).secorder)
+{$else avr}
                  WriteSection(tai_section(hp).sectype,tai_section(hp).name^,tai_section(hp).secorder)
+{$endif avr}
                else
                  begin
 {$ifdef EXTDEBUG}
@@ -756,7 +746,11 @@ implementation
                        if tai_datablock(hp).is_global then
                          begin
                            asmwrite(#9'.comm'#9);
+{$ifdef avr}
+                           asmwrite(ReplaceForbiddenChars(tai_datablock(hp).sym.name));
+{$else avr}
                            asmwrite(tai_datablock(hp).sym.name);
+{$endif avr}
                            asmwrite(','+tostr(tai_datablock(hp).size));
                            asmwrite(','+tostr(last_align));
                            asmln;
@@ -764,7 +758,11 @@ implementation
                        else
                          begin
                            asmwrite(#9'.lcomm'#9);
+{$ifdef avr}
+                           asmwrite(ReplaceForbiddenChars(tai_datablock(hp).sym.name));
+{$else avr}
                            asmwrite(tai_datablock(hp).sym.name);
+{$endif avr}
                            asmwrite(','+tostr(tai_datablock(hp).size));
                            asmwrite(','+tostr(last_align));
                            asmln;
@@ -776,17 +774,30 @@ implementation
                        if Tai_datablock(hp).is_global then
                          begin
                            asmwrite(#9'.globl ');
+{$ifdef avr}
+                           asmwriteln(ReplaceForbiddenChars(Tai_datablock(hp).sym.name));
+{$else avr}
                            asmwriteln(Tai_datablock(hp).sym.name);
+{$endif avr}
                          end;
                        if (target_info.system <> system_arm_linux) then
                          sepChar := '@'
                        else
                          sepChar := '%';
                        if (tf_needs_symbol_type in target_info.flags) then
+{$ifdef avr}
+                       if (tf_needs_symbol_type in target_info.flags) then
+                         asmwriteln(#9'.type '+ReplaceForbiddenChars(Tai_datablock(hp).sym.name)+','+sepChar+'object');
+                       if (tf_needs_symbol_size in target_info.flags) and (tai_datablock(hp).size > 0) then
+                          asmwriteln(#9'.size '+ReplaceForbiddenChars(Tai_datablock(hp).sym.name)+','+tostr(Tai_datablock(hp).size));
+                       asmwrite(ReplaceForbiddenChars(Tai_datablock(hp).sym.name));
+{$else avr}
+                       if (tf_needs_symbol_type in target_info.flags) then
                          asmwriteln(#9'.type '+Tai_datablock(hp).sym.name+','+sepChar+'object');
                        if (tf_needs_symbol_size in target_info.flags) and (tai_datablock(hp).size > 0) then
                          asmwriteln(#9'.size '+Tai_datablock(hp).sym.name+','+tostr(Tai_datablock(hp).size));
                        asmwrite(Tai_datablock(hp).sym.name);
+{$endif avr}
                        asmwriteln(':');
                        asmwriteln(#9'.zero '+tostr(Tai_datablock(hp).size));
                      end;
@@ -835,7 +846,8 @@ implementation
                  aitconst_rva_symbol,
                  aitconst_secrel32_symbol,
                  aitconst_darwin_dwarf_delta32,
-                 aitconst_darwin_dwarf_delta64:
+                 aitconst_darwin_dwarf_delta64,
+                 aitconst_half16bit:
                    begin
                      if (target_info.system in systems_darwin) and
                         (constdef in [aitconst_uleb128bit,aitconst_sleb128bit]) then
@@ -881,6 +893,9 @@ implementation
                              { 64 bit constants are already handled above in this case }
                              s:=tostr(longint(tai_const(hp).value));
 {$endif cpu64bitaddr}
+                           if constdef = aitconst_half16bit then
+                             s:='('+s+')/2';
+
                            AsmWrite(s);
                            inc(l,length(s));
                            { Values with symbols are written on a single line to improve
@@ -1221,6 +1236,24 @@ implementation
                AsmLn;
              end;
 
+           ait_seh_directive :
+             begin
+               AsmWrite('.'+sehdirectivestr[tai_seh_directive(hp).kind]);
+               case tai_seh_directive(hp).datatype of
+                 sd_none:;
+                 sd_string:
+                   AsmWrite(' '+tai_seh_directive(hp).data.name^);
+                 sd_reg:
+                   AsmWrite(' '+gas_regname(tai_seh_directive(hp).data.reg));
+                 sd_offset:
+                   AsmWrite(' '+tostr(tai_seh_directive(hp).data.offset));
+                 sd_regoffset:
+                   AsmWrite(' '+gas_regname(tai_seh_directive(hp).data.reg)+', '+
+                     tostr(tai_seh_directive(hp).data.offset));
+               end;
+               AsmLn;
+             end;
+
            else
              internalerror(2006012201);
          end;

+ 0 - 27
compiler/alpha/cpubase.pas

@@ -155,40 +155,13 @@ unit cpubase;
        LoReg = R_0;
        HiReg = R_31;
 
-       { Constant defining possibly all registers which might require saving }
-       ALL_REGISTERS = [firstreg..lastreg];
-
-       general_registers = [R_0..R_31];
-
-       availabletempregsint = [R_0..R_14,R_16..R_25,R_28];
-       availabletempregsfpu = [R_F0..R_F30];
-       availabletempregsmm  = [];
-
-       intregs = [R_0..R_31];
-       usableregsint = [];
-       c_countusableregsint = 26;
-
        maxfpuregs = 32;
-       fpuregs = [R_F0..R_F31];
-       usableregsfpu = [];
-       c_countusableregsfpu = 31;
-
-       mmregs = [];
-       usableregsmm = [];
-       c_countusableregsmm  = 0;
 
        max_operands = 4;
 
        registers_saved_on_cdecl = [R_9..R_14,R_F2..R_F9];
 
-       firstsaveintreg = R_NO;
-       lastsaveintreg  = R_NO;
-       firstsavefpureg = R_NO;
-       lastsavefpureg  = R_NO;
-       firstsavemmreg  = R_NO;
-       lastsavemmreg   = R_NO;
        maxvarregs = 6;
-
        varregs : Array [1..maxvarregs] of Tregister =
                  (R_9,R_10,R_11,R_12,R_13,R_14);
 

+ 0 - 2
compiler/arm/agarmgas.pas

@@ -81,8 +81,6 @@ unit agarmgas;
         if (current_settings.fputype = fpu_soft) then
           result:='-mfpu=softvfp '+result;
 
-        if current_settings.cputype = cpu_cortexm3 then
-          result:='-mcpu=cortex-m3 -mthumb -mthumb-interwork '+result;
         if current_settings.cputype = cpu_armv7m then
           result:='-march=armv7m -mthumb -mthumb-interwork '+result;
       end;

+ 5 - 1
compiler/arm/aoptcpu.pas

@@ -51,7 +51,11 @@ Implementation
 
   function CanBeCond(p : tai) : boolean;
     begin
-      result:=(p.typ=ait_instruction) and (taicpu(p).condition=C_None);
+      result:=
+        (p.typ=ait_instruction) and
+        (taicpu(p).condition=C_None) and
+        ((taicpu(p).opcode<>A_BLX) or
+         (taicpu(p).oper[0]^.typ=top_reg));
     end;
 
 

+ 3 - 1
compiler/arm/armatt.inc

@@ -202,5 +202,7 @@
 'iteet',
 'ittet',
 'itett',
-'itttt'
+'itttt',
+'tbb',
+'tbh'
 );

+ 2 - 0
compiler/arm/armatts.inc

@@ -202,5 +202,7 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufNONE,
+attsufNONE,
 attsufNONE
 );

+ 3 - 0
compiler/arm/armins.dat

@@ -623,3 +623,6 @@ reg32,reg32,reg32,reg32  \x16\x00\x80\x90		 ARM7
 [ITETT]
 
 [ITTTT]
+
+[TBB]
+[TBH]

+ 3 - 1
compiler/arm/armop.inc

@@ -202,5 +202,7 @@ A_ITTTE,
 A_ITEET,
 A_ITTET,
 A_ITETT,
-A_ITTTT
+A_ITTTT,
+A_TBB,
+A_TBH
 );

+ 10 - 3
compiler/arm/cgcpu.pas

@@ -510,14 +510,21 @@ unit cgcpu;
 
 
     procedure tcgarm.a_call_name(list : TAsmList;const s : string; weak: boolean);
+      var
+        branchopcode: tasmop;
       begin
+        { check not really correct: should only be used for non-Thumb cpus }
+        if (current_settings.cputype<cpu_armv5) then
+          branchopcode:=A_BL
+        else
+          branchopcode:=A_BLX;
         if target_info.system<>system_arm_darwin then
           if not weak then
-            list.concat(taicpu.op_sym(A_BL,current_asmdata.RefAsmSymbol(s)))
+            list.concat(taicpu.op_sym(branchopcode,current_asmdata.RefAsmSymbol(s)))
           else
-            list.concat(taicpu.op_sym(A_BL,current_asmdata.WeakRefAsmSymbol(s)))
+            list.concat(taicpu.op_sym(branchopcode,current_asmdata.WeakRefAsmSymbol(s)))
         else
-          list.concat(taicpu.op_sym(A_BL,get_darwin_call_stub(s,weak)));
+          list.concat(taicpu.op_sym(branchopcode,get_darwin_call_stub(s,weak)));
 {
         the compiler does not properly set this flag anymore in pass 1, and
         for now we only need it after pass 2 (I hope) (JM)

+ 0 - 33
compiler/arm/cpubase.pas

@@ -213,42 +213,9 @@ unit cpubase;
     const
       max_operands = 4;
 
-      {# Constant defining possibly all registers which might require saving }
-      ALL_OTHERREGISTERS = [];
-
-      general_superregisters = [RS_R0..RS_PC];
-
-      {# Table of registers which can be allocated by the code generator
-         internally, when generating the code.
-      }
-      { legend:                                                                }
-      { xxxregs = set of all possibly used registers of that type in the code  }
-      {           generator                                                    }
-      { usableregsxxx = set of all 32bit components of registers that can be   }
-      {           possible allocated to a regvar or using getregisterxxx (this }
-      {           excludes registers which can be only used for parameter      }
-      {           passing on ABI's that define this)                           }
-      { c_countusableregsxxx = amount of registers in the usableregsxxx set    }
-
       maxintregs = 15;
-      { to determine how many registers to use for regvars }
-      maxintscratchregs = 3;
-      usableregsint = [RS_R4..RS_R10];
-      c_countusableregsint = 7;
-
       maxfpuregs = 8;
-      fpuregs = [RS_F0..RS_F7];
-      usableregsfpu = [RS_F4..RS_F7];
-      c_countusableregsfpu = 4;
-
-      mmregs = [RS_D0..RS_D15];
-      usableregsmm = [RS_D8..RS_D15];
-      c_countusableregsmm  = 8;
-
       maxaddrregs = 0;
-      addrregs    = [];
-      usableregsaddr = [];
-      c_countusableregsaddr = 0;
 
 {*****************************************************************************
                                 Operand Sizes

+ 865 - 44
compiler/arm/cpuinfo.pas

@@ -34,16 +34,17 @@ Type
       (cpu_none,
        cpu_armv3,
        cpu_armv4,
+       cpu_armv4t,
        cpu_armv5,
        cpu_armv6,
-       cpu_armv7m,
-       cpu_cortexm3
+       cpu_armv7,
+       cpu_armv7m
       );
 
 Const
-   cpu_arm = [cpu_none,cpu_armv3,cpu_armv4,cpu_armv5];
+   cpu_arm = [cpu_none,cpu_armv3,cpu_armv4,cpu_armv4t,cpu_armv5];
    cpu_thumb = [];
-   cpu_thumb2 = [cpu_armv7m,cpu_cortexm3];
+   cpu_thumb2 = [cpu_armv7m];
 
 Type
    tfputype =
@@ -64,6 +65,7 @@ Type
       ct_lpc2114,
       ct_lpc2124,
       ct_lpc2194,
+      ct_lpc1768,
 
       { ATMEL }
       ct_at91sam7s256,
@@ -72,12 +74,87 @@ Type
       ct_at91sam7xc256,
 		
       { STMicroelectronics }
+      ct_stm32f103rb,
       ct_stm32f103re,
 
-      { TI }
-      stellaris
+      { TI - Fury Class - 64 K Flash, 16 K SRAM Devices }
+      ct_lm3s1110,
+      ct_lm3s1133,
+      ct_lm3s1138,
+      ct_lm3s1150,
+      ct_lm3s1162,
+      ct_lm3s1165,
+      ct_lm3s1166,
+      ct_lm3s2110,
+      ct_lm3s2139,
+      ct_lm3s6100,
+      ct_lm3s6110,
+
+      { TI - Fury Class - 128K Flash, 32K SRAM devices }
+      ct_lm3s1601,
+      ct_lm3s1608,
+      ct_lm3s1620,
+      ct_lm3s1635,
+      ct_lm3s1636,
+      ct_lm3s1637,
+      ct_lm3s1651,
+      ct_lm3s2601,
+      ct_lm3s2608,
+      ct_lm3s2620,
+      ct_lm3s2637,
+      ct_lm3s2651,
+      ct_lm3s6610,
+      ct_lm3s6611,
+      ct_lm3s6618,
+      ct_lm3s6633,
+      ct_lm3s6637,
+      ct_lm3s8630,
+
+      { TI - Fury Class - 256K Flash, 64K SRAM devices }
+      ct_lm3s1911,
+      ct_lm3s1918,
+      ct_lm3s1937,
+      ct_lm3s1958,
+      ct_lm3s1960,
+      ct_lm3s1968,
+      ct_lm3s1969,
+      ct_lm3s2911,
+      ct_lm3s2918,
+      ct_lm3s2919,
+      ct_lm3s2939,
+      ct_lm3s2948,
+      ct_lm3s2950,
+      ct_lm3s2965,
+      ct_lm3s6911,
+      ct_lm3s6918,
+      ct_lm3s6938,
+      ct_lm3s6950,
+      ct_lm3s6952,
+      ct_lm3s6965,
+      ct_lm3s8930,
+      ct_lm3s8933,
+      ct_lm3s8938,
+      ct_lm3s8962,
+      ct_lm3s8970,
+      ct_lm3s8971,
+
+      { TI - Tempest Tempest - 256 K Flash, 64 K SRAM }
+      ct_lm3s5951,
+      ct_lm3s5956,
+      ct_lm3s1b21,
+      ct_lm3s2b93,
+      ct_lm3s5b91,
+      ct_lm3s9b81,
+      ct_lm3s9b90,
+      ct_lm3s9b92,
+      ct_lm3s9b95,
+      ct_lm3s9b96,
+
+      // generic Thumb2 target
+      ct_thumb2bare
      );
 
+
 Const
    {# Size of native extended floating point type }
    extended_size = 12;
@@ -107,10 +184,11 @@ Const
    cputypestr : array[tcputype] of string[8] = ('',
      'ARMV3',
      'ARMV4',
+     'ARMV4T',
      'ARMV5',
      'ARMV6',
-     'ARMV7M',
-     'CORTEXM3'
+     'ARMV7',
+     'ARMV7M'
    );
 
    fputypestr : array[tfputype] of string[6] = ('',
@@ -123,44 +201,787 @@ Const
      'VFPV3'
    );
 
-   controllertypestr : array[tcontrollertype] of string[20] =
-     ('',
-      'LPC2114',
-      'LPC2124',
-      'LPC2194',
-      'AT91SAM7S256',
-      'AT91SAM7SE256',
-      'AT91SAM7X256',
-      'AT91SAM7XC256',
-      'STM32F103RE',
-      'STELLARIS'
-     );
 
-   controllerunitstr : array[tcontrollertype] of string[20] =
-     ('',
-      'LPC21x4',
-      'LPC21x4',
-      'LPC21x4',
-      'AT91SAM7x256',
-      'AT91SAM7x256',
-      'AT91SAM7x256',
-      'AT91SAM7x256',
-      'STM32F103',
-      'STELLARIS'
-     );
+   embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
+   ((
+   	controllertypestr:'';
+        controllerunitstr:'';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:0;
+        srambase:0;
+        sramsize:0
+   	),
 
-   interruptvectors : array[tcontrollertype] of longint =
-     (0,
-      8,
-      8,
-      8,
-      8,
-      8,
-      8,
-      8,
-      12+59, { XL-density }
-      12 { No model specified }
-     );
+        (
+    	controllertypestr:'LPC2114';
+        controllerunitstr:'LPC21x4';
+        interruptvectors:8;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$40000000;
+        sramsize:$00004000
+        ),
+
+        (
+    	controllertypestr:'LPC2124';
+        controllerunitstr:'LPC21x4';
+        interruptvectors:8;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$40000000;
+        sramsize:$00004000
+        ),
+
+        (
+    	controllertypestr:'LPC2194';
+        controllerunitstr:'LPC21x4';
+        interruptvectors:8;
+    	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$40000000;
+        sramsize:$00004000
+    	),
+
+        (
+    	controllertypestr:'LPC1768';
+        controllerunitstr:'LPC1768';
+        interruptvectors:12;
+    	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$10000000;
+        sramsize:$00008000
+    	),
+
+        (
+    	controllertypestr:'AT91SAM7S256';
+        controllerunitstr:'AT91SAM7x256';
+        interruptvectors:8;
+        flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$00200000;
+        sramsize:$00010000
+        ),
+
+        (
+    	controllertypestr:'AT91SAM7SE256';
+        controllerunitstr:'AT91SAM7x256';
+        interruptvectors:8;
+        flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$00200000;
+        sramsize:$00010000
+        ),
+
+        (
+    	controllertypestr:'AT91SAM7X256';
+        controllerunitstr:'AT91SAM7x256';
+        interruptvectors:8;
+        flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$00200000;
+        sramsize:$00010000
+        ),
+
+        (
+    	controllertypestr:'AT91SAM7XC256';
+        controllerunitstr:'AT91SAM7x256';
+        interruptvectors:8;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$00200000;
+        sramsize:$00010000
+        ),
+
+      	// ct_stm32f103rb,
+        (
+    	controllertypestr:'STM32F103RB';
+        controllerunitstr:'STM32F103';
+        interruptvectors:12;
+        flashbase:$08000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00005000
+        ),
+        // ct_stm32f103re,
+        (
+    	controllertypestr:'STM32F103RE';
+        controllerunitstr:'STM32F103';
+        interruptvectors:12;
+        flashbase:$08000000;
+        flashsize:$00080000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+
+      { TI - 64 K Flash, 16 K SRAM Devices }
+      	// ct_lm3s1110,
+        (
+    	controllertypestr:'LM3S1110';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s1133,
+        (
+    	controllertypestr:'LM3S1133';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s1138,
+        (
+    	controllertypestr:'LM3S1138';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s1150,
+        (
+    	controllertypestr:'LM3S1150';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s1162,
+        (
+    	controllertypestr:'LM3S1162';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s1165,
+        (
+    	controllertypestr:'LM3S1165';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s1166,
+        (
+    	controllertypestr:'LM3S1166';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s2110,
+        (
+    	controllertypestr:'LM3S2110';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s2139,
+        (
+    	controllertypestr:'LM3S2139';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s6100,
+        (
+    	controllertypestr:'LM3S6100';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+      	// ct_lm3s6110,
+        (
+    	controllertypestr:'LM3S6110';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00010000;
+        srambase:$20000000;
+        sramsize:$00004000
+        ),
+
+        { TI - 128K Flash, 32K SRAM devices }
+      	// ct_lm3s1601,
+        (
+    	controllertypestr:'LM3S1601';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s1608,
+        (
+    	controllertypestr:'LM3S1608';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s1620,
+        (
+    	controllertypestr:'LM3S1620';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s1635,
+        (
+    	controllertypestr:'LM3S1635';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s1636,
+        (
+    	controllertypestr:'LM3S1636';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s1637,
+        (
+    	controllertypestr:'LM3S1637';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s1651,
+        (
+    	controllertypestr:'LM3S1651';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s2601,
+        (
+    	controllertypestr:'LM3S2601';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s2608,
+        (
+    	controllertypestr:'LM3S2608';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s2620,
+        (
+    	controllertypestr:'LM3S2620';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s2637,
+        (
+    	controllertypestr:'LM3S2637';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s2651,
+        (
+    	controllertypestr:'LM3S2651';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s6610,
+        (
+    	controllertypestr:'LM3S6610';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s6611,
+        (
+    	controllertypestr:'LM3S6611';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s6618,
+        (
+    	controllertypestr:'LM3S6618';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s6633,
+        (
+    	controllertypestr:'LM3S6633';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s6637,
+        (
+    	controllertypestr:'LM3S6637';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+      	// ct_lm3s8630,
+        (
+    	controllertypestr:'LM3S8630';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00020000;
+        srambase:$20000000;
+        sramsize:$00008000
+        ),
+
+        { TI - 256K Flash, 64K SRAM devices }
+      	// ct_lm3s1911,
+        (
+    	controllertypestr:'LM3S1911';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s1918,
+        (
+    	controllertypestr:'LM3S1918';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s1937,
+        (
+    	controllertypestr:'LM3S1937';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s1958,
+        (
+    	controllertypestr:'LM3S1958';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s1960,
+        (
+    	controllertypestr:'LM3S1960';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s1968,
+        (
+    	controllertypestr:'LM3S1968';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s1969,
+        (
+    	controllertypestr:'LM3S1969';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2911,
+        (
+    	controllertypestr:'LM3S2911';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2918,
+        (
+    	controllertypestr:'LM3S2918';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2919,
+        (
+    	controllertypestr:'LM3S2919';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2939,
+        (
+    	controllertypestr:'LM3S2939';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2948,
+        (
+    	controllertypestr:'LM3S2948';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2950,
+        (
+    	controllertypestr:'LM3S2950';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s2965,
+        (
+    	controllertypestr:'LM3S2965';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s6911,
+        (
+    	controllertypestr:'LM3S6911';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s6918,
+        (
+    	controllertypestr:'LM3S6918';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s6938,
+        (
+    	controllertypestr:'LM3S6938';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s6950,
+        (
+    	controllertypestr:'LM3S6950';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s6952,
+        (
+    	controllertypestr:'LM3S6952';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s6965,
+        (
+    	controllertypestr:'LM3S6965';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s8930,
+        (
+    	controllertypestr:'LM3S8930';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s8933,
+        (
+    	controllertypestr:'LM3S8933';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s8938,
+        (
+    	controllertypestr:'LM3S8938';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s8962,
+        (
+    	controllertypestr:'LM3S8962';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s8970,
+        (
+    	controllertypestr:'LM3S8970';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+      	// ct_lm3s8971,
+        (
+    	controllertypestr:'LM3S8971';
+        controllerunitstr:'LM3FURY';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+
+        { TI - Tempest parts - 256 K Flash, 64 K SRAM }
+        // ct_lm3s5951,
+        (
+    	controllertypestr:'LM3S5951';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s5956,
+        (
+    	controllertypestr:'LM3S5956';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s1b21,
+        (
+    	controllertypestr:'LM3S1B21';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s2b93,
+        (
+    	controllertypestr:'LM3S2B93';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s5b91,
+        (
+    	controllertypestr:'LM3S5B91';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s9b81,
+        (
+    	controllertypestr:'LM3S9B81';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s9b90,
+        (
+    	controllertypestr:'LM3S9B90';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s9b92,
+        (
+    	controllertypestr:'LM3S9B92';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s9b95,
+        (
+    	controllertypestr:'LM3S9B95';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // ct_lm3s9b96,
+        (
+    	controllertypestr:'LM3S9B96';
+        controllerunitstr:'LM3TEMPEST';
+        interruptvectors:72;
+	flashbase:$00000000;
+        flashsize:$00040000;
+        srambase:$20000000;
+        sramsize:$00010000
+        ),
+        // bare bones Thumb2
+        (
+    	controllertypestr:'THUMB2_BARE';
+        controllerunitstr:'THUMB2_BARE';
+        interruptvectors:128;
+	flashbase:$00000000;
+        flashsize:$00100000;
+        srambase:$20000000;
+        sramsize:$00100000
+        )
+    );
 
    vfp_scalar = [fpu_vfpv2,fpu_vfpv3];
 

+ 50 - 11
compiler/arm/narmset.pas

@@ -73,6 +73,7 @@ implementation
         last : TConstExprInt;
         indexreg : tregister;
         href : treference;
+        tablelabel: TAsmLabel;
 
         procedure genitem(list:TAsmList;t : pcaselabel);
           var
@@ -90,6 +91,22 @@ implementation
               genitem(list,t^.greater);
           end;
 
+        procedure genitem_thumb2(list:TAsmList;t : pcaselabel);
+          var
+            i : aint;
+          begin
+            if assigned(t^.less) then
+              genitem_thumb2(list,t^.less);
+            { fill possible hole }
+            for i:=last.svalue+1 to t^._low.svalue-1 do
+              list.concat(Tai_const.Create_rel_sym(aitconst_half16bit,tablelabel,elselabel));
+            for i:=t^._low.svalue to t^._high.svalue do
+              list.concat(Tai_const.Create_rel_sym(aitconst_half16bit,tablelabel,blocklabel(t^.blockid)));
+            last:=t^._high.svalue;
+            if assigned(t^.greater) then
+              genitem_thumb2(list,t^.greater);
+          end;
+
       begin
         if not(jumptable_no_range) then
           begin
@@ -101,17 +118,39 @@ implementation
         { make it a 32bit register }
         indexreg:=cg.makeregsize(current_asmdata.CurrAsmList,hregister,OS_INT);
         cg.a_load_reg_reg(current_asmdata.CurrAsmList,opsize,OS_INT,hregister,indexreg);
-        cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SUB,OS_ADDR,min_+1,indexreg,indexreg);
-        { create reference }
-        reference_reset(href,4);
-        href.base:=NR_PC;
-        href.index:=indexreg;
-        href.shiftmode:=SM_LSL;
-        href.shiftimm:=2;
-        cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,NR_PC);
-        { generate jump table }
-        last:=min_;
-        genitem(current_asmdata.CurrAsmList,hp);
+
+        if current_settings.cputype in cpu_thumb2 then
+          begin
+            { adjust index }
+            cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SUB,OS_ADDR,min_,indexreg,indexreg);
+            { create reference and generate jump table }
+            reference_reset(href,4);
+            href.base:=NR_PC;
+            href.index:=indexreg;
+            href.shiftmode:=SM_LSL;
+            href.shiftimm:=1;
+            current_asmdata.CurrAsmList.Concat(taicpu.op_ref(A_TBH,href));
+            { generate jump table }
+            current_asmdata.getjumplabel(tablelabel);
+            cg.a_label(current_asmdata.CurrAsmList,tablelabel);
+            last:=min_;
+            genitem_thumb2(current_asmdata.CurrAsmList,hp);
+          end
+        else
+          begin
+            { adjust index }
+            cg.a_op_const_reg_reg(current_asmdata.CurrAsmList,OP_SUB,OS_ADDR,min_+1,indexreg,indexreg);
+            { create reference and generate jump table }
+            reference_reset(href,4);
+            href.base:=NR_PC;
+            href.index:=indexreg;
+            href.shiftmode:=SM_LSL;
+            href.shiftimm:=2;
+            cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,NR_PC);
+            { generate jump table }
+            last:=min_;
+            genitem(current_asmdata.CurrAsmList,hp);
+          end;
       end;
 
 

+ 23 - 0
compiler/arm/rgcpu.pas

@@ -62,6 +62,8 @@ unit rgcpu;
       procinfo;
 
     procedure trgintcputhumb2.add_cpu_interferences(p: tai);
+      var
+        r : tregister;
       begin
         if p.typ=ait_instruction then
           begin
@@ -95,6 +97,27 @@ unit rgcpu;
                         end;
                     end;
                 end;
+              A_LDRB,
+              A_STRB,
+              A_STR,
+              A_LDR,
+              A_LDRH,
+              A_STRH,
+              A_LDRSB,
+              A_LDRSH,
+              A_LDRD,
+              A_STRD:
+                { don't mix up the framepointer and stackpointer with pre/post indexed operations }
+                if (taicpu(p).oper[1]^.typ=top_ref) and
+                  (taicpu(p).oper[1]^.ref^.addressmode in [AM_PREINDEXED,AM_POSTINDEXED]) then
+                  begin
+                    add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(current_procinfo.framepointer));
+                    { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
+                    {        while compiling the compiler. }
+                    r:=NR_STACK_POINTER_REG;
+                    if current_procinfo.framepointer<>r then
+                      add_edge(getsupreg(taicpu(p).oper[1]^.ref^.base),getsupreg(r));
+                  end;
             end;
           end;
       end;

+ 2 - 0
compiler/assemble.pas

@@ -1393,6 +1393,8 @@ Implementation
              ait_cutobject :
                if SmartAsm then
                 break;
+             ait_seh_directive :
+               tai_seh_directive(hp).generate_code(objdata);
            end;
            hp:=Tai(hp.next);
          end;

+ 173 - 1
compiler/avr/aasmcpu.pas

@@ -29,7 +29,8 @@ uses
   cclasses,
   globtype,globals,verbose,
   aasmbase,aasmtai,aasmdata,aasmsym,
-  cgbase,cgutils,cpubase,cpuinfo;
+  cgbase,cgutils,cpubase,cpuinfo,
+  ogbase;
 
     const
       { "mov reg,reg" source operand number }
@@ -37,7 +38,19 @@ uses
       { "mov reg,reg" source operand number }
       O_MOV_DEST = 0;
 
+      maxinfolen = 5;
+
     type
+      tinsentry = record
+        opcode  : tasmop;
+        ops     : byte;
+        optypes : array[0..3] of longint;
+        code    : array[0..maxinfolen] of char;
+        flags   : longint;
+      end;
+
+      pinsentry=^tinsentry;
+
       taicpu = class(tai_cpu_abstract_sym)
          constructor op_none(op : tasmop);
 
@@ -61,6 +74,24 @@ uses
 
          { register spilling code }
          function spilling_get_operation_type(opnr: longint): topertype;override;
+
+         { assembler }
+      public
+         { the next will reset all instructions that can change in pass 2 }
+         procedure ResetPass1;override;
+         procedure ResetPass2;override;
+{         function  CheckIfValid:boolean;
+         function GetString:string; }
+         function  Pass1(objdata:TObjData):longint;override;
+//         procedure Pass2(objdata:TObjData);override;
+         function calcsize(p:PInsEntry):shortint;
+      private
+         { next fields are filled in pass1, so pass2 is faster }
+         inssize   : shortint;
+         insoffset : longint;
+         insentry  : PInsEntry;
+         LastInsOffset : longint; { need to be public to be reset }
+         function  FindInsentry(objdata:TObjData):boolean;
       end;
 
       tai_align = class(tai_align_abstract)
@@ -75,6 +106,10 @@ uses
 
     function setcondition(i : taicpu;c : tasmcond) : taicpu;
 
+    { replaces cond. branches by rjmp/jmp and the inverse cond. branch if needed
+      and transforms special instructions to valid instruction encodings }
+    procedure finalizeavrcode(list : TAsmList);
+
 implementation
 
 {*****************************************************************************
@@ -222,6 +257,84 @@ implementation
       end;
 
 
+    function  taicpu.calcsize(p:PInsEntry):shortint;
+      begin
+        case opcode of
+          A_CALL,
+          A_JMP:
+            result:=4;
+          A_LDS:
+            if (getsupreg(oper[0]^.reg)>=RS_R16) and (getsupreg(oper[0]^.reg)<=RS_R31) and
+              (oper[1]^.val>=0) and (oper[1]^.val<=127) then
+              result:=2
+            else
+              result:=4;
+          A_STS:
+            if (getsupreg(oper[1]^.reg)>=RS_R16) and (getsupreg(oper[1]^.reg)<=RS_R31) and
+              (oper[0]^.val>=0) and (oper[0]^.val<=127) then
+              result:=2
+            else
+              result:=4;
+        else
+          result:=2;
+        end;
+      end;
+
+
+    procedure taicpu.ResetPass1;
+      begin
+        { we need to reset everything here, because the choosen insentry
+          can be invalid for a new situation where the previously optimized
+          insentry is not correct }
+        InsEntry:=nil;
+        InsSize:=0;
+        LastInsOffset:=-1;
+      end;
+
+
+    procedure taicpu.ResetPass2;
+      begin
+{        { we are here in a second pass, check if the instruction can be optimized }
+        if assigned(InsEntry) and
+           ((InsEntry^.flags and IF_PASS2)<>0) then
+         begin
+           InsEntry:=nil;
+           InsSize:=0;
+         end;
+}
+        LastInsOffset:=-1;
+      end;
+
+
+    function taicpu.FindInsentry(objdata:TObjData):boolean;
+      begin
+        result:=false;
+      end;
+
+
+    function taicpu.Pass1(objdata:TObjData):longint;
+      begin
+        Pass1:=0;
+        { Save the old offset and set the new offset }
+        InsOffset:=ObjData.CurrObjSec.Size;
+        InsSize:=calcsize(InsEntry);
+        { Error? }
+        if (Insentry=nil) and (InsSize=-1) then
+          exit;
+        { set the file postion }
+        current_filepos:=fileinfo;
+
+        { Get InsEntry }
+        if FindInsEntry(objdata) then
+         begin
+           LastInsOffset:=InsOffset;
+           Pass1:=InsSize;
+           exit;
+         end;
+        LastInsOffset:=-1;
+      end;
+
+
     function spilling_create_load(const ref:treference;r:tregister):Taicpu;
       begin
         case getregtype(r) of
@@ -277,6 +390,65 @@ implementation
       end;
 
 
+    procedure finalizeavrcode(list : TAsmList);
+      var
+        CurrOffset : longint;
+        curtai : tai;
+        again : boolean;
+        l : tasmlabel;
+      begin
+        again:=true;
+        while again do
+          begin
+            again:=false;
+            CurrOffset:=0;
+            curtai:=tai(list.first);
+            while assigned(curtai) do
+              begin
+                { instruction? }
+                if not(curtai.typ in SkipInstr) then
+                  case curtai.typ of
+                    ait_instruction:
+                      begin
+                        taicpu(curtai).InsOffset:=CurrOffset;
+                        inc(CurrOffset,taicpu(curtai).calcsize(nil));
+                      end;
+                    ait_align:
+                      inc(CurrOffset,tai_align(curtai).aligntype);
+                    ait_marker:
+                      ;
+                    ait_label:
+                      begin
+                        tai_label(curtai).labsym.offset:=CurrOffset;
+                      end;
+                    else
+                      internalerror(2011082401);
+                  end;
+                curtai:=tai(curtai.next);
+              end;
+
+            curtai:=tai(list.first);
+            while assigned(curtai) do
+              begin
+                if (curtai.typ=ait_instruction) and
+                  (taicpu(curtai).opcode in [A_BRxx]) and
+                  ((taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset>64) or
+                   (taicpu(curtai).InsOffset-taicpu(curtai).oper[0]^.ref^.symbol.offset<-63)
+                  ) then
+                  begin
+                    current_asmdata.getjumplabel(l);
+                    list.insertafter(tai_label.create(l),curtai);
+                    list.insertafter(taicpu.op_sym(A_JMP,taicpu(curtai).oper[0]^.ref^.symbol),curtai);
+                    taicpu(curtai).oper[0]^.ref^.symbol:=l;
+                    taicpu(curtai).condition:=inverse_cond(taicpu(curtai).condition);
+                    again:=true;
+                  end;
+                curtai:=tai(curtai.next);
+              end;
+          end;
+      end;
+
+
 begin
   cai_cpu:=taicpu;
   cai_align:=tai_align;

+ 63 - 17
compiler/avr/cgcpu.pas

@@ -1605,27 +1605,73 @@ unit cgcpu;
 
     procedure tcgavr.a_jmp_cond(list : TAsmList;cond : TOpCmp;l: tasmlabel);
       var
-        ai : taicpu;
+        ai1,ai2 : taicpu;
+        hl : TAsmLabel;
       begin
-        { TODO : fix a_jmp_cond }
-      {
-        ai:=Taicpu.Op_sym(A_BRxx,l);
+        ai1:=Taicpu.Op_sym(A_BRxx,l);
+        ai1.is_jmp:=true;
+        hl:=nil;
         case cond of
           OC_EQ:
-            ai.SetCondition(C_EQ);
-          OC_GT
-          OC_LT
-          OC_GTE
-          OC_LTE
-          OC_NE
-          OC_BE
-          OC_B
-          OC_AE
-          OC_A:
+            ai1.SetCondition(C_EQ);
+          OC_GT:
+            begin
+              { emulate GT }
+              current_asmdata.getjumplabel(hl);
+              ai2:=Taicpu.Op_Sym(A_BRxx,hl);
+              ai2.SetCondition(C_EQ);
+              ai2.is_jmp:=true;
+              list.concat(ai2);
+
+              ai1.SetCondition(C_GE);
+            end;
+          OC_LT:
+            ai1.SetCondition(C_LT);
+          OC_GTE:
+            ai1.SetCondition(C_GE);
+          OC_LTE:
+            begin
+              { emulate LTE }
+              ai2:=Taicpu.Op_Sym(A_BRxx,l);
+              ai2.SetCondition(C_EQ);
+              ai2.is_jmp:=true;
+              list.concat(ai2);
 
-        ai.is_jmp:=true;
-        list.concat(ai);
-        }
+              ai1.SetCondition(C_LT);
+            end;
+          OC_NE:
+            ai1.SetCondition(C_NE);
+          OC_BE:
+            begin
+              { emulate BE }
+              ai2:=Taicpu.Op_Sym(A_BRxx,l);
+              ai2.SetCondition(C_EQ);
+              ai2.is_jmp:=true;
+              list.concat(ai2);
+
+              ai1.SetCondition(C_LO);
+            end;
+          OC_B:
+            ai1.SetCondition(C_LO);
+          OC_AE:
+            ai1.SetCondition(C_SH);
+          OC_A:
+            begin
+              { emulate A (unsigned GT) }
+              current_asmdata.getjumplabel(hl);
+              ai2:=Taicpu.Op_Sym(A_BRxx,hl);
+              ai2.SetCondition(C_EQ);
+              ai2.is_jmp:=true;
+              list.concat(ai2);
+
+              ai1.SetCondition(C_SH);
+            end;
+          else
+            internalerror(2011082501);
+        end;
+        list.concat(ai1);
+        if assigned(hl) then
+          a_label(list,hl);
       end;
 
 

+ 13 - 33
compiler/avr/cpubase.pas

@@ -169,42 +169,9 @@ unit cpubase;
     const
       max_operands = 4;
 
-      {# Constant defining possibly all registers which might require saving }
-      ALL_OTHERREGISTERS = [];
-
-      general_superregisters = [RS_R0..RS_R31];
-
-      {# Table of registers which can be allocated by the code generator
-         internally, when generating the code.
-      }
-      { legend:                                                                }
-      { xxxregs = set of all possibly used registers of that type in the code  }
-      {           generator                                                    }
-      { usableregsxxx = set of all 32bit components of registers that can be   }
-      {           possible allocated to a regvar or using getregisterxxx (this }
-      {           excludes registers which can be only used for parameter      }
-      {           passing on ABI's that define this)                           }
-      { c_countusableregsxxx = amount of registers in the usableregsxxx set    }
-
       maxintregs = 15;
-      { to determine how many registers to use for regvars }
-      maxintscratchregs = 3;
-      usableregsint = [RS_R4..RS_R10];
-      c_countusableregsint = 7;
-
       maxfpuregs = 0;
-      fpuregs = [];
-      usableregsfpu = [];
-      c_countusableregsfpu = 0;
-
-      mmregs = [];
-      usableregsmm = [];
-      c_countusableregsmm  = 0;
-
       maxaddrregs = 0;
-      addrregs    = [];
-      usableregsaddr = [];
-      c_countusableregsaddr = 0;
 
 {*****************************************************************************
                                 Operand Sizes
@@ -348,6 +315,8 @@ unit cpubase;
 
     function GetOffsetReg(const r : TRegister;ofs : shortint) : TRegister;
 
+    function ReplaceForbiddenChars(const s: string): string;
+
   implementation
 
     uses
@@ -491,4 +460,15 @@ unit cpubase;
         result:=TRegister(longint(r)+ofs);
       end;
 
+
+    function ReplaceForbiddenChars(const s: string): string;
+      var
+      i : longint;
+      begin
+        Result:=s;
+        for i:=1 to Length(Result) do
+          if Result[i]='$' then
+            Result[i]:='s';
+      end;
+
 end.

+ 88 - 24
compiler/avr/cpuinfo.pas

@@ -45,13 +45,13 @@ Type
       );
 
    tcpuflags =
-      (AVR_HAVE_JMP_CALL,
-       AVR_HAVE_MOVW,
-       AVR_HAVE_LPMX,
-       AVR_HAVE_MUL,
-       AVR_HAVE_RAMPZ,
-       AVR_HAVE_ELPM,
-       AVR_HAVE_ELPMX,
+      (AVR_HAS_JMP_CALL,
+       AVR_HAS_MOVW,
+       AVR_HAS_LPMX,
+       AVR_HAS_MUL,
+       AVR_HAS_RAMPZ,
+       AVR_HAS_ELPM,
+       AVR_HAS_ELPMX,
        AVR_2_BYTE_PC,
        AVR_3_BYTE_PC
       );
@@ -112,23 +112,75 @@ Const
      'LIBGCC'
    );
 
-   controllertypestr : array[tcontrollertype] of string[20] =
-     ('',
-      'ATMEGA16',
-      'ATMEGA32',
-      'ATMEGA48',
-      'ATMEGA64',
-      'ATMEGA128'
-     );
+   embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
+   ((
+   	controllertypestr:'';
+        controllerunitstr:'';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:0;
+        srambase:0;
+        sramsize:0;
+        eeprombase:0;
+        eepromsize:0
+   	),
+        (
+   	controllertypestr:'ATMEGA16';
+        controllerunitstr:'ATMEGA16';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:$4000;
+        srambase:0;
+        sramsize:1024;
+        eeprombase:0;
+        eepromsize:512
+        ),
+        (
+   	controllertypestr:'ATMEGA32';
+        controllerunitstr:'ATMEGA32';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:$8000;
+        srambase:0;
+        sramsize:1024;
+        eeprombase:0;
+        eepromsize:512
+        ),
+   	(
+        controllertypestr:'ATMEGA48';
+        controllerunitstr:'ATMEGA48';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:$1000;
+        srambase:0;
+        sramsize:512;
+        eeprombase:0;
+        eepromsize:256;
+        ),
+   	(
+        controllertypestr:'ATMEGA64';
+        controllerunitstr:'ATMEGA64';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:$10000;
+        srambase:0;
+        sramsize:4096;
+        eeprombase:0;
+        eepromsize:2048;
+        ),
+   	(
+        controllertypestr:'ATMEGA128';
+        controllerunitstr:'ATMEGA128';
+        interruptvectors:0;
+        flashbase:0;
+        flashsize:$20000;
+        srambase:0;
+        sramsize:4096;
+        eeprombase:0;
+        eepromsize:4096;
+        )
+   );
 
-   controllerunitstr : array[tcontrollertype] of string[20] =
-     ('',
-      'ATMEGA16',
-      'ATMEGA32',
-      'ATMEGA48',
-      'ATMEGA64',
-      'ATMEGA128'
-     );
    { Supported optimizations, only used for information }
    supported_optimizerswitches = genericlevel1optimizerswitches+
                                  genericlevel2optimizerswitches+
@@ -137,9 +189,21 @@ Const
                                  [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
                                  [cs_opt_regvar,cs_opt_loopunroll,cs_opt_tailrecursion,
 								  cs_opt_stackframe,cs_opt_nodecse];
+   cpuflagsstr : array[tcpuflags] of string[20] =
+      ('AVR_HAS_JMP_CALL',
+       'AVR_HAS_MOVW',
+       'AVR_HAS_LPMX',
+       'AVR_HAS_MUL',
+       'AVR_HAS_RAMPZ',
+       'AVR_HAS_ELPM',
+       'AVR_HAS_ELPMX',
+       'AVR_2_BYTE_PC',
+       'AVR_3_BYTE_PC'
+      );
+
 
    level1optimizerswitches = genericlevel1optimizerswitches;
-   level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + 
+   level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches +
      [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion];
    level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
 

+ 33 - 4
compiler/avr/raavrgas.pas

@@ -324,6 +324,8 @@ Unit raavrgas;
         hl : tasmlabel;
         ofs : longint;
         registerset : tcpuregisterset;
+        tempstr : string;
+        tempsymtyp : tasmsymtype;
       Begin
         expr:='';
         case actasmtoken of
@@ -355,16 +357,43 @@ Unit raavrgas;
 
           AS_ID: { A constant expression, or a Variable ref.  }
             Begin
+              if (actasmpattern='LO8') or (actasmpattern='HI8') then
+                begin
+                  { Low or High part of a constant (or constant
+                    memory location) }
+                  oper.InitRef;
+                  if actasmpattern='LO8' then
+                    oper.opr.ref.refaddr:=addr_lo8
+                  else
+                    oper.opr.ref.refaddr:=addr_hi8;
+                  Consume(actasmtoken);
+                  Consume(AS_LPAREN);
+                  BuildConstSymbolExpression(false, true,false,l,tempstr,tempsymtyp);
+                  if not assigned(oper.opr.ref.symbol) then
+                    oper.opr.ref.symbol:=current_asmdata.RefAsmSymbol(tempstr)
+                  else
+                    Message(asmr_e_cant_have_multiple_relocatable_symbols);
+                  case oper.opr.typ of
+                    OPR_CONSTANT :
+                      inc(oper.opr.val,l);
+                    OPR_LOCAL :
+                      inc(oper.opr.localsymofs,l);
+                    OPR_REFERENCE :
+                      inc(oper.opr.ref.offset,l);
+                    else
+                      internalerror(200309202);
+                  end;
+                  Consume(AS_RPAREN);
+                end
               { Local Label ? }
-              if is_locallabel(actasmpattern) then
+              else if is_locallabel(actasmpattern) then
                begin
                  CreateLocalLabel(actasmpattern,hl,false);
                  Consume(AS_ID);
                  AddLabelOperand(hl);
                end
-              else
-               { Check for label }
-               if SearchLabel(actasmpattern,hl,false) then
+              { Check for label }
+              else if SearchLabel(actasmpattern,hl,false) then
                 begin
                   Consume(AS_ID);
                   AddLabelOperand(hl);

+ 1 - 1
compiler/cclasses.pas

@@ -46,7 +46,7 @@ interface
        tmemdebug = class
        private
           totalmem,
-          startmem : integer;
+          startmem : int64;
           infostr  : string[40];
        public
           constructor Create(const s:string);

+ 12 - 5
compiler/cgobj.pas

@@ -223,14 +223,10 @@ unit cgobj;
 
           {# Emits instruction to call the method specified by symbol name.
              This routine must be overridden for each new target cpu.
-
-             There is no a_call_ref because loading the reference will use
-             a temp register on most cpu's resulting in conflicts with the
-             registers used for the parameters (PFV)
           }
           procedure a_call_name(list : TAsmList;const s : string; weak: boolean);virtual; abstract;
           procedure a_call_reg(list : TAsmList;reg : tregister);virtual; abstract;
-          procedure a_call_ref(list : TAsmList;ref : treference);virtual; abstract;
+          procedure a_call_ref(list : TAsmList;ref : treference);virtual;
           { same as a_call_name, might be overridden on certain architectures to emit
             static calls without usage of a got trampoline }
           procedure a_call_name_static(list : TAsmList;const s : string);virtual;
@@ -4220,12 +4216,23 @@ implementation
         a_jmp_name(list,externalname);
       end;
 
+
     procedure tcg.a_call_name_static(list : TAsmList;const s : string);
       begin
         a_call_name(list,s,false);
       end;
 
 
+    procedure tcg.a_call_ref(list : TAsmList;ref: treference);
+      var
+        tempreg : TRegister;
+      begin
+        tempreg := getintregister(list, OS_ADDR);
+        a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,tempreg);
+        a_call_reg(list,tempreg);
+      end;
+
+
    function tcg.g_indirect_sym_load(list:TAsmList;const symname: string; weak: boolean): tregister;
       var
         l: tasmsymbol;

+ 13 - 12
compiler/comphook.pas

@@ -84,7 +84,7 @@ type
     countNotes,
     countHints    : longint;  { number of found errors/warnings/notes/hints }
     codesize,
-    datasize      : aword;
+    datasize      : qword;
   { program info }
     isexe,
     ispackage,
@@ -107,20 +107,21 @@ type
   { Special file for bug report }
     reportbugfile : text;
   end;
+
+type
+  EControlCAbort=class(Exception)
+    constructor Create;
+  end;
+  ECompilerAbort=class(Exception)
+    constructor Create;
+  end;
+  ECompilerAbortSilent=class(Exception)
+    constructor Create;
+  end;
+
 var
   status : tcompilerstatus;
 
-    type
-      EControlCAbort=class(Exception)
-        constructor Create;
-      end;
-      ECompilerAbort=class(Exception)
-        constructor Create;
-      end;
-      ECompilerAbortSilent=class(Exception)
-        constructor Create;
-      end;
-
 { Default Functions }
 Function  def_status:boolean;
 Function  def_comment(Level:Longint;const s:ansistring):boolean;

+ 30 - 1
compiler/compiler.pas

@@ -281,7 +281,6 @@ begin
      end;
      DoneVerbose;
   except
-
     on EControlCAbort do
       begin
         try
@@ -312,6 +311,36 @@ begin
       begin
         DoneVerbose;
       end;
+    on EOutOfMemory do
+      begin
+        try
+          Message(general_f_no_memory_left);
+        except
+          on ECompilerAbort do
+            ;
+        end;
+        DoneVerbose;
+      end;
+    on e : EInOutError do
+      begin
+        try
+          Message1(general_f_ioerror,e.message);
+        except
+          on ECompilerAbort do
+            ;
+        end;
+        DoneVerbose;
+      end;
+    on e : EOSError do
+      begin
+        try
+          Message1(general_f_oserror,e.message);
+        except
+          on ECompilerAbort do
+            ;
+        end;
+        DoneVerbose;
+      end;
     on Exception do
       begin
         { General catchall, normally not used }

+ 13 - 5
compiler/comprsrc.pas

@@ -75,7 +75,7 @@ implementation
 uses
   SysUtils,
   cutils,cfileutl,cclasses,
-  Globtype,Globals,Verbose,Fmodule, comphook;
+  Globtype,Globals,Verbose,Fmodule, comphook,cpuinfo;
 
 {****************************************************************************
                               TRESOURCEFILE
@@ -237,7 +237,8 @@ var
   srcfilepath,
   preprocessorbin,
   s : TCmdStr;
-  arch : ansistring;
+  arch,
+  subarch: ansistring;
 
   function WindresFileName(filename: TCmdStr): TCmdStr;
   // to be on the safe side, for files that are passed to the preprocessor,
@@ -271,11 +272,18 @@ begin
       else
         ObjUsed:=(pos('$OBJ',s)>0);
       Replace(s,'$OBJ',maybequoted(OutName));
+      subarch:='all';
       arch:=cpu2str[target_cpu];
-      //Differentiate between arm and armeb
-      if (source_info.cpu=cpu_arm) and (source_info.endian=endian_big) then
-        arch:=arch+'eb';
+      if (source_info.cpu=systems.cpu_arm) then
+        begin
+          //Differentiate between arm and armeb
+          if (source_info.endian=endian_big) then
+            arch:=arch+'eb';
+        end;
       Replace(s,'$ARCH',arch);
+      if target_info.system=system_arm_darwin then
+        subarch:=lower(cputypestr[current_settings.cputype]);
+      Replace(s,'$SUBARCH',subarch);
       case target_info.endian of
         endian_little : Replace(s,'$ENDIAN','littleendian');
         endian_big : Replace(s,'$ENDIAN','bigendian');

+ 3 - 0
compiler/dbgbase.pas

@@ -420,6 +420,9 @@ implementation
             appendsym_absolute(list,tabsolutevarsym(sym));
           propertysym :
             appendsym_property(list,tpropertysym(sym));
+          namespacesym :
+            { ignore namespace syms, they are only of internal use }
+            ;
           else
             internalerror(200601242);
         end;

+ 16 - 26
compiler/dbgstabs.pas

@@ -125,6 +125,10 @@ implementation
         result := Sym.Name
       else
         result := Sym.RealName;
+{$ifdef avr}
+      if target_asm.id=as_gas then
+        result:=ReplaceForbiddenChars(result);
+{$endif avr}
     end;
 
     function GetSymTableName(SymTable : TSymTable) : string;
@@ -133,6 +137,10 @@ implementation
         result := SymTable.Name^
       else
         result := SymTable.RealName^;
+{$ifdef avr}
+      if target_asm.id=as_gas then
+        result:=ReplaceForbiddenChars(result);
+{$endif avr}
     end;
 
     const
@@ -499,7 +507,6 @@ implementation
         stabchar : string[2];
         symname  : string[20];
         st    : ansistring;
-        p     : pchar;
       begin
         { type prefix }
         if def.typ in tagtypes then
@@ -528,9 +535,7 @@ implementation
           unit and then the linenumber is invalid in the current sourcefile }
         st:=st+def_stabstr_evaluate(def,'",${N_LSYM},0,0,0',[]);
         { add to list }
-        getmem(p,length(st)+1);
-        move(pchar(st)^,p^,length(st)+1);
-        list.concat(Tai_stab.create(stab_stabs,p));
+        list.concat(Tai_stab.create_ansistr(stab_stabs,st));
       end;
 
 
@@ -800,8 +805,8 @@ implementation
         if (oo_has_vmt in def.objectoptions) and
            assigned(def.owner) and
            assigned(def.owner.name) then
-          list.concat(Tai_stab.create(stab_stabs,strpnew('"vmt_'+GetSymTableName(def.owner)+tobjectdef(def).objname^+':S'+
-                 def_stab_number(vmttype)+'",'+tostr(N_STSYM)+',0,0,'+tobjectdef(def).vmt_mangledname)));
+          list.concat(Tai_stab.create_ansistr(stab_stabs,ansistring('"vmt_')+GetSymTableName(def.owner)+tobjectdef(def).objname^+':S'+
+                 def_stab_number(vmttype)+'",'+tostr(N_STSYM)+',0,0,'+ansistring(tobjectdef(def).vmt_mangledname)));
       end;
 
 
@@ -832,7 +837,6 @@ implementation
       var
         st,
         ss : ansistring;
-        p: pchar;
         elementdefstabnr: string;
       begin
         { ugly hack: create a temporary subrange type if the lower bound of
@@ -851,9 +855,7 @@ implementation
               st:=st+def_stabstr_evaluate(def.elementdef,'r'+elementdefstabnr+';$1;$2;',[tostr(longint(def.setbase)),tostr(longint(get_max_value(def.elementdef).svalue))]);
             st:=st+'",'+tostr(N_LSYM)+',0,0,0';
             { add to list }
-            getmem(p,length(st)+1);
-            move(pchar(st)^,p^,length(st)+1);
-            list.concat(Tai_stab.create(stab_stabs,p));
+            list.concat(Tai_stab.create_ansistr(stab_stabs,st));
           end
         else
           elementdefstabnr:=def_stab_number(def.elementdef);
@@ -1023,7 +1025,6 @@ implementation
       var
         templist : TAsmList;
         stabsendlabel : tasmlabel;
-        p  : pchar;
         RType : Char;
         Obj,Info : String;
         hs : string;
@@ -1073,9 +1074,7 @@ implementation
               ss:=ss+'.';
             ss:=ss+def.mangledname;
           end;
-        getmem(p,length(ss)+1);
-        move(pchar(ss)^,p^,length(ss)+1);
-        templist.concat(Tai_stab.Create(stab_stabn,p));
+        templist.concat(Tai_stab.Create_ansistr(stab_stabn,ss));
         // RBRAC
         ss:=tostr(N_RBRAC)+',0,0,'+stabsendlabel.name;
         if not(af_stabs_use_function_absolute_addresses in target_asm.flags) then
@@ -1085,9 +1084,7 @@ implementation
               ss:=ss+'.';
             ss:=ss+def.mangledname;
           end;
-        getmem(p,length(ss)+1);
-        move(pchar(ss)^,p^,length(ss)+1);
-        templist.concat(Tai_stab.Create(stab_stabn,p));
+        templist.concat(Tai_stab.Create_ansistr(stab_stabn,ss));
 
         { the stabsendlabel must come after all other stabs for this }
         { function                                                   }
@@ -1134,10 +1131,7 @@ implementation
                assigned(tprocdef(def.owner.defowner).procsym) then
               info := ','+GetSymName(def.procsym)+','+GetSymName(tprocdef(def.owner.defowner).procsym);
           end;
-        ss:='"'+ansistring(obj)+':'+RType+def_stab_number(def.returndef)+info+'",'+tostr(n_function)+',0,'+tostr(def.fileinfo.line)+','+ansistring(def.mangledname);
-        getmem(p,length(ss)+1);
-        move(pchar(ss)^,p^,length(ss)+1);
-        templist.concat(Tai_stab.Create(stab_stabs,p));
+        templist.concat(Tai_stab.Create_ansistr(stab_stabs,'"'+ansistring(obj)+':'+RType+def_stab_number(def.returndef)+info+'",'+tostr(n_function)+',0,'+tostr(def.fileinfo.line)+','+ansistring(def.mangledname)));
 
         current_asmdata.asmlists[al_procedures].insertlistbefore(def.procstarttai,templist);
 
@@ -1197,15 +1191,11 @@ implementation
 
 
     procedure TDebugInfoStabs.write_sym_stabstr(list:TAsmList;sym:tsym;const ss:ansistring);
-      var
-        p : pchar;
       begin
         if ss='' then
           exit;
         { add to list }
-        getmem(p,length(ss)+1);
-        move(pchar(ss)^,p^,length(ss)+1);
-        list.concat(Tai_stab.create(stab_stabs,p));
+        list.concat(Tai_stab.create_ansistr(stab_stabs,ss));
       end;
 
 

+ 14 - 7
compiler/fmodule.pas

@@ -187,7 +187,7 @@ interface
         points to the module calling it. It is nil for the first compiled
         module. This allow inheritence of all path lists. MUST pay attention
         to that when creating link.res!!!!(mazen)}
-        constructor create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
+        constructor create(LoadedFrom:TModule;const amodulename,afilename:string;_is_unit:boolean);
         destructor destroy;override;
         procedure reset;virtual;
         procedure adddependency(callermodule:tmodule);
@@ -467,24 +467,31 @@ implementation
                                   TMODULE
  ****************************************************************************}
 
-    constructor tmodule.create(LoadedFrom:TModule;const s:string;_is_unit:boolean);
+    constructor tmodule.create(LoadedFrom:TModule;const amodulename,afilename:string;_is_unit:boolean);
       var
-        n : string;
+        n,fn:string;
       begin
-        n:=ChangeFileExt(ExtractFileName(s),'');
+        if amodulename='' then
+          n:=ChangeFileExt(ExtractFileName(afilename),'')
+        else
+          n:=amodulename;
+        if afilename='' then
+          fn:=amodulename
+        else
+          fn:=afilename;
         { Programs have the name 'Program' to don't conflict with dup id's }
         if _is_unit then
-         inherited create(n)
+         inherited create(amodulename)
         else
          inherited create('Program');
-        mainsource:=stringdup(s);
+        mainsource:=stringdup(fn);
         { Dos has the famous 8.3 limit :( }
 {$ifdef shortasmprefix}
         asmprefix:=stringdup(FixFileName('as'));
 {$else}
         asmprefix:=stringdup(FixFileName(n));
 {$endif}
-        setfilename(s,true);
+        setfilename(fn,true);
         localunitsearchpath:=TSearchPathList.Create;
         localobjectsearchpath:=TSearchPathList.Create;
         localincludesearchpath:=TSearchPathList.Create;

+ 4 - 4
compiler/fppu.pas

@@ -54,7 +54,7 @@ interface
           crc_array2 : pointer;
           crc_size2  : longint;
 {$endif def Test_Double_checksum}
-          constructor create(LoadedFrom:TModule;const s:string;const fn:string;_is_unit:boolean);
+          constructor create(LoadedFrom:TModule;const amodulename,afilename:string;_is_unit:boolean);
           destructor destroy;override;
           procedure reset;override;
           function  openppu:boolean;
@@ -125,11 +125,11 @@ var
                                 TPPUMODULE
  ****************************************************************************}
 
-    constructor tppumodule.create(LoadedFrom:TModule;const s:string;const fn:string;_is_unit:boolean);
+    constructor tppumodule.create(LoadedFrom:TModule;const amodulename,afilename:string;_is_unit:boolean);
       begin
-        inherited create(LoadedFrom,s,_is_unit);
+        inherited create(LoadedFrom,amodulename,afilename,_is_unit);
         ppufile:=nil;
-        sourcefn:=stringdup(fn);
+        sourcefn:=stringdup(afilename);
       end;
 
 

+ 7 - 5
compiler/globals.pas

@@ -68,7 +68,7 @@ interface
          [m_gpc,m_all,m_tp_procvar];
 {$endif}
        macmodeswitches =
-         [m_mac,m_all,m_cvar_support,m_mac_procvar,m_nested_procvars,m_non_local_goto,m_isolike_unary_minus];
+         [m_mac,m_all,m_cvar_support,m_mac_procvar,m_nested_procvars,m_non_local_goto,m_isolike_unary_minus,m_default_inline];
        isomodeswitches =
          [m_iso,m_all,m_tp_procvar,m_duplicate_names,m_nested_procvars,m_non_local_goto,m_isolike_unary_minus];
 
@@ -121,7 +121,6 @@ interface
          debugswitches   : tdebugswitches;
          { 0: old behaviour for sets <=256 elements
            >0: round to this size }
-         pmessage : pmessagestaterecord;
          setalloc,
          packenum        : shortint;
 
@@ -144,6 +143,8 @@ interface
 {$if defined(ARM) or defined(AVR)}
         controllertype   : tcontrollertype;
 {$endif defined(ARM) or defined(AVR)}
+         { WARNING: this pointer cannot be written as such in record token }
+         pmessage : pmessagestaterecord;
        end;
 
     const
@@ -361,7 +362,6 @@ interface
         genwpoptimizerswitches : [];
         dowpoptimizerswitches : [];
         debugswitches : [];
-        pmessage : nil;
 
         setalloc : 0;
         packenum : 4;
@@ -433,6 +433,7 @@ interface
 {$if defined(ARM) or defined(AVR)}
         controllertype : ct_none;
 {$endif defined(ARM) or defined(AVR)}
+        pmessage : nil;
       );
 
     var
@@ -763,7 +764,8 @@ implementation
          Replace(s,'$FPCDATE',date_string);
          Replace(s,'$FPCCPU',target_cpu_string);
          Replace(s,'$FPCOS',target_os_string);
-         if tf_use_8_3 in Source_Info.Flags then
+         if (tf_use_8_3 in Source_Info.Flags) or
+            (tf_use_8_3 in Target_Info.Flags) then
            Replace(s,'$FPCTARGET',target_os_string)
          else
            Replace(s,'$FPCTARGET',target_full_string);
@@ -1107,7 +1109,7 @@ implementation
         result:=false;
         hs:=Upper(s);
         for t:=low(tcontrollertype) to high(tcontrollertype) do
-          if controllertypestr[t]=hs then
+          if embedded_controllers[t].controllertypestr=hs then
             begin
               a:=t;
               result:=true;

+ 7 - 0
compiler/globtype.pas

@@ -224,6 +224,13 @@ interface
        );
        twpoptimizerswitches = set of twpoptimizerswitch;
 
+    type
+       { Used by ARM / AVR to differentiate between specific microcontrollers }
+       tcontrollerdatatype = record
+          controllertypestr, controllerunitstr: string[20];
+          interruptvectors:integer;
+          flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize: dword;
+       end;
 
     const
        OptimizerSwitchStr : array[toptimizerswitch] of string[10] = ('',

+ 56 - 30
compiler/htypechk.pas

@@ -67,12 +67,12 @@ interface
         FParaNode   : tnode;
         FParaLength : smallint;
         FAllowVariant : boolean;
-        procedure collect_overloads_in_struct(structdef:tabstractrecorddef;ProcdefOverloadList:TFPObjectList;searchhelpers:boolean);
+        procedure collect_overloads_in_struct(structdef:tabstractrecorddef;ProcdefOverloadList:TFPObjectList;searchhelpers,anoninherited:boolean);
         procedure collect_overloads_in_units(ProcdefOverloadList:TFPObjectList; objcidcall,explicitunit: boolean);
-        procedure create_candidate_list(ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers:boolean);
+        procedure create_candidate_list(ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers,anoninherited:boolean);
         function  proc_add(st:tsymtable;pd:tprocdef;objcidcall: boolean):pcandidate;
       public
-        constructor create(sym:tprocsym;st:TSymtable;ppn:tnode;ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers:boolean);
+        constructor create(sym:tprocsym;st:TSymtable;ppn:tnode;ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers,anoninherited:boolean);
         constructor create_operator(op:ttoken;ppn:tnode);
         destructor destroy;override;
         procedure list(all:boolean);
@@ -1322,9 +1322,8 @@ implementation
                     (vo_is_loop_counter in tsubscriptnode(hp).vs.varoptions) then
                    begin
                      if report_errors then
-                       CGMessage1(parser_e_illegal_assignment_to_count_var,tsubscriptnode(hp).vs.realname)
-                     else
-                       exit;
+                       CGMessage1(parser_e_illegal_assignment_to_count_var,tsubscriptnode(hp).vs.realname);
+                     exit;
                    end;
                  { implicit pointer object types result in dereferencing }
                  hp:=tsubscriptnode(hp).left;
@@ -1475,10 +1474,11 @@ implementation
                        if not(Valid_Const in opts) and
                           not gotderef and
                           (vo_is_loop_counter in tabstractvarsym(tloadnode(hp).symtableentry).varoptions) then
-                         if report_errors then
-                          CGMessage1(parser_e_illegal_assignment_to_count_var,tloadnode(hp).symtableentry.realname)
-                         else
-                          exit;
+                         begin
+                           if report_errors then
+                             CGMessage1(parser_e_illegal_assignment_to_count_var,tloadnode(hp).symtableentry.realname);
+                           exit;
+                         end;
                        { read-only variable? }
                        if (tabstractvarsym(tloadnode(hp).symtableentry).varspez in [vs_const,vs_constref]) then
                         begin
@@ -1758,7 +1758,7 @@ implementation
                            TCallCandidates
 ****************************************************************************}
 
-    constructor tcallcandidates.create(sym:tprocsym;st:TSymtable;ppn:tnode;ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers:boolean);
+    constructor tcallcandidates.create(sym:tprocsym;st:TSymtable;ppn:tnode;ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers,anoninherited:boolean);
       begin
         if not assigned(sym) then
           internalerror(200411015);
@@ -1766,7 +1766,7 @@ implementation
         FProcsym:=sym;
         FProcsymtable:=st;
         FParanode:=ppn;
-        create_candidate_list(ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers);
+        create_candidate_list(ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers,anoninherited);
       end;
 
 
@@ -1776,7 +1776,7 @@ implementation
         FProcsym:=nil;
         FProcsymtable:=nil;
         FParanode:=ppn;
-        create_candidate_list(false,false,false,false,false);
+        create_candidate_list(false,false,false,false,false,false);
       end;
 
 
@@ -1795,21 +1795,43 @@ implementation
       end;
 
 
-    procedure tcallcandidates.collect_overloads_in_struct(structdef:tabstractrecorddef;ProcdefOverloadList:TFPObjectList;searchhelpers:boolean);
+    procedure tcallcandidates.collect_overloads_in_struct(structdef:tabstractrecorddef;ProcdefOverloadList:TFPObjectList;searchhelpers,anoninherited:boolean);
 
-      function processprocsym(srsym:tprocsym):boolean;
+      function processprocsym(srsym:tprocsym; out foundanything: boolean):boolean;
         var
           j  : integer;
           pd : tprocdef;
         begin
-          { Store first procsym found }
-          if not assigned(FProcsym) then
-            FProcsym:=srsym;
           { add all definitions }
           result:=false;
+          foundanything:=false;
           for j:=0 to srsym.ProcdefList.Count-1 do
             begin
               pd:=tprocdef(srsym.ProcdefList[j]);
+              { in case of anonymous inherited, only match procdefs identical
+                to the current one (apart from hidden parameters), rather than
+                anything compatible to the parameters -- except in case of
+                the presence of a messagestr/int, in which case those have to
+                match exactly }
+              if anoninherited then
+                if po_msgint in current_procinfo.procdef.procoptions then
+                  begin
+                    if not(po_msgint in pd.procoptions) or
+                       (pd.messageinf.i<>current_procinfo.procdef.messageinf.i) then
+                      continue
+                  end
+                else if po_msgstr in current_procinfo.procdef.procoptions then
+                  begin
+                    if not(po_msgstr in pd.procoptions) or
+                       (pd.messageinf.str^<>current_procinfo.procdef.messageinf.str^) then
+                      continue
+                  end
+                else if (compare_paras(current_procinfo.procdef.paras,pd.paras,cp_all,[cpo_ignorehidden])<te_equal) then
+                  continue;
+              foundanything:=true;
+              { Store first procsym found }
+              if not assigned(FProcsym) then
+                FProcsym:=tprocsym(srsym);
               if po_overload in pd.procoptions then
                 result:=true;
               ProcdefOverloadList.Add(srsym.ProcdefList[j]);
@@ -1819,7 +1841,8 @@ implementation
       var
         srsym      : tsym;
         hashedid   : THashedIDString;
-        hasoverload : boolean;
+        hasoverload,
+        foundanything : boolean;
         helperdef  : tobjectdef;
       begin
         if FOperator=NOTOKEN then
@@ -1843,9 +1866,10 @@ implementation
                            { Delphi allows hiding a property by a procedure with the same name }
                            (srsym.typ=procsym) then
                          begin
-                           hasoverload := processprocsym(tprocsym(srsym));
+                           hasoverload:=processprocsym(tprocsym(srsym),foundanything);
                            { when there is no explicit overload we stop searching }
-                           if not hasoverload then
+                           if foundanything and
+                              not hasoverload then
                              break;
                          end;
                        helperdef:=helperdef.childof;
@@ -1860,9 +1884,10 @@ implementation
               { Delphi allows hiding a property by a procedure with the same name }
               (srsym.typ=procsym) then
              begin
-               hasoverload:=processprocsym(tprocsym(srsym));
+               hasoverload:=processprocsym(tprocsym(srsym),foundanything);
                { when there is no explicit overload we stop searching }
-               if not hasoverload then
+               if foundanything and
+                  not hasoverload then
                  break;
              end;
            if is_objectpascal_helper(structdef) then
@@ -1875,9 +1900,10 @@ implementation
                   { Delphi allows hiding a property by a procedure with the same name }
                   (srsym.typ=procsym) then
                  begin
-                   hasoverload:=processprocsym(tprocsym(srsym));
+                   hasoverload:=processprocsym(tprocsym(srsym),foundanything);
                    { when there is no explicit overload we stop searching }
-                   if not hasoverload then
+                   if foundanything and
+                      not hasoverload then
                      break;
                  end;
              end;
@@ -1933,7 +1959,7 @@ implementation
               break;
             if srsymtable.symtabletype in [localsymtable,staticsymtable,globalsymtable] then
               begin
-                srsym:=tprocsym(srsymtable.FindWithHash(hashedid));
+                srsym:=tsym(srsymtable.FindWithHash(hashedid));
                 if assigned(srsym) and
                    (srsym.typ=procsym) then
                   begin
@@ -1961,7 +1987,7 @@ implementation
       end;
 
 
-    procedure tcallcandidates.create_candidate_list(ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers:boolean);
+    procedure tcallcandidates.create_candidate_list(ignorevisibility,allowdefaultparas,objcidcall,explicitunit,searchhelpers,anoninherited:boolean);
       var
         j     : integer;
         pd    : tprocdef;
@@ -1979,7 +2005,7 @@ implementation
         if not objcidcall and
            (FOperator=NOTOKEN) and
            (FProcsym.owner.symtabletype in [objectsymtable,recordsymtable]) then
-          collect_overloads_in_struct(tabstractrecorddef(FProcsym.owner.defowner),ProcdefOverloadList,searchhelpers)
+          collect_overloads_in_struct(tabstractrecorddef(FProcsym.owner.defowner),ProcdefOverloadList,searchhelpers,anoninherited)
         else
         if (FOperator<>NOTOKEN) then
           begin
@@ -1989,7 +2015,7 @@ implementation
             while assigned(pt) do
               begin
                 if (pt.resultdef.typ=recorddef) then
-                  collect_overloads_in_struct(tabstractrecorddef(pt.resultdef),ProcdefOverloadList,searchhelpers);
+                  collect_overloads_in_struct(tabstractrecorddef(pt.resultdef),ProcdefOverloadList,searchhelpers,anoninherited);
                 pt:=tcallparanode(pt.right);
               end;
             collect_overloads_in_units(ProcdefOverloadList,objcidcall,explicitunit);
@@ -2021,7 +2047,7 @@ implementation
             ((FProcSymtable.symtabletype=withsymtable) and
              (FProcSymtable.defowner.typ in [objectdef,recorddef]))
            ) and
-           (FProcSymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable]) and
+           (FProcSymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable,objectsymtable,recordsymtable]) and
            FProcSymtable.defowner.owner.iscurrentunit then
           contextstructdef:=tabstractrecorddef(FProcSymtable.defowner)
         else

+ 0 - 26
compiler/i386/cpubase.inc

@@ -48,30 +48,6 @@
       }
       std_op2str:op2strtable={$i i386int.inc}
 
-{*****************************************************************************
-                                 Constants
-*****************************************************************************}
-      c_countusableregsint = 4;
-
-{
-      firstsaveintreg = RS_EAX;
-      lastsaveintreg  = RS_EDX;
-      firstsavefpureg = RS_INVALID;
-      lastsavefpureg  = RS_INVALID;
-      firstsavemmreg  = RS_MM0;
-      lastsavemmreg   = RS_MM7;
-
-      general_superregisters = [RS_EAX,RS_EBX,RS_ECX,RS_EDX];
-
-      maxvarregs = 4;
-      varregs : array[1..maxvarregs] of tsuperregister =
-         (RS_EBX,RS_EDX,RS_ECX,RS_EAX);
-
-      maxfpuvarregs = 8;
-
-      maxmmvarregs = 8;
-}
-
 {*****************************************************************************
                                GDB Information
 *****************************************************************************}
@@ -169,5 +145,3 @@
          PARM_BOUNDARY / BITS_PER_UNIT in the GCC source.
       }
       std_param_align = 4;
-
-

+ 2 - 0
compiler/i386/i386att.inc

@@ -161,6 +161,7 @@
 'iret',
 'iret',
 'iretw',
+'iretq',
 'jcxz',
 'jecxz',
 'jrcxz',
@@ -662,6 +663,7 @@
 'pmovzxwq',
 'pmovzxdq',
 'pmuldq',
+'pmulld',
 'ptest',
 'roundps',
 'roundpd',

+ 2 - 0
compiler/i386/i386atts.inc

@@ -164,6 +164,7 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufNONE,
 attsufINT,
 attsufNONE,
 attsufINT,
@@ -667,6 +668,7 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufNONE,
 attsufINT,
 attsufNONE,
 attsufNONE,

+ 2 - 0
compiler/i386/i386int.inc

@@ -161,6 +161,7 @@
 'iret',
 'iretd',
 'iretw',
+'iretq',
 'jcxz',
 'jecxz',
 'jrcxz',
@@ -662,6 +663,7 @@
 'pmovzxwq',
 'pmovzxdq',
 'pmuldq',
+'pmulld',
 'ptest',
 'roundps',
 'roundpd',

+ 1 - 1
compiler/i386/i386nop.inc

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

+ 2 - 0
compiler/i386/i386op.inc

@@ -161,6 +161,7 @@ A_INVLPG,
 A_IRET,
 A_IRETD,
 A_IRETW,
+A_IRETQ,
 A_JCXZ,
 A_JECXZ,
 A_JRCXZ,
@@ -662,6 +663,7 @@ A_PMOVZXWD,
 A_PMOVZXWQ,
 A_PMOVZXDQ,
 A_PMULDQ,
+A_PMULLD,
 A_PTEST,
 A_ROUNDPS,
 A_ROUNDPD,

+ 20 - 18
compiler/i386/i386prop.inc

@@ -161,6 +161,7 @@
 (Ch: (Ch_All, Ch_None, Ch_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)),
@@ -413,7 +414,7 @@
 (Ch: (Ch_All, Ch_None, Ch_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)),
@@ -439,19 +440,19 @@
 (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_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_All, Ch_None, 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_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_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
@@ -522,7 +523,7 @@
 (Ch: (Ch_All, Ch_None, Ch_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)),
@@ -553,21 +554,21 @@
 (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_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_All, 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_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_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)),
@@ -667,6 +668,7 @@
 (Ch: (Ch_All, Ch_None, Ch_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)),

+ 1217 - 1203
compiler/i386/i386tab.inc

@@ -3,8421 +3,8435 @@
   (
     opcode  : A_NONE;
     ops     : 0;
-    optypes : (ot_none,ot_none,ot_none);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_immediate,ot_none,ot_none);
+    optypes : (ot_immediate,ot_none,ot_none,ot_none);
     code    : #208#1#232#52;
     flags   : if_8086
   ),
   (
     opcode  : A_CALL;
     ops     : 1;
-    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
     code    : #208#1#255#130;
     flags   : if_8086
   ),
   (
     opcode  : A_CALL;
     ops     : 1;
-    optypes : (ot_immediate or ot_near,ot_none,ot_none);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
     code    : #208#1#255#132;
     flags   : if_8086
   ),
   (
     opcode  : A_JMP;
     ops     : 1;
-    optypes : (ot_immediate or ot_short,ot_none,ot_none);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
     code    : #208#1#255#130;
     flags   : if_8086
   ),
   (
     opcode  : A_LCALL;
     ops     : 1;
-    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    optypes : (ot_memory or ot_near,ot_none,ot_none,ot_none);
     code    : #208#1#255#130;
     flags   : if_8086
   ),
   (
     opcode  : A_LCALL;
     ops     : 1;
-    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    optypes : (ot_memory or ot_far,ot_none,ot_none,ot_none);
     code    : #208#1#255#131;
     flags   : if_8086
   ),
   (
     opcode  : A_LDS;
     ops     : 2;
-    optypes : (ot_reg16 or ot_bits32,ot_memory,ot_none);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none);
+    optypes : (ot_rm_gpr or ot_bits16 or ot_bits32 or ot_bits64,ot_none,ot_none,ot_none);
     code    : #208#1#255#133;
     flags   : if_8086
   ),
   (
     opcode  : A_LJMP;
     ops     : 1;
-    optypes : (ot_memory or ot_far,ot_none,ot_none);
+    optypes : (ot_memory or ot_far,ot_none,ot_none,ot_none);
     code    : #208#1#255#133;
     flags   : if_8086
   ),
   (
     opcode  : A_LJMP;
     ops     : 1;
-    optypes : (ot_memory or ot_near,ot_none,ot_none);
+    optypes : (ot_memory or ot_near,ot_none,ot_none,ot_none);
     code    : #208#1#255#132;
     flags   : if_8086
   ),
   (
     opcode  : A_LLDT;
     ops     : 1;
-    optypes : (ot_rm_gpr or ot_bits16,ot_none,ot_none);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_xmmreg,ot_none);
+    optypes : (ot_xmmreg,ot_xmmreg,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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    optypes : (ot_rm_gpr or ot_bits8,ot_reg8,ot_none,ot_none);
     code    : #2#15#192#65;
     flags   : if_486
   ),
   (
     opcode  : A_XBTS;
     ops     : 2;
-    optypes : (ot_reg16,ot_memory,ot_none);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_memory,ot_none);
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
     code    : #217#2#15#42#72;
     flags   : if_katmai or if_sse or if_mmx
   ),
   (
     opcode  : A_CVTPI2PS;
     ops     : 2;
-    optypes : (ot_xmmreg,ot_mmxreg,ot_none);
+    optypes : (ot_xmmreg,ot_mmxreg,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,ot_none);
+    optypes : (ot_mmxreg,ot_memory,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);
+    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_memory,ot_none);
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
     code    : #219#209#2#15#42#72;
     flags   : if_katmai or if_sse
   ),
   (
     opcode  : A_CVTSI2SS;
     ops     : 2;
-    optypes : (ot_xmmreg,ot_reg32 or ot_bits64,ot_none);
+    optypes : (ot_xmmreg,ot_reg32 or ot_bits64,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,ot_none);
+    optypes : (ot_reg32 or ot_bits64,ot_memory,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);
+    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,ot_none);
+    optypes : (ot_mmxreg,ot_memory,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);
+    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,ot_none);
+    optypes : (ot_reg32 or ot_bits64,ot_memory,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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_xmmrm,ot_none);
+    optypes : (ot_xmmreg,ot_xmmrm,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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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_xmmrm,ot_none);
+    optypes : (ot_xmmreg,ot_xmmrm,ot_none,ot_none);
     code    : #2#15#90#72;
     flags   : if_willamette or if_sse2
   ),
   (
     opcode  : A_CVTSD2SI;
     ops     : 2;
-    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_none);
+    optypes : (ot_reg32 or ot_bits64,ot_xmmreg,ot_none,ot_none);
     code    : #220#208#2#15#45#72;
     flags   : if_willamette or if_sse2
   ),
   (
     opcode  : A_CVTSD2SI;
     ops     : 2;
-    optypes : (ot_reg32 or ot_bits64,ot_memory,ot_none);
+    optypes : (ot_reg32 or ot_bits64,ot_memory,ot_none,ot_none);
     code    : #220#208#2#15#45#72;
     flags   : if_willamette or if_sse2
   ),
   (
     opcode  : A_CVTSD2SS;
     ops     : 2;
-    optypes : (ot_xmmreg,ot_xmmrm,ot_none);
+    optypes : (ot_xmmreg,ot_xmmrm,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_reg32 or ot_bits64,ot_none);
+    optypes : (ot_xmmreg,ot_reg32 or ot_bits64,ot_none,ot_none);
     code    : #220#209#2#15#42#72;
     flags   : if_willamette or if_sse2
   ),
   (
     opcode  : A_CVTSI2SD;
     ops     : 2;
-    optypes : (ot_xmmreg,ot_memory,ot_none);
+    optypes : (ot_xmmreg,ot_memory,ot_none,ot_none);
     code    : #220#209#2#15#42#72;
     flags   : if_willamette or if_sse2
   ),
   (
     opcode  : A_CVTSS2SD;
     ops     : 2;
-    optypes : (ot_xmmreg,ot_xmmrm,ot_none);
+    optypes : (ot_xmmreg,ot_xmmrm,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_xmmreg,ot_none);
+    optypes : (ot_mmxreg,ot_xmmreg,ot_none,ot_none);
     code    : #241#2#15#44#72;
     flags   : if_willamette or if_sse2
   ),
   (
     opcode  : A_CVTTPD2PI;
     ops     : 2;
-    optypes : (ot_mmxreg,ot_memory,ot_none);
+    optypes : (ot_mmxreg,ot_memory,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);
+    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);
+    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);
+    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,ot_none);
+    optypes : (ot_reg32 or ot_bits64,ot_memory,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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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);
+    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
   )

+ 0 - 33
compiler/mips/cpubase.pas

@@ -134,42 +134,9 @@ unit cpubase;
     const
       max_operands = 4;
 
-      { Constant defining possibly all registers which might require saving }
-      ALL_OTHERREGISTERS = [];
-
-      general_superregisters = [RS_R0..RS_R31];
-
-      { Table of registers which can be allocated by the code generator
-        internally, when generating the code.
-      }
-      { legend:                                                                }
-      { xxxregs = set of all possibly used registers of that type in the code  }
-      {           generator                                                    }
-      { usableregsxxx = set of all 32bit components of registers that can be   }
-      {           possible allocated to a regvar or using getregisterxxx (this }
-      {           excludes registers which can be only used for parameter      }
-      {           passing on ABI's that define this)                           }
-      { c_countusableregsxxx = amount of registers in the usableregsxxx set    }
-
       maxintregs = 31;
-      { to determine how many registers to use for regvars }
-      maxintscratchregs = 3;
-      usableregsint = [RS_R4..RS_R10];
-      c_countusableregsint = 7;
-
       maxfpuregs = 8;
-      fpuregs = [RS_F0..RS_F7];
-      usableregsfpu = [RS_F4..RS_F7];
-      c_countusableregsfpu = 4;
-
-      mmregs = [RS_NO..RS_NO];
-      usableregsmm = [RS_NO..RS_NO];
-      c_countusableregsmm  = 0;
-
       maxaddrregs = 0;
-      addrregs    = [];
-      usableregsaddr = [];
-      c_countusableregsaddr = 0;
 
 {*****************************************************************************
                                 Operand Sizes

Diferenças do arquivo suprimidas por serem muito extensas
+ 195 - 158
compiler/msg/errord.msg


+ 133 - 49
compiler/msg/errordu.msg

@@ -3,7 +3,7 @@
 #   Latest updates contributed by Karl-Michael Schindler aka mischi
 #   <karl-michael.schindler at web.de>
 #
-#   Based on errore.msg of SVN revision 16783
+#   Based on errore.msg of SVN revision 18275
 #
 #   This file is part of the Free Pascal Compiler
 #   Copyright (c) 1998-2010 by the Free Pascal Development team
@@ -49,7 +49,7 @@
 #
 # General
 #
-# 01023 is the last used one
+# 01025 is the last used one
 #
 # BeginOfTeX
 % \section{General compiler messages}
@@ -79,11 +79,11 @@ general_t_includepath=01005_T_Der Includepfad ist: $1
 general_t_librarypath=01006_T_Der Bibliothekspfad ist: $1
 % When the \var{-vt} switch is used, this line tells you where the compiler
 % looks for the libraries. You can set this path with the \var{-Fl} option.
-general_t_objectpath=01007_T_Der Objektdateienpfad: $1
+general_t_objectpath=01007_T_Der Objektdateienpfad ist: $1
 % When the \var{-vt} switch is used, this line tells you where the compiler
 % looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
 % You can set this path with the \var{-Fo} option.
-general_i_abslines_compiled=01008_I_$1 Zeilen übersetzt, $2 Sekunden$3
+general_i_abslines_compiled=01008_I_$1 Zeilen übersetzt, $2 Sekunden $3
 % When the \var{-vi} switch is used, the compiler reports the number
 % of lines compiled, and the time it took to compile them (real time,
 % not program time).
@@ -128,6 +128,10 @@ general_i_number_of_hints=01022_I_$1 Hinweis(e) ausgegeben
 % Total number of hints issued during compilation.
 general_i_number_of_notes=01023_I_$1 Anmerkung(en) ausgegeben
 % Total number of notes issued during compilation.
+general_f_ioerror=01024_F_I/O Fehler: $1
+% During compilation an I/O error happened which allows no further compilation.
+general_f_oserror=01025_F_Betriebsystemfehler: $1
+% During compilation an operanting system error happened which allows no further compilation.
 %
 % \end{description}
 # EndOfTeX
@@ -135,7 +139,7 @@ general_i_number_of_notes=01023_I_$1 Anmerkung(en) ausgegeben
 #
 # Scanner
 #
-# 02087 is the last used one
+# 02088 is the last used one
 #
 % \section{Scanner messages.}
 % This section lists the messages that the scanner emits. The scanner takes
@@ -152,7 +156,7 @@ scan_f_end_of_file=02000_F_Unerwartetes Dateiende
 % \item An include file ends in the middle of a statement.
 % \item A comment was not closed.
 % \end{itemize}
-scan_f_string_exceeds_line=02001_F_Zeichenkette geht über Zeilenende hinaus
+scan_f_string_exceeds_line=02001_F_Zeichenkette geht über das Zeilenende hinaus
 % You forgot probably to include the closing ' in a string, so it occupies
 % multiple lines.
 scan_f_illegal_char=02002_F_Unzulässiges Zeichen "$1" ($2)
@@ -217,7 +221,7 @@ scan_h_user_defined=02026_H_Benutzerdefiniert: $1
 % A user defined hint was encountered. See also the \progref
 scan_i_user_defined=02027_I_Benutzerdefiniert: $1
 % User defined information was encountered. See also the \progref
-scan_e_keyword_cant_be_a_macro=02028_E_Ein Makro, welches den selben Namen wie ein Schlüsselwort hat, wird ignoriert
+scan_e_keyword_cant_be_a_macro=02028_E_Ein Makro, das den selben Namen wie ein Schlüsselwort hat, wird ignoriert
 % You cannot redefine keywords with macros.
 scan_f_macro_buffer_overflow=02029_F_Makropufferüberlauf während des Lesens oder Expandierens eines Makros
 % Your macro or it's result was too long for the compiler.
@@ -296,7 +300,7 @@ scan_w_include_env_not_found=02054_W_$1 ist keine Umgebungsvariable
 % be replaced by an empty string instead.
 scan_e_invalid_maxfpureg_value=02055_E_Nicht erlaubter Wert für MAXFPUREGISTER-Direktive
 % Valid values for this directive are 0..8 and NORMAL/DEFAULT.
-scan_w_only_one_resourcefile_supported=02056_W_Nur ein Resourcedatei wird vom aktuellen Zielbetriebssystem unterstützt
+scan_w_only_one_resourcefile_supported=02056_W_Vom aktuellen Zielbetriebssystem wird nur eine Resourcedatei unterstützt
 % Only one resource file can be supported for this target - this is the case of
 % OS/2 (EMX) currently. The first one found is used, the others are discarded.
 scan_w_macro_support_turned_off=02057_W_Makrounterstützung ist ausgeschaltet
@@ -329,11 +333,11 @@ scan_e_mode_switch_not_allowed=02067_E_Der Modus Umschalter "$1" ist hier nicht
 % a mode switch occurs after UNIT.
 scan_e_error_macro_undefined=02068_E_Die Compile time Variable oder das Makro "$1" ist nicht definiert.
 % Thus the conditional compile time expression cannot be evaluated. Only in mode MacPas.
-scan_e_utf8_bigger_than_65535=02069_E_Der UTF-8 Kode ist grösser als 65535
+scan_e_utf8_bigger_than_65535=02069_E_Der UTF-8 Code ist grösser als 65535
 % \fpc handles UTF-8 strings internally as widestrings, i.e. the char codes are limited to 65535.
 scan_e_utf8_malformed=02070_E_Ungültige UTF-8 Zeichenkette
 % The given string isn't a valid UTF-8 string.
-scan_c_switching_to_utf8=02071_C_UTF-8 Signatur gefunden, verwende UTF-8 Kode
+scan_c_switching_to_utf8=02071_C_UTF-8 Signatur gefunden, verwende UTF-8 Code
 % The compiler found a UTF-8 encoding signature (\$ef, \$bb, \$bf) at the beginning of a file,
 % so it interprets it as a UTF-8 file.
 scan_e_compile_time_typeerror=02072_E_Compile time Ausdruck: Erwartete $1 aber erhielt $2 bei $3
@@ -371,6 +375,9 @@ scan_w_multiple_main_name_overrides=02086_W_Der Name der "main" Prozedur wird me
 % name will be used.
 scanner_w_illegal_warn_identifier=02087_W_Ungültige Bezeichner "$1" für die $WARN Direktive
 % Identifier is not known by a \var{\{\$WARN\}} compiler directive.
+scanner_e_illegal_alignment_directive=02088_E_Ungültige "alignment" Direktive
+% The alignment directive is not valid. Either the alignment type is not known or the alignment
+% value is not a power of two.
 %
 % \end{description}
 # EndOfTeX
@@ -378,7 +385,7 @@ scanner_w_illegal_warn_identifier=02087_W_Ungültige Bezeichner "$1" für die $W
 #
 # Parser
 #
-# 03304 is the last used one
+# 03313 is the last used one
 #
 % \section{Parser messages}
 % This section lists all parser messages. The parser takes care of the
@@ -403,7 +410,7 @@ parser_e_export_invalid_index=03010_E_Ungültiger Index for exportierte Funktion
 % DLL function index must be in the range \var{1..\$FFFF}.
 parser_w_parser_reloc_no_debug=03011_W_Für relozierbare DLL oder ausführbare Datei $1 funktionieren keine Debug-Information, deaktiviert.
 % It is currently not possible to include debug information in a relocatable DLL.
-parser_w_parser_win32_debug_needs_WN=03012_W_Um Win32-Code debuggen zu können müssen die Relozierungen mit -WN option abgeschaltet werden.
+parser_w_parser_win32_debug_needs_WN=03012_W_Um Win32-Code debuggen zu können, müssen die Relozierungen mit -WN option abgeschaltet werden.
 % Stabs debug info is wrong for relocatable DLL or EXES. Use -WN
 % if you want to debug win32 executables.
 parser_e_constructorname_must_be_init=03013_E_Konstruktor-Name muss INIT sein
@@ -928,9 +935,9 @@ parser_e_no_access_specifier_in_interfaces=03172_E_Zugriffsbezeichner können in
 % The access specifiers \var{public}, \var{private}, \var{protected} and
 % \var{published} can't be used in interfaces, Objective-C protocols and categories because all methods
 % of an interface/protocol/category must be public.
-parser_e_no_vars_in_interfaces=03173_E_Ein Interface, ein Objective-C Protokoll oder eine Kategorie darf keine Felder enthalten
-% Declarations of fields are not allowed in interfaces and Objective-C protocols and categories.
-% An interface/protocol/category can contain only methods and properties with method read/write specifiers.
+parser_e_no_vars_in_interfaces=03173_E_Ein Interface, ein Helfer, ein Objective-C Protokoll oder eine Kategorie darf keine Felder enthalten
+% Declarations of fields are not allowed in interfaces, helpers and Objective-C protocols and categories.
+% An interface/helper/protocol/category can contain only methods and properties with method read/write specifiers.
 parser_e_no_local_proc_external=03174_E_Eine lokale Prozedur kann nicht als EXTERNAL deklariert werden
 % Declaring local procedures as external is not possible. Local procedures
 % get hidden parameters that will make the chance of errors very high.
@@ -1275,9 +1282,12 @@ parser_e_objc_message_name_changed=03275_E_Der Nachrichtenname "$1" in der verer
 parser_e_no_objc_unique=03276_E_Noch können eindeutige Kopien von Objective-C Typen nicht erstellt werden
 % Duplicating an Objective-C type using \var{type x = type y;} is not yet supported. You may be able to
 % obtain the desired effect using \var{type x = objcclass(y) end;} instead.
-parser_e_no_category_as_types=03277_E_Objective-C Kategorien können nicht als Typen benutzt werden
-% It is not possible to declare a variable as an instance of an Objective-C category. A
-% category adds methods to the scope of an existing class, but does not define a type by itself.
+parser_e_no_category_as_types=03277_E_Objective-C Kategorien und Object-Pascal Klassenhelfer können nicht als Typen benutzt werden
+% It is not possible to declare a variable as an instance of an Objective-C
+% category or an Object Pascal class helper. A category/class helper adds
+% methods to the scope of an existing class, but does not define a type by
+% itself. An exception of this rule is when inheriting an Object Pascal class
+% helper from another class helper.
 parser_e_no_category_override=03278_E_Kategorien überschreiben Methoden nicht, sondern ersetzen sie. "reintroduce" benutzen
 parser_e_must_use_reintroduce_objc=03279_E_Ersetzte Methoden können in Objective-C nur wieder eingeführt werden, füge "reintroduce" hinzu (Ersetzte Methode ist in $1 definiert)
 parser_h_should_use_reintroduce_objc=03280_H_Ersetzte Methoden können in Objective-C nur wieder eingeführt werden, füge "reintroduce" hinzu (Ersetzte Methode ist in $1 definiert)
@@ -1363,19 +1373,44 @@ parser_e_forward_protocol_declaration_must_be_resolved=03298_E_Vorwärts-Deklara
 % where \var{MyProtocol} is declared but not defined.
 parser_e_no_record_published=03299_E_Record -Typen können keine öffentlichen Abschnitte (published sections) haben
 % Published sections can be used only inside classes.
-parser_e_no_destructor_in_records=03300_E_Destruktoren sind in Records nicht erlaubt
-% Destructor declarations aren't allowed in records.
+parser_e_no_destructor_in_records=03300_E_Destruktoren sind in Records und Helfern nicht erlaubt
+% Destructor declarations aren't allowed in records or helpers.
 parser_e_class_methods_only_static_in_records=03301_E_Klassenmethoden müssen in Records statisch sein
 % Class methods declarations aren't allowed in records without static modifier.
 % Records have no inheritance and therefore non static class methods have no sence for them.
-parser_e_no_constructor_in_records=03302_E_Konstruktoren sind in Records nicht erlaubt
-% Constructor declarations aren't allowed in records.
+parser_e_no_constructor_in_records=03302_E_Konstruktoren sind in Records und Recordhelfern nicht erlaubt
+% Constructor declarations aren't allowed in records or record helpers.
 parser_e_at_least_one_argument_must_be_of_type=03303_E_Entweder das Ergebnis oder mindestens ein Parameter müssen vom Typ "$1" sein
 % It is required that either the result of the routine or at least one of its parameters be of the specified type.
 % For example class operators either take an instance of the structured type in which they are defined, or they return one.
 parser_e_cant_use_type_parameters_here=03304_E_Typ-Parameter können initialization/finalization erfordern - Sie können deshalb nicht in varianten Rekords verwendet werden
 % Type parameters may be specialized with types which (e.g. \var{ansistring}) need initialization/finalization
 % code which is implicitly generated by the compiler. 
+parser_e_externals_no_section=03305_E_"external" deklarierte Variablen dürfen nicht in einer "custom section" sein
+% A section directive is not valid for variables being declared as external.
+parser_e_section_no_locals=03306_E_Nicht-statische und nicht-globale Variablen dürfen keine Direktive "section" haben
+% A variable placed in a custom section is always statically allocated so it must be either a static or global variable.
+parser_e_not_allowed_in_helper=03307_E_"$1" ist in Helfertypen nicht erlaubt
+% Some directives and specifiers like "virtual", "dynamic", "override" aren't
+% allowed inside helper types in mode ObjFPC (they are ignored in mode Delphi),
+% because they have no meaning within helpers. Also "abstract" isn't allowed in
+% either mode.
+parser_e_no_class_constructor_in_helpers=03308_E_Klassenkonstruktoren sind in Helfern nicht erlaubt
+% Class constructor declarations aren't allowed in helpers.
+parser_e_inherited_not_in_record=03309_E_"inherited" ist in einem Record nicht erlaubt
+% As records don't suppport inheritance the use of "inherited" is prohibited for
+% these as well as for record helpers (in mode "Delphi" only).
+parser_e_no_types_in_local_anonymous_records=03310_E_Typ-Deklarationen sind in lokalen oder anonymen Records nicht erlaubt
+% Records with types must be defined globally. Types cannot be defined inside records which are defined in a
+% procedure or function or in anonymous records.
+parser_e_duplicate_implements_clause=03311_E_Zweifacher "implements"-Term für das Interface "$1"
+% A class may delegate an interface using the "implements" clause only to a single property. Delegating it multiple times
+% is a error.
+parser_e_mapping_no_implements=03312_E_Das Interface "$1" kann nicht durch "$2" delegiert werden. Die Methode ist bereits aufgelöst
+% Method resolution clause maps a method of an interface to a method of the current class. Therefore the current class
+% has to implement the interface directly. Delegation is not possible.
+parser_e_implements_no_mapping=03313_E_Das Interface "$1" kann keine Methoden-Auflösung haben, "$2" delegiert es bereits
+% Method resoulution is only possible for interfaces that are implemented directly, not by delegation.
 %
 % \end{description}
 # EndOfTeX
@@ -1383,7 +1418,7 @@ parser_e_cant_use_type_parameters_here=03304_E_Typ-Parameter können initializat
 #
 # Type Checking
 #
-# 04098 is the last used one
+# 04103 is the last used one
 #
 % \section{Type checking errors}
 % This section lists all errors that can occur when type checking is
@@ -1570,14 +1605,16 @@ type_e_type_is_not_completly_defined=04042_E_Typ "$1" ist nicht vollständig def
 type_w_string_too_long=04043_W_String literal hat mehr Zeichen als short string length
 % The size of the constant string, which is assigned to a shortstring,
 % is longer than the maximum size of the shortstring (255 characters).
-type_w_signed_unsigned_always_false=04044_W_Wegen des Bereichs der Werte ist das Vergleichsergebnis immer falsch
-% There is a comparison between an unsigned value and a signed constant which is
-% less than zero. Because of type promotion, the statement will always evaluate to
-% false. Explicitly typecast the constant to the correct range to avoid this problem.
-type_w_signed_unsigned_always_true=04045_W_Wegen des Bereichs der Werte ist das Vergleichsergebnis immer richtig
-% There is a comparison between an unsigned value and a signed constant which is
-% less than zero. Because of type promotion, the statement will always evaluate to
-% true. Explicitly typecast the constant to the correct range to avoid this problem.
+type_w_comparison_always_false=04044_W_Wegen der Bereiche der Konstanten und des Ausdrucks könnte das Vergleichsergebnis immer falsch sein
+% There is a comparison between a constant and an expression where the constant is out of the
+% valid range of values of the expression. Because of type promotion, the statement will always evaluate to
+% false. Explicitly typecast the constant or the expression to the correct range to avoid this warning
+% if you think the code is correct.
+type_w_comparison_always_true=04045_W_Wegen der Bereiche der Konstanten und des Ausdrucks könnte das Vergleichsergebnis immer richtig sein
+% There is a comparison between a constant and an expression where the constant is out of the
+% valid range of values of the expression. Because of type promotion, the statement will always evaluate to
+% true. Explicitly typecast the constant or the expression to the correct range to avoid this warning
+% if you think the code is correct.
 type_w_instance_with_abstract=04046_W_Konstruktion der Klasse "$1" mit der abstrakten Methode "$2"
 % An instance of a class is created which contains non-implemented abstract
 % methods. This will probably lead to a runtime error 211 in the code if that
@@ -1604,7 +1641,8 @@ type_e_constant_expr_expected=04052_E_Konstanter Ausdruck erwartet
 type_e_operator_not_supported_for_types=04053_E_Operation "$1" wird für die Typen "$2" und "$3" nicht unterstützt
 % The operation is not allowed for the supplied types.
 type_e_illegal_type_conversion=04054_E_Illegale Typ-Konversion: "$1" nach "$2"
-% When doing a type-cast, you must take care that the sizes of the variable and
+% When doing a type-cast, you must take care that the sizes of
+ the variable and
 % the destination type are the same.
 type_h_pointer_to_longint_conv_not_portable=04055_H_Konversion zwischen ordinalen Typen und Zeigern ist nicht portierbar
 % If you typecast a pointer to a longint (or vice-versa), this code will not compile
@@ -1664,7 +1702,7 @@ type_w_pointer_to_signed=04082_W_Die Konvertierung von Pointern in einen Integer
 % For example both \windows and \linux allow pointers in the range \$0000000 to \$bfffffff.
 % If you convert pointers to signed types, this can cause overflow and range check errors,
 % but also \$80000000 < \$7fffffff. This can cause random errors in code like "if p>q".
-type_interface_has_no_guid=04083_E_Interface Typ $1 hat keine gültige GUID
+type_e_interface_has_no_guid=04083_E_Interface Typ $1 hat keine gültige GUID
 % When applying the as-operator to an interface or class, the desired interface (i.e. the right operand of the
 % as-operator) must have a valid GUID.
 type_e_invalid_objc_selector_name=04084_E_Ungültiger Objective-C-Selector-Name "$1"
@@ -1731,6 +1769,20 @@ type_e_type_parameters_are_not_allowed_here=04097_E_Typ-Parameter sind für nich
 % Type parameters are only allowed for methods of generic classes, records or objects
 type_e_generic_declaration_does_not_match=04098_E_Die generische Deklaration von "$1" unterscheidet sich vom der vorherigen Deklaration
 % Generic declaration does not match the previous declaration
+type_e_helper_type_expected=04099_E_Helfertyp erwartet
+% The compiler expected a \var{class helper} type.
+type_e_record_type_expected=04100_E_Recordtyp erwartet
+% The compiler expected a \var{record} type.
+type_e_class_helper_must_extend_subclass=04101_E_Abgeleitete Klassenhelfer müssen eine Unterklasse von "$1" oder die Klasse selbst erweitern
+% If a class helper inherits from another class helper the extended class must
+% extend either the same class as the parent class helper or a subclass of it
+type_e_record_helper_must_extend_same_record=04102_E_Abgeleitete Recordhelfer müssen "$1" erweitern
+% If a record helper inherits from another record helper it must extend the same
+% record that the parent record helper extended.
+type_e_procedures_return_no_value=04103_E_Ungültige Zuweisung, eine Prozedur gibt keinen Wert zurück
+% This error occurs when one tries to assign the result of a procedure or destructor call.
+% A procedure or destructor returns no value so this is not
+% possible.
 %
 % \end{description}
 # EndOfTeX
@@ -1738,7 +1790,7 @@ type_e_generic_declaration_does_not_match=04098_E_Die generische Deklaration von
 #
 # Symtable
 #
-# 05083 is the last used one
+# 05084 is the last used one
 #
 % \section{Symbol handling}
 % This section lists all the messages that concern the handling of symbols.
@@ -1977,11 +2029,17 @@ sym_e_objc_formal_class_not_resolved=05080_E_Die vollständige Definition der fo
 % of the class to be in scope.
 sym_e_interprocgoto_into_init_final_code_not_allowed=05081_E_Gotos in die 'initialization'- oder 'finalization'-Blöcke einer Unit sind nicht erlaubt
 % Gotos into initialization or finalization blockse of units are not allowed.
-sym_e_external_class_name_mismatch1=05082=E_Ungültiger externer Name "$1" für die formale Klasse "$2"
-sym_e_external_class_name_mismatch2=05083=E_Hierhin muss die vollständige Klassendefinition mit externem Namen "$1"
+sym_e_external_class_name_mismatch1=05082_E_Ungültiger externer Name "$1" für die formale Klasse "$2"
+sym_e_external_class_name_mismatch2=05083_E_Hierhin muss die vollständige Klassendefinition mit externem Namen "$1"
 % When a class is declared using a formal external definition, the actual external
 % definition (if any) must specify the same external name as the formal definition
 % (since both definitions refer to the same actual class type).
+sym_w_library_overload=05084_W_Möglicher Bibliothekenkonflikt: Das Symbol "$1" aus Bibliothek "$2" wurde auch in Bibliothek "$3" gefunden
+% Some OS do not have library specific namespaces, for those
+% OS, the function declared as "external 'libname' name 'funcname'",
+% the 'libname' part is only a hint, funcname might also be loaded
+% by another library. This warning appears if 'funcname' is used twice
+% with two different library names.
 %
 % \end{description}
 # EndOfTeX
@@ -2286,7 +2344,7 @@ asmr_w_id_supposed_external=07072_W_Bezeichner $1 ist vermutlich External
 % problems at link time if the symbol is not defined anywhere.
 asmr_e_string_not_allowed_as_const=07073_E_Strings sind als Konstanten unzulässig
 % Character strings are not allowed as constants.
-asmr_e_no_var_type_specified=07074_Typ der Variablen nicht angegeben
+asmr_e_no_var_type_specified=07074_E_Typ der Variablen nicht angegeben
 % The syntax expects a type idenfitifer after the dot, but
 % none was found.
 asmr_w_assembler_code_not_returned_to_text=07075_E_Assemblercode kehrt nicht zum Text zurück
@@ -2388,14 +2446,14 @@ asmr_e_mixing_regtypes=07108_E_Alle Register in einem Registerset müssen in T u
 asmr_e_empty_regset=07109_E_Ein Registerset kann nicht leer sein
 % Instructions on the ARM architecture that take a register set as argument require that such a set
 % contains at least one register.
-
 asmr_w_useless_got_for_local=07110_W_@GOTPCREL ist nutzlos und bei lokalen Symbole möglicherweise gefährlich
 % The use of @GOTPCREL supposes an extra indirection that is
 % not present if the symbol is local, which might lead to wrong asembler code
+
 #
 # Assembler/binary writers
 #
-# 08021 is the last used one
+# 08022 is the last used one
 #
 asmw_f_too_many_asm_files=08000_F_Zu viele Assembler-Dateien
 % With smartlinking enabled, there are too many assembler
@@ -2422,6 +2480,11 @@ asmw_e_first_defined_label=08018_E_Asm: First beginnt hier
 asmw_e_invalid_register=08019_E_Asm: Ungültiges Register $1
 asmw_e_16bit_32bit_not_supported=08020_E_Asm: 16 oder 32 Bit Referenzen werden nicht unterstützt
 asmw_e_64bit_not_supported=08021_E_Asm: 64 Bit Operanden werden nicht unterstützt
+asmw_e_bad_reg_with_rex=08022_E_Asm: AH,BH,CH oder DH können nicht in einer Instruktion verwendt werden, die den Prefix REX benötigt
+% x86_64 only: instruction encoding of this platform does not allow using
+% 8086 high byte registers (AH,BH,CH or DH) together with REX prefix in a single instruction.
+% The REX prefix is required whenever the instruction operand size is 64 bits, or
+% when it uses one of extended x86_64 registers (R8-R15 or XMM8-XMM15).
 
 #
 # Executing linker/assembler
@@ -3080,6 +3143,11 @@ option_help_pages=11025_[
 3*2Acoff_COFF (Go32v2) mit Hilfe des internen Schreibers
 3*2Apecoff_PE_COFF (Win32) mit Hilfe des internen Schreibers
 4*2Aas_Assembliere mit Hilfe von GNU AS
+4*2Agas_Assembliere mit Hilfe von GNU GAS
+4*2Agas-darwin_Assembliere darwin Mach-O64 mit Hilfe von GNU GAS
+4*2Amasm_Win64 Object Datei mit Hilfe von ml64 (Microsoft)
+4*2Apecoff_PE-COFF (Win64) mit Hilfe des internen Writer
+4*2Aelf_ELF (Linux-64bit) mit Hilfe des internen Writer
 6*2Aas_Unix o-file mit Hilfe von GNU AS
 6*2Agas_GNU Motorola Assembler
 6*2Amit_MIT Syntax (old GAS)
@@ -3216,6 +3284,7 @@ S*2Aas_Assembliere mit Hilfe von GNU AS
 **2So_Sei TP/BP 7.0 kompatibel (wie -Mtp)
 **2Ss_Konstruktor- und Destruktorname müssen "Init" und "Done" sein
 **2Sx_Exception Schlüsselwörter einschalten (Voreinstellung in Delphi/ObjFPC Moden)
+**2Sy_@<pointer> gibt einen typisierten Pointer zurück, genau wie $T+
 **1s_Rufe weder Assembler noch Linker auf (nur mit -a)
 **2sh_Erzeuge Script um auf dem Host zu linken
 **2st_Erzeuge Script um auf dem Zielsystem zu linken
@@ -3273,41 +3342,56 @@ S*2Tlinux_Linux
 **2*_    Dateinamen den vollständigen  v : Schreibe fpcdebug.txt mit 
 **2*_    Pfad                              ganz viel Information
 **2*_m<x>,<y> : Zeige die Meldungen mit den Nummern <x> und <y> nicht
-3*1W<x>_Ziel-spezifische Optionen (Ziele)
-A*1W<x>_Ziel-spezifische Optionen (Ziele)
-P*1W<x>_Ziel-spezifische Optionen (Ziele)
-p*1W<x>_Ziel-spezifische Optionen (Ziele)
+**1W<x>_Spezifiziere ein natives Programm (Windows)
+3*2WA_Spezifiziere ein natives Programm (Windows)
+4*2WA_Spezifiziere ein natives Programm (Windows)
+A*2WA_Spezifiziere ein natives Programm (Windows)
 3*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
 P*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
 p*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
-3*2WB_Erzeuge ein relozierbares Image (Windows)
+A*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+4*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+3*2WB_Erzeuge ein relozierbares Image (Windows, Symbian)
+3*2WBxxxx_Setze die Imagebasis auf xxxx (Windows, Symbian)
+4*2WB_Erzeuge ein relozierbares Image (Windows)
+4*2WBxxxx_Setze die Imagebasis auf xxxx (Windows, Symbian)
 A*2WB_Erzeuge ein relozierbares Image (Windows, Symbian)
+A*2WBxxxx_Setze die Imagebasis auf xxxx (Windows)
 3*2WC_Spezifiziere "console type application" (EMX, OS/2, Windows)
+4*2WC_Spezifiziere "console type application" (EMX, OS/2, Windows)
 A*2WC_Spezifiziere "console type application" (Windows)
 P*2WC_Spezifiziere "console type application" (Classic Mac OS)
 3*2WD_Benutze DEFFILE um Funktionen der DLL oder EXE zu exportieren (Windows)
+4*2WD_Benutze DEFFILE um Funktionen der DLL oder EXE zu exportieren (Windows)
 A*2WD_Benutze DEFFILE um Funktionen der DLL oder EXE zu exportieren (Windows)
 3*2We_Benutze externe Resourcen (Darwin)
 4*2We_Benutze externe Resourcen (Darwin)
 A*2We_Benutze externe Resourcen (Darwin)
 P*2We_Benutze externe Resourcen (Darwin)
-p*2We_Benutze externe resoResourcenurces (Darwin)
+p*2We_Benutze externe Resourcen (Darwin)
 3*2WF_Spezifiziere "full-screen type application" (EMX, OS/2)
 3*2WG_Spezifiziere "graphic type application" (EMX, OS/2, Windows)
+4*2WG_Spezifiziere "graphic type application" (EMX, OS/2, Windows)
 A*2WG_Spezifiziere "graphic type application" (Windows)
 P*2WG_Spezifiziere "graphic type application" (Classic Mac OS)
 3*2Wi_Benutze interne Resourcen (Darwin)
+4*2Wi_Benutze interne Resourcen (Darwin)
+A*2Wi_Benutze interne Resourcen (Darwin)
 P*2Wi_Benutze interne Resourcen (Darwin)
 p*2Wi_Benutze interne Resourcen (Darwin)
+3*2WI_Die Verwendung der "import"-Abschnitte ein/ausschalten (Windows)
+4*2WI_Die Verwendung der "import"-Abschnitte ein/ausschalten (Windows)
+A*2WI_Die Verwendung der "import"-Abschnitte ein/ausschalten (Windows)
 3*2WN_Erzeuge keinen "relocation code" (notwendig für debugging) (Windows)
+4*2WN_Erzeuge keinen "relocation code" (notwendig für debugging) (Windows)
 A*2WN_Erzeuge keinen "relocation code" (notwendig für debugging) (Windows)
+A*2Wpxxxx_Spezifiziere den Kontrollertyp, mögliche Werte liefert fpc -i
+V*2Wpxxxx_Spezifiziere den Kontrollertyp, mögliche Werte liefert fpc -i
 3*2WR_Erzeuge "relocation code" (Windows)
+4*2WR_Erzeuge "relocation code" (Windows)
 A*2WR_Erzeuge "relocation code" (Windows)
 P*2WF_Spezifiziere "MPW tool type application" (Classic Mac OS)
-3*2WX_Ermögliche den executable stack (Linux)
-A*2WX_Ermögliche den executable stack (Linux)
-p*2WX_Ermögliche den executable stack (Linux)
-P*2WX_Ermögliche den executable stack (Linux)
+**2WX_Ermögliche den executable stack (Linux)
 **1X_Programm-Optionen:
 **2Xc_Übergebe --shared an den Linker (nur Unix)
 **2Xd_Den Standard Bibliotheks-Suchpfad NICHT nutzen (benötigt für cross compile)

+ 36 - 11
compiler/msg/errore.msg

@@ -79,7 +79,7 @@ general_t_objectpath=01007_T_Using object path: $1
 % When the \var{-vt} switch is used, this line tells you where the compiler
 % looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
 % You can set this path with the \var{-Fo} option.
-general_i_abslines_compiled=01008_I_$1 lines compiled, $2 sec $3
+general_i_abslines_compiled=01008_I_$1 lines compiled, $2 sec$3
 % When the \var{-vi} switch is used, the compiler reports the number
 % of lines compiled, and the time it took to compile them (real time,
 % not program time).
@@ -124,6 +124,10 @@ general_i_number_of_hints=01022_I_$1 hint(s) issued
 % Total number of hints issued during compilation.
 general_i_number_of_notes=01023_I_$1 note(s) issued
 % Total number of notes issued during compilation.
+general_f_ioerror=01024_F_I/O error: $1
+% During compilation an I/O error happened which allows no further compilation.
+general_f_oserror=01025_F_Operating system error: $1
+% During compilation an operanting system error happened which allows no further compilation.
 % \end{description}
 #
 # Scanner
@@ -1388,6 +1392,14 @@ parser_e_inherited_not_in_record=03309_E_The use of "inherited" is not allowed i
 parser_e_no_types_in_local_anonymous_records=03310_E_Type declarations are not allowed in local or anonymous records
 % Records with types must be defined globally. Types cannot be defined inside records which are defined in a
 % procedure or function or in anonymous records.
+parser_e_duplicate_implements_clause=03311_E_Duplicate implements clause for interface "$1"
+% A class may delegate an interface using the "implements" clause only to a single property. Delegating it multiple times
+% is a error.
+parser_e_mapping_no_implements=03312_E_Interface "$1" can't be delegated by "$2", it already has method resolutions
+% Method resolution clause maps a method of an interface to a method of the current class. Therefore the current class
+% has to implement the interface directly. Delegation is not possible.
+parser_e_implements_no_mapping=03313_E_Interface "$1" can't have method resolutions, "$2" already delegates it
+% Method resoulution is only possible for interfaces that are implemented directly, not by delegation.
 % \end{description}
 # Type Checking
 #
@@ -1578,14 +1590,16 @@ type_e_type_is_not_completly_defined=04042_E_Type "$1" is not completely defined
 type_w_string_too_long=04043_W_String literal has more characters than short string length
 % The size of the constant string, which is assigned to a shortstring,
 % is longer than the maximum size of the shortstring (255 characters).
-type_w_signed_unsigned_always_false=04044_W_Comparison is always false due to range of values
-% There is a comparison between an unsigned value and a signed constant which is
-% less than zero. Because of type promotion, the statement will always evaluate to
-% false. Explicitly typecast the constant to the correct range to avoid this problem.
-type_w_signed_unsigned_always_true=04045_W_Comparison is always true due to range of values
-% There is a comparison between an unsigned value and a signed constant which is
-% less than zero. Because of type promotion, the statement will always evaluate to
-% true. Explicitly typecast the constant to the correct range to avoid this problem.
+type_w_comparison_always_false=04044_W_Comparison might be always false due to range of constant and expression
+% There is a comparison between a constant and an expression where the constant is out of the
+% valid range of values of the expression. Because of type promotion, the statement will always evaluate to
+% false. Explicitly typecast the constant or the expression to the correct range to avoid this warning
+% if you think the code is correct.
+type_w_comparison_always_true=04045_W_Comparison might be always true due to range of constant and expression
+% There is a comparison between a constant and an expression where the constant is out of the
+% valid range of values of the expression. Because of type promotion, the statement will always evaluate to
+% true. Explicitly typecast the constant or the expression to the correct range to avoid this warning
+% if you think the code is correct.
 type_w_instance_with_abstract=04046_W_Constructing a class "$1" with abstract method "$2"
 % An instance of a class is created which contains non-implemented abstract
 % methods. This will probably lead to a runtime error 211 in the code if that
@@ -1749,7 +1763,10 @@ type_e_class_helper_must_extend_subclass=04101_E_Derived class helper must exten
 type_e_record_helper_must_extend_same_record=04102_E_Derived record helper must extend "$1"
 % If a record helper inherits from another record helper it must extend the same
 % record that the parent record helper extended.
-%
+type_e_procedures_return_no_value=04103_E_Invalid assignment, procedures return no value
+% This error occurs when one tries to assign the result of a procedure or destructor call.
+% A procedure or destructor returns no value so this is not
+% possible.
 % \end{description}
 #
 # Symtable
@@ -2411,6 +2428,9 @@ asmr_e_empty_regset=07109_E_A register set cannot be empty
 asmr_w_useless_got_for_local=07110_W_@GOTPCREL is useless and potentially dangereous for local symbols
 % The use of @GOTPCREL supposes an extra indirection that is
 % not present if the symbol is local, which might lead to wrong asembler code
+asmr_w_general_segment_with_constant=07111_W_Constant with general purpose segment register
+% General purpose register should not have constant offsets
+% as OS memory allocation might not be compatible with that.
 #
 # Assembler/binary writers
 #
@@ -2799,7 +2819,7 @@ unit_u_indirect_crc_changed=10062_U_Indirect interface (objects/classes) CRC cha
 #
 #  Options
 #
-# 11048 is the last used one
+# 11049 is the last used one
 #
 option_usage=11000_O_$1 [options] <inputfile> [options]
 # BeginOfTeX
@@ -2925,6 +2945,9 @@ option_ignored_target=11047_W_Option "$1" is ignored for the current target plat
 option_debug_external_unsupported=11048_W_Disabling external debug information because it is unsupported for the selected target/debug format combination.
 % Not all debug formats can be stored in an external file on all platforms. In particular, on
 % Mac OS X only DWARF debug information can be stored externally.
+option_dwarf_smartlink_creation=11049_N_DWARF debug information cannot be used with smart linking with external assembler, disabling static library creation.  
+% Smart linking is currently incompatble with DWARF debug information on most
+% platforms, so smart linking is disabled in such cases.
 %\end{description}
 # EndOfTeX
 
@@ -3342,6 +3365,8 @@ A*2WI_Turn on/off the usage of import sections (Windows)
 3*2WN_Do not generate relocation code, needed for debugging (Windows)
 4*2WN_Do not generate relocation code, needed for debugging (Windows)
 A*2WN_Do not generate relocation code, needed for debugging (Windows)
+A*2Wpxxxx_Specify the controller type, see fpc -i for possible values
+V*2Wpxxxx_Specify the controller type, see fpc -i for possible values
 3*2WR_Generate relocation code (Windows)
 4*2WR_Generate relocation code (Windows)
 A*2WR_Generate relocation code (Windows)

+ 13 - 5
compiler/msgidx.inc

@@ -23,6 +23,8 @@ const
   general_i_number_of_warnings=01021;
   general_i_number_of_hints=01022;
   general_i_number_of_notes=01023;
+  general_f_ioerror=01024;
+  general_f_oserror=01025;
   scan_f_end_of_file=02000;
   scan_f_string_exceeds_line=02001;
   scan_f_illegal_char=02002;
@@ -400,6 +402,9 @@ const
   parser_e_no_class_constructor_in_helpers=03308;
   parser_e_inherited_not_in_record=03309;
   parser_e_no_types_in_local_anonymous_records=03310;
+  parser_e_duplicate_implements_clause=03311;
+  parser_e_mapping_no_implements=03312;
+  parser_e_implements_no_mapping=03313;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
@@ -443,8 +448,8 @@ const
   type_e_class_or_interface_type_expected=04041;
   type_e_type_is_not_completly_defined=04042;
   type_w_string_too_long=04043;
-  type_w_signed_unsigned_always_false=04044;
-  type_w_signed_unsigned_always_true=04045;
+  type_w_comparison_always_false=04044;
+  type_w_comparison_always_true=04045;
   type_w_instance_with_abstract=04046;
   type_h_in_range_check=04047;
   type_w_smaller_possible_range_check=04048;
@@ -493,6 +498,7 @@ const
   type_e_record_type_expected=04100;
   type_e_class_helper_must_extend_subclass=04101;
   type_e_record_helper_must_extend_same_record=04102;
+  type_e_procedures_return_no_value=04103;
   sym_e_id_not_found=05000;
   sym_f_internal_error_in_symtablestack=05001;
   sym_e_duplicate_id=05002;
@@ -701,6 +707,7 @@ const
   asmr_e_mixing_regtypes=07108;
   asmr_e_empty_regset=07109;
   asmr_w_useless_got_for_local=07110;
+  asmr_w_general_segment_with_constant=07111;
   asmw_f_too_many_asm_files=08000;
   asmw_f_assembler_output_not_supported=08001;
   asmw_f_comp_not_supported=08002;
@@ -871,6 +878,7 @@ const
   option_dwarf_smart_linking=11046;
   option_ignored_target=11047;
   option_debug_external_unsupported=11048;
+  option_dwarf_smartlink_creation=11049;
   wpo_cant_find_file=12000;
   wpo_begin_processing=12001;
   wpo_end_processing=12002;
@@ -895,9 +903,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 60574;
+  MsgTxtSize = 61274;
 
   MsgIdxMax : array[1..20] of longint=(
-    24,89,311,103,85,54,111,23,202,63,
-    49,20,1,1,1,1,1,1,1,1
+    26,89,314,104,85,54,112,23,202,63,
+    50,20,1,1,1,1,1,1,1,1
   );

Diferenças do arquivo suprimidas por serem muito extensas
+ 466 - 454
compiler/msgtxt.inc


+ 240 - 172
compiler/nadd.pas

@@ -77,6 +77,14 @@ interface
            { checks whether a muln can be calculated as a 32bit }
            { * 32bit -> 64 bit                                  }
            function try_make_mul32to64: boolean;
+           { Match against the ranges, i.e.:
+             var a:1..10;
+             begin
+               if a>0 then
+                 ...
+             always evaluates to true. (DM)
+           }
+           function cmp_of_disjunct_ranges(var res : boolean) : boolean;
        end;
        taddnodeclass = class of taddnode;
 
@@ -173,11 +181,173 @@ implementation
       end;
 
 
+    function taddnode.cmp_of_disjunct_ranges(var res : boolean) : boolean;
+      var
+        hp          : tnode;
+        realdef     : tdef;
+        v           : tconstexprint;
+      begin
+        result:=false;
+        { check for comparision with known result because the ranges of the operands don't overlap }
+        if (is_constintnode(right) and (left.resultdef.typ=orddef) and
+            { don't ignore type checks }
+            is_subequal(right.resultdef,left.resultdef)) or
+           (is_constintnode(left) and (right.resultdef.typ=orddef) and
+            { don't ignore type checks }
+            is_subequal(left.resultdef,right.resultdef)) then
+           begin
+             if is_constintnode(right) then
+               begin
+                 hp:=left;
+                 v:=Tordconstnode(right).value;
+               end
+             else
+               begin
+                 hp:=right;
+                 v:=Tordconstnode(left).value;
+               end;
+
+             realdef:=hp.resultdef;
+             { stop with finding the real def when we either encounter
+                a) an explicit type conversion (then the value has to be
+                   re-interpreted)
+                b) an "absolute" type conversion (also requires
+                   re-interpretation)
+             }
+             while (hp.nodetype=typeconvn) and
+                   ([nf_internal,nf_explicit,nf_absolute] * hp.flags = []) do
+               begin
+                 hp:=ttypeconvnode(hp).left;
+                 realdef:=hp.resultdef;
+               end;
+             if is_constintnode(left) then
+               with torddef(realdef) do
+                 case nodetype of
+                  ltn:
+                    if v<low then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end
+                    else if v>=high then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end;
+                  lten:
+                    if v<=low then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end
+                    else if v>high then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end;
+                  gtn:
+                    if v<=low then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end
+                    else if v>high then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end;
+                  gten :
+                    if v<low then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end
+                    else if v>=high then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end;
+                  equaln:
+                    if (v<low) or (v>high) then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end;
+                  unequaln:
+                    if (v<low) or (v>high) then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end;
+                 end
+             else
+               with torddef(realdef) do
+                 case nodetype of
+                  ltn:
+                    if high<v then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end
+                    else if low>=v then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end;
+                  lten:
+                    if high<=v then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end
+                    else if low>v then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end;
+                  gtn:
+                    if high<=v then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end
+                    else if low>v then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end;
+                  gten:
+                    if high<v then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end
+                    else if low>=v then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end;
+                  equaln:
+                    if (v<low) or (v>high) then
+                      begin
+                        result:=true;
+                        res:=false;
+                      end;
+                  unequaln:
+                    if (v<low) or (v>high) then
+                      begin
+                        result:=true;
+                        res:=true;
+                      end;
+                 end;
+           end;
+      end;
+
+
     function taddnode.simplify(forinline : boolean) : tnode;
       var
-        t, hp   : tnode;
+        t       : tnode;
         lt,rt   : tnodetype;
-        realdef : tdef;
         rd,ld   : tdef;
         rv,lv,v : tconstexprint;
         rvd,lvd : bestreal;
@@ -187,6 +357,7 @@ implementation
         s1,s2   : pchar;
         l1,l2   : longint;
         resultset : Tconstset;
+        res,
         b       : boolean;
       begin
         result:=nil;
@@ -358,115 +529,21 @@ implementation
              result:=t;
              exit;
           end
-        {Match against the ranges, i.e.:
-         var a:1..10;
-         begin
-           if a>0 then
-         ... always evaluates to true. (DM)}
-        else if is_constintnode(left) and (right.resultdef.typ=orddef) and
-            { don't ignore type checks }
-            is_subequal(left.resultdef,right.resultdef) then
-            begin
-              t:=nil;
-              hp:=right;
-              realdef:=hp.resultdef;
-              { stop with finding the real def when we either encounter
-                 a) an explicit type conversion (then the value has to be
-                    re-interpreted)
-                 b) an "absolute" type conversion (also requires
-                    re-interpretation)
-              }
-              while (hp.nodetype=typeconvn) and
-                    ([nf_internal,nf_explicit,nf_absolute] * hp.flags = []) do
-                begin
-                  hp:=ttypeconvnode(hp).left;
-                  realdef:=hp.resultdef;
-                end;
-              lv:=Tordconstnode(left).value;
-              with torddef(realdef) do
-                case nodetype of
-                 ltn:
-                   if lv<low then
-                     t:=Cordconstnode.create(1,pasbool8type,true)
-                   else if lv>=high then
-                     t:=Cordconstnode.create(0,pasbool8type,true);
-                 lten:
-                   if lv<=low then
-                     t:=Cordconstnode.create(1,pasbool8type,true)
-                   else if lv>high then
-                     t:=Cordconstnode.create(0,pasbool8type,true);
-                 gtn:
-                   if lv<=low then
-                     t:=Cordconstnode.create(0,pasbool8type,true)
-                   else if lv>high then
-                     t:=Cordconstnode.create(1,pasbool8type,true);
-                 gten :
-                   if lv<low then
-                     t:=Cordconstnode.create(0,pasbool8type,true)
-                   else if lv>=high then
-                     t:=Cordconstnode.create(1,pasbool8type,true);
-                 equaln:
-                   if (lv<low) or (lv>high) then
-                     t:=Cordconstnode.create(0,pasbool8type,true);
-                 unequaln:
-                   if (lv<low) or (lv>high) then
-                     t:=Cordconstnode.create(1,pasbool8type,true);
-                end;
-              if t<>nil then
-                begin
-                  result:=t;
-                  exit;
-                end
-            end
-          else if (left.resultdef.typ=orddef) and is_constintnode(right) and
-              { don't ignore type checks }
-              is_subequal(left.resultdef,right.resultdef) then
-            begin
-              t:=nil;
-              hp:=left;
-              realdef:=hp.resultdef;
-              while (hp.nodetype=typeconvn) and
-                    ([nf_internal,nf_explicit,nf_absolute] * hp.flags = []) do
-                begin
-                  hp:=ttypeconvnode(hp).left;
-                  realdef:=hp.resultdef;
-                end;
-              rv:=Tordconstnode(right).value;
-              with torddef(realdef) do
-                case nodetype of
-                 ltn:
-                   if high<rv then
-                     t:=Cordconstnode.create(1,pasbool8type,true)
-                   else if low>=rv then
-                     t:=Cordconstnode.create(0,pasbool8type,true);
-                 lten:
-                   if high<=rv then
-                     t:=Cordconstnode.create(1,pasbool8type,true)
-                   else if low>rv then
-                     t:=Cordconstnode.create(0,pasbool8type,true);
-                 gtn:
-                   if high<=rv then
-                     t:=Cordconstnode.create(0,pasbool8type,true)
-                   else if low>rv then
-                     t:=Cordconstnode.create(1,pasbool8type,true);
-                 gten:
-                   if high<rv then
-                     t:=Cordconstnode.create(0,pasbool8type,true)
-                   else if low>=rv then
-                     t:=Cordconstnode.create(1,pasbool8type,true);
-                 equaln:
-                   if (rv<low) or (rv>high) then
-                     t:=Cordconstnode.create(0,pasbool8type,true);
-                 unequaln:
-                   if (rv<low) or (rv>high) then
-                     t:=Cordconstnode.create(1,pasbool8type,true);
-                end;
-              if t<>nil then
-                begin
-                  result:=t;
-                  exit;
-                end
-            end;
+        else if cmp_of_disjunct_ranges(res) then
+          begin
+            if res then
+              t:=Cordconstnode.create(1,pasbool8type,true)
+            else
+              t:=Cordconstnode.create(0,pasbool8type,true);
+              { don't do this optimization, if the variable expression might
+                have a side effect }
+              if (is_constintnode(left) and might_have_sideeffects(right)) or
+                (is_constintnode(right) and might_have_sideeffects(left)) then
+                t.free
+              else
+                result:=t;
+              exit;
+          end;
 
         { Add,Sub,Mul with constant 0, 1 or -1?  }
         if is_constintnode(right) and is_integer(left.resultdef) then
@@ -748,35 +825,50 @@ implementation
              exit;
           end;
 
-        { the comparison is might be expensive and the nodes are usually only
-          equal if some previous optimizations were done so don't check
-          this simplification always
-        }
-        if (cs_opt_level2 in current_settings.optimizerswitches) and
-          is_boolean(left.resultdef) and is_boolean(right.resultdef) and
-          { since the expressions might have sideeffects, we may only remove them
-            if short boolean evaluation is turned on }
-          (nf_short_bool in flags) then
-            begin
-              if left.isequal(right) then
-                begin
-                  case nodetype of
-                    andn,orn:
-                      begin
-                        result:=left;
-                        left:=nil;
-                        exit;
-                      end;
-                    {
-                    xorn:
-                      begin
-                        result:=cordconstnode.create(0,resultdef,true);
-                        exit;
-                      end;
-                    }
+        { slow simplifications }
+        if (cs_opt_level2 in current_settings.optimizerswitches) then
+          begin
+            { the comparison is might be expensive and the nodes are usually only
+              equal if some previous optimizations were done so don't check
+              this simplification always
+            }
+            if is_boolean(left.resultdef) and is_boolean(right.resultdef) and
+            { since the expressions might have sideeffects, we may only remove them
+              if short boolean evaluation is turned on }
+            (nf_short_bool in flags) then
+              begin
+                if left.isequal(right) then
+                  begin
+                    case nodetype of
+                      andn,orn:
+                        begin
+                          result:=left;
+                          left:=nil;
+                          exit;
+                        end;
+                      {
+                      xorn:
+                        begin
+                          result:=cordconstnode.create(0,resultdef,true);
+                          exit;
+                        end;
+                      }
+                    end;
                   end;
-                end;
-            end;
+              end;
+
+            { using sqr(x) for reals instead of x*x might reduces register pressure and/or
+              memory accesses while sqr(<real>) has no drawback }
+            if (nodetype=muln) and
+               is_real(left.resultdef) and is_real(right.resultdef) and
+               left.isequal(right) and
+               not(might_have_sideeffects(left)) then
+              begin
+                result:=cinlinenode.create(in_sqr_real,false,left);
+                left:=nil;
+                exit;
+              end;
+          end;
       end;
 
 
@@ -816,6 +908,7 @@ implementation
         llow,lhigh,
         rlow,rhigh  : tconstexprint;
         strtype     : tstringtype;
+        res,
         b           : boolean;
         lt,rt       : tnodetype;
         ot          : tnodetype;
@@ -1276,39 +1369,6 @@ implementation
              { generic ord conversion is sinttype }
              else
                begin
-                 { if the left or right value is smaller than the normal
-                   type sinttype and is unsigned, and the other value
-                   is a constant < 0, the result will always be false/true
-                   for equal / unequal nodes.
-                 }
-                 if (
-                      { left : unsigned ordinal var, right : < 0 constant }
-                      (
-                       ((is_signed(ld)=false) and (is_constintnode(left) =false)) and
-                       ((is_constintnode(right)) and (tordconstnode(right).value < 0))
-                      ) or
-                      { right : unsigned ordinal var, left : < 0 constant }
-                      (
-                       ((is_signed(rd)=false) and (is_constintnode(right) =false)) and
-                       ((is_constintnode(left)) and (tordconstnode(left).value < 0))
-                      )
-                    )  then
-                    begin
-                      if nodetype = equaln then
-                         CGMessage(type_w_signed_unsigned_always_false)
-                      else
-                      if nodetype = unequaln then
-                         CGMessage(type_w_signed_unsigned_always_true)
-                      else
-                      if (is_constintnode(left) and (nodetype in [ltn,lten])) or
-                         (is_constintnode(right) and (nodetype in [gtn,gten])) then
-                         CGMessage(type_w_signed_unsigned_always_true)
-                      else
-                      if (is_constintnode(right) and (nodetype in [ltn,lten])) or
-                         (is_constintnode(left) and (nodetype in [gtn,gten])) then
-                         CGMessage(type_w_signed_unsigned_always_false);
-                    end;
-
                  { When there is a signed type or there is a minus operation
                    we convert to signed int. Otherwise (both are unsigned) we keep
                    the result also unsigned. This is compatible with Delphi (PFV) }
@@ -1854,6 +1914,14 @@ implementation
             inserttypeconv(right,sinttype);
           end;
 
+         if cmp_of_disjunct_ranges(res) then
+           begin
+             if res then
+               CGMessage(type_w_comparison_always_true)
+             else
+               CGMessage(type_w_comparison_always_false);
+           end;
+
          { set resultdef if not already done }
          if not assigned(resultdef) then
           begin

+ 17 - 17
compiler/nbas.pas

@@ -123,7 +123,7 @@ interface
        { a node which will create a (non)persistent temp of a given type with a given  }
        { size (the size is separate to allow creating "void" temps with a custom size) }
        ttempcreatenode = class(tnode)
-          size: aint;
+          size: tcgint;
           tempinfo: ptempinfo;
           ftemplvalue : tnode;
           { * persistent temps are used in manually written code where the temp }
@@ -133,9 +133,9 @@ interface
           { where the node that receives the temp becomes responsible for       }
           { freeing it. In this last case, you must use only one reference      }
           { to it and *not* generate a ttempdeletenode                          }
-          constructor create(_typedef: tdef; _size: aint; _temptype: ttemptype;allowreg:boolean); virtual;
-          constructor create_withnode(_typedef: tdef; _size: aint; _temptype: ttemptype; allowreg:boolean; withnode: tnode); virtual;
-          constructor create_value(_typedef:tdef; _size: aint; _temptype: ttemptype;allowreg:boolean; templvalue: tnode);
+          constructor create(_typedef: tdef; _size: tcgint; _temptype: ttemptype;allowreg:boolean); virtual;
+          constructor create_withnode(_typedef: tdef; _size: tcgint; _temptype: ttemptype; allowreg:boolean; withnode: tnode); virtual;
+          constructor create_value(_typedef:tdef; _size: tcgint; _temptype: ttemptype;allowreg:boolean; templvalue: tnode);
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderefimpl;override;
@@ -694,7 +694,7 @@ implementation
                           TEMPCREATENODE
 *****************************************************************************}
 
-    constructor ttempcreatenode.create(_typedef:tdef; _size: aint; _temptype: ttemptype;allowreg:boolean);
+    constructor ttempcreatenode.create(_typedef:tdef; _size: tcgint; _temptype: ttemptype;allowreg:boolean);
       begin
         inherited create(tempcreaten);
         size := _size;
@@ -717,14 +717,14 @@ implementation
       end;
 
 
-    constructor ttempcreatenode.create_withnode(_typedef: tdef; _size: aint; _temptype: ttemptype; allowreg:boolean; withnode: tnode);
+    constructor ttempcreatenode.create_withnode(_typedef: tdef; _size: tcgint; _temptype: ttemptype; allowreg:boolean; withnode: tnode);
       begin
         self.create(_typedef,_size,_temptype,allowreg);
         tempinfo^.withnode:=withnode.getcopy;
       end;
 
 
-    constructor ttempcreatenode.create_value(_typedef:tdef; _size: aint; _temptype: ttemptype;allowreg:boolean; templvalue: tnode);
+    constructor ttempcreatenode.create_value(_typedef:tdef; _size: tcgint; _temptype: ttemptype;allowreg:boolean; templvalue: tnode);
       begin
         self.create(_typedef,_size,_temptype,allowreg);
         // store in ppuwrite
@@ -747,27 +747,27 @@ implementation
         n.tempinfo^.typedef := tempinfo^.typedef;
         n.tempinfo^.temptype := tempinfo^.temptype;
         n.tempinfo^.flags := tempinfo^.flags * tempinfostoreflags;
-        if assigned(tempinfo^.withnode) then
-          n.tempinfo^.withnode := tempinfo^.withnode.getcopy
-        else
-          n.tempinfo^.withnode := nil;
-
-        if assigned(tempinfo^.tempinitcode) then
-          n.tempinfo^.tempinitcode := tempinfo^.tempinitcode.getcopy
-        else
-          n.tempinfo^.tempinitcode := nil;
 
         { when the tempinfo has already a hookoncopy then it is not
           reset by a tempdeletenode }
         if assigned(tempinfo^.hookoncopy) then
           internalerror(200211262);
-
         { signal the temprefs that the temp they point to has been copied, }
         { so that if the refs get copied as well, they can hook themselves }
         { to the copy of the temp                                          }
         tempinfo^.hookoncopy := n.tempinfo;
         exclude(tempinfo^.flags,ti_nextref_set_hookoncopy_nil);
 
+        if assigned(tempinfo^.withnode) then
+          n.tempinfo^.withnode := tempinfo^.withnode.getcopy
+        else
+          n.tempinfo^.withnode := nil;
+
+        if assigned(tempinfo^.tempinitcode) then
+          n.tempinfo^.tempinitcode := tempinfo^.tempinitcode.getcopy
+        else
+          n.tempinfo^.tempinitcode := nil;
+
         result := n;
       end;
 

+ 17 - 2
compiler/ncal.pas

@@ -1877,6 +1877,11 @@ implementation
           firstpass would be called multiple times }
         include(callnodeflags,cnf_objc_processed);
 
+        { make sure the methodpointer doesn't get translated into a call
+          as well (endless loop) }
+        if methodpointer.nodetype=loadvmtaddrn then
+          tloadvmtaddrnode(methodpointer).forcall:=true;
+
         { A) set the appropriate objc_msgSend* variant to call }
 
         { record returned via implicit pointer }
@@ -1938,6 +1943,10 @@ implementation
                 (selftree.resultdef.typ<>classrefdef) then
                begin
                  selftree:=cloadvmtaddrnode.create(selftree);
+                 { since we're in a class method of the current class, its
+                   information has already been initialized (and that of all of
+                   its parent classes too) }
+                 tloadvmtaddrnode(selftree).forcall:=true;
                  typecheckpass(selftree);
                end;
              selfrestype:=selftree.resultdef;
@@ -1981,6 +1990,9 @@ implementation
                 (methodpointer.resultdef.typ<>classrefdef)) then
               begin
                 methodpointer:=cloadvmtaddrnode.create(methodpointer);
+                { no need to obtain the class ref by calling class(), sending
+                  this message will initialize it if necessary }
+                tloadvmtaddrnode(methodpointer).forcall:=true;
                 firstpass(methodpointer);
               end;
           end;
@@ -2013,7 +2025,10 @@ implementation
                 vmttree:=methodpointer.getcopy;
                 { Only a typenode can be passed when it is called with <class of xx>.create }
                 if vmttree.nodetype=typen then
-                  vmttree:=cloadvmtaddrnode.create(vmttree);
+                  begin
+                    vmttree:=cloadvmtaddrnode.create(vmttree);
+                    tloadvmtaddrnode(vmttree).forcall:=true;
+                  end;
               end
             else
               begin
@@ -2723,7 +2738,7 @@ implementation
                                     ((m_delphi in current_settings.modeswitches) and (cnf_anon_inherited in callnodeflags));
                   candidates:=tcallcandidates.create(symtableprocentry,symtableproc,left,ignorevisibility,
                     not(nf_isproperty in flags),cnf_objc_id_call in callnodeflags,cnf_unit_specified in callnodeflags,
-                    callnodeflags*[cnf_anon_inherited,cnf_inherited]=[]);
+                    callnodeflags*[cnf_anon_inherited,cnf_inherited]=[],cnf_anon_inherited in callnodeflags);
 
                    { no procedures found? then there is something wrong
                      with the parameter size or the procedures are

+ 11 - 4
compiler/ncgadd.pas

@@ -303,6 +303,13 @@ interface
                   if (right.location.size<>left.location.size) or
                      (location.size<>left.location.size) then
                     internalerror(2010123001);
+                  { make sure that location.register is different from
+                    left.location.register, since right will overwrite it
+                    and we'll use left afterwards }
+                  if (right.location.loc=LOC_REGISTER) then
+                    location.register:=right.location.register
+                  else
+                    location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
                   { make sure we don't modify left/right.location, because we told
                     force_reg_left_right above that they can be constant }
                   cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NOT,location.size,right.location.register,location.register);
@@ -342,14 +349,14 @@ interface
       begin
         if nodetype<>addn then
           internalerror(20080302);
-        { setelementn is a special case, it must be on right }
-        if (nf_swapped in flags) and
-           (left.nodetype=setelementn) then
-          swapleftright;
         { no range support for smallsets }
         if assigned(tsetelementnode(right).right) then
           internalerror(20080303);
         pass_left_right;
+        { setelementn is a special case, it must be on right }
+        if (nf_swapped in flags) and
+           (left.nodetype=setelementn) then
+          swapleftright;
         force_reg_left_right(false,false);
         set_result_location_reg;
         setbase:=tsetdef(left.resultdef).setbase;

+ 31 - 11
compiler/ncgutil.pas

@@ -1037,7 +1037,11 @@ implementation
                       tmploc:=l;
                       location_force_mem(list,tmploc);
                       cg.a_load_loc_cgpara(list,tmploc,cgpara);
-                      location_freetemp(list,tmploc);
+                      { do not free the tmploc in case the original value was
+                        already in memory, because the caller (ncgcal) will then
+                        free it again later }
+                      if not(l.loc in [LOC_REFERENCE,LOC_CREFERENCE]) then
+                        location_freetemp(list,tmploc);
                     end
                   else
 {$endif not cpu64bitalu}
@@ -1257,7 +1261,7 @@ implementation
                   a local copy }
                 if not(current_procinfo.procdef.proccalloption in cdecl_pocalls) then
                   begin
-                    hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+                    hsym:=tparavarsym(get_high_value_sym(tparavarsym(p)));
                     if not assigned(hsym) then
                       internalerror(200306061);
                     hreg:=cg.getaddressregister(list);
@@ -1506,7 +1510,10 @@ implementation
         include(current_procinfo.flags,pi_needs_implicit_finally);
         OldAsmList:=current_asmdata.CurrAsmList;
         current_asmdata.CurrAsmList:=asmlist;
-        hp:=finalize_data_node(cloadnode.create(sym,sym.owner));
+        hp:=cloadnode.create(sym,sym.owner);
+        if (sym.typ=staticvarsym) and (vo_force_finalize in tstaticvarsym(sym).varoptions) then
+          include(hp.flags,nf_isinternal_ignoreconst);
+        hp:=finalize_data_node(hp);
         firstpass(hp);
         secondpass(hp);
         hp.free;
@@ -1544,7 +1551,10 @@ implementation
                     they may also be used in another unit
                   }
                   (tstaticvarsym(p).owner.symtabletype=globalsymtable)) and
-                 (tstaticvarsym(p).varspez<>vs_const) and
+                  (
+                    (tstaticvarsym(p).varspez<>vs_const) or
+                    (vo_force_finalize in tstaticvarsym(p).varoptions)
+                  ) and
                  not(vo_is_funcret in tstaticvarsym(p).varoptions) and
                  not(vo_is_external in tstaticvarsym(p).varoptions) and
                  is_managed_type(tstaticvarsym(p).vardef) then
@@ -1599,7 +1609,7 @@ implementation
                          begin
                            { open arrays do not contain correct element count in their rtti,
                              the actual count must be passed separately. }
-                           hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+                           hsym:=tparavarsym(get_high_value_sym(tparavarsym(p)));
                            eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
                            if not assigned(hsym) then
                              internalerror(201003031);
@@ -1634,7 +1644,7 @@ implementation
                        begin
                          if is_open_array(tparavarsym(p).vardef) then
                            begin
-                             hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+                             hsym:=tparavarsym(get_high_value_sym(tparavarsym(p)));
                              eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
                              if not assigned(hsym) then
                                internalerror(201103033);
@@ -1689,7 +1699,7 @@ implementation
               location_get_data_ref(list,tparavarsym(p).localloc,href,is_open_array(tparavarsym(p).vardef),sizeof(pint));
               if is_open_array(tparavarsym(p).vardef) then
                 begin
-                  hsym:=tparavarsym(tsym(p).owner.Find('high'+tsym(p).name));
+                  hsym:=tparavarsym(get_high_value_sym(tparavarsym(p)));
                   eldef:=tarraydef(tparavarsym(p).vardef).elementdef;
                   if not assigned(hsym) then
                     internalerror(201003032);
@@ -2789,6 +2799,8 @@ implementation
         oldhi, newhi: tregister;
 {$endif not cpu64bitalu}
         ressym: tsym;
+        { moved sym }
+        sym : tsym;
       end;
 
 
@@ -2820,6 +2832,7 @@ implementation
                       exit;
 {$endif not cpu64bitalu}
                   tabstractnormalvarsym(tloadnode(n).symtableentry).localloc.register := rr^.new;
+                  rr^.sym := tabstractnormalvarsym(tloadnode(n).symtableentry);
                   result := fen_norecurse_true;
                 end;
             end;
@@ -2865,6 +2878,7 @@ implementation
           exit;
         rr.old := n.location.register;
         rr.ressym := nil;
+        rr.sym := nil;
       {$ifndef cpu64bitalu}
         rr.oldhi := NR_NO;
       {$endif not cpu64bitalu}
@@ -2934,10 +2948,16 @@ implementation
           begin
             n.location.register64.reglo := rr.new;
             n.location.register64.reghi := rr.newhi;
+            if assigned(rr.sym) then
+              list.concat(tai_varloc.create64(rr.sym,rr.new,rr.newhi));
           end
         else
       {$endif not cpu64bitalu}
-          n.location.register := rr.new;
+          begin
+            n.location.register := rr.new;
+            if assigned(rr.sym) then
+              list.concat(tai_varloc.create(rr.sym,rr.new));
+          end;
       end;
 
 
@@ -3122,7 +3142,7 @@ implementation
 {$ENDIF arm}
         begin
 {$IFDEF arm}
-          if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then
+          if current_settings.cputype in [cpu_armv7m] then
             current_asmdata.asmlists[al_globals].concat(tai_const.Createname(name,0))
           else
             begin
@@ -3136,7 +3156,7 @@ implementation
       function GetInterruptTableLength: longint;
         begin
 {$if defined(ARM)}
-          result:=interruptvectors[current_settings.controllertype];
+          result:=embedded_controllers[current_settings.controllertype].interruptvectors;
 {$else}
           result:=0;
 {$endif}
@@ -3184,7 +3204,7 @@ implementation
         new_section(current_asmdata.asmlists[al_globals],sec_init,'VECTORS',sizeof(pint));
         current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('VECTORS',AT_DATA,0));
 {$IFDEF arm}
-        if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then
+        if current_settings.cputype in [cpu_armv7m] then
           current_asmdata.asmlists[al_globals].concat(tai_const.Createname('_stack_top',0)); { ARMv7-M processors have the initial stack value at address 0 }
 {$ENDIF arm}
 

+ 4 - 1
compiler/ncnv.pas

@@ -2137,7 +2137,10 @@ implementation
           ordconstn:
             inserttypeconv_internal(n,todef);
           typeconvn:
-            n.resultdef:=todef;
+            begin
+              n.resultdef:=todef;
+              ttypeconvnode(n).totypedef:=todef;
+            end;
         end;
       end;
 {$endif not cpu64bitalu}

+ 3 - 3
compiler/ncon.pas

@@ -342,7 +342,7 @@ implementation
 
     constructor tdataconstnode.ppuload(t:tnodetype;ppufile:tcompilerppufile);
       var
-        len : aint;
+        len : tcgint;
         buf : array[0..255] of byte;
       begin
         inherited ppuload(t,ppufile);
@@ -378,7 +378,7 @@ implementation
 
     procedure tdataconstnode.ppuwrite(ppufile:tcompilerppufile);
       var
-        len : aint;
+        len : tcgint;
         buf : array[0..255] of byte;
       begin
         inherited ppuwrite(ppufile);
@@ -406,7 +406,7 @@ implementation
     function tdataconstnode.dogetcopy : tnode;
       var
         n : tdataconstnode;
-        len : aint;
+        len : tcgint;
         buf : array[0..255] of byte;
       begin
         n:=tdataconstnode(inherited dogetcopy);

+ 10 - 1
compiler/nld.pas

@@ -627,7 +627,16 @@ implementation
           begin
             { check if the assignment may cause a range check error }
             check_ranges(fileinfo,right,left.resultdef);
-            inserttypeconv(right,left.resultdef);
+
+            { beginners might be confused about an error message like
+              Incompatible types: got "untyped" expected "LongInt"
+              when trying to assign the result of a procedure, so give
+              a better error message, see also #19122 }
+            if (left.resultdef.typ<>procvardef) and
+              (right.nodetype=calln) and is_void(right.resultdef) then
+              CGMessage(type_e_procedures_return_no_value)
+            else
+              inserttypeconv(right,left.resultdef);
           end;
 
         { call helpers for interface }

+ 36 - 0
compiler/nmem.pas

@@ -31,9 +31,17 @@ interface
 
     type
        tloadvmtaddrnode = class(tunarynode)
+          { unless this is for a call, we have to send the "class" message to
+            the objctype because the type information only gets initialized
+            after the first message has been sent -> crash if you pass an
+            uninitialized type to e.g. class_getInstanceSize() or so. No need
+            to save to/restore from ppu. }
+          forcall: boolean;
           constructor create(l : tnode);virtual;
           function pass_1 : tnode;override;
           function pass_typecheck:tnode;override;
+          function docompare(p: tnode): boolean; override;
+          function dogetcopy: tnode; override;
        end;
        tloadvmtaddrnodeclass = class of tloadvmtaddrnode;
 
@@ -190,6 +198,21 @@ implementation
       end;
 
 
+    function tloadvmtaddrnode.docompare(p: tnode): boolean;
+      begin
+        result:=inherited docompare(p);
+        if result then
+          result:=forcall=tloadvmtaddrnode(p).forcall;
+      end;
+
+
+    function tloadvmtaddrnode.dogetcopy: tnode;
+      begin
+        result:=inherited dogetcopy;
+        tloadvmtaddrnode(result).forcall:=forcall;
+      end;
+
+
     function tloadvmtaddrnode.pass_1 : tnode;
       var
         vs: tsym;
@@ -229,6 +252,19 @@ implementation
                else if (left.resultdef.typ=objectdef) then
                  tobjectdef(left.resultdef).register_maybe_created_object_type
              end
+           end
+         else if is_objcclass(left.resultdef) and
+              not(forcall) then
+           begin
+             { call "class" method (= "classclass" in FPC), because otherwise
+               we may use the class information before it has been
+               initialized }
+             vs:=search_struct_member(tobjectdef(left.resultdef),'CLASSCLASS');
+             if not assigned(vs) or
+                (vs.typ<>procsym) then
+               internalerror(2011080601);
+             { can't reuse "self", because it will be freed when we return }
+             result:=ccallnode.create(nil,tprocsym(vs),vs.owner,self.getcopy,[]);
            end;
       end;
 

+ 7 - 2
compiler/nobj.pas

@@ -529,14 +529,19 @@ implementation
               begin
                 { Find implementing procdef
                    1. Check for mapped name
-                   2. Use symbol name }
+                   2. Use symbol name, but only if there's no mapping,
+                      or we're processing ancestor of interface.
+                  When modifying this code, ensure that webtbs/tw11862, webtbs/tw4950
+                  and webtbf/tw19591 stay correct. }
                 implprocdef:=nil;
                 hs:=prefix+tprocdef(def).procsym.name;
                 mappedname:=ImplIntf.GetMapping(hs);
                 if mappedname<>'' then
                   implprocdef:=intf_search_procdef_by_name(tprocdef(def),mappedname);
                 if not assigned(implprocdef) then
-                  implprocdef:=intf_search_procdef_by_name(tprocdef(def),tprocdef(def).procsym.name);
+                  if (mappedname='') or (ImplIntf.IntfDef<>IntfDef) then
+                    implprocdef:=intf_search_procdef_by_name(tprocdef(def),tprocdef(def).procsym.name);
+
                 { Add procdef to the implemented interface }
                 if assigned(implprocdef) then
                   begin

+ 22 - 0
compiler/nutils.pas

@@ -109,6 +109,8 @@ interface
       represented by n }
     function genloadfield(n: tnode; const fieldname: string): tnode;
 
+    { returns true, if the tree given might have side effects }
+    function might_have_sideeffects(n : tnode) : boolean;
 
 implementation
 
@@ -1213,4 +1215,24 @@ implementation
         end;
       end;
 
+
+    function check_for_sideeffect(var n: tnode; arg: pointer): foreachnoderesult;
+      begin
+        result:=fen_false;
+        if (n.nodetype in [assignn,calln,asmn]) or
+          ((n.nodetype=inlinen) and
+           (tinlinenode(n).inlinenumber in [in_write_x,in_writeln_x,in_read_x,in_readln_x,in_str_x_string,
+             in_val_x,in_reset_x,in_rewrite_x,in_reset_typedfile,in_rewrite_typedfile,in_settextbuf_file_x,
+             in_inc_x,in_dec_x,in_include_x_y,in_exclude_x_y,in_break,in_continue,in_setlength_x,
+             in_finalize_x,in_new_x,in_dispose_x,in_exit,in_copy_x,in_initialize_x,in_leave,in_cycle])
+          ) then
+          result:=fen_norecurse_true;
+      end;
+
+
+    function might_have_sideeffects(n : tnode) : boolean;
+      begin
+        result:=foreachnodestatic(n,@check_for_sideeffect,nil);
+      end;
+
 end.

+ 6 - 4
compiler/ogbase.pas

@@ -913,7 +913,7 @@ implementation
     function TObjData.sectiontype2options(atype:TAsmSectiontype):TObjSectionOptions;
       const
         secoptions : array[TAsmSectiontype] of TObjSectionOptions = ([],
-          {user} [oso_Data,oso_load,oso_write,oso_executable,oso_keep],
+          {user} [oso_Data,oso_load,oso_write,oso_keep],
           {code} [oso_Data,oso_load,oso_readonly,oso_executable,oso_keep],
           {Data} [oso_Data,oso_load,oso_write,oso_keep],
 { TODO: Fix sec_rodata be read-only-with-relocs}
@@ -926,7 +926,7 @@ implementation
                        ,oso_keep
 {$endif FPC_USE_TLS_DIRECTORY}
           ],
-          {pdata} [oso_load,oso_readonly,oso_keep],
+          {pdata} [oso_data,oso_load,oso_readonly {$ifndef x86_64},oso_keep{$endif}],
           {stub} [oso_Data,oso_load,oso_readonly,oso_executable],
           {data_nonlazy}  [oso_Data,oso_load,oso_write],
           {data_lazy} [oso_Data,oso_load,oso_write],
@@ -1001,8 +1001,10 @@ implementation
           { For idata (at least idata2) it must be 4 bytes, because
             an entry is always (also in win64) 20 bytes and aligning
             on 8 bytes will insert 4 bytes between the entries resulting
-            in a corrupt idata section }
-          sec_idata2,sec_idata4,sec_idata5,sec_idata6,sec_idata7:
+            in a corrupt idata section.
+            Same story with .pdata, it has 4-byte elements which should
+            be packed without gaps. }
+          sec_idata2,sec_idata4,sec_idata5,sec_idata6,sec_idata7,sec_pdata:
             result:=4;
           else
             result:=sizeof(pint);

+ 20 - 5
compiler/ogcoff.pas

@@ -282,14 +282,17 @@ interface
 {$ifdef i386}
        COFF_MAGIC       = $14c;
        COFF_OPT_MAGIC   = $10b;
+       TLSDIR_SIZE      = $18;
 {$endif i386}
 {$ifdef arm}
        COFF_MAGIC       = $1c0;
        COFF_OPT_MAGIC   = $10b;
+       TLSDIR_SIZE      = $18;
 {$endif arm}
 {$ifdef x86_64}
        COFF_MAGIC       = $8664;
        COFF_OPT_MAGIC   = $20b;
+       TLSDIR_SIZE      = $28;
 {$endif x86_64}
     function ReadDLLImports(const dllname:string;readdllproc:Treaddllproc):boolean;
 
@@ -1312,6 +1315,8 @@ const pemagic : array[0..3] of byte = (
                 rel.reloctype:=IMAGE_REL_I386_SECREL32;
 {$endif i386}
 {$ifdef x86_64}
+              RELOC_NONE :
+                rel.reloctype:=IMAGE_REL_AMD64_ABSOLUTE;
               RELOC_RELATIVE :
                 rel.reloctype:=IMAGE_REL_AMD64_REL32;
               RELOC_ABSOLUTE32 :
@@ -1636,6 +1641,8 @@ const pemagic : array[0..3] of byte = (
                rel_type:=RELOC_SECREL32;
 {$endif i386}
 {$ifdef x86_64}
+             IMAGE_REL_AMD64_ABSOLUTE:
+               rel_type:=RELOC_NONE;
              IMAGE_REL_AMD64_REL32:
                rel_type:=RELOC_RELATIVE;
              IMAGE_REL_AMD64_ADDR32,
@@ -1930,7 +1937,9 @@ const pemagic : array[0..3] of byte = (
                  begin
                    if (Copy(secname,1,6)='.edata') or
                       (Copy(secname,1,5)='.rsrc') or
+{$ifndef x86_64}
                       (Copy(secname,1,6)='.pdata') or
+{$endif}
                       (Copy(secname,1,4)='.fpc') then
                      include(secoptions,oso_keep);
                    if (Copy(secname,1,6)='.idata') then
@@ -2108,12 +2117,14 @@ const pemagic : array[0..3] of byte = (
               sechdr.vsize:=mempos;
 
             { sechdr.dataSize is size of initilized data. Must be zero for sections that
-              do not contain one.
-              TODO: In Windows it must be rounded up to FileAlignment
+              do not contain one. In Windows it must be rounded up to FileAlignment
               (so it can be greater than VirtualSize) }
             if (oso_data in SecOptions) then
               begin
-                sechdr.dataSize:=Size;
+                if win32 then
+                  sechdr.dataSize:=Align(Size,SectionDataAlign)
+                else
+                  sechdr.dataSize:=Size;
                 if (Size>0) then
                   sechdr.datapos:=datapos;
               end;
@@ -2226,7 +2237,7 @@ const pemagic : array[0..3] of byte = (
         inherited DataPos_Symbols;
         { Calculating symbols position and size }
         nsyms:=ExeSymbolList.Count;
-        sympos:=CurrDataPos;
+        sympos:=Align(CurrDataPos,SectionDataAlign);
         inc(CurrDataPos,sizeof(coffsymbol)*nsyms);
       end;
 
@@ -2324,7 +2335,8 @@ const pemagic : array[0..3] of byte = (
             begin
               tlssymbol:=tlsexesymbol.ObjSymbol;
               peoptheader.DataDirectory[PE_DATADIR_TLS].vaddr:=tlssymbol.address;
-              peoptheader.DataDirectory[PE_DATADIR_TLS].size:=Sizeof(tlsdirectory);
+              { sizeof(TlsDirectory) is different on host and target when cross-compiling }
+              peoptheader.DataDirectory[PE_DATADIR_TLS].size:=TLSDIR_SIZE;
               if IsSharedLibrary then
                 begin
                   { Here we should reset __FPC_tls_callbacks value to nil }
@@ -2491,6 +2503,9 @@ const pemagic : array[0..3] of byte = (
         ExeSectionList.ForEachCall(@ExeSectionList_write_header,nil);
         { Section data }
         ExeSectionList.ForEachCall(@ExeSectionList_write_data,nil);
+        { Align after the last section }
+        FWriter.Writezeros(Align(FWriter.Size,SectionDataAlign)-FWriter.Size);
+
         { Optional Symbols }
         if SymPos<>FWriter.Size then
           internalerror(200602252);

+ 16 - 1
compiler/options.pas

@@ -286,7 +286,7 @@ begin
 }
               begin
                 hs:=s;
-                hs1:=ControllerTypeStr[controllertype];
+                hs1:=embedded_controllers[controllertype].ControllerTypeStr;
                 if hs1<>'' then
                   begin
                     Replace(hs,'$CONTROLLERTYPES',hs1);
@@ -365,6 +365,9 @@ begin
       'S',
 {$endif}
 {$ifdef vis}
+      'I',
+{$endif}
+{$ifdef avr}
       'V',
 {$endif}
       '*' : show:=true;
@@ -2304,6 +2307,15 @@ begin
   if (paratargetdbg in [dbg_dwarf2,dbg_dwarf3]) and
      not(target_info.system in systems_darwin) then
     begin
+      { smartlink creation does not yet work with DWARF 
+        debug info on most targets, but it works in internal assembler }
+      if (cs_create_smart in init_settings.moduleswitches) and
+         not (af_outputbinary in target_asm.flags) then
+        begin
+          Message(option_dwarf_smartlink_creation);
+          exclude(init_settings.moduleswitches,cs_create_smart);
+        end;
+
       { smart linking does not yet work with DWARF debug info on most targets }
       if (cs_link_smart in init_settings.globalswitches) then
         begin
@@ -2485,6 +2497,7 @@ begin
   def_system_macro('FPC_HAS_RIP_RELATIVE');
 {$endif x86_64}
   def_system_macro('FPC_HAS_CEXTENDED');
+  def_system_macro('FPC_HAS_RESSTRINITS');
 
 { these cpus have an inline rol/ror implementaion }
 {$if defined(x86) or defined(arm) or defined(powerpc) or defined(powerpc64)}
@@ -2770,6 +2783,8 @@ begin
           exclude(init_settings.moduleswitches,cs_debuginfo);
         end;
     end;
+  {TOptionheck a second time as we might have changed assembler just above }
+  option.checkoptionscompatibility;
 
   { maybe override debug info format }
   if (paratargetdbg<>dbg_none) then

+ 1 - 1
compiler/parser.pas

@@ -358,7 +358,7 @@ implementation
            begin
              if assigned(current_module) then
                internalerror(200501158);
-             set_current_module(tppumodule.create(nil,filename,'',false));
+             set_current_module(tppumodule.create(nil,'',filename,false));
              addloadedunit(current_module);
              main_module:=current_module;
              current_module.state:=ms_compile;

+ 39 - 7
compiler/pbase.pas

@@ -88,7 +88,7 @@ interface
     function consume_sym(var srsym:tsym;var srsymtable:TSymtable):boolean;
     function consume_sym_orgid(var srsym:tsym;var srsymtable:TSymtable;var s : string):boolean;
 
-    function try_consume_unitsym(var srsym:tsym;var srsymtable:TSymtable;var tokentoconsume : ttoken):boolean;
+    function try_consume_unitsym(var srsym:tsym;var srsymtable:TSymtable;var tokentoconsume:ttoken;consume_id:boolean):boolean;
 
     function try_consume_hintdirective(var symopt:tsymoptions; var deprecatedmsg:pshortstring):boolean;
 
@@ -191,7 +191,7 @@ implementation
           end;
         searchsym(pattern,srsym,srsymtable);
         { handle unit specification like System.Writeln }
-        try_consume_unitsym(srsym,srsymtable,t);
+        try_consume_unitsym(srsym,srsymtable,t,true);
         { if nothing found give error and return errorsym }
         if assigned(srsym) then
           check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg)
@@ -224,7 +224,7 @@ implementation
           end;
         searchsym(pattern,srsym,srsymtable);
         { handle unit specification like System.Writeln }
-        try_consume_unitsym(srsym,srsymtable,t);
+        try_consume_unitsym(srsym,srsymtable,t,true);
         { if nothing found give error and return errorsym }
         if assigned(srsym) then
           check_hints(srsym,srsym.symoptions,srsym.deprecatedmsg)
@@ -240,14 +240,16 @@ implementation
       end;
 
 
-    function try_consume_unitsym(var srsym:tsym;var srsymtable:TSymtable;var tokentoconsume : ttoken):boolean;
+    function try_consume_unitsym(var srsym:tsym;var srsymtable:TSymtable;var tokentoconsume:ttoken;consume_id:boolean):boolean;
       var
         hmodule: tmodule;
+        ns:ansistring;
+        nssym:tsym;
       begin
         result:=false;
         tokentoconsume:=_ID;
-        if assigned(srsym) and
-           (srsym.typ=unitsym) then
+
+        if assigned(srsym) and (srsym.typ in [unitsym,namespacesym]) then
           begin
             if not(srsym.owner.symtabletype in [staticsymtable,globalsymtable]) then
               internalerror(200501154);
@@ -260,8 +262,38 @@ implementation
               internalerror(201001120);
             if hmodule.unit_index=current_filepos.moduleindex then
               begin
-                consume(_ID);
+                if consume_id then
+                  consume(_ID);
                 consume(_POINT);
+                if srsym.typ=namespacesym then
+                  begin
+                    ns:=srsym.name;
+                    nssym:=srsym;
+                    while assigned(srsym) and (srsym.typ=namespacesym) do
+                      begin
+                        { we have a namespace. the next identifier should be either a namespace or a unit }
+                        searchsym_in_module(hmodule,ns+'.'+pattern,srsym,srsymtable);
+                        if assigned(srsym) and (srsym.typ in [namespacesym,unitsym]) then
+                          begin
+                            ns:=ns+'.'+pattern;
+                            nssym:=srsym;
+                            consume(_ID);
+                            consume(_POINT);
+                          end;
+                      end;
+                    { check if there is a hidden unit with this pattern in the namespace }
+                    if not assigned(srsym) and
+                       assigned(nssym) and (nssym.typ=namespacesym) and assigned(tnamespacesym(nssym).unitsym) then
+                      srsym:=tnamespacesym(nssym).unitsym;
+                    if assigned(srsym) and (srsym.typ<>unitsym) then
+                      internalerror(201108260);
+                    if not assigned(srsym) then
+                      begin
+                        result:=true;
+                        srsymtable:=nil;
+                        exit;
+                      end;
+                  end;
                 case token of
                   _ID:
                      searchsym_in_module(tunitsym(srsym).module,pattern,srsym,srsymtable);

+ 2 - 2
compiler/pdecl.pas

@@ -275,9 +275,9 @@ implementation
                       { get init value }
                       consume(_EQ);
                       if (cs_typed_const_writable in current_settings.localswitches) then
-                        tclist:=current_asmdata.asmlists[al_rotypedconsts]
+                        tclist:=current_asmdata.asmlists[al_typedconsts]
                       else
-                        tclist:=current_asmdata.asmlists[al_typedconsts];
+                        tclist:=current_asmdata.asmlists[al_rotypedconsts];
                       read_typed_const(tclist,tstaticvarsym(sym),in_structure);
                     end;
                 end;

+ 1 - 0
compiler/pdecobj.pas

@@ -1260,6 +1260,7 @@ implementation
                 list.add(current_structdef);
               end;
           end;
+        tabstractrecordsymtable(current_objectdef.symtable).addalignmentpadding;
 
         { return defined objectdef }
         result:=current_objectdef;

+ 5 - 0
compiler/pdecsub.pas

@@ -994,6 +994,9 @@ implementation
              ImplIntf:=tobjectdef(astruct).find_implemented_interface(tobjectdef(ttypesym(srsym).typedef));
            if ImplIntf=nil then
              Message(parser_e_interface_id_expected);
+           { must be a directly implemented interface }
+           if Assigned(ImplIntf.ImplementsGetter) then
+             Message2(parser_e_implements_no_mapping,ImplIntf.IntfDef.typename,astruct.objrealname^);
            consume(_ID);
            { Create unique name <interface>.<method> }
            hs:=sp+'.'+pattern;
@@ -1607,7 +1610,9 @@ end;
 
 procedure pd_interrupt(pd:tabstractprocdef);
 
+{$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
 var v: Tconstexprint;
+{$endif FPC_HAS_SYSTEMS_INTERRUPT_TABLE}
 
 begin
   if pd.parast.symtablelevel>normal_function_level then

+ 22 - 6
compiler/pdecvar.pas

@@ -772,7 +772,7 @@ implementation
 *)
          { Parse possible "implements" keyword }
          if not is_record(astruct) and try_to_consume(_IMPLEMENTS) then
-           begin
+           repeat
              single_type(def,[]);
 
              if not(is_interface(def)) then
@@ -780,7 +780,8 @@ implementation
 
              if is_interface(p.propdef) then
                begin
-                 if compare_defs(def,p.propdef,nothingn)<te_equal then
+                 { an interface type may delegate itself or one of its ancestors }
+                 if not p.propdef.is_related(def) then
                    begin
                      message2(parser_e_implements_must_have_correct_type,def.typename,p.propdef.typename);
                      exit;
@@ -841,6 +842,13 @@ implementation
                end;
              if found then
                begin
+                 { An interface may not be delegated by more than one property,
+                   it also may not have method mappings. }
+                 if Assigned(ImplIntf.ImplementsGetter) then
+                   message1(parser_e_duplicate_implements_clause,ImplIntf.IntfDef.typename);
+                 if Assigned(ImplIntf.NameMappings) then
+                   message2(parser_e_mapping_no_implements,ImplIntf.IntfDef.typename,astruct.objrealname^);
+
                  ImplIntf.ImplementsGetter:=p;
                  ImplIntf.VtblImplIntf:=ImplIntf;
                  case p.propaccesslist[palt_read].firstsym^.sym.typ of
@@ -872,7 +880,7 @@ implementation
                end
              else
                message1(parser_e_implements_uses_non_implemented_interface,def.typename);
-         end;
+           until not try_to_consume(_COMMA);
 
          { remove unneeded procdefs }
          if readprocdef.proctypeoption<>potype_propgetter then
@@ -1492,7 +1500,8 @@ implementation
          uniondef : trecorddef;
          hintsymoptions : tsymoptions;
          deprecatedmsg : pshortstring;
-         semicoloneaten: boolean;
+         semicoloneaten,
+         removeclassoption: boolean;
 {$if defined(powerpc) or defined(powerpc64)}
          tempdef: tdef;
          is_first_type: boolean;
@@ -1511,7 +1520,8 @@ implementation
            consume(_ID);
          { read vars }
          sc:=TFPObjectList.create(false);
-         recstlist:=TFPObjectList.create(false);;
+         recstlist:=TFPObjectList.create(false);
+         removeclassoption:=false;
          while (token=_ID) and
             not(((vd_object in options) or
                  ((vd_record in options) and (m_advanced_records in current_settings.modeswitches))) and
@@ -1646,7 +1656,8 @@ implementation
                  if not (vd_class in options) and try_to_consume(_STATIC) then
                    begin
                      consume(_SEMICOLON);
-                     include(options, vd_class);
+                     include(options,vd_class);
+                     removeclassoption:=true;
                    end;
                end;
              if vd_class in options then
@@ -1667,6 +1678,11 @@ implementation
                      sl.addsym(sl_load,hstaticvs);
                      recst.insert(tabsolutevarsym.create_ref('$'+static_name,hdef,sl));
                    end;
+                 if removeclassoption then
+                   begin
+                     exclude(options,vd_class);
+                     removeclassoption:=false;
+                   end;
                end;
              if (visibility=vis_published) and
                 not(is_class(hdef)) then

+ 109 - 6
compiler/pexpr.pas

@@ -519,10 +519,11 @@ implementation
                          err:=true;
                        end;
                    else
-                     begin
-                       Message(parser_e_illegal_parameter_list);
-                       err:=true;
-                     end;
+                     if p1.resultdef.typ<>undefineddef then
+                       begin
+                         Message(parser_e_illegal_parameter_list);
+                         err:=true;
+                       end;
                  end;
                end
               else
@@ -1518,6 +1519,74 @@ implementation
          p1:=newblock;
        end;
 
+      function parse_array_constructor(arrdef:tarraydef): tnode;
+        var
+          newstatement,assstatement:tstatementnode;
+          arrnode:ttempcreatenode;
+          temp2:ttempcreatenode;
+          assnode,paranode:tnode;
+          paracount:integer;
+        begin
+          result:=internalstatements(newstatement);
+          { create temp for result }
+          arrnode:=ctempcreatenode.create(arrdef,arrdef.size,tt_persistent,true);
+          addstatement(newstatement,arrnode);
+
+          paracount:=0;
+          { check arguments and create an assignment calls }
+          if try_to_consume(_LKLAMMER) then
+            begin
+              assnode:=internalstatements(assstatement);
+              repeat
+                { arr[i] := param_i }
+                addstatement(assstatement,
+                  cassignmentnode.create(
+                    cvecnode.create(
+                      ctemprefnode.create(arrnode),
+                      cordconstnode.create(paracount,arrdef.rangedef,false)),
+                    comp_expr(true,false)));
+                inc(paracount);
+              until not try_to_consume(_COMMA);
+              consume(_RKLAMMER);
+            end
+          else
+            assnode:=nil;
+
+          { get temp for array of lengths }
+          temp2:=ctempcreatenode.create(sinttype,sinttype.size,tt_persistent,false);
+          addstatement(newstatement,temp2);
+
+          { one dimensional }
+          addstatement(newstatement,cassignmentnode.create(
+              ctemprefnode.create_offset(temp2,0),
+              cordconstnode.create
+                 (paracount,s32inttype,true)));
+          { create call to fpc_dynarr_setlength }
+          addstatement(newstatement,ccallnode.createintern('fpc_dynarray_setlength',
+              ccallparanode.create(caddrnode.create_internal
+                    (ctemprefnode.create(temp2)),
+                 ccallparanode.create(cordconstnode.create
+                    (1,s32inttype,true),
+                 ccallparanode.create(caddrnode.create_internal
+                    (crttinode.create(tstoreddef(arrdef),initrtti,rdt_normal)),
+                 ccallparanode.create(
+                   ctypeconvnode.create_internal(
+                     ctemprefnode.create(arrnode),voidpointertype),
+                   nil))))
+
+            ));
+          { add assignment statememnts }
+          addstatement(newstatement,ctempdeletenode.create(temp2));
+          if assigned(assnode) then
+            addstatement(newstatement,assnode);
+          { the last statement should return the value as
+            location and type, this is done be referencing the
+            temp and converting it first from a persistent temp to
+            normal temp }
+          addstatement(newstatement,ctempdeletenode.create_normal_temp(arrnode));
+          addstatement(newstatement,ctemprefnode.create(arrnode));
+        end;
+
     var
      protsym  : tpropertysym;
      p2,p3  : tnode;
@@ -1748,6 +1817,36 @@ implementation
                        end;
                      consume(_ID);
                    end;
+                 arraydef:
+                   begin
+                     if is_dynamic_array(p1.resultdef) then
+                       begin
+                         if token=_ID then
+                           begin
+                             if pattern='CREATE' then
+                               begin
+                                 consume(_ID);
+                                 p2:=parse_array_constructor(tarraydef(p1.resultdef));
+                                 p1.destroy;
+                                 p1:=p2;
+                               end
+                             else
+                               begin
+                                 Message2(scan_f_syn_expected,'CREATE',pattern);
+                                 p1.destroy;
+                                 p1:=cerrornode.create;
+                                 consume(_ID);
+                               end;
+                           end;
+                       end
+                     else
+                       begin
+                         Message(parser_e_invalid_qualifier);
+                         p1.destroy;
+                         p1:=cerrornode.create;
+                         consume(_ID);
+                       end;
+                   end;
                   variantdef:
                     begin
                       { dispatch call? }
@@ -2009,7 +2108,7 @@ implementation
                  searchsym(pattern,srsym,srsymtable);
 
                { handle unit specification like System.Writeln }
-               unit_found:=try_consume_unitsym(srsym,srsymtable,t);
+               unit_found:=try_consume_unitsym(srsym,srsymtable,t,true);
                storedpattern:=pattern;
                orgstoredpattern:=orgpattern;
                consume(t);
@@ -2336,6 +2435,7 @@ implementation
          hs,hsorg   : string;
          hdef       : tdef;
          filepos    : tfileposinfo;
+         callflags  : tcallnodeflags;
          again,
          updatefpos,
          nodechanged  : boolean;
@@ -2482,7 +2582,10 @@ implementation
                              p1:=cerrornode.create;
                            end;
                        end;
-                       do_member_read(hclassdef,getaddr,srsym,p1,again,[cnf_inherited,cnf_anon_inherited]);
+                       callflags:=[cnf_inherited];
+                       if anon_inherited then
+                         include(callflags,cnf_anon_inherited);
+                       do_member_read(hclassdef,getaddr,srsym,p1,again,callflags);
                      end
                     else
                      begin

+ 27 - 8
compiler/pgenutil.pas

@@ -32,7 +32,7 @@ uses
   { symtable }
   symtype,symdef;
 
-    procedure generate_specialization(var tt:tdef;parse_class_parent:boolean;parsedtype:tdef;symname:string);
+    procedure generate_specialization(var tt:tdef;parse_class_parent:boolean;_prettyname:string;parsedtype:tdef;symname:string);
     function parse_generic_parameters:TFPObjectList;
     procedure insert_generic_parameter_types(def:tstoreddef;genericdef:tstoreddef;genericlist:TFPObjectList);
 
@@ -55,7 +55,7 @@ uses
   pbase,pexpr,pdecsub,ptype;
 
 
-    procedure generate_specialization(var tt:tdef;parse_class_parent:boolean;parsedtype:tdef;symname:string);
+    procedure generate_specialization(var tt:tdef;parse_class_parent:boolean;_prettyname:string;parsedtype:tdef;symname:string);
       var
         st  : TSymtable;
         srsym : tsym;
@@ -64,6 +64,7 @@ uses
         err : boolean;
         i,
         gencount : longint;
+        sym : tsym;
         genericdef : tstoreddef;
         generictype : ttypesym;
         genericdeflist : TFPObjectList;
@@ -72,6 +73,7 @@ uses
         oldextendeddefs    : TFPHashObjectList;
         hmodule : tmodule;
         pu : tused_unit;
+        prettyname : ansistring;
         uspecializename,
         countstr,genname,ugenname,specializename : string;
         vmtbuilder : TVMTBuilder;
@@ -157,15 +159,18 @@ uses
           begin
             genericdeflist.Add(parsedtype);
             specializename:='$'+parsedtype.typesym.realname;
+            prettyname:=parsedtype.typesym.prettyname;
           end
         else
-          specializename:='';
+          begin
+            specializename:='';
+            prettyname:='';
+          end;
         while not (token in [_GT,_RSHARPBRACKET]) do
           begin
+            { "first" is set to false at the end of the loop! }
             if not first then
-              consume(_COMMA)
-            else
-              first:=false;
+              consume(_COMMA);
             block_type:=bt_type;
             pt2:=factor(false,true);
             if pt2.nodetype=typen then
@@ -176,7 +181,13 @@ uses
                 if not assigned(pt2.resultdef.typesym) then
                   message(type_e_generics_cannot_reference_itself)
                 else
-                  specializename:=specializename+'$'+pt2.resultdef.typesym.realname;
+                  begin
+                    specializename:=specializename+'$'+pt2.resultdef.typesym.realname;
+                    if first then
+                      prettyname:=prettyname+pt2.resultdef.typesym.prettyname
+                    else
+                      prettyname:=prettyname+','+pt2.resultdef.typesym.prettyname;
+                  end;
               end
             else
               begin
@@ -184,6 +195,7 @@ uses
                 err:=true;
               end;
             pt2.free;
+            first:=false;
           end;
         block_type:=old_block_type;
 
@@ -232,6 +244,7 @@ uses
         { build the new type's name }
         specializename:=genname+specializename;
         uspecializename:=upper(specializename);
+        prettyname:=genericdef.typesym.prettyname+'<'+prettyname+'>';
 
         { select the symtable containing the params }
         case genericdef.typ of
@@ -372,11 +385,17 @@ uses
 
                 if not assigned(genericdef.generictokenbuf) then
                   internalerror(200511171);
-                current_scanner.startreplaytokens(genericdef.generictokenbuf);
+                current_scanner.startreplaytokens(genericdef.generictokenbuf,
+                  genericdef.change_endian);
                 read_named_type(tt,specializename,genericdef,generictypelist,false);
                 ttypesym(srsym).typedef:=tt;
                 tt.typesym:=srsym;
 
+                if _prettyname<>'' then
+                  ttypesym(tt.typesym).fprettyname:=_prettyname
+                else
+                  ttypesym(tt.typesym).fprettyname:=prettyname;
+
                 { Note regarding hint directives:
                   There is no need to remove the flags for them from the
                   specialized generic symbol, because hint directives that

+ 159 - 78
compiler/pmodules.pas

@@ -230,66 +230,89 @@ implementation
          ltvTable.Free;
       end;
 
-    procedure InsertWideInits;
+    procedure InsertRuntimeInits(const prefix:string;list:TLinkedList;unitflag:cardinal);
       var
         s: string;
         item: TTCInitItem;
       begin
-        item:=TTCInitItem(current_asmdata.WideInits.First);
+        item:=TTCInitItem(list.First);
         if item=nil then
           exit;
-        s:=make_mangledname('WIDEINITS',current_module.localsymtable,'');
+        s:=make_mangledname(prefix,current_module.localsymtable,'');
         maybe_new_object_file(current_asmdata.asmlists[al_globals]);
         new_section(current_asmdata.asmlists[al_globals],sec_data,s,sizeof(pint));
         current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global(s,AT_DATA,0));
         repeat
-          { address to initialize }
-          current_asmdata.asmlists[al_globals].concat(Tai_const.createname(item.sym.mangledname, item.offset));
-          { value with which to initialize }
-          current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(item.datalabel));
+          { optimize away unused local/static symbols }
+          if (item.sym.refs>0) or (item.sym.owner.symtabletype=globalsymtable) then
+            begin
+              { address to initialize }
+              current_asmdata.asmlists[al_globals].concat(Tai_const.createname(item.sym.mangledname, item.offset));
+              { value with which to initialize }
+              current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(item.datalabel));
+            end;
           item:=TTCInitItem(item.Next);
         until item=nil;
         { end-of-list marker }
         current_asmdata.asmlists[al_globals].concat(Tai_const.Create_sym(nil));
         current_asmdata.asmlists[al_globals].concat(Tai_symbol_end.Createname(s));
-        current_module.flags:=current_module.flags or uf_wideinits;
+        current_module.flags:=current_module.flags or unitflag;
       end;
 
-    procedure InsertWideInitsTablesTable;
+    procedure InsertRuntimeInitsTablesTable(const prefix,tablename:string;unitflag:cardinal);
       var
         hp: tused_unit;
-        lwiTables: TAsmList;
+        hlist: TAsmList;
         count: longint;
       begin
-        lwiTables:=TAsmList.Create;
+        hlist:=TAsmList.Create;
         count:=0;
         hp:=tused_unit(usedunits.first);
         while assigned(hp) do
          begin
-           if (hp.u.flags and uf_wideinits)=uf_wideinits then
+           if (hp.u.flags and unitflag)=unitflag then
             begin
-              lwiTables.concat(Tai_const.Createname(make_mangledname('WIDEINITS',hp.u.globalsymtable,''),0));
+              hlist.concat(Tai_const.Createname(make_mangledname(prefix,hp.u.globalsymtable,''),0));
               inc(count);
             end;
            hp:=tused_unit(hp.next);
          end;
-        { Add program widestring consts, if any }
-        if (current_module.flags and uf_wideinits)=uf_wideinits then
+        { Add items from program, if any }
+        if (current_module.flags and unitflag)=unitflag then
          begin
-           lwiTables.concat(Tai_const.Createname(make_mangledname('WIDEINITS',current_module.localsymtable,''),0));
+           hlist.concat(Tai_const.Createname(make_mangledname(prefix,current_module.localsymtable,''),0));
            inc(count);
          end;
         { Insert TableCount at start }
-        lwiTables.insert(Tai_const.Create_32bit(count));
+        hlist.insert(Tai_const.Create_32bit(count));
         { insert in data segment }
         maybe_new_object_file(current_asmdata.asmlists[al_globals]);
-        new_section(current_asmdata.asmlists[al_globals],sec_data,'FPC_WIDEINITTABLES',sizeof(pint));
-        current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global('FPC_WIDEINITTABLES',AT_DATA,0));
-        current_asmdata.asmlists[al_globals].concatlist(lwiTables);
-        current_asmdata.asmlists[al_globals].concat(Tai_symbol_end.Createname('FPC_WIDEINITTABLES'));
-        lwiTables.free;
+        new_section(current_asmdata.asmlists[al_globals],sec_data,tablename,sizeof(pint));
+        current_asmdata.asmlists[al_globals].concat(Tai_symbol.Createname_global(tablename,AT_DATA,0));
+        current_asmdata.asmlists[al_globals].concatlist(hlist);
+        current_asmdata.asmlists[al_globals].concat(Tai_symbol_end.Createname(tablename));
+        hlist.free;
+      end;
+
+    procedure InsertWideInits;
+      begin
+        InsertRuntimeInits('WIDEINITS',current_asmdata.WideInits,uf_wideinits);
+      end;
+
+    procedure InsertResStrInits;
+      begin
+        InsertRuntimeInits('RESSTRINITS',current_asmdata.ResStrInits,uf_resstrinits);
       end;
 
+    procedure InsertWideInitsTablesTable;
+      begin
+        InsertRuntimeInitsTablesTable('WIDEINITS','FPC_WIDEINITTABLES',uf_wideinits);
+      end;
+
+    procedure InsertResStrTablesTable;
+      begin
+        InsertRuntimeInitsTablesTable('RESSTRINITS','FPC_RESSTRINITTABLES',uf_resstrinits);
+      end;
 
     Function CheckResourcesUsed : boolean;
     var
@@ -529,7 +552,7 @@ implementation
         { insert unitsym }
         unitsym:=tunitsym.create(s,hp);
         inc(unitsym.refs);
-        current_module.localsymtable.insert(unitsym);
+        tabstractunitsymtable(current_module.localsymtable).insertunit(unitsym);
         { add to used units }
         current_module.addusedunit(hp,false,unitsym);
       end;
@@ -710,8 +733,9 @@ implementation
 
         { CPU targets with microcontroller support can add a controller specific unit }
 {$if defined(ARM) or defined(AVR)}
-        if (target_info.system in systems_embedded) and (current_settings.controllertype<>ct_none) then
-          AddUnit(controllerunitstr[current_settings.controllertype]);
+        if (target_info.system in systems_embedded) and (current_settings.controllertype<>ct_none) and
+          (embedded_controllers[current_settings.controllertype].controllerunitstr<>'') then
+          AddUnit(embedded_controllers[current_settings.controllertype].controllerunitstr);
 {$endif ARM}
       end;
 
@@ -732,7 +756,7 @@ implementation
 
     procedure loadunits;
       var
-         s,sorg  : TIDString;
+         s,sorg  : ansistring;
          fn      : string;
          pu      : tused_unit;
          hp2     : tmodule;
@@ -743,6 +767,13 @@ implementation
            s:=pattern;
            sorg:=orgpattern;
            consume(_ID);
+           while token=_POINT do
+             begin
+               consume(_POINT);
+               s:=s+'.'+pattern;
+               sorg:=sorg+'.'+orgpattern;
+               consume(_ID);
+             end;
            { support "<unit> in '<file>'" construct, but not for tp7 }
            fn:='';
            if not(m_tp7 in current_settings.modeswitches) and
@@ -781,7 +812,7 @@ implementation
                 can not use the modulename because that can be different
                 when -Un is used }
               unitsym:=tunitsym.create(sorg,nil);
-              current_module.localsymtable.insert(unitsym);
+              tabstractunitsymtable(current_module.localsymtable).insertunit(unitsym);
               { the current module uses the unit hp2 }
               current_module.addusedunit(hp2,true,unitsym);
             end
@@ -1066,6 +1097,7 @@ implementation
          force_init_final : boolean;
          init_procinfo,
          finalize_procinfo : tcgprocinfo;
+         unitname : ansistring;
          unitname8 : string[8];
          ag: boolean;
 {$ifdef debug_devirt}
@@ -1082,49 +1114,53 @@ implementation
          if compile_level=1 then
           Status.IsExe:=false;
 
-         if token=_ID then
-          begin
-             { create filenames and unit name }
-             main_file := current_scanner.inputfile;
-             while assigned(main_file.next) do
-               main_file := main_file.next;
-
-             new(s1);
-             s1^:=current_module.modulename^;
-             current_module.SetFileName(main_file.path^+main_file.name^,true);
-             current_module.SetModuleName(orgpattern);
-
-             { check for system unit }
-             new(s2);
-             s2^:=upper(ChangeFileExt(ExtractFileName(main_file.name^),''));
-             unitname8:=copy(current_module.modulename^,1,8);
-             if (cs_check_unit_name in current_settings.globalswitches) and
-                (
-                 not(
-                     (current_module.modulename^=s2^) or
-                     (
-                      (length(current_module.modulename^)>8) and
-                      (unitname8=s2^)
-                     )
-                    )
-                 or
+         unitname:=orgpattern;
+         consume(_ID);
+         while token=_POINT do
+           begin
+             consume(_POINT);
+             unitname:=unitname+'.'+orgpattern;
+             consume(_ID);
+           end;
+
+         { create filenames and unit name }
+         main_file := current_scanner.inputfile;
+         while assigned(main_file.next) do
+           main_file := main_file.next;
+
+         new(s1);
+         s1^:=current_module.modulename^;
+         current_module.SetFileName(main_file.path^+main_file.name^,true);
+         current_module.SetModuleName(unitname);
+
+         { check for system unit }
+         new(s2);
+         s2^:=upper(ChangeFileExt(ExtractFileName(main_file.name^),''));
+         unitname8:=copy(current_module.modulename^,1,8);
+         if (cs_check_unit_name in current_settings.globalswitches) and
+            (
+             not(
+                 (current_module.modulename^=s2^) or
                  (
-                  (length(s1^)>8) and
-                  (s1^<>current_module.modulename^)
+                  (length(current_module.modulename^)>8) and
+                  (unitname8=s2^)
                  )
-                ) then
-              Message1(unit_e_illegal_unit_name,current_module.realmodulename^);
-             if (current_module.modulename^='SYSTEM') then
-              include(current_settings.moduleswitches,cs_compilesystem);
-             dispose(s2);
-             dispose(s1);
-          end;
+                )
+             or
+             (
+              (length(s1^)>8) and
+              (s1^<>current_module.modulename^)
+             )
+            ) then
+          Message1(unit_e_illegal_unit_name,current_module.realmodulename^);
+         if (current_module.modulename^='SYSTEM') then
+          include(current_settings.moduleswitches,cs_compilesystem);
+         dispose(s2);
+         dispose(s1);
 
          if (target_info.system in systems_unit_program_exports) then
            exportlib.preparelib(current_module.realmodulename^);
 
-         consume(_ID);
-
          { parse hint directives }
          try_consume_hintdirective(current_module.moduleoptions, current_module.deprecatedmsg);
 
@@ -1157,7 +1193,7 @@ implementation
 
          { insert unitsym of this unit to prevent other units having
            the same name }
-         current_module.localsymtable.insert(tunitsym.create(current_module.realmodulename^,current_module));
+         tabstractunitsymtable(current_module.localsymtable).insertunit(tunitsym.create(current_module.realmodulename^,current_module));
 
          { load default units, like the system unit }
          loaddefaultunits;
@@ -1370,6 +1406,9 @@ implementation
          { Widestring typed constants }
          InsertWideInits;
 
+         { Resourcestring references }
+         InsertResStrInits;
+
          { generate debuginfo }
          if (cs_debuginfo in current_settings.moduleswitches) then
            current_debuginfo.inserttypeinfo;
@@ -1764,6 +1803,7 @@ implementation
         main_procinfo : tcgprocinfo;}
         force_init_final : boolean;
         uu : tused_unit;
+        module_name: ansistring;
       begin
          Status.IsPackage:=true;
          Status.IsExe:=true;
@@ -1801,15 +1841,25 @@ implementation
 
          current_module.SetFileName(main_file.path^+main_file.name^,true);
 
+         { consume _PACKAGE word }
          consume(_ID);
-         current_module.setmodulename(orgpattern);
+
+         module_name:=orgpattern;
+         consume(_ID);
+         while token=_POINT do
+           begin
+             consume(_POINT);
+             module_name:=module_name+'.'+orgpattern;
+             consume(_ID);
+           end;
+
+         current_module.setmodulename(module_name);
          current_module.ispackage:=true;
-         exportlib.preparelib(orgpattern);
+         exportlib.preparelib(module_name);
 
          if tf_library_needs_pic in target_info.flags then
            include(current_settings.moduleswitches,cs_create_pic);
 
-         consume(_ID);
          consume(_SEMICOLON);
 
          { global switches are read, so further changes aren't allowed }
@@ -1834,12 +1884,24 @@ implementation
          {Load the units used by the program we compile.}
          if (token=_ID) and (idtoken=_CONTAINS) then
            begin
+             { consume _CONTAINS word }
              consume(_ID);
              while true do
                begin
                  if token=_ID then
-                   AddUnit(pattern);
-                 consume(_ID);
+                   begin
+                     module_name:=pattern;
+                     consume(_ID);
+                     while token=_POINT do
+                       begin
+                         consume(_POINT);
+                         module_name:=module_name+'.'+orgpattern;
+                         consume(_ID);
+                       end;
+                     AddUnit(module_name);
+                   end
+                 else
+                   consume(_ID);
                  if token=_COMMA then
                    consume(_COMMA)
                  else break;
@@ -1852,7 +1914,7 @@ implementation
 
          {Insert the name of the main program into the symbol table.}
          if current_module.realmodulename^<>'' then
-           current_module.localsymtable.insert(tunitsym.create(current_module.realmodulename^,current_module));
+           tabstractunitsymtable(current_module.localsymtable).insertunit(tunitsym.create(current_module.realmodulename^,current_module));
 
          Message1(parser_u_parsing_implementation,current_module.mainsource^);
 
@@ -2045,6 +2107,7 @@ implementation
          main_procinfo : tcgprocinfo;
          force_init_final : boolean;
          resources_used : boolean;
+         program_name : ansistring;
       begin
          DLLsource:=islibrary;
          Status.IsLibrary:=IsLibrary;
@@ -2092,14 +2155,21 @@ implementation
          if islibrary then
            begin
               consume(_LIBRARY);
-              current_module.setmodulename(orgpattern);
+              program_name:=orgpattern;
+              consume(_ID);
+              while token=_POINT do
+                begin
+                  consume(_POINT);
+                  program_name:=program_name+'.'+orgpattern;
+                  consume(_ID);
+                end;
+              current_module.setmodulename(program_name);
               current_module.islibrary:=true;
-              exportlib.preparelib(orgpattern);
+              exportlib.preparelib(program_name);
 
               if tf_library_needs_pic in target_info.flags then
                 include(current_settings.moduleswitches,cs_create_pic);
 
-              consume(_ID);
               consume(_SEMICOLON);
            end
          else
@@ -2107,10 +2177,17 @@ implementation
            if token=_PROGRAM then
             begin
               consume(_PROGRAM);
-              current_module.setmodulename(orgpattern);
-              if (target_info.system in systems_unit_program_exports) then
-                exportlib.preparelib(orgpattern);
+              program_name:=orgpattern;
               consume(_ID);
+              while token=_POINT do
+                begin
+                  consume(_POINT);
+                  program_name:=program_name+'.'+orgpattern;
+                  consume(_ID);
+                end;
+              current_module.setmodulename(program_name);
+              if (target_info.system in systems_unit_program_exports) then
+                exportlib.preparelib(program_name);
               if token=_LKLAMMER then
                 begin
                    consume(_LKLAMMER);
@@ -2153,7 +2230,7 @@ implementation
 
          {Insert the name of the main program into the symbol table.}
          if current_module.realmodulename^<>'' then
-           current_module.localsymtable.insert(tunitsym.create(current_module.realmodulename^,current_module));
+           tabstractunitsymtable(current_module.localsymtable).insertunit(tunitsym.create(current_module.realmodulename^,current_module));
 
          Message1(parser_u_parsing_implementation,current_module.mainsource^);
 
@@ -2340,11 +2417,15 @@ implementation
          { Windows widestring needing initialization }
          InsertWideInits;
 
+         { Resourcestring references (const foo:string=someresourcestring) }
+         InsertResStrInits;
+
          { insert Tables and StackLength }
          InsertInitFinalTable;
          InsertThreadvarTablesTable;
          InsertResourceTablesTable;
          InsertWideInitsTablesTable;
+         InsertResStrTablesTable;
          InsertMemorySizes;
 
 {$ifdef FPC_HAS_SYSTEMS_INTERRUPT_TABLE}

+ 5 - 5
compiler/powerpc/cgcpu.pas

@@ -435,7 +435,7 @@ const
           end;
         ophi := TOpCG2AsmOpConstHi[op];
         oplo := TOpCG2AsmOpConstLo[op];
-        gotrlwi := get_rlwi_const(a,l1,l2);
+        gotrlwi := get_rlwi_const(aint(a),l1,l2);
         if (op in [OP_AND,OP_OR,OP_XOR]) then
           begin
             if (a = 0) then
@@ -1742,8 +1742,8 @@ const
         case op of
           OP_AND,OP_OR,OP_XOR:
             begin
-              cg.a_op_const_reg_reg(list,op,OS_32,tcgint(value),regsrc.reglo,regdst.reglo);
-              cg.a_op_const_reg_reg(list,op,OS_32,tcgint(value shr 32),regsrc.reghi,
+              cg.a_op_const_reg_reg(list,op,OS_32,aint(value),regsrc.reglo,regdst.reglo);
+              cg.a_op_const_reg_reg(list,op,OS_32,aint(value shr 32),regsrc.reghi,
                 regdst.reghi);
             end;
           OP_ADD, OP_SUB:
@@ -1771,7 +1771,7 @@ const
                   else if ((value shr 32) = 0) then
                     begin
                       tmpreg := tcgppc(cg).rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
-                      cg.a_load_const_reg(list,OS_32,tcgint(value),tmpreg);
+                      cg.a_load_const_reg(list,OS_32,aint(value),tmpreg);
                       list.concat(taicpu.op_reg_reg_reg(ops[issub,2],
                         regdst.reglo,regsrc.reglo,tmpreg));
                       list.concat(taicpu.op_reg_reg(ops[issub,3],
@@ -1788,7 +1788,7 @@ const
               else
                 begin
                   cg.a_load_reg_reg(list,OS_INT,OS_INT,regsrc.reglo,regdst.reglo);
-                  cg.a_op_const_reg_reg(list,op,OS_32,tcgint(value shr 32),regsrc.reghi,
+                  cg.a_op_const_reg_reg(list,op,OS_32,aint(value shr 32),regsrc.reghi,
                     regdst.reghi);
                 end;
             end;

+ 1 - 1
compiler/pp.lpi

@@ -43,7 +43,7 @@
     </Units>
   </ProjectOptions>
   <CompilerOptions>
-    <Version Value="9"/>
+    <Version Value="10"/>
     <PathDelim Value="\"/>
     <Target>
       <Filename Value="i386\pp"/>

+ 13 - 8
compiler/ppcarm.lpi

@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <CONFIG>
   <ProjectOptions>
+    <Version Value="9"/>
     <PathDelim Value="\"/>
-    <Version Value="7"/>
     <General>
       <Flags>
         <MainUnitHasUsesSectionForAllUnits Value="False"/>
@@ -12,9 +12,11 @@
       </Flags>
       <SessionStorage Value="InProjectDir"/>
       <MainUnit Value="0"/>
-      <TargetFileExt Value=".exe"/>
-      <Title Value="pp"/>
+      <Title Value="ppcarm"/>
     </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)"/>
@@ -49,14 +51,14 @@
     </Units>
   </ProjectOptions>
   <CompilerOptions>
-    <Version Value="8"/>
+    <Version Value="10"/>
     <PathDelim Value="\"/>
     <Target>
       <Filename Value="arm\pp"/>
     </Target>
     <SearchPaths>
-      <IncludeFiles Value="arm\"/>
-      <OtherUnitFiles Value="arm\;systems\"/>
+      <IncludeFiles Value="arm"/>
+      <OtherUnitFiles Value="arm;systems"/>
       <UnitOutputDirectory Value="arm\lazbuild"/>
     </SearchPaths>
     <Parsing>
@@ -64,6 +66,7 @@
         <CStyleOperator Value="False"/>
         <AllowLabel Value="False"/>
         <CPPInline Value="False"/>
+        <UseAnsiStrings Value="False"/>
       </SyntaxOptions>
     </Parsing>
     <Linking>
@@ -80,8 +83,10 @@
       <ConfigFile>
         <StopAfterErrCount Value="50"/>
       </ConfigFile>
-      <CustomOptions Value="-darm
-"/>
+      <CompilerMessages>
+        <UseMsgFile Value="True"/>
+      </CompilerMessages>
+      <CustomOptions Value="-darm"/>
       <CompilerPath Value="$(CompPath)"/>
     </Other>
   </CompilerOptions>

+ 1 - 1
compiler/ppcavr.lpi

@@ -42,7 +42,7 @@
     </Units>
   </ProjectOptions>
   <CompilerOptions>
-    <Version Value="9"/>
+    <Version Value="10"/>
     <PathDelim Value="\"/>
     <Target>
       <Filename Value="avr\pp"/>

+ 0 - 11
compiler/ppcgen/cgppc.pas

@@ -38,7 +38,6 @@ unit cgppc;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
 
         procedure a_call_reg(list : TAsmList;reg: tregister); override;
-        procedure a_call_ref(list : TAsmList;ref: treference); override;
 
         { stores the contents of register reg to the memory location described by
         ref }
@@ -410,16 +409,6 @@ unit cgppc;
       end;
 
 
-    procedure tcgppcgen.a_call_ref(list : TAsmList;ref: treference);
-      var
-        tempreg : TRegister;
-      begin
-        tempreg := getintregister(list, OS_ADDR);
-        a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,tempreg);
-        a_call_reg(list,tempreg);
-      end;
-
-
     procedure tcgppcgen.a_load_reg_ref(list: TAsmList; fromsize, tosize: TCGSize;
       reg: tregister; const ref: treference);
 

+ 62 - 49
compiler/ppu.pas

@@ -26,7 +26,7 @@ unit ppu;
 interface
 
   uses
-    globtype,constexp,cstreams;
+    systems,globtype,constexp,cstreams;
 
 { Also write the ppu if only crc if done, this can be used with ppudump to
   see the differences between the intf and implementation }
@@ -43,7 +43,7 @@ type
 {$endif Test_Double_checksum}
 
 const
-  CurrentPPUVersion = 132;
+  CurrentPPUVersion = 138;
 
 { buffer sizes }
   maxentrysize = 1024;
@@ -97,7 +97,7 @@ const
   ibunitsym        = 29;
   iblabelsym       = 30;
   ibsyssym         = 31;
-//  ibrttisym        = 32;
+  ibnamespacesym   = 32;
   iblocalvarsym    = 33;
   ibparavarsym     = 34;
   ibmacrosym       = 35;
@@ -132,6 +132,7 @@ const
 
   ibmainname       = 90;
   ibsymtableoptions = 91;
+  ibrecsymtableoptions = 91;
   { target-specific things }
   iblinkotherframeworks = 100;
 
@@ -159,6 +160,47 @@ const
   uf_has_dwarf_debuginfo = $200000; { this unit has dwarf debuginfo generated }
   uf_wideinits           = $400000; { this unit has winlike widestring typed constants }
   uf_classinits          = $800000; { this unit has class constructors/destructors }
+  uf_resstrinits        = $1000000; { this unit has string consts referencing resourcestrings }
+
+{$ifdef generic_cpu}
+{ We need to use the correct size of aint and pint for
+  the target CPU }
+const
+  CpuAddrBitSize : array[tsystemcpu] of longint =
+    (
+    {  0 } 32 {'none'},
+    {  1 } 32 {'i386'},
+    {  2 } 32 {'m68k'},
+    {  3 } 32 {'alpha'},
+    {  4 } 32 {'powerpc'},
+    {  5 } 32 {'sparc'},
+    {  6 } 32 {'vis'},
+    {  7 } 64 {'ia64'},
+    {  8 } 64 {'x86_64'},
+    {  9 } 32 {'mips'},
+    { 10 } 32 {'arm'},
+    { 11 } 64 {'powerpc64'},
+    { 12 } 16 {'avr'},
+    { 13 } 32 {'mipsel'}
+    );
+  CpuAluBitSize : array[tsystemcpu] of longint =
+    (
+    {  0 } 32 {'none'},
+    {  1 } 32 {'i386'},
+    {  2 } 32 {'m68k'},
+    {  3 } 32 {'alpha'},
+    {  4 } 32 {'powerpc'},
+    {  5 } 32 {'sparc'},
+    {  6 } 32 {'vis'},
+    {  7 } 64 {'ia64'},
+    {  8 } 64 {'x86_64'},
+    {  9 } 32 {'mips'},
+    { 10 } 32 {'arm'},
+    { 11 } 64 {'powerpc64'},
+    { 12 }  8 {'avr'},
+    { 13 } 32 {'mipsel'}
+    );
+{$endif generic_cpu}
 
 type
   { bestreal is defined based on the target architecture }
@@ -205,7 +247,6 @@ type
     crc_test2  : pcrc_array;
   private
 {$endif def Test_Double_checksum}
-    change_endian : boolean;
     buf      : pchar;
     bufstart,
     bufsize,
@@ -221,6 +262,7 @@ type
     entrytyp : byte;
     header           : tppuheader;
     size             : integer;
+    change_endian    : boolean; { Used in ppudump util }
     { crc for the entire unit }
     crc,
     { crc for the interface definitions in this unit }
@@ -286,6 +328,7 @@ type
     procedure putint64(i:int64);
     procedure putqword(q:qword);
     procedure putaint(i:aint);
+    procedure putasizeint(i:asizeint);
     procedure putaword(i:aword);
     procedure putreal(d:ppureal);
     procedure putstring(const s:string);
@@ -299,53 +342,12 @@ type
 implementation
 
   uses
-    systems,
 {$ifdef Test_Double_checksum}
     comphook,
 {$endif def Test_Double_checksum}
     fpccrc,
     cutils;
 
-{$ifdef generic_cpu}
-{ We need to use the correct size of aint and pint for
-  the target CPU }
-const
-  CpuAddrBitSize : array[tsystemcpu] of longint =
-    (
-    {  0 } 32 {'none'},
-    {  1 } 32 {'i386'},
-    {  2 } 32 {'m68k'},
-    {  3 } 32 {'alpha'},
-    {  4 } 32 {'powerpc'},
-    {  5 } 32 {'sparc'},
-    {  6 } 32 {'vis'},
-    {  7 } 64 {'ia64'},
-    {  8 } 64 {'x86_64'},
-    {  9 } 32 {'mips'},
-    { 10 } 32 {'arm'},
-    { 11 } 64 {'powerpc64'},
-    { 12 } 16 {'avr'},
-    { 13 } 32 {'mipsel'}
-    );
-  CpuAluBitSize : array[tsystemcpu] of longint =
-    (
-    {  0 } 32 {'none'},
-    {  1 } 32 {'i386'},
-    {  2 } 32 {'m68k'},
-    {  3 } 32 {'alpha'},
-    {  4 } 32 {'powerpc'},
-    {  5 } 32 {'sparc'},
-    {  6 } 32 {'vis'},
-    {  7 } 64 {'ia64'},
-    {  8 } 64 {'x86_64'},
-    {  9 } 32 {'mips'},
-    { 10 } 32 {'arm'},
-    { 11 } 64 {'powerpc64'},
-    { 12 }  8 {'avr'},
-    { 13 } 32 {'mipsel'}
-    );
-{$endif generic_cpu}
-
 
 
 function swapendian_ppureal(d:ppureal):ppureal;
@@ -863,7 +865,6 @@ begin
       else
         result:=e;
       inc(entryidx,sizeof(e));
-      result:=e;
       exit;
     end;
   if sizeofreal=sizeof(d) then
@@ -945,8 +946,13 @@ begin
      error:=true;
      exit;
    end;
-  SetLength(Result,l);
-  ReadData(result[1],l);
+  if l>0 then
+    begin
+      SetLength(Result,l);
+      ReadData(result[1],l);
+    end
+  else
+    Result:='';
   inc(entryidx,l);
 end;
 
@@ -1271,6 +1277,12 @@ begin
 end;
 
 
+procedure tppufile.putasizeint(i: asizeint);
+begin
+  putdata(i,sizeof(asizeint));
+end;
+
+
 procedure tppufile.putaword(i:aword);
 begin
   putdata(i,sizeof(aword));
@@ -1303,7 +1315,8 @@ procedure tppufile.putansistring(const s: ansistring);
   begin
     l:=length(s);
     putdata(l,4);
-    putdata(s[1],l);
+    if l>0 then
+      putdata(s[1],l);
   end;
 
 

+ 9 - 7
compiler/ppx86_64.lpi

@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
 <CONFIG>
   <ProjectOptions>
+    <Version Value="9"/>
     <PathDelim Value="\"/>
-    <Version Value="7"/>
     <General>
       <Flags>
         <MainUnitHasUsesSectionForAllUnits Value="False"/>
@@ -12,9 +12,11 @@
       </Flags>
       <SessionStorage Value="InProjectDir"/>
       <MainUnit Value="0"/>
-      <TargetFileExt Value=".exe"/>
       <Title Value="pp"/>
     </General>
+    <BuildModes Count="1">
+      <Item1 Name="default" Default="True"/>
+    </BuildModes>
     <PublishOptions>
       <Version Value="2"/>
       <DestinationDirectory Value="$(TestDir)\publishedproject\"/>
@@ -41,14 +43,14 @@
     </Units>
   </ProjectOptions>
   <CompilerOptions>
-    <Version Value="8"/>
+    <Version Value="10"/>
     <PathDelim Value="\"/>
     <Target>
       <Filename Value="x86_64\pp"/>
     </Target>
     <SearchPaths>
-      <IncludeFiles Value="x86_64\"/>
-      <OtherUnitFiles Value="x86_64\;x86\;systems\"/>
+      <IncludeFiles Value="x86_64"/>
+      <OtherUnitFiles Value="x86_64;x86;systems"/>
       <UnitOutputDirectory Value="x86_64\lazbuild"/>
     </SearchPaths>
     <Parsing>
@@ -56,6 +58,7 @@
         <CStyleOperator Value="False"/>
         <AllowLabel Value="False"/>
         <CPPInline Value="False"/>
+        <UseAnsiStrings Value="False"/>
       </SyntaxOptions>
     </Parsing>
     <Linking>
@@ -72,8 +75,7 @@
       <ConfigFile>
         <StopAfterErrCount Value="50"/>
       </ConfigFile>
-      <CustomOptions Value="-dx86_64
-"/>
+      <CustomOptions Value="-dx86_64"/>
       <CompilerPath Value="$(CompPath)"/>
     </Other>
   </CompilerOptions>

+ 9 - 14
compiler/pstatmnt.pas

@@ -799,6 +799,8 @@ implementation
          objname,objrealname : TIDString;
          srsym : tsym;
          srsymtable : TSymtable;
+         t:ttoken;
+         unit_found:boolean;
          oldcurrent_exceptblock: integer;
       begin
          include(current_procinfo.flags,pi_uses_exceptions);
@@ -886,23 +888,16 @@ implementation
                             begin
                                { check if type is valid, must be done here because
                                  with "e: Exception" the e is not necessary }
-                               if srsym=nil then
-                                begin
-                                  identifier_not_found(objrealname);
-                                  srsym:=generrorsym;
-                                end;
+
                                { support unit.identifier }
-                               if srsym.typ=unitsym then
+                               unit_found:=try_consume_unitsym(srsym,srsymtable,t,false);
+                               if srsym=nil then
                                  begin
-                                    consume(_POINT);
-                                    searchsym_in_module(tunitsym(srsym).module,pattern,srsym,srsymtable);
-                                    if srsym=nil then
-                                     begin
-                                       identifier_not_found(orgpattern);
-                                       srsym:=generrorsym;
-                                     end;
-                                    consume(_ID);
+                                   identifier_not_found(orgpattern);
+                                   srsym:=generrorsym;
                                  end;
+                               if unit_found then
+                                 consume(t);
                                { check if type is valid, must be done here because
                                  with "e: Exception" the e is not necessary }
                                if (srsym.typ=typesym) and

+ 9 - 2
compiler/psub.pas

@@ -104,7 +104,7 @@ implementation
        opttail,
        optcse,optloop,
        optutils
-{$if defined(arm) or defined(powerpc) or defined(powerpc64)}
+{$if defined(arm) or defined(powerpc) or defined(powerpc64) or defined(avr)}
        ,aasmcpu
 {$endif arm}
        {$ifndef NOOPT}
@@ -1228,6 +1228,12 @@ implementation
             finalizearmcode(aktproccode,aktlocaldata);
 {$endif ARM}
 
+{$ifdef AVR}
+            { because of the limited branch distance of cond. branches, they must be replaced
+              somtimes by normal jmps and an inverse branch }
+            finalizeavrcode(aktproccode);
+{$endif AVR}
+
             { Add end symbol and debug info }
             { this must be done after the pcrelativedata is appended else the distance calculation of
               insertpcrelativedata will be wrong, further the pc indirect data is part of the procedure
@@ -2023,7 +2029,8 @@ implementation
                      { use the index the module got from the current compilation process }
                      current_filepos.moduleindex:=hmodule.unit_index;
                      current_tokenpos:=current_filepos;
-                     current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf);
+                     current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf,
+                       tprocdef(tprocdef(hp).genericdef).change_endian);
                      read_proc_body(nil,tprocdef(hp));
                      current_filepos:=oldcurrent_filepos;
                    end

+ 1 - 0
compiler/psystem.pas

@@ -619,6 +619,7 @@ implementation
         aiclass[ait_regalloc]:=tai_regalloc;
         aiclass[ait_tempalloc]:=tai_tempalloc;
         aiclass[ait_marker]:=tai_marker;
+        aiclass[ait_seh_directive]:=tai_seh_directive;
       end;
 
 end.

+ 29 - 4
compiler/ptconst.pas

@@ -172,6 +172,7 @@ implementation
         list   : tasmlist;
         origsym: tstaticvarsym;
         offset:  asizeint;
+        origblock: tblock_type;
       end;
 
     { this procedure reads typed constants }
@@ -655,6 +656,7 @@ implementation
           ll        : tasmlabel;
           ca        : pchar;
           winlike   : boolean;
+          hsym      : tconstsym;
         begin
           n:=comp_expr(true,false);
           { load strval and strlength of the constant tree }
@@ -690,8 +692,26 @@ implementation
             end
           else if is_constresourcestringnode(n) then
             begin
-              strval:=pchar(tconstsym(tloadnode(n).symtableentry).value.valueptr);
-              strlength:=tconstsym(tloadnode(n).symtableentry).value.len;
+              hsym:=tconstsym(tloadnode(n).symtableentry);
+              strval:=pchar(hsym.value.valueptr);
+              strlength:=hsym.value.len;
+              { Delphi-compatible (mis)feature:
+                Link AnsiString constants to their initializing resourcestring,
+                enabling them to be (re)translated at runtime.
+                Wide/UnicodeString are currently rejected above (with incorrect error message).
+                ShortStrings cannot be handled unless another table is built for them;
+                considering this acceptable, because Delphi rejects them altogether.
+              }
+              if (not is_shortstring(def)) and
+                 ((hr.origsym.owner.symtablelevel<=main_program_level) or
+                  (hr.origblock=bt_const)) then
+                begin
+                  current_asmdata.ResStrInits.Concat(
+                    TTCInitItem.Create(hr.origsym,hr.offset,
+                    current_asmdata.RefAsmSymbol(make_mangledname('RESSTR',hsym.owner,hsym.name)))
+                  );
+                  Include(hr.origsym.varoptions,vo_force_finalize);
+                end;
             end
           else
             begin
@@ -748,13 +768,17 @@ implementation
                               strval,
                               winlike);
 
-                       { collect global Windows widestrings }
-                       if winlike and (hr.origsym.owner.symtablelevel <= main_program_level) then
+                       { Collect Windows widestrings that need initialization at startup.
+                         Local initialized vars are excluded because they are initialized
+                         at function entry instead. }
+                       if winlike and ((hr.origsym.owner.symtablelevel <= main_program_level) or
+                         (hr.origblock=bt_const)) then
                        begin
                          current_asmdata.WideInits.Concat(
                             TTCInitItem.Create(hr.origsym, hr.offset, ll)
                          );
                          ll := nil;
+                         Include(hr.origsym.varoptions, vo_force_finalize);
                        end;
                      end;
                      hr.list.concat(Tai_const.Create_sym(ll));
@@ -1457,6 +1481,7 @@ implementation
         hrec.list:=tasmlist.create;
         hrec.origsym:=sym;
         hrec.offset:=0;
+        hrec.origblock:=block_type;
         read_typed_const_data(hrec,sym.vardef);
 
         { Parse hints }

+ 4 - 3
compiler/ptype.pas

@@ -143,6 +143,7 @@ implementation
 
     procedure id_type(var def : tdef;isforwarddef,checkcurrentrecdef,allowgenericsyms:boolean;out srsym:tsym;out srsymtable:tsymtable); forward;
 
+
     { def is the outermost type in which other types have to be searched
 
       isforward indicates whether the current definition can be a forward definition
@@ -255,7 +256,7 @@ implementation
          { Use the special searchsym_type that search only types }
          searchsym_type(s,srsym,srsymtable);
          { handle unit specification like System.Writeln }
-         is_unit_specific:=try_consume_unitsym(srsym,srsymtable,t);
+         is_unit_specific:=try_consume_unitsym(srsym,srsymtable,t,true);
          consume(t);
          { Types are first defined with an error def before assigning
            the real type so check if it's an errordef. if so then
@@ -374,7 +375,7 @@ implementation
            (m_delphi in current_settings.modeswitches) then
           dospecialize:=token=_LSHARPBRACKET;
         if dospecialize then
-          generate_specialization(def,stoParseClassParent in options,nil,'')
+          generate_specialization(def,stoParseClassParent in options,'',nil,'')
         else
           begin
             if assigned(current_specializedef) and (def=current_specializedef.genericdef) then
@@ -850,7 +851,7 @@ implementation
                      dospecialize:=token=_LSHARPBRACKET;
                    if dospecialize then
                      begin
-                       generate_specialization(def,false,nil,'');
+                       generate_specialization(def,false,name,nil,'');
                        { handle nested types }
                        post_comp_expr_gendef(def);
                      end

+ 29 - 16
compiler/rautils.pas

@@ -93,11 +93,11 @@ type
   end;
 
   TOperand = class
-    typesize : aint;
+    opr    : TOprRec;
+    typesize : byte;
     hastype,          { if the operand has typecasted variable }
     hasvar : boolean; { if the operand is loaded with a variable }
     size   : TCGSize;
-    opr    : TOprRec;
     constructor create;virtual;
     destructor  destroy;override;
     Procedure SetSize(_size:longint;force:boolean);virtual;
@@ -112,11 +112,11 @@ type
   TCOperand = class of TOperand;
 
   TInstruction = class
+    operands  : array[1..max_operands] of toperand;
     opcode    : tasmop;
     condition : tasmcond;
     ops       : byte;
     labeled   : boolean;
-    operands  : array[1..max_operands] of toperand;
     constructor create(optype : tcoperand);virtual;
     destructor  destroy;override;
     { converts the instruction to an instruction how it's used by the assembler writer
@@ -1018,19 +1018,32 @@ end;
     Var
       p : toperand;
     Begin
-      case Ops of
-       2 :
-        begin
-          p:=Operands[1];
-          Operands[1]:=Operands[2];
-          Operands[2]:=p;
-        end;
-       3 :
-        begin
-          p:=Operands[1];
-          Operands[1]:=Operands[3];
-          Operands[3]:=p;
-        end;
+      case ops of
+        0,1:
+          ;
+        2 : begin
+              { 0,1 -> 1,0 }
+              p:=Operands[1];
+              Operands[1]:=Operands[2];
+              Operands[2]:=p;
+            end;
+        3 : begin
+              { 0,1,2 -> 2,1,0 }
+              p:=Operands[1];
+              Operands[1]:=Operands[3];
+              Operands[3]:=p;
+            end;
+        4 : begin
+              { 0,1,2,3 -> 3,2,1,0 }
+              p:=Operands[1];
+              Operands[1]:=Operands[4];
+              Operands[4]:=p;
+              p:=Operands[2];
+              Operands[2]:=Operands[3];
+              Operands[3]:=p;
+            end;
+        else
+          internalerror(201108142);
       end;
     end;
 

+ 26 - 0
compiler/rgobj.pas

@@ -1676,6 +1676,32 @@ unit rgobj;
                           end;
                       end;
                   end;
+              ait_varloc:
+                begin
+                  if (getregtype(tai_varloc(p).newlocation)=regtype) then
+                    begin
+                      if (cs_asm_source in current_settings.globalswitches) then
+                        begin
+                          setsupreg(tai_varloc(p).newlocation,reginfo[getsupreg(tai_varloc(p).newlocation)].colour);
+                          if tai_varloc(p).newlocationhi<>NR_NO then
+                            begin
+                              setsupreg(tai_varloc(p).newlocationhi,reginfo[getsupreg(tai_varloc(p).newlocationhi)].colour);
+                                hp:=Tai_comment.Create(strpnew('Var '+tai_varloc(p).varsym.realname+' located in register '+
+                                  std_regname(tai_varloc(p).newlocationhi)+':'+std_regname(tai_varloc(p).newlocation)));
+                            end
+                          else
+                            hp:=Tai_comment.Create(strpnew('Var '+tai_varloc(p).varsym.realname+' located in register '+
+                              std_regname(tai_varloc(p).newlocation)));
+                          list.insertafter(hp,p);
+                        end;
+                      q:=tai(p.next);
+                      list.remove(p);
+                      p.free;
+                      p:=q;
+                      continue;
+                    end;
+                end;
+
               ait_instruction:
                 with Taicpu(p) do
                   begin

+ 11 - 0
compiler/scandir.pas

@@ -946,7 +946,9 @@ unit scandir;
       recordpendinglocalfullswitch(switchesstatestack[switchesstatestackpos].localsw);
       recordpendingverbosityfullswitch(switchesstatestack[switchesstatestackpos].verbosity);
       pendingstate.nextmessagerecord:=switchesstatestack[switchesstatestackpos].pmessage;
+      { Reset verbosity and forget previous pmeesage }
       RestoreLocalVerbosity(nil);
+      current_settings.pmessage:=nil;
       flushpendingswitchesstate;
     end;
 
@@ -1053,6 +1055,15 @@ unit scandir;
     procedure dir_smartlink;
       begin
         do_moduleswitch(cs_create_smart);
+        if (paratargetdbg in [dbg_dwarf2,dbg_dwarf3]) and
+            not(target_info.system in systems_darwin) and
+            { smart linking does not yet work with DWARF debug info on most targets }
+            (cs_create_smart in current_settings.moduleswitches) and
+            not (af_outputbinary in target_asm.flags) then
+        begin
+          Message(option_dwarf_smart_linking);
+          Exclude(current_settings.moduleswitches,cs_create_smart);
+        end;
       end;
 
     procedure dir_stackframes;

+ 138 - 24
compiler/scanner.pas

@@ -71,12 +71,19 @@ interface
          settings : tsettings;
          tokenbuf : tdynamicarray;
          next     : treplaystack;
-         constructor Create(atoken: ttoken;asettings:tsettings;atokenbuf:tdynamicarray;anext:treplaystack);
+         change_endian : boolean;
+         constructor Create(atoken: ttoken;asettings:tsettings;
+           atokenbuf:tdynamicarray;anext:treplaystack; achange_endian : boolean);
        end;
 
        tcompile_time_predicate = function(var valuedescr: String) : Boolean;
 
-       tspecialgenerictoken = (ST_LOADSETTINGS,ST_LINE,ST_COLUMN,ST_FILEINDEX);
+       tspecialgenerictoken =
+         (ST_LOADSETTINGS,
+          ST_LINE,
+          ST_COLUMN,
+          ST_FILEINDEX,
+          ST_LOADMESSAGES);
 
        { tscannerfile }
 
@@ -112,10 +119,11 @@ interface
 
           replaytokenbuf,
           recordtokenbuf : tdynamicarray;
+          tokenbuf_change_endian : boolean;
 
           { last settings we stored }
           last_settings : tsettings;
-
+          last_message : pmessagestaterecord;
           { last filepos we stored }
           last_filepos,
           { if nexttoken<>NOTOKEN, then nexttokenpos holds its filepos }
@@ -165,7 +173,11 @@ interface
           procedure startrecordtokens(buf:tdynamicarray);
           procedure stoprecordtokens;
           procedure replaytoken;
-          procedure startreplaytokens(buf:tdynamicarray);
+          procedure startreplaytokens(buf:tdynamicarray; achange_endian : boolean);
+          procedure writesizeint(val : sizeint);
+          function  readsizeint : sizeint;
+          function  readdword : dword;
+          function  readword : word;
           procedure readchar;
           procedure readstring;
           procedure readnumber;
@@ -258,7 +270,6 @@ implementation
       preprocstring : array [preproctyp] of string[7]
         = ('$IFDEF','$IFNDEF','$IF','$IFOPT','$ELSE','$ELSEIF');
 
-
     function is_keyword(const s:string):boolean;
       var
         low,high,mid : longint;
@@ -309,9 +320,9 @@ implementation
          end
         else
          begin
-           exclude(current_settings.localswitches,cs_ansistrings);
+           exclude(current_settings.localswitches,cs_do_inline);
            if changeinit then
-            exclude(init_settings.localswitches,cs_ansistrings);
+            exclude(init_settings.localswitches,cs_do_inline);
          end;
       end;
 
@@ -1857,11 +1868,13 @@ In case not, the value returned can be arbitrary.
 {*****************************************************************************
                               TReplayStack
 *****************************************************************************}
-    constructor treplaystack.Create(atoken:ttoken;asettings:tsettings;atokenbuf:tdynamicarray;anext:treplaystack);
+    constructor treplaystack.Create(atoken:ttoken;asettings:tsettings;
+      atokenbuf:tdynamicarray;anext:treplaystack;achange_endian : boolean);
       begin
         token:=atoken;
         settings:=asettings;
         tokenbuf:=atokenbuf;
+        change_endian:=achange_endian;
         next:=anext;
       end;
 
@@ -1901,6 +1914,7 @@ In case not, the value returned can be arbitrary.
       { reset scanner }
         preprocstack:=nil;
         replaystack:=nil;
+        tokenbuf_change_endian:=false;
         comment_level:=0;
         yylexcount:=0;
         block_type:=bt_general;
@@ -2049,6 +2063,7 @@ In case not, the value returned can be arbitrary.
           internalerror(200511173);
         recordtokenbuf:=buf;
         fillchar(last_settings,sizeof(last_settings),0);
+        last_message:=nil;
         fillchar(last_filepos,sizeof(last_filepos),0);
       end;
 
@@ -2074,13 +2089,48 @@ In case not, the value returned can be arbitrary.
         recordtokenbuf.write(b,1);
       end;
 
+    procedure tscannerfile.writesizeint(val : sizeint);
+      begin
+        recordtokenbuf.write(val,sizeof(sizeint));
+      end;
+
+    function tscannerfile.readsizeint : sizeint;
+      var
+        val : sizeint;
+      begin
+        replaytokenbuf.read(val,sizeof(sizeint));
+        if tokenbuf_change_endian then
+          val:=swapendian(val);
+        result:=val;
+      end;
+
+    function tscannerfile.readdword : dword;
+      var
+        val : dword;
+      begin
+        replaytokenbuf.read(val,sizeof(dword));
+        if tokenbuf_change_endian then
+          val:=swapendian(val);
+        result:=val;
+      end;
+
+    function tscannerfile.readword : word;
+      var
+        val : word;
+      begin
+        replaytokenbuf.read(val,sizeof(word));
+        if tokenbuf_change_endian then
+          val:=swapendian(val);
+        result:=val;
+      end;
 
     procedure tscannerfile.recordtoken;
       var
         t : ttoken;
         s : tspecialgenerictoken;
-        len : sizeint;
+        len,val,msgnb,copy_size : sizeint;
         b : byte;
+        pmsg : pmessagestaterecord;
       begin
         if not assigned(recordtokenbuf) then
           internalerror(200511176);
@@ -2092,10 +2142,42 @@ In case not, the value returned can be arbitrary.
             s:=ST_LOADSETTINGS;
             writetoken(t);
             recordtokenbuf.write(s,1);
-            recordtokenbuf.write(current_settings,sizeof(current_settings));
+            copy_size:=sizeof(current_settings)-sizeof(pointer);
+            writesizeint(copy_size);
+            recordtokenbuf.write(current_settings,copy_size);
             last_settings:=current_settings;
           end;
 
+        if current_settings.pmessage<>last_message then
+          begin
+            { use a special token to record it }
+            s:=ST_LOADMESSAGES;
+            writetoken(t);
+            recordtokenbuf.write(s,1);
+            msgnb:=0;
+            pmsg:=current_settings.pmessage;
+            while assigned(pmsg) do
+              begin
+                if msgnb=high(sizeint) then
+                  { Too many messages }
+                  internalerror(2011090401);
+                inc(msgnb);
+                pmsg:=pmsg^.next;
+              end;
+            writesizeint(msgnb);
+            pmsg:=current_settings.pmessage;
+            while assigned(pmsg) do
+              begin
+                { What about endianess here? }
+                val:=pmsg^.value;
+                writesizeint(val);
+                val:=ord(pmsg^.state);
+                writesizeint(val);
+                pmsg:=pmsg^.next;
+              end;
+            last_message:=current_settings.pmessage;
+          end;
+
         { file pos changes? }
         if current_tokenpos.line<>last_filepos.line then
           begin
@@ -2138,13 +2220,13 @@ In case not, the value returned can be arbitrary.
           _CWCHAR,
           _CWSTRING :
             begin
-              recordtokenbuf.write(patternw^.len,sizeof(sizeint));
+              writesizeint(patternw^.len);
               recordtokenbuf.write(patternw^.data^,patternw^.len*sizeof(tcompilerwidechar));
             end;
           _CSTRING:
             begin
               len:=length(cstringpattern);
-              recordtokenbuf.write(len,sizeof(sizeint));
+              writesizeint(len);
               recordtokenbuf.write(cstringpattern[1],length(cstringpattern));
             end;
           _CCHAR,
@@ -2169,18 +2251,20 @@ In case not, the value returned can be arbitrary.
       end;
 
 
-    procedure tscannerfile.startreplaytokens(buf:tdynamicarray);
+    procedure tscannerfile.startreplaytokens(buf:tdynamicarray; achange_endian : boolean);
       begin
         if not assigned(buf) then
           internalerror(200511175);
         { save current token }
         if token in [_CWCHAR,_CWSTRING,_CCHAR,_CSTRING,_INTCONST,_REALNUMBER,_ID] then
           internalerror(200511178);
-        replaystack:=treplaystack.create(token,current_settings,replaytokenbuf,replaystack);
+        replaystack:=treplaystack.create(token,current_settings,
+          replaytokenbuf,replaystack,tokenbuf_change_endian);
         if assigned(inputpointer) then
           dec(inputpointer);
         { install buffer }
         replaytokenbuf:=buf;
+        tokenbuf_change_endian:=achange_endian;
 
         { reload next token }
         replaytokenbuf.seek(0);
@@ -2205,8 +2289,10 @@ In case not, the value returned can be arbitrary.
 
     procedure tscannerfile.replaytoken;
       var
-        wlen : sizeint;
+        wlen,mesgnb,copy_size : sizeint;
         specialtoken : tspecialgenerictoken;
+        i : byte;
+        pmsg,prevmsg : pmessagestaterecord;
       begin
         if not assigned(replaytokenbuf) then
           internalerror(200511177);
@@ -2236,7 +2322,7 @@ In case not, the value returned can be arbitrary.
             _CWCHAR,
             _CWSTRING :
               begin
-                replaytokenbuf.read(wlen,sizeof(SizeInt));
+                wlen:=readsizeint;
                 setlengthwidestring(patternw,wlen);
                 replaytokenbuf.read(patternw^.data^,patternw^.len*sizeof(tcompilerwidechar));
                 orgpattern:='';
@@ -2245,7 +2331,7 @@ In case not, the value returned can be arbitrary.
               end;
             _CSTRING:
               begin
-                replaytokenbuf.read(wlen,sizeof(sizeint));
+                wlen:=readsizeint;
                 setlength(cstringpattern,wlen);
                 replaytokenbuf.read(cstringpattern[1],wlen);
                 orgpattern:='';
@@ -2282,10 +2368,37 @@ In case not, the value returned can be arbitrary.
                 else
                   case specialtoken of
                     ST_LOADSETTINGS:
-                      replaytokenbuf.read(current_settings,sizeof(current_settings));
+                      begin
+                        copy_size:=readsizeint;
+                        if copy_size <> sizeof(current_settings)-sizeof(pointer) then
+                          internalerror(2011090501);
+                        replaytokenbuf.read(current_settings,copy_size);
+                      end;
+                    ST_LOADMESSAGES:
+                      begin
+                        current_settings.pmessage:=nil;
+                        mesgnb:=readsizeint;
+                        if mesgnb>0 then
+                          Comment(V_Error,'Message recordind not yet supported');
+                        for i:=1 to mesgnb do
+                          begin
+                            new(pmsg);
+                            if i=1 then
+                              begin
+                                current_settings.pmessage:=pmsg;
+                                prevmsg:=nil;
+                              end
+                            else
+                              prevmsg^.next:=pmsg;
+                            replaytokenbuf.read(pmsg^.value,sizeof(longint));
+                            replaytokenbuf.read(pmsg^.state,sizeof(tmsgstate));
+                            pmsg^.next:=nil;
+                            prevmsg:=pmsg;
+                          end;
+                      end;
                     ST_LINE:
                       begin
-                        replaytokenbuf.read(current_tokenpos.line,sizeof(current_tokenpos.line));
+                        current_tokenpos.line:=readdword;
 
                         { don't generate invalid line info if no sources are available for the current module }
                         if not(get_module(current_filepos.moduleindex).sources_avail) then
@@ -2295,8 +2408,7 @@ In case not, the value returned can be arbitrary.
                       end;
                     ST_COLUMN:
                       begin
-                        replaytokenbuf.read(current_tokenpos.column,sizeof(current_tokenpos.column));
-
+                        current_tokenpos.column:=readword;
                         { don't generate invalid line info if no sources are available for the current module }
                         if not(get_module(current_filepos.moduleindex).sources_avail) then
                           current_tokenpos.column:=0;
@@ -2305,8 +2417,7 @@ In case not, the value returned can be arbitrary.
                       end;
                     ST_FILEINDEX:
                       begin
-                        replaytokenbuf.read(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
-
+                        current_tokenpos.fileindex:=readword;
                         { don't generate invalid line info if no sources are available for the current module }
                         if not(get_module(current_filepos.moduleindex).sources_avail) then
                           begin
@@ -2694,6 +2805,10 @@ In case not, the value returned can be arbitrary.
            hp:=replaystack.next;
            replaystack.free;
            replaystack:=hp;
+           if assigned (replaystack) then
+             tokenbuf_change_endian:=replaystack.change_endian
+           else
+             tokenbuf_change_endian:=false;
          end;
       end;
 
@@ -4444,5 +4559,4 @@ exit_label:
         DoneWideString(patternw);
       end;
 
-
 end.

+ 1 - 55
compiler/sparc/cpubase.pas

@@ -161,50 +161,9 @@ uses
     const
       max_operands = 3;
 
-      {# Constant defining possibly all registers which might require saving }
-      ALL_OTHERREGISTERS = [];
-
-      general_superregisters = [RS_O0..RS_I7];
-
-      {# Table of registers which can be allocated by the code generator
-         internally, when generating the code.
-      }
-      { legend:                                                                }
-      { xxxregs = set of all possibly used registers of that type in the code  }
-      {           generator                                                    }
-      { usableregsxxx = set of all 32bit components of registers that can be   }
-      {           possible allocated to a regvar or using getregisterxxx (this }
-      {           excludes registers which can be only used for parameter      }
-      {           passing on ABI's that define this)                           }
-      { c_countusableregsxxx = amount of registers in the usableregsxxx set    }
-
       maxintregs = 8;
-      { to determine how many registers to use for regvars }
-      maxintscratchregs = 3;
-      usableregsint = [RS_L0..RS_L7];
-      c_countusableregsint = 8;
-
       maxfpuregs = 8;
-      usableregsfpu=[RS_F0..RS_F31];
-      c_countusableregsfpu=32;
-
-      mmregs     = [];
-      usableregsmm  = [];
-      c_countusableregsmm  = 0;
-
-      { no distinction on this platform }
       maxaddrregs = 0;
-      addrregs    = [];
-      usableregsaddr = [];
-      c_countusableregsaddr = 0;
-
-{ TODO: firstsaveintreg shall be RS_NO}
-      firstsaveintreg = RS_L0; { Temporary, having RS_NO is broken }
-      lastsaveintreg = RS_L0; { L0..L7 are already saved, I0..O7 are parameter }
-      firstsavefpureg = RS_F2; { F0..F1 is used for return value }
-      lastsavefpureg = RS_F31;
-      firstsavemmreg = RS_INVALID;
-      lastsavemmreg = RS_INVALID;
 
       maxvarregs = 8;
       varregs : Array [1..maxvarregs] of Tsuperregister =
@@ -214,19 +173,6 @@ uses
       fpuvarregs : Array [1..maxfpuvarregs] of TsuperRegister =
                 (RS_F2);
 
-      {
-      max_param_regs_int = 6;
-      param_regs_int: Array[1..max_param_regs_int] of TCpuRegister =
-        (R_3,R_4,R_5,R_6,R_7,R_8,R_9,R_10);
-
-      max_param_regs_fpu = 13;
-      param_regs_fpu: Array[1..max_param_regs_fpu] of TCpuRegister =
-        (R_F1,R_F2,R_F3,R_F4,R_F5,R_F6,R_F7,R_F8,R_F9,R_F10,R_F11,R_F12,R_F13);
-
-      max_param_regs_mm = 13;
-      param_regs_mm: Array[1..max_param_regs_mm] of TCpuRegister =
-        (R_M1,R_M2,R_M3,R_M4,R_M5,R_M6,R_M7,R_M8,R_M9,R_M10,R_M11,R_M12,R_M13);
-      }
 
 
 {*****************************************************************************
@@ -306,7 +252,7 @@ uses
 
       { this is only for the generic code which is not used for this architecture }
       saved_mm_registers : array[0..0] of tsuperregister = (RS_NO);
-      
+
       {# 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.

+ 1 - 12
compiler/sparc/ncpucnv.pas

@@ -77,18 +77,7 @@ implementation
         if is_64bitint(left.resultdef) or
           is_currency(left.resultdef) then
           begin
-            { hack to avoid double division by 10000, as it's
-              already done by typecheckpass.resultdef_int_to_real }
-            if is_currency(left.resultdef) then
-              left.resultdef := s64inttype;
-            if is_signed(left.resultdef) then
-              fname := 'fpc_int64_to_double'
-            else
-              fname := 'fpc_qword_to_double';
-            result := ccallnode.createintern(fname,ccallparanode.create(
-              left,nil));
-            left:=nil;
-            firstpass(result);
+            result:=inherited first_int_to_real;
             exit;
           end
         else

+ 6 - 3
compiler/symconst.pas

@@ -445,7 +445,10 @@ type
     { first field of variant part of a record }
     vo_is_first_field,
     vo_volatile,
-    vo_has_section
+    vo_has_section,
+    { variable contains a winlike WideString which should be finalized
+      even in $J- state }
+    vo_force_finalize
   );
   tvaroptions=set of tvaroption;
 
@@ -496,7 +499,7 @@ type
     staticvarsym,localvarsym,paravarsym,fieldvarsym,
     typesym,procsym,unitsym,constsym,enumsym,
     errorsym,syssym,labelsym,absolutevarsym,propertysym,
-    macrosym
+    macrosym,namespacesym
   );
 
   { State of the variable:
@@ -602,7 +605,7 @@ const
        'abstractsym','globalvar','localvar','paravar','fieldvar',
        'type','proc','unit','const','enum',
        'errorsym','system sym','label','absolutevar','property',
-       'macrosym'
+       'macrosym','namespace'
      );
 
      typName : array[tdeftyp] of string[12] = (

+ 51 - 21
compiler/symdef.pas

@@ -61,6 +61,9 @@ interface
           genericdef      : tstoreddef;
           genericdefderef : tderef;
           generictokenbuf : tdynamicarray;
+          { Set if PPU was generated with another
+            endianess as current compiler or ppudump utils }
+          change_endian   : boolean;
           constructor create(dt:tdeftyp);
           constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile);
           destructor  destroy;override;
@@ -272,9 +275,10 @@ interface
           vmtentries     : TFPList;
           vmcallstaticinfo : pmvcallstaticinfo;
           vmt_offset     : longint;
-          objecttype     : tobjecttyp;
           iidguid        : pguid;
           iidstr         : pshortstring;
+          { store implemented interfaces defs and name mappings }
+          ImplementedInterfaces : TFPObjectList;
           writing_class_record_dbginfo,
           { a class of this type has been created in this module }
           created_in_current_module,
@@ -288,8 +292,7 @@ interface
             this module
           }
           classref_created_in_current_module : boolean;
-          { store implemented interfaces defs and name mappings }
-          ImplementedInterfaces : TFPObjectList;
+          objecttype     : tobjecttyp;
           constructor create(ot:tobjecttyp;const n:string;c:tobjectdef);
           constructor ppuload(ppufile:tcompilerppufile);
           destructor  destroy;override;
@@ -423,14 +426,14 @@ interface
           procoptions     : tprocoptions;
           callerargareasize,
           calleeargareasize: pint;
-          { number of user visibile parameters }
-          maxparacount,
-          minparacount    : byte;
 {$ifdef m68k}
           exp_funcretloc : tregister;   { explicit funcretloc for AmigaOS }
 {$endif}
           funcretloc : array[tcallercallee] of TCGPara;
           has_paraloc_info : tcallercallee; { paraloc info is available }
+          { number of user visible parameters }
+          maxparacount,
+          minparacount    : byte;
           constructor create(dt:tdeftyp;level:byte);
           constructor ppuload(dt:tdeftyp;ppufile:tcompilerppufile);
           destructor destroy;override;
@@ -536,6 +539,8 @@ interface
 {$ifdef oldregvars}
           regvarinfo: pregvarinfo;
 {$endif oldregvars}
+          { interrupt vector }
+          interruptvector : longint;
           { First/last assembler symbol/instruction in aasmoutput list.
             Note: initialised after compiling the code for the procdef, but
               not saved to/restored from ppu. Used when inserting debug info }
@@ -554,8 +559,6 @@ interface
           interfacedef : boolean;
           { true if the procedure has a forward declaration }
           hasforward  : boolean;
-          { interrupt vector }
-          interruptvector : longint;
           constructor create(level:byte);
           constructor ppuload(ppufile:tcompilerppufile);
           destructor  destroy;override;
@@ -613,10 +616,10 @@ interface
        tenumdef = class(tstoreddef)
           minval,
           maxval    : asizeint;
-          has_jumps : boolean;
           basedef   : tenumdef;
           basedefderef : tderef;
           symtable  : TSymtable;
+          has_jumps : boolean;
           constructor create;
           constructor create_subrange(_basedef:tenumdef;_min,_max:asizeint);
           constructor ppuload(ppufile:tcompilerppufile);
@@ -917,9 +920,20 @@ implementation
         { symtable must now be static or global }
         if not(st.symtabletype in [staticsymtable,globalsymtable]) then
           internalerror(200204175);
+
+        { The mangled name is made out of at most 4 parts:
+         1) Optional typeprefix given as first parameter
+            with '_$' appended if not empty
+         2) Unit name or 'P$'+program name (never empty)
+         3) optional prefix variable that contains a unique
+            name for the local symbol table (prepended with '$_$'
+            if not empty)
+         4) suffix as given as third parameter,
+            also optional (i.e. can be empty)
+            prepended by '_$$_' if not empty }
         result:='';
         if typeprefix<>'' then
-          result:=result+typeprefix+'_';
+          result:=result+typeprefix+'_$';
         { Add P$ for program, which can have the same name as
           a unit }
         if (TSymtable(main_module.localsymtable)=st) and
@@ -928,9 +942,9 @@ implementation
         else
           result:=result+st.name^;
         if prefix<>'' then
-          result:=result+'_'+prefix;
+          result:=result+'$_$'+prefix;
         if suffix<>'' then
-          result:=result+'_'+suffix;
+          result:=result+'_$$_'+suffix;
         { the Darwin assembler assumes that all symbols starting with 'L' are local }
         { Further, the Mac OS X 10.5 linker does not consider symbols which do not  }
         { start with '_' as regular symbols (it does not generate N_GSYM entries    }
@@ -1108,6 +1122,8 @@ implementation
 {$endif}
          generictokenbuf:=nil;
          genericdef:=nil;
+         change_endian:=false;
+
          { Don't register forwarddefs, they are disposed at the
            end of an type block }
          if (dt=forwarddef) then
@@ -1164,6 +1180,7 @@ implementation
          if df_generic in defoptions then
            begin
              sizeleft:=ppufile.getlongint;
+             change_endian:=ppufile.change_endian;
              initgeneric;
              while sizeleft>0 do
                begin
@@ -3001,7 +3018,8 @@ implementation
              trecordsymtable(symtable).recordalignment:=shortint(ppufile.getbyte);
              trecordsymtable(symtable).padalignment:=shortint(ppufile.getbyte);
              trecordsymtable(symtable).usefieldalignment:=shortint(ppufile.getbyte);
-             trecordsymtable(symtable).datasize:=ppufile.getaint;
+             trecordsymtable(symtable).datasize:=ppufile.getasizeint;
+             trecordsymtable(symtable).paddingsize:=ppufile.getword;
              trecordsymtable(symtable).ppuload(ppufile);
              { requires usefieldalignment to be set }
              symtable.defowner:=self;
@@ -3086,7 +3104,8 @@ implementation
              ppufile.putbyte(byte(trecordsymtable(symtable).recordalignment));
              ppufile.putbyte(byte(trecordsymtable(symtable).padalignment));
              ppufile.putbyte(byte(trecordsymtable(symtable).usefieldalignment));
-             ppufile.putaint(trecordsymtable(symtable).datasize);
+             ppufile.putasizeint(trecordsymtable(symtable).datasize);
+             ppufile.putword(trecordsymtable(symtable).paddingsize);
            end;
 
          ppufile.writeentry(ibrecorddef);
@@ -4384,9 +4403,10 @@ implementation
          if (import_lib^='') then
            stringdispose(import_lib);
          symtable:=tObjectSymtable.create(self,objrealname^,0);
-         tObjectSymtable(symtable).datasize:=ppufile.getaint;
-         tObjectSymtable(symtable).fieldalignment:=ppufile.getbyte;
-         tObjectSymtable(symtable).recordalignment:=ppufile.getbyte;
+         tObjectSymtable(symtable).datasize:=ppufile.getasizeint;
+         tObjectSymtable(symtable).paddingsize:=ppufile.getword;
+         tObjectSymtable(symtable).fieldalignment:=shortint(ppufile.getbyte);
+         tObjectSymtable(symtable).recordalignment:=shortint(ppufile.getbyte);
          vmt_offset:=ppufile.getlongint;
          ppufile.getderef(childofderef);
 
@@ -4554,9 +4574,10 @@ implementation
            ppufile.putstring(import_lib^)
          else
            ppufile.putstring('');
-         ppufile.putaint(tObjectSymtable(symtable).datasize);
-         ppufile.putbyte(tObjectSymtable(symtable).fieldalignment);
-         ppufile.putbyte(tObjectSymtable(symtable).recordalignment);
+         ppufile.putasizeint(tObjectSymtable(symtable).datasize);
+         ppufile.putword(tObjectSymtable(symtable).paddingsize);
+         ppufile.putbyte(byte(tObjectSymtable(symtable).fieldalignment));
+         ppufile.putbyte(byte(tObjectSymtable(symtable).recordalignment));
          ppufile.putlongint(vmt_offset);
          ppufile.putderef(childofderef);
          if objecttype in [odt_interfacecom,odt_interfacecorba,odt_dispinterface] then
@@ -4608,7 +4629,7 @@ implementation
         if not assigned(typesym) then
           result:='<Currently Parsed Class>'
         else
-          result:=typename;
+          result:=typesymbolprettyname;
       end;
 
 
@@ -4799,6 +4820,15 @@ implementation
             tObjectSymtable(symtable).datasize:=tObjectSymtable(symtable).datasize+tObjectSymtable(c.symtable).datasize;
             { inherit recordalignment }
             tObjectSymtable(symtable).recordalignment:=tObjectSymtable(c.symtable).recordalignment;
+            { if both the parent and this record use C-alignment, also inherit
+              the current field alignment }
+            if (tObjectSymtable(c.symtable).usefieldalignment=C_alignment) and
+               (tObjectSymtable(symtable).usefieldalignment=C_alignment) then
+              tObjectSymtable(symtable).fieldalignment:=tObjectSymtable(c.symtable).fieldalignment;
+            { the padding is not inherited for Objective-C classes (maybe not
+              for cppclass either?) }
+            if objecttype=odt_objcclass then
+              tObjectSymtable(symtable).datasize:=tObjectSymtable(symtable).datasize-tObjectSymtable(c.symtable).paddingsize;
             if (oo_has_vmt in objectoptions) and
                (oo_has_vmt in c.objectoptions) then
               tObjectSymtable(symtable).datasize:=tObjectSymtable(symtable).datasize-sizeof(pint);

+ 59 - 0
compiler/symsym.pas

@@ -78,6 +78,16 @@ interface
           procedure ppuwrite(ppufile:tcompilerppufile);override;
        end;
 
+       tnamespacesym = class(Tstoredsym)
+          unitsym:tsym;
+          unitsymderef:tderef;
+          constructor create(const n : string);
+          constructor ppuload(ppufile:tcompilerppufile);
+          procedure ppuwrite(ppufile:tcompilerppufile);override;
+          procedure buildderef;override;
+          procedure deref;override;
+       end;
+
        terrorsym = class(Tsym)
           constructor create;
        end;
@@ -113,12 +123,14 @@ interface
        public
           typedef      : tdef;
           typedefderef : tderef;
+          fprettyname : ansistring;
           constructor create(const n : string;def:tdef);
           destructor destroy; override;
           constructor ppuload(ppufile:tcompilerppufile);
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderef;override;
           procedure deref;override;
+          function prettyname : string;override;
        end;
 
        tabstractvarsym = class(tstoredsym)
@@ -477,6 +489,42 @@ implementation
          ppufile.writeentry(ibunitsym);
       end;
 
+{****************************************************************************
+                                TNAMESPACESYM
+****************************************************************************}
+
+    constructor tnamespacesym.create(const n : string);
+      begin
+         inherited create(namespacesym,n);
+         unitsym:=nil;
+      end;
+
+    constructor tnamespacesym.ppuload(ppufile:tcompilerppufile);
+      begin
+         inherited ppuload(namespacesym,ppufile);
+         ppufile.getderef(unitsymderef);
+      end;
+
+    procedure tnamespacesym.ppuwrite(ppufile:tcompilerppufile);
+      begin
+         inherited ppuwrite(ppufile);
+         ppufile.putderef(unitsymderef);
+         ppufile.writeentry(ibnamespacesym);
+      end;
+
+    procedure tnamespacesym.buildderef;
+      begin
+        inherited buildderef;
+        unitsymderef.build(unitsym);
+      end;
+
+    procedure tnamespacesym.deref;
+      begin
+        inherited deref;
+        unitsym:=tsym(unitsymderef.resolve);
+      end;
+
+
 {****************************************************************************
                                   TPROCSYM
 ****************************************************************************}
@@ -1857,6 +1905,7 @@ implementation
       begin
          inherited ppuload(typesym,ppufile);
          ppufile.getderef(typedefderef);
+         fprettyname:=ppufile.getansistring;
       end;
 
 
@@ -1876,10 +1925,20 @@ implementation
       begin
          inherited ppuwrite(ppufile);
          ppufile.putderef(typedefderef);
+         ppufile.putansistring(fprettyname);
          ppufile.writeentry(ibtypesym);
       end;
 
 
+    function ttypesym.prettyname : string;
+      begin
+        if fprettyname<>'' then
+          result:=fprettyname
+        else
+          result:=inherited prettyname;
+      end;
+
+
 {****************************************************************************
                                   TSYSSYM
 ****************************************************************************}

+ 122 - 68
compiler/symtable.pas

@@ -92,14 +92,18 @@ interface
           function has_single_field(out sym:tfieldvarsym): boolean;
           function get_unit_symtable: tsymtable;
         protected
-          _datasize       : asizeint;
+          { size in bytes including padding }
+          _datasize      : asizeint;
           { size in bits of the data in case of bitpacked record. Only important during construction, }
           { no need to save in/restore from ppu file. datasize is always (databitsize+7) div 8.       }
           databitsize    : asizeint;
+          { size in bytes of padding }
+          _paddingsize   : word;
           procedure setdatasize(val: asizeint);
         public
           function iscurrentunit: boolean; override;
           property datasize : asizeint read _datasize write setdatasize;
+          property paddingsize: word read _paddingsize write _paddingsize;
        end;
 
        trecordsymtable = class(tabstractrecordsymtable)
@@ -141,7 +145,9 @@ interface
        tabstractuniTSymtable = class(tstoredsymtable)
        public
           constructor create(const n : string;id:word);
+          function checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;override;
           function iscurrentunit:boolean;override;
+          procedure insertunit(sym:TSymEntry);
        end;
 
        tglobalsymtable = class(tabstractuniTSymtable)
@@ -150,7 +156,6 @@ interface
           constructor create(const n : string;id:word);
           procedure ppuload(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
-          function  checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;override;
        end;
 
        tstaticsymtable = class(tabstractuniTSymtable)
@@ -218,7 +223,7 @@ interface
 
 {*** Search ***}
     procedure addsymref(sym:tsym);
-    function  is_owned_by(childdef:tdef;ownerdef:tabstractrecorddef):boolean;
+    function  is_owned_by(childdef,ownerdef:tdef):boolean;
     function  sym_is_owned_by(childsym:tsym;symtable:tsymtable):boolean;
     function  is_visible_for_object(symst:tsymtable;symvisibility:tvisibility;contextobjdef:tabstractrecorddef):boolean;
     function  is_visible_for_object(pd:tprocdef;contextobjdef:tabstractrecorddef):boolean;
@@ -461,6 +466,7 @@ implementation
                iblabelsym : sym:=tlabelsym.ppuload(ppufile);
                  ibsyssym : sym:=tsyssym.ppuload(ppufile);
                ibmacrosym : sym:=tmacro.ppuload(ppufile);
+           ibnamespacesym : sym:=tnamespacesym.ppuload(ppufile);
                 ibendsyms : break;
                     ibend : Message(unit_f_ppu_read_error);
            else
@@ -643,14 +649,19 @@ implementation
             ((tsym(sym).owner.symtabletype in
              [parasymtable,localsymtable,ObjectSymtable,recordsymtable,staticsymtable])) then
            begin
-            { unused symbol should be reported only if no }
-            { error is reported                     }
-            { if the symbol is in a register it is used   }
-            { also don't count the value parameters which have local copies }
-            { also don't claim for high param of open parameters (PM) }
+            { unused symbol should be reported only if no                    }
+            { error is reported                                              }
+            { if the symbol is in a register it is used                      }
+            { also don't count the value parameters which have local copies  }
+            { also don't claim for high param of open parameters    (PM)     }
+            { also don't complain about unused symbols in generic procedures }
+            { and methods                                                    }
             if (Errorcount<>0) or
                ([vo_is_hidden_para,vo_is_funcret] * tabstractvarsym(sym).varoptions = [vo_is_hidden_para]) or
-               (sp_internal in tsym(sym).symoptions) then
+               (sp_internal in tsym(sym).symoptions) or
+               ((assigned(tsym(sym).owner.defowner) and
+                (tsym(sym).owner.defowner.typ=procdef) and
+                (df_generic in tprocdef(tsym(sym).owner.defowner).defoptions))) then
               exit;
             if (tstoredsym(sym).refs=0) then
               begin
@@ -665,7 +676,7 @@ implementation
                  else if (tsym(sym).owner.symtabletype=parasymtable) then
                    MessagePos1(tsym(sym).fileinfo,sym_h_para_identifier_not_used,tsym(sym).prettyname)
                  else if (tsym(sym).owner.symtabletype in [ObjectSymtable,recordsymtable]) then
-                   MessagePos2(tsym(sym).fileinfo,sym_n_private_identifier_not_used,tabstractrecorddef(tsym(sym).owner.defowner).RttiName,tsym(sym).prettyname)
+                   MessagePos2(tsym(sym).fileinfo,sym_n_private_identifier_not_used,tabstractrecorddef(tsym(sym).owner.defowner).GetTypeName,tsym(sym).prettyname)
                  else
                    MessagePos1(tsym(sym).fileinfo,sym_n_local_identifier_not_used,tsym(sym).prettyname);
               end
@@ -678,7 +689,7 @@ implementation
                        MessagePos1(tsym(sym).fileinfo,sym_h_para_identifier_only_set,tsym(sym).prettyname)
                    end
                  else if (tsym(sym).owner.symtabletype in [ObjectSymtable,recordsymtable]) then
-                   MessagePos2(tsym(sym).fileinfo,sym_n_private_identifier_only_set,tabstractrecorddef(tsym(sym).owner.defowner).RttiName,tsym(sym).prettyname)
+                   MessagePos2(tsym(sym).fileinfo,sym_n_private_identifier_only_set,tabstractrecorddef(tsym(sym).owner.defowner).GetTypeName,tsym(sym).prettyname)
                  else if tabstractvarsym(sym).varoptions*[vo_is_funcret,vo_is_public,vo_is_external]=[] then
                    MessagePos1(tsym(sym).fileinfo,sym_n_local_identifier_only_set,tsym(sym).prettyname);
               end
@@ -696,19 +707,19 @@ implementation
            if (tsym(sym).refs=0) and (tsym(sym).owner.symtabletype in [ObjectSymtable,recordsymtable]) then
              case tsym(sym).typ of
                typesym:
-                 MessagePos2(tsym(sym).fileinfo,sym_n_private_type_not_used,tabstractrecorddef(tsym(sym).owner.defowner).RttiName,tsym(sym).prettyname);
+                 MessagePos2(tsym(sym).fileinfo,sym_n_private_type_not_used,tabstractrecorddef(tsym(sym).owner.defowner).GetTypeName,tsym(sym).prettyname);
                constsym:
-                 MessagePos2(tsym(sym).fileinfo,sym_n_private_const_not_used,tabstractrecorddef(tsym(sym).owner.defowner).RttiName,tsym(sym).prettyname);
+                 MessagePos2(tsym(sym).fileinfo,sym_n_private_const_not_used,tabstractrecorddef(tsym(sym).owner.defowner).GetTypeName,tsym(sym).prettyname);
                propertysym:
-                 MessagePos2(tsym(sym).fileinfo,sym_n_private_property_not_used,tabstractrecorddef(tsym(sym).owner.defowner).RttiName,tsym(sym).prettyname);
+                 MessagePos2(tsym(sym).fileinfo,sym_n_private_property_not_used,tabstractrecorddef(tsym(sym).owner.defowner).GetTypeName,tsym(sym).prettyname);
              else
-               MessagePos2(tsym(sym).fileinfo,sym_n_private_method_not_used,tabstractrecorddef(tsym(sym).owner.defowner).RttiName,tsym(sym).prettyname);
+               MessagePos2(tsym(sym).fileinfo,sym_n_private_method_not_used,tabstractrecorddef(tsym(sym).owner.defowner).GetTypeName,tsym(sym).prettyname);
              end
            { units references are problematic }
            else
             begin
               if (tsym(sym).refs=0) and
-                 not(tsym(sym).typ in [enumsym,unitsym]) and
+                 not(tsym(sym).typ in [enumsym,unitsym,namespacesym]) and
                  not(is_funcret_sym(tsym(sym))) and
                  { don't complain about compiler generated syms for specializations, see also #13405 }
                  not((tsym(sym).typ=typesym) and (df_specialization in ttypesym(sym).typedef.defoptions) and
@@ -843,6 +854,12 @@ implementation
 
     procedure tabstractrecordsymtable.ppuload(ppufile:tcompilerppufile);
       begin
+        if ppufile.readentry<>ibrecsymtableoptions then
+          Message(unit_f_ppu_read_error);
+        recordalignment:=shortint(ppufile.getbyte);
+        usefieldalignment:=shortint(ppufile.getbyte);
+        if (usefieldalignment=C_alignment) then
+          fieldalignment:=shortint(ppufile.getbyte);
         inherited ppuload(ppufile);
       end;
 
@@ -853,6 +870,13 @@ implementation
       begin
          oldtyp:=ppufile.entrytyp;
          ppufile.entrytyp:=subentryid;
+         { in case of classes using C alignment, the alignment of the parent
+           affects the alignment of fields of the childs }
+         ppufile.putbyte(byte(recordalignment));
+         ppufile.putbyte(byte(usefieldalignment));
+         if (usefieldalignment=C_alignment) then
+           ppufile.putbyte(byte(fieldalignment));
+         ppufile.writeentry(ibrecsymtableoptions);
 
          inherited ppuwrite(ppufile);
 
@@ -1018,6 +1042,8 @@ implementation
 
 
     procedure tabstractrecordsymtable.addalignmentpadding;
+      var
+        padded_datasize: asizeint;
       begin
         { make the record size aligned correctly so it can be
           used as elements in an array. For C records we
@@ -1040,7 +1066,9 @@ implementation
             else
               padalignment:=min(recordalignment,usefieldalignment);
           end;
-        _datasize:=align(_datasize,padalignment);
+        padded_datasize:=align(_datasize,padalignment);
+        _paddingsize:=padded_datasize-_datasize;
+        _datasize:=padded_datasize;
       end;
 
 
@@ -1131,7 +1159,7 @@ implementation
         i : integer;
         varalignrecord,varalign,
         storesize,storealign : aint;
-        bitsize: aint;
+        bitsize: tcgint;
       begin
         storesize:=_datasize;
         storealign:=fieldalignment;
@@ -1444,6 +1472,48 @@ implementation
       end;
 
 
+    function tabstractuniTSymtable.checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;
+      var
+        hsym : tsym;
+      begin
+        result:=false;
+        hsym:=tsym(FindWithHash(hashedid));
+        if assigned(hsym) then
+          begin
+            if (sym is tstoredsym) and handle_generic_dummysym(hsym,tstoredsym(sym).symoptions) then
+              exit;
+            if hsym.typ=symconst.namespacesym then
+              begin
+                case sym.typ of
+                  symconst.namespacesym:;
+                  symconst.unitsym:
+                    begin
+                      HideSym(sym); { if we add a unit and there is a namespace with the same name then hide the unit name and not the namespace }
+                      tnamespacesym(hsym).unitsym:=tsym(sym);
+                    end
+                else
+                  HideSym(hsym);
+                end;
+              end
+            else
+            { In delphi (contrary to TP) you can have a symbol with the same name as the
+              unit, the unit can then not be accessed anymore using
+              <unit>.<id>, so we can hide the symbol.
+              Do the same if we add a namespace and there is a unit with the same name }
+            if (hsym.typ=symconst.unitsym) and
+               ((m_delphi in current_settings.modeswitches) or (sym.typ=symconst.namespacesym)) then
+              begin
+                HideSym(hsym);
+                if sym.typ=symconst.namespacesym then
+                  tnamespacesym(sym).unitsym:=tsym(hsym);
+              end
+            else
+              DuplicateSym(hashedid,sym,hsym);
+            result:=true;
+            exit;
+          end;
+      end;
+
     function tabstractuniTSymtable.iscurrentunit:boolean;
       begin
         result:=assigned(current_module) and
@@ -1453,6 +1523,29 @@ implementation
                 );
       end;
 
+    procedure tabstractuniTSymtable.insertunit(sym:TSymEntry);
+      var
+        p:integer;
+        n,ns:string;
+        oldsym:TSymEntry;
+      begin
+        insert(sym);
+        n:=sym.realname;
+        p:=pos('.',n);
+        ns:='';
+        while p>0 do
+          begin
+            if ns='' then
+              ns:=copy(n,1,p-1)
+            else
+              ns:=ns+'.'+copy(n,1,p-1);
+            system.delete(n,1,p);
+            oldsym:=Find(upper(ns));
+            if not Assigned(oldsym) or (oldsym.typ<>namespacesym) then
+              insert(tnamespacesym.create(ns));
+            p:=pos('.',n);
+          end;
+      end;
 
 {****************************************************************************
                               TStaticSymtable
@@ -1482,28 +1575,11 @@ implementation
 
 
     function tstaticsymtable.checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;
-      var
-        hsym : tsym;
       begin
-        result:=false;
-        hsym:=tsym(FindWithHash(hashedid));
-        if assigned(hsym) then
-          begin
-            if (sym is tstoredsym) and handle_generic_dummysym(hsym,tstoredsym(sym).symoptions) then
-              exit;
-            { Delphi (contrary to TP) you can have a symbol with the same name as the
-              unit, the unit can then not be accessed anymore using
-              <unit>.<id>, so we can hide the symbol }
-            if (m_delphi in current_settings.modeswitches) and
-               (hsym.typ=symconst.unitsym) then
-              HideSym(hsym)
-            else
-              DuplicateSym(hashedid,sym,hsym);
-            result:=true;
-            exit;
-          end;
+        result:=inherited checkduplicate(hashedid,sym);
 
-        if (current_module.localsymtable=self) and
+        if not result and
+           (current_module.localsymtable=self) and
            assigned(current_module.globalsymtable) then
           result:=tglobalsymtable(current_module.globalsymtable).checkduplicate(hashedid,sym);
       end;
@@ -1537,28 +1613,6 @@ implementation
       end;
 
 
-    function tglobalsymtable.checkduplicate(var hashedid:THashedIDString;sym:TSymEntry):boolean;
-      var
-        hsym : tsym;
-      begin
-        result:=false;
-        hsym:=tsym(FindWithHash(hashedid));
-        if assigned(hsym) then
-          begin
-            { Delphi (contrary to TP) you can have a symbol with the same name as the
-              unit, the unit can then not be accessed anymore using
-              <unit>.<id>, so we can hide the symbol }
-            if (m_delphi in current_settings.modeswitches) and
-               (hsym.typ=symconst.unitsym) then
-              HideSym(hsym)
-            else
-              DuplicateSym(hashedid,sym,hsym);
-            result:=true;
-            exit;
-          end;
-      end;
-
-
 {*****************************************************************************
                              tspecializesymtable
 *****************************************************************************}
@@ -1820,11 +1874,11 @@ implementation
        end;
 
 
-    function is_owned_by(childdef:tdef;ownerdef:tabstractrecorddef):boolean;
+    function is_owned_by(childdef,ownerdef:tdef):boolean;
       begin
         result:=childdef=ownerdef;
-        if not result and (childdef.owner.symtabletype in [ObjectSymtable,recordsymtable]) then
-          result:=is_owned_by(tabstractrecorddef(childdef.owner.defowner),ownerdef);
+        if not result and assigned(childdef.owner.defowner) then
+          result:=is_owned_by(tdef(childdef.owner.defowner),ownerdef);
       end;
 
     function sym_is_owned_by(childsym:tsym;symtable:tsymtable):boolean;
@@ -1854,8 +1908,8 @@ implementation
                        (symownerdef.owner.symtabletype in [globalsymtable,staticsymtable]) and
                        (symownerdef.owner.iscurrentunit)
                       ) or
-                      ( // the case of specialize inside the generic declaration
-                       (symownerdef.owner.symtabletype = objectsymtable) and
+                      ( // the case of specialize inside the generic declaration and nested types
+                       (symownerdef.owner.symtabletype in [objectsymtable,recordsymtable]) and
                        (
                          assigned(current_structdef) and
                          (
@@ -1903,8 +1957,8 @@ implementation
                         (contextobjdef.owner.iscurrentunit) and
                         contextobjdef.is_related(symownerdef)
                        ) or
-                       ( // the case of specialize inside the generic declaration
-                        (symownerdef.owner.symtabletype = objectsymtable) and
+                       ( // the case of specialize inside the generic declaration and nested types
+                        (symownerdef.owner.symtabletype in [objectsymtable,recordsymtable]) and
                         (
                           assigned(current_structdef) and
                           (
@@ -2003,7 +2057,7 @@ implementation
                     if (srsymtable.symtabletype=withsymtable) and
                        assigned(srsymtable.defowner) and
                        (srsymtable.defowner.typ in [recorddef,objectdef]) and
-                       (srsymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable]) and
+                       (srsymtable.defowner.owner.symtabletype in [globalsymtable,staticsymtable,objectsymtable,recordsymtable]) and
                        (srsymtable.defowner.owner.iscurrentunit) then
                       contextstructdef:=tabstractrecorddef(srsymtable.defowner)
                     else

+ 5 - 2
compiler/symtype.pas

@@ -99,13 +99,15 @@ interface
       protected
       public
          fileinfo   : tfileposinfo;
+         { size of fileinfo is 10 bytes, so if a >word aligned type would follow,
+           two bytes of memory would be wasted, so we put two one byte fields over here }
+         visibility : tvisibility;
+         isdbgwritten : boolean;
          symoptions : tsymoptions;
          refs       : longint;
          reflist    : TLinkedList;
-         visibility : tvisibility;
          { deprecated optionally can have a message }
          deprecatedmsg: pshortstring;
-         isdbgwritten : boolean;
          constructor create(st:tsymtyp;const aname:string);
          destructor  destroy;override;
          function  mangledname:string; virtual;
@@ -284,6 +286,7 @@ implementation
           result:=result+'<no type symbol>'
       end;
 
+
     function tdef.mangledparaname:string;
       begin
         if assigned(typesym) then

+ 1 - 1
compiler/systems.pas

@@ -237,7 +237,7 @@ interface
                            system_sparc_embedded,system_vm_embedded,
                            system_iA64_embedded,system_x86_64_embedded,
                            system_mips_embedded,system_arm_embedded,
-                           system_powerpc64_embedded];
+                           system_powerpc64_embedded,system_avr_embedded];
 
        { all systems that allow section directive }
        systems_allow_section = systems_embedded;

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff