소스 검색

-- Zusammenführen von r48108 bis r48520 in ».«:
A tests/webtbs/uw38385b.pp
A tests/webtbs/tw38351.pp
A tests/webtbs/tw38316.pp
U tests/Makefile
A tests/webtbf/tw37217.pp
A tests/webtbs/tw32139.pp
A tests/webtbs/tw38429.pp
A tests/webtbs/tw38413.pp
A tests/webtbs/uw38385a.pp
A tests/webtbs/tw38390.pp
A tests/webtbs/tw38306.pp
A tests/webtbs/tw38337.pp
C tests/bench/bcase.pp
U rtl/unix/sysutils.pp
U rtl/unix/oscdeclh.inc
U rtl/linux/x86_64/syscall.inc
U rtl/linux/x86_64/si_prc.inc
U rtl/linux/linux.pp
U rtl/linux/m68k/cprt0.as
U rtl/linux/m68k/dllprt0.as
U rtl/linux/mips/cprt0.as
U rtl/linux/mips/prt0.as
U rtl/linux/i386/si_prc.inc
U rtl/linux/si_impl.inc
U rtl/linux/system.pp
U rtl/i386/cpu.pp
U rtl/objpas/sysconst.pp
U rtl/objpas/sysutils/syshelpo.inc
U rtl/amiga/powerpc/execf.inc
U tests/test/units/sysutils/tfile1.pp
A tests/test/units/sysutils/tfileage.pp
A tests/test/units/linux/tfutimesen.pp
U tests/test/units/linux/tstatx.pp
A tests/test/units/linux/tutimensat.pp
A tests/test/cg/tpara4.pp
U tests/test/theapthread.pp
A tests/webtbf/tw24434.pp
A tests/webtbf/tw38287.pp
A tests/webtbs/tw34027.pp
A tests/webtbs/uw38429.pp
A tests/webtbs/tw38412.pp
A tests/webtbs/tw38385.pp
A tests/webtbs/uw38385c.pp
U tests/webtbs/tw37060.pp
A tests/webtbs/tw38339.pp
U tests/Makefile.fpc
U tests/utils/testsuite/utests.pp
U compiler/utils/mkx86inl.pp
U compiler/utils/ppuutils/ppudump.pp
U compiler/nmem.pas
U compiler/msg/errorda.msg
U compiler/msg/errorf.msg
U compiler/msg/errorid.msg
U compiler/msg/errorpli.msg
U compiler/msg/errorru.msg
U compiler/m68k/aoptcpu.pas
U compiler/systems/t_darwin.pas
U compiler/utils/msg2inc.pp
U compiler/utils/Makefile.fpc
U compiler/cfidwarf.pas
U compiler/msg/errord.msg
U compiler/msg/errores.msg
U compiler/msg/errorheu.msg
U compiler/msg/errorpl.msg
U compiler/msg/errorr.msg
U compiler/m68k/cgcpu.pas
U compiler/rgobj.pas
U compiler/Makefile.fpc
U compiler/utils/Makefile
U compiler/ngtcon.pas
U compiler/msg/errorct.msg
U compiler/msg/errore.msg
U compiler/msg/errorhe.msg
U compiler/msg/errorn.msg
U compiler/msg/errorptu.msg
C compiler/msgtxt.inc
C compiler/msgidx.inc
U compiler/systems/t_freertos.pas
U compiler/Makefile
U compiler/utils/mkz80ins.pp
U compiler/aasmcnst.pas
U compiler/ncon.pas
U compiler/msg/errordu.msg
U compiler/msg/errorfi.msg
U compiler/msg/erroriu.msg
U compiler/msg/errorpt.msg
U compiler/msg/errorues.msg
U compiler/ncgvmt.pas
U compiler/systems/t_embed.pas
U compiler/systems/t_bsd.pas
U compiler/dbgcodeview.pas
U compiler/x86/agx86nsm.pas
U compiler/systems/t_win16.pas
U compiler/verbose.pas
U compiler/x86/aasmcpu.pas
U compiler/x86/nx86mat.pas
U compiler/systems/t_amiga.pas
U compiler/x86/cgx86.pas
U compiler/x86/nx86inl.pas
U compiler/systems/t_win.pas
U compiler/x86/cx86mminnr.inc
U compiler/x86/aoptx86.pas
U compiler/x86/nx86set.pas
U compiler/systems.pas
U compiler/avr/navradd.pas
U compiler/avr/raavrgas.pas
U compiler/aarch64/aasmcpu.pas
U compiler/jvm/hlcgcpu.pas
U compiler/jvm/njvmmat.pas
U compiler/psabiehpi.pas
U compiler/options.pas
U compiler/avr/cpupara.pas
U compiler/avr/navrmat.pas
U compiler/aarch64/aoptcpu.pas
U compiler/jvm/njvmmem.pas
U compiler/jvm/njvminl.pas
U compiler/pgenutil.pas
U compiler/globtype.pas
U compiler/avr/cgcpu.pas
U compiler/avr/aoptcpu.pas
U compiler/aarch64/agcpugas.pas
U compiler/jvm/dbgjasm.pas
U compiler/jvm/cpubase.pas
U compiler/ogomf.pas
U compiler/i8086/symcpu.pas
U compiler/x86/rax86.pas
U compiler/arm/aoptcpu.pas
U compiler/avr/agavrgas.pas
U compiler/avr/rgcpu.pas
U compiler/aarch64/cgcpu.pas
U compiler/jvm/agjasmin.pas
U compiler/nflw.pas
U compiler/i8086/n8086mem.pas
U packages/graph/src/inc/graph.tex
A packages/fcl-net/tests
U compiler/i8086/n8086tcon.pas
U compiler/ncginl.pas
U compiler/symdef.pas
U compiler/i8086/cpupara.pas
U compiler/nbas.pas
U compiler/scandir.pas
U compiler/hlcgobj.pas
U compiler/nadd.pas
U compiler/psub.pas
U compiler/armgen/aoptarm.pas
U compiler/aggas.pas
U compiler/optloop.pas
U compiler/scanner.pas
U compiler/x86_64/nx64mat.pas
U compiler/ogbase.pas
U compiler/i386/aoptcpu.pas
U packages/fcl-passrc/src/pasresolver.pp
U packages/pastojs/src/fppas2js.pp
U packages/rtl-objpas/src/inc/dateutil.inc
A packages/fcl-net/tests/netdbtest.pp
U compiler/x86_64/aoptcpu.pas
U compiler/ncal.pas
U compiler/fpcdefs.inc
U packages/pastojs/tests/tcmodules.pas
U packages/rtl-objpas/src/inc/variants.pp
U packages/fcl-net/src/netdb.pp
A packages/pasjpeg/examples/demo.lpi
U compiler/x86_64/cpupara.pas
U compiler/dbgstabs.pas
U compiler/aoptobj.pas
U packages/fcl-passrc/tests/tcresolver.pas
U packages/pastojs/src/pas2jspcucompiler.pp
U packages/fcl-base/src/bufstream.pp
U packages/fcl-stl/src/gdeque.pp
U compiler/x86_64/cpuelf.pas
U compiler/ncnv.pas
U compiler/pdecsub.pas
U packages/fcl-passrc/src/pparser.pp
U packages/pastojs/src/pas2jsfiler.pp
U packages/fcl-base/src/eventlog.pp
A packages/fcl-net/tests/tresolvertests.pp
U packages/pasjpeg/examples/example.pas
U packages/fcl-registry/tests/Makefile
U packages/fcl-registry/src/regini.inc
U packages/fcl-db/src/sqldb/interbase/ibconnection.pp
A packages/fcl-registry/tests/tregtestframework.pp
U packages/fcl-registry/fpmake.pp
U packages/fcl-registry/src/winreg.inc
U packages/fcl-registry/tests/tregistry2.pp
A packages/fcl-registry/tests/regtestbasics.pp
U packages/fcl-registry/src/xmlreg.pp
A packages/fcl-registry/tests/regtcxmlreg.pp
U packages/fcl-registry/tests/Makefile.fpc
D packages/fcl-registry/tests/regtestframework.pp
D packages/fcl-registry/tests/testbasics.pp
D packages/fcl-registry/tests/tcxmlreg.pp
U packages/fcl-registry/src/registry.pp
U packages/rtl-extra/fpmake.pp
U utils/fpdoc/fpdoc.pp
U utils/fpdoc/dw_html.pp
U utils/fpdoc/mkfpdoc.pp
U utils/fpdoc/dw_latex.pp
U utils/fpdoc/dw_xml.pp
U utils/fpdoc/fpmake.pp
U packages/fpmkunit/src/fpmkunit.pp
U utils/fpdoc/dw_chm.pp
U utils/fpdoc/dw_basehtml.pp
A utils/fpdoc/fpdocstrs.pp
U utils/fpdoc/dw_dxml.pp
U utils/fpdoc/dw_txt.pp
U utils/fpdoc/fpdocxmlopts.pas
U packages/fcl-db/src/sqldb/sqldb.pp
U packages/fv/src/views.pas
U utils/fpdoc/dwriter.pp
U utils/fpdoc/fpdoc.lpi
U utils/fpdoc/dw_basemd.pp
U utils/fpdoc/dw_man.pp
U utils/fpdoc/fpdocproj.pas
U packages/fcl-db/src/sqldb/mysql/mysqlconn.inc
U packages/rtl-extra/src/bsd/osdefs.inc
U utils/fpdoc/dw_markdown.pp
U utils/fpdoc/fpdocclasstree.pp
U utils/fpdoc/dglobals.pp
U utils/fpdoc/dw_linrtf.pp
U utils/fpdoc/dwlinear.pp
U utils/pas2js/dist/rtl.js
U utils/fpdoc/fpclasschart.pp
U utils/fpdoc/dw_ipflin.pas
U utils/fpdoc/makeskel.pp
-- Aufzeichnung der Informationen für Zusammenführung von r47033 bis r48520 in ».«:
U .
-- Aufzeichnung der Informationen für Zusammenführung von r47033 bis r48520 in »rtl«:
U rtl
Konfliktübersicht:
Textkonflikte: 3
Konfliktübersicht:
Textkonflikte: 3

git-svn-id: branches/tg74/avx512-0037785@48521 -

florian 4 년 전
부모
커밋
ac6c4db054
100개의 변경된 파일1300개의 추가작업 그리고 844개의 파일을 삭제
  1. 31 4
      .gitattributes
  2. 21 1
      compiler/Makefile
  3. 22 1
      compiler/Makefile.fpc
  4. 11 9
      compiler/aarch64/aasmcpu.pas
  5. 0 3
      compiler/aarch64/agcpugas.pas
  6. 0 7
      compiler/aarch64/aoptcpu.pas
  7. 3 0
      compiler/aarch64/cgcpu.pas
  8. 16 0
      compiler/aasmcnst.pas
  9. 0 1
      compiler/aggas.pas
  10. 4 6
      compiler/aoptobj.pas
  11. 3 4
      compiler/arm/aoptcpu.pas
  12. 12 7
      compiler/armgen/aoptarm.pas
  13. 0 2
      compiler/avr/agavrgas.pas
  14. 0 1
      compiler/avr/aoptcpu.pas
  15. 7 15
      compiler/avr/cgcpu.pas
  16. 0 4
      compiler/avr/cpupara.pas
  17. 2 1
      compiler/avr/navradd.pas
  18. 1 1
      compiler/avr/navrmat.pas
  19. 3 7
      compiler/avr/raavrgas.pas
  20. 3 7
      compiler/avr/rgcpu.pas
  21. 2 1
      compiler/cfidwarf.pas
  22. 1 1
      compiler/dbgcodeview.pas
  23. 1 1
      compiler/dbgstabs.pas
  24. 25 0
      compiler/fpcdefs.inc
  25. 3 1
      compiler/globtype.pas
  26. 13 6
      compiler/hlcgobj.pas
  27. 2 0
      compiler/i386/aoptcpu.pas
  28. 0 3
      compiler/i8086/cpupara.pas
  29. 1 1
      compiler/i8086/n8086mem.pas
  30. 0 1
      compiler/i8086/n8086tcon.pas
  31. 1 0
      compiler/i8086/symcpu.pas
  32. 0 3
      compiler/jvm/agjasmin.pas
  33. 2 2
      compiler/jvm/cpubase.pas
  34. 0 2
      compiler/jvm/dbgjasm.pas
  35. 2 2
      compiler/jvm/hlcgcpu.pas
  36. 1 2
      compiler/jvm/njvminl.pas
  37. 0 1
      compiler/jvm/njvmmat.pas
  38. 0 3
      compiler/jvm/njvmmem.pas
  39. 24 20
      compiler/m68k/aoptcpu.pas
  40. 35 3
      compiler/m68k/cgcpu.pas
  41. 2 2
      compiler/msg/errorct.msg
  42. 3 3
      compiler/msg/errord.msg
  43. 2 2
      compiler/msg/errorda.msg
  44. 3 3
      compiler/msg/errordu.msg
  45. 6 3
      compiler/msg/errore.msg
  46. 2 2
      compiler/msg/errores.msg
  47. 1 1
      compiler/msg/errorf.msg
  48. 2 2
      compiler/msg/errorfi.msg
  49. 1 1
      compiler/msg/errorhe.msg
  50. 2 2
      compiler/msg/errorheu.msg
  51. 2 2
      compiler/msg/errorid.msg
  52. 1 1
      compiler/msg/erroriu.msg
  53. 2 2
      compiler/msg/errorn.msg
  54. 1 1
      compiler/msg/errorpl.msg
  55. 1 1
      compiler/msg/errorpli.msg
  56. 1 1
      compiler/msg/errorpt.msg
  57. 2 2
      compiler/msg/errorptu.msg
  58. 1 1
      compiler/msg/errorr.msg
  59. 2 2
      compiler/msg/errorru.msg
  60. 2 2
      compiler/msg/errorues.msg
  61. 3 2
      compiler/msgidx.inc
  62. 410 407
      compiler/msgtxt.inc
  63. 1 2
      compiler/nadd.pas
  64. 3 1
      compiler/nbas.pas
  65. 3 0
      compiler/ncal.pas
  66. 0 1
      compiler/ncginl.pas
  67. 1 1
      compiler/ncgvmt.pas
  68. 5 5
      compiler/ncnv.pas
  69. 1 1
      compiler/ncon.pas
  70. 13 3
      compiler/nflw.pas
  71. 27 5
      compiler/ngtcon.pas
  72. 20 1
      compiler/nmem.pas
  73. 2 0
      compiler/ogbase.pas
  74. 8 15
      compiler/ogomf.pas
  75. 13 0
      compiler/options.pas
  76. 0 2
      compiler/optloop.pas
  77. 58 49
      compiler/pdecsub.pas
  78. 1 7
      compiler/pgenutil.pas
  79. 11 3
      compiler/psabiehpi.pas
  80. 1 1
      compiler/psub.pas
  81. 9 5
      compiler/rgobj.pas
  82. 0 2
      compiler/scandir.pas
  83. 8 2
      compiler/scanner.pas
  84. 2 0
      compiler/symdef.pas
  85. 2 0
      compiler/systems.pas
  86. 2 0
      compiler/systems/t_amiga.pas
  87. 0 2
      compiler/systems/t_bsd.pas
  88. 2 3
      compiler/systems/t_darwin.pas
  89. 110 8
      compiler/systems/t_embed.pas
  90. 5 5
      compiler/systems/t_freertos.pas
  91. 2 0
      compiler/systems/t_win.pas
  92. 0 3
      compiler/systems/t_win16.pas
  93. 104 104
      compiler/utils/Makefile
  94. 1 1
      compiler/utils/Makefile.fpc
  95. 88 2
      compiler/utils/mkx86inl.pp
  96. 32 1
      compiler/utils/mkz80ins.pp
  97. 41 22
      compiler/utils/msg2inc.pp
  98. 2 1
      compiler/utils/ppuutils/ppudump.pp
  99. 1 1
      compiler/verbose.pas
  100. 17 6
      compiler/x86/aasmcpu.pas

+ 31 - 4
.gitattributes

@@ -3836,6 +3836,8 @@ packages/fcl-net/src/sslsockets.pp svneol=native#text/plain
 packages/fcl-net/src/ssockets.pp svneol=native#text/plain
 packages/fcl-net/src/ssockets.pp svneol=native#text/plain
 packages/fcl-net/src/unix/resolve.inc svneol=native#text/plain
 packages/fcl-net/src/unix/resolve.inc svneol=native#text/plain
 packages/fcl-net/src/win/resolve.inc svneol=native#text/plain
 packages/fcl-net/src/win/resolve.inc svneol=native#text/plain
+packages/fcl-net/tests/netdbtest.pp svneol=native#text/plain
+packages/fcl-net/tests/tresolvertests.pp svneol=native#text/plain
 packages/fcl-passrc/Makefile 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 svneol=native#text/plain
 packages/fcl-passrc/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-passrc/Makefile.fpc.fpcmake svneol=native#text/plain
@@ -3970,10 +3972,10 @@ packages/fcl-registry/src/xmlreg.pp svneol=native#text/plain
 packages/fcl-registry/src/xregreg.inc svneol=native#text/plain
 packages/fcl-registry/src/xregreg.inc svneol=native#text/plain
 packages/fcl-registry/tests/Makefile svneol=native#text/plain
 packages/fcl-registry/tests/Makefile svneol=native#text/plain
 packages/fcl-registry/tests/Makefile.fpc -text
 packages/fcl-registry/tests/Makefile.fpc -text
-packages/fcl-registry/tests/regtestframework.pp -text
-packages/fcl-registry/tests/tcxmlreg.pp svneol=native#text/plain
-packages/fcl-registry/tests/testbasics.pp svneol=native#text/plain
+packages/fcl-registry/tests/regtcxmlreg.pp svneol=native#text/plain
+packages/fcl-registry/tests/regtestbasics.pp svneol=native#text/plain
 packages/fcl-registry/tests/tregistry2.pp svneol=native#text/plain
 packages/fcl-registry/tests/tregistry2.pp svneol=native#text/plain
+packages/fcl-registry/tests/tregtestframework.pp svneol=native#text/plain
 packages/fcl-report/Makefile svneol=native#text/plain
 packages/fcl-report/Makefile svneol=native#text/plain
 packages/fcl-report/Makefile.fpc svneol=native#text/plain
 packages/fcl-report/Makefile.fpc svneol=native#text/plain
 packages/fcl-report/demos/company-logo.png -text svneol=unset#image/png
 packages/fcl-report/demos/company-logo.png -text svneol=unset#image/png
@@ -5322,7 +5324,7 @@ packages/graph/src/inc/clip.inc svneol=native#text/plain
 packages/graph/src/inc/fills.inc svneol=native#text/plain
 packages/graph/src/inc/fills.inc svneol=native#text/plain
 packages/graph/src/inc/fontdata.inc svneol=native#text/plain
 packages/graph/src/inc/fontdata.inc svneol=native#text/plain
 packages/graph/src/inc/graph.inc svneol=native#text/plain
 packages/graph/src/inc/graph.inc svneol=native#text/plain
-packages/graph/src/inc/graph.tex -text
+packages/graph/src/inc/graph.tex svneol=native#text/plain
 packages/graph/src/inc/graphh.inc svneol=native#text/plain
 packages/graph/src/inc/graphh.inc svneol=native#text/plain
 packages/graph/src/inc/gtext.inc svneol=native#text/plain
 packages/graph/src/inc/gtext.inc svneol=native#text/plain
 packages/graph/src/inc/makefile.inc svneol=native#text/plain
 packages/graph/src/inc/makefile.inc svneol=native#text/plain
@@ -8283,6 +8285,7 @@ packages/pasjpeg/examples/cderror.pas svneol=native#text/plain
 packages/pasjpeg/examples/cdjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cdjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cjpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/cjpeg.res svneol=native#text/plain
 packages/pasjpeg/examples/cjpeg.res svneol=native#text/plain
+packages/pasjpeg/examples/demo.lpi svneol=native#text/plain
 packages/pasjpeg/examples/demo.pas svneol=native#text/plain
 packages/pasjpeg/examples/demo.pas svneol=native#text/plain
 packages/pasjpeg/examples/demo.res svneol=native#text/plain
 packages/pasjpeg/examples/demo.res svneol=native#text/plain
 packages/pasjpeg/examples/djpeg.pas svneol=native#text/plain
 packages/pasjpeg/examples/djpeg.pas svneol=native#text/plain
@@ -13979,6 +13982,7 @@ tests/test/cg/tobjsize.pp svneol=native#text/plain
 tests/test/cg/tpara1.pp svneol=native#text/plain
 tests/test/cg/tpara1.pp svneol=native#text/plain
 tests/test/cg/tpara2.pp svneol=native#text/plain
 tests/test/cg/tpara2.pp svneol=native#text/plain
 tests/test/cg/tpara3.pp svneol=native#text/plain
 tests/test/cg/tpara3.pp svneol=native#text/plain
+tests/test/cg/tpara4.pp svneol=native#text/pascal
 tests/test/cg/tprintf.pp svneol=native#text/plain
 tests/test/cg/tprintf.pp svneol=native#text/plain
 tests/test/cg/tprintf2.pp svneol=native#text/plain
 tests/test/cg/tprintf2.pp svneol=native#text/plain
 tests/test/cg/tprintf3.pp svneol=native#text/plain
 tests/test/cg/tprintf3.pp svneol=native#text/plain
@@ -16107,7 +16111,9 @@ tests/test/units/fpwidestring/twide6fpwidestring.pp svneol=native#text/pascal
 tests/test/units/fpwidestring/twide7fpwidestring.pp svneol=native#text/pascal
 tests/test/units/fpwidestring/twide7fpwidestring.pp svneol=native#text/pascal
 tests/test/units/lineinfo/tlininfo.pp svneol=native#text/plain
 tests/test/units/lineinfo/tlininfo.pp svneol=native#text/plain
 tests/test/units/linux/tepoll1.pp svneol=native#text/pascal
 tests/test/units/linux/tepoll1.pp svneol=native#text/pascal
+tests/test/units/linux/tfutimesen.pp svneol=native#text/pascal
 tests/test/units/linux/tstatx.pp svneol=native#text/pascal
 tests/test/units/linux/tstatx.pp svneol=native#text/pascal
+tests/test/units/linux/tutimensat.pp svneol=native#text/pascal
 tests/test/units/math/tcmpnan.pp svneol=native#text/plain
 tests/test/units/math/tcmpnan.pp svneol=native#text/plain
 tests/test/units/math/tdivmod.pp svneol=native#text/plain
 tests/test/units/math/tdivmod.pp svneol=native#text/plain
 tests/test/units/math/tmask.inc svneol=native#text/plain
 tests/test/units/math/tmask.inc svneol=native#text/plain
@@ -16242,6 +16248,7 @@ tests/test/units/sysutils/tfexpand2.pp svneol=native#text/plain
 tests/test/units/sysutils/tffirst.pp svneol=native#text/plain
 tests/test/units/sysutils/tffirst.pp svneol=native#text/plain
 tests/test/units/sysutils/tfile1.pp svneol=native#text/plain
 tests/test/units/sysutils/tfile1.pp svneol=native#text/plain
 tests/test/units/sysutils/tfile2.pp svneol=native#text/plain
 tests/test/units/sysutils/tfile2.pp svneol=native#text/plain
+tests/test/units/sysutils/tfileage.pp svneol=native#text/pascal
 tests/test/units/sysutils/tfilename.pp svneol=native#text/plain
 tests/test/units/sysutils/tfilename.pp svneol=native#text/plain
 tests/test/units/sysutils/tfloattostr.pp svneol=native#text/plain
 tests/test/units/sysutils/tfloattostr.pp svneol=native#text/plain
 tests/test/units/sysutils/tformat.pp svneol=native#text/plain
 tests/test/units/sysutils/tformat.pp svneol=native#text/plain
@@ -16556,6 +16563,7 @@ tests/webtbf/tw2414.pp svneol=native#text/plain
 tests/webtbf/tw24184.pp svneol=native#text/plain
 tests/webtbf/tw24184.pp svneol=native#text/plain
 tests/webtbf/tw24428.pp svneol=native#text/plain
 tests/webtbf/tw24428.pp svneol=native#text/plain
 tests/webtbf/tw24428a.pp svneol=native#text/plain
 tests/webtbf/tw24428a.pp svneol=native#text/plain
+tests/webtbf/tw24434.pp svneol=native#text/pascal
 tests/webtbf/tw24453.pp svneol=native#text/pascal
 tests/webtbf/tw24453.pp svneol=native#text/pascal
 tests/webtbf/tw24495.pp svneol=native#text/pascal
 tests/webtbf/tw24495.pp svneol=native#text/pascal
 tests/webtbf/tw24588.pp svneol=native#text/pascal
 tests/webtbf/tw24588.pp svneol=native#text/pascal
@@ -16689,6 +16697,7 @@ tests/webtbf/tw36720.pp svneol=native#text/pascal
 tests/webtbf/tw3680.pp svneol=native#text/plain
 tests/webtbf/tw3680.pp svneol=native#text/plain
 tests/webtbf/tw36975.pp svneol=native#text/pascal
 tests/webtbf/tw36975.pp svneol=native#text/pascal
 tests/webtbf/tw3716.pp svneol=native#text/plain
 tests/webtbf/tw3716.pp svneol=native#text/plain
+tests/webtbf/tw37217.pp svneol=native#text/pascal
 tests/webtbf/tw37272b.pp svneol=native#text/pascal
 tests/webtbf/tw37272b.pp svneol=native#text/pascal
 tests/webtbf/tw37303.pp -text svneol=native#text/pascal
 tests/webtbf/tw37303.pp -text svneol=native#text/pascal
 tests/webtbf/tw3738.pp svneol=native#text/plain
 tests/webtbf/tw3738.pp svneol=native#text/plain
@@ -16701,6 +16710,7 @@ tests/webtbf/tw37476.pp svneol=native#text/pascal
 tests/webtbf/tw37763.pp svneol=native#text/pascal
 tests/webtbf/tw37763.pp svneol=native#text/pascal
 tests/webtbf/tw3790.pp svneol=native#text/plain
 tests/webtbf/tw3790.pp svneol=native#text/plain
 tests/webtbf/tw3812.pp svneol=native#text/plain
 tests/webtbf/tw3812.pp svneol=native#text/plain
+tests/webtbf/tw38287.pp svneol=native#text/pascal
 tests/webtbf/tw38289a.pp svneol=native#text/pascal
 tests/webtbf/tw38289a.pp svneol=native#text/pascal
 tests/webtbf/tw38289b.pp svneol=native#text/pascal
 tests/webtbf/tw38289b.pp svneol=native#text/pascal
 tests/webtbf/tw3930a.pp svneol=native#text/plain
 tests/webtbf/tw3930a.pp svneol=native#text/plain
@@ -18294,6 +18304,7 @@ tests/webtbs/tw32111.pp svneol=native#text/pascal
 tests/webtbs/tw32115.pp svneol=native#text/pascal
 tests/webtbs/tw32115.pp svneol=native#text/pascal
 tests/webtbs/tw32118.pp svneol=native#text/pascal
 tests/webtbs/tw32118.pp svneol=native#text/pascal
 tests/webtbs/tw3212.pp svneol=native#text/plain
 tests/webtbs/tw3212.pp svneol=native#text/plain
+tests/webtbs/tw32139.pp -text svneol=native#text/pascal
 tests/webtbs/tw3214.pp svneol=native#text/plain
 tests/webtbs/tw3214.pp svneol=native#text/plain
 tests/webtbs/tw32150.pp svneol=native#text/pascal
 tests/webtbs/tw32150.pp svneol=native#text/pascal
 tests/webtbs/tw3216.pp svneol=native#text/plain
 tests/webtbs/tw3216.pp svneol=native#text/plain
@@ -18390,6 +18401,7 @@ tests/webtbs/tw33898.pp -text svneol=native#text/pascal
 tests/webtbs/tw33963.pp svneol=native#text/pascal
 tests/webtbs/tw33963.pp svneol=native#text/pascal
 tests/webtbs/tw3402.pp svneol=native#text/plain
 tests/webtbs/tw3402.pp svneol=native#text/plain
 tests/webtbs/tw34021.pp -text svneol=native#text/pascal
 tests/webtbs/tw34021.pp -text svneol=native#text/pascal
+tests/webtbs/tw34027.pp svneol=native#text/pascal
 tests/webtbs/tw34037.pp svneol=native#text/pascal
 tests/webtbs/tw34037.pp svneol=native#text/pascal
 tests/webtbs/tw34055.pp svneol=native#text/plain
 tests/webtbs/tw34055.pp svneol=native#text/plain
 tests/webtbs/tw3411.pp svneol=native#text/plain
 tests/webtbs/tw3411.pp svneol=native#text/plain
@@ -18632,13 +18644,23 @@ tests/webtbs/tw3827.pp svneol=native#text/plain
 tests/webtbs/tw3829.pp svneol=native#text/plain
 tests/webtbs/tw3829.pp svneol=native#text/plain
 tests/webtbs/tw38295.pp svneol=native#text/pascal
 tests/webtbs/tw38295.pp svneol=native#text/pascal
 tests/webtbs/tw38299.pp svneol=native#text/pascal
 tests/webtbs/tw38299.pp svneol=native#text/pascal
+tests/webtbs/tw38306.pp -text svneol=native#text/pascal
 tests/webtbs/tw38309.pp svneol=native#text/pascal
 tests/webtbs/tw38309.pp svneol=native#text/pascal
 tests/webtbs/tw38310a.pp svneol=native#text/pascal
 tests/webtbs/tw38310a.pp svneol=native#text/pascal
 tests/webtbs/tw38310b.pp svneol=native#text/pascal
 tests/webtbs/tw38310b.pp svneol=native#text/pascal
 tests/webtbs/tw38310c.pp svneol=native#text/pascal
 tests/webtbs/tw38310c.pp svneol=native#text/pascal
+tests/webtbs/tw38316.pp svneol=native#text/plain
 tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw3833.pp svneol=native#text/plain
+tests/webtbs/tw38337.pp svneol=native#text/plain
+tests/webtbs/tw38339.pp svneol=native#text/plain
+tests/webtbs/tw38351.pp -text svneol=native#text/pascal
+tests/webtbs/tw38385.pp svneol=native#text/pascal
+tests/webtbs/tw38390.pp svneol=native#text/pascal
 tests/webtbs/tw3840.pp svneol=native#text/plain
 tests/webtbs/tw3840.pp svneol=native#text/plain
 tests/webtbs/tw3841.pp svneol=native#text/plain
 tests/webtbs/tw3841.pp svneol=native#text/plain
+tests/webtbs/tw38412.pp svneol=native#text/pascal
+tests/webtbs/tw38413.pp svneol=native#text/pascal
+tests/webtbs/tw38429.pp svneol=native#text/pascal
 tests/webtbs/tw3863.pp svneol=native#text/plain
 tests/webtbs/tw3863.pp svneol=native#text/plain
 tests/webtbs/tw3864.pp svneol=native#text/plain
 tests/webtbs/tw3864.pp svneol=native#text/plain
 tests/webtbs/tw3865.pp svneol=native#text/plain
 tests/webtbs/tw3865.pp svneol=native#text/plain
@@ -19173,6 +19195,10 @@ tests/webtbs/uw35918b.pp svneol=native#text/pascal
 tests/webtbs/uw35918c.pp svneol=native#text/pascal
 tests/webtbs/uw35918c.pp svneol=native#text/pascal
 tests/webtbs/uw36544.pp svneol=native#text/pascal
 tests/webtbs/uw36544.pp svneol=native#text/pascal
 tests/webtbs/uw38069.pp svneol=native#text/pascal
 tests/webtbs/uw38069.pp svneol=native#text/pascal
+tests/webtbs/uw38385a.pp svneol=native#text/pascal
+tests/webtbs/uw38385b.pp svneol=native#text/pascal
+tests/webtbs/uw38385c.pp svneol=native#text/pascal
+tests/webtbs/uw38429.pp svneol=native#text/pascal
 tests/webtbs/uw3968.pp svneol=native#text/plain
 tests/webtbs/uw3968.pp svneol=native#text/plain
 tests/webtbs/uw4056.pp svneol=native#text/plain
 tests/webtbs/uw4056.pp svneol=native#text/plain
 tests/webtbs/uw4140.pp svneol=native#text/plain
 tests/webtbs/uw4140.pp svneol=native#text/plain
@@ -19367,6 +19393,7 @@ utils/fpdoc/fpdocclasstree.pp svneol=native#text/plain
 utils/fpdoc/fpdocproj.pas svneol=native#text/plain
 utils/fpdoc/fpdocproj.pas svneol=native#text/plain
 utils/fpdoc/fpdocstripper.lpi svneol=native#text/plain
 utils/fpdoc/fpdocstripper.lpi svneol=native#text/plain
 utils/fpdoc/fpdocstripper.pp svneol=native#text/plain
 utils/fpdoc/fpdocstripper.pp svneol=native#text/plain
+utils/fpdoc/fpdocstrs.pp svneol=native#text/plain
 utils/fpdoc/fpdocxmlopts.pas svneol=native#text/plain
 utils/fpdoc/fpdocxmlopts.pas svneol=native#text/plain
 utils/fpdoc/fpmake.pp svneol=native#text/plain
 utils/fpdoc/fpmake.pp svneol=native#text/plain
 utils/fpdoc/images/minus.png -text svneol=unset#image/png
 utils/fpdoc/images/minus.png -text svneol=unset#image/png

+ 21 - 1
compiler/Makefile

@@ -4640,6 +4640,9 @@ ifdef CMP
 override DIFF:=$(CMP) -i218
 override DIFF:=$(CMP) -i218
 endif
 endif
 endif
 endif
+ifeq ($(OS_TARGET), darwin)
+CODESIGN?=$(strip $(wildcard $(addsuffix /codesign,$(SEARCHPATH))))
+endif
 ifneq ($(CYCLELEVEL),1)
 ifneq ($(CYCLELEVEL),1)
 ifndef ALLOW_WARNINGS
 ifndef ALLOW_WARNINGS
 override LOCALOPT+=-Sew
 override LOCALOPT+=-Sew
@@ -4941,7 +4944,11 @@ ifdef OLDFPC
 ifneq ($(OS_TARGET),darwin)
 ifneq ($(OS_TARGET),darwin)
 DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
 DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
 else
 else
-DIFFRESULT:=$(shell cp $(OLDFPC) $(OLDFPC).tmp; cp $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; rm $(OLDFPC).tmp $(FPC).tmp)
+ifneq ($(CODESIGN),)
+DIFFRESULT:=$(shell $(COPY) $(OLDFPC) $(OLDFPC).tmp; $(COPY) $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(CODESIGN) --remove-signature $(OLDFPC).tmp; codesign --remove-signature $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; $(RMPROG) $(OLDFPC).tmp $(FPC).tmp)
+else
+DIFFRESULT:=$(shell $(COPY) $(OLDFPC) $(OLDFPC).tmp; $(COPY) $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; $(RMPROG) $(OLDFPC).tmp $(FPC).tmp)
+endif
 endif
 endif
 else
 else
 DIFFRESULT=Not equal
 DIFFRESULT=Not equal
@@ -4980,7 +4987,20 @@ endif
 	$(MAKE) tempclean
 	$(MAKE) tempclean
 	$(MAKE) $(TEMPNAME3)
 	$(MAKE) $(TEMPNAME3)
 	$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3PREFIX)$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next CYCLELEVEL=4
 	$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3PREFIX)$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next CYCLELEVEL=4
+ifneq ($(OS_TARGET), darwin)
 	$(DIFF) $(TEMPNAME3) $(EXENAME)
 	$(DIFF) $(TEMPNAME3) $(EXENAME)
+else
+	$(COPY) $(TEMPNAME3) $(TEMPNAME3).tmp
+	$(COPY) $(EXENAME) $(EXENAME).tmp
+	strip -no_uuid $(TEMPNAME3).tmp
+	strip -no_uuid $(EXENAME).tmp
+ifneq ($(CODESIGN),)
+	$(CODESIGN) --remove-signature $(TEMPNAME3).tmp
+	$(CODESIGN) --remove-signature $(EXENAME).tmp
+endif
+	$(DIFF) $(TEMPNAME3).tmp $(EXENAME).tmp
+	rm $(TEMPNAME3).tmp $(EXENAME).tmp
+endif
 	$(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAMEPREFIX)$(EXENAME)'
 	$(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAMEPREFIX)$(EXENAME)'
 	$(MAKE) wpocycle
 	$(MAKE) wpocycle
 	$(MAKE) echotime
 	$(MAKE) echotime

+ 22 - 1
compiler/Makefile.fpc

@@ -438,6 +438,10 @@ override DIFF:=$(CMP) -i218
 endif
 endif
 endif
 endif
 
 
+ifeq ($(OS_TARGET), darwin)
+CODESIGN?=$(strip $(wildcard $(addsuffix /codesign,$(SEARCHPATH))))
+endif
+
 # Use -Sew option by default
 # Use -Sew option by default
 # Allow disabling by setting ALLOW_WARNINGS=1
 # Allow disabling by setting ALLOW_WARNINGS=1
 ifneq ($(CYCLELEVEL),1)
 ifneq ($(CYCLELEVEL),1)
@@ -878,7 +882,11 @@ ifdef OLDFPC
 ifneq ($(OS_TARGET),darwin)
 ifneq ($(OS_TARGET),darwin)
 DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
 DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
 else
 else
-DIFFRESULT:=$(shell cp $(OLDFPC) $(OLDFPC).tmp; cp $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; rm $(OLDFPC).tmp $(FPC).tmp)
+ifneq ($(CODESIGN),)
+DIFFRESULT:=$(shell $(COPY) $(OLDFPC) $(OLDFPC).tmp; $(COPY) $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(CODESIGN) --remove-signature $(OLDFPC).tmp; codesign --remove-signature $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; $(RMPROG) $(OLDFPC).tmp $(FPC).tmp)
+else
+DIFFRESULT:=$(shell $(COPY) $(OLDFPC) $(OLDFPC).tmp; $(COPY) $(FPC) $(FPC).tmp; strip -no_uuid $(OLDFPC).tmp; strip -no_uuid $(FPC).tmp; $(DIFF) $(OLDFPC).tmp $(FPC).tmp; $(RMPROG) $(OLDFPC).tmp $(FPC).tmp)
+endif
 endif
 endif
 else
 else
 DIFFRESULT=Not equal
 DIFFRESULT=Not equal
@@ -922,7 +930,20 @@ endif
         $(MAKE) tempclean
         $(MAKE) tempclean
         $(MAKE) $(TEMPNAME3)
         $(MAKE) $(TEMPNAME3)
         $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3PREFIX)$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next CYCLELEVEL=4
         $(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3PREFIX)$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next CYCLELEVEL=4
+ifneq ($(OS_TARGET), darwin)
         $(DIFF) $(TEMPNAME3) $(EXENAME)
         $(DIFF) $(TEMPNAME3) $(EXENAME)
+else
+        $(COPY) $(TEMPNAME3) $(TEMPNAME3).tmp
+        $(COPY) $(EXENAME) $(EXENAME).tmp
+        strip -no_uuid $(TEMPNAME3).tmp
+        strip -no_uuid $(EXENAME).tmp
+ifneq ($(CODESIGN),)
+        $(CODESIGN) --remove-signature $(TEMPNAME3).tmp
+        $(CODESIGN) --remove-signature $(EXENAME).tmp
+endif
+        $(DIFF) $(TEMPNAME3).tmp $(EXENAME).tmp
+        rm $(TEMPNAME3).tmp $(EXENAME).tmp
+endif
         $(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAMEPREFIX)$(EXENAME)'
         $(MAKE) $(addsuffix _all,$(TARGET_DIRS)) 'FPC=$(BASEDIR)/$(EXENAMEPREFIX)$(EXENAME)'
         $(MAKE) wpocycle
         $(MAKE) wpocycle
         $(MAKE) echotime
         $(MAKE) echotime

+ 11 - 9
compiler/aarch64/aasmcpu.pas

@@ -1018,6 +1018,7 @@ implementation
           A_TST,
           A_TST,
           A_FCMP,A_FCMPE,
           A_FCMP,A_FCMPE,
           A_CBZ,A_CBNZ,
           A_CBZ,A_CBNZ,
+          A_PRFM,A_PRFUM,
           A_RET:
           A_RET:
             result:=operand_read;
             result:=operand_read;
           A_STR,A_STUR:
           A_STR,A_STUR:
@@ -1026,14 +1027,6 @@ implementation
             else
             else
               { check for pre/post indexed in spilling_get_operation_type_ref }
               { check for pre/post indexed in spilling_get_operation_type_ref }
               result:=operand_read;
               result:=operand_read;
-          A_STLXP,
-          A_STLXR,
-          A_STXP,
-          A_STXR:
-            if opnr=0 then
-              result:=operand_write
-            else
-              result:=operand_read;
           A_STP:
           A_STP:
             begin
             begin
               if opnr in [0,1] then
               if opnr in [0,1] then
@@ -1102,12 +1095,21 @@ implementation
            A_FCVTZS,
            A_FCVTZS,
            A_SDIV,
            A_SDIV,
            A_SMULL,
            A_SMULL,
+           A_STLXP,
+           A_STLXR,
+           A_STXP,
+           A_STXR,
            A_SUB,
            A_SUB,
+           A_SXTB,
+           A_SXTH,
+           A_SXTW,
            A_UBFIZ,
            A_UBFIZ,
            A_UBFX,
            A_UBFX,
            A_UCVTF,
            A_UCVTF,
            A_UDIV,
            A_UDIV,
-           A_UMULL:
+           A_UMULL,
+           A_UXTB,
+           A_UXTH:
              if opnr=0 then
              if opnr=0 then
                result:=operand_write
                result:=operand_write
              else
              else

+ 0 - 3
compiler/aarch64/agcpugas.pas

@@ -252,7 +252,6 @@ unit agcpugas;
         lastsym : tai_symbol;
         lastsym : tai_symbol;
         lastsec : tai_section;
         lastsec : tai_section;
         inprologue,
         inprologue,
-        inhandlerdata,
         deleteai : boolean;
         deleteai : boolean;
         totalcount,
         totalcount,
         instrcount,
         instrcount,
@@ -265,7 +264,6 @@ unit agcpugas;
         sehlist,
         sehlist,
         tmplist : TAsmList;
         tmplist : TAsmList;
         xdatasym : tasmsymbol;
         xdatasym : tasmsymbol;
-        unwindread,
         unwindrec : longword;
         unwindrec : longword;
       begin
       begin
         if not assigned(list) then
         if not assigned(list) then
@@ -278,7 +276,6 @@ unit agcpugas;
         instrcount:=0;
         instrcount:=0;
         datacount:=0;
         datacount:=0;
         unwinddata:=nil;
         unwinddata:=nil;
-        inhandlerdata:=false;
         inprologue:=false;
         inprologue:=false;
         handlerdata:=nil;
         handlerdata:=nil;
         handlerdataidx:=0;
         handlerdataidx:=0;

+ 0 - 7
compiler/aarch64/aoptcpu.pas

@@ -568,7 +568,6 @@ Implementation
       ThisRegister: TRegister;
       ThisRegister: TRegister;
       OffsetVal, ValidOffset, MinOffset, MaxOffset: asizeint;
       OffsetVal, ValidOffset, MinOffset, MaxOffset: asizeint;
       TargetOpcode: TAsmOp;
       TargetOpcode: TAsmOp;
-      Breakout: Boolean;
     begin
     begin
       Result := False;
       Result := False;
       ThisRegister := taicpu(p).oper[0]^.reg;
       ThisRegister := taicpu(p).oper[0]^.reg;
@@ -621,8 +620,6 @@ Implementation
 
 
                 if (taicpu(hp1).opcode = taicpu(p).opcode) then
                 if (taicpu(hp1).opcode = taicpu(p).opcode) then
                   begin
                   begin
-                    Breakout := False;
-
                     if (taicpu(hp1).oppostfix = PF_NONE) and
                     if (taicpu(hp1).oppostfix = PF_NONE) and
                       { Registers need to be the same size }
                       { Registers need to be the same size }
                       (getsubreg(ThisRegister) = getsubreg(taicpu(hp1).oper[0]^.reg)) and
                       (getsubreg(ThisRegister) = getsubreg(taicpu(hp1).oper[0]^.reg)) and
@@ -754,8 +751,6 @@ Implementation
 
 
 
 
   function TCpuAsmOptimizer.PeepHoleOptPass1Cpu(var p: tai): boolean;
   function TCpuAsmOptimizer.PeepHoleOptPass1Cpu(var p: tai): boolean;
-    var
-      hp1: tai;
     begin
     begin
       result := false;
       result := false;
       if p.typ=ait_instruction then
       if p.typ=ait_instruction then
@@ -817,8 +812,6 @@ Implementation
 
 
 
 
   function TCpuAsmOptimizer.PeepHoleOptPass2Cpu(var p: tai): boolean;
   function TCpuAsmOptimizer.PeepHoleOptPass2Cpu(var p: tai): boolean;
-    var
-      hp1: tai;
     begin
     begin
       result := false;
       result := false;
       if p.typ=ait_instruction then
       if p.typ=ait_instruction then

+ 3 - 0
compiler/aarch64/cgcpu.pas

@@ -587,6 +587,9 @@ implementation
         manipulated_a: tcgint;
         manipulated_a: tcgint;
         leftover_a: word;
         leftover_a: word;
       begin
       begin
+{$ifdef extdebug}
+        list.concat(tai_comment.Create(strpnew('Generating constant ' + tostr(a))));
+{$endif extdebug}
         case a of
         case a of
           { Small positive number }
           { Small positive number }
           $0..$FFFF:
           $0..$FFFF:

+ 16 - 0
compiler/aasmcnst.pas

@@ -427,6 +427,10 @@ type
      function queue_subscriptn_multiple_by_name(def: tabstractrecorddef; const fields: array of TIDString): tdef;
      function queue_subscriptn_multiple_by_name(def: tabstractrecorddef; const fields: array of TIDString): tdef;
      { queue a type conversion operation }
      { queue a type conversion operation }
      procedure queue_typeconvn(fromdef, todef: tdef); virtual;
      procedure queue_typeconvn(fromdef, todef: tdef); virtual;
+     { queue a add operation }
+     procedure queue_addn(def: tdef; const index: tconstexprint); virtual;
+     { queue a sub operation }
+     procedure queue_subn(def: tdef; const index: tconstexprint); virtual;
      { finalise the queue (so a new one can be created) and flush the
      { finalise the queue (so a new one can be created) and flush the
         previously queued operations, applying them in reverse order on a...}
         previously queued operations, applying them in reverse order on a...}
      { ... procdef }
      { ... procdef }
@@ -2080,6 +2084,18 @@ implementation
      end;
      end;
 
 
 
 
+   procedure ttai_typedconstbuilder.queue_addn(def: tdef; const index: tconstexprint);
+     begin
+       inc(fqueue_offset,def.size*int64(index));
+     end;
+
+
+   procedure ttai_typedconstbuilder.queue_subn(def: tdef; const index: tconstexprint);
+     begin
+       dec(fqueue_offset,def.size*int64(index));
+     end;
+
+
    procedure ttai_typedconstbuilder.queue_subscriptn(def: tabstractrecorddef; vs: tfieldvarsym);
    procedure ttai_typedconstbuilder.queue_subscriptn(def: tabstractrecorddef; vs: tfieldvarsym);
      begin
      begin
        inc(fqueue_offset,vs.fieldoffset);
        inc(fqueue_offset,vs.fieldoffset);

+ 0 - 1
compiler/aggas.pas

@@ -497,7 +497,6 @@ implementation
     procedure TGNUAssembler.WriteSection(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder;secalign:longint;secflags:TSectionFlags=[];secprogbits:TSectionProgbits=SPB_None);
     procedure TGNUAssembler.WriteSection(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder;secalign:longint;secflags:TSectionFlags=[];secprogbits:TSectionProgbits=SPB_None);
       var
       var
         s : string;
         s : string;
-        secflag: TSectionFlag;
         usesectionprogbits,
         usesectionprogbits,
         usesectionflags: boolean;
         usesectionflags: boolean;
       begin
       begin

+ 4 - 6
compiler/aoptobj.pas

@@ -1382,12 +1382,10 @@ Unit AoptObj;
         removedSomething := false;
         removedSomething := false;
         firstRemovedWasAlloc := false;
         firstRemovedWasAlloc := false;
 {$ifdef allocregdebug}
 {$ifdef allocregdebug}
-        hp := tai_comment.Create(strpnew('allocating '+std_regname(newreg(R_INTREGISTER,supreg,R_SUBWHOLE))+
-          ' from here...'));
-        insertllitem(asml,p1.previous,p1,hp);
-        hp := tai_comment.Create(strpnew('allocated '+std_regname(newreg(R_INTREGISTER,supreg,R_SUBWHOLE))+
-          ' till here...'));
-        insertllitem(asml,p2,p2.next,hp);
+        hp := tai_comment.Create(strpnew('allocating '+std_regname(reg)+' from here...'));
+        insertllitem(p1.previous,p1,hp);
+        hp := tai_comment.Create(strpnew('allocated '+std_regname(reg)+' till here...'));
+        insertllitem(p2,p2.next,hp);
 {$endif allocregdebug}
 {$endif allocregdebug}
         { do it the safe way: always allocate the full super register,
         { do it the safe way: always allocate the full super register,
           as we do no register re-allocation in the peephole optimizer,
           as we do no register re-allocation in the peephole optimizer,

+ 3 - 4
compiler/arm/aoptcpu.pas

@@ -59,6 +59,7 @@ Type
     function InstructionLoadsFromReg(const reg : TRegister; const hp : tai) : boolean; override;
     function InstructionLoadsFromReg(const reg : TRegister; const hp : tai) : boolean; override;
 
 
     function RegLoadedWithNewValue(reg : tregister; hp : tai) : boolean; override;
     function RegLoadedWithNewValue(reg : tregister; hp : tai) : boolean; override;
+    function OptPass1And(var p: tai): Boolean; override; { There's optimisation code that's general for all ARM platforms }
   protected
   protected
     function LookForPreindexedPattern(p: taicpu): boolean;
     function LookForPreindexedPattern(p: taicpu): boolean;
     function LookForPostindexedPattern(p: taicpu): boolean;
     function LookForPostindexedPattern(p: taicpu): boolean;
@@ -67,7 +68,6 @@ Type
     { Individual optimisation routines }
     { Individual optimisation routines }
     function OptPass1DataCheckMov(var p: tai): Boolean;
     function OptPass1DataCheckMov(var p: tai): Boolean;
     function OptPass1ADDSUB(var p: tai): Boolean;
     function OptPass1ADDSUB(var p: tai): Boolean;
-    function OptPass1And(var p: tai): Boolean; override; { There's optimisation code that's general for all ARM platforms }
     function OptPass1CMP(var p: tai): Boolean;
     function OptPass1CMP(var p: tai): Boolean;
     function OptPass1LDR(var p: tai): Boolean;
     function OptPass1LDR(var p: tai): Boolean;
     function OptPass1STM(var p: tai): Boolean;
     function OptPass1STM(var p: tai): Boolean;
@@ -540,7 +540,6 @@ Implementation
   function TCpuAsmOptimizer.OptPass1ADDSUB(var p: tai): Boolean;
   function TCpuAsmOptimizer.OptPass1ADDSUB(var p: tai): Boolean;
     var
     var
       hp1,hp2: tai;
       hp1,hp2: tai;
-      oldreg: tregister;
     begin
     begin
       Result := OptPass1DataCheckMov(p);
       Result := OptPass1DataCheckMov(p);
 
 
@@ -621,7 +620,7 @@ Implementation
 
 
   function TCpuAsmOptimizer.OptPass1MUL(var p: tai): Boolean;
   function TCpuAsmOptimizer.OptPass1MUL(var p: tai): Boolean;
     var
     var
-      hp1,hp2: tai;
+      hp1: tai;
       oldreg: tregister;
       oldreg: tregister;
     begin
     begin
       Result := OptPass1DataCheckMov(p);
       Result := OptPass1DataCheckMov(p);
@@ -1099,7 +1098,7 @@ Implementation
 
 
   function TCpuAsmOptimizer.OptPass1MOV(var p: tai): Boolean;
   function TCpuAsmOptimizer.OptPass1MOV(var p: tai): Boolean;
     var
     var
-      hp1, hpfar1, hp2, hp3: tai;
+      hp1, hpfar1, hp2: tai;
       i, i2: longint;
       i, i2: longint;
       tempop: tasmop;
       tempop: tasmop;
       dealloc: tai_regalloc;
       dealloc: tai_regalloc;

+ 12 - 7
compiler/armgen/aoptarm.pas

@@ -531,6 +531,11 @@ Implementation
                               { Instruction will become mov r1,r1 }
                               { Instruction will become mov r1,r1 }
                               DebugMsg('Peephole Optimization: Mov2None 2 done', next_hp);
                               DebugMsg('Peephole Optimization: Mov2None 2 done', next_hp);
 
 
+                              { Allocate r1 between the instructions; not doing
+                                so may cause problems when removing superfluous
+                                MOVs later (i38055) }
+                              AllocRegBetween(taicpu(p).oper[1]^.reg, p, next_hp, UsedRegs);
+
                               if (next_hp = hp1) then
                               if (next_hp = hp1) then
                                 { Don't let hp1 become a dangling pointer }
                                 { Don't let hp1 become a dangling pointer }
                                 hp1 := nil;
                                 hp1 := nil;
@@ -902,8 +907,8 @@ Implementation
         { reg1 might not be modified inbetween }
         { reg1 might not be modified inbetween }
         not(RegModifiedBetween(taicpu(p).oper[1]^.reg,p,hp1)) then
         not(RegModifiedBetween(taicpu(p).oper[1]^.reg,p,hp1)) then
         begin
         begin
-          DebugMsg('Peephole SxtbAndImm2Sxtb done', p);
-          taicpu(hp1).opcode:=A_SXTB;
+          DebugMsg('Peephole SxtbAndImm2Uxtb done', p);
+          taicpu(hp1).opcode:=A_UXTB;
           taicpu(hp1).ops:=2;
           taicpu(hp1).ops:=2;
           taicpu(hp1).loadReg(1,taicpu(p).oper[1]^.reg);
           taicpu(hp1).loadReg(1,taicpu(p).oper[1]^.reg);
           GetNextInstruction(p,hp2);
           GetNextInstruction(p,hp2);
@@ -913,7 +918,7 @@ Implementation
           result:=true;
           result:=true;
         end
         end
       else if GetNextInstructionUsingReg(p, hp1, taicpu(p).oper[0]^.reg) and
       else if GetNextInstructionUsingReg(p, hp1, taicpu(p).oper[0]^.reg) and
-           RemoveSuperfluousMove(p, hp1, 'SxtbMov2Data') then
+           RemoveSuperfluousMove(p, hp1, 'UxtbMov2Data') then
         Result:=true;
         Result:=true;
     end;
     end;
 
 
@@ -983,7 +988,7 @@ Implementation
         and reg3,reg2,#65535
         and reg3,reg2,#65535
         dealloc reg2
         dealloc reg2
         to
         to
-        sxth reg3,reg1
+        uxth reg3,reg1
       }
       }
       else if MatchInstruction(p, A_SXTH, [C_None], [PF_None]) and
       else if MatchInstruction(p, A_SXTH, [C_None], [PF_None]) and
         (taicpu(p).ops=2) and
         (taicpu(p).ops=2) and
@@ -997,8 +1002,8 @@ Implementation
         { reg1 might not be modified inbetween }
         { reg1 might not be modified inbetween }
         not(RegModifiedBetween(taicpu(p).oper[1]^.reg,p,hp1)) then
         not(RegModifiedBetween(taicpu(p).oper[1]^.reg,p,hp1)) then
         begin
         begin
-          DebugMsg('Peephole SxthAndImm2Sxth done', p);
-          taicpu(hp1).opcode:=A_SXTH;
+          DebugMsg('Peephole SxthAndImm2Uxth done', p);
+          taicpu(hp1).opcode:=A_UXTH;
           taicpu(hp1).ops:=2;
           taicpu(hp1).ops:=2;
           taicpu(hp1).loadReg(1,taicpu(p).oper[1]^.reg);
           taicpu(hp1).loadReg(1,taicpu(p).oper[1]^.reg);
           GetNextInstruction(p, hp1);
           GetNextInstruction(p, hp1);
@@ -1008,7 +1013,7 @@ Implementation
           result:=true;
           result:=true;
         end
         end
       else if GetNextInstructionUsingReg(p, hp1, taicpu(p).oper[0]^.reg) and
       else if GetNextInstructionUsingReg(p, hp1, taicpu(p).oper[0]^.reg) and
-           RemoveSuperfluousMove(p, hp1, 'SxthMov2Data') then
+           RemoveSuperfluousMove(p, hp1, 'UxthMov2Data') then
         Result:=true;
         Result:=true;
     end;
     end;
 
 

+ 0 - 2
compiler/avr/agavrgas.pas

@@ -154,8 +154,6 @@ unit agavrgas;
       function getopstr(const o:toper) : string;
       function getopstr(const o:toper) : string;
         var
         var
           hs : string;
           hs : string;
-          first : boolean;
-          r : tsuperregister;
         begin
         begin
           case o.typ of
           case o.typ of
             top_reg:
             top_reg:

+ 0 - 1
compiler/avr/aoptcpu.pas

@@ -258,7 +258,6 @@ Implementation
 
 
     var
     var
       hp1, hp2, hp3: tai;
       hp1, hp2, hp3: tai;
-      s: string;
     begin
     begin
       result:=false;
       result:=false;
 
 

+ 7 - 15
compiler/avr/cgcpu.pas

@@ -264,7 +264,6 @@ unit cgcpu;
       var
       var
         i,j : longint;
         i,j : longint;
         hp : PCGParaLocation;
         hp : PCGParaLocation;
-        ref: treference;
         tmpreg: TRegister;
         tmpreg: TRegister;
       begin
       begin
         if not(tcgsize2size[paraloc.Size] in [1..4]) then
         if not(tcgsize2size[paraloc.Size] in [1..4]) then
@@ -310,7 +309,7 @@ unit cgcpu;
 
 
     procedure tcgavr.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const paraloc : TCGPara);
     procedure tcgavr.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const paraloc : TCGPara);
       var
       var
-        tmpref, ref: treference;
+        tmpref: treference;
         location: pcgparalocation;
         location: pcgparalocation;
         sizeleft: tcgint;
         sizeleft: tcgint;
         i: Integer;
         i: Integer;
@@ -327,7 +326,6 @@ unit cgcpu;
                 a_load_ref_reg(list,location^.size,location^.size,tmpref,location^.register);
                 a_load_ref_reg(list,location^.size,location^.size,tmpref,location^.register);
               LOC_REFERENCE:
               LOC_REFERENCE:
                 begin
                 begin
-                  ref:=tmpref;
                   for i:=1 to sizeleft do
                   for i:=1 to sizeleft do
                     begin
                     begin
                       tmpreg:=getintregister(list,OS_8);
                       tmpreg:=getintregister(list,OS_8);
@@ -417,7 +415,7 @@ unit cgcpu;
 
 
      procedure tcgavr.a_op_const_reg_reg_internal(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src,srchi,dst,dsthi: tregister);
      procedure tcgavr.a_op_const_reg_reg_internal(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src,srchi,dst,dsthi: tregister);
        var
        var
-         tmpSrc, tmpDst, countreg: TRegister;
+         countreg: TRegister;
          b, b2, i, j: byte;
          b, b2, i, j: byte;
          s1, s2, t1: integer;
          s1, s2, t1: integer;
          l1: TAsmLabel;
          l1: TAsmLabel;
@@ -574,10 +572,7 @@ unit cgcpu;
          countreg,
          countreg,
          tmpreg: tregister;
          tmpreg: tregister;
          i : integer;
          i : integer;
-         instr : taicpu;
-         paraloc1,paraloc2 : TCGPara;
          l1,l2 : tasmlabel;
          l1,l2 : tasmlabel;
-         pd : tprocdef;
          hovloc: tlocation;
          hovloc: tlocation;
 
 
       { NextRegDst* is sometimes called before the register usage and sometimes afterwards }
       { NextRegDst* is sometimes called before the register usage and sometimes afterwards }
@@ -1093,7 +1088,6 @@ unit cgcpu;
     function tcgavr.normalize_ref(list:TAsmList;ref: treference;tmpreg : tregister) : treference;
     function tcgavr.normalize_ref(list:TAsmList;ref: treference;tmpreg : tregister) : treference;
       var
       var
         tmpref : treference;
         tmpref : treference;
-        l : tasmlabel;
       begin
       begin
         Result:=ref;
         Result:=ref;
 
 
@@ -1702,8 +1696,7 @@ unit cgcpu;
     procedure tcgavr.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;
     procedure tcgavr.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;
       cmp_op : topcmp;a : tcgint;reg : tregister;l : tasmlabel);
       cmp_op : topcmp;a : tcgint;reg : tregister;l : tasmlabel);
       var
       var
-        swapped , test_msb: boolean;
-        tmpreg : tregister;
+        swapped : boolean;
         i : byte;
         i : byte;
       begin
       begin
         if a=0 then
         if a=0 then
@@ -1856,7 +1849,7 @@ unit cgcpu;
     procedure tcgavr.g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister);
     procedure tcgavr.g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister);
       var
       var
         l : TAsmLabel;
         l : TAsmLabel;
-        tmpflags : TResFlags;
+        //tmpflags : TResFlags;
         i: Integer;
         i: Integer;
         hreg: TRegister;
         hreg: TRegister;
       begin
       begin
@@ -1889,8 +1882,8 @@ unit cgcpu;
 
 
 
 
     procedure tcgavr.a_adjust_sp(list : TAsmList; value : longint);
     procedure tcgavr.a_adjust_sp(list : TAsmList; value : longint);
-      var
-        i : integer;
+      {var
+        i : integer; }
       begin
       begin
         case value of
         case value of
           0:
           0:
@@ -2448,7 +2441,7 @@ unit cgcpu;
       var
       var
         countreg,tmpreg,tmpreg2: tregister;
         countreg,tmpreg,tmpreg2: tregister;
         srcref,dstref : treference;
         srcref,dstref : treference;
-        copysize,countregsize : tcgsize;
+        countregsize : tcgsize;
         l : TAsmLabel;
         l : TAsmLabel;
         i : longint;
         i : longint;
         SrcQuickRef, DestQuickRef : Boolean;
         SrcQuickRef, DestQuickRef : Boolean;
@@ -2464,7 +2457,6 @@ unit cgcpu;
             dstref.base:=NR_R26;
             dstref.base:=NR_R26;
             dstref.addressmode:=AM_POSTINCREMENT;
             dstref.addressmode:=AM_POSTINCREMENT;
 
 
-            copysize:=OS_8;
             if len<256 then
             if len<256 then
               countregsize:=OS_8
               countregsize:=OS_8
             else if len<65536 then
             else if len<65536 then

+ 0 - 4
compiler/avr/cpupara.pas

@@ -201,7 +201,6 @@ unit cpupara;
         paracgsize   : tcgsize;
         paracgsize   : tcgsize;
         paralen : longint;
         paralen : longint;
         i : integer;
         i : integer;
-        firstparaloc: boolean;
 
 
       procedure assignintreg;
       procedure assignintreg;
         begin
         begin
@@ -300,7 +299,6 @@ unit cpupara;
              if paralen=0 then
              if paralen=0 then
                internalerror(200410311);
                internalerror(200410311);
 {$endif EXTDEBUG}
 {$endif EXTDEBUG}
-             firstparaloc:=true;
              if loc=LOC_REGISTER then
              if loc=LOC_REGISTER then
                begin
                begin
                  { the lsb is located in the register with the lowest number,
                  { the lsb is located in the register with the lowest number,
@@ -386,7 +384,6 @@ unit cpupara;
                          inc(paraloc^.reference.offset,2);
                          inc(paraloc^.reference.offset,2);
                        end;
                        end;
                    end;
                    end;
-                 firstparaloc:=false;
                end;
                end;
           end;
           end;
         curfloatreg:=nextfloatreg;
         curfloatreg:=nextfloatreg;
@@ -400,7 +397,6 @@ unit cpupara;
       var
       var
         cur_stack_offset: aword;
         cur_stack_offset: aword;
         curintreg, curfloatreg, curmmreg: tsuperregister;
         curintreg, curfloatreg, curmmreg: tsuperregister;
-        retcgsize  : tcgsize;
       begin
       begin
         init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
         init_values(curintreg,curfloatreg,curmmreg,cur_stack_offset);
 
 

+ 2 - 1
compiler/avr/navradd.pas

@@ -33,11 +33,12 @@ interface
        private
        private
          function  GetResFlags(unsigned:Boolean):TResFlags;
          function  GetResFlags(unsigned:Boolean):TResFlags;
        protected
        protected
-         function pass_1 : tnode;override;
          procedure second_cmpordinal;override;
          procedure second_cmpordinal;override;
          procedure second_cmpsmallset;override;
          procedure second_cmpsmallset;override;
          procedure second_cmp64bit;override;
          procedure second_cmp64bit;override;
          procedure second_cmp;
          procedure second_cmp;
+       public
+         function pass_1 : tnode;override;
        end;
        end;
 
 
   implementation
   implementation

+ 1 - 1
compiler/avr/navrmat.pas

@@ -59,7 +59,7 @@ implementation
 
 
     procedure tavrnotnode.second_boolean;
     procedure tavrnotnode.second_boolean;
       var
       var
-        tmpreg,lreg : tregister;
+        tmpreg : tregister;
         i : longint;
         i : longint;
         falselabel,truelabel,skiplabel: TAsmLabel;
         falselabel,truelabel,skiplabel: TAsmLabel;
       begin
       begin

+ 3 - 7
compiler/avr/raavrgas.pas

@@ -326,10 +326,8 @@ Unit raavrgas;
 
 
       var
       var
         tempreg : tregister;
         tempreg : tregister;
-        ireg : tsuperregister;
         hl : tasmlabel;
         hl : tasmlabel;
         ofs : longint;
         ofs : longint;
-        registerset : tcpuregisterset;
         tempstr : string;
         tempstr : string;
         tempsymtyp : tasmsymtype;
         tempsymtyp : tasmsymtype;
       Begin
       Begin
@@ -612,18 +610,16 @@ Unit raavrgas;
 
 
 
 
     function tavrattreader.is_asmopcode(const s: string):boolean;
     function tavrattreader.is_asmopcode(const s: string):boolean;
-
+(*
       const
       const
         { sorted by length so longer postfixes will match first }
         { sorted by length so longer postfixes will match first }
         postfix2strsorted : array[1..19] of string[2] = (
         postfix2strsorted : array[1..19] of string[2] = (
           'EP','SB','BT','SH',
           'EP','SB','BT','SH',
           'IA','IB','DA','DB','FD','FA','ED','EA',
           'IA','IB','DA','DB','FD','FA','ED','EA',
           'B','D','E','P','T','H','S');
           'B','D','E','P','T','H','S');
-
+*)
       var
       var
-        len,
-        j,
-        sufidx : longint;
+        j : longint;
         hs : string;
         hs : string;
         maxlen : longint;
         maxlen : longint;
         icond : tasmcond;
         icond : tasmcond;

+ 3 - 7
compiler/avr/rgcpu.pas

@@ -56,8 +56,8 @@ unit rgcpu;
 
 
 
 
     procedure trgcpu.add_constraints(reg:tregister);
     procedure trgcpu.add_constraints(reg:tregister);
-      var
-        supreg,i : Tsuperregister;
+      {var
+        supreg,i : Tsuperregister;}
       begin
       begin
         case getsubreg(reg) of
         case getsubreg(reg) of
           { Let 64bit floats conflict with all odd float regs }
           { Let 64bit floats conflict with all odd float regs }
@@ -76,8 +76,8 @@ unit rgcpu;
           { Let 64bit ints conflict with all odd int regs }
           { Let 64bit ints conflict with all odd int regs }
           R_SUBQ:
           R_SUBQ:
             begin
             begin
-              supreg:=getsupreg(reg);
               {
               {
+              supreg:=getsupreg(reg);
               i:=RS_G1;
               i:=RS_G1;
               while (i<=RS_I7) do
               while (i<=RS_I7) do
                 begin
                 begin
@@ -95,7 +95,6 @@ unit rgcpu;
         helpins  : tai;
         helpins  : tai;
         tmpref   : treference;
         tmpref   : treference;
         helplist : TAsmList;
         helplist : TAsmList;
-        hreg     : tregister;
       begin
       begin
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
           begin
           begin
@@ -121,7 +120,6 @@ unit rgcpu;
       var
       var
         tmpref   : treference;
         tmpref   : treference;
         helplist : TAsmList;
         helplist : TAsmList;
-        hreg     : tregister;
       begin
       begin
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
         if (abs(spilltemp.offset)>63) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
           begin
           begin
@@ -185,8 +183,6 @@ unit rgcpu;
 
 
 
 
     function trgcpu.do_spill_replace(list:TAsmList;instr:tai_cpu_abstract_sym;orgreg:tsuperregister;const spilltemp:treference):boolean;
     function trgcpu.do_spill_replace(list:TAsmList;instr:tai_cpu_abstract_sym;orgreg:tsuperregister;const spilltemp:treference):boolean;
-      var
-        b : byte;
       begin
       begin
         result:=false;
         result:=false;
         if not(spilltemp.offset in [0..63]) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then
         if not(spilltemp.offset in [0..63]) or (CPUAVR_16_REGS in cpu_capabilities[current_settings.cputype]) then

+ 2 - 1
compiler/cfidwarf.pas

@@ -435,7 +435,8 @@ implementation
                     end
                     end
                   else
                   else
                     begin
                     begin
-                      tc:=tai_const.create_sym(cielabel);
+                      { according to the dwarf (2 to 4) standard, this is an uword being always 32 bit unsigned }
+                      tc:=tai_const.create_type_sym(aitconst_32bit,cielabel);
                       { force label offset to secrel32 for windows systems }
                       { force label offset to secrel32 for windows systems }
                       if (target_info.system in systems_windows+systems_wince) then
                       if (target_info.system in systems_windows+systems_wince) then
                         tc.consttype:=aitconst_secrel32_symbol;
                         tc.consttype:=aitconst_secrel32_symbol;

+ 1 - 1
compiler/dbgcodeview.pas

@@ -124,7 +124,7 @@ interface
         LF_PAD10      = $fa,
         LF_PAD10      = $fa,
         LF_PAD11      = $fb,
         LF_PAD11      = $fb,
         LF_PAD12      = $fc,
         LF_PAD12      = $fc,
-        LF_PAD13      = $fc,
+        LF_PAD13      = $fd,
         LF_PAD14      = $fe,
         LF_PAD14      = $fe,
         LF_PAD15      = $ff,
         LF_PAD15      = $ff,
 
 

+ 1 - 1
compiler/dbgstabs.pas

@@ -571,7 +571,7 @@ implementation
           just associated to pointer types }
           just associated to pointer types }
         use_tag_prefix:=(def.typ in tagtypes) and
         use_tag_prefix:=(def.typ in tagtypes) and
                       ((def.typ<>stringdef) or
                       ((def.typ<>stringdef) or
-                       (tstringdef(tdef).stringtype in [st_shortstring,st_longstring]));
+                       (tstringdef(def).stringtype in [st_shortstring,st_longstring]));
       end;
       end;
 
 
 
 

+ 25 - 0
compiler/fpcdefs.inc

@@ -31,6 +31,31 @@
   {$define USEINLINE}
   {$define USEINLINE}
 {$endif EXTDEBUG}
 {$endif EXTDEBUG}
 
 
+{$ifdef DEBUG_ALL_OPT}
+  { for aopt unit }
+  {$define DEBUG_OPTALLOC}
+  {$define DEBUG_INSTRUCTIONREGISTERDEPENDENCIES}
+  {for CPU/aoptcpu unit }
+  {$define DEBUG_AOPTCPU}
+  {$define DEBUG_PREREGSCHEDULER (arm specific) }
+  { for aoptobj unit }
+  {$define DEBUG_AOPTOBJ}
+  {$define ALLOCREGDEBUG}
+  { for optconstprop unit }
+  {$define DEBUG_CONSTPROP}
+  { for optcse unit }
+  {$define CSEDEBUG}
+  { for optdeadstore unit }
+  {$define DEBUG_DEADSTORE}
+  { for optdfa unit }
+  {$define DEBUG_DFA}
+  { for optloop unit }
+  {$define DEBUG_OPTFORLOOP}
+  {$define DEBUG_OPTSTRENGTH}
+  { for optvirt unit }
+  {$define DEBUG_DEVIRT}
+{$endif}
+
 {$define USEEXCEPT}
 {$define USEEXCEPT}
 
 
 {$ifdef VER3_0}
 {$ifdef VER3_0}

+ 3 - 1
compiler/globtype.pas

@@ -233,7 +233,9 @@ interface
          cs_assemble_on_target,
          cs_assemble_on_target,
          { use a memory model which allows large data structures, e.g. > 2 GB static data on x86-64 targets
          { use a memory model which allows large data structures, e.g. > 2 GB static data on x86-64 targets
            this not supported on all OSes }
            this not supported on all OSes }
-         cs_large
+         cs_large,
+         { if applicable, the compiler generates an executable in uf2 format }
+         cs_generate_uf2
        );
        );
        tglobalswitches = set of tglobalswitch;
        tglobalswitches = set of tglobalswitch;
 
 

+ 13 - 6
compiler/hlcgobj.pas

@@ -4901,6 +4901,7 @@ implementation
   procedure thlcgobj.initialize_regvars(p: TObject; arg: pointer);
   procedure thlcgobj.initialize_regvars(p: TObject; arg: pointer);
     var
     var
       href : treference;
       href : treference;
+      mmreg : tregister;
     begin
     begin
       if (tsym(p).typ=staticvarsym) and not(tstaticvarsym(p).noregvarinitneeded) then
       if (tsym(p).typ=staticvarsym) and not(tstaticvarsym(p).noregvarinitneeded) then
        begin
        begin
@@ -4922,12 +4923,18 @@ implementation
                      tstaticvarsym(p).initialloc.register);
                      tstaticvarsym(p).initialloc.register);
              end;
              end;
            LOC_CMMREGISTER :
            LOC_CMMREGISTER :
-             { clear the whole register }
-             a_opmm_reg_reg(TAsmList(arg),OP_XOR,tstaticvarsym(p).vardef,
-               { as we pass shuffle=nil, we have to pass a full register }
-               newreg(R_MMREGISTER,getsupreg(tstaticvarsym(p).initialloc.register),R_SUBMMWHOLE),
-               newreg(R_MMREGISTER,getsupreg(tstaticvarsym(p).initialloc.register),R_SUBMMWHOLE),
-               nil);
+             begin
+{$ifdef ARM}
+               { Do not pass d0 (which uses f0 and f1) for arm single type variable }
+               mmreg:=tstaticvarsym(p).initialloc.register;
+{$else}
+               { clear the whole register }
+               mmreg:=newreg(R_MMREGISTER,getsupreg(tstaticvarsym(p).initialloc.register),R_SUBMMWHOLE);
+{$endif}             
+               a_opmm_reg_reg(TAsmList(arg),OP_XOR,tstaticvarsym(p).vardef, mmreg, mmreg,
+                 { as we pass shuffle=nil, we have to pass a full register }
+                 nil);
+             end;
            LOC_CFPUREGISTER :
            LOC_CFPUREGISTER :
              begin
              begin
                { initialize fpu regvar by loading from memory }
                { initialize fpu regvar by loading from memory }

+ 2 - 0
compiler/i386/aoptcpu.pas

@@ -137,6 +137,8 @@ unit aoptcpu;
               if InsContainsSegRef(taicpu(p)) then
               if InsContainsSegRef(taicpu(p)) then
                 exit;
                 exit;
               case taicpu(p).opcode Of
               case taicpu(p).opcode Of
+                A_ADD:
+                  Result:=OptPass1ADD(p);
                 A_AND:
                 A_AND:
                   Result:=OptPass1And(p);
                   Result:=OptPass1And(p);
                 A_IMUL:
                 A_IMUL:

+ 0 - 3
compiler/i8086/cpupara.pas

@@ -101,8 +101,6 @@ unit cpupara;
 
 
 
 
     function tcpuparamanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean;
     function tcpuparamanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean;
-      var
-        size: longint;
       begin
       begin
         if handle_common_ret_in_param(def,pd,result) then
         if handle_common_ret_in_param(def,pd,result) then
           exit;
           exit;
@@ -307,7 +305,6 @@ unit cpupara;
       var
       var
         retcgsize  : tcgsize;
         retcgsize  : tcgsize;
         paraloc : pcgparalocation;
         paraloc : pcgparalocation;
-        sym: tfieldvarsym;
         usedef: tdef;
         usedef: tdef;
         handled: boolean;
         handled: boolean;
       begin
       begin

+ 1 - 1
compiler/i8086/n8086mem.pas

@@ -36,9 +36,9 @@ interface
         protected
         protected
          procedure set_labelsym_resultdef; override;
          procedure set_labelsym_resultdef; override;
          procedure set_absvarsym_resultdef; override;
          procedure set_absvarsym_resultdef; override;
-         procedure pass_generate_code;override;
         public
         public
          get_offset_only: boolean;
          get_offset_only: boolean;
+         procedure pass_generate_code;override;
        end;
        end;
 
 
        ti8086derefnode = class(tx86derefnode)
        ti8086derefnode = class(tx86derefnode)

+ 0 - 1
compiler/i8086/n8086tcon.pas

@@ -57,7 +57,6 @@ uses
         hp: tnode;
         hp: tnode;
         srsym: tsym;
         srsym: tsym;
         pd: tprocdef;
         pd: tprocdef;
-        resourcestrrec: trecorddef;
       begin
       begin
         { support word/smallint constants, initialized with Seg() }
         { support word/smallint constants, initialized with Seg() }
         if (def.ordtype in [u16bit,s16bit]) and (node.nodetype=inlinen) and
         if (def.ordtype in [u16bit,s16bit]) and (node.nodetype=inlinen) and

+ 1 - 0
compiler/i8086/symcpu.pas

@@ -130,6 +130,7 @@ type
       - it has no 'near' or 'far' specifiers
       - it has no 'near' or 'far' specifiers
       - it is compiled in a $F- state }
       - it is compiled in a $F- state }
     function default_far:boolean;
     function default_far:boolean;
+   protected
     procedure Setinterfacedef(AValue: boolean);override;
     procedure Setinterfacedef(AValue: boolean);override;
    public
    public
     constructor create(level:byte;doregister:boolean);override;
     constructor create(level:byte;doregister:boolean);override;

+ 0 - 3
compiler/jvm/agjasmin.pas

@@ -1126,9 +1126,6 @@ implementation
 
 
 
 
     function getopstr(const o:toper) : ansistring;
     function getopstr(const o:toper) : ansistring;
-      var
-        d: double;
-        s: single;
       begin
       begin
         case o.typ of
         case o.typ of
           top_reg:
           top_reg:

+ 2 - 2
compiler/jvm/cpubase.pas

@@ -302,11 +302,11 @@ uses
       regnumber_index : array[tregisterindex] of tregisterindex = (
       regnumber_index : array[tregisterindex] of tregisterindex = (
         {$i rjvmrni.inc}
         {$i rjvmrni.inc}
       );
       );
-
+(*
       std_regname_index : array[tregisterindex] of tregisterindex = (
       std_regname_index : array[tregisterindex] of tregisterindex = (
         {$i rjvmsri.inc}
         {$i rjvmsri.inc}
       );
       );
-
+*)
     function reg_cgsize(const reg: tregister): tcgsize;
     function reg_cgsize(const reg: tregister): tcgsize;
       begin
       begin
         result:=OS_NO;
         result:=OS_NO;

+ 0 - 2
compiler/jvm/dbgjasm.pas

@@ -105,7 +105,6 @@ implementation
       afterprocstartlabel : tasmlabel;
       afterprocstartlabel : tasmlabel;
       hp,
       hp,
       afterproccodestart  : tai;
       afterproccodestart  : tai;
-      instrcount          : longint;
     begin
     begin
       { insert debug information for local variables and parameters, but only
       { insert debug information for local variables and parameters, but only
         for routines implemented in the Pascal code }
         for routines implemented in the Pascal code }
@@ -121,7 +120,6 @@ implementation
       { set the start label for local variables after the first instruction,
       { set the start label for local variables after the first instruction,
         because javac's code completion support assumes that all info at
         because javac's code completion support assumes that all info at
         bytecode position 0 is for parameters }
         bytecode position 0 is for parameters }
-      instrcount:=0;
       afterproccodestart:=def.procstarttai;
       afterproccodestart:=def.procstarttai;
       while assigned(afterproccodestart.next) do
       while assigned(afterproccodestart.next) do
         begin
         begin

+ 2 - 2
compiler/jvm/hlcgcpu.pas

@@ -188,6 +188,8 @@ uses
       procedure gen_initialize_fields_code(list:TAsmList);
       procedure gen_initialize_fields_code(list:TAsmList);
 
 
       procedure gen_typecheck(list: TAsmList; checkop: tasmop; checkdef: tdef);
       procedure gen_typecheck(list: TAsmList; checkop: tasmop; checkdef: tdef);
+
+      procedure g_copyvalueparas(p: TObject; arg: pointer); override;
      protected
      protected
       procedure a_load_const_stack_intern(list : TAsmList;size : tdef;a : tcgint; typ: TRegisterType; legalize_const: boolean);
       procedure a_load_const_stack_intern(list : TAsmList;size : tdef;a : tcgint; typ: TRegisterType; legalize_const: boolean);
 
 
@@ -198,8 +200,6 @@ uses
       procedure allocate_implicit_struct_with_base_ref(list: TAsmList; vs: tabstractvarsym; ref: treference);
       procedure allocate_implicit_struct_with_base_ref(list: TAsmList; vs: tabstractvarsym; ref: treference);
       procedure gen_load_uninitialized_function_result(list: TAsmList; pd: tprocdef; resdef: tdef; const resloc: tcgpara); override;
       procedure gen_load_uninitialized_function_result(list: TAsmList; pd: tprocdef; resdef: tdef; const resloc: tcgpara); override;
 
 
-      procedure g_copyvalueparas(p: TObject; arg: pointer); override;
-
       procedure inittempvariables(list:TAsmList);override;
       procedure inittempvariables(list:TAsmList);override;
 
 
       function g_call_system_proc_intern(list: TAsmList; pd: tprocdef; const paras: array of pcgpara; forceresdef: tdef): tcgpara; override;
       function g_call_system_proc_intern(list: TAsmList; pd: tprocdef; const paras: array of pcgpara; forceresdef: tdef): tcgpara; override;

+ 1 - 2
compiler/jvm/njvminl.pas

@@ -161,7 +161,7 @@ implementation
     function tjvminlinenode.first_copy: tnode;
     function tjvminlinenode.first_copy: tnode;
       var
       var
         ppn: tcallparanode;
         ppn: tcallparanode;
-        arr, len, start, kind: tnode;
+        arr, len, start: tnode;
         eledef: tdef;
         eledef: tdef;
         counter, ndims: longint;
         counter, ndims: longint;
         finaltype: char;
         finaltype: char;
@@ -401,7 +401,6 @@ implementation
         lefttemp: ttempcreatenode;
         lefttemp: ttempcreatenode;
         newblock: tblocknode;
         newblock: tblocknode;
         newstatement: tstatementnode;
         newstatement: tstatementnode;
-        primitive: boolean;
       begin
       begin
         { first parameter is the array, the rest are the dimensions }
         { first parameter is the array, the rest are the dimensions }
         newparas:=tcallparanode(left).right;
         newparas:=tcallparanode(left).right;

+ 0 - 1
compiler/jvm/njvmmat.pas

@@ -78,7 +78,6 @@ implementation
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
         lab: tasmlabel;
         lab: tasmlabel;
-        ovloc: tlocation;
         op: topcg;
         op: topcg;
         isu32int: boolean;
         isu32int: boolean;
       begin
       begin

+ 0 - 3
compiler/jvm/njvmmem.pas

@@ -179,10 +179,7 @@ implementation
 
 
 
 
     function tjvmaddrnode.isdererence: boolean;
     function tjvmaddrnode.isdererence: boolean;
-      var
-        target: tnode;
       begin
       begin
-        target:=actualtargetnode(@left)^;
         result:=
         result:=
           (left.nodetype=derefn);
           (left.nodetype=derefn);
       end;
       end;

+ 24 - 20
compiler/m68k/aoptcpu.pas

@@ -253,26 +253,30 @@ unit aoptcpu;
               opstr:=opname(p);
               opstr:=opname(p);
               case taicpu(p).oper[0]^.typ of
               case taicpu(p).oper[0]^.typ of
                 top_reg:
                 top_reg:
-                  begin
-                    {  move %reg0, %tmpreg; move %tmpreg, <ea> -> move %reg0, <ea> }
-                    taicpu(p).loadOper(1,taicpu(next).oper[1]^);
-                    asml.remove(next);
-                    next.free;
-                    result:=true;
-                    { also remove leftover move %reg0, %reg0, which can occur as the result
-                      of the previous optimization, if %reg0 and %tmpreg was different types
-                      (addr vs. data), so these moves were left in by the cg }
-                    if MatchOperand(taicpu(p).oper[0]^,taicpu(p).oper[1]^) then
-                      begin
-                        DebugMsg('Optimizer: '+opstr+' + '+opstr+' removed',p);
-                        GetNextInstruction(p,next);
-                        asml.remove(p);
-                        p.free;
-                        p:=next;
-                      end
-                    else
-                      DebugMsg('Optimizer: '+opstr+' + '+opstr+' to '+opstr+' #1',p)
-                  end;
+                  { do not optimize away FPU to INT to FPU reg moves. These are used for 
+                    to-single-rounding on FPUs which have no FSMOVE/FDMOVE. (KB) }
+                  if not ((taicpu(p).opcode = A_FMOVE) and
+                    (getregtype(taicpu(p).oper[0]^.reg) <> getregtype(taicpu(p).oper[1]^.reg))) then
+                    begin
+                      {  move %reg0, %tmpreg; move %tmpreg, <ea> -> move %reg0, <ea> }
+                      taicpu(p).loadOper(1,taicpu(next).oper[1]^);
+                      asml.remove(next);
+                      next.free;
+                      result:=true;
+                      { also remove leftover move %reg0, %reg0, which can occur as the result
+                        of the previous optimization, if %reg0 and %tmpreg was different types
+                        (addr vs. data), so these moves were left in by the cg }
+                      if MatchOperand(taicpu(p).oper[0]^,taicpu(p).oper[1]^) then
+                        begin
+                          DebugMsg('Optimizer: '+opstr+' + '+opstr+' removed',p);
+                          GetNextInstruction(p,next);
+                          asml.remove(p);
+                          p.free;
+                          p:=next;
+                        end
+                      else
+                        DebugMsg('Optimizer: '+opstr+' + '+opstr+' to '+opstr+' #1',p)
+                    end;
                 top_const:
                 top_const:
                   begin
                   begin
                     // DebugMsg('Optimizer: '+opstr+' + '+opstr+' to '+opstr+' #2',p);
                     // DebugMsg('Optimizer: '+opstr+' + '+opstr+' to '+opstr+' #2',p);

+ 35 - 3
compiler/m68k/cgcpu.pas

@@ -1051,10 +1051,40 @@ unit cgcpu;
     procedure tcg68k.a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister);
     procedure tcg68k.a_loadfpu_reg_reg(list: TAsmList; fromsize, tosize: tcgsize; reg1, reg2: tregister);
       var
       var
         instr : taicpu;
         instr : taicpu;
+        op: tasmop;
+        href: treference;
+        hreg: tregister;
       begin
       begin
-        instr:=taicpu.op_reg_reg(A_FMOVE,fpuregopsize,reg1,reg2);
-        add_move_instruction(instr);
-        list.concat(instr);
+        if fromsize > tosize then
+          begin
+            { we have to do a load-store through an intregister or the stack in this case,
+              which is probably the fastest way, and simpler than messing around with FPU control
+              words for one-off custom rounding (KB) }
+            case tosize of
+              OS_F32:
+                  begin
+                    //list.concat(tai_comment.create(strpnew('a_loadfpu_reg_reg rounding via intreg')));
+                    hreg := getintregister(list,OS_32);
+                    list.concat(taicpu.op_reg_reg(A_FMOVE, tcgsize2opsize[tosize], reg1, hreg));
+                    list.concat(taicpu.op_reg_reg(A_FMOVE, tcgsize2opsize[tosize], hreg, reg2));
+                  end;
+            else
+              begin
+                //list.concat(tai_comment.create(strpnew('a_loadfpu_reg_reg rounding via stack')));
+                reference_reset_base(href, NR_STACK_POINTER_REG, 0, ctempposinvalid, 0, []);
+                href.direction:=dir_dec;
+                list.concat(taicpu.op_reg_ref(A_FMOVE, tcgsize2opsize[tosize], reg1, href));
+                href.direction:=dir_inc;
+                list.concat(taicpu.op_ref_reg(A_FMOVE, tcgsize2opsize[tosize], href, reg2));
+              end;
+            end;
+          end
+        else
+          begin
+            instr:=taicpu.op_reg_reg(A_FMOVE,fpuregopsize,reg1,reg2);
+            add_move_instruction(instr);
+            list.concat(instr);
+          end;
       end;
       end;
 
 
 
 
@@ -1067,6 +1097,8 @@ unit cgcpu;
         href := ref;
         href := ref;
         fixref(list,href,current_settings.fputype = fpu_coldfire);
         fixref(list,href,current_settings.fputype = fpu_coldfire);
         list.concat(taicpu.op_ref_reg(A_FMOVE,opsize,href,reg));
         list.concat(taicpu.op_ref_reg(A_FMOVE,opsize,href,reg));
+        if fromsize > tosize then
+          a_load_reg_reg(list,fromsize,tosize,reg,reg);
       end;
       end;
 
 
     procedure tcg68k.a_loadfpu_reg_ref(list: TAsmList; fromsize,tosize: tcgsize; reg: tregister; const ref: treference);
     procedure tcg68k.a_loadfpu_reg_ref(list: TAsmList; fromsize,tosize: tcgsize; reg: tregister; const ref: treference);

+ 2 - 2
compiler/msg/errorct.msg

@@ -1,6 +1,6 @@
 #
 #
 #   This file is part of the Free Pascal Compiler
 #   This file is part of the Free Pascal Compiler
-#   Copyright (c) 1993-2020 by the Free Pascal Development team
+#   Copyright (c) 1993-2021 by the Free Pascal Development team
 #
 #
 #   Catalan Language File for Free Pascal
 #   Catalan Language File for Free Pascal
 #
 #
@@ -2103,7 +2103,7 @@ option_code_page_not_available=11039_E_La p
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler versió $FPCFULLVERSION [$FPCDATE] per $FPCCPU
 Free Pascal Compiler versió $FPCFULLVERSION [$FPCDATE] per $FPCCPU
-Copyright (c) 1993-2020 per Florian Klaempfl and others
+Copyright (c) 1993-2021 per Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 3 - 3
compiler/msg/errord.msg

@@ -6,7 +6,7 @@
 #   Based on errore.msg of SVN revision 45316
 #   Based on errore.msg of SVN revision 45316
 #
 #
 #   This file is part of the Free Pascal Compiler
 #   This file is part of the Free Pascal Compiler
-#   Copyright (c) 1998-2020 by the Free Pascal Development team
+#   Copyright (c) 1998-2021 by the Free Pascal Development team
 #
 #
 #   See the file COPYING.v2, included in this distribution,
 #   See the file COPYING.v2, included in this distribution,
 #   for details about the copyright.
 #   for details about the copyright.
@@ -3585,7 +3585,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Ung
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_Sie m�ssen beim Ziel EABIHF ABI einen der FPU Typen VFPV2, VFPV3 oder VFPV3_D16 verwenden
+option_illegal_fpu_eabihf=11052_E_Sie m�ssen beim Ziel EABIHF ABI einen der VFP FPU-Typen verwenden
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_Das ausgew„hlte Debugformat wird auf dem aktuellen Ziel nicht unterst�tzt. Die aktuelle Einstellung wird beibehalten
 option_w_unsupported_debug_format=11053_W_Das ausgew„hlte Debugformat wird auf dem aktuellen Ziel nicht unterst�tzt. Die aktuelle Einstellung wird beibehalten
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3784,7 +3784,7 @@ package_u_ppl_filename=13029_U_PPL Dateiname $1
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] f�r $FPCTARGET
 Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] f�r $FPCTARGET
-Copyright (c) 1993-2020 Florian Kl„mpfl und andere
+Copyright (c) 1993-2021 Florian Kl„mpfl und andere
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorda.msg

@@ -3438,7 +3438,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3535,7 +3535,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] til $FPCTARGET
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] til $FPCTARGET
-Copyright (c) 1993-2020 Florian Klaempfl and others
+Copyright (c) 1993-2021 Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 3 - 3
compiler/msg/errordu.msg

@@ -6,7 +6,7 @@
 #   Based on errore.msg of SVN revision 45316
 #   Based on errore.msg of SVN revision 45316
 #
 #
 #   This file is part of the Free Pascal Compiler
 #   This file is part of the Free Pascal Compiler
-#   Copyright (c) 1998-2020 by the Free Pascal Development team
+#   Copyright (c) 1998-2021 by the Free Pascal Development team
 #
 #
 #   See the file COPYING.v2, included in this distribution,
 #   See the file COPYING.v2, included in this distribution,
 #   for details about the copyright.
 #   for details about the copyright.
@@ -3585,7 +3585,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Ungültiger Wert für die Umge
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_Sie müssen beim Ziel EABIHF ABI einen der FPU Typen VFPV2, VFPV3 oder VFPV3_D16 verwenden
+option_illegal_fpu_eabihf=11052_E_Sie müssen beim Ziel EABIHF ABI einen der VFP FPU-Typen verwenden
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_Das ausgewählte Debugformat wird auf dem aktuellen Ziel nicht unterstützt. Die aktuelle Einstellung wird beibehalten
 option_w_unsupported_debug_format=11053_W_Das ausgewählte Debugformat wird auf dem aktuellen Ziel nicht unterstützt. Die aktuelle Einstellung wird beibehalten
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3784,7 +3784,7 @@ package_u_ppl_filename=13029_U_PPL Dateiname $1
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] für $FPCTARGET
 Free Pascal Compiler Version $FPCFULLVERSION [$FPCDATE] für $FPCTARGET
-Copyright (c) 1993-2020 Florian Klämpfl und andere
+Copyright (c) 1993-2021 Florian Klämpfl und andere
 ]
 ]
 
 
 #
 #

+ 6 - 3
compiler/msg/errore.msg

@@ -1555,7 +1555,7 @@ parser_w_ptr_type_ignored=03338_W_Pointer type "$1" ignored
 % The specified pointer type modifier is ignored, because it is not supported on
 % The specified pointer type modifier is ignored, because it is not supported on
 % the current platform. This happens, for example, when a far pointer is
 % the current platform. This happens, for example, when a far pointer is
 % declared on a non-x86 platform.
 % declared on a non-x86 platform.
-parser_e_global_generic_references_static=03339_E_Global Generic template references static symtable
+parser_e_global_generic_references_static=03339_E_Generic template in interface section references symbol in implementation section
 % A generic declared in the interface section of a unit must not reference symbols that belong
 % A generic declared in the interface section of a unit must not reference symbols that belong
 % solely to the implementation section of that unit.
 % solely to the implementation section of that unit.
 parser_u_already_compiled=03340_UL_Unit $1 has been already compiled meanwhile.
 parser_u_already_compiled=03340_UL_Unit $1 has been already compiled meanwhile.
@@ -1622,6 +1622,8 @@ parser_e_location_regpair_only_data=03358_E_Only data registers are supported fo
 % AmigaOS/MorphOS syscall specific: for 64bit register pairs, only data registers are supported
 % AmigaOS/MorphOS syscall specific: for 64bit register pairs, only data registers are supported
 parser_e_location_regpair_only_consecutive=03359_E_Only consecutive registers are supported for explicit location register pairs
 parser_e_location_regpair_only_consecutive=03359_E_Only consecutive registers are supported for explicit location register pairs
 % MorphOS syscall specific: only consecutive (f.e.: d1-d2) registers are supported for 64bit register pairs
 % MorphOS syscall specific: only consecutive (f.e.: d1-d2) registers are supported for 64bit register pairs
+parser_e_constructurs_cannot_take_type_parameters=03360_E_Constructors cannot take type parameters
+% The use of type parameters in constructors is not allowed.
 %
 %
 % \end{description}
 % \end{description}
 %
 %
@@ -3556,7 +3558,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3755,7 +3757,7 @@ package_u_ppl_filename=13029_U_PPL filename $1
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #
@@ -4348,6 +4350,7 @@ F*2Xp<x>_First search for the compiler binary in the directory <x>
 **2Xs_Strip all symbols from executable
 **2Xs_Strip all symbols from executable
 **2XS_Try to link units statically (default, defines FPC_LINK_STATIC)
 **2XS_Try to link units statically (default, defines FPC_LINK_STATIC)
 **2Xt_Link with static libraries (-static is passed to linker)
 **2Xt_Link with static libraries (-static is passed to linker)
+**2Xu_Generate executable in UF2 format  (embedded targets only)
 **2Xv_Generate table for Virtual Entry calls
 **2Xv_Generate table for Virtual Entry calls
 **2XV_Use VLink as external linker       (default on Amiga, MorphOS)
 **2XV_Use VLink as external linker       (default on Amiga, MorphOS)
 **2XX_Try to smartlink units             (defines FPC_LINK_SMART)
 **2XX_Try to smartlink units             (defines FPC_LINK_SMART)

+ 2 - 2
compiler/msg/errores.msg

@@ -3380,7 +3380,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3477,7 +3477,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 1 - 1
compiler/msg/errorf.msg

@@ -1715,7 +1715,7 @@ option_asm_forced=11022_W_"$1" assembler use forced
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Compilateur Free Pascal version $FPCFULLVERSION [$FPCDATE] pour $FPCTARGET
 Compilateur Free Pascal version $FPCFULLVERSION [$FPCDATE] pour $FPCTARGET
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorfi.msg

@@ -3403,7 +3403,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3499,7 +3499,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 # Logo (option -l)
 # Logo (option -l)
 #
 #
 option_logo=11023_[ Compilateur Free Pascal version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
 option_logo=11023_[ Compilateur Free Pascal version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2020, Florian Klaempfl and others]
+Copyright (c) 1993-2021, Florian Klaempfl and others]
 #
 #
 # Info (option -i)
 # Info (option -i)
 #
 #

+ 1 - 1
compiler/msg/errorhe.msg

@@ -2407,7 +2407,7 @@ option_confict_asm_debug=11041_W_
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorheu.msg

@@ -3399,7 +3399,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3496,7 +3496,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorid.msg

@@ -3407,7 +3407,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3504,7 +3504,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler versi $FPCFULLVERSION [$FPCDATE] untuk $FPCCPU
 Free Pascal Compiler versi $FPCFULLVERSION [$FPCDATE] untuk $FPCCPU
-Hak Cipta (c) 1993-2020 oleh Florian Klaempfl and others
+Hak Cipta (c) 1993-2021 oleh Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 1 - 1
compiler/msg/erroriu.msg

@@ -2693,7 +2693,7 @@ wpo_cant_create_feedback_file=12019_E_Impossibile creare il file di feedback "$1
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Compilatore Free Pascal, versione $FPCFULLVERSION [$FPCDATE] per $FPCCPU
 Compilatore Free Pascal, versione $FPCFULLVERSION [$FPCDATE] per $FPCCPU
-Copyright (c) 1993-2020 di Florian Klaempfl and others
+Copyright (c) 1993-2021 di Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorn.msg

@@ -3388,7 +3388,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3485,7 +3485,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler versie $FPCFULLVERSION [$FPCDATE] voor $FPCTARGET
 Free Pascal Compiler versie $FPCFULLVERSION [$FPCDATE] voor $FPCTARGET
-Copyright (c) 1993-2020 door Florian Klaempfl en anderen
+Copyright (c) 1993-2021 door Florian Klaempfl en anderen
 ]
 ]
 #
 #
 # Info (option -i)
 # Info (option -i)

+ 1 - 1
compiler/msg/errorpl.msg

@@ -2119,7 +2119,7 @@ option_code_page_not_available=11039_E_Nieznana strona kodowa
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler wersja $FPCFULLVERSION [$FPCDATE] dla $FPCCPU
 Free Pascal Compiler wersja $FPCFULLVERSION [$FPCDATE] dla $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 1 - 1
compiler/msg/errorpli.msg

@@ -2119,7 +2119,7 @@ option_code_page_not_available=11039_E_Nieznana strona kodowa
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler wersja $FPCFULLVERSION [$FPCDATE] dla $FPCCPU
 Free Pascal Compiler wersja $FPCFULLVERSION [$FPCDATE] dla $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 1 - 1
compiler/msg/errorpt.msg

@@ -3086,7 +3086,7 @@ wpo_cant_create_feedback_file=12019_E_Imposs
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Compilador Free Pascal versÆo $FPCFULLVERSION [$FPCDATE] para $FPCCPU
 Compilador Free Pascal versÆo $FPCFULLVERSION [$FPCDATE] para $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorptu.msg

@@ -3417,7 +3417,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3514,7 +3514,7 @@ wpo_cant_create_feedback_file=12019_E_Impossível criar arquivo retorno otimiza
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Compilador Free Pascal versão $FPCFULLVERSION [$FPCDATE] para $FPCCPU
 Compilador Free Pascal versão $FPCFULLVERSION [$FPCDATE] para $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 1 - 1
compiler/msg/errorr.msg

@@ -2506,7 +2506,7 @@ wpo_cant_create_feedback_file=12019_E_
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Š®¬¯¨«ïâ®à Free Pascal ¢¥àᨨ $FPCFULLVERSION [$FPCDATE] ¤«ï $FPCCPU
 Š®¬¯¨«ïâ®à Free Pascal ¢¥àᨨ $FPCFULLVERSION [$FPCDATE] ¤«ï $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorru.msg

@@ -3292,7 +3292,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3387,7 +3387,7 @@ wpo_cant_create_feedback_file=12019_E_Невозможно создать фай
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Компилятор Free Pascal версии $FPCFULLVERSION [$FPCDATE] для $FPCCPU
 Компилятор Free Pascal версии $FPCFULLVERSION [$FPCDATE] для $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 2 - 2
compiler/msg/errorues.msg

@@ -3374,7 +3374,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -3471,7 +3471,7 @@ wpo_cant_create_feedback_file=12019_E_Cannot create specified whole program opti
 #
 #
 option_logo=11023_[
 option_logo=11023_[
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
 Free Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $FPCCPU
-Copyright (c) 1993-2020 by Florian Klaempfl and others
+Copyright (c) 1993-2021 by Florian Klaempfl and others
 ]
 ]
 
 
 #
 #

+ 3 - 2
compiler/msgidx.inc

@@ -471,6 +471,7 @@ const
   parser_e_location_size_too_large=03357;
   parser_e_location_size_too_large=03357;
   parser_e_location_regpair_only_data=03358;
   parser_e_location_regpair_only_data=03358;
   parser_e_location_regpair_only_consecutive=03359;
   parser_e_location_regpair_only_consecutive=03359;
+  parser_e_constructurs_cannot_take_type_parameters=03360;
   type_e_mismatch=04000;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
   type_e_not_equal_types=04002;
@@ -1136,9 +1137,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 86940;
+  MsgTxtSize = 87070;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
-    28,107,360,130,99,63,146,36,223,68,
+    28,107,361,130,99,63,146,36,223,68,
     63,20,30,1,1,1,1,1,1,1
     63,20,30,1,1,1,1,1,1,1
   );
   );

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 410 - 407
compiler/msgtxt.inc


+ 1 - 2
compiler/nadd.pas

@@ -575,7 +575,7 @@ implementation
 
 
 
 
       var
       var
-        t,vl,hp,lefttarget,righttarget, hp2: tnode;
+        t,vl,lefttarget,righttarget: tnode;
         lt,rt   : tnodetype;
         lt,rt   : tnodetype;
         hdef,
         hdef,
         rd,ld   , inttype: tdef;
         rd,ld   , inttype: tdef;
@@ -3823,7 +3823,6 @@ implementation
     function taddnode.first_add64bitint: tnode;
     function taddnode.first_add64bitint: tnode;
       var
       var
         procname: string[31];
         procname: string[31];
-        temp: tnode;
         power: longint;
         power: longint;
       begin
       begin
         result := nil;
         result := nil;

+ 3 - 1
compiler/nbas.pas

@@ -706,8 +706,10 @@ implementation
 
 
 
 
     function tblocknode.simplify(forinline : boolean): tnode;
     function tblocknode.simplify(forinline : boolean): tnode;
+{$ifdef break_inlining}
       var
       var
         a : array[0..3] of tstatementnode;
         a : array[0..3] of tstatementnode;
+{$endif break_inlining}
       begin
       begin
         result := nil;
         result := nil;
         { Warning: never replace a blocknode with another node type,
         { Warning: never replace a blocknode with another node type,
@@ -1023,8 +1025,8 @@ implementation
                   if segment <> NR_NO then
                   if segment <> NR_NO then
                     Result := gas_regname(segment) + ':'
                     Result := gas_regname(segment) + ':'
                   else
                   else
-                    Result := '';
 {$endif defined(x86)}
 {$endif defined(x86)}
+                    Result := '';
 
 
                   if Assigned(symbol) then
                   if Assigned(symbol) then
                     begin
                     begin

+ 3 - 0
compiler/ncal.pas

@@ -928,7 +928,10 @@ implementation
                   reused above) }
                   reused above) }
                 left:=ctemprefnode.create(paratemp);
                 left:=ctemprefnode.create(paratemp);
               end;
               end;
+            { add the finish statements to the call cleanup block }
             addstatement(finistat,ctempdeletenode.create(paratemp));
             addstatement(finistat,ctempdeletenode.create(paratemp));
+            aktcallnode.add_done_statement(finiblock);
+
             firstpass(fparainit);
             firstpass(fparainit);
             firstpass(left);
             firstpass(left);
           end;
           end;

+ 0 - 1
compiler/ncginl.pas

@@ -406,7 +406,6 @@ implementation
          hregisterhi,
          hregisterhi,
 {$endif not cpu64bitalu and not cpuhighleveltarget}
 {$endif not cpu64bitalu and not cpuhighleveltarget}
          hregister : tregister;
          hregister : tregister;
-         hloc: tlocation;
         begin
         begin
           { set defaults }
           { set defaults }
           addconstant:=true;
           addconstant:=true;

+ 1 - 1
compiler/ncgvmt.pas

@@ -708,7 +708,7 @@ implementation
         while realintfdef.is_unique_objpasdef do
         while realintfdef.is_unique_objpasdef do
           realintfdef:=realintfdef.childof;
           realintfdef:=realintfdef.childof;
 
 
-        tmpstr:=_class.objname^+'_$_'+realintfdef.objname^+'_$_'+tostr(i)+'_$_'+pd.mangledname;
+        tmpstr:=_class.objname^+'_$_'+make_mangledname('',realintfdef.owner,'')+'_$$_'+realintfdef.objname^+'_$_'+tostr(i)+'_$_'+pd.mangledname;
         if length(tmpstr)>100 then
         if length(tmpstr)>100 then
           begin
           begin
             crc:=0;
             crc:=0;

+ 5 - 5
compiler/ncnv.pas

@@ -2947,7 +2947,7 @@ implementation
               end;
               end;
             notn:
             notn:
               result:=docheckremoveinttypeconvs(tunarynode(n).left);
               result:=docheckremoveinttypeconvs(tunarynode(n).left);
-            addn,muln,divn,modn,andn:
+            addn,muln,divn,modn,andn,shln:
               begin
               begin
                 if n.nodetype in [divn,modn] then
                 if n.nodetype in [divn,modn] then
                   gotdivmod:=true;
                   gotdivmod:=true;
@@ -2986,7 +2986,7 @@ implementation
         tempnode: ttempcreatenode;
         tempnode: ttempcreatenode;
       begin
       begin
         case n.nodetype of
         case n.nodetype of
-          subn,addn,muln,divn,modn,xorn,andn,orn:
+          subn,addn,muln,divn,modn,xorn,andn,orn,shln:
             begin
             begin
               exclude(n.flags,nf_internal);
               exclude(n.flags,nf_internal);
               if not forceunsigned and
               if not forceunsigned and
@@ -3341,20 +3341,20 @@ implementation
                     to 64 bit                                               }
                     to 64 bit                                               }
                   if (resultdef.size <= 4) and
                   if (resultdef.size <= 4) and
                     is_64bitint(left.resultdef) and
                     is_64bitint(left.resultdef) and
-                    (left.nodetype in [subn,addn,muln,divn,modn,xorn,andn,orn,notn,unaryminusn]) and
+                    (left.nodetype in [subn,addn,muln,divn,modn,xorn,andn,orn,notn,unaryminusn,shln]) and
                     checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit,s16bit,u16bit,s32bit,u32bit],int64(low(longint)),high(cardinal)) then
                     checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit,s16bit,u16bit,s32bit,u32bit],int64(low(longint)),high(cardinal)) then
                     doremoveinttypeconvs(left,generrordef,not foundsint,s32inttype,u32inttype);
                     doremoveinttypeconvs(left,generrordef,not foundsint,s32inttype,u32inttype);
 {$if defined(cpu16bitalu)}
 {$if defined(cpu16bitalu)}
                   if (resultdef.size <= 2) and
                   if (resultdef.size <= 2) and
                     (is_32bitint(left.resultdef) or is_64bitint(left.resultdef)) and
                     (is_32bitint(left.resultdef) or is_64bitint(left.resultdef)) and
-                    (left.nodetype in [subn,addn,muln,divn,modn,xorn,andn,orn,notn,unaryminusn]) and
+                    (left.nodetype in [subn,addn,muln,divn,modn,xorn,andn,orn,notn,unaryminusn,shln]) and
                     checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit,s16bit,u16bit],int64(low(smallint)),high(word)) then
                     checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit,s16bit,u16bit],int64(low(smallint)),high(word)) then
                     doremoveinttypeconvs(left,generrordef,not foundsint,s16inttype,u16inttype);
                     doremoveinttypeconvs(left,generrordef,not foundsint,s16inttype,u16inttype);
 {$endif defined(cpu16bitalu)}
 {$endif defined(cpu16bitalu)}
 {$if defined(cpu8bitalu)}
 {$if defined(cpu8bitalu)}
                  if (resultdef.size<left.resultdef.size) and
                  if (resultdef.size<left.resultdef.size) and
                   is_integer(left.resultdef) and
                   is_integer(left.resultdef) and
-                  (left.nodetype in [subn,addn,muln,divn,modn,xorn,andn,orn,notn,unaryminusn]) and
+                  (left.nodetype in [subn,addn,muln,divn,modn,xorn,andn,orn,notn,unaryminusn,shln]) and
                   checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit],int64(low(shortint)),high(byte)) then
                   checkremovebiginttypeconvs(left,foundsint,[s8bit,u8bit],int64(low(shortint)),high(byte)) then
                     doremoveinttypeconvs(left,generrordef,not foundsint,s8inttype,u8inttype);
                     doremoveinttypeconvs(left,generrordef,not foundsint,s8inttype,u8inttype);
 {$endif defined(cpu8bitalu)}
 {$endif defined(cpu8bitalu)}

+ 1 - 1
compiler/ncon.pas

@@ -655,7 +655,7 @@ implementation
         resultdef:=typedef;
         resultdef:=typedef;
         { only do range checking when explicitly asked for it
         { only do range checking when explicitly asked for it
           and if the type can be range checked, see tests/tbs/tb0539.pp }
           and if the type can be range checked, see tests/tbs/tb0539.pp }
-        if (resultdef.typ in [orddef,enumdef]) then
+        if (resultdef.typ in [orddef,enumdef]) and not(nf_generic_para in flags) then
           adaptrange(resultdef,value,nf_internal in flags,not rangecheck,rangecheck)
           adaptrange(resultdef,value,nf_internal in flags,not rangecheck,rangecheck)
       end;
       end;
 
 

+ 13 - 3
compiler/nflw.pas

@@ -244,8 +244,9 @@ interface
           function pass_1 : tnode;override;
           function pass_1 : tnode;override;
           function simplify(forinline:boolean): tnode;override;
           function simplify(forinline:boolean): tnode;override;
        protected
        protected
-          function dogetcopy: tnode;override;
           procedure adjust_estimated_stack_size; virtual;
           procedure adjust_estimated_stack_size; virtual;
+       public
+          function dogetcopy: tnode;override;
        end;
        end;
        ttryfinallynodeclass = class of ttryfinallynode;
        ttryfinallynodeclass = class of ttryfinallynode;
 
 
@@ -1557,14 +1558,14 @@ implementation
 
 
 
 
     function tifnode.internalsimplify(warn: boolean) : tnode;
     function tifnode.internalsimplify(warn: boolean) : tnode;
+{$if defined(i386) or defined(x86_64) or defined(xtensa)}
       var
       var
         thenstmnt, elsestmnt: tnode;
         thenstmnt, elsestmnt: tnode;
         in_nr: tinlinenumber;
         in_nr: tinlinenumber;
         paratype: tdef;
         paratype: tdef;
+{$endif}
       begin
       begin
         result:=nil;
         result:=nil;
-        elsestmnt:=nil;
-        in_nr:=Default(tinlinenumber);
         { optimize constant expressions }
         { optimize constant expressions }
         if (left.nodetype=ordconstn) then
         if (left.nodetype=ordconstn) then
           begin
           begin
@@ -1606,6 +1607,8 @@ implementation
           into appropriate min/max intrinsics
           into appropriate min/max intrinsics
 
 
           }
           }
+        elsestmnt:=nil;
+        in_nr:=Default(tinlinenumber);
         if (cs_opt_level2 in current_settings.optimizerswitches) and
         if (cs_opt_level2 in current_settings.optimizerswitches) and
            (left.nodetype in [gtn,gten,ltn,lten]) and IsSingleStatement(right,thenstmnt) and
            (left.nodetype in [gtn,gten,ltn,lten]) and IsSingleStatement(right,thenstmnt) and
            ((t1=nil) or IsSingleStatement(t1,elsestmnt)) and
            ((t1=nil) or IsSingleStatement(t1,elsestmnt)) and
@@ -2722,6 +2725,13 @@ implementation
            result:=right;
            result:=right;
            right:=nil;
            right:=nil;
          end;
          end;
+       { if the finally block contains no code, we can kill
+         it and just return the try part }
+       if has_no_code(right) and not(assigned(third)) and not(implicitframe) then
+         begin
+           result:=left;
+           left:=nil;
+         end;
      end;
      end;
 
 
 
 

+ 27 - 5
compiler/ngtcon.pas

@@ -150,7 +150,7 @@ uses
    defutil,defcmp,
    defutil,defcmp,
    { pass 1 }
    { pass 1 }
    htypechk,procinfo,
    htypechk,procinfo,
-   nmem,ncnv,ninl,ncon,nld,
+   nmem,ncnv,ninl,ncon,nld,nadd,
    { parser specific stuff }
    { parser specific stuff }
    pbase,pexpr,
    pbase,pexpr,
    { codegen }
    { codegen }
@@ -826,7 +826,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
         { maybe pchar ? }
         { maybe pchar ? }
         else
         else
           if is_char(def.pointeddef) and
           if is_char(def.pointeddef) and
-             (node.nodetype<>addrn) then
+            ((node.nodetype=stringconstn) or is_constcharnode(node)) then
             begin
             begin
               { create a tcb for the string data (it's placed in a separate
               { create a tcb for the string data (it's placed in a separate
                 asmlist) }
                 asmlist) }
@@ -875,7 +875,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
         { maybe pwidechar ? }
         { maybe pwidechar ? }
         else
         else
           if is_widechar(def.pointeddef) and
           if is_widechar(def.pointeddef) and
-             (node.nodetype<>addrn) then
+            (node.nodetype in [stringconstn,ordconstn]) then
             begin
             begin
               if (node.nodetype in [stringconstn,ordconstn]) then
               if (node.nodetype in [stringconstn,ordconstn]) then
                 begin
                 begin
@@ -912,13 +912,13 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
                 Message(parser_e_illegal_expression);
                 Message(parser_e_illegal_expression);
           end
           end
         else
         else
-          if (node.nodetype=addrn) or
+          if (node.nodetype in [addrn,addn,subn]) or
              is_proc2procvar_load(node,pd) then
              is_proc2procvar_load(node,pd) then
             begin
             begin
               { insert typeconv }
               { insert typeconv }
               inserttypeconv(node,def);
               inserttypeconv(node,def);
               hp:=node;
               hp:=node;
-              while assigned(hp) and (hp.nodetype in [addrn,typeconvn,subscriptn,vecn]) do
+              while assigned(hp) and (hp.nodetype in [addrn,typeconvn,subscriptn,vecn,addn,subn]) do
                 hp:=tunarynode(hp).left;
                 hp:=tunarynode(hp).left;
               if (hp.nodetype=loadn) then
               if (hp.nodetype=loadn) then
                 begin
                 begin
@@ -927,6 +927,28 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
                   while assigned(hp) and (hp.nodetype<>loadn) do
                   while assigned(hp) and (hp.nodetype<>loadn) do
                     begin
                     begin
                        case hp.nodetype of
                        case hp.nodetype of
+                         addn :
+                           begin
+                             if (is_constintnode(taddnode(hp).right) or
+                               is_constenumnode(taddnode(hp).right) or
+                               is_constcharnode(taddnode(hp).right) or
+                               is_constboolnode(taddnode(hp).right)) and
+                               is_pointer(taddnode(hp).left.resultdef) then
+                               ftcb.queue_addn(tpointerdef(taddnode(hp).left.resultdef).pointeddef,get_ordinal_value(taddnode(hp).right))
+                             else
+                               Message(parser_e_illegal_expression);
+                           end;
+                         subn :
+                           begin
+                             if (is_constintnode(taddnode(hp).right) or
+                               is_constenumnode(taddnode(hp).right) or
+                               is_constcharnode(taddnode(hp).right) or
+                               is_constboolnode(taddnode(hp).right)) and
+                               is_pointer(taddnode(hp).left.resultdef) then
+                               ftcb.queue_subn(tpointerdef(taddnode(hp).left.resultdef).pointeddef,get_ordinal_value(taddnode(hp).right))
+                             else
+                               Message(parser_e_illegal_expression);
+                           end;
                          vecn :
                          vecn :
                            begin
                            begin
                              if (is_constintnode(tvecnode(hp).right) or
                              if (is_constintnode(tvecnode(hp).right) or

+ 20 - 1
compiler/nmem.pas

@@ -938,6 +938,7 @@ implementation
          htype,elementdef,elementptrdef : tdef;
          htype,elementdef,elementptrdef : tdef;
          newordtyp: tordtype;
          newordtyp: tordtype;
          valid : boolean;
          valid : boolean;
+         minvalue, maxvalue: Tconstexprint;
       begin
       begin
          result:=nil;
          result:=nil;
          typecheckpass(left);
          typecheckpass(left);
@@ -1051,7 +1052,25 @@ implementation
                         and not is_64bit(right.resultdef)
                         and not is_64bit(right.resultdef)
 {$endif not cpu64bitaddr}
 {$endif not cpu64bitaddr}
                         then
                         then
-                       newordtyp:=Torddef(right.resultdef).ordtype
+                        begin
+                          { in case of an integer type, we need a new type which covers declaration range and index range,
+                            see tests/webtbs/tw38413.pp
+
+                            This matters only if we sign extend, if the type exceeds the sint range, we can fall back only
+                            to the index type
+                          }
+                          if is_integer(right.resultdef) and ((torddef(right.resultdef).low<0) or (TConstExprInt(Tarraydef(left.resultdef).lowrange)<0)) then
+                            begin
+                              minvalue:=min(TConstExprInt(Tarraydef(left.resultdef).lowrange),torddef(right.resultdef).low);
+                              maxvalue:=max(TConstExprInt(Tarraydef(left.resultdef).highrange),torddef(right.resultdef).high);
+                              if maxvalue>torddef(sinttype).high then
+                                newordtyp:=Torddef(right.resultdef).ordtype
+                              else
+                                newordtyp:=range_to_basetype(minvalue,maxvalue);
+                            end
+                          else
+                            newordtyp:=Torddef(right.resultdef).ordtype;
+                        end
                      else
                      else
                        newordtyp:=torddef(sizesinttype).ordtype;
                        newordtyp:=torddef(sizesinttype).ordtype;
                      inserttypeconv(right,corddef.create(newordtyp,
                      inserttypeconv(right,corddef.create(newordtyp,

+ 2 - 0
compiler/ogbase.pas

@@ -59,6 +59,8 @@ interface
          RELOC_RELATIVE_5,
          RELOC_RELATIVE_5,
          { PIC }
          { PIC }
          RELOC_GOTPCREL,
          RELOC_GOTPCREL,
+         RELOC_GOTPCRELX,
+         RELOC_REX_GOTPCRELX,
          RELOC_PLT32,
          RELOC_PLT32,
          RELOC_TLSGD,
          RELOC_TLSGD,
          RELOC_TPOFF,
          RELOC_TPOFF,

+ 8 - 15
compiler/ogomf.pas

@@ -338,15 +338,15 @@ interface
         property DwarfUnifiedLogicalSegments: TFPHashObjectList read FExeUnifiedLogicalSegments;
         property DwarfUnifiedLogicalSegments: TFPHashObjectList read FExeUnifiedLogicalSegments;
         property Header: TMZExeHeader read FHeader;
         property Header: TMZExeHeader read FHeader;
       protected
       protected
-        procedure Load_Symbol(const aname:string);override;
         procedure DoRelocationFixup(objsec:TObjSection);override;
         procedure DoRelocationFixup(objsec:TObjSection);override;
         procedure Order_ObjSectionList(ObjSectionList : TFPObjectList;const aPattern:string);override;
         procedure Order_ObjSectionList(ObjSectionList : TFPObjectList;const aPattern:string);override;
-        procedure MemPos_ExeSection(const aname:string);override;
-        procedure MemPos_EndExeSection;override;
         function writeData:boolean;override;
         function writeData:boolean;override;
       public
       public
         constructor create;override;
         constructor create;override;
         destructor destroy;override;
         destructor destroy;override;
+        procedure Load_Symbol(const aname:string);override;
+        procedure MemPos_EndExeSection;override;
+        procedure MemPos_ExeSection(const aname:string);override;
         property MZFlatContentSection: TMZExeSection read GetMZFlatContentSection;
         property MZFlatContentSection: TMZExeSection read GetMZFlatContentSection;
       end;
       end;
 
 
@@ -1520,7 +1520,6 @@ implementation
         RawRecord: TOmfRawRecord;
         RawRecord: TOmfRawRecord;
         i,idx: Integer;
         i,idx: Integer;
         objsym: TObjSymbol;
         objsym: TObjSymbol;
-        ExternalNameElem: TOmfExternalNameElement;
         ExtDefRec: TOmfRecord_EXTDEF;
         ExtDefRec: TOmfRecord_EXTDEF;
       begin
       begin
         ExtNames:=TFPHashObjectList.Create;
         ExtNames:=TFPHashObjectList.Create;
@@ -1532,7 +1531,7 @@ implementation
             objsym:=TObjSymbol(Data.ObjSymbolList[i]);
             objsym:=TObjSymbol(Data.ObjSymbolList[i]);
             if objsym.bind=AB_EXTERNAL then
             if objsym.bind=AB_EXTERNAL then
               begin
               begin
-                ExternalNameElem:=TOmfExternalNameElement.Create(ExtNames,objsym.Name);
+                TOmfExternalNameElement.Create(ExtNames,objsym.Name);
                 objsym.symidx:=idx;
                 objsym.symidx:=idx;
                 Inc(idx);
                 Inc(idx);
               end;
               end;
@@ -1567,7 +1566,6 @@ implementation
         SegDef: TOmfRecord_SEGDEF;
         SegDef: TOmfRecord_SEGDEF;
         GrpDef: TOmfRecord_GRPDEF;
         GrpDef: TOmfRecord_GRPDEF;
         nsections,ngroups: Integer;
         nsections,ngroups: Integer;
-        objsym: TObjSymbol;
       begin
       begin
         { calc amount of sections we have and set their index, starting with 1 }
         { calc amount of sections we have and set their index, starting with 1 }
         nsections:=1;
         nsections:=1;
@@ -3157,9 +3155,6 @@ implementation
         i: Integer;
         i: Integer;
         ExeSec: TMZExeSection;
         ExeSec: TMZExeSection;
         ObjSec: TOmfObjSection;
         ObjSec: TOmfObjSection;
-        StartDataPos: LongWord;
-        buf: array [0..1023] of byte;
-        bytesread: LongWord;
       begin
       begin
         Header.LoadableImageSize:=0;
         Header.LoadableImageSize:=0;
         ExeSec:=MZFlatContentSection;
         ExeSec:=MZFlatContentSection;
@@ -3271,7 +3266,6 @@ implementation
         i: Integer;
         i: Integer;
         ExeSec: TMZExeSection;
         ExeSec: TMZExeSection;
         ObjSec: TOmfObjSection;
         ObjSec: TOmfObjSection;
-        StartDataPos: LongWord;
         buf: array [0..1023] of byte;
         buf: array [0..1023] of byte;
         bytesread: LongWord;
         bytesread: LongWord;
       begin
       begin
@@ -4102,9 +4096,8 @@ cleanup:
 
 
     function TNewExeEntryTable.GetSize: QWord;
     function TNewExeEntryTable.GetSize: QWord;
       var
       var
-        CurBundleStart, i: Integer;
+        CurBundleStart: Integer;
         CurBundleSize: Byte;
         CurBundleSize: Byte;
-        cp: TNewExeEntryPoint;
       begin
       begin
         Result:=0;
         Result:=0;
         CurBundleStart:=1;
         CurBundleStart:=1;
@@ -4417,7 +4410,7 @@ cleanup:
       var
       var
         s: TSymStr;
         s: TSymStr;
         Separator: SizeInt;
         Separator: SizeInt;
-        SegName, SegClass: string;
+        {SegName,} SegClass: string;
         IsStack, IsBss: Boolean;
         IsStack, IsBss: Boolean;
       begin
       begin
         { allow mixing initialized and uninitialized data in the same section
         { allow mixing initialized and uninitialized data in the same section
@@ -4429,12 +4422,12 @@ cleanup:
         Separator:=Pos('||',s);
         Separator:=Pos('||',s);
         if Separator>0 then
         if Separator>0 then
           begin
           begin
-            SegName:=Copy(s,1,Separator-1);
+            //SegName:=Copy(s,1,Separator-1);
             SegClass:=Copy(s,Separator+2,Length(s)-Separator-1);
             SegClass:=Copy(s,Separator+2,Length(s)-Separator-1);
           end
           end
         else
         else
           begin
           begin
-            SegName:=s;
+            //SegName:=s;
             SegClass:='';
             SegClass:='';
           end;
           end;
         { wlink recognizes the stack segment by the class name 'STACK' }
         { wlink recognizes the stack segment by the class name 'STACK' }

+ 13 - 0
compiler/options.pas

@@ -1830,6 +1830,7 @@ begin
                   exclude(init_settings.globalswitches,cs_use_heaptrc);
                   exclude(init_settings.globalswitches,cs_use_heaptrc);
                   exclude(init_settings.globalswitches,cs_use_lineinfo);
                   exclude(init_settings.globalswitches,cs_use_lineinfo);
                   exclude(init_settings.localswitches,cs_checkpointer);
                   exclude(init_settings.localswitches,cs_checkpointer);
+                  paratargetdbg:=dbg_none;
                   localvartrashing := -1;
                   localvartrashing := -1;
                 end
                 end
                else
                else
@@ -2787,6 +2788,18 @@ begin
                       end;
                       end;
                     't' :
                     't' :
                       include(init_settings.globalswitches,cs_link_staticflag);
                       include(init_settings.globalswitches,cs_link_staticflag);
+                    'u' :
+                      begin
+                        if target_info.system in systems_support_uf2 then
+                          begin
+                            if UnsetBool(More, j, opt, false) then
+                              exclude(init_settings.globalswitches,cs_generate_uf2)
+                            else
+                              include(init_settings.globalswitches,cs_generate_uf2);
+                          end
+                        else
+                          IgnoredPara('-Xu');
+                      end;
                     'v' :
                     'v' :
                       begin
                       begin
                         If UnsetBool(More, j, opt, false) then
                         If UnsetBool(More, j, opt, false) then

+ 0 - 2
compiler/optloop.pas

@@ -563,8 +563,6 @@ unit optloop;
 
 
 
 
     function OptimizeForLoop_iterforloops(var n: tnode; arg: pointer): foreachnoderesult;
     function OptimizeForLoop_iterforloops(var n: tnode; arg: pointer): foreachnoderesult;
-      var
-        hp : tnode;
       begin
       begin
         Result:=fen_false;
         Result:=fen_false;
         if (n.nodetype=forn) and
         if (n.nodetype=forn) and

+ 58 - 49
compiler/pdecsub.pas

@@ -1133,61 +1133,70 @@ implementation
 
 
         if assigned(genericparams) then
         if assigned(genericparams) then
           begin
           begin
-            include(pd.defoptions,df_generic);
-            { push the parameter symtable so that constraint definitions are added
-              there and not in the owner symtable }
-            symtablestack.push(pd.parast);
-            { register the parameters }
-            for i:=0 to genericparams.count-1 do
+            if potype=potype_constructor then
               begin
               begin
-                 tsym(genericparams[i]).register_sym;
-                 if tsym(genericparams[i]).typ=typesym then
-                   tstoreddef(ttypesym(genericparams[i]).typedef).register_def;
-              end;
-            insert_generic_parameter_types(pd,nil,genericparams);
-            { the list is no longer required }
-            genericparams.free;
-            genericparams:=nil;
-            symtablestack.pop(pd.parast);
-            parse_generic:=true;
-            { also generate a dummy symbol if none exists already }
-            if assigned(astruct) then
-              dummysym:=tsym(astruct.symtable.find(spnongen))
+                Message(parser_e_constructurs_cannot_take_type_parameters);
+                genericparams.free;
+                genericparams:=nil;
+              end
             else
             else
               begin
               begin
-                dummysym:=tsym(symtablestack.top.find(spnongen));
-                if not assigned(dummysym) and
-                    (symtablestack.top=current_module.localsymtable) and
-                    assigned(current_module.globalsymtable) then
-                  dummysym:=tsym(current_module.globalsymtable.find(spnongen));
-              end;
-            if not assigned(dummysym) then
-              begin
-                { overloading generic routines with non-generic types is not
-                  allowed, so we create a procsym as dummy }
-                dummysym:=cprocsym.create(orgspnongen);
+                include(pd.defoptions,df_generic);
+                { push the parameter symtable so that constraint definitions are added
+                  there and not in the owner symtable }
+                symtablestack.push(pd.parast);
+                { register the parameters }
+                for i:=0 to genericparams.count-1 do
+                  begin
+                     tsym(genericparams[i]).register_sym;
+                     if tsym(genericparams[i]).typ=typesym then
+                       tstoreddef(ttypesym(genericparams[i]).typedef).register_def;
+                  end;
+                insert_generic_parameter_types(pd,nil,genericparams);
+                { the list is no longer required }
+                genericparams.free;
+                genericparams:=nil;
+                symtablestack.pop(pd.parast);
+                parse_generic:=true;
+                { also generate a dummy symbol if none exists already }
                 if assigned(astruct) then
                 if assigned(astruct) then
-                  astruct.symtable.insert(dummysym)
+                  dummysym:=tsym(astruct.symtable.find(spnongen))
                 else
                 else
-                  symtablestack.top.insert(dummysym);
-              end
-            else if (dummysym.typ<>procsym) and
-                (
-                  { show error only for the declaration, not also the implementation }
-                  not assigned(astruct) or
-                  (symtablestack.top.symtablelevel<>main_program_level)
-                ) then
-              Message1(sym_e_duplicate_id,dummysym.realname);
-            if not (sp_generic_dummy in dummysym.symoptions) then
-              begin
-                include(dummysym.symoptions,sp_generic_dummy);
-                add_generic_dummysym(dummysym);
+                  begin
+                    dummysym:=tsym(symtablestack.top.find(spnongen));
+                    if not assigned(dummysym) and
+                        (symtablestack.top=current_module.localsymtable) and
+                        assigned(current_module.globalsymtable) then
+                      dummysym:=tsym(current_module.globalsymtable.find(spnongen));
+                  end;
+                if not assigned(dummysym) then
+                  begin
+                    { overloading generic routines with non-generic types is not
+                      allowed, so we create a procsym as dummy }
+                    dummysym:=cprocsym.create(orgspnongen);
+                    if assigned(astruct) then
+                      astruct.symtable.insert(dummysym)
+                    else
+                      symtablestack.top.insert(dummysym);
+                  end
+                else if (dummysym.typ<>procsym) and
+                    (
+                      { show error only for the declaration, not also the implementation }
+                      not assigned(astruct) or
+                      (symtablestack.top.symtablelevel<>main_program_level)
+                    ) then
+                  Message1(sym_e_duplicate_id,dummysym.realname);
+                if not (sp_generic_dummy in dummysym.symoptions) then
+                  begin
+                    include(dummysym.symoptions,sp_generic_dummy);
+                    add_generic_dummysym(dummysym);
+                  end;
+                if dummysym.typ=procsym then
+                  tprocsym(dummysym).add_generic_overload(aprocsym);
+                { start token recorder for the declaration }
+                pd.init_genericdecl;
+                current_scanner.startrecordtokens(pd.genericdecltokenbuf);
               end;
               end;
-            if dummysym.typ=procsym then
-              tprocsym(dummysym).add_generic_overload(aprocsym);
-            { start token recorder for the declaration }
-            pd.init_genericdecl;
-            current_scanner.startrecordtokens(pd.genericdecltokenbuf);
           end
           end
         else if assigned(genericdef) then
         else if assigned(genericdef) then
           insert_generic_parameter_types(pd,tstoreddef(genericdef),generictypelist);
           insert_generic_parameter_types(pd,tstoreddef(genericdef),generictypelist);

+ 1 - 7
compiler/pgenutil.pas

@@ -990,7 +990,7 @@ uses
                               paramdef2:=tconstsym(tstoreddef(def).genericparas[i]).constdef
                               paramdef2:=tconstsym(tstoreddef(def).genericparas[i]).constdef
                             else
                             else
                               paramdef2:=ttypesym(tstoreddef(def).genericparas[i]).typedef;
                               paramdef2:=ttypesym(tstoreddef(def).genericparas[i]).typedef;
-                            if not equal_defs(paramdef2,paramdef2) then
+                            if not equal_defs(paramdef1,paramdef2) then
                               begin
                               begin
                                 allequal:=false;
                                 allequal:=false;
                                 break;
                                 break;
@@ -1379,8 +1379,6 @@ uses
         constraintdata : tgenericconstraintdata;
         constraintdata : tgenericconstraintdata;
         old_block_type : tblock_type;
         old_block_type : tblock_type;
         fileinfo : tfileposinfo;
         fileinfo : tfileposinfo;
-        last_token : ttoken;
-        last_type_pos : tfileposinfo;
       begin
       begin
         result:=tfphashobjectlist.create(false);
         result:=tfphashobjectlist.create(false);
         firstidx:=0;
         firstidx:=0;
@@ -1389,8 +1387,6 @@ uses
         block_type:=bt_type;
         block_type:=bt_type;
         allowconst:=true;
         allowconst:=true;
         is_const:=false;
         is_const:=false;
-        last_token:=NOTOKEN;
-        last_type_pos:=current_filepos;
         repeat
         repeat
           if allowconst and try_to_consume(_CONST) then
           if allowconst and try_to_consume(_CONST) then
             begin
             begin
@@ -1605,8 +1601,6 @@ uses
               is_const:=false;
               is_const:=false;
               allowconst:=true;
               allowconst:=true;
             end;
             end;
-          last_token:=token;
-          last_type_pos:=current_filepos;
         until not (try_to_consume(_COMMA) or try_to_consume(_SEMICOLON));
         until not (try_to_consume(_COMMA) or try_to_consume(_SEMICOLON));
         { if the constant parameter is not terminated then the type restriction was
         { if the constant parameter is not terminated then the type restriction was
           not specified and we need to give an error }
           not specified and we need to give an error }

+ 11 - 3
compiler/psabiehpi.pas

@@ -688,19 +688,24 @@ implementation
         begincatchres,
         begincatchres,
         paraloc1: tcgpara;
         paraloc1: tcgpara;
         pd: tprocdef;
         pd: tprocdef;
-        rttisym: TAsmSymbol;
+        {rttisym: TAsmSymbol;
         rttidef: tdef;
         rttidef: tdef;
+        indirect: boolean;
+        otherunit: boolean; }
         wrappedexception: tregister;
         wrappedexception: tregister;
         exceptloc: tlocation;
         exceptloc: tlocation;
-        indirect: boolean;
-        otherunit: boolean;
+{$if defined(i386) or defined(x86_64)}
         typeindex : aint;
         typeindex : aint;
+{$endif}
       begin
       begin
         paraloc1.init;
         paraloc1.init;
+{
         rttidef:=nil;
         rttidef:=nil;
         rttisym:=nil;
         rttisym:=nil;
+}
         wrappedexception:=hlcg.getaddressregister(list,voidpointertype);
         wrappedexception:=hlcg.getaddressregister(list,voidpointertype);
         hlcg.a_load_reg_reg(list,voidpointertype,voidpointertype,NR_FUNCTION_RESULT_REG,wrappedexception);
         hlcg.a_load_reg_reg(list,voidpointertype,voidpointertype,NR_FUNCTION_RESULT_REG,wrappedexception);
+(*
         if add_catch then
         if add_catch then
           begin
           begin
             if assigned(excepttype) then
             if assigned(excepttype) then
@@ -715,10 +720,13 @@ implementation
                 rttisym:=current_asmdata.RefAsmSymbol(excepttype.vmt_mangledname, AT_DATA, indirect);
                 rttisym:=current_asmdata.RefAsmSymbol(excepttype.vmt_mangledname, AT_DATA, indirect);
               end;
               end;
           end;
           end;
+*)
         { check if the exception is handled by this node }
         { check if the exception is handled by this node }
         if assigned(excepttype) then
         if assigned(excepttype) then
           begin
           begin
+{$if defined(i386) or defined(x86_64)}
             typeindex:=(current_procinfo as tpsabiehprocinfo).CurrentAction.AddAction(excepttype);
             typeindex:=(current_procinfo as tpsabiehprocinfo).CurrentAction.AddAction(excepttype);
+{$endif}
             current_asmdata.getjumplabel(catchstartlab);
             current_asmdata.getjumplabel(catchstartlab);
 {$if defined(i386)}
 {$if defined(i386)}
             hlcg.a_cmp_const_reg_label (list,osuinttype,OC_EQ,typeindex+1,NR_FUNCTION_RESULT64_HIGH_REG,catchstartlab);
             hlcg.a_cmp_const_reg_label (list,osuinttype,OC_EQ,typeindex+1,NR_FUNCTION_RESULT64_HIGH_REG,catchstartlab);

+ 1 - 1
compiler/psub.pas

@@ -1312,7 +1312,7 @@ implementation
         nodeset : THashSet absolute arg;
         nodeset : THashSet absolute arg;
         entry : ptempinfo_flags_entry;
         entry : ptempinfo_flags_entry;
         i : longint;
         i : longint;
-        hashsetitem: PHashSetItem;
+        {hashsetitem: PHashSetItem;}
       begin
       begin
         result:=fen_true;
         result:=fen_true;
         case n.nodetype of
         case n.nodetype of

+ 9 - 5
compiler/rgobj.pas

@@ -1692,7 +1692,9 @@ unit rgobj;
         colourednodes : Tsuperregisterset;
         colourednodes : Tsuperregisterset;
         adj_colours:set of 0..255;
         adj_colours:set of 0..255;
         found : boolean;
         found : boolean;
+{$if declared(RS_STACK_POINTER_REG) and (RS_STACK_POINTER_REG<>RS_INVALID)}
         tmpr: tregister;
         tmpr: tregister;
+{$endif}
     begin
     begin
       spillednodes.clear;
       spillednodes.clear;
       {Reset colours}
       {Reset colours}
@@ -1716,15 +1718,13 @@ unit rgobj;
                 if supregset_in(colourednodes,a) and (reginfo[a].colour<=255) then
                 if supregset_in(colourednodes,a) and (reginfo[a].colour<=255) then
                   include(adj_colours,reginfo[a].colour);
                   include(adj_colours,reginfo[a].colour);
               end;
               end;
+          { e.g. AVR does not have a stack pointer register }
+{$if declared(RS_STACK_POINTER_REG) and (RS_STACK_POINTER_REG<>RS_INVALID)}
           { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
           { FIXME: temp variable r is needed here to avoid Internal error 20060521 }
           {        while compiling the compiler. }
           {        while compiling the compiler. }
           tmpr:=NR_STACK_POINTER_REG;
           tmpr:=NR_STACK_POINTER_REG;
-          { e.g. AVR does not have a stack pointer register }
-{$if defined(RS_STACK_POINTER_REG)}
-  {$if (RS_STACK_POINTER_REG<>RS_INVALID)}
           if (regtype=getregtype(tmpr)) then
           if (regtype=getregtype(tmpr)) then
             include(adj_colours,RS_STACK_POINTER_REG);
             include(adj_colours,RS_STACK_POINTER_REG);
-  {$ifend}
 {$ifend}
 {$ifend}
           {Assume a spill by default...}
           {Assume a spill by default...}
           found:=false;
           found:=false;
@@ -2521,7 +2521,11 @@ unit rgobj;
         {Safe: this procedure is only called if there are spilled nodes.}
         {Safe: this procedure is only called if there are spilled nodes.}
         with spillednodes do
         with spillednodes do
           for i:=0 to length-1 do
           for i:=0 to length-1 do
-            tg.ungetiftemp(list,spill_temps^[buf^[i]]);
+            begin
+              j:=buf^[i];
+              if tg.istemp(spill_temps^[j]) then
+                tg.ungettemp(list,spill_temps^[j]);
+            end;
         freemem(spill_temps);
         freemem(spill_temps);
       end;
       end;
 
 

+ 0 - 2
compiler/scandir.pas

@@ -1362,7 +1362,6 @@ unit scandir;
 
 
     procedure dir_setpeflags;
     procedure dir_setpeflags;
       var
       var
-        ident : string;
         flags : int64;
         flags : int64;
       begin
       begin
         if not (target_info.system in (systems_all_windows)) then
         if not (target_info.system in (systems_all_windows)) then
@@ -1378,7 +1377,6 @@ unit scandir;
 
 
     procedure dir_setpeoptflags;
     procedure dir_setpeoptflags;
       var
       var
-        ident : string;
         flags : int64;
         flags : int64;
       begin
       begin
         if not (target_info.system in (systems_all_windows)) then
         if not (target_info.system in (systems_all_windows)) then

+ 8 - 2
compiler/scanner.pas

@@ -135,6 +135,8 @@ interface
           { if nexttoken<>NOTOKEN, then nexttokenpos holds its filepos }
           { if nexttoken<>NOTOKEN, then nexttokenpos holds its filepos }
           next_filepos   : tfileposinfo;
           next_filepos   : tfileposinfo;
 
 
+          { current macro nesting depth }
+          macro_nesting_depth,
           comment_level,
           comment_level,
           yylexcount     : longint;
           yylexcount     : longint;
           ignoredirectives : TFPHashList; { ignore directives, used to give warnings only once }
           ignoredirectives : TFPHashList; { ignore directives, used to give warnings only once }
@@ -2922,7 +2924,10 @@ type
         if assigned(inputfile.next) then
         if assigned(inputfile.next) then
          begin
          begin
            if inputfile.is_macro then
            if inputfile.is_macro then
-             to_dispose:=inputfile
+             begin
+               to_dispose:=inputfile;
+               dec(macro_nesting_depth);
+             end
            else
            else
              begin
              begin
                to_dispose:=nil;
                to_dispose:=nil;
@@ -3686,6 +3691,7 @@ type
         addfile(hp);
         addfile(hp);
         with inputfile do
         with inputfile do
          begin
          begin
+           inc(macro_nesting_depth);
            setmacro(p,len);
            setmacro(p,len);
          { local buffer }
          { local buffer }
            inputbuffer:=buf;
            inputbuffer:=buf;
@@ -4868,7 +4874,7 @@ type
                  mac:=tmacro(search_macro(pattern));
                  mac:=tmacro(search_macro(pattern));
                  if assigned(mac) and (not mac.is_compiler_var) and (assigned(mac.buftext)) then
                  if assigned(mac) and (not mac.is_compiler_var) and (assigned(mac.buftext)) then
                   begin
                   begin
-                    if yylexcount<max_macro_nesting then
+                    if (yylexcount<max_macro_nesting) and (macro_nesting_depth<max_macro_nesting) then
                      begin
                      begin
                        mac.is_used:=true;
                        mac.is_used:=true;
                        inc(yylexcount);
                        inc(yylexcount);

+ 2 - 0
compiler/symdef.pas

@@ -2343,8 +2343,10 @@ implementation
 
 
 
 
    function tstoreddef.is_intregable : boolean;
    function tstoreddef.is_intregable : boolean;
+{$ifndef cpuhighleveltarget}
      var
      var
        recsize,temp: longint;
        recsize,temp: longint;
+{$endif cpuhighleveltarget}
      begin
      begin
         case typ of
         case typ of
           orddef,
           orddef,

+ 2 - 0
compiler/systems.pas

@@ -451,6 +451,8 @@ interface
                              + [system_i386_beos,system_i386_haiku]
                              + [system_i386_beos,system_i386_haiku]
                              + [system_powerpc_morphos];
                              + [system_powerpc_morphos];
 
 
+       systems_support_uf2 = [system_arm_embedded,system_avr_embedded,system_mipsel_embedded,system_xtensa_embedded];
+
        { all internal COFF writers }
        { all internal COFF writers }
        asms_int_coff = [as_arm_pecoffwince,as_x86_64_pecoff,as_i386_pecoffwince,
        asms_int_coff = [as_arm_pecoffwince,as_x86_64_pecoff,as_i386_pecoffwince,
                         as_i386_pecoffwdosx,as_i386_pecoff,as_i386_coff];
                         as_i386_pecoffwdosx,as_i386_pecoff,as_i386_coff];

+ 2 - 0
compiler/systems/t_amiga.pas

@@ -262,6 +262,7 @@ begin
       Add('  .data           : {');
       Add('  .data           : {');
       Add('    PROVIDE(_DATA_BASE_ = .);');
       Add('    PROVIDE(_DATA_BASE_ = .);');
       Add('    *(.data .data.* .gnu.linkonce.d.*)');
       Add('    *(.data .data.* .gnu.linkonce.d.*)');
+      Add('    *(fpc.resources)');
       Add('    VBCC_CONSTRUCTORS_ELF');
       Add('    VBCC_CONSTRUCTORS_ELF');
       Add('  }');
       Add('  }');
       Add('  .ctors          : { *(.ctors .ctors.*) }');
       Add('  .ctors          : { *(.ctors .ctors.*) }');
@@ -293,6 +294,7 @@ begin
       Add('  .plt            : { *(.plt) }');
       Add('  .plt            : { *(.plt) }');
       Add('  .bss            : {');
       Add('  .bss            : {');
       Add('    *(.bss .bss.* .gnu.linkonce.b.*)');
       Add('    *(.bss .bss.* .gnu.linkonce.b.*)');
+      Add('    *(fpc.reshandles)');
       Add('    *(COMMON)');
       Add('    *(COMMON)');
       Add('  }');
       Add('  }');
       Add('  .bss68k         : { *(BSS bss) }');
       Add('  .bss68k         : { *(BSS bss) }');

+ 0 - 2
compiler/systems/t_bsd.pas

@@ -231,7 +231,6 @@ end;
 Function TLinkerBSD.WriteResponseFile(isdll:boolean) : Boolean;
 Function TLinkerBSD.WriteResponseFile(isdll:boolean) : Boolean;
 Var
 Var
   linkres      : TLinkRes;
   linkres      : TLinkRes;
-  FilesList    : TLinkRes;
   i            : longint;
   i            : longint;
   HPath        : TCmdStrListItem;
   HPath        : TCmdStrListItem;
   s,s1,s2      : TCmdStr;
   s,s1,s2      : TCmdStr;
@@ -581,7 +580,6 @@ var
   targetstr,
   targetstr,
   emulstr       : TCmdStr;
   emulstr       : TCmdStr;
   GCSectionsStr : string[63];
   GCSectionsStr : string[63];
-  exportedsyms: text;
   success : boolean;
   success : boolean;
 begin
 begin
   MakeSharedLibrary:=false;
   MakeSharedLibrary:=false;

+ 2 - 3
compiler/systems/t_darwin.pas

@@ -320,8 +320,7 @@ implementation
       FilesList    : TLinkRes;
       FilesList    : TLinkRes;
       i            : longint;
       i            : longint;
       HPath        : TCmdStrListItem;
       HPath        : TCmdStrListItem;
-      s,s1,s2      : TCmdStr;
-      Fl1,Fl2      : Boolean;
+      s            : TCmdStr;
     begin
     begin
       WriteResponseFile:=False;
       WriteResponseFile:=False;
       if ReOrderEntries Then
       if ReOrderEntries Then
@@ -482,7 +481,7 @@ implementation
       emulstr:='';
       emulstr:='';
       ltostr:='';
       ltostr:='';
       if (cs_link_map in current_settings.globalswitches) then
       if (cs_link_map in current_settings.globalswitches) then
-        mapstr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map'));
+        mapstr:='-map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map'));
 
 
       if (cs_link_staticflag in current_settings.globalswitches) then
       if (cs_link_staticflag in current_settings.globalswitches) then
         StaticStr:='-static';
         StaticStr:='-static';

+ 110 - 8
compiler/systems/t_embed.pas

@@ -39,6 +39,7 @@ implementation
        TlinkerEmbedded=class(texternallinker)
        TlinkerEmbedded=class(texternallinker)
        private
        private
           Function  WriteResponseFile: Boolean;
           Function  WriteResponseFile: Boolean;
+          Function  GenerateUF2(binFile,uf2File : string;baseAddress : longWord):boolean;
        public
        public
           constructor Create; override;
           constructor Create; override;
           procedure SetDefaultInfo; override;
           procedure SetDefaultInfo; override;
@@ -1653,6 +1654,10 @@ begin
         success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+
         success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+
           FixedExeFileName+' '+
           FixedExeFileName+' '+
           maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename,'.bin'))),true,false);
           maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename,'.bin'))),true,false);
+        if success and (target_info.system in systems_support_uf2) and (cs_generate_uf2 in current_settings.globalswitches) then
+          success := GenerateUF2(maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename,'.bin'))),
+                                 maybequoted(ScriptFixFileName(ChangeFileExt(current_module.exefilename,'.uf2'))),
+                                 embedded_controllers[current_settings.controllertype].flashbase);
 {$ifdef ARM}
 {$ifdef ARM}
       if success and (current_settings.controllertype = ct_raspi2) then
       if success and (current_settings.controllertype = ct_raspi2) then
         success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+ FixedExeFileName + ' kernel7.img',true,false);
         success:=DoExec(FindUtil(utilsprefix+'objcopy'),'-O binary '+ FixedExeFileName + ' kernel7.img',true,false);
@@ -1669,6 +1674,106 @@ function TLinkerEmbedded.postprocessexecutable(const fn : string;isdll:boolean):
   end;
   end;
 
 
 
 
+function TlinkerEmbedded.GenerateUF2(binFile,uf2File : string;baseAddress : longWord):boolean;
+type 
+  TFamilies= record
+    k : String;
+    v : longWord;
+  end;
+  tuf2Block = record
+    magicStart0,
+    magicStart1,
+    flags,
+    targetAddr,
+    payloadSize,
+    blockNo,
+    numBlocks,
+    familyid : longWord;
+    data : array[0..255] of byte;
+    padding : array[0..511-256-32-4] of byte;
+    magicEnd : longWord;
+  end;
+
+const
+  Families : array of TFamilies = (
+    (k:'SAMD21'; v:$68ed2b88),
+    (k:'SAML21'; v:$1851780a),
+    (k:'SAMD51'; v:$55114460),
+    (k:'NRF52';  v:$1b57745f),
+    (k:'STM32F0';v:$647824b6),
+    (k:'STM32F1';v:$5ee21072),
+    (k:'STM32F2';v:$5d1a0a2e),
+    (k:'STM32F3';v:$6b846188),
+    (k:'STM32F4';v:$57755a57),
+    (k:'STM32F7';v:$53b80f00),
+    (k:'STM32G0';v:$300f5633),
+    (k:'STM32G4';v:$4c71240a),
+    (k:'STM32H7';v:$6db66082),
+    (k:'STM32L0';v:$202e3a91),
+    (k:'STM32L1';v:$1e1f432d),
+    (k:'STM32L4';v:$00ff6919),
+    (k:'STM32L5';v:$04240bdf),
+    (k:'STM32WB';v:$70d16653),
+    (k:'STM32WL';v:$21460ff0)
+  );
+
+var
+  f,g : file;
+  uf2block : Tuf2Block;
+  totalRead,numRead : longWord;
+  familyId,i : longWord;
+  ExtraOptions : String;
+
+begin
+  if pos('-Ttext=',Info.ExtraOptions) > 0 then
+  begin
+    ExtraOptions := copy(Info.ExtraOptions,pos('-Ttext=',Info.ExtraOptions)+7,length(Info.ExtraOptions));
+    for i := 1 to length(ExtraOptions) do
+      if pos(copy(ExtraOptions,i,1),'0123456789abcdefxABCDEFX') = 0 then
+        ExtraOptions := copy(ExtraOptions,1,i);
+    baseAddress := StrToIntDef(ExtraOptions,0);
+  end;
+
+  familyId := 0;
+  for i := 0 to length(Families)-1 do
+  begin
+    if pos(Families[i].k,embedded_controllers[current_settings.controllertype].controllerunitstr) = 1 then
+      familyId := Families[i].v;
+  end;
+
+  if (baseAddress and $07ffffff) <> 0 then
+  begin
+    totalRead := 0;
+    numRead := 0;
+    assign(f,binfile);
+    reset(f,1);
+    assign(g,uf2file);
+    rewrite(g,1);
+
+    repeat
+      fillchar(uf2block,sizeof(uf2block),0);
+      uf2block.magicStart0 := $0A324655; // "UF2\n"
+      uf2block.magicStart1 := $9E5D5157; // Randomly selected
+      if familyId = 0 then
+        uf2block.flags := 0
+      else
+        uf2block.flags := $2000;
+      uf2block.targetAddr := baseAddress + totalread;
+      uf2block.payloadSize := 256;
+      uf2block.blockNo := (totalRead div sizeOf(uf2block.data));
+      uf2block.numBlocks := (filesize(f) + 255) div 256;
+      uf2block.familyId := familyId;
+      uf2block.magicEnd := $0AB16F30; // Randomly selected
+      blockRead(f,uf2block.data,sizeof(uf2block.data),numRead);
+      blockwrite(g,uf2block,sizeof(uf2block));
+      inc(totalRead,numRead);
+    until (numRead=0) or (NumRead<>sizeOf(uf2block.data));
+    close(f);
+    close(g);
+  end;
+  Result := true;
+end;
+
 {*****************************************************************************
 {*****************************************************************************
                               TlinkerEmbedded_SdccSdld
                               TlinkerEmbedded_SdccSdld
 *****************************************************************************}
 *****************************************************************************}
@@ -1676,17 +1781,14 @@ function TLinkerEmbedded.postprocessexecutable(const fn : string;isdll:boolean):
 function TlinkerEmbedded_SdccSdld.WriteResponseFile: Boolean;
 function TlinkerEmbedded_SdccSdld.WriteResponseFile: Boolean;
   Var
   Var
     linkres  : TLinkRes;
     linkres  : TLinkRes;
-    i        : longint;
-    HPath    : TCmdStrListItem;
-    s,s1,s2  : TCmdStr;
+    //i        : longint;
+    //HPath    : TCmdStrListItem;
+    s{,s1,s2}  : TCmdStr;
     prtobj,
     prtobj,
     cprtobj  : string[80];
     cprtobj  : string[80];
     linklibc : boolean;
     linklibc : boolean;
-    found1,
-    found2   : boolean;
-  {$if defined(ARM)}
-    LinkStr  : string;
-  {$endif}
+    //found1,
+    //found2   : boolean;
   begin
   begin
     WriteResponseFile:=False;
     WriteResponseFile:=False;
     linklibc:=(SharedLibFiles.Find('c')<>nil);
     linklibc:=(SharedLibFiles.Find('c')<>nil);

+ 5 - 5
compiler/systems/t_freertos.pas

@@ -81,8 +81,7 @@ Var
   i        : longint;
   i        : longint;
   HPath    : TCmdStrListItem;
   HPath    : TCmdStrListItem;
   s,s1,s2  : TCmdStr;
   s,s1,s2  : TCmdStr;
-  prtobj,
-  cprtobj  : string[80];
+  prtobj   : string[80];
   linklibc : boolean;
   linklibc : boolean;
   found1,
   found1,
   found2   : boolean;
   found2   : boolean;
@@ -96,9 +95,8 @@ begin
   prtobj:='';
   prtobj:='';
 {$else}
 {$else}
   prtobj:='prt0';
   prtobj:='prt0';
-  cprtobj:='cprt0';
   if linklibc then
   if linklibc then
-    prtobj:=cprtobj;
+    prtobj:='cprt0';
 {$endif}
 {$endif}
 
 
   { Open link.res file }
   { Open link.res file }
@@ -944,7 +942,6 @@ end;
 function TlinkerFreeRTOS.MakeExecutable:boolean;
 function TlinkerFreeRTOS.MakeExecutable:boolean;
 var
 var
   StaticStr,
   StaticStr,
-  S,
   binstr,
   binstr,
   cmdstr,
   cmdstr,
   mapstr: Ansistring;
   mapstr: Ansistring;
@@ -953,9 +950,12 @@ var
   DynLinkStr,
   DynLinkStr,
   StripStr,
   StripStr,
   FixedExeFileName: string;
   FixedExeFileName: string;
+{$ifdef XTENSA}
+  S: Ansistring;
   t: Text;
   t: Text;
   hp: TCmdStrListItem;
   hp: TCmdStrListItem;
   filepath: TCmdStr;
   filepath: TCmdStr;
+{$endif XTENSA}
 begin
 begin
 {$ifdef XTENSA}
 {$ifdef XTENSA}
   { idfpath can be set by -Ff, else default to environment value of IDF_PATH }
   { idfpath can be set by -Ff, else default to environment value of IDF_PATH }

+ 2 - 0
compiler/systems/t_win.pas

@@ -430,7 +430,9 @@ implementation
          l1,l2,l3,l4 {$ifdef ARM} ,l5 {$endif ARM} : tasmlabel;
          l1,l2,l3,l4 {$ifdef ARM} ,l5 {$endif ARM} : tasmlabel;
          importname : string;
          importname : string;
          suffix : integer;
          suffix : integer;
+{$ifndef AARCH64}
          href : treference;
          href : treference;
+{$endif AARCH64}
          i,j  : longint;
          i,j  : longint;
          ImportLibrary : TImportLibrary;
          ImportLibrary : TImportLibrary;
          ImportSymbol  : TImportSymbol;
          ImportSymbol  : TImportSymbol;

+ 0 - 3
compiler/systems/t_win16.pas

@@ -104,7 +104,6 @@ var
   i,j: Integer;
   i,j: Integer;
   ImportLibrary: TImportLibrary;
   ImportLibrary: TImportLibrary;
   ImportSymbol: TImportSymbol;
   ImportSymbol: TImportSymbol;
-  AsmPrefix: String;
 
 
   procedure AddImport(const dllname,afuncname,mangledname:string;ordnr:longint;isvar:boolean);
   procedure AddImport(const dllname,afuncname,mangledname:string;ordnr:longint;isvar:boolean);
     begin
     begin
@@ -114,7 +113,6 @@ var
     end;
     end;
 
 
 begin
 begin
-  AsmPrefix:='imp'+Lower(current_module.modulename^);
   current_module.linkotherstaticlibs.add(current_module.importlibfilename,link_always);
   current_module.linkotherstaticlibs.add(current_module.importlibfilename,link_always);
   ObjWriter:=TOmfLibObjectWriter.CreateAr(current_module.importlibfilename,32);
   ObjWriter:=TOmfLibObjectWriter.CreateAr(current_module.importlibfilename,32);
   ObjOutput:=TOmfObjOutput.Create(ObjWriter);
   ObjOutput:=TOmfObjOutput.Create(ObjWriter);
@@ -238,7 +236,6 @@ function TExternalLinkerWin16WLink.WriteResponseFile(isdll: boolean): Boolean;
 Var
 Var
   linkres  : TLinkRes;
   linkres  : TLinkRes;
   s        : string;
   s        : string;
-  i: Integer;
 begin
 begin
   WriteResponseFile:=False;
   WriteResponseFile:=False;
 
 

+ 104 - 104
compiler/utils/Makefile

@@ -351,316 +351,316 @@ ifdef OPTNEW
 override FPCOPT+=$(OPTNEW)
 override FPCOPT+=$(OPTNEW)
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-nativent)
 ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
 ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-android)
 ifeq ($(FULL_TARGET),i386-android)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-aros)
 ifeq ($(FULL_TARGET),i386-aros)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-macosclassic)
 ifeq ($(FULL_TARGET),m68k-macosclassic)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-sinclairql)
 ifeq ($(FULL_TARGET),m68k-sinclairql)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macosclassic)
 ifeq ($(FULL_TARGET),powerpc-macosclassic)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-wii)
 ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-aix)
 ifeq ($(FULL_TARGET),powerpc-aix)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-haiku)
 ifeq ($(FULL_TARGET),x86_64-haiku)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-netbsd)
 ifeq ($(FULL_TARGET),x86_64-netbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-openbsd)
 ifeq ($(FULL_TARGET),x86_64-openbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-iphonesim)
 ifeq ($(FULL_TARGET),x86_64-iphonesim)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-android)
 ifeq ($(FULL_TARGET),x86_64-android)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-aros)
 ifeq ($(FULL_TARGET),x86_64-aros)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-dragonfly)
 ifeq ($(FULL_TARGET),x86_64-dragonfly)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-netbsd)
 ifeq ($(FULL_TARGET),arm-netbsd)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-android)
 ifeq ($(FULL_TARGET),arm-android)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-aros)
 ifeq ($(FULL_TARGET),arm-aros)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-freertos)
 ifeq ($(FULL_TARGET),arm-freertos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),arm-ios)
 ifeq ($(FULL_TARGET),arm-ios)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-aix)
 ifeq ($(FULL_TARGET),powerpc64-aix)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),mips-linux)
 ifeq ($(FULL_TARGET),mips-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),mipsel-embedded)
 ifeq ($(FULL_TARGET),mipsel-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),mipsel-android)
 ifeq ($(FULL_TARGET),mipsel-android)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),mips64el-linux)
 ifeq ($(FULL_TARGET),mips64el-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),jvm-java)
 ifeq ($(FULL_TARGET),jvm-java)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),jvm-android)
 ifeq ($(FULL_TARGET),jvm-android)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i8086-embedded)
 ifeq ($(FULL_TARGET),i8086-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i8086-msdos)
 ifeq ($(FULL_TARGET),i8086-msdos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i8086-win16)
 ifeq ($(FULL_TARGET),i8086-win16)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),aarch64-linux)
 ifeq ($(FULL_TARGET),aarch64-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),aarch64-darwin)
 ifeq ($(FULL_TARGET),aarch64-darwin)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),aarch64-win64)
 ifeq ($(FULL_TARGET),aarch64-win64)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),aarch64-android)
 ifeq ($(FULL_TARGET),aarch64-android)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),aarch64-ios)
 ifeq ($(FULL_TARGET),aarch64-ios)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),wasm-wasm)
 ifeq ($(FULL_TARGET),wasm-wasm)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),sparc64-linux)
 ifeq ($(FULL_TARGET),sparc64-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),riscv32-linux)
 ifeq ($(FULL_TARGET),riscv32-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),riscv32-embedded)
 ifeq ($(FULL_TARGET),riscv32-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),riscv64-linux)
 ifeq ($(FULL_TARGET),riscv64-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),riscv64-embedded)
 ifeq ($(FULL_TARGET),riscv64-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),xtensa-linux)
 ifeq ($(FULL_TARGET),xtensa-linux)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),xtensa-embedded)
 ifeq ($(FULL_TARGET),xtensa-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),xtensa-freertos)
 ifeq ($(FULL_TARGET),xtensa-freertos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),z80-embedded)
 ifeq ($(FULL_TARGET),z80-embedded)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),z80-zxspectrum)
 ifeq ($(FULL_TARGET),z80-zxspectrum)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),z80-msxdos)
 ifeq ($(FULL_TARGET),z80-msxdos)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),z80-amstradcpc)
 ifeq ($(FULL_TARGET),z80-amstradcpc)
-override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+override TARGET_PROGRAMS+=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 endif
 endif
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
 override CLEAN_UNITS+=ppu crc
 override CLEAN_UNITS+=ppu crc

+ 1 - 1
compiler/utils/Makefile.fpc

@@ -3,7 +3,7 @@
 #
 #
 
 
 [target]
 [target]
-programs=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins
+programs=fpc ppufiles ppudump ppumove mka64ins mkarmins mkx86ins msg2inc mkx86inl mkz80ins
 rst=fpcsubst
 rst=fpcsubst
 
 
 [clean]
 [clean]

+ 88 - 2
compiler/utils/mkx86inl.pp

@@ -4,8 +4,7 @@ program mkx86inl;
 {$H+}
 {$H+}
 
 
 uses
 uses
-  sysutils, classes,
-  strutils;
+  sysutils, classes;
 
 
 type
 type
   TOperDirection = (operIn, operVar, operOut);
   TOperDirection = (operIn, operVar, operOut);
@@ -19,6 +18,93 @@ type
 const
 const
   DirLUT: array[TOperDirection] of string = ('','var ','out ');
   DirLUT: array[TOperDirection] of string = ('','var ','out ');
 
 
+{ ***************************************************************************
+  the routines Copy2SymbDel, PosSetEx, PosSet, RemoveTrailingChars, TrimRightSet are copied and reformatted
+  from StrUtils and thus covered by the copyright of strutils (see below) as compiler utilities cannot
+  depend on packages
+
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 1999-2005 by the Free Pascal development team
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*************************************************************************** }
+
+function Copy2SymbDel(var S: string; Symb: Char): string;
+  var
+    p: SizeInt;
+  begin
+    p:=Pos(Symb,S);
+    if p=0 then
+      begin
+        result:=s;
+        s:='';
+      end
+    else
+      begin
+        Result:=Copy(S,1,p-1);
+        delete(s,1,p);
+      end;
+  end;
+
+
+function PosSetEx(const c: TSysCharSet; const s: ansistring; count: Integer): SizeInt;
+  var
+    i,j:SizeInt;
+  begin
+   if pchar(pointer(s))=nil then
+    j:=0
+   else
+    begin
+     i:=length(s);
+     j:=count;
+     if j>i then
+      begin
+       result:=0;
+       exit;
+      end;
+     while (j<=i) and (not (s[j] in c)) do inc(j);
+     if (j>i) then
+      j:=0;                                         // not found.
+    end;
+   result:=j;
+  end;
+
+function PosSet(const c: TSysCharSet; const s: ansistring): SizeInt;
+  begin
+    result:=possetex(c,s,1);
+  end;
+
+procedure RemoveTrailingChars(VAR S: AnsiString; const CSet: TSysCharset);
+  var
+    I,J: LONGINT;
+
+  Begin
+   I:=Length(S);
+   IF (I>0) Then
+    Begin
+     J:=I;
+     While (j>0) and (S[J] IN CSet) DO DEC(J);
+     IF J<>I Then
+      SetLength(S,J);
+    End;
+  End;
+
+function TrimRightSet(const S: String; const CSet: TSysCharSet): String;
+
+begin
+  result:=s;
+  RemoveTrailingchars(result,cset);
+end;
+
+{ ***************************************************************************
+   end of StrUtils code
+  ***************************************************************************}
+
 function GetPascalType(const ATyp: string): string;
 function GetPascalType(const ATyp: string): string;
   begin
   begin
     case ATyp of
     case ATyp of

+ 32 - 1
compiler/utils/mkz80ins.pp

@@ -18,7 +18,7 @@ program mkz80ins;
 {$mode objfpc}{$H+}
 {$mode objfpc}{$H+}
 
 
 uses
 uses
-  SysUtils,StrUtils;
+  SysUtils;
 
 
 const
 const
   Version = '1.0.0';
   Version = '1.0.0';
@@ -84,6 +84,37 @@ type
     destructor Destroy;override;
     destructor Destroy;override;
   end;
   end;
 
 
+{ ***************************************************************************
+  the routines LeftStr, AnsiStartsStr are copied and reformatted
+  from StrUtils and thus covered by the copyright of strutils (see below) as compiler utilities cannot
+  depend on packages
+
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 1999-2005 by the Free Pascal development team
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*************************************************************************** }
+
+function LeftStr(const AText: AnsiString; const ACount: SizeInt): AnsiString;
+  begin
+    Result:=Copy(AText,1,ACount);
+  end;
+
+
+function AnsiStartsStr(const ASubText, AText: string): Boolean;
+  begin
+    Result := (ASubText = '') or (LeftStr(AText, Length(ASubText)) = ASubText);
+  end;
+
+{ ***************************************************************************
+ end of StrUtils code
+***************************************************************************}
+
 function PasEncode(const S: string): string;
 function PasEncode(const S: string): string;
   var
   var
     Ch: Char;
     Ch: Char;

+ 41 - 22
compiler/utils/msg2inc.pp

@@ -13,6 +13,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
  **********************************************************************}
  **********************************************************************}
+{$H+}
 program msg2inc;
 program msg2inc;
 
 
 {$ifdef unix}
 {$ifdef unix}
@@ -622,21 +623,28 @@ Var
   hs : string;
   hs : string;
 begin
 begin
   hs:='';
   hs:='';
-  for i:=1 to length(s) do
-    case S[i] of
-      '$' :
-        if (s[i+1] in ['0'..'9']) then
-          hs:=hs+'arg'
-        else
-          hs:=hs+'\$';
-      '&','{','}','#','_','%':            // Escape these characters
-        hs := hs + '\' + S[i];
-      '~','^':
-        hs := hs + '\'+S[i]+' ';
-      '\':
-        hs:=hs+'$\backslash$'
-    else
-      hs := hs + S[i];
+  i:=1;
+  while i<=length(s) do
+    begin
+      case S[i] of
+        '$' :
+          if (s[i+1] in ['0'..'9']) then
+            begin
+              hs:=hs+'\textlangle arg. '+s[i+1]+'\textrangle{}';
+              inc(i);
+            end
+          else
+            hs:=hs+'\$';
+        '&','{','}','#','_','%':            // Escape these characters
+          hs := hs + '\' + S[i];
+        '~','^':
+          hs := hs + '\'+S[i]+' ';
+        '\':
+          hs:=hs+'$\backslash$'
+      else
+        hs := hs + S[i];
+      end;
+      inc(i);
     end;
     end;
   EscapeString:=hs;
   EscapeString:=hs;
 end;
 end;
@@ -646,6 +654,7 @@ var
   t,f   : text;
   t,f   : text;
   line,
   line,
   i,k   : longint;
   i,k   : longint;
+  number,
   s,s1  : string;
   s,s1  : string;
   texoutput : boolean;
   texoutput : boolean;
 begin
 begin
@@ -695,25 +704,35 @@ begin
            if i>0 then
            if i>0 then
             begin
             begin
               inc(i);
               inc(i);
+              number:='';
               while s[i] in ['0'..'9'] do
               while s[i] in ['0'..'9'] do
-               inc(i);
+               begin
+                 number:=number+s[i];
+                 inc(i);
+               end;
+              { strip leading zeros }
+              while number[1]='0' do
+                Delete(number,1,1);
               inc(i);
               inc(i);
               s1:='';
               s1:='';
               k:=0;
               k:=0;
               while (k<5) and (s[i+k]<>'_') do
               while (k<5) and (s[i+k]<>'_') do
                begin
                begin
                  case s[i+k] of
                  case s[i+k] of
-                  'W' : s1:='Warning: ';
-                  'E' : s1:='Error: ';
-                  'F' : s1:='Fatal: ';
-                  'N' : s1:='Note: ';
-                  'I' : s1:='Info: ';
-                  'H' : s1:='Hint: ';
+                  'W' : s1:='Warning '+number+': ';
+                  'E' : s1:='Error '+number+': ';
+                  'F' : s1:='Fatal error '+number+': ';
+                  'N' : s1:='Note '+number+': ';
+                  'I' : s1:='Info '+number+': ';
+                  'H' : s1:='Hint '+number+': ';
                  end;
                  end;
                  inc(k);
                  inc(k);
                end;
                end;
               if s[i+k]='_' then
               if s[i+k]='_' then
                inc(i,k+1);
                inc(i,k+1);
+              if number<>'' then
+                writeln(t,'\index[msgnr]{',number,'}');
+              writeln(t,'\index[msgtxt]{',escapestring(Copy(s,i,255)),'}');
               writeln(t,'\item ['+s1+escapestring(Copy(s,i,255))+'] \hfill \\');
               writeln(t,'\item ['+s1+escapestring(Copy(s,i,255))+'] \hfill \\');
             end
             end
            else
            else

+ 2 - 1
compiler/utils/ppuutils/ppudump.pp

@@ -2305,7 +2305,8 @@ const
         'Link using vlink', {cs_link_vlink}
         'Link using vlink', {cs_link_vlink}
         'Link-Time Optimization disabled for system unit', {cs_lto_nosystem}
         'Link-Time Optimization disabled for system unit', {cs_lto_nosystem}
         'Assemble on target OS', {cs_asemble_on_target}
         'Assemble on target OS', {cs_asemble_on_target}
-        'Use a memory model to support >2GB static data on 64 Bit target' {cs_large}
+        'Use a memory model to support >2GB static data on 64 Bit target', {cs_large}
+        'Generate UF2 binary' {cs_generate_uf2}
        );
        );
     localswitchname : array[tlocalswitch] of string[50] =
     localswitchname : array[tlocalswitch] of string[50] =
        { Switches which can be changed locally }
        { Switches which can be changed locally }

+ 1 - 1
compiler/verbose.pas

@@ -753,7 +753,7 @@ implementation
         UpdateStatus;
         UpdateStatus;
       { Fix replacements }
       { Fix replacements }
         DefaultReplacements(s);
         DefaultReplacements(s);
-        if status.showmsgnrs then
+        if status.showmsgnrs and ((v and V_Normal)=0) then
           s:='('+tostr(w)+') '+s;
           s:='('+tostr(w)+') '+s;
         if doqueue then
         if doqueue then
           begin
           begin

+ 17 - 6
compiler/x86/aasmcpu.pas

@@ -924,6 +924,7 @@ implementation
           Intel 64 and IA-32 Architectures Software Developer’s Manual
           Intel 64 and IA-32 Architectures Software Developer’s Manual
             Volume 2B: Instruction Set Reference, N-Z, January 2015
             Volume 2B: Instruction Set Reference, N-Z, January 2015
         }
         }
+{$ifndef i8086}
         alignarray_cmovcpus:array[0..10] of string[11]=(
         alignarray_cmovcpus:array[0..10] of string[11]=(
           #$66#$66#$66#$0F#$1F#$84#$00#$00#$00#$00#$00,
           #$66#$66#$66#$0F#$1F#$84#$00#$00#$00#$00#$00,
           #$66#$66#$0F#$1F#$84#$00#$00#$00#$00#$00,
           #$66#$66#$0F#$1F#$84#$00#$00#$00#$00#$00,
@@ -936,6 +937,7 @@ implementation
           #$0F#$1F#$00,
           #$0F#$1F#$00,
           #$66#$90,
           #$66#$90,
           #$90);
           #$90);
+{$endif i8086}
 {$ifdef i8086}
 {$ifdef i8086}
         alignarray:array[0..5] of string[8]=(
         alignarray:array[0..5] of string[8]=(
           #$90#$90#$90#$90#$90#$90#$90,
           #$90#$90#$90#$90#$90#$90#$90,
@@ -3690,13 +3692,17 @@ implementation
         needed_VEX_Extension: boolean;
         needed_VEX_Extension: boolean;
         needed_VEX: boolean;
         needed_VEX: boolean;
         needed_EVEX: boolean;
         needed_EVEX: boolean;
+{$ifdef x86_64}
         needed_VSIB: boolean;
         needed_VSIB: boolean;
+{$endif x86_64}
         opmode: integer;
         opmode: integer;
         VEXvvvv: byte;
         VEXvvvv: byte;
         VEXmmmmm: byte;
         VEXmmmmm: byte;
+{
         VEXw    : byte;
         VEXw    : byte;
         VEXpp   : byte;
         VEXpp   : byte;
         VEXll   : byte;
         VEXll   : byte;
+}
         EVEXvvvv: byte;
         EVEXvvvv: byte;
         EVEXpp: byte;
         EVEXpp: byte;
         EVEXr: byte;
         EVEXr: byte;
@@ -3795,14 +3801,17 @@ implementation
         needed_VEX    := false;
         needed_VEX    := false;
         needed_EVEX   := false;
         needed_EVEX   := false;
         needed_VEX_Extension := false;
         needed_VEX_Extension := false;
+{$ifdef x86_64}
         needed_VSIB   := false;
         needed_VSIB   := false;
+{$endif x86_64}
         opmode   := -1;
         opmode   := -1;
         VEXvvvv  := 0;
         VEXvvvv  := 0;
         VEXmmmmm := 0;
         VEXmmmmm := 0;
-
+{
         VEXll    := 0;
         VEXll    := 0;
         VEXw     := 0;
         VEXw     := 0;
         VEXpp    := 0;
         VEXpp    := 0;
+}
         EVEXpp   := 0;
         EVEXpp   := 0;
         EVEXvvvv := 0;
         EVEXvvvv := 0;
         EVEXr    := 0;
         EVEXr    := 0;
@@ -3855,7 +3864,9 @@ implementation
                                  begin
                                  begin
                                    // VSIB memory addresing
                                    // VSIB memory addresing
                                    if getsupreg(oper[opidx]^.ref^.index) and $10 = $0 then EVEXv := 1; // VECTOR-Index
                                    if getsupreg(oper[opidx]^.ref^.index) and $10 = $0 then EVEXv := 1; // VECTOR-Index
+                                   {$ifdef x86_64}
                                    needed_VSIB := true;
                                    needed_VSIB := true;
+                                   {$endif x86_64}
                                  end;
                                  end;
                                end;
                                end;
                       else
                       else
@@ -3866,12 +3877,12 @@ implementation
                  end;
                  end;
            &333: begin
            &333: begin
                    VEXvvvv              := VEXvvvv  OR $02; // set SIMD-prefix $F3
                    VEXvvvv              := VEXvvvv  OR $02; // set SIMD-prefix $F3
-                   VEXpp                := $02;             // set SIMD-prefix $F3
+                   //VEXpp                := $02;             // set SIMD-prefix $F3
                    EVEXpp               := $02;             // set SIMD-prefix $F3
                    EVEXpp               := $02;             // set SIMD-prefix $F3
                  end;
                  end;
            &334: begin
            &334: begin
                    VEXvvvv              := VEXvvvv  OR $03; // set SIMD-prefix $F2
                    VEXvvvv              := VEXvvvv  OR $03; // set SIMD-prefix $F2
-                   VEXpp                := $03;             // set SIMD-prefix $F2
+                   //VEXpp                := $03;             // set SIMD-prefix $F2
                    EVEXpp               := $03;             // set SIMD-prefix $F2
                    EVEXpp               := $03;             // set SIMD-prefix $F2
                  end;
                  end;
            &350: needed_EVEX            := true;            // AVX512 instruction or AVX128/256/512-instruction (depended on operands [x,y,z]mm16..)
            &350: needed_EVEX            := true;            // AVX512 instruction or AVX128/256/512-instruction (depended on operands [x,y,z]mm16..)
@@ -3879,18 +3890,18 @@ implementation
            &352: EVEXw1                 := $01;
            &352: EVEXw1                 := $01;
            &361: begin
            &361: begin
                    VEXvvvv              := VEXvvvv  OR $01; // set SIMD-prefix $66
                    VEXvvvv              := VEXvvvv  OR $01; // set SIMD-prefix $66
-                   VEXpp                := $01;             // set SIMD-prefix $66
+                   //VEXpp                := $01;             // set SIMD-prefix $66
                    EVEXpp               := $01;             // set SIMD-prefix $66
                    EVEXpp               := $01;             // set SIMD-prefix $66
                  end;
                  end;
            &362: needed_VEX             := true;
            &362: needed_VEX             := true;
            &363: begin
            &363: begin
                    needed_VEX_Extension := true;
                    needed_VEX_Extension := true;
                    VEXvvvv              := VEXvvvv  OR (1 shl 7); // set REX.W
                    VEXvvvv              := VEXvvvv  OR (1 shl 7); // set REX.W
-                   VEXw                 := 1;
+                   //VEXw                 := 1;
                  end;
                  end;
            &364: begin
            &364: begin
                    VEXvvvv              := VEXvvvv  OR $04; // vectorlength = 256 bits AND no scalar
                    VEXvvvv              := VEXvvvv  OR $04; // vectorlength = 256 bits AND no scalar
-                   VEXll                := $01;
+                   //VEXll                := $01;
                    EVEXll               := $01;
                    EVEXll               := $01;
                  end;
                  end;
            &366,
            &366,

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.