Browse Source

Revive class helper branch - rebase to revision 17822

git-svn-id: branches/svenbarth/classhelpers@17824 -
svenbarth 14 years ago
parent
commit
58a2e63d10
100 changed files with 6726 additions and 2133 deletions
  1. 254 27
      .gitattributes
  2. 42 2
      Makefile
  3. 69 4
      compiler/Makefile
  4. 2 2
      compiler/Makefile.fpc
  5. 5 3
      compiler/aasmdata.pas
  6. 58 82
      compiler/aggas.pas
  7. 26 26
      compiler/arm/cgcpu.pas
  8. 1 1
      compiler/arm/narmcnv.pas
  9. 78 3
      compiler/assemble.pas
  10. 20 8
      compiler/avr/aasmcpu.pas
  11. 102 57
      compiler/avr/agavrgas.pas
  12. 37 1
      compiler/avr/aoptcpu.pas
  13. 448 126
      compiler/avr/cgcpu.pas
  14. 25 6
      compiler/avr/cpubase.pas
  15. 47 2
      compiler/avr/cpuinfo.pas
  16. 12 10
      compiler/avr/cpupara.pas
  17. 2 14
      compiler/avr/cpupi.pas
  18. 1 1
      compiler/avr/itcpugas.pas
  19. 26 8
      compiler/avr/navradd.pas
  20. 1 122
      compiler/avr/navrcnv.pas
  21. 7 12
      compiler/avr/raavrgas.pas
  22. 59 7
      compiler/avr/rgcpu.pas
  23. 6 18
      compiler/cclasses.pas
  24. 4 4
      compiler/cfileutl.pas
  25. 110 103
      compiler/cgobj.pas
  26. 7 6
      compiler/cmsgs.pas
  27. 3 3
      compiler/compiler.pas
  28. 2 2
      compiler/compinnr.inc
  29. 9 2
      compiler/defcmp.pas
  30. 0 2
      compiler/finput.pas
  31. 25 6
      compiler/fmodule.pas
  32. 11 0
      compiler/fpcdefs.inc
  33. 13 8
      compiler/fppu.pas
  34. 153 0
      compiler/generic/cpuinfo.pas
  35. 35 24
      compiler/globals.pas
  36. 5 3
      compiler/globtype.pas
  37. 1 1
      compiler/htypechk.pas
  38. 9 79
      compiler/i386/ag386nsm.pas
  39. 44 15
      compiler/i386/cgcpu.pas
  40. 14 3
      compiler/i386/cpupara.pas
  41. 4 1
      compiler/i386/i386att.inc
  42. 5 2
      compiler/i386/i386atts.inc
  43. 4 1
      compiler/i386/i386int.inc
  44. 1 1
      compiler/i386/i386nop.inc
  45. 4 1
      compiler/i386/i386op.inc
  46. 3 0
      compiler/i386/i386prop.inc
  47. 193 200
      compiler/i386/i386tab.inc
  48. 6 4
      compiler/i386/popt386.pas
  49. 67 9
      compiler/link.pas
  50. 23 23
      compiler/m68k/cgcpu.pas
  51. 23 23
      compiler/mips/cgcpu.pas
  52. 1 1
      compiler/mips/ncpucnv.pas
  53. 47 16
      compiler/msg/errore.msg
  54. 3048 0
      compiler/msg/erroriu.msg
  55. 7 3
      compiler/msgidx.inc
  56. 309 297
      compiler/msgtxt.inc
  57. 32 0
      compiler/nadd.pas
  58. 2 2
      compiler/nbas.pas
  59. 45 22
      compiler/ncal.pas
  60. 2 2
      compiler/ncgadd.pas
  61. 114 0
      compiler/ncgcnv.pas
  62. 35 91
      compiler/ncgcon.pas
  63. 6 0
      compiler/ncgflw.pas
  64. 4 4
      compiler/ncginl.pas
  65. 10 5
      compiler/ncgld.pas
  66. 5 0
      compiler/ncgmat.pas
  67. 2 0
      compiler/ncgrtti.pas
  68. 16 39
      compiler/ncgutil.pas
  69. 7 8
      compiler/ncnv.pas
  70. 77 4
      compiler/ninl.pas
  71. 39 14
      compiler/nmat.pas
  72. 1 2
      compiler/nobj.pas
  73. 0 1
      compiler/nset.pas
  74. 118 5
      compiler/ogbase.pas
  75. 30 5
      compiler/ogelf.pas
  76. 132 70
      compiler/options.pas
  77. 1 1
      compiler/pdecobj.pas
  78. 2 2
      compiler/pdecsub.pas
  79. 10 3
      compiler/pdecvar.pas
  80. 8 4
      compiler/pexpr.pas
  81. 1 7
      compiler/pmodules.pas
  82. 7 68
      compiler/powerpc/agppcmpw.pas
  83. 21 21
      compiler/powerpc/cgcpu.pas
  84. 4 1
      compiler/ppcavr.lpi
  85. 11 11
      compiler/ppcgen/cgppc.pas
  86. 11 17
      compiler/ppu.pas
  87. 2 4
      compiler/pstatmnt.pas
  88. 43 24
      compiler/psub.pas
  89. 5 2
      compiler/ptype.pas
  90. 2 1
      compiler/scandir.pas
  91. 97 42
      compiler/scanner.pas
  92. 36 36
      compiler/sparc/cgcpu.pas
  93. 1 1
      compiler/sparc/ncpucnv.pas
  94. 7 5
      compiler/symdef.pas
  95. 8 7
      compiler/symtable.pas
  96. 1 4
      compiler/symtype.pas
  97. 216 0
      compiler/systems.inc
  98. 35 212
      compiler/systems.pas
  99. 1 1
      compiler/systems/i_linux.pas
  100. 1 0
      compiler/systems/t_bsd.pas

+ 254 - 27
.gitattributes

@@ -146,6 +146,7 @@ compiler/fpccrc.pas svneol=native#text/plain
 compiler/fpcdefs.inc svneol=native#text/plain
 compiler/fpcdefs.inc svneol=native#text/plain
 compiler/fppu.pas svneol=native#text/plain
 compiler/fppu.pas svneol=native#text/plain
 compiler/gendef.pas svneol=native#text/plain
 compiler/gendef.pas svneol=native#text/plain
+compiler/generic/cpuinfo.pas svneol=native#text/plain
 compiler/globals.pas svneol=native#text/plain
 compiler/globals.pas svneol=native#text/plain
 compiler/globtype.pas svneol=native#text/plain
 compiler/globtype.pas svneol=native#text/plain
 compiler/html/i386/readme.txt svneol=native#text/plain
 compiler/html/i386/readme.txt svneol=native#text/plain
@@ -285,6 +286,7 @@ compiler/msg/errorfi.msg svneol=native#text/plain
 compiler/msg/errorhe.msg svneol=native#text/plain
 compiler/msg/errorhe.msg svneol=native#text/plain
 compiler/msg/errorheu.msg svneol=native#text/plain
 compiler/msg/errorheu.msg svneol=native#text/plain
 compiler/msg/errorid.msg svneol=native#text/plain
 compiler/msg/errorid.msg svneol=native#text/plain
+compiler/msg/erroriu.msg svneol=native#text/plain
 compiler/msg/errorn.msg svneol=native#text/plain
 compiler/msg/errorn.msg svneol=native#text/plain
 compiler/msg/errorpl.msg svneol=native#text/plain
 compiler/msg/errorpl.msg svneol=native#text/plain
 compiler/msg/errorpli.msg svneol=native#text/plain
 compiler/msg/errorpli.msg svneol=native#text/plain
@@ -515,6 +517,7 @@ compiler/symsym.pas svneol=native#text/plain
 compiler/symtable.pas svneol=native#text/plain
 compiler/symtable.pas svneol=native#text/plain
 compiler/symtype.pas svneol=native#text/plain
 compiler/symtype.pas svneol=native#text/plain
 compiler/symutil.pas svneol=native#text/plain
 compiler/symutil.pas svneol=native#text/plain
+compiler/systems.inc svneol=native#text/plain
 compiler/systems.pas svneol=native#text/plain
 compiler/systems.pas svneol=native#text/plain
 compiler/systems/i_amiga.pas svneol=native#text/plain
 compiler/systems/i_amiga.pas svneol=native#text/plain
 compiler/systems/i_atari.pas svneol=native#text/plain
 compiler/systems/i_atari.pas svneol=native#text/plain
@@ -1627,6 +1630,7 @@ packages/dts/fpmake.pp svneol=native#text/plain
 packages/dts/src/dts.pas svneol=native#text/plain
 packages/dts/src/dts.pas svneol=native#text/plain
 packages/fastcgi/Makefile svneol=native#text/plain
 packages/fastcgi/Makefile svneol=native#text/plain
 packages/fastcgi/Makefile.fpc svneol=native#text/plain
 packages/fastcgi/Makefile.fpc svneol=native#text/plain
+packages/fastcgi/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fastcgi/fpmake.pp svneol=native#text/plain
 packages/fastcgi/fpmake.pp svneol=native#text/plain
 packages/fastcgi/src/fastcgi.pp svneol=native#text/plain
 packages/fastcgi/src/fastcgi.pp svneol=native#text/plain
 packages/fcl-async/Makefile svneol=native#text/plain
 packages/fcl-async/Makefile svneol=native#text/plain
@@ -1655,10 +1659,12 @@ packages/fcl-base/examples/crittest.pp svneol=native#text/plain
 packages/fcl-base/examples/daemon.txt svneol=native#text/plain
 packages/fcl-base/examples/daemon.txt svneol=native#text/plain
 packages/fcl-base/examples/dbugsrv.pp svneol=native#text/plain
 packages/fcl-base/examples/dbugsrv.pp svneol=native#text/plain
 packages/fcl-base/examples/debugtest.pp svneol=native#text/plain
 packages/fcl-base/examples/debugtest.pp svneol=native#text/plain
+packages/fcl-base/examples/decodeascii85.pp svneol=native#text/plain
 packages/fcl-base/examples/doecho.pp svneol=native#text/plain
 packages/fcl-base/examples/doecho.pp svneol=native#text/plain
 packages/fcl-base/examples/dparser.pp svneol=native#text/plain
 packages/fcl-base/examples/dparser.pp svneol=native#text/plain
 packages/fcl-base/examples/dsockcli.pp svneol=native#text/plain
 packages/fcl-base/examples/dsockcli.pp svneol=native#text/plain
 packages/fcl-base/examples/dsocksvr.pp svneol=native#text/plain
 packages/fcl-base/examples/dsocksvr.pp svneol=native#text/plain
+packages/fcl-base/examples/encodeascii85.pp svneol=native#text/plain
 packages/fcl-base/examples/fpdoc.dtd -text
 packages/fcl-base/examples/fpdoc.dtd -text
 packages/fcl-base/examples/fpexprpars.txt svneol=native#text/plain
 packages/fcl-base/examples/fpexprpars.txt svneol=native#text/plain
 packages/fcl-base/examples/fstream.pp svneol=native#text/plain
 packages/fcl-base/examples/fstream.pp svneol=native#text/plain
@@ -1708,6 +1714,7 @@ packages/fcl-base/examples/testcont.pp svneol=native#text/plain
 packages/fcl-base/examples/testexprpars.pp svneol=native#text/plain
 packages/fcl-base/examples/testexprpars.pp svneol=native#text/plain
 packages/fcl-base/examples/testez.pp svneol=native#text/plain
 packages/fcl-base/examples/testez.pp svneol=native#text/plain
 packages/fcl-base/examples/testhres.pp svneol=native#text/plain
 packages/fcl-base/examples/testhres.pp svneol=native#text/plain
+packages/fcl-base/examples/testmime.pp svneol=native#text/plain
 packages/fcl-base/examples/testnres.pp svneol=native#text/plain
 packages/fcl-base/examples/testnres.pp svneol=native#text/plain
 packages/fcl-base/examples/testol.pp svneol=native#text/plain
 packages/fcl-base/examples/testol.pp svneol=native#text/plain
 packages/fcl-base/examples/testproc.pp svneol=native#text/plain
 packages/fcl-base/examples/testproc.pp svneol=native#text/plain
@@ -1743,6 +1750,7 @@ packages/fcl-base/src/custapp.pp svneol=native#text/plain
 packages/fcl-base/src/dummy/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/dummy/eventlog.inc svneol=native#text/plain
 packages/fcl-base/src/eventlog.pp svneol=native#text/plain
 packages/fcl-base/src/eventlog.pp svneol=native#text/plain
 packages/fcl-base/src/fpexprpars.pp svneol=native#text/plain
 packages/fcl-base/src/fpexprpars.pp svneol=native#text/plain
+packages/fcl-base/src/fpmimetypes.pp svneol=native#text/plain
 packages/fcl-base/src/fptemplate.pp svneol=native#text/plain
 packages/fcl-base/src/fptemplate.pp svneol=native#text/plain
 packages/fcl-base/src/fptimer.pp svneol=native#text/plain
 packages/fcl-base/src/fptimer.pp svneol=native#text/plain
 packages/fcl-base/src/gettext.pp svneol=native#text/plain
 packages/fcl-base/src/gettext.pp svneol=native#text/plain
@@ -2193,6 +2201,7 @@ packages/fcl-process/src/dummy/simpleipc.inc svneol=native#text/plain
 packages/fcl-process/src/os2/pipes.inc svneol=native#text/plain
 packages/fcl-process/src/os2/pipes.inc svneol=native#text/plain
 packages/fcl-process/src/os2/simpleipc.inc svneol=native#text/plain
 packages/fcl-process/src/os2/simpleipc.inc svneol=native#text/plain
 packages/fcl-process/src/pipes.pp svneol=native#text/plain
 packages/fcl-process/src/pipes.pp svneol=native#text/plain
+packages/fcl-process/src/pipesipc.pp svneol=native#text/plain
 packages/fcl-process/src/process.pp svneol=native#text/plain
 packages/fcl-process/src/process.pp svneol=native#text/plain
 packages/fcl-process/src/process.txt svneol=native#text/plain
 packages/fcl-process/src/process.txt svneol=native#text/plain
 packages/fcl-process/src/simpleipc.pp svneol=native#text/plain
 packages/fcl-process/src/simpleipc.pp svneol=native#text/plain
@@ -2329,6 +2338,7 @@ packages/fcl-stl/src/gutil.pp svneol=native#text/plain
 packages/fcl-stl/src/gvector.pp svneol=native#text/plain
 packages/fcl-stl/src/gvector.pp svneol=native#text/plain
 packages/fcl-stl/tests/clean svneol=native#text/plain
 packages/fcl-stl/tests/clean svneol=native#text/plain
 packages/fcl-stl/tests/garrayutilstest.pp svneol=native#text/plain
 packages/fcl-stl/tests/garrayutilstest.pp svneol=native#text/plain
+packages/fcl-stl/tests/gcompositetest.pp svneol=native#text/plain
 packages/fcl-stl/tests/gdequetest.pp svneol=native#text/plain
 packages/fcl-stl/tests/gdequetest.pp svneol=native#text/plain
 packages/fcl-stl/tests/ghashmaptest.pp svneol=native#text/plain
 packages/fcl-stl/tests/ghashmaptest.pp svneol=native#text/plain
 packages/fcl-stl/tests/ghashsettest.pp svneol=native#text/plain
 packages/fcl-stl/tests/ghashsettest.pp svneol=native#text/plain
@@ -2345,8 +2355,7 @@ packages/fcl-stl/tests/suiteconfig.pp svneol=native#text/plain
 packages/fcl-stl/tests/testrunner.pp svneol=native#text/plain
 packages/fcl-stl/tests/testrunner.pp svneol=native#text/plain
 packages/fcl-web/Makefile svneol=native#text/plain
 packages/fcl-web/Makefile svneol=native#text/plain
 packages/fcl-web/Makefile.fpc svneol=native#text/plain
 packages/fcl-web/Makefile.fpc svneol=native#text/plain
-packages/fcl-web/Makefile.org svneol=native#text/plain
-packages/fcl-web/Makefile_fpmake.fpc svneol=native#text/plain
+packages/fcl-web/Makefile.fpc.fpcmake svneol=native#text/plain
 packages/fcl-web/examples/combined/combined.html svneol=native#text/plain
 packages/fcl-web/examples/combined/combined.html svneol=native#text/plain
 packages/fcl-web/examples/combined/combined.ico -text
 packages/fcl-web/examples/combined/combined.ico -text
 packages/fcl-web/examples/combined/combined.ini svneol=native#text/plain
 packages/fcl-web/examples/combined/combined.ini svneol=native#text/plain
@@ -2362,8 +2371,159 @@ packages/fcl-web/examples/combined/users.sql svneol=native#text/plain
 packages/fcl-web/examples/combined/wmlogin.lfm svneol=native#text/plain
 packages/fcl-web/examples/combined/wmlogin.lfm svneol=native#text/plain
 packages/fcl-web/examples/combined/wmlogin.pp svneol=native#text/plain
 packages/fcl-web/examples/combined/wmlogin.pp svneol=native#text/plain
 packages/fcl-web/examples/combined/wmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/combined/wmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/combined/wmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/combined/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/combined/wmusers.pp svneol=native#text/plain
+packages/fcl-web/examples/echo/README.txt svneol=native#text/plain
+packages/fcl-web/examples/echo/apache/echo.lpi svneol=native#text/plain
+packages/fcl-web/examples/echo/apache/echo.lpr svneol=native#text/plain
+packages/fcl-web/examples/echo/apache/echo.res -text
+packages/fcl-web/examples/echo/cgi/echo.lpi svneol=native#text/plain
+packages/fcl-web/examples/echo/cgi/echo.lpr svneol=native#text/plain
+packages/fcl-web/examples/echo/cgi/echo.res -text
+packages/fcl-web/examples/echo/fcgi/echo.lpi svneol=native#text/plain
+packages/fcl-web/examples/echo/fcgi/echo.lpr svneol=native#text/plain
+packages/fcl-web/examples/echo/fcgi/echo.res -text
+packages/fcl-web/examples/echo/webmodule/wmecho.lfm svneol=native#text/plain
+packages/fcl-web/examples/echo/webmodule/wmecho.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/apache/embedtemplates.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/apache/embedtemplates.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/apache/embedtemplates.res -text
+packages/fcl-web/examples/fptemplate/embedtemplates/cgi/embedtemplates.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/cgi/embedtemplates.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/cgi/embedtemplates.res -text
+packages/fcl-web/examples/fptemplate/embedtemplates/fcgi/embedtemplates.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/fcgi/embedtemplates.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/fcgi/embedtemplates.res -text
+packages/fcl-web/examples/fptemplate/embedtemplates/templates/body.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/templates/body_left.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/templates/body_right.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/templates/bottom.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/templates/maintemplate.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/templates/top.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/embedtemplates/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/apache/fileupload.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/apache/fileupload.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/apache/fileupload.res -text
+packages/fcl-web/examples/fptemplate/fileupload/cgi/fileupload.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/cgi/fileupload.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/cgi/fileupload.res -text
+packages/fcl-web/examples/fptemplate/fileupload/fcgi/fileupload.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/fcgi/fileupload.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/fcgi/fileupload.res -text
+packages/fcl-web/examples/fptemplate/fileupload/templates/uploadform.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/fileupload/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/apache/listrecords.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/apache/listrecords.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/apache/listrecords.res -text
+packages/fcl-web/examples/fptemplate/listrecords/cgi/listrecords.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/cgi/listrecords.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/cgi/listrecords.res -text
+packages/fcl-web/examples/fptemplate/listrecords/fcgi/listrecords.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/fcgi/listrecords.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/fcgi/listrecords.res -text
+packages/fcl-web/examples/fptemplate/listrecords/templates/mytemplate3.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/listrecords/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/apache/autosession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/apache/autosession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/apache/autosession.res -text
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/cgi/autosession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/cgi/autosession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/cgi/autosession.res -text
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/fcgi/autosession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/fcgi/autosession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/fcgi/autosession.res -text
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/templates/autosession-template.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-auto/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/apache/cookiesession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/apache/cookiesession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/apache/cookiesession.res -text
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/cgi/cookiesession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/cgi/cookiesession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/cgi/cookiesession.res -text
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/fcgi/cookiesession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/fcgi/cookiesession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/fcgi/cookiesession.res -text
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/templates/testlogin.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/templates/testlogout.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/templates/testsomepage.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/templates/testwelcome.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/templates/userdb.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/cookiesessions-login/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/apache/urlsession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/apache/urlsession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/apache/urlsession.res -text
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/cgi/urlsession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/cgi/urlsession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/cgi/urlsession.res -text
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/fcgi/urlsession.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/fcgi/urlsession.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/fcgi/urlsession.res -text
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/templates/testurllogin.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/templates/testurllogout.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/templates/testurlsomepage.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/templates/testurlwelcome.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/templates/userdb.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/sessions/urlsessions-login/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/apache/simpletemplate.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/apache/simpletemplate.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/apache/simpletemplate.res -text
+packages/fcl-web/examples/fptemplate/simpletemplate/cgi/simpletemplate.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/cgi/simpletemplate.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/cgi/simpletemplate.res -text
+packages/fcl-web/examples/fptemplate/simpletemplate/fcgi/simpletemplate.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/fcgi/simpletemplate.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/fcgi/simpletemplate.res -text
+packages/fcl-web/examples/fptemplate/simpletemplate/templates/mytemplate1.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/simpletemplate/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/README.txt svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/apache/tagparam.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/apache/tagparam.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/apache/tagparam.res -text
+packages/fcl-web/examples/fptemplate/tagparam/cgi/tagparam.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/cgi/tagparam.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/cgi/tagparam.res -text
+packages/fcl-web/examples/fptemplate/tagparam/fcgi/tagparam.lpi svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/fcgi/tagparam.lpr svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/fcgi/tagparam.res -text
+packages/fcl-web/examples/fptemplate/tagparam/templates/mytemplate2.html svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/fptemplate/tagparam/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/helloworld/README.txt svneol=native#text/plain
+packages/fcl-web/examples/helloworld/apache/helloworld.lpi svneol=native#text/plain
+packages/fcl-web/examples/helloworld/apache/helloworld.lpr svneol=native#text/plain
+packages/fcl-web/examples/helloworld/apache/helloworld.res -text
+packages/fcl-web/examples/helloworld/cgi/helloworld.lpi svneol=native#text/plain
+packages/fcl-web/examples/helloworld/cgi/helloworld.lpr svneol=native#text/plain
+packages/fcl-web/examples/helloworld/cgi/helloworld.res -text
+packages/fcl-web/examples/helloworld/fcgi/helloworld.lpi svneol=native#text/plain
+packages/fcl-web/examples/helloworld/fcgi/helloworld.lpr svneol=native#text/plain
+packages/fcl-web/examples/helloworld/fcgi/helloworld.res -text
+packages/fcl-web/examples/helloworld/webmodule/webmodule.lfm svneol=native#text/plain
+packages/fcl-web/examples/helloworld/webmodule/webmodule.pas svneol=native#text/plain
+packages/fcl-web/examples/httpapp/testhttp.lpi svneol=native#text/plain
+packages/fcl-web/examples/httpapp/testhttp.pp svneol=native#text/plain
+packages/fcl-web/examples/httpclient/httpget.lpi svneol=native#text/plain
+packages/fcl-web/examples/httpclient/httpget.pas svneol=native#text/plain
+packages/fcl-web/examples/httpclient/httppost.lpi svneol=native#text/plain
+packages/fcl-web/examples/httpclient/httppost.pp svneol=native#text/plain
+packages/fcl-web/examples/httpclient/httppostfile.lpi svneol=native#text/plain
+packages/fcl-web/examples/httpclient/httppostfile.pp svneol=native#text/plain
+packages/fcl-web/examples/httpserver/simplehttpserver.lpi svneol=native#text/plain
+packages/fcl-web/examples/httpserver/simplehttpserver.pas svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/README.txt svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/README.txt svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/demo.lpi svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/demo.lpi svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/demo.lpr svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/demo.lpr svneol=native#text/plain
@@ -2372,7 +2532,6 @@ packages/fcl-web/examples/jsonrpc/demo1/echobatch.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/extdirect.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/extdirect.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/notification.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/notification.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/wmdemo.lfm svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/wmdemo.lfm svneol=native#text/plain
-packages/fcl-web/examples/jsonrpc/demo1/wmdemo.lrs svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/wmdemo.pp svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/demo1/wmdemo.pp svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdemo.html svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdemo.html svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdemo.js svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdemo.js svneol=native#text/plain
@@ -2380,8 +2539,11 @@ packages/fcl-web/examples/jsonrpc/extdirect/extdemo.lpi svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdemo.lpr svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdemo.lpr svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdirect.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/extdirect.in svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/wmext.lfm svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/wmext.lfm svneol=native#text/plain
-packages/fcl-web/examples/jsonrpc/extdirect/wmext.lrs svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/wmext.pp svneol=native#text/plain
 packages/fcl-web/examples/jsonrpc/extdirect/wmext.pp svneol=native#text/plain
+packages/fcl-web/examples/session/sessiondemo.lpi svneol=native#text/plain
+packages/fcl-web/examples/session/sessiondemo.lpr svneol=native#text/plain
+packages/fcl-web/examples/session/wmsession.lfm svneol=native#text/plain
+packages/fcl-web/examples/session/wmsession.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/createusers.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/createusers.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/createusers.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/createusers.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/extgrid-json.html svneol=native#text/plain
@@ -2393,7 +2555,6 @@ packages/fcl-web/examples/webdata/demo/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/lazwebdata.pas svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/lazwebdata.pas svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/reglazwebdata.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/reglazwebdata.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/wmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/wmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo/wmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid-json.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid-json.js svneol=native#text/plain
@@ -2402,7 +2563,6 @@ packages/fcl-web/examples/webdata/demo2/extgrid-xml.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/wmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/wmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo2/wmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo2/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid-json.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid-json.js svneol=native#text/plain
@@ -2411,13 +2571,10 @@ packages/fcl-web/examples/webdata/demo3/extgrid-xml.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/tralala.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/tralala.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo3/tralala.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/tralala.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/tralala.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/wmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/wmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo3/wmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo3/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/dmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/dmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo4/dmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/dmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/dmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid-json.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid-json.js svneol=native#text/plain
@@ -2426,10 +2583,8 @@ packages/fcl-web/examples/webdata/demo4/extgrid-xml.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmjsonusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmjsonusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo4/wmjsonusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmjsonusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmjsonusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmxmlusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmxmlusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo4/wmxmlusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmxmlusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo4/wmxmlusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid-json.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid-json.js svneol=native#text/plain
@@ -2438,7 +2593,6 @@ packages/fcl-web/examples/webdata/demo5/extgrid-xml.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/wmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/wmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo5/wmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo5/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid-json.html svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid-json.js svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid-json.js svneol=native#text/plain
@@ -2448,17 +2602,18 @@ packages/fcl-web/examples/webdata/demo6/extgrid.ini svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid.lpi svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/extgrid.lpr svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/wmusers.lfm svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/wmusers.lfm svneol=native#text/plain
-packages/fcl-web/examples/webdata/demo6/wmusers.lrs svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demo6/wmusers.pp svneol=native#text/plain
 packages/fcl-web/examples/webdata/demos.txt svneol=native#text/plain
 packages/fcl-web/examples/webdata/demos.txt svneol=native#text/plain
 packages/fcl-web/examples/webdata/users.dbf -text
 packages/fcl-web/examples/webdata/users.dbf -text
 packages/fcl-web/fpmake.pp svneol=native#text/plain
 packages/fcl-web/fpmake.pp svneol=native#text/plain
+packages/fcl-web/src/base/FCGI-README.txt svneol=native#text/plain
 packages/fcl-web/src/base/Makefile svneol=native#text/plain
 packages/fcl-web/src/base/Makefile svneol=native#text/plain
 packages/fcl-web/src/base/Makefile.fpc svneol=native#text/plain
 packages/fcl-web/src/base/Makefile.fpc svneol=native#text/plain
 packages/fcl-web/src/base/README.txt svneol=native#text/plain
 packages/fcl-web/src/base/README.txt svneol=native#text/plain
 packages/fcl-web/src/base/cgiapp.pp svneol=native#text/plain
 packages/fcl-web/src/base/cgiapp.pp svneol=native#text/plain
 packages/fcl-web/src/base/custcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/custcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/custfcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/custfcgi.pp svneol=native#text/plain
+packages/fcl-web/src/base/custhttpapp.pp svneol=native#text/plain
 packages/fcl-web/src/base/custweb.pp svneol=native#text/plain
 packages/fcl-web/src/base/custweb.pp svneol=native#text/plain
 packages/fcl-web/src/base/ezcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/ezcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/fcgigate.pp svneol=native#text/plain
 packages/fcl-web/src/base/fcgigate.pp svneol=native#text/plain
@@ -2468,8 +2623,13 @@ packages/fcl-web/src/base/fpdatasetform.pp svneol=native#text/plain
 packages/fcl-web/src/base/fpfcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/fpfcgi.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphtml.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphtml.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphttp.pp svneol=native#text/plain
 packages/fcl-web/src/base/fphttp.pp svneol=native#text/plain
+packages/fcl-web/src/base/fphttpapp.pp svneol=native#text/plain
+packages/fcl-web/src/base/fphttpclient.pp svneol=native#text/plain
+packages/fcl-web/src/base/fphttpserver.pp svneol=native#text/plain
 packages/fcl-web/src/base/fpweb.pp svneol=native#text/plain
 packages/fcl-web/src/base/fpweb.pp svneol=native#text/plain
+packages/fcl-web/src/base/fpwebfile.pp svneol=native#text/plain
 packages/fcl-web/src/base/httpdefs.pp svneol=native#text/plain
 packages/fcl-web/src/base/httpdefs.pp svneol=native#text/plain
+packages/fcl-web/src/base/iniwebsession.pp svneol=native#text/plain
 packages/fcl-web/src/base/webpage.pp svneol=native#text/plain
 packages/fcl-web/src/base/webpage.pp svneol=native#text/plain
 packages/fcl-web/src/base/websession.pp svneol=native#text/plain
 packages/fcl-web/src/base/websession.pp svneol=native#text/plain
 packages/fcl-web/src/base/webutil.pp svneol=native#text/plain
 packages/fcl-web/src/base/webutil.pp svneol=native#text/plain
@@ -2568,6 +2728,22 @@ packages/fpmkunit/Makefile.fpc svneol=native#text/plain
 packages/fpmkunit/examples/ppu2fpmake.sh svneol=native#text/plain
 packages/fpmkunit/examples/ppu2fpmake.sh svneol=native#text/plain
 packages/fpmkunit/fpmake.pp svneol=native#text/plain
 packages/fpmkunit/fpmake.pp svneol=native#text/plain
 packages/fpmkunit/src/fpmkunit.pp svneol=native#text/plain
 packages/fpmkunit/src/fpmkunit.pp svneol=native#text/plain
+packages/fppkg/Makefile svneol=native#text/plain
+packages/fppkg/Makefile.fpc svneol=native#text/plain
+packages/fppkg/src/fpmkunitsrc.inc svneol=native#text/plain
+packages/fppkg/src/fprepos.pp svneol=native#text/plain
+packages/fppkg/src/fpxmlrep.pp svneol=native#text/plain
+packages/fppkg/src/pkgcommands.pp svneol=native#text/plain
+packages/fppkg/src/pkgdownload.pp svneol=native#text/plain
+packages/fppkg/src/pkgfphttp.pp svneol=native#text/plain
+packages/fppkg/src/pkgfpmake.pp svneol=native#text/plain
+packages/fppkg/src/pkgglobals.pp svneol=native#text/plain
+packages/fppkg/src/pkghandler.pp svneol=native#text/plain
+packages/fppkg/src/pkgmessages.pp svneol=native#text/plain
+packages/fppkg/src/pkgmkconv.pp svneol=native#text/plain
+packages/fppkg/src/pkgoptions.pp svneol=native#text/plain
+packages/fppkg/src/pkgrepos.pp svneol=native#text/plain
+packages/fppkg/src/pkgwget.pp svneol=native#text/plain
 packages/fpvectorial/Makefile svneol=native#text/plain
 packages/fpvectorial/Makefile svneol=native#text/plain
 packages/fpvectorial/Makefile.fpc svneol=native#text/plain
 packages/fpvectorial/Makefile.fpc svneol=native#text/plain
 packages/fpvectorial/examples/fpce_mainform.lfm svneol=native#text/plain
 packages/fpvectorial/examples/fpce_mainform.lfm svneol=native#text/plain
@@ -2580,6 +2756,8 @@ packages/fpvectorial/examples/fpvc_mainform.pas svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.ico -text
 packages/fpvectorial/examples/fpvectorialconverter.ico -text
 packages/fpvectorial/examples/fpvectorialconverter.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.lpr svneol=native#text/plain
 packages/fpvectorial/examples/fpvectorialconverter.lpr svneol=native#text/plain
+packages/fpvectorial/examples/fpvmodifytest.lpi svneol=native#text/plain
+packages/fpvectorial/examples/fpvmodifytest.pas svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.lpi svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.pas svneol=native#text/plain
 packages/fpvectorial/examples/fpvwritetest.pas svneol=native#text/plain
 packages/fpvectorial/fpmake.pp svneol=native#text/plain
 packages/fpvectorial/fpmake.pp svneol=native#text/plain
@@ -2588,13 +2766,16 @@ packages/fpvectorial/src/avisocncgcodewriter.pas svneol=native#text/pascal
 packages/fpvectorial/src/avisozlib.pas svneol=native#text/pascal
 packages/fpvectorial/src/avisozlib.pas svneol=native#text/pascal
 packages/fpvectorial/src/cdrvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/cdrvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/dxfvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/dxfvectorialreader.pas svneol=native#text/pascal
+packages/fpvectorial/src/epsvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/fpvectbuildunit.pas svneol=native#text/pascal
 packages/fpvectorial/src/fpvectbuildunit.pas svneol=native#text/pascal
 packages/fpvectorial/src/fpvectorial.pas svneol=native#text/pascal
 packages/fpvectorial/src/fpvectorial.pas svneol=native#text/pascal
 packages/fpvectorial/src/fpvtocanvas.pas svneol=native#text/pascal
 packages/fpvectorial/src/fpvtocanvas.pas svneol=native#text/pascal
+packages/fpvectorial/src/fpvutils.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvrlexico.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvrlexico.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvrsemantico.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvrsemantico.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvrsintatico.pas svneol=native#text/pascal
 packages/fpvectorial/src/pdfvrsintatico.pas svneol=native#text/pascal
+packages/fpvectorial/src/svgvectorialreader.pas svneol=native#text/pascal
 packages/fpvectorial/src/svgvectorialwriter.pas svneol=native#text/pascal
 packages/fpvectorial/src/svgvectorialwriter.pas svneol=native#text/pascal
 packages/fuse/Makefile svneol=native#text/plain
 packages/fuse/Makefile svneol=native#text/plain
 packages/fuse/Makefile.fpc svneol=native#text/plain
 packages/fuse/Makefile.fpc svneol=native#text/plain
@@ -6306,6 +6487,7 @@ packages/winunits-base/src/shfolder.pp svneol=native#text/plain
 packages/winunits-base/src/shlobj.pp svneol=native#text/plain
 packages/winunits-base/src/shlobj.pp svneol=native#text/plain
 packages/winunits-base/src/tmschema.inc svneol=native#text/plain
 packages/winunits-base/src/tmschema.inc svneol=native#text/plain
 packages/winunits-base/src/uxtheme.pp svneol=native#text/plain
 packages/winunits-base/src/uxtheme.pp svneol=native#text/plain
+packages/winunits-base/src/win9xwsmanager.pp svneol=native#text/pascal
 packages/winunits-base/src/wininet.pp svneol=native#text/plain
 packages/winunits-base/src/wininet.pp svneol=native#text/plain
 packages/winunits-base/src/winspool.pp svneol=native#text/pascal
 packages/winunits-base/src/winspool.pp svneol=native#text/pascal
 packages/winunits-base/src/winutils.pp svneol=native#text/pascal
 packages/winunits-base/src/winutils.pp svneol=native#text/pascal
@@ -6810,6 +6992,8 @@ rtl/embedded/arm/at91sam7x256.pp svneol=native#text/plain
 rtl/embedded/arm/lpc21x4.pp svneol=native#text/plain
 rtl/embedded/arm/lpc21x4.pp svneol=native#text/plain
 rtl/embedded/arm/stellaris.pp svneol=native#text/plain
 rtl/embedded/arm/stellaris.pp svneol=native#text/plain
 rtl/embedded/arm/stm32f103.pp svneol=native#text/plain
 rtl/embedded/arm/stm32f103.pp svneol=native#text/plain
+rtl/embedded/avr/atmega128.pp svneol=native#text/plain
+rtl/embedded/avr/start.inc svneol=native#text/plain
 rtl/embedded/check.inc svneol=native#text/plain
 rtl/embedded/check.inc svneol=native#text/plain
 rtl/embedded/empty.cfg svneol=native#text/plain
 rtl/embedded/empty.cfg svneol=native#text/plain
 rtl/embedded/rtl.cfg svneol=native#text/plain
 rtl/embedded/rtl.cfg svneol=native#text/plain
@@ -8355,6 +8539,7 @@ tests/tbf/tb0217.pp svneol=native#text/plain
 tests/tbf/tb0218.pp svneol=native#text/plain
 tests/tbf/tb0218.pp svneol=native#text/plain
 tests/tbf/tb0219.pp svneol=native#text/pascal
 tests/tbf/tb0219.pp svneol=native#text/pascal
 tests/tbf/tb0220.pp svneol=native#text/plain
 tests/tbf/tb0220.pp svneol=native#text/plain
+tests/tbf/tb0221.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
@@ -8926,6 +9111,8 @@ tests/tbs/tb0571.pas svneol=native#text/plain
 tests/tbs/tb0572.pp svneol=native#text/plain
 tests/tbs/tb0572.pp svneol=native#text/plain
 tests/tbs/tb0573.pp svneol=native#text/plain
 tests/tbs/tb0573.pp svneol=native#text/plain
 tests/tbs/tb0574.pp svneol=native#text/pascal
 tests/tbs/tb0574.pp svneol=native#text/pascal
+tests/tbs/tb0575.pp svneol=native#text/plain
+tests/tbs/tb0576.pp svneol=native#text/plain
 tests/tbs/tb205.pp svneol=native#text/plain
 tests/tbs/tb205.pp svneol=native#text/plain
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain
@@ -9449,6 +9636,20 @@ tests/test/cg/variants/tvarol96.pp svneol=native#text/plain
 tests/test/dumpclass.pp svneol=native#text/plain
 tests/test/dumpclass.pp svneol=native#text/plain
 tests/test/dumpmethods.pp svneol=native#text/plain
 tests/test/dumpmethods.pp svneol=native#text/plain
 tests/test/lcpref.inc svneol=native#text/plain
 tests/test/lcpref.inc svneol=native#text/plain
+tests/test/library/testdll.pp svneol=native#text/plain
+tests/test/library/testdll2.pp svneol=native#text/plain
+tests/test/library/tlib1a.pp svneol=native#text/plain
+tests/test/library/tlib1a2.pp svneol=native#text/plain
+tests/test/library/tlib1b.pp svneol=native#text/plain
+tests/test/library/tlib2b.pp svneol=native#text/plain
+tests/test/library/tlib3a.pp svneol=native#text/plain
+tests/test/library/tlib3b.pp svneol=native#text/plain
+tests/test/library/tlib3c.pp svneol=native#text/plain
+tests/test/library/tlib3d.pp svneol=native#text/plain
+tests/test/library/ttdllexe.pp svneol=native#text/plain
+tests/test/library/ttdlltest.pp svneol=native#text/plain
+tests/test/library/ulib2a.pp svneol=native#text/plain
+tests/test/library/ulib2b.pp svneol=native#text/plain
 tests/test/opt/README.txt svneol=native#text/plain
 tests/test/opt/README.txt svneol=native#text/plain
 tests/test/opt/tarmshift.pp svneol=native#text/plain
 tests/test/opt/tarmshift.pp svneol=native#text/plain
 tests/test/opt/tcaseopt1.pp svneol=native#text/plain
 tests/test/opt/tcaseopt1.pp svneol=native#text/plain
@@ -9528,6 +9729,12 @@ tests/test/tarray6.pp svneol=native#text/plain
 tests/test/tarray7.pp svneol=native#text/plain
 tests/test/tarray7.pp svneol=native#text/plain
 tests/test/tarray8.pp svneol=native#text/plain
 tests/test/tarray8.pp svneol=native#text/plain
 tests/test/tarray9.pp svneol=native#text/plain
 tests/test/tarray9.pp svneol=native#text/plain
+tests/test/tasm1.pp svneol=native#text/plain
+tests/test/tasm2.pp svneol=native#text/plain
+tests/test/tasm3.pp svneol=native#text/plain
+tests/test/tasm4.pp svneol=native#text/plain
+tests/test/tasm5.pp svneol=native#text/plain
+tests/test/tasm6.pp svneol=native#text/plain
 tests/test/tasmread.pp svneol=native#text/plain
 tests/test/tasmread.pp svneol=native#text/plain
 tests/test/tasout.pp svneol=native#text/plain
 tests/test/tasout.pp svneol=native#text/plain
 tests/test/tassignmentoperator1.pp svneol=native#text/pascal
 tests/test/tassignmentoperator1.pp svneol=native#text/pascal
@@ -9670,6 +9877,7 @@ tests/test/tclass8.pp svneol=native#text/plain
 tests/test/tclass9.pp svneol=native#text/pascal
 tests/test/tclass9.pp svneol=native#text/pascal
 tests/test/tclassinfo1.pp svneol=native#text/pascal
 tests/test/tclassinfo1.pp svneol=native#text/pascal
 tests/test/tclrprop.pp svneol=native#text/plain
 tests/test/tclrprop.pp svneol=native#text/plain
+tests/test/tcmov1.pp svneol=native#text/plain
 tests/test/tcmp.pp svneol=native#text/plain
 tests/test/tcmp.pp svneol=native#text/plain
 tests/test/tcmp0.pp svneol=native#text/plain
 tests/test/tcmp0.pp svneol=native#text/plain
 tests/test/tconstref1.pp svneol=native#text/pascal
 tests/test/tconstref1.pp svneol=native#text/pascal
@@ -9692,6 +9900,10 @@ tests/test/tenum5.pp svneol=native#text/plain
 tests/test/tenum6.pp svneol=native#text/pascal
 tests/test/tenum6.pp svneol=native#text/pascal
 tests/test/tenumerators1.pp svneol=native#text/pascal
 tests/test/tenumerators1.pp svneol=native#text/pascal
 tests/test/terecs1.pp svneol=native#text/pascal
 tests/test/terecs1.pp svneol=native#text/pascal
+tests/test/terecs10.pp svneol=native#text/pascal
+tests/test/terecs11.pp svneol=native#text/pascal
+tests/test/terecs12.pp svneol=native#text/pascal
+tests/test/terecs13.pp svneol=native#text/pascal
 tests/test/terecs2.pp svneol=native#text/pascal
 tests/test/terecs2.pp svneol=native#text/pascal
 tests/test/terecs3.pp svneol=native#text/pascal
 tests/test/terecs3.pp svneol=native#text/pascal
 tests/test/terecs4.pp svneol=native#text/pascal
 tests/test/terecs4.pp svneol=native#text/pascal
@@ -9892,6 +10104,8 @@ tests/test/tisogoto3.pp svneol=native#text/pascal
 tests/test/tisogoto4.pp svneol=native#text/pascal
 tests/test/tisogoto4.pp svneol=native#text/pascal
 tests/test/tlib1a.pp svneol=native#text/plain
 tests/test/tlib1a.pp svneol=native#text/plain
 tests/test/tlib1b.pp svneol=native#text/plain
 tests/test/tlib1b.pp svneol=native#text/plain
+tests/test/tlib2a.pp svneol=native#text/plain
+tests/test/tlib2b.pp svneol=native#text/plain
 tests/test/tlibrary1.pp svneol=native#text/plain
 tests/test/tlibrary1.pp svneol=native#text/plain
 tests/test/tlibrary2.pp svneol=native#text/plain
 tests/test/tlibrary2.pp svneol=native#text/plain
 tests/test/tlibrary3.pp svneol=native#text/plain
 tests/test/tlibrary3.pp svneol=native#text/plain
@@ -10157,6 +10371,9 @@ tests/test/trhlp8.pp svneol=native#text/pascal
 tests/test/trhlp9.pp svneol=native#text/pascal
 tests/test/trhlp9.pp svneol=native#text/pascal
 tests/test/trox1.pp svneol=native#text/plain
 tests/test/trox1.pp svneol=native#text/plain
 tests/test/trox2.pp svneol=native#text/plain
 tests/test/trox2.pp svneol=native#text/plain
+tests/test/trox3.pp svneol=native#text/pascal
+tests/test/trox4.pp svneol=native#text/pascal
+tests/test/trox5.pp svneol=native#text/pascal
 tests/test/trstr1.pp svneol=native#text/plain
 tests/test/trstr1.pp svneol=native#text/plain
 tests/test/trstr2.pp svneol=native#text/plain
 tests/test/trstr2.pp svneol=native#text/plain
 tests/test/trstr3.pp svneol=native#text/plain
 tests/test/trstr3.pp svneol=native#text/plain
@@ -10202,6 +10419,7 @@ tests/test/tstatic2.pp svneol=native#text/pascal
 tests/test/tstatic3.pp svneol=native#text/pascal
 tests/test/tstatic3.pp svneol=native#text/pascal
 tests/test/tstatic4.pp svneol=native#text/pascal
 tests/test/tstatic4.pp svneol=native#text/pascal
 tests/test/tstatic5.pp svneol=native#text/pascal
 tests/test/tstatic5.pp svneol=native#text/pascal
+tests/test/tstdhandle.pp svneol=native#text/plain
 tests/test/tstprocv.pp svneol=native#text/plain
 tests/test/tstprocv.pp svneol=native#text/plain
 tests/test/tstring1.pp svneol=native#text/plain
 tests/test/tstring1.pp svneol=native#text/plain
 tests/test/tstring10.pp svneol=native#text/plain
 tests/test/tstring10.pp svneol=native#text/plain
@@ -10283,6 +10501,7 @@ tests/test/uimpluni1.pp svneol=native#text/plain
 tests/test/uimpluni2.pp svneol=native#text/plain
 tests/test/uimpluni2.pp svneol=native#text/plain
 tests/test/uinline4a.pp svneol=native#text/plain
 tests/test/uinline4a.pp svneol=native#text/plain
 tests/test/uinline4b.pp svneol=native#text/plain
 tests/test/uinline4b.pp svneol=native#text/plain
+tests/test/ulib2a.pp svneol=native#text/plain
 tests/test/umaclocalprocparam3f.pp svneol=native#text/plain
 tests/test/umaclocalprocparam3f.pp svneol=native#text/plain
 tests/test/umacpas1.pp svneol=native#text/plain
 tests/test/umacpas1.pp svneol=native#text/plain
 tests/test/umainnam.pp svneol=native#text/plain
 tests/test/umainnam.pp svneol=native#text/plain
@@ -10580,6 +10799,7 @@ tests/webtbf/tw15391a.pp svneol=native#text/plain
 tests/webtbf/tw15447.pp svneol=native#text/plain
 tests/webtbf/tw15447.pp svneol=native#text/plain
 tests/webtbf/tw15594a.pp svneol=native#text/plain
 tests/webtbf/tw15594a.pp svneol=native#text/plain
 tests/webtbf/tw15594b.pp svneol=native#text/plain
 tests/webtbf/tw15594b.pp svneol=native#text/plain
+tests/webtbf/tw15672.pp svneol=native#text/plain
 tests/webtbf/tw15727b.pp svneol=native#text/plain
 tests/webtbf/tw15727b.pp svneol=native#text/plain
 tests/webtbf/tw15777b.pp svneol=native#text/plain
 tests/webtbf/tw15777b.pp svneol=native#text/plain
 tests/webtbf/tw1599.pp svneol=native#text/plain
 tests/webtbf/tw1599.pp svneol=native#text/plain
@@ -10611,6 +10831,7 @@ tests/webtbf/tw1905.pp svneol=native#text/plain
 tests/webtbf/tw1927.pp svneol=native#text/plain
 tests/webtbf/tw1927.pp svneol=native#text/plain
 tests/webtbf/tw1928.pp svneol=native#text/plain
 tests/webtbf/tw1928.pp svneol=native#text/plain
 tests/webtbf/tw1939.pp svneol=native#text/plain
 tests/webtbf/tw1939.pp svneol=native#text/plain
+tests/webtbf/tw19463.pp svneol=native#text/pascal
 tests/webtbf/tw1949.pp svneol=native#text/plain
 tests/webtbf/tw1949.pp svneol=native#text/plain
 tests/webtbf/tw1969.pp svneol=native#text/plain
 tests/webtbf/tw1969.pp svneol=native#text/plain
 tests/webtbf/tw1995.pp svneol=native#text/plain
 tests/webtbf/tw1995.pp svneol=native#text/plain
@@ -11290,6 +11511,7 @@ tests/webtbs/tw16090.pp svneol=native#text/pascal
 tests/webtbs/tw16100.pp svneol=native#text/pascal
 tests/webtbs/tw16100.pp svneol=native#text/pascal
 tests/webtbs/tw16108.pp svneol=native#text/plain
 tests/webtbs/tw16108.pp svneol=native#text/plain
 tests/webtbs/tw16130.pp svneol=native#text/pascal
 tests/webtbs/tw16130.pp svneol=native#text/pascal
+tests/webtbs/tw16160.pp svneol=native#text/pascal
 tests/webtbs/tw16161.pp svneol=native#text/pascal
 tests/webtbs/tw16161.pp svneol=native#text/pascal
 tests/webtbs/tw16163.pp svneol=native#text/plain
 tests/webtbs/tw16163.pp svneol=native#text/plain
 tests/webtbs/tw1617.pp svneol=native#text/plain
 tests/webtbs/tw1617.pp svneol=native#text/plain
@@ -11374,6 +11596,7 @@ tests/webtbs/tw17646.pp svneol=native#text/plain
 tests/webtbs/tw1765.pp svneol=native#text/plain
 tests/webtbs/tw1765.pp svneol=native#text/plain
 tests/webtbs/tw17675.pp svneol=native#text/plain
 tests/webtbs/tw17675.pp svneol=native#text/plain
 tests/webtbs/tw17675a.pp svneol=native#text/plain
 tests/webtbs/tw17675a.pp svneol=native#text/plain
+tests/webtbs/tw17710.pp svneol=native#text/pascal
 tests/webtbs/tw17714.pp svneol=native#text/plain
 tests/webtbs/tw17714.pp svneol=native#text/plain
 tests/webtbs/tw17715.pp svneol=native#text/plain
 tests/webtbs/tw17715.pp svneol=native#text/plain
 tests/webtbs/tw1779.pp svneol=native#text/plain
 tests/webtbs/tw1779.pp svneol=native#text/plain
@@ -11431,6 +11654,7 @@ tests/webtbs/tw1883.pp svneol=native#text/plain
 tests/webtbs/tw18859.pp svneol=native#text/plain
 tests/webtbs/tw18859.pp svneol=native#text/plain
 tests/webtbs/tw1888.pp svneol=native#text/plain
 tests/webtbs/tw1888.pp svneol=native#text/plain
 tests/webtbs/tw1889.pp svneol=native#text/plain
 tests/webtbs/tw1889.pp svneol=native#text/plain
+tests/webtbs/tw18909.pp svneol=native#text/pascal
 tests/webtbs/tw1896.pp svneol=native#text/plain
 tests/webtbs/tw1896.pp svneol=native#text/plain
 tests/webtbs/tw1901.pp svneol=native#text/plain
 tests/webtbs/tw1901.pp svneol=native#text/plain
 tests/webtbs/tw1902.pp svneol=native#text/plain
 tests/webtbs/tw1902.pp svneol=native#text/plain
@@ -11442,10 +11666,13 @@ tests/webtbs/tw1910.pp svneol=native#text/plain
 tests/webtbs/tw1915.pp svneol=native#text/plain
 tests/webtbs/tw1915.pp svneol=native#text/plain
 tests/webtbs/tw1917.pp svneol=native#text/plain
 tests/webtbs/tw1917.pp svneol=native#text/plain
 tests/webtbs/tw1920.pp svneol=native#text/plain
 tests/webtbs/tw1920.pp svneol=native#text/plain
+tests/webtbs/tw19201.pp svneol=native#text/pascal
 tests/webtbs/tw1923.pp svneol=native#text/plain
 tests/webtbs/tw1923.pp svneol=native#text/plain
+tests/webtbs/tw19277.pp svneol=native#text/pascal
 tests/webtbs/tw1930.pp svneol=native#text/plain
 tests/webtbs/tw1930.pp svneol=native#text/plain
 tests/webtbs/tw1931.pp svneol=native#text/plain
 tests/webtbs/tw1931.pp svneol=native#text/plain
 tests/webtbs/tw1932.pp svneol=native#text/plain
 tests/webtbs/tw1932.pp svneol=native#text/plain
+tests/webtbs/tw19325.pp svneol=native#text/pascal
 tests/webtbs/tw1935.pp svneol=native#text/plain
 tests/webtbs/tw1935.pp svneol=native#text/plain
 tests/webtbs/tw1936.pp svneol=native#text/plain
 tests/webtbs/tw1936.pp svneol=native#text/plain
 tests/webtbs/tw1938.pp svneol=native#text/plain
 tests/webtbs/tw1938.pp svneol=native#text/plain
@@ -12271,6 +12498,8 @@ tests/webtbs/uw17493.pp svneol=native#text/plain
 tests/webtbs/uw17950.pas svneol=native#text/pascal
 tests/webtbs/uw17950.pas svneol=native#text/pascal
 tests/webtbs/uw18087a.pp svneol=native#text/pascal
 tests/webtbs/uw18087a.pp svneol=native#text/pascal
 tests/webtbs/uw18087b.pp svneol=native#text/pascal
 tests/webtbs/uw18087b.pp svneol=native#text/pascal
+tests/webtbs/uw18909a.pp svneol=native#text/pascal
+tests/webtbs/uw18909b.pp svneol=native#text/pascal
 tests/webtbs/uw2004.inc svneol=native#text/plain
 tests/webtbs/uw2004.inc svneol=native#text/plain
 tests/webtbs/uw2040.pp svneol=native#text/plain
 tests/webtbs/uw2040.pp svneol=native#text/plain
 tests/webtbs/uw2266a.inc svneol=native#text/plain
 tests/webtbs/uw2266a.inc svneol=native#text/plain
@@ -12489,11 +12718,8 @@ utils/fppkg/examples/rep2xml.lpi svneol=native#text/plain
 utils/fppkg/examples/rep2xml.lpr svneol=native#text/plain
 utils/fppkg/examples/rep2xml.lpr svneol=native#text/plain
 utils/fppkg/examples/testdownload.pp svneol=native#text/plain
 utils/fppkg/examples/testdownload.pp svneol=native#text/plain
 utils/fppkg/examples/testrep.pp svneol=native#text/plain
 utils/fppkg/examples/testrep.pp svneol=native#text/plain
-utils/fppkg/fpmkunitsrc.inc svneol=native#text/plain
 utils/fppkg/fppkg.lpi svneol=native#text/plain
 utils/fppkg/fppkg.lpi svneol=native#text/plain
 utils/fppkg/fppkg.pp svneol=native#text/plain
 utils/fppkg/fppkg.pp svneol=native#text/plain
-utils/fppkg/fprepos.pp svneol=native#text/plain
-utils/fppkg/fpxmlrep.pp svneol=native#text/plain
 utils/fppkg/lnet/LICENSE -text
 utils/fppkg/lnet/LICENSE -text
 utils/fppkg/lnet/LICENSE.ADDON -text
 utils/fppkg/lnet/LICENSE.ADDON -text
 utils/fppkg/lnet/fastcgi_base.pp svneol=native#text/plain
 utils/fppkg/lnet/fastcgi_base.pp svneol=native#text/plain
@@ -12525,17 +12751,7 @@ utils/fppkg/lnet/sys/lkqueueeventerh.inc svneol=native#text/plain
 utils/fppkg/lnet/sys/lspawnfcgiunix.inc svneol=native#text/plain
 utils/fppkg/lnet/sys/lspawnfcgiunix.inc svneol=native#text/plain
 utils/fppkg/lnet/sys/lspawnfcgiwin.inc svneol=native#text/plain
 utils/fppkg/lnet/sys/lspawnfcgiwin.inc svneol=native#text/plain
 utils/fppkg/lnet/sys/osunits.inc svneol=native#text/plain
 utils/fppkg/lnet/sys/osunits.inc svneol=native#text/plain
-utils/fppkg/pkgcommands.pp svneol=native#text/plain
-utils/fppkg/pkgdownload.pp svneol=native#text/plain
-utils/fppkg/pkgfpmake.pp svneol=native#text/plain
-utils/fppkg/pkgglobals.pp svneol=native#text/plain
-utils/fppkg/pkghandler.pp svneol=native#text/plain
 utils/fppkg/pkglnet.pp svneol=native#text/plain
 utils/fppkg/pkglnet.pp svneol=native#text/plain
-utils/fppkg/pkgmessages.pp svneol=native#text/plain
-utils/fppkg/pkgmkconv.pp svneol=native#text/plain
-utils/fppkg/pkgoptions.pp svneol=native#text/plain
-utils/fppkg/pkgrepos.pp svneol=native#text/plain
-utils/fppkg/pkgwget.pp svneol=native#text/plain
 utils/fprcp/Makefile svneol=native#text/plain
 utils/fprcp/Makefile svneol=native#text/plain
 utils/fprcp/Makefile.fpc svneol=native#text/plain
 utils/fprcp/Makefile.fpc svneol=native#text/plain
 utils/fprcp/Readme.txt svneol=native#text/plain
 utils/fprcp/Readme.txt svneol=native#text/plain
@@ -12563,6 +12779,17 @@ utils/h2pas/scan.pas svneol=native#text/plain
 utils/h2pas/testit.h -text
 utils/h2pas/testit.h -text
 utils/h2pas/yylex.cod -text
 utils/h2pas/yylex.cod -text
 utils/h2pas/yyparse.cod -text
 utils/h2pas/yyparse.cod -text
+utils/instantfpc/Makefile svneol=native#text/plain
+utils/instantfpc/Makefile.fpc svneol=native#text/plain
+utils/instantfpc/README.txt svneol=native#text/plain
+utils/instantfpc/examples/envvars.pas svneol=native#text/plain
+utils/instantfpc/examples/exitcode.pas svneol=native#text/plain
+utils/instantfpc/examples/getworkingdirectory.pas svneol=native#text/plain
+utils/instantfpc/examples/helloworld.pas svneol=native#text/plain
+utils/instantfpc/examples/writeparameters.pas svneol=native#text/plain
+utils/instantfpc/instantfpc.lpi svneol=native#text/plain
+utils/instantfpc/instantfpc.pas svneol=native#text/plain
+utils/instantfpc/instantfptools.pas svneol=native#text/plain
 utils/mksymbian/Makefile svneol=native#text/plain
 utils/mksymbian/Makefile svneol=native#text/plain
 utils/mksymbian/Makefile.fpc svneol=native#text/plain
 utils/mksymbian/Makefile.fpc svneol=native#text/plain
 utils/mksymbian/cfgfile.pas svneol=native#text/plain
 utils/mksymbian/cfgfile.pas svneol=native#text/plain

+ 42 - 2
Makefile

@@ -1,8 +1,8 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/12/14]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/05]
 #
 #
 default: help
 default: help
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 BSDs = freebsd netbsd openbsd darwin
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx haiku
 UNIXs = linux $(BSDs) solaris qnx haiku
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -264,6 +264,29 @@ ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifndef FPCFPMAKE
+ifdef CROSSCOMPILE
+ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
+FPMAKE_SKIP_CONFIG=-n
+export FPCFPMAKE
+export FPMAKE_SKIP_CONFIG
+endif
+else
+FPCFPMAKE=$(FPC)
+endif
+endif
 override PACKAGE_NAME=fpc
 override PACKAGE_NAME=fpc
 override PACKAGE_VERSION=2.5.1
 override PACKAGE_VERSION=2.5.1
 ifndef inOS2
 ifndef inOS2
@@ -482,6 +505,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override TARGET_DIRS+=compiler rtl utils packages ide installer
 override TARGET_DIRS+=compiler rtl utils packages ide installer
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_DIRS+=compiler rtl utils packages ide installer
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_DIRS+=compiler rtl utils packages ide installer
 override TARGET_DIRS+=compiler rtl utils packages ide installer
 endif
 endif
@@ -904,6 +930,11 @@ ifeq ($(OS_TARGET),NativeNT)
 SHAREDLIBEXT=.dll
 SHAREDLIBEXT=.dll
 SHORTSUFFIX=nativent
 SHORTSUFFIX=nativent
 endif
 endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -1733,6 +1764,7 @@ fpc_baseinfo:
 	@$(ECHO)  Full Target.. $(FULL_TARGET)
 	@$(ECHO)  Full Target.. $(FULL_TARGET)
 	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
 	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
 	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
 	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
+	@$(ECHO)  FPC fpmake... $(FPCFPMAKE)
 	@$(ECHO)
 	@$(ECHO)
 	@$(ECHO)  == Directory info ==
 	@$(ECHO)  == Directory info ==
 	@$(ECHO)
 	@$(ECHO)
@@ -2116,6 +2148,14 @@ TARGET_DIRS_PACKAGES=1
 TARGET_DIRS_IDE=1
 TARGET_DIRS_IDE=1
 TARGET_DIRS_INSTALLER=1
 TARGET_DIRS_INSTALLER=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_DIRS_COMPILER=1
+TARGET_DIRS_RTL=1
+TARGET_DIRS_UTILS=1
+TARGET_DIRS_PACKAGES=1
+TARGET_DIRS_IDE=1
+TARGET_DIRS_INSTALLER=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_COMPILER=1
 TARGET_DIRS_RTL=1
 TARGET_DIRS_RTL=1

+ 69 - 4
compiler/Makefile

@@ -1,8 +1,8 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/10/20]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/06/14]
 #
 #
 default: all
 default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
 BSDs = freebsd netbsd openbsd darwin
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) solaris qnx haiku
 UNIXs = linux $(BSDs) solaris qnx haiku
 LIMIT83fs = go32v2 os2 emx watcom
 LIMIT83fs = go32v2 os2 emx watcom
@@ -264,10 +264,33 @@ ifeq ($(UNITSDIR),)
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
+ifndef FPCFPMAKE
+ifdef CROSSCOMPILE
+ifeq ($(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR)))),)
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPCFPMAKE:=$(shell $(FPCPROG) -PB)
+ifeq ($(strip $(wildcard $(FPCFPMAKE))),)
+FPCFPMAKE:=$(firstword $(FPCPROG))
+endif
+else
+override FPCFPMAKE=$(firstword $(strip $(wildcard $(addsuffix /ppc386$(SRCEXEEXT),$(SEARCHPATH)))))
+endif
+else
+FPCFPMAKE=$(strip $(wildcard $(addsuffix /compiler/ppc$(SRCEXEEXT),$(FPCDIR))))
+FPMAKE_SKIP_CONFIG=-n
+export FPCFPMAKE
+export FPMAKE_SKIP_CONFIG
+endif
+else
+FPCFPMAKE=$(FPC)
+endif
+endif
 override PACKAGE_NAME=compiler
 override PACKAGE_NAME=compiler
 override PACKAGE_VERSION=2.5.1
 override PACKAGE_VERSION=2.5.1
 unexport FPC_VERSION FPC_COMPILERINFO
 unexport FPC_VERSION FPC_COMPILERINFO
-CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips
+CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips avr
 ALLTARGETS=$(CYCLETARGETS)
 ALLTARGETS=$(CYCLETARGETS)
 ifdef ALPHA
 ifdef ALPHA
 PPC_TARGET=alpha
 PPC_TARGET=alpha
@@ -527,6 +550,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override TARGET_DIRS+=utils
 override TARGET_DIRS+=utils
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_DIRS+=utils
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_DIRS+=utils
 override TARGET_DIRS+=utils
 endif
 endif
@@ -713,6 +739,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override TARGET_PROGRAMS+=pp
 override TARGET_PROGRAMS+=pp
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_PROGRAMS+=pp
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override TARGET_PROGRAMS+=pp
 override TARGET_PROGRAMS+=pp
 endif
 endif
@@ -900,6 +929,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
 override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
 override COMPILER_INCLUDEDIR+=$(CPC_TARGET)
 endif
 endif
@@ -1086,6 +1118,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 override COMPILER_UNITDIR+=$(COMPILERSOURCEDIR)
 endif
 endif
@@ -1272,6 +1307,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_TARGETDIR+=.
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_TARGETDIR+=.
 override COMPILER_TARGETDIR+=.
 endif
 endif
@@ -1458,6 +1496,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 override COMPILER_UNITTARGETDIR+=$(CPU_UNITDIR)/units/$(FULL_TARGET)
 endif
 endif
@@ -1879,6 +1920,11 @@ ifeq ($(OS_TARGET),NativeNT)
 SHAREDLIBEXT=.dll
 SHAREDLIBEXT=.dll
 SHORTSUFFIX=nativent
 SHORTSUFFIX=nativent
 endif
 endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
 else
 else
 ifeq ($(OS_TARGET),go32v1)
 ifeq ($(OS_TARGET),go32v1)
 PPUEXT=.pp1
 PPUEXT=.pp1
@@ -2415,6 +2461,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 REQUIRE_PACKAGES_RTL=1
 REQUIRE_PACKAGES_RTL=1
 endif
 endif
@@ -2498,6 +2547,15 @@ UNITDIR_RTL=$(PACKAGEDIR_RTL)/units/$(TARGETSUFFIX)
 else
 else
 UNITDIR_RTL=$(PACKAGEDIR_RTL)
 UNITDIR_RTL=$(PACKAGEDIR_RTL)
 endif
 endif
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units/$(SOURCESUFFIX)
+else
+ifneq ($(wildcard $(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)),)
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)/units_bs/$(SOURCESUFFIX)
+else
+UNITDIR_FPMAKE_RTL=$(PACKAGEDIR_RTL)
+endif
+endif
 ifdef CHECKDEPEND
 ifdef CHECKDEPEND
 $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
 $(PACKAGEDIR_RTL)/$(OS_TARGET)/$(FPCMADE):
 	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
 	$(MAKE) -C $(PACKAGEDIR_RTL)/$(OS_TARGET) $(FPCMADE)
@@ -2515,6 +2573,9 @@ endif
 ifdef UNITDIR_RTL
 ifdef UNITDIR_RTL
 override COMPILER_UNITDIR+=$(UNITDIR_RTL)
 override COMPILER_UNITDIR+=$(UNITDIR_RTL)
 endif
 endif
+ifdef UNITDIR_FPMAKE_RTL
+override COMPILER_FPMAKE_UNITDIR+=$(UNITDIR_FPMAKE_RTL)
+endif
 endif
 endif
 ifndef NOCPUDEF
 ifndef NOCPUDEF
 override FPCOPTDEF=$(ARCH)
 override FPCOPTDEF=$(ARCH)
@@ -3012,6 +3073,7 @@ fpc_baseinfo:
 	@$(ECHO)  Full Target.. $(FULL_TARGET)
 	@$(ECHO)  Full Target.. $(FULL_TARGET)
 	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
 	@$(ECHO)  SourceSuffix. $(SOURCESUFFIX)
 	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
 	@$(ECHO)  TargetSuffix. $(TARGETSUFFIX)
+	@$(ECHO)  FPC fpmake... $(FPCFPMAKE)
 	@$(ECHO)
 	@$(ECHO)
 	@$(ECHO)  == Directory info ==
 	@$(ECHO)  == Directory info ==
 	@$(ECHO)
 	@$(ECHO)
@@ -3210,6 +3272,9 @@ endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
 TARGET_DIRS_UTILS=1
 TARGET_DIRS_UTILS=1
 endif
 endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_DIRS_UTILS=1
+endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
 TARGET_DIRS_UTILS=1
 TARGET_DIRS_UTILS=1
 endif
 endif
@@ -3577,8 +3642,8 @@ endif
 endif
 endif
 endif
 endif
 else
 else
+cycle: override FPC=
 cycle:
 cycle:
-override FPC=
 	$(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
 	$(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
 	$(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
 	$(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
 	$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
 	$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl

+ 2 - 2
compiler/Makefile.fpc

@@ -32,7 +32,7 @@ fpcdir=..
 unexport FPC_VERSION FPC_COMPILERINFO
 unexport FPC_VERSION FPC_COMPILERINFO
 
 
 # Which platforms are ready for inclusion in the cycle
 # Which platforms are ready for inclusion in the cycle
-CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips
+CYCLETARGETS=i386 powerpc sparc arm x86_64 powerpc64 m68k armeb mipsel mips avr
 
 
 # All supported targets used for clean
 # All supported targets used for clean
 ALLTARGETS=$(CYCLETARGETS)
 ALLTARGETS=$(CYCLETARGETS)
@@ -584,10 +584,10 @@ else
 # ppc3/ppcXXX = native (skipped for cross installation)
 # ppc3/ppcXXX = native (skipped for cross installation)
 #
 #
 
 
+cycle: override FPC=
 cycle:
 cycle:
 # ppc (source native)
 # ppc (source native)
 # Clear detected compiler binary, because it can be existing crosscompiler binary, but we need native compiler here
 # Clear detected compiler binary, because it can be existing crosscompiler binary, but we need native compiler here
-override FPC=
         $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
         $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 rtlclean rtl
         $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
         $(MAKE) OS_TARGET=$(OS_SOURCE) CPU_TARGET=$(CPU_SOURCE) EXENAME=$(TEMPNAME) CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 cycleclean compiler
 # ppcross<ARCH> (source native)
 # ppcross<ARCH> (source native)

+ 5 - 3
compiler/aasmdata.pas

@@ -71,8 +71,8 @@ interface
         al_end
         al_end
       );
       );
 
 
-      { Type of constant 'pools'. Currently contains only string types,
-        but may be extended with reals, sets, etc. }
+      { Type of constant 'pools'. Mostly for string types, but usable for
+        floating point and large set constants, too. }
       
       
       TConstPoolType = (
       TConstPoolType = (
          sp_invalid,
          sp_invalid,
@@ -87,7 +87,9 @@ interface
          sp_objcclassnames,
          sp_objcclassnames,
          sp_objcvarnames,
          sp_objcvarnames,
          sp_objcvartypes,
          sp_objcvartypes,
-         sp_objcprotocolrefs
+         sp_objcprotocolrefs,
+         sp_varsets,
+         sp_floats
       );
       );
       
       
     const
     const

+ 58 - 82
compiler/aggas.pas

@@ -93,14 +93,16 @@ interface
        end;
        end;
 
 
 
 
+     function ReplaceForbiddenChars(const s: string): string;
+
+
 implementation
 implementation
 
 
     uses
     uses
       SysUtils,
       SysUtils,
       cutils,cfileutl,systems,
       cutils,cfileutl,systems,
       fmodule,finput,verbose,
       fmodule,finput,verbose,
-      itcpugas,cpubase
-      ;
+      itcpugas,cpubase;
 
 
     const
     const
       line_length = 70;
       line_length = 70;
@@ -119,25 +121,6 @@ implementation
 {                          Support routines                                  }
 {                          Support routines                                  }
 {****************************************************************************}
 {****************************************************************************}
 
 
-   function fixline(s:string):string;
-   {
-     return s with all leading and ending spaces and tabs removed
-   }
-     var
-       i,j,k : integer;
-     begin
-       i:=length(s);
-       while (i>0) and (s[i] in [#9,' ']) do
-        dec(i);
-       j:=1;
-       while (j<i) and (s[j] in [#9,' ']) do
-        inc(j);
-       for k:=j to i do
-        if s[k] in [#0..#31,#127..#255] then
-         s[k]:='.';
-       fixline:=Copy(s,j,i-j+1);
-     end;
-
     function single2str(d : single) : string;
     function single2str(d : single) : string;
       var
       var
          hs : string;
          hs : string;
@@ -217,6 +200,17 @@ implementation
         #9'.rva'#9,#9'.secrel32'#9,#9'.quad'#9,#9'.long'#9
         #9'.rva'#9,#9'.secrel32'#9,#9'.quad'#9,#9'.long'#9
       );
       );
 
 
+    function ReplaceForbiddenChars(const s: string): string;
+      var
+      i : longint;
+      begin
+        Result:=s;
+        for i:=1 to Length(Result) do
+          if Result[i]='$' then
+            Result[i]:='s';
+      end;
+
+
 {****************************************************************************}
 {****************************************************************************}
 {                          GNU Assembler writer                              }
 {                          GNU Assembler writer                              }
 {****************************************************************************}
 {****************************************************************************}
@@ -574,7 +568,6 @@ implementation
     var
     var
       ch       : char;
       ch       : char;
       hp       : tai;
       hp       : tai;
-      hp1      : tailineinfo;
       constdef : taiconst_type;
       constdef : taiconst_type;
       s,t      : string;
       s,t      : string;
       i,pos,l  : longint;
       i,pos,l  : longint;
@@ -605,52 +598,10 @@ implementation
          prefetch(pointer(hp.next)^);
          prefetch(pointer(hp.next)^);
          if not(hp.typ in SkipLineInfo) then
          if not(hp.typ in SkipLineInfo) then
           begin
           begin
-            hp1 := hp as tailineinfo;
-            current_filepos:=hp1.fileinfo;
-             { no line info for inlined code }
-             if do_line and (inlinelevel=0) then
-              begin
-                { load infile }
-                if lastfileinfo.fileindex<>hp1.fileinfo.fileindex then
-                 begin
-                   infile:=current_module.sourcefiles.get_file(hp1.fileinfo.fileindex);
-                   if assigned(infile) then
-                    begin
-                      { open only if needed !! }
-                      if (cs_asm_source in current_settings.globalswitches) then
-                       infile.open;
-                    end;
-                   { avoid unnecessary reopens of the same file !! }
-                   lastfileinfo.fileindex:=hp1.fileinfo.fileindex;
-                   { be sure to change line !! }
-                   lastfileinfo.line:=-1;
-                 end;
-              { write source }
-                if (cs_asm_source in current_settings.globalswitches) and
-                   assigned(infile) then
-                 begin
-                   if (infile<>lastinfile) then
-                     begin
-                       AsmWriteLn(target_asm.comment+'['+infile.name^+']');
-                       if assigned(lastinfile) then
-                         lastinfile.close;
-                     end;
-                   if (hp1.fileinfo.line<>lastfileinfo.line) and
-                      ((hp1.fileinfo.line<infile.maxlinebuf) or (InlineLevel>0)) then
-                     begin
-                       if (hp1.fileinfo.line<>0) and
-                          ((infile.linebuf^[hp1.fileinfo.line]>=0) or (InlineLevel>0)) then
-                         AsmWriteLn(target_asm.comment+'['+tostr(hp1.fileinfo.line)+'] '+
-                           fixline(infile.GetLineStr(hp1.fileinfo.line)));
-                       { set it to a negative value !
-                       to make that is has been read already !! PM }
-                       if (infile.linebuf^[hp1.fileinfo.line]>=0) then
-                         infile.linebuf^[hp1.fileinfo.line]:=-infile.linebuf^[hp1.fileinfo.line]-1;
-                     end;
-                 end;
-                lastfileinfo:=hp1.fileinfo;
-                lastinfile:=infile;
-              end;
+            current_filepos:=tailineinfo(hp).fileinfo;
+            { no line info for inlined code }
+            if do_line and (inlinelevel=0) then
+              WriteSourceLine(hp as tailineinfo);
           end;
           end;
 
 
          case hp.typ of
          case hp.typ of
@@ -684,16 +635,7 @@ implementation
            ait_tempalloc :
            ait_tempalloc :
              begin
              begin
                if (cs_asm_tempalloc in current_settings.globalswitches) then
                if (cs_asm_tempalloc in current_settings.globalswitches) then
-                 begin
-{$ifdef EXTDEBUG}
-                   if assigned(tai_tempalloc(hp).problem) then
-                     AsmWriteLn(target_asm.comment+'Temp '+tostr(tai_tempalloc(hp).temppos)+','+
-                       tostr(tai_tempalloc(hp).tempsize)+' '+tai_tempalloc(hp).problem^)
-                   else
-{$endif EXTDEBUG}
-                     AsmWriteLn(target_asm.comment+'Temp '+tostr(tai_tempalloc(hp).temppos)+','+
-                       tostr(tai_tempalloc(hp).tempsize)+' '+tempallocstr[tai_tempalloc(hp).allocation]);
-                 end;
+                 WriteTempalloc(tai_tempalloc(hp));
              end;
              end;
 
 
            ait_align :
            ait_align :
@@ -868,6 +810,9 @@ implementation
                                   end
                                   end
                                else
                                else
                                  s:=tai_const(hp).sym.name;
                                  s:=tai_const(hp).sym.name;
+{$ifdef avr}
+                               s:=ReplaceForbiddenChars(s);
+{$endif avr}
                                if tai_const(hp).value<>0 then
                                if tai_const(hp).value<>0 then
                                  s:=s+tostr_with_plus(tai_const(hp).value);
                                  s:=s+tostr_with_plus(tai_const(hp).value);
                              end
                              end
@@ -1045,9 +990,17 @@ implementation
                   if tai_label(hp).labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN] then
                   if tai_label(hp).labsym.bind in [AB_GLOBAL,AB_PRIVATE_EXTERN] then
                    begin
                    begin
                      AsmWrite('.globl'#9);
                      AsmWrite('.globl'#9);
+{$ifdef avr}
+                     AsmWriteLn(ReplaceForbiddenChars(tai_label(hp).labsym.name));
+{$else avr}
                      AsmWriteLn(tai_label(hp).labsym.name);
                      AsmWriteLn(tai_label(hp).labsym.name);
+{$endif avr}
                    end;
                    end;
+{$ifdef avr}
+                  AsmWrite(ReplaceForbiddenChars(tai_label(hp).labsym.name));
+{$else avr}
                   AsmWrite(tai_label(hp).labsym.name);
                   AsmWrite(tai_label(hp).labsym.name);
+{$endif avr}
                   AsmWriteLn(':');
                   AsmWriteLn(':');
                 end;
                 end;
              end;
              end;
@@ -1057,17 +1010,24 @@ implementation
                if (tai_symbol(hp).sym.bind=AB_PRIVATE_EXTERN) then
                if (tai_symbol(hp).sym.bind=AB_PRIVATE_EXTERN) then
                  begin
                  begin
                    AsmWrite(#9'.private_extern ');
                    AsmWrite(#9'.private_extern ');
+{$ifdef avr}
+                   AsmWriteln(ReplaceForbiddenChars(tai_symbol(hp).sym.name));
+{$else avr}
                    AsmWriteln(tai_symbol(hp).sym.name);
                    AsmWriteln(tai_symbol(hp).sym.name);
+{$endif avr}
                  end;
                  end;
                if (target_info.system = system_powerpc64_linux) and
                if (target_info.system = system_powerpc64_linux) and
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) and (cs_profile in current_settings.moduleswitches) then
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) and (cs_profile in current_settings.moduleswitches) then
-                 begin
                  AsmWriteLn('.globl _mcount');
                  AsmWriteLn('.globl _mcount');
-               end;
+
                if tai_symbol(hp).is_global then
                if tai_symbol(hp).is_global then
                 begin
                 begin
                   AsmWrite('.globl'#9);
                   AsmWrite('.globl'#9);
-                  AsmWriteLn(tai_symbol(hp).sym.name);
+{$ifdef avr}
+                  AsmWriteln(ReplaceForbiddenChars(tai_symbol(hp).sym.name));
+{$else avr}
+                  AsmWriteln(tai_symbol(hp).sym.name);
+{$endif avr}
                 end;
                 end;
                if (target_info.system = system_powerpc64_linux) and
                if (target_info.system = system_powerpc64_linux) and
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) then
                  (tai_symbol(hp).sym.typ = AT_FUNCTION) then
@@ -1099,10 +1059,17 @@ implementation
                          AsmWriteLn(',' + sepChar + 'function');
                          AsmWriteLn(',' + sepChar + 'function');
                      end;
                      end;
                  end;
                  end;
+{$ifdef avr}
+               if not(tai_symbol(hp).has_value) then
+                 AsmWriteLn(ReplaceForbiddenChars(tai_symbol(hp).sym.name + ':'))
+               else
+                 AsmWriteLn(ReplaceForbiddenChars(tai_symbol(hp).sym.name + '=' + tostr(tai_symbol(hp).value)));
+{$else avr}
                if not(tai_symbol(hp).has_value) then
                if not(tai_symbol(hp).has_value) then
                  AsmWriteLn(tai_symbol(hp).sym.name + ':')
                  AsmWriteLn(tai_symbol(hp).sym.name + ':')
                else
                else
                  AsmWriteLn(tai_symbol(hp).sym.name + '=' + tostr(tai_symbol(hp).value));
                  AsmWriteLn(tai_symbol(hp).sym.name + '=' + tostr(tai_symbol(hp).value));
+{$endif avr}
              end;
              end;
 {$ifdef arm}
 {$ifdef arm}
            ait_thumb_func:
            ait_thumb_func:
@@ -1121,11 +1088,19 @@ implementation
                   AsmWrite(#9'.size'#9);
                   AsmWrite(#9'.size'#9);
                   if (target_info.system = system_powerpc64_linux) and (tai_symbol_end(hp).sym.typ = AT_FUNCTION) then
                   if (target_info.system = system_powerpc64_linux) and (tai_symbol_end(hp).sym.typ = AT_FUNCTION) then
                     AsmWrite('.');
                     AsmWrite('.');
+{$ifdef avr}
+                  AsmWrite(ReplaceForbiddenChars(tai_symbol_end(hp).sym.name));
+{$else avr}
                   AsmWrite(tai_symbol_end(hp).sym.name);
                   AsmWrite(tai_symbol_end(hp).sym.name);
+{$endif avr}
                   AsmWrite(', '+s+' - ');
                   AsmWrite(', '+s+' - ');
                   if (target_info.system = system_powerpc64_linux) and (tai_symbol_end(hp).sym.typ = AT_FUNCTION) then
                   if (target_info.system = system_powerpc64_linux) and (tai_symbol_end(hp).sym.typ = AT_FUNCTION) then
                      AsmWrite('.');
                      AsmWrite('.');
+{$ifdef avr}
+                  AsmWriteLn(ReplaceForbiddenChars(tai_symbol_end(hp).sym.name));
+{$else avr}
                   AsmWriteLn(tai_symbol_end(hp).sym.name);
                   AsmWriteLn(tai_symbol_end(hp).sym.name);
+{$endif avr}
                 end;
                 end;
              end;
              end;
 
 
@@ -1145,7 +1120,8 @@ implementation
              end;
              end;
 
 
            ait_force_line,
            ait_force_line,
-           ait_function_name : ;
+           ait_function_name :
+             ;
 
 
            ait_cutobject :
            ait_cutobject :
              begin
              begin

+ 26 - 26
compiler/arm/cgcpu.pas

@@ -40,7 +40,7 @@ unit cgcpu;
         { true, if the next arithmetic operation should modify the flags }
         { true, if the next arithmetic operation should modify the flags }
         cgsetflags : boolean;
         cgsetflags : boolean;
 
 
-        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const paraloc : TCGPara);override;
+        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const paraloc : TCGPara);override;
         procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const paraloc : TCGPara);override;
         procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const paraloc : TCGPara);override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : TCGPara);override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : TCGPara);override;
 
 
@@ -48,14 +48,14 @@ unit cgcpu;
         procedure a_call_reg(list : TAsmList;reg: tregister);override;
         procedure a_call_reg(list : TAsmList;reg: tregister);override;
         procedure a_call_ref(list : TAsmList;ref: treference);override;
         procedure a_call_ref(list : TAsmList;ref: treference);override;
 
 
-        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; reg: TRegister); override;
+        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister); override;
         procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
         procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
 
 
         procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg;
         procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg;
-          size: tcgsize; a: aint; src, dst: tregister); override;
+          size: tcgsize; a: tcgint; src, dst: tregister); override;
         procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg;
         procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg;
           size: tcgsize; src1, src2, dst: tregister); override;
           size: tcgsize; src1, src2, dst: tregister); override;
-        procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
+        procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
 
 
         { move instructions }
         { move instructions }
@@ -71,7 +71,7 @@ unit cgcpu;
 
 
         procedure a_loadfpu_ref_cgpara(list : TAsmList;size : tcgsize;const ref : treference;const paraloc : TCGPara);override;
         procedure a_loadfpu_ref_cgpara(list : TAsmList;size : tcgsize;const ref : treference;const paraloc : TCGPara);override;
         {  comparison operations }
         {  comparison operations }
-        procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
+        procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
           l : tasmlabel);override;
           l : tasmlabel);override;
         procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
         procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
 
 
@@ -86,10 +86,10 @@ unit cgcpu;
 
 
         procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
         procedure a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);override;
 
 
-        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
-        procedure g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : aint);override;
-        procedure g_concatcopy_move(list : TAsmList;const source,dest : treference;len : aint);
-        procedure g_concatcopy_internal(list : TAsmList;const source,dest : treference;len : aint;aligned : boolean);
+        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);override;
+        procedure g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : tcgint);override;
+        procedure g_concatcopy_move(list : TAsmList;const source,dest : treference;len : tcgint);
+        procedure g_concatcopy_internal(list : TAsmList;const source,dest : treference;len : tcgint;aligned : boolean);
 
 
         procedure g_overflowcheck(list: TAsmList; const l: tlocation; def: tdef); override;
         procedure g_overflowcheck(list: TAsmList; const l: tlocation; def: tdef); override;
         procedure g_overflowCheck_loc(List:TAsmList;const Loc:TLocation;def:TDef;ovloc : tlocation);override;
         procedure g_overflowCheck_loc(List:TAsmList;const Loc:TLocation;def:TDef;ovloc : tlocation);override;
@@ -102,7 +102,7 @@ unit cgcpu;
         function handle_load_store(list:TAsmList;op: tasmop;oppostfix : toppostfix;reg:tregister;ref: treference):treference; virtual;
         function handle_load_store(list:TAsmList;op: tasmop;oppostfix : toppostfix;reg:tregister;ref: treference):treference; virtual;
 
 
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
-        procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint); override;
+        procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint); override;
         procedure g_stackpointer_alloc(list : TAsmList;size : longint);override;
         procedure g_stackpointer_alloc(list : TAsmList;size : longint);override;
 
 
         procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize : tcgsize;reg1, reg2: tregister;shuffle : pmmshuffle); override;
         procedure a_loadmm_reg_reg(list: TAsmList; fromsize, tosize : tcgsize;reg1, reg2: tregister;shuffle : pmmshuffle); override;
@@ -123,7 +123,7 @@ unit cgcpu;
         procedure init_register_allocators;override;
         procedure init_register_allocators;override;
         procedure done_register_allocators;override;
         procedure done_register_allocators;override;
 
 
-        procedure a_load_const_reg(list : TAsmList; size: tcgsize; a : aint;reg : tregister);override;
+        procedure a_load_const_reg(list : TAsmList; size: tcgsize; a : tcgint;reg : tregister);override;
         procedure a_load_ref_reg(list : TAsmList; fromsize, tosize : tcgsize;const Ref : treference;reg : tregister);override;
         procedure a_load_ref_reg(list : TAsmList; fromsize, tosize : tcgsize;const Ref : treference;reg : tregister);override;
       end;
       end;
 
 
@@ -144,10 +144,10 @@ unit cgcpu;
 
 
         procedure a_call_reg(list : TAsmList;reg: tregister);override;
         procedure a_call_reg(list : TAsmList;reg: tregister);override;
 
 
-        procedure a_load_const_reg(list : TAsmList; size: tcgsize; a : aint;reg : tregister);override;
+        procedure a_load_const_reg(list : TAsmList; size: tcgsize; a : tcgint;reg : tregister);override;
         procedure a_load_ref_reg(list : TAsmList; fromsize, tosize : tcgsize;const Ref : treference;reg : tregister);override;
         procedure a_load_ref_reg(list : TAsmList; fromsize, tosize : tcgsize;const Ref : treference;reg : tregister);override;
 
 
-        procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
+        procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
 
 
         procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister); override;
         procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister); override;
@@ -245,7 +245,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-     procedure tarmcgarm.a_load_const_reg(list : TAsmList; size: tcgsize; a : aint;reg : tregister);
+     procedure tarmcgarm.a_load_const_reg(list : TAsmList; size: tcgsize; a : tcgint;reg : tregister);
        var
        var
           imm_shift : byte;
           imm_shift : byte;
           l : tasmlabel;
           l : tasmlabel;
@@ -413,7 +413,7 @@ unit cgcpu;
        end;
        end;
 
 
 
 
-    procedure tcgarm.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const paraloc : TCGPara);
+    procedure tcgarm.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const paraloc : TCGPara);
       var
       var
         ref: treference;
         ref: treference;
       begin
       begin
@@ -558,7 +558,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-     procedure tcgarm.a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; reg: TRegister);
+     procedure tcgarm.a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister);
        begin
        begin
           a_op_const_reg_reg(list,op,size,a,reg,reg);
           a_op_const_reg_reg(list,op,size,a,reg,reg);
        end;
        end;
@@ -592,7 +592,7 @@ unit cgcpu;
 
 
 
 
     procedure tcgarm.a_op_const_reg_reg(list: TAsmList; op: TOpCg;
     procedure tcgarm.a_op_const_reg_reg(list: TAsmList; op: TOpCg;
-      size: tcgsize; a: aint; src, dst: tregister);
+      size: tcgsize; a: tcgint; src, dst: tregister);
       var
       var
         ovloc : tlocation;
         ovloc : tlocation;
       begin
       begin
@@ -609,7 +609,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcgarm.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
+    procedure tcgarm.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
       var
       var
         shift : byte;
         shift : byte;
         tmpreg : tregister;
         tmpreg : tregister;
@@ -1321,7 +1321,7 @@ unit cgcpu;
 
 
 
 
     {  comparison operations }
     {  comparison operations }
-    procedure tcgarm.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
+    procedure tcgarm.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
       l : tasmlabel);
       l : tasmlabel);
       var
       var
         tmpreg : tregister;
         tmpreg : tregister;
@@ -1812,7 +1812,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcgarm.g_concatcopy_move(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcgarm.g_concatcopy_move(list : TAsmList;const source,dest : treference;len : tcgint);
       var
       var
         paraloc1,paraloc2,paraloc3 : TCGPara;
         paraloc1,paraloc2,paraloc3 : TCGPara;
       begin
       begin
@@ -1839,7 +1839,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcgarm.g_concatcopy_internal(list : TAsmList;const source,dest : treference;len : aint;aligned : boolean);
+    procedure tcgarm.g_concatcopy_internal(list : TAsmList;const source,dest : treference;len : tcgint;aligned : boolean);
       const
       const
         maxtmpreg=10;{roozbeh: can be reduced to 8 or lower if might conflick with reserved ones,also +2 is used becouse of regs required for referencing}
         maxtmpreg=10;{roozbeh: can be reduced to 8 or lower if might conflick with reserved ones,also +2 is used becouse of regs required for referencing}
 
 
@@ -2042,13 +2042,13 @@ unit cgcpu;
           end;
           end;
     end;
     end;
 
 
-    procedure tcgarm.g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcgarm.g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : tcgint);
       begin
       begin
         g_concatcopy_internal(list,source,dest,len,false);
         g_concatcopy_internal(list,source,dest,len,false);
       end;
       end;
 
 
 
 
-    procedure tcgarm.g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcgarm.g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);
       begin
       begin
         if (source.alignment in [1..3]) or
         if (source.alignment in [1..3]) or
           (dest.alignment in [1..3]) then
           (dest.alignment in [1..3]) then
@@ -2132,7 +2132,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcgarm.g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);
+    procedure tcgarm.g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);
       var
       var
         hsym : tsym;
         hsym : tsym;
         href : treference;
         href : treference;
@@ -2848,7 +2848,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-     procedure Tthumb2cgarm.a_load_const_reg(list : TAsmList; size: tcgsize; a : aint;reg : tregister);
+     procedure Tthumb2cgarm.a_load_const_reg(list : TAsmList; size: tcgsize; a : tcgint;reg : tregister);
        var
        var
           imm_shift : byte;
           imm_shift : byte;
           l : tasmlabel;
           l : tasmlabel;
@@ -3014,7 +3014,7 @@ unit cgcpu;
        end;
        end;
 
 
 
 
-    procedure Tthumb2cgarm.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
+    procedure Tthumb2cgarm.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
       var
       var
         shift : byte;
         shift : byte;
         tmpreg : tregister;
         tmpreg : tregister;

+ 1 - 1
compiler/arm/narmcnv.pas

@@ -171,7 +171,7 @@ implementation
                         cg.a_jmp_flags(current_asmdata.CurrAsmList,F_GE,l2);
                         cg.a_jmp_flags(current_asmdata.CurrAsmList,F_GE,l2);
 
 
                         hregister:=cg.getfpuregister(current_asmdata.CurrAsmList,OS_F64);
                         hregister:=cg.getfpuregister(current_asmdata.CurrAsmList,OS_F64);
-                        current_asmdata.asmlists[al_typedconsts].concat(tai_align.create(const_align(8)));
+                        new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l1.name,const_align(8));
                         current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
                         current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
                         { I got this constant from a test program (FK) }
                         { I got this constant from a test program (FK) }
                         current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit($41f00000));
                         current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit($41f00000));

+ 78 - 3
compiler/assemble.pas

@@ -37,7 +37,7 @@ interface
 
 
     const
     const
        { maximum of aasmoutput lists there will be }
        { maximum of aasmoutput lists there will be }
-       maxoutputlists = 20;
+       maxoutputlists = ord(high(tasmlisttype))+1;
        { buffer size for writing the .s file }
        { buffer size for writing the .s file }
        AsmOutSize=32768*4;
        AsmOutSize=32768*4;
 
 
@@ -81,6 +81,8 @@ interface
         lastinfile   : tinputfile;
         lastinfile   : tinputfile;
       {last section type written}
       {last section type written}
         lastsectype : TAsmSectionType;
         lastsectype : TAsmSectionType;
+        procedure WriteSourceLine(hp: tailineinfo);
+        procedure WriteTempalloc(hp: tai_tempalloc);
       public
       public
         {# Returns the complete path and executable name of the assembler
         {# Returns the complete path and executable name of the assembler
            program.
            program.
@@ -189,6 +191,24 @@ Implementation
     var
     var
       CAssembler : array[tasm] of TAssemblerClass;
       CAssembler : array[tasm] of TAssemblerClass;
 
 
+    function fixline(s:string):string;
+     {
+       return s with all leading and ending spaces and tabs removed
+     }
+      var
+        i,j,k : integer;
+      begin
+        i:=length(s);
+        while (i>0) and (s[i] in [#9,' ']) do
+          dec(i);
+        j:=1;
+        while (j<i) and (s[j] in [#9,' ']) do
+          inc(j);
+        for k:=j to i do
+          if s[k] in [#0..#31,#127..#255] then
+            s[k]:='.';
+        fixline:=Copy(s,j,i-j+1);
+      end;
 
 
 {*****************************************************************************
 {*****************************************************************************
                                    TAssembler
                                    TAssembler
@@ -250,7 +270,7 @@ Implementation
     Function DoPipe:boolean;
     Function DoPipe:boolean;
       begin
       begin
         DoPipe:=(cs_asm_pipe in current_settings.globalswitches) and
         DoPipe:=(cs_asm_pipe in current_settings.globalswitches) and
-                (([cs_asm_leave,cs_link_on_target] * current_settings.globalswitches) = []) and
+                (([cs_asm_extern,cs_asm_leave,cs_link_on_target] * current_settings.globalswitches) = []) and
                 ((target_asm.id in [as_gas,as_ggas,as_darwin]));
                 ((target_asm.id in [as_gas,as_ggas,as_darwin]));
       end;
       end;
 
 
@@ -548,7 +568,7 @@ Implementation
             end
             end
            else
            else
              Message1(exec_i_assembling_pipe,AsmFileName);
              Message1(exec_i_assembling_pipe,AsmFileName);
-           POpen(outfile,FindAssembler+' '+MakeCmdLine,'W');
+           POpen(outfile,maybequoted(FindAssembler)+' '+MakeCmdLine,'W');
          end
          end
         else
         else
 {$endif}
 {$endif}
@@ -603,6 +623,61 @@ Implementation
          end;
          end;
       end;
       end;
 
 
+    procedure TExternalAssembler.WriteSourceLine(hp: tailineinfo);
+      begin
+        { load infile }
+        if lastfileinfo.fileindex<>hp.fileinfo.fileindex then
+          begin
+            infile:=current_module.sourcefiles.get_file(hp.fileinfo.fileindex);
+            if assigned(infile) then
+              begin
+                { open only if needed !! }
+                if (cs_asm_source in current_settings.globalswitches) then
+                  infile.open;
+              end;
+            { avoid unnecessary reopens of the same file !! }
+            lastfileinfo.fileindex:=hp.fileinfo.fileindex;
+            { be sure to change line !! }
+            lastfileinfo.line:=-1;
+          end;
+        { write source }
+        if (cs_asm_source in current_settings.globalswitches) and
+          assigned(infile) then
+          begin
+            if (infile<>lastinfile) then
+              begin
+                AsmWriteLn(target_asm.comment+'['+infile.name^+']');
+                if assigned(lastinfile) then
+                  lastinfile.close;
+              end;
+            if (hp.fileinfo.line<>lastfileinfo.line) and
+              (hp.fileinfo.line<infile.maxlinebuf) then
+              begin
+                if (hp.fileinfo.line<>0) and
+                  (infile.linebuf^[hp.fileinfo.line]>=0) then
+                  AsmWriteLn(target_asm.comment+'['+tostr(hp.fileinfo.line)+'] '+
+                  fixline(infile.GetLineStr(hp.fileinfo.line)));
+                { set it to a negative value !
+                  to make that is has been read already !! PM }
+                if (infile.linebuf^[hp.fileinfo.line]>=0) then
+                  infile.linebuf^[hp.fileinfo.line]:=-infile.linebuf^[hp.fileinfo.line]-1;
+              end;
+          end;
+        lastfileinfo:=hp.fileinfo;
+        lastinfile:=infile;
+      end;
+
+    procedure TExternalAssembler.WriteTempalloc(hp: tai_tempalloc);
+      begin
+{$ifdef EXTDEBUG}
+        if assigned(hp.problem) then
+          AsmWriteLn(target_asm.comment+'Temp '+tostr(hp.temppos)+','+
+          tostr(hp.tempsize)+' '+hp.problem^)
+        else
+{$endif EXTDEBUG}
+          AsmWriteLn(target_asm.comment+'Temp '+tostr(hp.temppos)+','+
+            tostr(hp.tempsize)+' '+tempallocstr[hp.allocation]);
+      end;
 
 
     procedure TExternalAssembler.WriteTree(p:TAsmList);
     procedure TExternalAssembler.WriteTree(p:TAsmList);
       begin
       begin

+ 20 - 8
compiler/avr/aasmcpu.pas

@@ -209,14 +209,14 @@ implementation
 
 
     function taicpu.spilling_get_operation_type(opnr: longint): topertype;
     function taicpu.spilling_get_operation_type(opnr: longint): topertype;
       begin
       begin
-        result := operand_read;
+        result:=operand_read;
         case opcode of
         case opcode of
-          A_CP,A_CPC,A_CPI :
+          A_CP,A_CPC,A_CPI,A_PUSH :
             ;
             ;
           else
           else
             begin
             begin
-              if opnr=ops-1 then
-                result := operand_write;
+              if opnr=0 then
+                result:=operand_write;
             end;
             end;
         end;
         end;
       end;
       end;
@@ -226,9 +226,15 @@ implementation
       begin
       begin
         case getregtype(r) of
         case getregtype(r) of
           R_INTREGISTER :
           R_INTREGISTER :
-            result:=taicpu.op_ref_reg(A_LD,ref,r);
+            if ref.offset<>0 then
+              result:=taicpu.op_reg_ref(A_LDD,r,ref)
+            else
+              result:=taicpu.op_reg_ref(A_LD,r,ref);
           R_ADDRESSREGISTER :
           R_ADDRESSREGISTER :
-            result:=taicpu.op_ref_reg(A_LD,ref,r);
+            if ref.offset<>0 then
+              result:=taicpu.op_reg_ref(A_LDD,r,ref)
+            else
+              result:=taicpu.op_reg_ref(A_LD,r,ref);
           else
           else
             internalerror(200401041);
             internalerror(200401041);
         end;
         end;
@@ -239,9 +245,15 @@ implementation
       begin
       begin
         case getregtype(r) of
         case getregtype(r) of
           R_INTREGISTER :
           R_INTREGISTER :
-            result:=taicpu.op_reg_ref(A_ST,r,ref);
+            if ref.offset<>0 then
+              result:=taicpu.op_ref_reg(A_STD,ref,r)
+            else
+              result:=taicpu.op_ref_reg(A_ST,ref,r);
           R_ADDRESSREGISTER :
           R_ADDRESSREGISTER :
-            result:=taicpu.op_reg_ref(A_ST,r,ref);
+            if ref.offset<>0 then
+              result:=taicpu.op_ref_reg(A_STD,ref,r)
+            else
+              result:=taicpu.op_ref_reg(A_ST,ref,r);
           else
           else
             internalerror(200401041);
             internalerror(200401041);
         end;
         end;

+ 102 - 57
compiler/avr/agavrgas.pas

@@ -29,13 +29,18 @@ unit agavrgas;
   interface
   interface
 
 
     uses
     uses
+       globtype,
        aasmtai,aasmdata,
        aasmtai,aasmdata,
        aggas,
        aggas,
        cpubase;
        cpubase;
 
 
     type
     type
+
+      { TAVRGNUAssembler }
+
       TAVRGNUAssembler=class(TGNUassembler)
       TAVRGNUAssembler=class(TGNUassembler)
         constructor create(smart: boolean); override;
         constructor create(smart: boolean); override;
+       function MakeCmdLine: TCmdStr; override;
       end;
       end;
 
 
      TAVRInstrWriter=class(TCPUInstrWriter)
      TAVRInstrWriter=class(TCPUInstrWriter)
@@ -51,6 +56,7 @@ unit agavrgas;
        assemble,
        assemble,
        aasmcpu,
        aasmcpu,
        itcpugas,
        itcpugas,
+       cpuinfo,
        cgbase,cgutils;
        cgbase,cgutils;
 
 
 {****************************************************************************}
 {****************************************************************************}
@@ -68,69 +74,102 @@ unit agavrgas;
 {                  Helper routines for Instruction Writer                    }
 {                  Helper routines for Instruction Writer                    }
 {****************************************************************************}
 {****************************************************************************}
 
 
-    function getreferencestring(var ref : treference) : string;
-      var
-        s : string;
-      begin
-         with ref do
-          begin
-{$ifdef extdebug}
-            // if base=NR_NO then
-            //   internalerror(200308292);
-
-            // if ((index<>NR_NO) or (shiftmode<>SM_None)) and ((offset<>0) or (symbol<>nil)) then
-            //   internalerror(200308293);
-{$endif extdebug}
-
-            if assigned(symbol) then
-              begin
-                s:=symbol.name;
-                if offset<0 then
-                  s:=s+tostr(offset)
-                else if offset>0 then
-                  s:=s+'+'+tostr(offset);
-              end
-            else
-              begin
-                s:=gas_regname(base);
-              end;
 
 
-          end;
-        getreferencestring:=s;
-      end;
+    Procedure TAVRInstrWriter.WriteInstruction(hp : tai);
+
+      function getreferencestring(var ref : treference) : string;
+        var
+          s : string;
+        begin
+           with ref do
+            begin
+  {$ifdef extdebug}
+              // if base=NR_NO then
+              //   internalerror(200308292);
+
+              // if ((index<>NR_NO) or (shiftmode<>SM_None)) and ((offset<>0) or (symbol<>nil)) then
+              //   internalerror(200308293);
+  {$endif extdebug}
+              if index<>NR_NO then
+                internalerror(2011021701)
+              else if base<>NR_NO then
+                begin
+                  if addressmode=AM_PREDRECEMENT then
+                    s:='-'
+                  else
+                    s:='';
+                  case base of
+                    NR_R26:
+                      s:=s+'X';
+                    NR_R28:
+                      s:=s+'Y';
+                    NR_R30:
+                      s:=s+'Z';
+                    else
+                      s:=gas_regname(base);
+                  end;
+                  if addressmode=AM_POSTINCREMENT then
+                    s:=s+'+';
+
+                  if offset>0 then
+                    s:=s+'+'+tostr(offset)
+                  else if offset<0 then
+                    s:=s+tostr(offset)
+                end
+              else if assigned(symbol) or (offset<>0) then
+                begin
+                  if assigned(symbol) then
+                    s:=ReplaceForbiddenChars(symbol.name)
+                  else
+                     s:='';
+
+                  if offset<0 then
+                    s:=s+tostr(offset)
+                  else if offset>0 then
+                    s:=s+'+'+tostr(offset);
+                  case refaddr of
+                    addr_hi8:
+                      s:='hi8('+s+')';
+                    addr_lo8:
+                      s:='lo8('+s+')';
+                    else
+                      s:='('+s+')';
+                  end;
+                end;
+            end;
+          getreferencestring:=s;
+        end;
 
 
 
 
-    function getopstr(const o:toper) : string;
-      var
-        hs : string;
-        first : boolean;
-        r : tsuperregister;
-      begin
-        case o.typ of
-          top_reg:
-            getopstr:=gas_regname(o.reg);
-          top_const:
-            getopstr:='#'+tostr(longint(o.val));
-          top_ref:
-            if o.ref^.refaddr=addr_full then
-              begin
-                hs:=o.ref^.symbol.name;
-                if o.ref^.offset>0 then
-                 hs:=hs+'+'+tostr(o.ref^.offset)
-                else
-                 if o.ref^.offset<0 then
-                  hs:=hs+tostr(o.ref^.offset);
-                getopstr:=hs;
-              end
+      function getopstr(const o:toper) : string;
+        var
+          hs : string;
+          first : boolean;
+          r : tsuperregister;
+        begin
+          case o.typ of
+            top_reg:
+              getopstr:=gas_regname(o.reg);
+            top_const:
+              getopstr:=tostr(longint(o.val));
+            top_ref:
+              if o.ref^.refaddr=addr_full then
+                begin
+                  hs:=ReplaceForbiddenChars(o.ref^.symbol.name);
+                  if o.ref^.offset>0 then
+                   hs:=hs+'+'+tostr(o.ref^.offset)
+                  else
+                   if o.ref^.offset<0 then
+                    hs:=hs+tostr(o.ref^.offset);
+                  getopstr:=hs;
+                end
+              else
+                getopstr:=getreferencestring(o.ref^);
             else
             else
-              getopstr:=getreferencestring(o.ref^);
-          else
-            internalerror(2002070604);
+              internalerror(2002070604);
+          end;
         end;
         end;
-      end;
-
 
 
-    Procedure TAVRInstrWriter.WriteInstruction(hp : tai);
     var op: TAsmOp;
     var op: TAsmOp;
         s: string;
         s: string;
         i: byte;
         i: byte;
@@ -151,6 +190,12 @@ unit agavrgas;
     end;
     end;
 
 
 
 
+    function TAVRGNUAssembler.MakeCmdLine: TCmdStr;
+      begin
+        result := '-mmcu='+lower(cputypestr[current_settings.cputype])+' '+inherited MakeCmdLine;
+      end;
+
+
     const
     const
        as_arm_gas_info : tasminfo =
        as_arm_gas_info : tasminfo =
           (
           (

+ 37 - 1
compiler/avr/aoptcpu.pas

@@ -40,7 +40,7 @@ Type
 Implementation
 Implementation
 
 
   uses
   uses
-    aasmbase,aasmcpu;
+    aasmbase,aasmcpu,cgbase;
 
 
   function CanBeCond(p : tai) : boolean;
   function CanBeCond(p : tai) : boolean;
     begin
     begin
@@ -53,8 +53,44 @@ Implementation
       next1: tai;
       next1: tai;
     begin
     begin
       result := false;
       result := false;
+      case p.typ of
+        ait_instruction:
+          begin
+            case taicpu(p).opcode of
+              A_MOV:
+                begin
+                  { fold
+                    mov reg2,reg0
+                    mov reg3,reg1
+                    to
+                    movw reg2,reg0
+                  }
+                  if (taicpu(p).ops=2) and
+                     (taicpu(p).oper[0]^.typ = top_reg) and
+                     (taicpu(p).oper[1]^.typ = top_reg) and
+                     getnextinstruction(p,next1) and
+                     (next1.typ = ait_instruction) and
+                     (taicpu(next1).opcode = A_MOV) and
+                     (taicpu(next1).ops=2) and
+                     (taicpu(next1).oper[0]^.typ = top_reg) and
+                     (taicpu(next1).oper[1]^.typ = top_reg) and
+                     (getsupreg(taicpu(next1).oper[0]^.reg)=getsupreg(taicpu(p).oper[0]^.reg)+1) and
+                     ((getsupreg(taicpu(p).oper[0]^.reg) mod 2)=0) and
+                     ((getsupreg(taicpu(p).oper[1]^.reg) mod 2)=0) and
+                     (getsupreg(taicpu(next1).oper[1]^.reg)=getsupreg(taicpu(p).oper[1]^.reg)+1) then
+                    begin
+                      taicpu(p).opcode:=A_MOVW;
+                      asml.remove(next1);
+                      next1.free;
+                      result := true;
+                    end;
+                end;
+            end;
+          end;
+      end;
     end;
     end;
 
 
+
   procedure TCpuAsmOptimizer.PeepHoleOptPass2;
   procedure TCpuAsmOptimizer.PeepHoleOptPass2;
     begin
     begin
     end;
     end;

File diff suppressed because it is too large
+ 448 - 126
compiler/avr/cgcpu.pas


+ 25 - 6
compiler/avr/cpubase.pas

@@ -44,7 +44,7 @@ unit cpubase;
 
 
     type
     type
       TAsmOp=(A_None,
       TAsmOp=(A_None,
-        A_ADD,A_ADC,A_ADIW,A_SUB,A_SUBI,A_SBC,A_SBCI,A_SBIW,A_AND,A_ANDI,
+        A_ADD,A_ADC,A_ADIW,A_SUB,A_SUBI,A_SBC,A_SBCI,A_SBRC,A_SBRS,A_CLC,A_SEC,A_SBIW,A_AND,A_ANDI,
         A_OR,A_ORI,A_EOR,A_COM,A_NEG,A_SBR,A_CBR,A_INC,A_DEC,A_TST,A_CLR,
         A_OR,A_ORI,A_EOR,A_COM,A_NEG,A_SBR,A_CBR,A_INC,A_DEC,A_TST,A_CLR,
         A_SER,A_MUL,A_MULS,A_FMUL,A_FMULS,A_FMULSU,A_RJMP,A_IJMP,
         A_SER,A_MUL,A_MULS,A_FMUL,A_FMULS,A_FMULSU,A_RJMP,A_IJMP,
         A_EIJMP,A_JMP,A_RCALL,A_ICALL,R_EICALL,A_CALL,A_RET,A_RETI,A_CPSE,
         A_EIJMP,A_JMP,A_RCALL,A_ICALL,R_EICALL,A_CALL,A_RET,A_RETI,A_CPSE,
@@ -121,7 +121,7 @@ unit cpubase;
         {$i ravrdwa.inc}
         {$i ravrdwa.inc}
       );
       );
       { registers which may be destroyed by calls }
       { registers which may be destroyed by calls }
-      VOLATILE_INTREGISTERS = [RS_R18..RS_R27,RS_R30..RS_R31];
+      VOLATILE_INTREGISTERS = [RS_R0,RS_R1,RS_R8..RS_R27,RS_R30,RS_R31];
       VOLATILE_FPUREGISTERS = [];
       VOLATILE_FPUREGISTERS = [];
 
 
     type
     type
@@ -259,8 +259,8 @@ unit cpubase;
       NR_STACK_POINTER_REG = NR_R13;
       NR_STACK_POINTER_REG = NR_R13;
       RS_STACK_POINTER_REG = RS_R13;
       RS_STACK_POINTER_REG = RS_R13;
       { Frame pointer register }
       { Frame pointer register }
-      RS_FRAME_POINTER_REG = RS_R11;
-      NR_FRAME_POINTER_REG = NR_R11;
+      RS_FRAME_POINTER_REG = RS_R28;
+      NR_FRAME_POINTER_REG = NR_R28;
       { Register for addressing absolute data in a position independant way,
       { Register for addressing absolute data in a position independant way,
         such as in PIC code. The exact meaning is ABI specific. For
         such as in PIC code. The exact meaning is ABI specific. For
         further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
         further information look at GCC source : PIC_OFFSET_TABLE_REGNUM
@@ -306,8 +306,10 @@ unit cpubase;
         This value can be deduced from the CALLED_USED_REGISTERS array in the
         This value can be deduced from the CALLED_USED_REGISTERS array in the
         GCC source.
         GCC source.
       }
       }
-      saved_standard_registers : array[0..6] of tsuperregister =
-        (RS_R4,RS_R5,RS_R6,RS_R7,RS_R8,RS_R9,RS_R10);
+      { on avr, gen_entry/gen_exit code saves/restores registers, so
+        we don't need this array }
+      saved_standard_registers : array[0..0] of tsuperregister =
+        (RS_INVALID);
       { Required parameter alignment when calling a routine declared as
       { Required parameter alignment when calling a routine declared as
         stdcall and cdecl. The alignment value should be the one defined
         stdcall and cdecl. The alignment value should be the one defined
         by GCC or the target ABI.
         by GCC or the target ABI.
@@ -341,6 +343,11 @@ unit cpubase;
     { returns the next virtual register }
     { returns the next virtual register }
     function GetNextReg(const r : TRegister) : TRegister;
     function GetNextReg(const r : TRegister) : TRegister;
 
 
+    { returns the last virtual register }
+    function GetLastReg(const r : TRegister) : TRegister;
+
+    function GetOffsetReg(const r : TRegister;ofs : shortint) : TRegister;
+
   implementation
   implementation
 
 
     uses
     uses
@@ -469,4 +476,16 @@ unit cpubase;
         result:=TRegister(longint(r)+1);
         result:=TRegister(longint(r)+1);
       end;
       end;
 
 
+
+    function GetLastReg(const r: TRegister): TRegister;
+      begin
+        result:=TRegister(longint(r)-1);
+      end;
+
+
+    function GetOffsetReg(const r: TRegister;ofs : shortint): TRegister;
+      begin
+        result:=TRegister(longint(r)+ofs);
+      end;
+
 end.
 end.

+ 47 - 2
compiler/avr/cpuinfo.pas

@@ -32,8 +32,30 @@ Type
    { possible supported processors for this target }
    { possible supported processors for this target }
    tcputype =
    tcputype =
       (cpu_none,
       (cpu_none,
-       cpu_avr
+       cpu_avr1,
+       cpu_avr2,
+       cpu_avr25,
+       cpu_avr3,
+       cpu_avr31,
+       cpu_avr35,
+       cpu_avr4,
+       cpu_avr5,
+       cpu_avr51,
+       cpu_avr6
       );
       );
+
+   tcpuflags =
+      (AVR_HAVE_JMP_CALL,
+       AVR_HAVE_MOVW,
+       AVR_HAVE_LPMX,
+       AVR_HAVE_MUL,
+       AVR_HAVE_RAMPZ,
+       AVR_HAVE_ELPM,
+       AVR_HAVE_ELPMX,
+       AVR_2_BYTE_PC,
+       AVR_3_BYTE_PC
+      );
+
    tfputype =
    tfputype =
      (fpu_none,
      (fpu_none,
       fpu_soft,
       fpu_soft,
@@ -72,7 +94,16 @@ Const
    ];
    ];
 
 
    cputypestr : array[tcputype] of string[5] = ('',
    cputypestr : array[tcputype] of string[5] = ('',
-     'AVR'
+     'AVR1',
+     'AVR2',
+     'AVR25',
+     'AVR3',
+     'AVR31',
+     'AVR35',
+     'AVR4',
+     'AVR5',
+     'AVR51',
+     'AVR6'
    );
    );
 
 
    fputypestr : array[tfputype] of string[6] = (
    fputypestr : array[tfputype] of string[6] = (
@@ -112,6 +143,20 @@ Const
      [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion];
      [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion];
    level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
    level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
 
 
+   cpu_capabilities : array[tcputype] of set of tcpuflags =
+     ( { cpu_none } [],
+       { cpu_avr1 } [],
+       { cpu_avr2 } [],
+       { cpu_avr25 } [],
+       { cpu_avr3 } [],
+       { cpu_avr31 } [],
+       { cpu_avr35 } [],
+       { cpu_avr4 } [],
+       { cpu_avr5 } [],
+       { cpu_avr51 } [],
+       { cpu_avr6 } []
+     );
+
 Implementation
 Implementation
 
 
 end.
 end.

+ 12 - 10
compiler/avr/cpupara.pas

@@ -84,17 +84,17 @@ unit cpupara;
           begin
           begin
             size:=OS_INT;
             size:=OS_INT;
             { the four first parameters are passed into registers }
             { the four first parameters are passed into registers }
-            if nr<=4 then
+            if nr<=9 then
               begin
               begin
                 loc:=LOC_REGISTER;
                 loc:=LOC_REGISTER;
-                register:=newreg(R_INTREGISTER,RS_R0+nr-1,R_SUBWHOLE);
+                register:=newreg(R_INTREGISTER,RS_R25-(nr-1)*2,R_SUBWHOLE);
               end
               end
             else
             else
               begin
               begin
                 { the other parameters are passed on the stack }
                 { the other parameters are passed on the stack }
                 loc:=LOC_REFERENCE;
                 loc:=LOC_REFERENCE;
                 reference.index:=NR_STACK_POINTER_REG;
                 reference.index:=NR_STACK_POINTER_REG;
-                reference.offset:=(nr-5)*4;
+                reference.offset:=(nr-10)*2;
               end;
               end;
           end;
           end;
       end;
       end;
@@ -200,13 +200,14 @@ unit cpupara;
 
 
     procedure tavrparamanager.init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
     procedure tavrparamanager.init_values(var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword);
       begin
       begin
-        curintreg:=RS_R0;
+        curintreg:=RS_R25;
         curfloatreg:=RS_INVALID;
         curfloatreg:=RS_INVALID;
         curmmreg:=RS_INVALID;
         curmmreg:=RS_INVALID;
         cur_stack_offset:=0;
         cur_stack_offset:=0;
       end;
       end;
 
 
 
 
+    { TODO : fix tavrparamanager.create_paraloc_info_intern }
     function tavrparamanager.create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras: tparalist;
     function tavrparamanager.create_paraloc_info_intern(p : tabstractprocdef; side: tcallercallee; paras: tparalist;
         var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword):longint;
         var curintreg, curfloatreg, curmmreg: tsuperregister; var cur_stack_offset: aword):longint;
 
 
@@ -225,7 +226,7 @@ unit cpupara;
         begin
         begin
           { In case of po_delphi_nested_cc, the parent frame pointer
           { In case of po_delphi_nested_cc, the parent frame pointer
             is always passed on the stack. }
             is always passed on the stack. }
-           if (nextintreg<=RS_R3) and
+           if (nextintreg>RS_R8) and
               (not(vo_is_parentfp in hp.varoptions) or
               (not(vo_is_parentfp in hp.varoptions) or
                not(po_delphi_nested_cc in p.procoptions)) then
                not(po_delphi_nested_cc in p.procoptions)) then
              begin
              begin
@@ -238,7 +239,7 @@ unit cpupara;
                paraloc^.loc:=LOC_REFERENCE;
                paraloc^.loc:=LOC_REFERENCE;
                paraloc^.reference.index:=NR_STACK_POINTER_REG;
                paraloc^.reference.index:=NR_STACK_POINTER_REG;
                paraloc^.reference.offset:=stack_offset;
                paraloc^.reference.offset:=stack_offset;
-               inc(stack_offset,4);
+               dec(stack_offset,2);
             end;
             end;
         end;
         end;
 
 
@@ -265,7 +266,7 @@ unit cpupara;
                 paraloc:=hp.paraloc[side].add_location;
                 paraloc:=hp.paraloc[side].add_location;
                 { hack: the paraloc must be valid, but is not actually used }
                 { hack: the paraloc must be valid, but is not actually used }
                 paraloc^.loc:=LOC_REGISTER;
                 paraloc^.loc:=LOC_REGISTER;
-                paraloc^.register:=NR_R0;
+                paraloc^.register:=NR_R25;
                 paraloc^.size:=OS_ADDR;
                 paraloc^.size:=OS_ADDR;
                 break;
                 break;
               end;
               end;
@@ -333,11 +334,11 @@ unit cpupara;
                       begin
                       begin
                         { this is not abi compliant
                         { this is not abi compliant
                           why? (FK) }
                           why? (FK) }
-                        if nextintreg<=RS_R3 then
+                        if nextintreg>=RS_R8 then
                           begin
                           begin
                             paraloc^.loc:=LOC_REGISTER;
                             paraloc^.loc:=LOC_REGISTER;
                             paraloc^.register:=newreg(R_INTREGISTER,nextintreg,R_SUBWHOLE);
                             paraloc^.register:=newreg(R_INTREGISTER,nextintreg,R_SUBWHOLE);
-                            inc(nextintreg);
+                            dec(nextintreg);
                           end
                           end
                         else
                         else
                           begin
                           begin
@@ -374,7 +375,7 @@ unit cpupara;
                      if paraloc^.loc=LOC_REFERENCE then
                      if paraloc^.loc=LOC_REFERENCE then
                        begin
                        begin
                          paraloc^.reference.index:=NR_FRAME_POINTER_REG;
                          paraloc^.reference.index:=NR_FRAME_POINTER_REG;
-                         inc(paraloc^.reference.offset,4);
+                         inc(paraloc^.reference.offset,2);
                        end;
                        end;
                    end;
                    end;
                  dec(paralen,tcgsize2size[paraloc^.size]);
                  dec(paralen,tcgsize2size[paraloc^.size]);
@@ -408,6 +409,7 @@ unit cpupara;
       end;
       end;
 
 
 
 
+    { TODO : fix tavrparamanager.get_funcretloc }
     function  tavrparamanager.get_funcretloc(p : tabstractprocdef; side: tcallercallee; def: tdef): tcgpara;
     function  tavrparamanager.get_funcretloc(p : tabstractprocdef; side: tcallercallee; def: tdef): tcgpara;
       var
       var
         retcgsize : tcgsize;
         retcgsize : tcgsize;

+ 2 - 14
compiler/avr/cpupi.pas

@@ -33,7 +33,6 @@ unit cpupi;
 
 
     type
     type
        tavrprocinfo = class(tcgprocinfo)
        tavrprocinfo = class(tcgprocinfo)
-          floatregstart : aint;
           // procedure handle_body_start;override;
           // procedure handle_body_start;override;
           // procedure after_pass1;override;
           // procedure after_pass1;override;
           procedure set_first_temp_offset;override;
           procedure set_first_temp_offset;override;
@@ -54,26 +53,14 @@ unit cpupi;
 
 
     procedure tavrprocinfo.set_first_temp_offset;
     procedure tavrprocinfo.set_first_temp_offset;
       begin
       begin
-        { We allocate enough space to save all registers because we can't determine
-          the necessary space because the used registers aren't known before
-          secondpass is run. Even worse, patching
-          the local offsets after generating the code could cause trouble because
-          "shifter" constants could change to non-"shifter" constants. This
-          is especially a problem when taking the address of a local. For now,
-          this extra memory should hurt less than generating all local contants with offsets
-          >256 as non shifter constants }
         if tg.direction = -1 then
         if tg.direction = -1 then
-          tg.setfirsttemp(-12-28)
+          tg.setfirsttemp(0)
         else
         else
           tg.setfirsttemp(maxpushedparasize);
           tg.setfirsttemp(maxpushedparasize);
       end;
       end;
 
 
 
 
     function tavrprocinfo.calc_stackframe_size:longint;
     function tavrprocinfo.calc_stackframe_size:longint;
-      var
-         firstfloatreg,lastfloatreg,
-         r : byte;
-         floatsavesize : aword;
       begin
       begin
         maxpushedparasize:=align(maxpushedparasize,max(current_settings.alignment.localalignmin,4));
         maxpushedparasize:=align(maxpushedparasize,max(current_settings.alignment.localalignmin,4));
       end;
       end;
@@ -82,3 +69,4 @@ unit cpupi;
 begin
 begin
    cprocinfo:=tavrprocinfo;
    cprocinfo:=tavrprocinfo;
 end.
 end.
+

+ 1 - 1
compiler/avr/itcpugas.pas

@@ -35,7 +35,7 @@ interface
       processor manufacturer.
       processor manufacturer.
     }
     }
     gas_op2str : op2strtable = ('',
     gas_op2str : op2strtable = ('',
-        'add','adc','adiw','sub','subi','sbc','sbci','sbiw','and','andi',
+        'add','adc','adiw','sub','subi','sbc','sbci','sbrc','sbrs','clc','sec','sbiw','and','andi',
         'or','ori','eor','com','neg','sbr','cbr','inc','dec','tst','clr',
         'or','ori','eor','com','neg','sbr','cbr','inc','dec','tst','clr',
         'ser','mul','muls','fmul','fmuls','fmulsu','rjmp','ijmp',
         'ser','mul','muls','fmul','fmuls','fmulsu','rjmp','ijmp',
         'eijmp','jmp','rcall','icall','eicall','call','ret','reti','cpse',
         'eijmp','jmp','rcall','icall','eicall','call','ret','reti','cpse',

+ 26 - 8
compiler/avr/navradd.pas

@@ -120,25 +120,36 @@ interface
 
 
 
 
     procedure tavraddnode.second_cmpsmallset;
     procedure tavraddnode.second_cmpsmallset;
+
+      procedure gencmp(tmpreg1,tmpreg2 : tregister);
+        var
+          i : byte;
+        begin
+          current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CP,tmpreg1,tmpreg2));
+          for i:=2 to tcgsize2size[left.location.size] do
+            begin
+              tmpreg1:=GetNextReg(tmpreg1);
+              tmpreg2:=GetNextReg(tmpreg2);
+              current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,tmpreg2));
+            end;
+        end;
+
       var
       var
         tmpreg : tregister;
         tmpreg : tregister;
       begin
       begin
-        {
         pass_left_right;
         pass_left_right;
-
         location_reset(location,LOC_FLAGS,OS_NO);
         location_reset(location,LOC_FLAGS,OS_NO);
-
         force_reg_left_right(false,false);
         force_reg_left_right(false,false);
 
 
         case nodetype of
         case nodetype of
           equaln:
           equaln:
             begin
             begin
-              current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register,right.location.register));
+              gencmp(left.location.register,right.location.register);
               location.resflags:=F_EQ;
               location.resflags:=F_EQ;
             end;
             end;
           unequaln:
           unequaln:
             begin
             begin
-              current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,left.location.register,right.location.register));
+              gencmp(left.location.register,right.location.register);
               location.resflags:=F_NE;
               location.resflags:=F_NE;
             end;
             end;
           lten,
           lten,
@@ -150,14 +161,14 @@ interface
                   (nodetype = gten)) then
                   (nodetype = gten)) then
                 swapleftright;
                 swapleftright;
               tmpreg:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
               tmpreg:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
-              current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_AND,tmpreg,left.location.register,right.location.register));
-              current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CMP,tmpreg,right.location.register));
+              cg.a_op_reg_reg_reg(current_asmdata.CurrAsmList,OP_AND,location.size,
+                left.location.register,right.location.register,tmpreg);
+              gencmp(tmpreg,right.location.register);
               location.resflags:=F_EQ;
               location.resflags:=F_EQ;
             end;
             end;
           else
           else
             internalerror(2004012401);
             internalerror(2004012401);
         end;
         end;
-        }
       end;
       end;
 
 
 
 
@@ -182,6 +193,13 @@ interface
 
 
         for i:=2 to tcgsize2size[left.location.size] do
         for i:=2 to tcgsize2size[left.location.size] do
           begin
           begin
+            tmpreg1:=GetNextReg(tmpreg1);
+            tmpreg2:=GetNextReg(tmpreg2);
+            if i=5 then
+              begin
+                tmpreg1:=left.location.registerhi;
+                tmpreg2:=right.location.registerhi;
+              end;
             current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,tmpreg2));
             current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_CPC,tmpreg1,tmpreg2));
           end;
           end;
 
 

+ 1 - 122
compiler/avr/navrcnv.pas

@@ -44,7 +44,7 @@ interface
          { procedure second_cord_to_pointer;override; }
          { procedure second_cord_to_pointer;override; }
          { procedure second_proc_to_procvar;override; }
          { procedure second_proc_to_procvar;override; }
          { procedure second_bool_to_int;override; }
          { procedure second_bool_to_int;override; }
-           procedure second_int_to_bool;override;
+         {  procedure second_int_to_bool;override; }
          { procedure second_load_smallset;override;  }
          { procedure second_load_smallset;override;  }
          { procedure second_ansistring_to_pchar;override; }
          { procedure second_ansistring_to_pchar;override; }
          { procedure second_pchar_to_string;override; }
          { procedure second_pchar_to_string;override; }
@@ -54,127 +54,6 @@ interface
 
 
 implementation
 implementation
 
 
-   uses
-      verbose,globtype,globals,systems,
-      symconst,symdef,aasmbase,aasmtai,aasmdata,
-      defutil,
-      cgbase,cgutils,
-      pass_1,pass_2,procinfo,
-      ncon,ncal,
-      ncgutil,
-      cpubase,aasmcpu,
-      rgobj,tgobj,cgobj,cgcpu;
-
-
-    procedure tarmtypeconvnode.second_int_to_bool;
-      var
-        hregister : tregister;
-        href      : treference;
-        resflags  : tresflags;
-        hlabel,oldTrueLabel,oldFalseLabel : tasmlabel;
-        newsize   : tcgsize;
-      begin
-        {
-        oldTrueLabel:=current_procinfo.CurrTrueLabel;
-        oldFalseLabel:=current_procinfo.CurrFalseLabel;
-        current_asmdata.getjumplabel(current_procinfo.CurrTrueLabel);
-        current_asmdata.getjumplabel(current_procinfo.CurrFalseLabel);
-        secondpass(left);
-        if codegenerror then
-         exit;
-
-        { Explicit typecasts from any ordinal type to a boolean type }
-        { must not change the ordinal value                          }
-        if (nf_explicit in flags) and
-           not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
-          begin
-             location_copy(location,left.location);
-             newsize:=def_cgsize(resultdef);
-             { change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
-             if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
-                ((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
-               location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
-             else
-               location.size:=newsize;
-             current_procinfo.CurrTrueLabel:=oldTrueLabel;
-             current_procinfo.CurrFalseLabel:=oldFalseLabel;
-             exit;
-          end;
-
-        { Load left node into flag F_NE/F_E }
-        resflags:=F_NE;
-        case left.location.loc of
-          LOC_CREFERENCE,
-          LOC_REFERENCE :
-            begin
-              if left.location.size in [OS_64,OS_S64] then
-               begin
-                 hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-                 cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_32,OS_32,left.location.reference,hregister);
-                 href:=left.location.reference;
-                 inc(href.offset,4);
-                 tcgarm(cg).cgsetflags:=true;
-                 cg.a_op_ref_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,href,hregister);
-                 tcgarm(cg).cgsetflags:=false;
-               end
-              else
-               begin
-                 location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
-                 tcgarm(cg).cgsetflags:=true;
-                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,left.location.size,left.location.register,left.location.register);
-                 tcgarm(cg).cgsetflags:=false;
-               end;
-            end;
-          LOC_FLAGS :
-            begin
-              resflags:=left.location.resflags;
-            end;
-          LOC_REGISTER,LOC_CREGISTER :
-            begin
-              if left.location.size in [OS_64,OS_S64] then
-               begin
-                 hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
-                 cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_32,OS_32,left.location.register64.reglo,hregister);
-                 tcgarm(cg).cgsetflags:=true;
-                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,left.location.register64.reghi,hregister);
-                 tcgarm(cg).cgsetflags:=false;
-               end
-              else
-               begin
-                 tcgarm(cg).cgsetflags:=true;
-                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,left.location.size,left.location.register,left.location.register);
-                 tcgarm(cg).cgsetflags:=false;
-               end;
-            end;
-          LOC_JUMP :
-            begin
-              hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-              current_asmdata.getjumplabel(hlabel);
-              cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
-              cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_INT,1,hregister);
-              cg.a_jmp_always(current_asmdata.CurrAsmList,hlabel);
-              cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
-              cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_INT,0,hregister);
-              cg.a_label(current_asmdata.CurrAsmList,hlabel);
-              tcgarm(cg).cgsetflags:=true;
-              cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_INT,hregister,hregister);
-              tcgarm(cg).cgsetflags:=false;
-            end;
-          else
-            internalerror(200311301);
-        end;
-        { load flags to register }
-        location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
-        location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
-        cg.g_flags2reg(current_asmdata.CurrAsmList,location.size,resflags,location.register);
-        if (is_cbool(resultdef)) then
-          cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,location.size,location.register,location.register);
-        current_procinfo.CurrTrueLabel:=oldTrueLabel;
-        current_procinfo.CurrFalseLabel:=oldFalseLabel;
-        }
-      end;
-
-
 begin
 begin
   ctypeconvnode:=tarmtypeconvnode;
   ctypeconvnode:=tarmtypeconvnode;
 end.
 end.

+ 7 - 12
compiler/avr/raavrgas.pas

@@ -333,13 +333,6 @@ Unit raavrgas;
               BuildReference(oper);
               BuildReference(oper);
             end;
             end;
 
 
-          AS_HASH: { Constant expression  }
-            Begin
-              Consume(AS_HASH);
-              BuildConstantOperand(oper);
-            end;
-
-          (*
           AS_INTNUM,
           AS_INTNUM,
           AS_MINUS,
           AS_MINUS,
           AS_PLUS:
           AS_PLUS:
@@ -348,16 +341,18 @@ Unit raavrgas;
               { This must absolutely be followed by (  }
               { This must absolutely be followed by (  }
               oper.InitRef;
               oper.InitRef;
               oper.opr.ref.offset:=BuildConstExpression(True,False);
               oper.opr.ref.offset:=BuildConstExpression(True,False);
-              if actasmtoken<>AS_LPAREN then
+
+              { absolute memory addresss? }
+              if actopcode in [A_LDS,A_STS] then
+                BuildReference(oper)
+              else
                 begin
                 begin
                   ofs:=oper.opr.ref.offset;
                   ofs:=oper.opr.ref.offset;
                   BuildConstantOperand(oper);
                   BuildConstantOperand(oper);
                   inc(oper.opr.val,ofs);
                   inc(oper.opr.val,ofs);
-                end
-              else
-                BuildReference(oper);
+                end;
             end;
             end;
-          *)
+
           AS_ID: { A constant expression, or a Variable ref.  }
           AS_ID: { A constant expression, or a Variable ref.  }
             Begin
             Begin
               { Local Label ? }
               { Local Label ? }

+ 59 - 7
compiler/avr/rgcpu.pas

@@ -87,28 +87,80 @@ unit rgcpu;
       end;
       end;
 
 
 
 
-
     procedure trgcpu.do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
     procedure trgcpu.do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
+      var
+        helpins  : tai;
+        tmpref   : treference;
+        helplist : TAsmList;
+        hreg     : tregister;
       begin
       begin
-        inherited do_spill_read(list,pos,spilltemp,tempreg);
+        if abs(spilltemp.offset)>63 then
+          begin
+            helplist:=TAsmList.create;
+
+            helplist.concat(taicpu.op_reg_const(A_LDI,NR_R26,lo(word(spilltemp.offset))));
+            helplist.concat(taicpu.op_reg_const(A_LDI,NR_R27,hi(word(spilltemp.offset))));
+            helplist.concat(taicpu.op_reg_reg(A_ADD,NR_R26,spilltemp.base));
+            helplist.concat(taicpu.op_reg_reg(A_ADC,NR_R27,GetNextReg(spilltemp.base)));
+
+            reference_reset_base(tmpref,NR_R26,0,1);
+            helpins:=spilling_create_load(tmpref,tempreg);
+            helplist.concat(helpins);
+            list.insertlistafter(pos,helplist);
+            helplist.free;
+          end
+        else
+          inherited do_spill_read(list,pos,spilltemp,tempreg);
       end;
       end;
 
 
 
 
     procedure trgcpu.do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
     procedure trgcpu.do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
+      var
+        tmpref   : treference;
+        helplist : TAsmList;
+        hreg     : tregister;
       begin
       begin
-        inherited do_spill_written(list,pos,spilltemp,tempreg);
-      end;
+        if abs(spilltemp.offset)>63 then
+          begin
+            helplist:=TAsmList.create;
+
+            helplist.concat(taicpu.op_reg_const(A_LDI,NR_R26,lo(word(spilltemp.offset))));
+            helplist.concat(taicpu.op_reg_const(A_LDI,NR_R27,hi(word(spilltemp.offset))));
+            helplist.concat(taicpu.op_reg_reg(A_ADD,NR_R26,spilltemp.base));
+            helplist.concat(taicpu.op_reg_reg(A_ADC,NR_R27,GetNextReg(spilltemp.base)));
+
+            reference_reset_base(tmpref,NR_R26,0,1);
+            helplist.concat(spilling_create_store(tempreg,tmpref));
+            list.insertlistafter(pos,helplist);
+            helplist.free;
+          end
+        else
+          inherited do_spill_written(list,pos,spilltemp,tempreg);
+    end;
 
 
 
 
     procedure trgintcpu.add_cpu_interferences(p : tai);
     procedure trgintcpu.add_cpu_interferences(p : tai);
       var
       var
-        r : tregister;
+        r : tsuperregister;
       begin
       begin
         if p.typ=ait_instruction then
         if p.typ=ait_instruction then
           begin
           begin
             case taicpu(p).opcode of
             case taicpu(p).opcode of
-              A_LD:
-                ;
+              A_CPI,
+              A_ANDI,
+              A_ORI,
+              A_SUBI,
+              A_SBCI,
+              A_LDI:
+                for r:=RS_R0 to RS_R15 do
+                  add_edge(r,GetSupReg(taicpu(p).oper[0]^.reg));
+              A_MULS:
+                begin
+                  for r:=RS_R0 to RS_R15 do
+                    add_edge(r,GetSupReg(taicpu(p).oper[0]^.reg));
+                  for r:=RS_R0 to RS_R15 do
+                    add_edge(r,GetSupReg(taicpu(p).oper[1]^.reg));
+                end;
             end;
             end;
           end;
           end;
       end;
       end;

+ 6 - 18
compiler/cclasses.pas

@@ -1089,10 +1089,8 @@ end;
       Var
       Var
         p,pmax : pchar;
         p,pmax : pchar;
       begin
       begin
-{$ifopt Q+}
-{$define overflowon}
-{$Q-}
-{$endif}
+{$push}
+{$q-,r-}
         result:=0;
         result:=0;
         p:=@s[1];
         p:=@s[1];
         pmax:=@s[length(s)+1];
         pmax:=@s[length(s)+1];
@@ -1101,20 +1099,15 @@ end;
             result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             inc(p);
             inc(p);
           end;
           end;
-{$ifdef overflowon}
-{$Q+}
-{$undef overflowon}
-{$endif}
+{$pop}
       end;
       end;
 
 
     function FPHash(P: PChar; Len: Integer): LongWord;
     function FPHash(P: PChar; Len: Integer): LongWord;
       Var
       Var
         pmax : pchar;
         pmax : pchar;
       begin
       begin
-{$ifopt Q+}
-{$define overflowon}
-{$Q-}
-{$endif}
+{$push}
+{$q-,r-}
         result:=0;
         result:=0;
         pmax:=p+len;
         pmax:=p+len;
         while (p<pmax) do
         while (p<pmax) do
@@ -1122,10 +1115,7 @@ end;
             result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             result:=LongWord(LongInt(result shl 5) - LongInt(result)) xor LongWord(P^);
             inc(p);
             inc(p);
           end;
           end;
-{$ifdef overflowon}
-{$Q+}
-{$undef overflowon}
-{$endif}
+{$pop}
       end;
       end;
 
 
 
 
@@ -1416,8 +1406,6 @@ begin
 end;
 end;
 
 
 function TFPHashList.InternalFind(AHash:LongWord;const AName:shortstring;out PrevIndex:Integer):Integer;
 function TFPHashList.InternalFind(AHash:LongWord;const AName:shortstring;out PrevIndex:Integer):Integer;
-var
-  HashIndex : Integer;
 begin
 begin
   prefetch(AName);
   prefetch(AName);
   Result:=FHashTable^[AHash and FCapacityMask];
   Result:=FHashTable^[AHash and FCapacityMask];

+ 4 - 4
compiler/cfileutl.pas

@@ -52,7 +52,7 @@ interface
         FDirectoryEntries : TFPHashList;
         FDirectoryEntries : TFPHashList;
         FCached : Boolean;
         FCached : Boolean;
         procedure FreeDirectoryEntries;
         procedure FreeDirectoryEntries;
-        function GetItemAttr(const AName: TCmdStr): byte;
+        function GetItemAttr(const AName: TCmdStr): longint;
         function TryUseCache: boolean;
         function TryUseCache: boolean;
         procedure ForceUseCache;
         procedure ForceUseCache;
         procedure Reload;
         procedure Reload;
@@ -236,7 +236,7 @@ end;
       end;
       end;
 
 
 
 
-    function TCachedDirectory.GetItemAttr(const AName: TCmdStr): byte;
+    function TCachedDirectory.GetItemAttr(const AName: TCmdStr): longint;
       var
       var
         entry: PCachedDirectoryEntry;
         entry: PCachedDirectoryEntry;
       begin
       begin
@@ -523,8 +523,8 @@ end;
         if (length(s)>0) and (s[1] in AllowDirectorySeparators) then
         if (length(s)>0) and (s[1] in AllowDirectorySeparators) then
           result:=true;
           result:=true;
 {$elseif defined(amiga) or defined(morphos)}
 {$elseif defined(amiga) or defined(morphos)}
-        (* An Amiga path is absolute, if it has a volume/device name in it (contains ":"), 
-           otherwise it's always a relative path, no matter if it starts with a directory 
+        (* An Amiga path is absolute, if it has a volume/device name in it (contains ":"),
+           otherwise it's always a relative path, no matter if it starts with a directory
            separator or not. (KB) *)
            separator or not. (KB) *)
         if (length(s)>0) and (Pos(':',s) <> 0) then
         if (length(s)>0) and (Pos(':',s) <> 0) then
           result:=true;
           result:=true;

+ 110 - 103
compiler/cgobj.pas

@@ -140,7 +140,7 @@ unit cgobj;
              @param(a value of constant to send)
              @param(a value of constant to send)
              @param(cgpara where the parameter will be stored)
              @param(cgpara where the parameter will be stored)
           }
           }
-          procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const cgpara : TCGPara);virtual;
+          procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : TCGPara);virtual;
           {# Pass the value of a parameter, which is located in memory, to a routine.
           {# Pass the value of a parameter, which is located in memory, to a routine.
 
 
              A generic version is provided. This routine should
              A generic version is provided. This routine should
@@ -193,7 +193,7 @@ unit cgobj;
                   contains all of the "sizeleft" bytes).)
                   contains all of the "sizeleft" bytes).)
            @param(align the alignment of the paraloc in case it's a reference)
            @param(align the alignment of the paraloc in case it's a reference)
           }
           }
-          procedure a_load_cgparaloc_ref(list : TAsmList;const paraloc : TCGParaLocation;const ref : treference;sizeleft : aint;align : longint);
+          procedure a_load_cgparaloc_ref(list : TAsmList;const paraloc : TCGParaLocation;const ref : treference;sizeleft : tcgint;align : longint);
 
 
           {# Load a cgparaloc into any kind of register (int, fp, mm).
           {# Load a cgparaloc into any kind of register (int, fp, mm).
 
 
@@ -236,9 +236,9 @@ unit cgobj;
           procedure a_call_name_static(list : TAsmList;const s : string);virtual;
           procedure a_call_name_static(list : TAsmList;const s : string);virtual;
 
 
           { move instructions }
           { move instructions }
-          procedure a_load_const_reg(list : TAsmList;size : tcgsize;a : aint;register : tregister);virtual; abstract;
-          procedure a_load_const_ref(list : TAsmList;size : tcgsize;a : aint;const ref : treference);virtual;
-          procedure a_load_const_loc(list : TAsmList;a : aint;const loc : tlocation);
+          procedure a_load_const_reg(list : TAsmList;size : tcgsize;a : tcgint;register : tregister);virtual; abstract;
+          procedure a_load_const_ref(list : TAsmList;size : tcgsize;a : tcgint;const ref : treference);virtual;
+          procedure a_load_const_loc(list : TAsmList;a : tcgint;const loc : tlocation);
           procedure a_load_reg_ref(list : TAsmList;fromsize,tosize : tcgsize;register : tregister;const ref : treference);virtual; abstract;
           procedure a_load_reg_ref(list : TAsmList;fromsize,tosize : tcgsize;register : tregister;const ref : treference);virtual; abstract;
           procedure a_load_reg_ref_unaligned(list : TAsmList;fromsize,tosize : tcgsize;register : tregister;const ref : treference);virtual;
           procedure a_load_reg_ref_unaligned(list : TAsmList;fromsize,tosize : tcgsize;register : tregister;const ref : treference);virtual;
           procedure a_load_reg_reg(list : TAsmList;fromsize,tosize : tcgsize;reg1,reg2 : tregister);virtual; abstract;
           procedure a_load_reg_reg(list : TAsmList;fromsize,tosize : tcgsize;reg1,reg2 : tregister);virtual; abstract;
@@ -257,7 +257,7 @@ unit cgobj;
           procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsreg, tosreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsreg, tosreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_ref(list : TAsmList; subsetsize, tosize: tcgsize; const sreg: tsubsetregister; const destref: treference); virtual;
           procedure a_load_subsetreg_ref(list : TAsmList; subsetsize, tosize: tcgsize; const sreg: tsubsetregister; const destref: treference); virtual;
           procedure a_load_ref_subsetreg(list : TAsmList; fromsize, subsetsize: tcgsize; const fromref: treference; const sreg: tsubsetregister); virtual;
           procedure a_load_ref_subsetreg(list : TAsmList; fromsize, subsetsize: tcgsize; const fromref: treference; const sreg: tsubsetregister); virtual;
-          procedure a_load_const_subsetreg(list: TAsmlist; subsetsize: tcgsize; a: aint; const sreg: tsubsetregister); virtual;
+          procedure a_load_const_subsetreg(list: TAsmlist; subsetsize: tcgsize; a: tcgint; const sreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_loc(list: TAsmlist; subsetsize: tcgsize; const sreg: tsubsetregister; const loc: tlocation); virtual;
           procedure a_load_subsetreg_loc(list: TAsmlist; subsetsize: tcgsize; const sreg: tsubsetregister; const loc: tlocation); virtual;
 
 
           procedure a_load_subsetref_reg(list : TAsmList; subsetsize, tosize: tcgsize; const sref: tsubsetreference; destreg: tregister); virtual;
           procedure a_load_subsetref_reg(list : TAsmList; subsetsize, tosize: tcgsize; const sref: tsubsetreference; destreg: tregister); virtual;
@@ -265,28 +265,28 @@ unit cgobj;
           procedure a_load_subsetref_subsetref(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsref, tosref: tsubsetreference); virtual;
           procedure a_load_subsetref_subsetref(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsref, tosref: tsubsetreference); virtual;
           procedure a_load_subsetref_ref(list : TAsmList; subsetsize, tosize: tcgsize; const sref: tsubsetreference; const destref: treference); virtual;
           procedure a_load_subsetref_ref(list : TAsmList; subsetsize, tosize: tcgsize; const sref: tsubsetreference; const destref: treference); virtual;
           procedure a_load_ref_subsetref(list : TAsmList; fromsize, subsetsize: tcgsize; const fromref: treference; const sref: tsubsetreference); virtual;
           procedure a_load_ref_subsetref(list : TAsmList; fromsize, subsetsize: tcgsize; const fromref: treference; const sref: tsubsetreference); virtual;
-          procedure a_load_const_subsetref(list: TAsmlist; subsetsize: tcgsize; a: aint; const sref: tsubsetreference); virtual;
+          procedure a_load_const_subsetref(list: TAsmlist; subsetsize: tcgsize; a: tcgint; const sref: tsubsetreference); virtual;
           procedure a_load_subsetref_loc(list: TAsmlist; subsetsize: tcgsize; const sref: tsubsetreference; const loc: tlocation); virtual;
           procedure a_load_subsetref_loc(list: TAsmlist; subsetsize: tcgsize; const sref: tsubsetreference; const loc: tlocation); virtual;
           procedure a_load_subsetref_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsref: tsubsetreference; const tosreg: tsubsetregister); virtual;
           procedure a_load_subsetref_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsref: tsubsetreference; const tosreg: tsubsetregister); virtual;
           procedure a_load_subsetreg_subsetref(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsreg: tsubsetregister; const tosref: tsubsetreference); virtual;
           procedure a_load_subsetreg_subsetref(list: TAsmlist; fromsubsetsize, tosubsetsize : tcgsize; const fromsreg: tsubsetregister; const tosref: tsubsetreference); virtual;
 
 
           { bit test instructions }
           { bit test instructions }
           procedure a_bit_test_reg_reg_reg(list : TAsmList; bitnumbersize,valuesize,destsize: tcgsize;bitnumber,value,destreg: tregister); virtual;
           procedure a_bit_test_reg_reg_reg(list : TAsmList; bitnumbersize,valuesize,destsize: tcgsize;bitnumber,value,destreg: tregister); virtual;
-          procedure a_bit_test_const_ref_reg(list: TAsmList; destsize: tcgsize; bitnumber: aint; const ref: treference; destreg: tregister); virtual;
-          procedure a_bit_test_const_reg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: aint; setreg, destreg: tregister); virtual;
-          procedure a_bit_test_const_subsetreg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: aint; const setreg: tsubsetregister; destreg: tregister); virtual;
+          procedure a_bit_test_const_ref_reg(list: TAsmList; destsize: tcgsize; bitnumber: tcgint; const ref: treference; destreg: tregister); virtual;
+          procedure a_bit_test_const_reg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: tcgint; setreg, destreg: tregister); virtual;
+          procedure a_bit_test_const_subsetreg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: tcgint; const setreg: tsubsetregister; destreg: tregister); virtual;
           procedure a_bit_test_reg_ref_reg(list: TAsmList; bitnumbersize, destsize: tcgsize; bitnumber: tregister; const ref: treference; destreg: tregister); virtual;
           procedure a_bit_test_reg_ref_reg(list: TAsmList; bitnumbersize, destsize: tcgsize; bitnumber: tregister; const ref: treference; destreg: tregister); virtual;
           procedure a_bit_test_reg_loc_reg(list: TAsmList; bitnumbersize, destsize: tcgsize; bitnumber: tregister; const loc: tlocation; destreg: tregister);
           procedure a_bit_test_reg_loc_reg(list: TAsmList; bitnumbersize, destsize: tcgsize; bitnumber: tregister; const loc: tlocation; destreg: tregister);
-          procedure a_bit_test_const_loc_reg(list: TAsmList; destsize: tcgsize; bitnumber: aint; const loc: tlocation; destreg: tregister);
+          procedure a_bit_test_const_loc_reg(list: TAsmList; destsize: tcgsize; bitnumber: tcgint; const loc: tlocation; destreg: tregister);
 
 
           { bit set/clear instructions }
           { bit set/clear instructions }
           procedure a_bit_set_reg_reg(list : TAsmList; doset: boolean; bitnumbersize, destsize: tcgsize; bitnumber,dest: tregister); virtual;
           procedure a_bit_set_reg_reg(list : TAsmList; doset: boolean; bitnumbersize, destsize: tcgsize; bitnumber,dest: tregister); virtual;
-          procedure a_bit_set_const_ref(list: TAsmList; doset: boolean;destsize: tcgsize; bitnumber: aint; const ref: treference); virtual;
-          procedure a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: aint; destreg: tregister); virtual;
-          procedure a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: aint; const destreg: tsubsetregister); virtual;
+          procedure a_bit_set_const_ref(list: TAsmList; doset: boolean;destsize: tcgsize; bitnumber: tcgint; const ref: treference); virtual;
+          procedure a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: tcgint; destreg: tregister); virtual;
+          procedure a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: tcgint; const destreg: tsubsetregister); virtual;
           procedure a_bit_set_reg_ref(list: TAsmList; doset: boolean; bitnumbersize: tcgsize; bitnumber: tregister; const ref: treference); virtual;
           procedure a_bit_set_reg_ref(list: TAsmList; doset: boolean; bitnumbersize: tcgsize; bitnumber: tregister; const ref: treference); virtual;
           procedure a_bit_set_reg_loc(list: TAsmList; doset: boolean; bitnumbersize: tcgsize; bitnumber: tregister; const loc: tlocation);
           procedure a_bit_set_reg_loc(list: TAsmList; doset: boolean; bitnumbersize: tcgsize; bitnumber: tregister; const loc: tlocation);
-          procedure a_bit_set_const_loc(list: TAsmList; doset: boolean; bitnumber: aint; const loc: tlocation);
+          procedure a_bit_set_const_loc(list: TAsmList; doset: boolean; bitnumber: tcgint; const loc: tlocation);
 
 
           { bit scan instructions }
           { bit scan instructions }
           procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; size: tcgsize; src, dst: TRegister); virtual; abstract;
           procedure a_bit_scan_reg_reg(list: TAsmList; reverse: boolean; size: tcgsize; src, dst: TRegister); virtual; abstract;
@@ -323,11 +323,11 @@ unit cgobj;
           { the op_reg_reg, op_reg_ref or op_reg_loc methods and keep in mind   }
           { the op_reg_reg, op_reg_ref or op_reg_loc methods and keep in mind   }
           { that in this case the *second* operand is used as both source and   }
           { that in this case the *second* operand is used as both source and   }
           { destination (JM)                                                    }
           { destination (JM)                                                    }
-          procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: Aint; reg: TRegister); virtual; abstract;
-          procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: Aint; const ref: TReference); virtual;
-          procedure a_op_const_subsetreg(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : aint; const sreg: tsubsetregister); virtual;
-          procedure a_op_const_subsetref(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : aint; const sref: tsubsetreference); virtual;
-          procedure a_op_const_loc(list : TAsmList; Op: TOpCG; a: Aint; const loc: tlocation);
+          procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister); virtual; abstract;
+          procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; const ref: TReference); virtual;
+          procedure a_op_const_subsetreg(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : tcgint; const sreg: tsubsetregister); virtual;
+          procedure a_op_const_subsetref(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : tcgint; const sref: tsubsetreference); virtual;
+          procedure a_op_const_loc(list : TAsmList; Op: TOpCG; a: tcgint; const loc: tlocation);
           procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; reg1, reg2: TRegister); virtual; abstract;
           procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; reg1, reg2: TRegister); virtual; abstract;
           procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: TCGSize; reg: TRegister; const ref: TReference); virtual;
           procedure a_op_reg_ref(list : TAsmList; Op: TOpCG; size: TCGSize; reg: TRegister; const ref: TReference); virtual;
           procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: TCGSize; const ref: TReference; reg: TRegister); virtual;
           procedure a_op_ref_reg(list : TAsmList; Op: TOpCG; size: TCGSize; const ref: TReference; reg: TRegister); virtual;
@@ -339,17 +339,17 @@ unit cgobj;
           { trinary operations for processors that support them, 'emulated' }
           { trinary operations for processors that support them, 'emulated' }
           { on others. None with "ref" arguments since I don't think there  }
           { on others. None with "ref" arguments since I don't think there  }
           { are any processors that support it (JM)                         }
           { are any processors that support it (JM)                         }
-          procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister); virtual;
+          procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister); virtual;
           procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister); virtual;
           procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister); virtual;
-          procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
+          procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
           procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
           procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation); virtual;
 
 
           {  comparison operations }
           {  comparison operations }
-          procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
-            l : tasmlabel);virtual; abstract;
-          procedure a_cmp_const_ref_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;const ref : treference;
+          procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
             l : tasmlabel); virtual;
             l : tasmlabel); virtual;
-          procedure a_cmp_const_loc_label(list: TAsmList; size: tcgsize;cmp_op: topcmp; a: aint; const loc: tlocation;
+          procedure a_cmp_const_ref_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;const ref : treference;
+            l : tasmlabel); virtual;
+          procedure a_cmp_const_loc_label(list: TAsmList; size: tcgsize;cmp_op: topcmp; a: tcgint; const loc: tlocation;
             l : tasmlabel);
             l : tasmlabel);
           procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); virtual; abstract;
           procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); virtual; abstract;
           procedure a_cmp_ref_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp; const ref: treference; reg : tregister; l : tasmlabel); virtual;
           procedure a_cmp_ref_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp; const ref: treference; reg : tregister; l : tasmlabel); virtual;
@@ -384,7 +384,7 @@ unit cgobj;
              @param(a  The constant which should be emitted, returns the constant which must
              @param(a  The constant which should be emitted, returns the constant which must
                     be emitted)
                     be emitted)
           }
           }
-          procedure optimize_op_const(var op: topcg; var a : aint);virtual;
+          procedure optimize_op_const(var op: topcg; var a : tcgint);virtual;
 
 
          {#
          {#
              This routine is used in exception management nodes. It should
              This routine is used in exception management nodes. It should
@@ -405,7 +405,7 @@ unit cgobj;
              The size of the value to save is OS_S32. The default version
              The size of the value to save is OS_S32. The default version
              saves the exception reason to a temp. memory area.
              saves the exception reason to a temp. memory area.
           }
           }
-         procedure g_exception_reason_save_const(list : TAsmList; const href : treference; a: aint);virtual;
+         procedure g_exception_reason_save_const(list : TAsmList; const href : treference; a: tcgint);virtual;
          {#
          {#
              This routine is used in exception management nodes. It should
              This routine is used in exception management nodes. It should
              load the exception reason to the FUNCTION_RETURN_REG. The saved value
              load the exception reason to the FUNCTION_RETURN_REG. The saved value
@@ -428,7 +428,7 @@ unit cgobj;
              @param(dest Destination reference of copy)
              @param(dest Destination reference of copy)
 
 
           }
           }
-          procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);virtual; abstract;
+          procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);virtual; abstract;
           {# This should emit the opcode to copy len bytes from the an unaligned source
           {# This should emit the opcode to copy len bytes from the an unaligned source
              to destination.
              to destination.
 
 
@@ -438,7 +438,7 @@ unit cgobj;
              @param(dest Destination reference of copy)
              @param(dest Destination reference of copy)
 
 
           }
           }
-          procedure g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : aint);virtual;
+          procedure g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : tcgint);virtual;
           {# This should emit the opcode to a shortrstring from the source
           {# This should emit the opcode to a shortrstring from the source
              to destination.
              to destination.
 
 
@@ -469,7 +469,7 @@ unit cgobj;
           procedure g_overflowcheck(list: TAsmList; const Loc:tlocation; def:tdef); virtual;abstract;
           procedure g_overflowcheck(list: TAsmList; const Loc:tlocation; def:tdef); virtual;abstract;
           procedure g_overflowCheck_loc(List:TAsmList;const Loc:TLocation;def:TDef;ovloc : tlocation);virtual;
           procedure g_overflowCheck_loc(List:TAsmList;const Loc:TLocation;def:TDef;ovloc : tlocation);virtual;
 
 
-          procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);virtual;
+          procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);virtual;
           procedure g_releasevaluepara_openarray(list : TAsmList;const l:tlocation);virtual;
           procedure g_releasevaluepara_openarray(list : TAsmList;const l:tlocation);virtual;
 
 
           {# Emits instructions when compilation is done in profile
           {# Emits instructions when compilation is done in profile
@@ -516,7 +516,7 @@ unit cgobj;
           procedure g_restore_registers(list:TAsmList);virtual;
           procedure g_restore_registers(list:TAsmList);virtual;
 
 
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual;abstract;
           procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);virtual;abstract;
-          procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);virtual;
+          procedure g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);virtual;
 
 
           function g_indirect_sym_load(list:TAsmList;const symname: string; weak: boolean): tregister;virtual;
           function g_indirect_sym_load(list:TAsmList;const symname: string; weak: boolean): tregister;virtual;
           { generate a stub which only purpose is to pass control the given external method,
           { generate a stub which only purpose is to pass control the given external method,
@@ -535,8 +535,8 @@ unit cgobj;
           procedure a_load_regconst_subsetref_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sref: tsubsetreference; slopt: tsubsetloadopt); virtual;
           procedure a_load_regconst_subsetref_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sref: tsubsetreference; slopt: tsubsetloadopt); virtual;
           procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); virtual;
           procedure a_load_regconst_subsetreg_intern(list : TAsmList; fromsize, subsetsize: tcgsize; fromreg: tregister; const sreg: tsubsetregister; slopt: tsubsetloadopt); virtual;
 
 
-          function get_bit_const_ref_sref(bitnumber: aint; const ref: treference): tsubsetreference;
-          function get_bit_const_reg_sreg(setregsize: tcgsize; bitnumber: aint; setreg: tregister): tsubsetregister;
+          function get_bit_const_ref_sref(bitnumber: tcgint; const ref: treference): tsubsetreference;
+          function get_bit_const_reg_sreg(setregsize: tcgsize; bitnumber: tcgint; setreg: tregister): tsubsetregister;
           function get_bit_reg_ref_sref(list: TAsmList; bitnumbersize: tcgsize; bitnumber: tregister; const ref: treference): tsubsetreference;
           function get_bit_reg_ref_sref(list: TAsmList; bitnumbersize: tcgsize; bitnumber: tregister; const ref: treference): tsubsetreference;
        end;
        end;
 
 
@@ -757,12 +757,12 @@ implementation
     procedure tcg.allocallcpuregisters(list:TAsmList);
     procedure tcg.allocallcpuregisters(list:TAsmList);
       begin
       begin
         alloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
         alloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
-{$ifndef i386}
+{$if not(defined(i386)) and not(defined(avr))}
         alloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
         alloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
 {$ifdef cpumm}
 {$ifdef cpumm}
         alloccpuregisters(list,R_MMREGISTER,paramanager.get_volatile_registers_mm(pocall_default));
         alloccpuregisters(list,R_MMREGISTER,paramanager.get_volatile_registers_mm(pocall_default));
 {$endif cpumm}
 {$endif cpumm}
-{$endif i386}
+{$endif not(defined(i386)) and not(defined(avr))}
       end;
       end;
 
 
 
 
@@ -778,12 +778,12 @@ implementation
     procedure tcg.deallocallcpuregisters(list:TAsmList);
     procedure tcg.deallocallcpuregisters(list:TAsmList);
       begin
       begin
         dealloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
         dealloccpuregisters(list,R_INTREGISTER,paramanager.get_volatile_registers_int(pocall_default));
-{$ifndef i386}
+{$if not(defined(i386)) and not(defined(avr))}
         dealloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
         dealloccpuregisters(list,R_FPUREGISTER,paramanager.get_volatile_registers_fpu(pocall_default));
 {$ifdef cpumm}
 {$ifdef cpumm}
         dealloccpuregisters(list,R_MMREGISTER,paramanager.get_volatile_registers_mm(pocall_default));
         dealloccpuregisters(list,R_MMREGISTER,paramanager.get_volatile_registers_mm(pocall_default));
 {$endif cpumm}
 {$endif cpumm}
-{$endif i386}
+{$endif not(defined(i386)) and not(defined(avr))}
       end;
       end;
 
 
 
 
@@ -918,7 +918,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const cgpara : TCGPara);
+    procedure tcg.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : TCGPara);
       var
       var
          ref : treference;
          ref : treference;
       begin
       begin
@@ -944,7 +944,7 @@ implementation
         tmpreg: tregister;
         tmpreg: tregister;
         location: pcgparalocation;
         location: pcgparalocation;
         orgsizeleft,
         orgsizeleft,
-        sizeleft: aint;
+        sizeleft: tcgint;
         reghasvalue: boolean;
         reghasvalue: boolean;
       begin
       begin
         location:=cgpara.location;
         location:=cgpara.location;
@@ -1121,7 +1121,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_load_cgparaloc_ref(list : TAsmList;const paraloc : TCGParaLocation;const ref : treference;sizeleft : aint;align : longint);
+    procedure tcg.a_load_cgparaloc_ref(list : TAsmList;const paraloc : TCGParaLocation;const ref : treference;sizeleft : tcgint;align : longint);
       var
       var
         href : treference;
         href : treference;
       begin
       begin
@@ -1266,7 +1266,7 @@ implementation
              bitmask := (aword(1) shl (stopbit - sreg.startbit)) - 1
              bitmask := (aword(1) shl (stopbit - sreg.startbit)) - 1
            else
            else
              bitmask := high(aword);
              bitmask := high(aword);
-           a_op_const_reg(list,OP_AND,sreg.subsetregsize,aint(bitmask),tmpreg);
+           a_op_const_reg(list,OP_AND,sreg.subsetregsize,tcgint(bitmask),tmpreg);
          end;
          end;
        tmpreg := makeregsize(list,tmpreg,subsetsize);
        tmpreg := makeregsize(list,tmpreg,subsetsize);
        a_load_reg_reg(list,tcgsize2unsigned[subsetsize],subsetsize,tmpreg,tmpreg);
        a_load_reg_reg(list,tcgsize2unsigned[subsetsize],subsetsize,tmpreg,tmpreg);
@@ -1298,17 +1298,17 @@ implementation
            a_load_reg_reg(list,fromsize,sreg.subsetregsize,fromreg,tmpreg);
            a_load_reg_reg(list,fromsize,sreg.subsetregsize,fromreg,tmpreg);
            a_op_const_reg(list,OP_SHL,sreg.subsetregsize,sreg.startbit,tmpreg);
            a_op_const_reg(list,OP_SHL,sreg.subsetregsize,sreg.startbit,tmpreg);
             if (slopt <> SL_REGNOSRCMASK) then
             if (slopt <> SL_REGNOSRCMASK) then
-             a_op_const_reg(list,OP_AND,sreg.subsetregsize,aint(not(bitmask)),tmpreg);
+             a_op_const_reg(list,OP_AND,sreg.subsetregsize,tcgint(not(bitmask)),tmpreg);
          end;
          end;
        if (slopt <> SL_SETMAX) then
        if (slopt <> SL_SETMAX) then
-         a_op_const_reg(list,OP_AND,sreg.subsetregsize,aint(bitmask),sreg.subsetreg);
+         a_op_const_reg(list,OP_AND,sreg.subsetregsize,tcgint(bitmask),sreg.subsetreg);
 
 
        case slopt of
        case slopt of
          SL_SETZERO : ;
          SL_SETZERO : ;
          SL_SETMAX :
          SL_SETMAX :
            if (sreg.bitlen <> AIntBits) then
            if (sreg.bitlen <> AIntBits) then
              a_op_const_reg(list,OP_OR,sreg.subsetregsize,
              a_op_const_reg(list,OP_OR,sreg.subsetregsize,
-               aint(((aword(1) shl sreg.bitlen)-1) shl sreg.startbit),
+               tcgint(((aword(1) shl sreg.bitlen)-1) shl sreg.startbit),
                sreg.subsetreg)
                sreg.subsetreg)
            else
            else
              a_load_const_reg(list,sreg.subsetregsize,-1,sreg.subsetreg);
              a_load_const_reg(list,sreg.subsetregsize,-1,sreg.subsetreg);
@@ -1338,8 +1338,8 @@ implementation
               bitmask := not(((aword(1) shl stopbit)-1) xor ((aword(1) shl tosreg.startbit)-1))
               bitmask := not(((aword(1) shl stopbit)-1) xor ((aword(1) shl tosreg.startbit)-1))
              else
              else
                bitmask := (aword(1) shl tosreg.startbit) - 1;
                bitmask := (aword(1) shl tosreg.startbit) - 1;
-            a_op_const_reg(list,OP_AND,tosreg.subsetregsize,aint(bitmask),tosreg.subsetreg);
-            a_op_const_reg(list,OP_AND,tosreg.subsetregsize,aint(not(bitmask)),tmpreg);
+            a_op_const_reg(list,OP_AND,tosreg.subsetregsize,tcgint(bitmask),tosreg.subsetreg);
+            a_op_const_reg(list,OP_AND,tosreg.subsetregsize,tcgint(not(bitmask)),tmpreg);
             a_op_reg_reg(list,OP_OR,tosreg.subsetregsize,tmpreg,tosreg.subsetreg);
             a_op_reg_reg(list,OP_OR,tosreg.subsetregsize,tmpreg,tosreg.subsetreg);
           end
           end
         else
         else
@@ -1371,7 +1371,7 @@ implementation
      end;
      end;
 
 
 
 
-  procedure tcg.a_load_const_subsetreg(list: TAsmlist; subsetsize: tcgsize; a: aint; const sreg: tsubsetregister);
+  procedure tcg.a_load_const_subsetreg(list: TAsmlist; subsetsize: tcgsize; a: tcgint; const sreg: tsubsetregister);
     var
     var
       bitmask: aword;
       bitmask: aword;
       stopbit: byte;
       stopbit: byte;
@@ -1383,8 +1383,8 @@ implementation
        else
        else
          bitmask := (aword(1) shl sreg.startbit) - 1;
          bitmask := (aword(1) shl sreg.startbit) - 1;
        if (((aword(a) shl sreg.startbit) and not bitmask) <> not bitmask) then
        if (((aword(a) shl sreg.startbit) and not bitmask) <> not bitmask) then
-         a_op_const_reg(list,OP_AND,sreg.subsetregsize,aint(bitmask),sreg.subsetreg);
-       a_op_const_reg(list,OP_OR,sreg.subsetregsize,aint((aword(a) shl sreg.startbit) and not(bitmask)),sreg.subsetreg);
+         a_op_const_reg(list,OP_AND,sreg.subsetregsize,tcgint(bitmask),sreg.subsetreg);
+       a_op_const_reg(list,OP_OR,sreg.subsetregsize,tcgint((aword(a) shl sreg.startbit) and not(bitmask)),sreg.subsetreg);
     end;
     end;
 
 
 
 
@@ -1463,7 +1463,7 @@ implementation
 
 
     procedure tcg.get_subsetref_load_info(const sref: tsubsetreference; out loadsize: tcgsize; out extra_load: boolean);
     procedure tcg.get_subsetref_load_info(const sref: tsubsetreference; out loadsize: tcgsize; out extra_load: boolean);
       var
       var
-        intloadsize: aint;
+        intloadsize: tcgint;
       begin
       begin
         intloadsize := packedbitsloadsize(sref.bitlen);
         intloadsize := packedbitsloadsize(sref.bitlen);
 
 
@@ -1505,7 +1505,7 @@ implementation
                 a_op_const_reg(list,OP_SHL,OS_INT,restbits,valuereg);
                 a_op_const_reg(list,OP_SHL,OS_INT,restbits,valuereg);
                 { mask other bits }
                 { mask other bits }
                 if (sref.bitlen <> AIntBits) then
                 if (sref.bitlen <> AIntBits) then
-                  a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),valuereg);
+                  a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),valuereg);
               end;
               end;
             a_op_const_reg(list,OP_SHR,OS_INT,loadbitsize-restbits,extra_value_reg)
             a_op_const_reg(list,OP_SHR,OS_INT,loadbitsize-restbits,extra_value_reg)
           end
           end
@@ -1523,7 +1523,7 @@ implementation
                 a_op_const_reg(list,OP_SHL,OS_INT,loadbitsize-sref.startbit,extra_value_reg);
                 a_op_const_reg(list,OP_SHL,OS_INT,loadbitsize-sref.startbit,extra_value_reg);
                 { mask other bits }
                 { mask other bits }
                 if (sref.bitlen <> AIntBits) then
                 if (sref.bitlen <> AIntBits) then
-                  a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),extra_value_reg);
+                  a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),extra_value_reg);
               end;
               end;
           end;
           end;
         { merge }
         { merge }
@@ -1560,7 +1560,7 @@ implementation
                 a_op_const_reg(list,OP_SHR,OS_INT,loadbitsize-sref.bitlen,valuereg);
                 a_op_const_reg(list,OP_SHR,OS_INT,loadbitsize-sref.bitlen,valuereg);
                 if (loadbitsize <> AIntBits) then
                 if (loadbitsize <> AIntBits) then
                   { mask left over bits }
                   { mask left over bits }
-                  a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),valuereg);
+                  a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),valuereg);
               end;
               end;
             tmpreg := getintregister(list,OS_INT);
             tmpreg := getintregister(list,OS_INT);
 
 
@@ -1613,7 +1613,7 @@ implementation
                 a_op_const_reg(list,OP_SAR,OS_INT,AIntBits-sref.bitlen,valuereg);
                 a_op_const_reg(list,OP_SAR,OS_INT,AIntBits-sref.bitlen,valuereg);
               end
               end
             else
             else
-              a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),valuereg);
+              a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),valuereg);
           end;
           end;
       end;
       end;
 
 
@@ -1679,7 +1679,7 @@ implementation
                   end;
                   end;
                 { mask other bits/sign extend }
                 { mask other bits/sign extend }
                 if not(subsetsize in [OS_S8..OS_S128]) then
                 if not(subsetsize in [OS_S8..OS_S128]) then
-                  a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),valuereg);
+                  a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),valuereg);
               end
               end
           end
           end
         else
         else
@@ -1771,12 +1771,12 @@ implementation
                     maskreg := getintregister(list,OS_INT);
                     maskreg := getintregister(list,OS_INT);
                     if (target_info.endian = endian_big) then
                     if (target_info.endian = endian_big) then
                       begin
                       begin
-                        a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen)-1) shl (loadbitsize-sref.bitlen),maskreg);
+                        a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen)-1) shl (loadbitsize-sref.bitlen),maskreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,sref.bitindexreg,maskreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,sref.bitindexreg,maskreg);
                       end
                       end
                     else
                     else
                       begin
                       begin
-                        a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen)-1),maskreg);
+                        a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),maskreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,maskreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,maskreg);
                       end;
                       end;
                     a_op_reg_reg(list,OP_NOT,OS_INT,maskreg,maskreg);
                     a_op_reg_reg(list,OP_NOT,OS_INT,maskreg,maskreg);
@@ -1790,7 +1790,7 @@ implementation
                     if (slopt <> SL_SETMAX) then
                     if (slopt <> SL_SETMAX) then
                       a_load_reg_reg(list,fromsize,OS_INT,fromreg,tmpreg)
                       a_load_reg_reg(list,fromsize,OS_INT,fromreg,tmpreg)
                     else if (sref.bitlen <> AIntBits) then
                     else if (sref.bitlen <> AIntBits) then
-                      a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen) - 1), tmpreg)
+                      a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen) - 1), tmpreg)
                     else
                     else
                       a_load_const_reg(list,OS_INT,-1,tmpreg);
                       a_load_const_reg(list,OS_INT,-1,tmpreg);
                     if (target_info.endian = endian_big) then
                     if (target_info.endian = endian_big) then
@@ -1809,7 +1809,7 @@ implementation
                     else
                     else
                       begin
                       begin
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
-                          a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),tmpreg);
+                          a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),tmpreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,tmpreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,tmpreg);
                       end;
                       end;
                     a_op_reg_reg(list,OP_OR,OS_INT,tmpreg,valuereg);
                     a_op_reg_reg(list,OP_OR,OS_INT,tmpreg,valuereg);
@@ -1917,12 +1917,12 @@ implementation
                     maskreg := getintregister(list,OS_INT);
                     maskreg := getintregister(list,OS_INT);
                     if (target_info.endian = endian_big) then
                     if (target_info.endian = endian_big) then
                       begin
                       begin
-                        a_load_const_reg(list,OS_INT,aint(((aword(1) shl sref.bitlen)-1) shl (loadbitsize-sref.bitlen)),maskreg);
+                        a_load_const_reg(list,OS_INT,tcgint(((aword(1) shl sref.bitlen)-1) shl (loadbitsize-sref.bitlen)),maskreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,sref.bitindexreg,maskreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,sref.bitindexreg,maskreg);
                       end
                       end
                     else
                     else
                       begin
                       begin
-                        a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen)-1),maskreg);
+                        a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),maskreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,maskreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,maskreg);
                       end;
                       end;
 
 
@@ -1937,7 +1937,7 @@ implementation
                     if (slopt <> SL_SETMAX) then
                     if (slopt <> SL_SETMAX) then
                       a_load_reg_reg(list,fromsize,OS_INT,fromreg,tmpreg)
                       a_load_reg_reg(list,fromsize,OS_INT,fromreg,tmpreg)
                     else if (sref.bitlen <> AIntBits) then
                     else if (sref.bitlen <> AIntBits) then
-                      a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen) - 1), tmpreg)
+                      a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen) - 1), tmpreg)
                     else
                     else
                       a_load_const_reg(list,OS_INT,-1,tmpreg);
                       a_load_const_reg(list,OS_INT,-1,tmpreg);
                     if (target_info.endian = endian_big) then
                     if (target_info.endian = endian_big) then
@@ -1945,14 +1945,14 @@ implementation
                         a_op_const_reg(list,OP_SHL,OS_INT,loadbitsize-sref.bitlen,tmpreg);
                         a_op_const_reg(list,OP_SHL,OS_INT,loadbitsize-sref.bitlen,tmpreg);
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
                           { mask left over bits }
                           { mask left over bits }
-                          a_op_const_reg(list,OP_AND,OS_INT,aint(((aword(1) shl sref.bitlen)-1) shl (loadbitsize-sref.bitlen)),tmpreg);
+                          a_op_const_reg(list,OP_AND,OS_INT,tcgint(((aword(1) shl sref.bitlen)-1) shl (loadbitsize-sref.bitlen)),tmpreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,sref.bitindexreg,tmpreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,sref.bitindexreg,tmpreg);
                       end
                       end
                     else
                     else
                       begin
                       begin
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
                           { mask left over bits }
                           { mask left over bits }
-                          a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),tmpreg);
+                          a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),tmpreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,tmpreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,sref.bitindexreg,tmpreg);
                       end;
                       end;
                     a_op_reg_reg(list,OP_OR,OS_INT,tmpreg,valuereg);
                     a_op_reg_reg(list,OP_OR,OS_INT,tmpreg,valuereg);
@@ -1974,7 +1974,7 @@ implementation
                     if (slopt <> SL_SETMAX) then
                     if (slopt <> SL_SETMAX) then
                        a_load_reg_reg(list,fromsize,OS_INT,fromreg,tmpreg)
                        a_load_reg_reg(list,fromsize,OS_INT,fromreg,tmpreg)
                     else if (sref.bitlen <> AIntBits) then
                     else if (sref.bitlen <> AIntBits) then
-                      a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen) - 1), tmpreg)
+                      a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen) - 1), tmpreg)
                     else
                     else
                       a_load_const_reg(list,OS_INT,-1,tmpreg);
                       a_load_const_reg(list,OS_INT,-1,tmpreg);
                   end;
                   end;
@@ -1987,7 +1987,7 @@ implementation
                       begin
                       begin
                         a_op_const_reg_reg(list,OP_ADD,OS_INT,sref.bitlen-2*loadbitsize,sref.bitindexreg,tmpindexreg);
                         a_op_const_reg_reg(list,OP_ADD,OS_INT,sref.bitlen-2*loadbitsize,sref.bitindexreg,tmpindexreg);
                         a_op_reg_reg(list,OP_NEG,OS_INT,tmpindexreg,tmpindexreg);
                         a_op_reg_reg(list,OP_NEG,OS_INT,tmpindexreg,tmpindexreg);
-                        a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen)-1),maskreg);
+                        a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),maskreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,tmpindexreg,maskreg);
                         a_op_reg_reg(list,OP_SHL,OS_INT,tmpindexreg,maskreg);
                       end
                       end
                     else
                     else
@@ -1995,7 +1995,7 @@ implementation
                         { Y-x = -(x-Y) }
                         { Y-x = -(x-Y) }
                         a_op_const_reg_reg(list,OP_SUB,OS_INT,loadbitsize,sref.bitindexreg,tmpindexreg);
                         a_op_const_reg_reg(list,OP_SUB,OS_INT,loadbitsize,sref.bitindexreg,tmpindexreg);
                         a_op_reg_reg(list,OP_NEG,OS_INT,tmpindexreg,tmpindexreg);
                         a_op_reg_reg(list,OP_NEG,OS_INT,tmpindexreg,tmpindexreg);
-                        a_load_const_reg(list,OS_INT,aint((aword(1) shl sref.bitlen)-1),maskreg);
+                        a_load_const_reg(list,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),maskreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,tmpindexreg,maskreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,tmpindexreg,maskreg);
                       end;
                       end;
 
 
@@ -2010,7 +2010,7 @@ implementation
                     else
                     else
                       begin
                       begin
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
                         if not(slopt in [SL_REGNOSRCMASK,SL_SETMAX]) then
-                          a_op_const_reg(list,OP_AND,OS_INT,aint((aword(1) shl sref.bitlen)-1),tmpreg);
+                          a_op_const_reg(list,OP_AND,OS_INT,tcgint((aword(1) shl sref.bitlen)-1),tmpreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,tmpindexreg,tmpreg);
                         a_op_reg_reg(list,OP_SHR,OS_INT,tmpindexreg,tmpreg);
                       end;
                       end;
                     a_op_reg_reg(list,OP_OR,OS_INT,tmpreg,extra_value_reg);
                     a_op_reg_reg(list,OP_OR,OS_INT,tmpreg,extra_value_reg);
@@ -2054,7 +2054,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_load_const_subsetref(list: TAsmlist; subsetsize: tcgsize; a: aint; const sref: tsubsetreference);
+    procedure tcg.a_load_const_subsetref(list: TAsmlist; subsetsize: tcgsize; a: tcgint; const sref: tsubsetreference);
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
         slopt: tsubsetloadopt;
         slopt: tsubsetloadopt;
@@ -2062,7 +2062,7 @@ implementation
         { perform masking of the source value in advance }
         { perform masking of the source value in advance }
         slopt := SL_REGNOSRCMASK;
         slopt := SL_REGNOSRCMASK;
         if (sref.bitlen <> AIntBits) then
         if (sref.bitlen <> AIntBits) then
-          aword(a) := aword(a) and ((aword(1) shl sref.bitlen) -1);
+          a := tcgint(aword(a) and ((aword(1) shl sref.bitlen) -1));
         if (
         if (
             { broken x86 "x shl regbitsize = x" }
             { broken x86 "x shl regbitsize = x" }
             ((sref.bitlen <> AIntBits) and
             ((sref.bitlen <> AIntBits) and
@@ -2129,7 +2129,7 @@ implementation
 
 
     { generic bit address calculation routines }
     { generic bit address calculation routines }
 
 
-    function tcg.get_bit_const_ref_sref(bitnumber: aint; const ref: treference): tsubsetreference;
+    function tcg.get_bit_const_ref_sref(bitnumber: tcgint; const ref: treference): tsubsetreference;
       begin
       begin
         result.ref:=ref;
         result.ref:=ref;
         inc(result.ref.offset,bitnumber div 8);
         inc(result.ref.offset,bitnumber div 8);
@@ -2139,7 +2139,7 @@ implementation
       end;
       end;
 
 
 
 
-    function tcg.get_bit_const_reg_sreg(setregsize: tcgsize; bitnumber: aint; setreg: tregister): tsubsetregister;
+    function tcg.get_bit_const_reg_sreg(setregsize: tcgsize; bitnumber: tcgint; setreg: tregister): tsubsetregister;
       begin
       begin
         result.subsetreg:=setreg;
         result.subsetreg:=setreg;
         result.subsetregsize:=setregsize;
         result.subsetregsize:=setregsize;
@@ -2208,19 +2208,19 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_test_const_ref_reg(list: TAsmList; destsize: tcgsize; bitnumber: aint; const ref: treference; destreg: tregister);
+    procedure tcg.a_bit_test_const_ref_reg(list: TAsmList; destsize: tcgsize; bitnumber: tcgint; const ref: treference; destreg: tregister);
       begin
       begin
         a_load_subsetref_reg(list,OS_8,destsize,get_bit_const_ref_sref(bitnumber,ref),destreg);
         a_load_subsetref_reg(list,OS_8,destsize,get_bit_const_ref_sref(bitnumber,ref),destreg);
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_test_const_reg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: aint; setreg, destreg: tregister);
+    procedure tcg.a_bit_test_const_reg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: tcgint; setreg, destreg: tregister);
       begin
       begin
         a_load_subsetreg_reg(list,setregsize,destsize,get_bit_const_reg_sreg(setregsize,bitnumber,setreg),destreg);
         a_load_subsetreg_reg(list,setregsize,destsize,get_bit_const_reg_sreg(setregsize,bitnumber,setreg),destreg);
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_test_const_subsetreg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: aint; const setreg: tsubsetregister; destreg: tregister);
+    procedure tcg.a_bit_test_const_subsetreg_reg(list: TAsmList; setregsize, destsize: tcgsize; bitnumber: tcgint; const setreg: tsubsetregister; destreg: tregister);
       var
       var
         tmpsreg: tsubsetregister;
         tmpsreg: tsubsetregister;
       begin
       begin
@@ -2276,7 +2276,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_test_const_loc_reg(list: TAsmList; destsize: tcgsize; bitnumber: aint; const loc: tlocation; destreg: tregister);
+    procedure tcg.a_bit_test_const_loc_reg(list: TAsmList; destsize: tcgsize; bitnumber: tcgint; const loc: tlocation; destreg: tregister);
       begin
       begin
         case loc.loc of
         case loc.loc of
           LOC_REFERENCE,LOC_CREFERENCE:
           LOC_REFERENCE,LOC_CREFERENCE:
@@ -2323,19 +2323,19 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_set_const_ref(list: TAsmList; doset: boolean;destsize: tcgsize; bitnumber: aint; const ref: treference);
+    procedure tcg.a_bit_set_const_ref(list: TAsmList; doset: boolean;destsize: tcgsize; bitnumber: tcgint; const ref: treference);
       begin
       begin
         a_load_const_subsetref(list,OS_8,ord(doset),get_bit_const_ref_sref(bitnumber,ref));
         a_load_const_subsetref(list,OS_8,ord(doset),get_bit_const_ref_sref(bitnumber,ref));
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: aint; destreg: tregister);
+    procedure tcg.a_bit_set_const_reg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: tcgint; destreg: tregister);
       begin
       begin
         a_load_const_subsetreg(list,OS_8,ord(doset),get_bit_const_reg_sreg(destsize,bitnumber,destreg));
         a_load_const_subsetreg(list,OS_8,ord(doset),get_bit_const_reg_sreg(destsize,bitnumber,destreg));
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: aint; const destreg: tsubsetregister);
+    procedure tcg.a_bit_set_const_subsetreg(list: TAsmList; doset: boolean; destsize: tcgsize; bitnumber: tcgint; const destreg: tsubsetregister);
       var
       var
         tmpsreg: tsubsetregister;
         tmpsreg: tsubsetregister;
       begin
       begin
@@ -2382,7 +2382,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_bit_set_const_loc(list: TAsmList; doset: boolean; bitnumber: aint; const loc: tlocation);
+    procedure tcg.a_bit_set_const_loc(list: TAsmList; doset: boolean; bitnumber: tcgint; const loc: tlocation);
       begin
       begin
         case loc.loc of
         case loc.loc of
           LOC_REFERENCE:
           LOC_REFERENCE:
@@ -2549,7 +2549,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_load_const_ref(list : TAsmList;size : tcgsize;a : aint;const ref : treference);
+    procedure tcg.a_load_const_ref(list : TAsmList;size : tcgsize;a : tcgint;const ref : treference);
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
       begin
       begin
@@ -2559,7 +2559,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_load_const_loc(list : TAsmList;a : aint;const loc: tlocation);
+    procedure tcg.a_load_const_loc(list : TAsmList;a : tcgint;const loc: tlocation);
       begin
       begin
         case loc.loc of
         case loc.loc of
           LOC_REFERENCE,LOC_CREFERENCE:
           LOC_REFERENCE,LOC_CREFERENCE:
@@ -2669,7 +2669,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.optimize_op_const(var op: topcg; var a : aint);
+    procedure tcg.optimize_op_const(var op: topcg; var a : tcgint);
       var
       var
         powerval : longint;
         powerval : longint;
       begin
       begin
@@ -2848,7 +2848,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; const ref: TReference);
+    procedure tcg.a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; const ref: TReference);
       var
       var
         tmpreg : tregister;
         tmpreg : tregister;
       begin
       begin
@@ -2859,7 +2859,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_op_const_subsetreg(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : aint; const sreg: tsubsetregister);
+    procedure tcg.a_op_const_subsetreg(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : tcgint; const sreg: tsubsetregister);
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
       begin
       begin
@@ -2870,7 +2870,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_op_const_subsetref(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : aint; const sref: tsubsetreference);
+    procedure tcg.a_op_const_subsetref(list : TAsmList; Op : TOpCG; size, subsetsize : TCGSize; a : tcgint; const sref: tsubsetreference);
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
       begin
       begin
@@ -2881,7 +2881,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_op_const_loc(list : TAsmList; Op: TOpCG; a: aint; const loc: tlocation);
+    procedure tcg.a_op_const_loc(list : TAsmList; Op: TOpCG; a: tcgint; const loc: tlocation);
       begin
       begin
         case loc.loc of
         case loc.loc of
           LOC_REGISTER, LOC_CREGISTER:
           LOC_REGISTER, LOC_CREGISTER:
@@ -3008,7 +3008,7 @@ implementation
 
 
 
 
     procedure Tcg.a_op_const_reg_reg(list:TAsmList;op:Topcg;size:Tcgsize;
     procedure Tcg.a_op_const_reg_reg(list:TAsmList;op:Topcg;size:Tcgsize;
-                                     a:aint;src,dst:Tregister);
+                                     a:tcgint;src,dst:Tregister);
 
 
     begin
     begin
       a_load_reg_reg(list,size,size,src,dst);
       a_load_reg_reg(list,size,size,src,dst);
@@ -3041,7 +3041,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
+    procedure tcg.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
       begin
       begin
         a_op_const_reg_reg(list,op,size,a,src,dst);
         a_op_const_reg_reg(list,op,size,a,src,dst);
         ovloc.loc:=LOC_VOID;
         ovloc.loc:=LOC_VOID;
@@ -3055,12 +3055,21 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_cmp_const_ref_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;const ref : treference;
-     l : tasmlabel);
-
+    procedure tcg.a_cmp_const_reg_label(list: TAsmList; size: tcgsize;
+      cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
+      begin
+        tmpreg:=getintregister(list,size);
+        a_load_const_reg(list,size,a,tmpreg);
+        a_cmp_reg_reg_label(list,size,cmp_op,tmpreg,reg,l);
+      end;
 
 
+
+    procedure tcg.a_cmp_const_ref_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;const ref : treference;
+      l : tasmlabel);
+      var
+        tmpreg: tregister;
       begin
       begin
         tmpreg:=getintregister(list,size);
         tmpreg:=getintregister(list,size);
         a_load_ref_reg(list,size,size,ref,tmpreg);
         a_load_ref_reg(list,size,size,ref,tmpreg);
@@ -3068,12 +3077,10 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.a_cmp_const_loc_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;const loc : tlocation;
+    procedure tcg.a_cmp_const_loc_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;const loc : tlocation;
       l : tasmlabel);
       l : tasmlabel);
-
       var
       var
         tmpreg : tregister;
         tmpreg : tregister;
-
       begin
       begin
         case loc.loc of
         case loc.loc of
           LOC_REGISTER,LOC_CREGISTER:
           LOC_REGISTER,LOC_CREGISTER:
@@ -3414,7 +3421,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcg.g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : tcgint);
       begin
       begin
         g_concatcopy(list,source,dest,len);
         g_concatcopy(list,source,dest,len);
       end;
       end;
@@ -3871,7 +3878,7 @@ implementation
           end;
           end;
         hreg:=getintregister(list,OS_INT);
         hreg:=getintregister(list,OS_INT);
         a_load_loc_reg(list,OS_INT,l,hreg);
         a_load_loc_reg(list,OS_INT,l,hreg);
-        a_op_const_reg(list,OP_SUB,OS_INT,aint(int64(lto)),hreg);
+        a_op_const_reg(list,OP_SUB,OS_INT,tcgint(int64(lto)),hreg);
         current_asmdata.getjumplabel(neglabel);
         current_asmdata.getjumplabel(neglabel);
         {
         {
         if from_signed then
         if from_signed then
@@ -3883,7 +3890,7 @@ implementation
           a_cmp_const_reg_label(list,OS_INT,OC_BE,aintmax,hreg,neglabel)
           a_cmp_const_reg_label(list,OS_INT,OC_BE,aintmax,hreg,neglabel)
         else
         else
 {$endif cpu64bitalu}
 {$endif cpu64bitalu}
-          a_cmp_const_reg_label(list,OS_INT,OC_BE,aint(int64(hto-lto)),hreg,neglabel);
+          a_cmp_const_reg_label(list,OS_INT,OC_BE,tcgint(int64(hto-lto)),hreg,neglabel);
         a_call_name(list,'FPC_RANGEERROR',false);
         a_call_name(list,'FPC_RANGEERROR',false);
         a_label(list,neglabel);
         a_label(list,neglabel);
       end;
       end;
@@ -3920,7 +3927,7 @@ implementation
            a_cmp_const_reg_label(list,OS_ADDR,OC_NE,0,reg,oklabel);
            a_cmp_const_reg_label(list,OS_ADDR,OC_NE,0,reg,oklabel);
            cgpara1.init;
            cgpara1.init;
            paramanager.getintparaloc(pocall_default,1,cgpara1);
            paramanager.getintparaloc(pocall_default,1,cgpara1);
-           a_load_const_cgpara(list,OS_INT,aint(210),cgpara1);
+           a_load_const_cgpara(list,OS_INT,tcgint(210),cgpara1);
            paramanager.freecgpara(list,cgpara1);
            paramanager.freecgpara(list,cgpara1);
            a_call_name(list,'FPC_HANDLEERROR',false);
            a_call_name(list,'FPC_HANDLEERROR',false);
            a_label(list,oklabel);
            a_label(list,oklabel);
@@ -3967,7 +3974,7 @@ implementation
                             Entry/Exit Code Functions
                             Entry/Exit Code Functions
 *****************************************************************************}
 *****************************************************************************}
 
 
-    procedure tcg.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);
+    procedure tcg.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);
       var
       var
         sizereg,sourcereg,lenreg : tregister;
         sizereg,sourcereg,lenreg : tregister;
         cgpara1,cgpara2,cgpara3 : TCGPara;
         cgpara1,cgpara2,cgpara3 : TCGPara;
@@ -4161,7 +4168,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.g_exception_reason_save_const(list : TAsmList; const href : treference; a: aint);
+    procedure tcg.g_exception_reason_save_const(list : TAsmList; const href : treference; a: tcgint);
       begin
       begin
         a_load_const_ref(list, OS_INT, a, href);
         a_load_const_ref(list, OS_INT, a, href);
       end;
       end;
@@ -4174,7 +4181,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcg.g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: aint);
+    procedure tcg.g_adjust_self_value(list:TAsmList;procdef: tprocdef;ioffset: tcgint);
       var
       var
         hsym : tsym;
         hsym : tsym;
         href : treference;
         href : treference;

+ 7 - 6
compiler/cmsgs.pas

@@ -33,6 +33,7 @@ const
 
 
 type
 type
   ppchar=^pchar;
   ppchar=^pchar;
+  TMsgStr = AnsiString;
 
 
   TArrayOfPChar = array[0..1000] of pchar;
   TArrayOfPChar = array[0..1000] of pchar;
   PArrayOfPChar = ^TArrayOfPChar;
   PArrayOfPChar = ^TArrayOfPChar;
@@ -60,7 +61,7 @@ type
     procedure CreateIdx;
     procedure CreateIdx;
     function  GetPChar(nr:longint):pchar;
     function  GetPChar(nr:longint):pchar;
     function  ClearVerbosity(nr:longint):boolean;
     function  ClearVerbosity(nr:longint):boolean;
-    function  Get(nr:longint;const args:array of string):ansistring;
+    function  Get(nr:longint;const args:array of TMsgStr):ansistring;
   end;
   end;
 
 
 { this will read a line until #10 or #0 and also increase p }
 { this will read a line until #10 or #0 and also increase p }
@@ -74,11 +75,11 @@ uses
   cutils;
   cutils;
 
 
 
 
-function MsgReplace(const s:string;const args:array of string):ansistring;
+function MsgReplace(const s:TMsgStr;const args:array of TMsgStr):ansistring;
 var
 var
   last,
   last,
   i  : longint;
   i  : longint;
-  hs : ansistring;
+  hs : TMsgStr;
 
 
 begin
 begin
   if s='' then
   if s='' then
@@ -169,7 +170,7 @@ var
   s,s1    : string;
   s,s1    : string;
   buf     : pointer;
   buf     : pointer;
 
 
-  procedure err(const msgstr:string);
+  procedure err(const msgstr:TMsgStr);
   begin
   begin
     writeln('*** PPC, file ',fn,', error in line ',line,': ',msgstr);
     writeln('*** PPC, file ',fn,', error in line ',line,': ',msgstr);
     error:=true;
     error:=true;
@@ -367,7 +368,7 @@ var
   i  : longint;
   i  : longint;
 begin
 begin
   i:=0;
   i:=0;
-  while not(p^ in [#0,#10]) and (i<255) do
+  while not(p^ in [#0,#10]) and (i<256) do
    begin
    begin
      inc(i);
      inc(i);
      GetMsgLine[i]:=p^;
      GetMsgLine[i]:=p^;
@@ -402,7 +403,7 @@ begin
   result:=true;
   result:=true;
 end;
 end;
 
 
-function TMessage.Get(nr:longint;const args:array of string):ansistring;
+function TMessage.Get(nr:longint;const args:array of TMsgStr):ansistring;
 var
 var
   hp : pchar;
   hp : pchar;
 begin
 begin

+ 3 - 3
compiler/compiler.pas

@@ -118,7 +118,7 @@ uses
 {$endif nativent}
 {$endif nativent}
   ,globtype;
   ,globtype;
 
 
-function Compile(const cmd:string):longint;
+function Compile(const cmd:TCmdStr):longint;
 
 
 implementation
 implementation
 
 
@@ -163,7 +163,7 @@ begin
 end;
 end;
 
 
 
 
-procedure InitCompiler(const cmd:string);
+procedure InitCompiler(const cmd:TCmdStr);
 begin
 begin
   if CompilerInited then
   if CompilerInited then
    DoneCompiler;
    DoneCompiler;
@@ -197,7 +197,7 @@ begin
 end;
 end;
 
 
 
 
-function Compile(const cmd:string):longint;
+function Compile(const cmd:TCmdStr):longint;
 
 
 {$maxfpuregisters 0}
 {$maxfpuregisters 0}
 
 

+ 2 - 2
compiler/compinnr.inc

@@ -73,9 +73,9 @@ const
    in_readstr_x         = 63;
    in_readstr_x         = 63;
    in_abs_long          = 64;
    in_abs_long          = 64;
    in_ror_x             = 65;
    in_ror_x             = 65;
-   in_ror_x_x           = 66;
+   in_ror_x_y           = 66;
    in_rol_x             = 67;
    in_rol_x             = 67;
-   in_rol_x_x           = 68;
+   in_rol_x_y           = 68;
    in_objc_selector_x   = 69;
    in_objc_selector_x   = 69;
    in_objc_protocol_x   = 70;
    in_objc_protocol_x   = 70;
    in_objc_encode_x     = 71;
    in_objc_encode_x     = 71;

+ 9 - 2
compiler/defcmp.pas

@@ -536,7 +536,12 @@ implementation
                           (s64currencytype.typ = floatdef))) then
                           (s64currencytype.typ = floatdef))) then
                        begin
                        begin
                          doconv:=tc_int_2_real;
                          doconv:=tc_int_2_real;
-                         eq:=te_convert_l4;
+
+                         { prefer single over others }
+                         if is_single(def_to) then
+                           eq:=te_convert_l3
+                         else
+                           eq:=te_convert_l4;
                        end
                        end
                      else if is_currency(def_from)
                      else if is_currency(def_from)
                              { and (s64currencytype.typ = orddef)) } then
                              { and (s64currencytype.typ = orddef)) } then
@@ -659,7 +664,9 @@ implementation
                   equal_defs(def_from,tarraydef(def_to).elementdef) then
                   equal_defs(def_from,tarraydef(def_to).elementdef) then
                 begin
                 begin
                   doconv:=tc_equal;
                   doconv:=tc_equal;
-                  eq:=te_convert_l1;
+                  { also update in htypechk.pas/var_para_allowed if changed
+                    here }
+                  eq:=te_convert_l3;
                 end
                 end
                else
                else
                 begin
                 begin

+ 0 - 2
compiler/finput.pas

@@ -446,8 +446,6 @@ uses
  ****************************************************************************}
  ****************************************************************************}
 
 
     function tdosinputfile.fileopen(const filename: string): boolean;
     function tdosinputfile.fileopen(const filename: string): boolean;
-      var
-        ofm : byte;
       begin
       begin
         { Check if file exists, this will also check if it is
         { Check if file exists, this will also check if it is
           a real file and not a directory }
           a real file and not a directory }

+ 25 - 6
compiler/fmodule.pas

@@ -199,7 +199,7 @@ interface
         function  resolve_unit(id:longint):tmodule;
         function  resolve_unit(id:longint):tmodule;
         procedure allunitsused;
         procedure allunitsused;
         procedure setmodulename(const s:string);
         procedure setmodulename(const s:string);
-        procedure AddExternalImport(const libname,symname:string;OrdNr: longint;isvar:boolean;ImportByOrdinalOnly:boolean);
+        procedure AddExternalImport(const libname,symname,symmangledname:string;OrdNr: longint;isvar:boolean;ImportByOrdinalOnly:boolean);
         property ImportLibraryList : TFPHashObjectList read FImportLibraryList;
         property ImportLibraryList : TFPHashObjectList read FImportLibraryList;
       end;
       end;
 
 
@@ -955,21 +955,40 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TModule.AddExternalImport(const libname,symname:string;OrdNr: longint;isvar:boolean;ImportByOrdinalOnly:boolean);
+    procedure TModule.AddExternalImport(const libname,symname,symmangledname:string;
+              OrdNr: longint;isvar:boolean;ImportByOrdinalOnly:boolean);
       var
       var
-        ImportLibrary : TImportLibrary;
-        ImportSymbol  : TFPHashObject;
+        ImportLibrary,OtherIL : TImportLibrary;
+        ImportSymbol  : TImportSymbol;
+        i : longint;
       begin
       begin
         ImportLibrary:=TImportLibrary(ImportLibraryList.Find(libname));
         ImportLibrary:=TImportLibrary(ImportLibraryList.Find(libname));
         if not assigned(ImportLibrary) then
         if not assigned(ImportLibrary) then
           ImportLibrary:=TImportLibrary.Create(ImportLibraryList,libname);
           ImportLibrary:=TImportLibrary.Create(ImportLibraryList,libname);
-        ImportSymbol:=TFPHashObject(ImportLibrary.ImportSymbolList.Find(symname));
+        ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList.Find(symname));
         if not assigned(ImportSymbol) then
         if not assigned(ImportSymbol) then
           begin
           begin
+            { Check that the same name does not exist in another library }
+            { If it does and the same mangled name is used, issue a warning }
+            if ImportLibraryList.Count>1 then
+              for i:=0 To ImportLibraryList.Count-1 do
+                begin
+                  OtherIL:=TImportLibrary(ImportLibraryList.Items[i]);
+                  ImportSymbol:=TImportSymbol(OtherIL.ImportSymbolList.Find(symname));
+                  if assigned(ImportSymbol) then
+                    begin
+                      if ImportSymbol.MangledName=symmangledname then
+                        begin
+                          CGMessage3(sym_w_library_overload,symname,libname,OtherIL.Name);
+                          break;
+                        end;
+                    end;
+                end;
             if not ImportByOrdinalOnly then
             if not ImportByOrdinalOnly then
               { negative ordinal number indicates import by name with ordinal number as hint }
               { negative ordinal number indicates import by name with ordinal number as hint }
               OrdNr:=-OrdNr;
               OrdNr:=-OrdNr;
-            ImportSymbol:=TImportSymbol.Create(ImportLibrary.ImportSymbolList,symname,OrdNr,isvar);
+            ImportSymbol:=TImportSymbol.Create(ImportLibrary.ImportSymbolList,
+              symname,symmangledname,OrdNr,isvar);
           end;
           end;
       end;
       end;
 
 

+ 11 - 0
compiler/fpcdefs.inc

@@ -28,6 +28,16 @@
 
 
 {$define USEEXCEPT}
 {$define USEEXCEPT}
 
 
+{ This fake CPU is used to allow incorporation of globtype unit
+  into utils/ppudump without any CPU specific code PM }
+{$ifdef generic_cpu}
+  {$define cpu32bit}
+  {$define cpu32bitaddr}
+  {$define cpu32bitalu}
+  {$define cpuflags}
+  {$define cpuextended}
+{$endif generic_cpu}
+
 {$ifdef cpuarm}
 {$ifdef cpuarm}
   {$packrecords c}
   {$packrecords c}
 {$endif cpuarm}
 {$endif cpuarm}
@@ -119,6 +129,7 @@
   {$define cpunofpu}
   {$define cpunofpu}
   {$define cpunodefaultint}
   {$define cpunodefaultint}
   {$define cpuneedsdiv32helper}
   {$define cpuneedsdiv32helper}
+  {$define cpuneedsmulhelper}
 {$endif avr}
 {$endif avr}
 
 
 {$ifdef mipsel}
 {$ifdef mipsel}

+ 13 - 8
compiler/fppu.pas

@@ -35,9 +35,10 @@ unit fppu;
 interface
 interface
 
 
     uses
     uses
-       cutils,cclasses,
-       globtype,globals,finput,fmodule,
-       symbase,ppu,symtype;
+      cmsgs,verbose,
+      cutils,cclasses,
+      globtype,globals,finput,fmodule,
+      symbase,ppu,symtype;
 
 
     type
     type
 
 
@@ -77,7 +78,7 @@ interface
           procedure load_implementation;
           procedure load_implementation;
           procedure load_usedunits;
           procedure load_usedunits;
           procedure printcomments;
           procedure printcomments;
-          procedure queuecomment(s:string;v,w:longint);
+          procedure queuecomment(const s:TMsgStr;v,w:longint);
           procedure writesourcefiles;
           procedure writesourcefiles;
           procedure writeusedunit(intf:boolean);
           procedure writeusedunit(intf:boolean);
           procedure writelinkcontainer(var p:tlinkcontainer;id:byte;strippath:boolean);
           procedure writelinkcontainer(var p:tlinkcontainer;id:byte;strippath:boolean);
@@ -108,7 +109,7 @@ implementation
 uses
 uses
   SysUtils,
   SysUtils,
   cfileutl,
   cfileutl,
-  verbose,systems,version,
+  systems,version,
   symtable, symsym,
   symtable, symsym,
   wpoinfo,
   wpoinfo,
   scanner,
   scanner,
@@ -155,7 +156,7 @@ var
         inherited reset;
         inherited reset;
       end;
       end;
 
 
-    procedure tppumodule.queuecomment(s:string;v,w:longint);
+    procedure tppumodule.queuecomment(const s:TMsgStr;v,w:longint);
     begin
     begin
       if comments = nil then
       if comments = nil then
         comments := TCmdStrList.create;
         comments := TCmdStrList.create;
@@ -633,6 +634,7 @@ var
               begin
               begin
                 ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
                 ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
                 ppufile.putstring(ImportSymbol.Name);
                 ppufile.putstring(ImportSymbol.Name);
+                ppufile.putstring(ImportSymbol.MangledName);
                 ppufile.putlongint(ImportSymbol.OrdNr);
                 ppufile.putlongint(ImportSymbol.OrdNr);
                 ppufile.putbyte(byte(ImportSymbol.IsVar));
                 ppufile.putbyte(byte(ImportSymbol.IsVar));
               end;
               end;
@@ -893,6 +895,7 @@ var
         extsymcnt   : longint;
         extsymcnt   : longint;
         ImportLibrary  : TImportLibrary;
         ImportLibrary  : TImportLibrary;
         extsymname  : string;
         extsymname  : string;
+        extsymmangledname : string;
         extsymordnr : longint;
         extsymordnr : longint;
         extsymisvar : boolean;
         extsymisvar : boolean;
       begin
       begin
@@ -903,9 +906,11 @@ var
             for j:=0 to extsymcnt-1 do
             for j:=0 to extsymcnt-1 do
               begin
               begin
                 extsymname:=ppufile.getstring;
                 extsymname:=ppufile.getstring;
+                extsymmangledname:=ppufile.getstring;
                 extsymordnr:=ppufile.getlongint;
                 extsymordnr:=ppufile.getlongint;
                 extsymisvar:=(ppufile.getbyte<>0);
                 extsymisvar:=(ppufile.getbyte<>0);
-                TImportSymbol.Create(ImportLibrary.ImportSymbolList,extsymname,extsymordnr,extsymisvar);
+                TImportSymbol.Create(ImportLibrary.ImportSymbolList,extsymname,
+                  extsymmangledname,extsymordnr,extsymisvar);
               end;
               end;
           end;
           end;
       end;
       end;
@@ -1397,7 +1402,7 @@ var
             localsymtable:=tstaticsymtable.create(modulename^,moduleid);
             localsymtable:=tstaticsymtable.create(modulename^,moduleid);
             tstaticsymtable(localsymtable).ppuload(ppufile);
             tstaticsymtable(localsymtable).ppuload(ppufile);
           end;
           end;
-          
+
         { we can now derefence all pointers to the implementation parts }
         { we can now derefence all pointers to the implementation parts }
         tstoredsymtable(globalsymtable).derefimpl;
         tstoredsymtable(globalsymtable).derefimpl;
         if assigned(localsymtable) then
         if assigned(localsymtable) then

+ 153 - 0
compiler/generic/cpuinfo.pas

@@ -0,0 +1,153 @@
+{
+    Copyright (c) 1998-2002 by the Free Pascal development team
+
+    Basic Processor information for the Generic CPU
+    This file is used by PPUDump program from utils subdirectory.
+
+    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.
+
+ **********************************************************************}
+
+Unit CPUInfo;
+
+Interface
+
+  uses
+    globtype;
+
+Type
+   bestreal = double;
+   ts32real = single;
+   ts64real = double;
+   ts80real = type extended;
+   ts128real = type extended;
+   ts64comp = comp;
+
+   pbestreal=^bestreal;
+
+   { possible supported processors for this target }
+   tcputype =
+      (cpu_none
+      );
+
+
+Type
+   tfputype =
+     (fpu_none,
+      fpu_soft
+     );
+
+Const
+   cputypestr : array[tcputype] of string[8] = ('none');
+   fputypestr : array[tfputype] of string[6] = ('none','soft');
+
+Implementation
+
+end.
+{
+    Copyright (c) 1998-2002 by the Free Pascal development team
+
+    Basic Processor information for the Generic CPU
+    This file is used by PPUDump program from utils subdirectory.
+
+    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.
+
+ **********************************************************************}
+
+Unit CPUInfo;
+
+Interface
+
+  uses
+    globtype;
+
+Type
+   bestreal = double;
+   ts32real = single;
+   ts64real = double;
+   ts80real = type extended;
+   ts128real = type extended;
+   ts64comp = comp;
+
+   pbestreal=^bestreal;
+
+   { possible supported processors for this target }
+   tcputype =
+      (cpu_none
+      );
+
+
+Type
+   tfputype =
+     (fpu_none,
+      fpu_soft
+     );
+
+Const
+   cputypestr : array[tcputype] of string[8] = ('none');
+   fputypestr : array[tfputype] of string[6] = ('none','soft');
+
+Implementation
+
+end.
+{
+    Copyright (c) 1998-2002 by the Free Pascal development team
+
+    Basic Processor information for the Generic CPU
+    This file is used by PPUDump program from utils subdirectory.
+
+    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.
+
+ **********************************************************************}
+
+Unit CPUInfo;
+
+Interface
+
+  uses
+    globtype;
+
+Type
+   bestreal = double;
+   ts32real = single;
+   ts64real = double;
+   ts80real = type extended;
+   ts128real = type extended;
+   ts64comp = comp;
+
+   pbestreal=^bestreal;
+
+   { possible supported processors for this target }
+   tcputype =
+      (cpu_none
+      );
+
+
+Type
+   tfputype =
+     (fpu_none,
+      fpu_soft
+     );
+
+Const
+   cputypestr : array[tcputype] of string[8] = ('none');
+   fputypestr : array[tfputype] of string[6] = ('none','soft');
+
+Implementation
+
+end.

+ 35 - 24
compiler/globals.pas

@@ -68,9 +68,9 @@ interface
          [m_gpc,m_all,m_tp_procvar];
          [m_gpc,m_all,m_tp_procvar];
 {$endif}
 {$endif}
        macmodeswitches =
        macmodeswitches =
-         [m_mac,m_all,m_cvar_support,m_mac_procvar,m_nested_procvars,m_non_local_goto];
+         [m_mac,m_all,m_cvar_support,m_mac_procvar,m_nested_procvars,m_non_local_goto,m_isolike_unary_minus];
        isomodeswitches =
        isomodeswitches =
-         [m_iso,m_all,m_tp_procvar,m_duplicate_names,m_nested_procvars,m_non_local_goto];
+         [m_iso,m_all,m_tp_procvar,m_duplicate_names,m_nested_procvars,m_non_local_goto,m_isolike_unary_minus];
 
 
        { maximum nesting of routines }
        { maximum nesting of routines }
        maxnesting = 32;
        maxnesting = 32;
@@ -236,6 +236,8 @@ interface
        autoloadunits      : string;
        autoloadunits      : string;
 
 
        { linking }
        { linking }
+       usegnubinutils : boolean;
+       forceforwardslash : boolean;
        usewindowapi  : boolean;
        usewindowapi  : boolean;
        description   : string;
        description   : string;
        SetPEFlagsSetExplicity,
        SetPEFlagsSetExplicity,
@@ -363,51 +365,60 @@ interface
         packrecords     : 0;
         packrecords     : 0;
         maxfpuregisters : 0;
         maxfpuregisters : 0;
 
 
-{$ifdef i386}
+{ Note: GENERIC_CPU is sued together with generic subdirectory to
+  be able to compile some of the units without any real CPU.
+  This is used to generate a CPU independant PPUDUMP utility. PM }
+{$ifdef GENERIC_CPU}
+        cputype : cpu_none;
+        optimizecputype : cpu_none;
+        fputype : fpu_none;
+{$else not GENERIC_CPU}
+  {$ifdef i386}
         cputype : cpu_Pentium;
         cputype : cpu_Pentium;
         optimizecputype : cpu_Pentium3;
         optimizecputype : cpu_Pentium3;
         fputype : fpu_x87;
         fputype : fpu_x87;
-{$endif i386}
-{$ifdef m68k}
+  {$endif i386}
+  {$ifdef m68k}
         cputype : cpu_MC68020;
         cputype : cpu_MC68020;
         optimizecputype : cpu_MC68020;
         optimizecputype : cpu_MC68020;
         fputype : fpu_soft;
         fputype : fpu_soft;
-{$endif m68k}
-{$ifdef powerpc}
+  {$endif m68k}
+  {$ifdef powerpc}
         cputype : cpu_PPC604;
         cputype : cpu_PPC604;
         optimizecputype : cpu_ppc7400;
         optimizecputype : cpu_ppc7400;
         fputype : fpu_standard;
         fputype : fpu_standard;
-{$endif powerpc}
-{$ifdef POWERPC64}
+  {$endif powerpc}
+  {$ifdef POWERPC64}
         cputype : cpu_PPC970;
         cputype : cpu_PPC970;
         optimizecputype : cpu_ppc970;
         optimizecputype : cpu_ppc970;
         fputype : fpu_standard;
         fputype : fpu_standard;
-{$endif POWERPC64}
-{$ifdef sparc}
+  {$endif POWERPC64}
+  {$ifdef sparc}
         cputype : cpu_SPARC_V8;
         cputype : cpu_SPARC_V8;
         optimizecputype : cpu_SPARC_V8;
         optimizecputype : cpu_SPARC_V8;
         fputype : fpu_hard;
         fputype : fpu_hard;
-{$endif sparc}
-{$ifdef arm}
+  {$endif sparc}
+  {$ifdef arm}
         cputype : cpu_armv3;
         cputype : cpu_armv3;
         optimizecputype : cpu_armv3;
         optimizecputype : cpu_armv3;
         fputype : fpu_fpa;
         fputype : fpu_fpa;
-{$endif arm}
-{$ifdef x86_64}
+  {$endif arm}
+  {$ifdef x86_64}
         cputype : cpu_athlon64;
         cputype : cpu_athlon64;
         optimizecputype : cpu_athlon64;
         optimizecputype : cpu_athlon64;
         fputype : fpu_sse64;
         fputype : fpu_sse64;
-{$endif x86_64}
-{$ifdef avr}
-        cputype : cpuinfo.cpu_avr;
-        optimizecputype : cpuinfo.cpu_avr;
+  {$endif x86_64}
+  {$ifdef avr}
+        cputype : cpuinfo.cpu_avr5;
+        optimizecputype : cpuinfo.cpu_avr5;
         fputype : fpu_none;
         fputype : fpu_none;
-{$endif avr}
-{$ifdef mips}
+  {$endif avr}
+  {$ifdef mips}
         cputype : cpu_mips32;
         cputype : cpu_mips32;
         optimizecputype : cpu_mips32;
         optimizecputype : cpu_mips32;
         fputype : fpu_mips2;
         fputype : fpu_mips2;
-{$endif mips}
+  {$endif mips}
+{$endif not GENERIC_CPU}
         asmmode : asmmode_standard;
         asmmode : asmmode_standard;
         interfacetype : it_interfacecom;
         interfacetype : it_interfacecom;
         defproccall : pocall_default;
         defproccall : pocall_default;
@@ -1160,7 +1171,7 @@ implementation
           else { Error }
           else { Error }
            UpdateAlignmentStr:=false;
            UpdateAlignmentStr:=false;
         until false;
         until false;
-        UpdateAlignment(a,b);
+        Result:=Result and UpdateAlignment(a,b);
       end;
       end;
 
 
 
 
@@ -1402,7 +1413,7 @@ implementation
 
 
    procedure get_exepath;
    procedure get_exepath;
      var
      var
-	   localExepath : TCmdStr;
+       localExepath : TCmdStr;
        exeName:TCmdStr;
        exeName:TCmdStr;
 {$ifdef need_path_search}
 {$ifdef need_path_search}
        hs1 : TPathStr;
        hs1 : TPathStr;

+ 5 - 3
compiler/globtype.pas

@@ -32,7 +32,7 @@ interface
          executed from the FPC application. In some circomstances, this can be more
          executed from the FPC application. In some circomstances, this can be more
          than 255 characters. That's why using Ansi Strings}
          than 255 characters. That's why using Ansi Strings}
        TCmdStr = AnsiString;
        TCmdStr = AnsiString;
-       TPathStr = String;
+       TPathStr = AnsiString;
 
 
        { Integer type corresponding to pointer size }
        { Integer type corresponding to pointer size }
 {$ifdef cpu64bitaddr}
 {$ifdef cpu64bitaddr}
@@ -287,7 +287,8 @@ interface
          m_objectivec2,         { support interfacing with Objective-C (2.0) }
          m_objectivec2,         { support interfacing with Objective-C (2.0) }
          m_nested_procvars,     { support nested procedural variables }
          m_nested_procvars,     { support nested procedural variables }
          m_non_local_goto,      { support non local gotos (like iso pascal) }
          m_non_local_goto,      { support non local gotos (like iso pascal) }
-         m_advanced_records     { advanced record syntax with visibility sections, methods and properties }
+         m_advanced_records,    { advanced record syntax with visibility sections, methods and properties }
+         m_isolike_unary_minus  { unary minus like in iso pascal: same precedence level as binary minus/plus }
        );
        );
        tmodeswitches = set of tmodeswitch;
        tmodeswitches = set of tmodeswitch;
 
 
@@ -418,7 +419,8 @@ interface
          'OBJECTIVEC2',
          'OBJECTIVEC2',
          'NESTEDPROCVARS',
          'NESTEDPROCVARS',
          'NONLOCALGOTO',
          'NONLOCALGOTO',
-         'ADVANCEDRECORDS');
+         'ADVANCEDRECORDS',
+         'ISOUNARYMINUS');
 
 
 
 
      type
      type

+ 1 - 1
compiler/htypechk.pas

@@ -1609,7 +1609,7 @@ implementation
                     eq:=te_convert_l2
                     eq:=te_convert_l2
                   else
                   else
                     if equal_defs(def_from,tarraydef(def_to).elementdef) then
                     if equal_defs(def_from,tarraydef(def_to).elementdef) then
-                      eq:=te_convert_l2;
+                      eq:=te_convert_l3;
                 end;
                 end;
             end;
             end;
           pointerdef :
           pointerdef :

+ 9 - 79
compiler/i386/ag386nsm.pas

@@ -78,26 +78,6 @@ interface
           result:=generic_regname(r);
           result:=generic_regname(r);
       end;
       end;
 
 
-
-   function fixline(s:string):string;
-   {
-     return s with all leading and ending spaces and tabs removed
-   }
-     var
-       i,j,k : longint;
-     begin
-       i:=length(s);
-       while (i>0) and (s[i] in [#9,' ']) do
-        dec(i);
-       j:=1;
-       while (j<i) and (s[j] in [#9,' ']) do
-        inc(j);
-       for k:=j to i do
-        if s[k] in [#0..#31,#127..#255] then
-         s[k]:='.';
-       fixline:=Copy(s,j,i-j+1);
-     end;
-
     function single2str(d : single) : string;
     function single2str(d : single) : string;
       var
       var
          hs : string;
          hs : string;
@@ -521,7 +501,6 @@ interface
     var
     var
       s : string;
       s : string;
       hp       : tai;
       hp       : tai;
-      hp1      : tailineinfo;
       counter,
       counter,
       lines,
       lines,
       i,j,l    : longint;
       i,j,l    : longint;
@@ -546,55 +525,15 @@ interface
       hp:=tai(p.first);
       hp:=tai(p.first);
       while assigned(hp) do
       while assigned(hp) do
        begin
        begin
-
+         prefetch(pointer(hp.next)^);
          if not(hp.typ in SkipLineInfo) then
          if not(hp.typ in SkipLineInfo) then
-           begin
-             hp1:=hp as tailineinfo;
-             current_filepos:=hp1.fileinfo;
-             if do_line and (InlineLevel=0) then
-              begin
-              { load infile }
-                if lastfileinfo.fileindex<>hp1.fileinfo.fileindex then
-                 begin
-                   infile:=current_module.sourcefiles.get_file(hp1.fileinfo.fileindex);
-                   if assigned(infile) then
-                    begin
-                      { open only if needed !! }
-                      if (cs_asm_source in current_settings.globalswitches) then
-                       infile.open;
-                    end;
-                   { avoid unnecessary reopens of the same file !! }
-                   lastfileinfo.fileindex:=hp1.fileinfo.fileindex;
-                   { be sure to change line !! }
-                   lastfileinfo.line:=-1;
-                 end;
-              { write source }
-                if (cs_asm_source in current_settings.globalswitches) and
-                   assigned(infile) then
-                 begin
-                   if (infile<>lastinfile) then
-                     begin
-                       AsmWriteLn(target_asm.comment+'['+infile.name^+']');
-                       if assigned(lastinfile) then
-                         lastinfile.close;
-                     end;
-                   if (hp1.fileinfo.line<>lastfileinfo.line) and
-                      ((hp1.fileinfo.line<infile.maxlinebuf) or (InlineLevel>0)) then
-                     begin
-                       if (hp1.fileinfo.line<>0) and
-                          ((infile.linebuf^[hp1.fileinfo.line]>=0) or (InlineLevel>0)) then
-                         AsmWriteLn(target_asm.comment+'['+tostr(hp1.fileinfo.line)+'] '+
-                           fixline(infile.GetLineStr(hp1.fileinfo.line)));
-                       { set it to a negative value !
-                       to make that is has been read already !! PM }
-                       if (infile.linebuf^[hp1.fileinfo.line]>=0) then
-                         infile.linebuf^[hp1.fileinfo.line]:=-infile.linebuf^[hp1.fileinfo.line]-1;
-                     end;
-                 end;
-                lastfileinfo:=hp1.fileinfo;
-                lastinfile:=infile;
-              end;
-           end;
+          begin
+            current_filepos:=tailineinfo(hp).fileinfo;
+            { no line info for inlined code }
+            if do_line and (inlinelevel=0) then
+              WriteSourceLine(hp as tailineinfo);
+          end;
+
          case hp.typ of
          case hp.typ of
            ait_comment :
            ait_comment :
              Begin
              Begin
@@ -613,16 +552,7 @@ interface
            ait_tempalloc :
            ait_tempalloc :
              begin
              begin
                if (cs_asm_tempalloc in current_settings.globalswitches) then
                if (cs_asm_tempalloc in current_settings.globalswitches) then
-                 begin
-{$ifdef EXTDEBUG}
-                   if assigned(tai_tempalloc(hp).problem) then
-                     AsmWriteLn(target_asm.comment+tai_tempalloc(hp).problem^+' ('+tostr(tai_tempalloc(hp).temppos)+','+
-                       tostr(tai_tempalloc(hp).tempsize)+')')
-                   else
-{$endif EXTDEBUG}
-                     AsmWriteLn(target_asm.comment+'Temp '+tostr(tai_tempalloc(hp).temppos)+','+
-                       tostr(tai_tempalloc(hp).tempsize)+tempallocstr[tai_tempalloc(hp).allocation]);
-                 end;
+                 WriteTempalloc(tai_tempalloc(hp));
              end;
              end;
 
 
            ait_section :
            ait_section :

+ 44 - 15
compiler/i386/cgcpu.pas

@@ -40,16 +40,16 @@ unit cgcpu;
 
 
         { passing parameter using push instead of mov }
         { passing parameter using push instead of mov }
         procedure a_load_reg_cgpara(list : TAsmList;size : tcgsize;r : tregister;const cgpara : tcgpara);override;
         procedure a_load_reg_cgpara(list : TAsmList;size : tcgsize;r : tregister;const cgpara : tcgpara);override;
-        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const cgpara : tcgpara);override;
+        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : tcgpara);override;
         procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);override;
         procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const cgpara : tcgpara);override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const cgpara : tcgpara);override;
 
 
         procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
         procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
-        procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);override;
+        procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);override;
         procedure g_releasevaluepara_openarray(list : TAsmList;const l:tlocation);override;
         procedure g_releasevaluepara_openarray(list : TAsmList;const l:tlocation);override;
 
 
         procedure g_exception_reason_save(list : TAsmList; const href : treference);override;
         procedure g_exception_reason_save(list : TAsmList; const href : treference);override;
-        procedure g_exception_reason_save_const(list : TAsmList; const href : treference; a: aint);override;
+        procedure g_exception_reason_save_const(list : TAsmList; const href : treference; a: tcgint);override;
         procedure g_exception_reason_load(list : TAsmList; const href : treference);override;
         procedure g_exception_reason_load(list : TAsmList; const href : treference);override;
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
         procedure g_maybe_got_init(list: TAsmList); override;
         procedure g_maybe_got_init(list: TAsmList); override;
@@ -63,7 +63,7 @@ unit cgcpu;
       private
       private
         procedure get_64bit_ops(op:TOpCG;var op1,op2:TAsmOp);
         procedure get_64bit_ops(op:TOpCG;var op1,op2:TAsmOp);
       end;
       end;
-      
+
     procedure create_codegen;
     procedure create_codegen;
 
 
   implementation
   implementation
@@ -125,7 +125,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcg386.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const cgpara : tcgpara);
+    procedure tcg386.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : tcgpara);
       var
       var
         pushsize : tcgsize;
         pushsize : tcgsize;
       begin
       begin
@@ -145,7 +145,7 @@ unit cgcpu;
 
 
     procedure tcg386.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);
     procedure tcg386.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);
 
 
-        procedure pushdata(paraloc:pcgparalocation;ofs:aint);
+        procedure pushdata(paraloc:pcgparalocation;ofs:tcgint);
         var
         var
           pushsize : tcgsize;
           pushsize : tcgsize;
           tmpreg   : tregister;
           tmpreg   : tregister;
@@ -184,7 +184,7 @@ unit cgcpu;
         end;
         end;
 
 
       var
       var
-        len : aint;
+        len : tcgint;
         href : treference;
         href : treference;
       begin
       begin
         { cgpara.size=OS_NO requires a copy on the stack }
         { cgpara.size=OS_NO requires a copy on the stack }
@@ -217,6 +217,7 @@ unit cgcpu;
       var
       var
         tmpreg : tregister;
         tmpreg : tregister;
         opsize : topsize;
         opsize : topsize;
+        tmpref : treference;
       begin
       begin
         with r do
         with r do
           begin
           begin
@@ -229,7 +230,35 @@ unit cgcpu;
                 if (segment=NR_NO) and (base=NR_NO) and (index=NR_NO) then
                 if (segment=NR_NO) and (base=NR_NO) and (index=NR_NO) then
                   begin
                   begin
                     if assigned(symbol) then
                     if assigned(symbol) then
-                      list.concat(Taicpu.Op_sym_ofs(A_PUSH,opsize,symbol,offset))
+                      begin
+                        if (target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+                           ((r.symbol.bind in [AB_EXTERNAL,AB_WEAK_EXTERNAL]) or
+                            (cs_create_pic in current_settings.moduleswitches)) then
+                          begin
+                            tmpreg:=getaddressregister(list);
+                            a_loadaddr_ref_reg(list,r,tmpreg);
+                            list.concat(taicpu.op_reg(A_PUSH,opsize,tmpreg));
+                          end
+                        else if cs_create_pic in current_settings.moduleswitches then
+                          begin
+                            if offset<>0 then
+                              begin
+                                tmpreg:=getaddressregister(list);
+                                a_loadaddr_ref_reg(list,r,tmpreg);
+                                list.concat(taicpu.op_reg(A_PUSH,opsize,tmpreg));
+                              end
+                            else
+                              begin
+                                reference_reset_symbol(tmpref,r.symbol,0,r.alignment);
+                                tmpref.refaddr:=addr_pic;
+                                tmpref.base:=current_procinfo.got;
+                                include(current_procinfo.flags,pi_needs_got);
+                                list.concat(taicpu.op_ref(A_PUSH,S_L,tmpref));
+                              end
+                          end
+                        else
+                          list.concat(Taicpu.Op_sym_ofs(A_PUSH,opsize,symbol,offset));
+                      end
                     else
                     else
                       list.concat(Taicpu.Op_const(A_PUSH,opsize,offset));
                       list.concat(Taicpu.Op_const(A_PUSH,opsize,offset));
                   end
                   end
@@ -353,7 +382,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcg386.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);
+    procedure tcg386.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);
       var
       var
         power,len  : longint;
         power,len  : longint;
         opsize : topsize;
         opsize : topsize;
@@ -471,7 +500,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcg386.g_exception_reason_save_const(list : TAsmList;const href : treference; a: aint);
+    procedure tcg386.g_exception_reason_save_const(list : TAsmList;const href : treference; a: tcgint);
       begin
       begin
         if not paramanager.use_fixed_stack then
         if not paramanager.use_fixed_stack then
           list.concat(Taicpu.op_const(A_PUSH,tcgsize2opsize[OS_INT],a))
           list.concat(Taicpu.op_const(A_PUSH,tcgsize2opsize[OS_INT],a))
@@ -781,8 +810,8 @@ unit cgcpu;
         case op of
         case op of
           OP_AND,OP_OR,OP_XOR:
           OP_AND,OP_OR,OP_XOR:
             begin
             begin
-              cg.a_op_const_reg(list,op,OS_32,aint(lo(value)),reg.reglo);
-              cg.a_op_const_reg(list,op,OS_32,aint(hi(value)),reg.reghi);
+              cg.a_op_const_reg(list,op,OS_32,tcgint(lo(value)),reg.reglo);
+              cg.a_op_const_reg(list,op,OS_32,tcgint(hi(value)),reg.reghi);
             end;
             end;
           OP_ADD, OP_SUB:
           OP_ADD, OP_SUB:
             begin
             begin
@@ -807,9 +836,9 @@ unit cgcpu;
         case op of
         case op of
           OP_AND,OP_OR,OP_XOR:
           OP_AND,OP_OR,OP_XOR:
             begin
             begin
-              cg.a_op_const_ref(list,op,OS_32,aint(lo(value)),tempref);
+              cg.a_op_const_ref(list,op,OS_32,tcgint(lo(value)),tempref);
               inc(tempref.offset,4);
               inc(tempref.offset,4);
-              cg.a_op_const_ref(list,op,OS_32,aint(hi(value)),tempref);
+              cg.a_op_const_ref(list,op,OS_32,tcgint(hi(value)),tempref);
             end;
             end;
           OP_ADD, OP_SUB:
           OP_ADD, OP_SUB:
             begin
             begin
@@ -829,5 +858,5 @@ unit cgcpu;
         cg := tcg386.create;
         cg := tcg386.create;
         cg64 := tcg64f386.create;
         cg64 := tcg64f386.create;
       end;
       end;
-      
+
 end.
 end.

+ 14 - 3
compiler/i386/cpupara.pas

@@ -169,7 +169,7 @@ unit cpupara;
                 windows/delphi (FK)
                 windows/delphi (FK)
               }
               }
               if ((target_info.system=system_i386_win32) and
               if ((target_info.system=system_i386_win32) and
-                 (calloption=pocall_stdcall) and
+                 (calloption in [pocall_stdcall,pocall_safecall]) and
                  (varspez=vs_const)) or
                  (varspez=vs_const)) or
                  (calloption=pocall_register) then
                  (calloption=pocall_register) then
                 result:=true
                 result:=true
@@ -350,7 +350,18 @@ unit cpupara;
         else
         else
           begin
           begin
             retcgsize:=def_cgsize(def);
             retcgsize:=def_cgsize(def);
-            result.intsize:=def.size;
+            { darwin/x86 requires that results < sizeof(aint) are sign/ }
+            { zero extended to sizeof(aint)                             }
+            if (target_info.system in [system_i386_darwin,system_i386_iphonesim]) and
+               (side=calleeside) and
+               (result.intsize>0) and
+               (result.intsize<sizeof(aint)) then
+              begin
+                result.intsize:=sizeof(aint);
+                retcgsize:=OS_SINT;
+              end
+            else
+              result.intsize:=def.size;
           end;
           end;
         result.size:=retcgsize;
         result.size:=retcgsize;
         { Return is passed as var parameter }
         { Return is passed as var parameter }
@@ -456,7 +467,7 @@ unit cpupara;
                    (paralen < sizeof(aint)) then
                    (paralen < sizeof(aint)) then
                   begin
                   begin
                     paralen := sizeof(aint);
                     paralen := sizeof(aint);
-                    paracgsize:=OS_INT;
+                    paracgsize:=OS_SINT;
                   end
                   end
                 else
                 else
                   paracgsize:=def_cgsize(hp.vardef);
                   paracgsize:=def_cgsize(hp.vardef);

+ 4 - 1
compiler/i386/i386att.inc

@@ -333,6 +333,7 @@
 'sbb',
 'sbb',
 'scasb',
 'scasb',
 'scasl',
 'scasl',
+'scasq',
 'scasw',
 'scasw',
 'cs',
 'cs',
 'ds',
 'ds',
@@ -511,6 +512,7 @@
 'cmpltpd',
 'cmpltpd',
 'cmpltsd',
 'cmpltsd',
 'cmpneqpd',
 'cmpneqpd',
+'cmpneqsd',
 'cmpnlepd',
 'cmpnlepd',
 'cmpnlesd',
 'cmpnlesd',
 'cmpnltpd',
 'cmpnltpd',
@@ -665,6 +667,7 @@
 'roundpd',
 'roundpd',
 'roundss',
 'roundss',
 'roundsd',
 'roundsd',
+'crc32',
 'pcmpestri',
 'pcmpestri',
 'pcmpestrm',
 'pcmpestrm',
 'pcmpistri',
 'pcmpistri',
@@ -676,7 +679,7 @@
 'aesdec',
 'aesdec',
 'aesdeclast',
 'aesdeclast',
 'aesimc',
 'aesimc',
-'aeskeygen',
+'aeskeygenassist',
 'stosq',
 'stosq',
 'lodsq',
 'lodsq',
 'cmpsq'
 'cmpsq'

+ 5 - 2
compiler/i386/i386atts.inc

@@ -201,8 +201,8 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
-attsufINT,
-attsufINT,
+attsufINTdual,
+attsufINTdual,
 attsufINT,
 attsufINT,
 attsufNONE,
 attsufNONE,
 attsufINT,
 attsufINT,
@@ -341,6 +341,7 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufNONE,
 attsufINT,
 attsufINT,
 attsufINT,
 attsufINT,
 attsufINT,
 attsufINT,
@@ -529,6 +530,7 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufNONE,
 attsufINT,
 attsufINT,
 attsufNONE,
 attsufNONE,
 attsufINT,
 attsufINT,
@@ -665,6 +667,7 @@ attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
+attsufINT,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,
 attsufNONE,

+ 4 - 1
compiler/i386/i386int.inc

@@ -333,6 +333,7 @@
 'sbb',
 'sbb',
 'scasb',
 'scasb',
 'scasd',
 'scasd',
+'scasq',
 'scasw',
 'scasw',
 'segcs',
 'segcs',
 'segds',
 'segds',
@@ -511,6 +512,7 @@
 'cmpltpd',
 'cmpltpd',
 'cmpltsd',
 'cmpltsd',
 'cmpneqpd',
 'cmpneqpd',
+'cmpneqsd',
 'cmpnlepd',
 'cmpnlepd',
 'cmpnlesd',
 'cmpnlesd',
 'cmpnltpd',
 'cmpnltpd',
@@ -665,6 +667,7 @@
 'roundpd',
 'roundpd',
 'roundss',
 'roundss',
 'roundsd',
 'roundsd',
+'crc32',
 'pcmpestri',
 'pcmpestri',
 'pcmpestrm',
 'pcmpestrm',
 'pcmpistri',
 'pcmpistri',
@@ -676,7 +679,7 @@
 'aesdec',
 'aesdec',
 'aesdeclast',
 'aesdeclast',
 'aesimc',
 'aesimc',
-'aeskeygen',
+'aeskeygenassist',
 'stosq',
 'stosq',
 'lodsq',
 'lodsq',
 'cmpsq'
 'cmpsq'

+ 1 - 1
compiler/i386/i386nop.inc

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

+ 4 - 1
compiler/i386/i386op.inc

@@ -333,6 +333,7 @@ A_SAR,
 A_SBB,
 A_SBB,
 A_SCASB,
 A_SCASB,
 A_SCASD,
 A_SCASD,
+A_SCASQ,
 A_SCASW,
 A_SCASW,
 A_SEGCS,
 A_SEGCS,
 A_SEGDS,
 A_SEGDS,
@@ -511,6 +512,7 @@ A_CMPLESD,
 A_CMPLTPD,
 A_CMPLTPD,
 A_CMPLTSD,
 A_CMPLTSD,
 A_CMPNEQPD,
 A_CMPNEQPD,
+A_CMPNEQSD,
 A_CMPNLEPD,
 A_CMPNLEPD,
 A_CMPNLESD,
 A_CMPNLESD,
 A_CMPNLTPD,
 A_CMPNLTPD,
@@ -665,6 +667,7 @@ A_ROUNDPS,
 A_ROUNDPD,
 A_ROUNDPD,
 A_ROUNDSS,
 A_ROUNDSS,
 A_ROUNDSD,
 A_ROUNDSD,
+A_CRC32,
 A_PCMPESTRI,
 A_PCMPESTRI,
 A_PCMPESTRM,
 A_PCMPESTRM,
 A_PCMPISTRI,
 A_PCMPISTRI,
@@ -676,7 +679,7 @@ A_AESENCLAST,
 A_AESDEC,
 A_AESDEC,
 A_AESDECLAST,
 A_AESDECLAST,
 A_AESIMC,
 A_AESIMC,
-A_AESKEYGEN,
+A_AESKEYGENASSIST,
 A_STOSQ,
 A_STOSQ,
 A_LODSQ,
 A_LODSQ,
 A_CMPSQ
 A_CMPSQ

+ 3 - 0
compiler/i386/i386prop.inc

@@ -334,6 +334,7 @@
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
 (Ch: (Ch_None, Ch_None, Ch_None)),
@@ -521,6 +522,7 @@
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
 (Ch: (Ch_Wop2, Ch_Rop1, Ch_None)),
@@ -665,6 +667,7 @@
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
+(Ch: (Ch_Mop1, Ch_Rop2, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),
 (Ch: (Ch_All, Ch_None, Ch_None)),

File diff suppressed because it is too large
+ 193 - 200
compiler/i386/i386tab.inc


+ 6 - 4
compiler/i386/popt386.pas

@@ -719,12 +719,14 @@ begin
                          (taicpu(hp1).opcode = A_AND) and
                          (taicpu(hp1).opcode = A_AND) and
                          (taicpu(hp1).oper[0]^.typ = top_const) and
                          (taicpu(hp1).oper[0]^.typ = top_const) and
                          (taicpu(hp1).oper[1]^.typ = top_reg) and
                          (taicpu(hp1).oper[1]^.typ = top_reg) and
-                         (taicpu(p).oper[1]^.reg = taicpu(hp1).oper[1]^.reg) then
+                         (getsupreg(taicpu(p).oper[1]^.reg)=getsupreg(taicpu(hp1).oper[1]^.reg)) and
+                         (getsubreg(taicpu(p).oper[1]^.reg)<=getsubreg(taicpu(hp1).oper[1]^.reg)) then
     {change "and const1, reg; and const2, reg" to "and (const1 and const2), reg"}
     {change "and const1, reg; and const2, reg" to "and (const1 and const2), reg"}
                         begin
                         begin
-                          taicpu(p).loadConst(0,taicpu(p).oper[0]^.val and taicpu(hp1).oper[0]^.val);
-                          asml.remove(hp1);
-                          hp1.free;
+                          taicpu(hp1).loadConst(0,taicpu(p).oper[0]^.val and taicpu(hp1).oper[0]^.val);
+                          asml.remove(p);
+                          p.free;
+                          p:=hp1;
                         end
                         end
                       else
                       else
     {change "and x, reg; jxx" to "test x, reg", if reg is deallocated before the
     {change "and x, reg; jxx" to "test x, reg", if reg is deallocated before the

+ 67 - 9
compiler/link.pas

@@ -63,7 +63,7 @@ interface
          Procedure AddStaticCLibrary(const S : TCmdStr);
          Procedure AddStaticCLibrary(const S : TCmdStr);
          Procedure AddSharedCLibrary(S : TCmdStr);
          Procedure AddSharedCLibrary(S : TCmdStr);
          Procedure AddFramework(S : TCmdStr);
          Procedure AddFramework(S : TCmdStr);
-         procedure AddImportSymbol(const libname,symname:TCmdStr;OrdNr: longint;isvar:boolean);virtual;
+         procedure AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);virtual;
          Procedure InitSysInitUnitName;virtual;
          Procedure InitSysInitUnitName;virtual;
          Function  MakeExecutable:boolean;virtual;
          Function  MakeExecutable:boolean;virtual;
          Function  MakeSharedLibrary:boolean;virtual;
          Function  MakeSharedLibrary:boolean;virtual;
@@ -93,6 +93,7 @@ interface
          FImportLibraryList : TFPHashObjectList;
          FImportLibraryList : TFPHashObjectList;
          procedure Load_ReadObject(const para:TCmdStr);
          procedure Load_ReadObject(const para:TCmdStr);
          procedure Load_ReadStaticLibrary(const para:TCmdStr);
          procedure Load_ReadStaticLibrary(const para:TCmdStr);
+         procedure ParseScript_Handle;
          procedure ParseScript_Load;
          procedure ParseScript_Load;
          procedure ParseScript_Order;
          procedure ParseScript_Order;
          procedure ParseScript_MemPos;
          procedure ParseScript_MemPos;
@@ -112,7 +113,7 @@ interface
          Destructor Destroy;override;
          Destructor Destroy;override;
          Function  MakeExecutable:boolean;override;
          Function  MakeExecutable:boolean;override;
          Function  MakeSharedLibrary:boolean;override;
          Function  MakeSharedLibrary:boolean;override;
-         procedure AddImportSymbol(const libname,symname:TCmdStr;OrdNr: longint;isvar:boolean);override;
+         procedure AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);override;
        end;
        end;
 
 
     var
     var
@@ -249,7 +250,9 @@ Implementation
         Found:=FindFile(s,'.'+source_info.DirSep,false,founddll);
         Found:=FindFile(s,'.'+source_info.DirSep,false,founddll);
         if (not found) then
         if (not found) then
          Found:=librarysearchpath.FindFile(s,false,founddll);
          Found:=librarysearchpath.FindFile(s,false,founddll);
-        if (not found) then
+
+        { when cross compiling, it is pretty useless to search windir etc. for dlls }
+        if (not found) and (source_info.system=target_info.system) then
          begin
          begin
            sysdir:=FixPath(GetEnvironmentVariable('windir'),false);
            sysdir:=FixPath(GetEnvironmentVariable('windir'),false);
            Found:=FindFile(s,sysdir+';'+sysdir+'system'+source_info.DirSep+';'+sysdir+'system32'+source_info.DirSep,false,founddll);
            Found:=FindFile(s,sysdir+';'+sysdir+'system'+source_info.DirSep+';'+sysdir+'system32'+source_info.DirSep,false,founddll);
@@ -369,6 +372,7 @@ Implementation
                    mask:=mask or link_static;
                    mask:=mask or link_static;
                end;
                end;
               { smart linking ? }
               { smart linking ? }
+
               if (cs_link_smart in current_settings.globalswitches) then
               if (cs_link_smart in current_settings.globalswitches) then
                begin
                begin
                  if (flags and uf_smart_linked)=0 then
                  if (flags and uf_smart_linked)=0 then
@@ -431,14 +435,15 @@ Implementation
                for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
                for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
                  begin
                  begin
                    ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
                    ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);
-                   AddImportSymbol(ImportLibrary.Name,ImportSymbol.Name,ImportSymbol.OrdNr,ImportSymbol.IsVar);
+                   AddImportSymbol(ImportLibrary.Name,ImportSymbol.Name,
+                     ImportSymbol.MangledName,ImportSymbol.OrdNr,ImportSymbol.IsVar);
                  end;
                  end;
              end;
              end;
          end;
          end;
       end;
       end;
 
 
 
 
-    procedure TLinker.AddImportSymbol(const libname,symname:TCmdStr;OrdNr: longint;isvar:boolean);
+    procedure TLinker.AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);
       begin
       begin
       end;
       end;
 
 
@@ -516,7 +521,7 @@ Implementation
       end;
       end;
 
 
 
 
-    procedure AddImportSymbol(const libname,symname:TCmdStr;OrdNr: longint;isvar:boolean);
+    procedure AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);
       begin
       begin
       end;
       end;
 
 
@@ -829,7 +834,7 @@ Implementation
       end;
       end;
 
 
 
 
-    procedure TInternalLinker.AddImportSymbol(const libname,symname:TCmdStr;OrdNr: longint;isvar:boolean);
+    procedure TInternalLinker.AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);
       var
       var
         ImportLibrary : TImportLibrary;
         ImportLibrary : TImportLibrary;
         ImportSymbol  : TFPHashObject;
         ImportSymbol  : TFPHashObject;
@@ -839,7 +844,7 @@ Implementation
           ImportLibrary:=TImportLibrary.Create(ImportLibraryList,libname);
           ImportLibrary:=TImportLibrary.Create(ImportLibraryList,libname);
         ImportSymbol:=TFPHashObject(ImportLibrary.ImportSymbolList.Find(symname));
         ImportSymbol:=TFPHashObject(ImportLibrary.ImportSymbolList.Find(symname));
         if not assigned(ImportSymbol) then
         if not assigned(ImportSymbol) then
-          ImportSymbol:=TImportSymbol.Create(ImportLibrary.ImportSymbolList,symname,OrdNr,isvar);
+          ImportSymbol:=TImportSymbol.Create(ImportLibrary.ImportSymbolList,symname,symmangledname,OrdNr,isvar);
       end;
       end;
 
 
 
 
@@ -880,6 +885,47 @@ Implementation
       end;
       end;
 
 
 
 
+    procedure TInternalLinker.ParseScript_Handle;
+      var
+        s,
+        para,
+        keyword : String;
+        hp : TCmdStrListItem;
+      begin
+        exeoutput.Load_Start;
+        hp:=TCmdStrListItem(linkscript.first);
+        while assigned(hp) do
+          begin
+            s:=hp.str;
+            if (s='') or (s[1]='#') then
+              continue;
+            keyword:=Upper(GetToken(s,' '));
+            para:=GetToken(s,' ');
+            if Trim(s)<>'' then
+              Comment(V_Warning,'Unknown part "'+s+'" in "'+hp.str+'" internal linker script');
+            if (keyword<>'SYMBOL') and
+               (keyword<>'PROVIDE') and
+               (keyword<>'ZEROES') and
+               (keyword<>'BYTE') and
+               (keyword<>'WORD') and
+               (keyword<>'LONG') and
+               (keyword<>'QUAD') and
+               (keyword<>'ENTRYNAME') and
+               (keyword<>'ISSHAREDLIBRARY') and
+               (keyword<>'IMAGEBASE') and
+               (keyword<>'READOBJECT') and
+               (keyword<>'READSTATICLIBRARY') and
+               (keyword<>'EXESECTION') and
+               (keyword<>'ENDEXESECTION') and
+               (keyword<>'OBJSECTION') and
+               (keyword<>'HEADER')
+               then
+              Comment(V_Warning,'Unknown keyword "'+keyword+'" in "'+hp.str
+                +'" internal linker script');
+            hp:=TCmdStrListItem(hp.next);
+          end;
+      end;
+
     procedure TInternalLinker.ParseScript_Load;
     procedure TInternalLinker.ParseScript_Load;
       var
       var
         s,
         s,
@@ -898,6 +944,8 @@ Implementation
             para:=GetToken(s,' ');
             para:=GetToken(s,' ');
             if keyword='SYMBOL' then
             if keyword='SYMBOL' then
               ExeOutput.Load_Symbol(para)
               ExeOutput.Load_Symbol(para)
+            else if keyword='PROVIDE' then
+              ExeOutput.Load_ProvideSymbol(para)
             else if keyword='ENTRYNAME' then
             else if keyword='ENTRYNAME' then
               ExeOutput.Load_EntryName(para)
               ExeOutput.Load_EntryName(para)
             else if keyword='ISSHAREDLIBRARY' then
             else if keyword='ISSHAREDLIBRARY' then
@@ -937,8 +985,18 @@ Implementation
               ExeOutput.Order_ObjSection(para)
               ExeOutput.Order_ObjSection(para)
             else if keyword='ZEROS' then
             else if keyword='ZEROS' then
               ExeOutput.Order_Zeros(para)
               ExeOutput.Order_Zeros(para)
+            else if keyword='BYTE' then
+              ExeOutput.Order_Values(1,para)
+            else if keyword='WORD' then
+              ExeOutput.Order_Values(2,para)
+            else if keyword='LONG' then
+              ExeOutput.Order_Values(4,para)
+            else if keyword='QUAD' then
+              ExeOutput.Order_Values(8,para)
             else if keyword='SYMBOL' then
             else if keyword='SYMBOL' then
-              ExeOutput.Order_Symbol(para);
+              ExeOutput.Order_Symbol(para)
+            else if keyword='PROVIDE' then
+              ExeOutput.Order_ProvideSymbol(para);
             hp:=TCmdStrListItem(hp.next);
             hp:=TCmdStrListItem(hp.next);
           end;
           end;
         exeoutput.Order_End;
         exeoutput.Order_End;

+ 23 - 23
compiler/m68k/cgcpu.pas

@@ -44,15 +44,15 @@ unit cgcpu;
         procedure done_register_allocators;override;
         procedure done_register_allocators;override;
 
 
         procedure a_load_reg_cgpara(list : TAsmList;size : tcgsize;r : tregister;const cgpara : tcgpara);override;
         procedure a_load_reg_cgpara(list : TAsmList;size : tcgsize;r : tregister;const cgpara : tcgpara);override;
-        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const cgpara : tcgpara);override;
+        procedure a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : tcgpara);override;
         procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);override;
         procedure a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const cgpara : tcgpara);override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const cgpara : tcgpara);override;
 
 
         procedure a_call_name(list : TAsmList;const s : string; weak: boolean);override;
         procedure a_call_name(list : TAsmList;const s : string; weak: boolean);override;
         procedure a_call_reg(list : TAsmList;reg : tregister);override;
         procedure a_call_reg(list : TAsmList;reg : tregister);override;
 
 
-        procedure a_load_const_reg(list : TAsmList;size : tcgsize;a : aint;register : tregister);override;
-        procedure a_load_const_ref(list : TAsmList; tosize: tcgsize; a : aint;const ref : treference);override;
+        procedure a_load_const_reg(list : TAsmList;size : tcgsize;a : tcgint;register : tregister);override;
+        procedure a_load_const_ref(list : TAsmList; tosize: tcgsize; a : tcgint;const ref : treference);override;
 
 
         procedure a_load_reg_ref(list : TAsmList;fromsize,tosize : tcgsize;register : tregister;const ref : treference);override;
         procedure a_load_reg_ref(list : TAsmList;fromsize,tosize : tcgsize;register : tregister;const ref : treference);override;
         procedure a_load_reg_reg(list : TAsmList;fromsize,tosize : tcgsize;reg1,reg2 : tregister);override;
         procedure a_load_reg_reg(list : TAsmList;fromsize,tosize : tcgsize;reg1,reg2 : tregister);override;
@@ -69,27 +69,27 @@ unit cgcpu;
         procedure a_loadmm_reg_ref(list: TAsmList;fromsize,tosize : tcgsize; reg: tregister; const ref: treference;shuffle : pmmshuffle); override;
         procedure a_loadmm_reg_ref(list: TAsmList;fromsize,tosize : tcgsize; reg: tregister; const ref: treference;shuffle : pmmshuffle); override;
         procedure a_loadmm_reg_cgpara(list: TAsmList; size: tcgsize; reg: tregister;const locpara : TCGPara;shuffle : pmmshuffle); override;
         procedure a_loadmm_reg_cgpara(list: TAsmList; size: tcgsize; reg: tregister;const locpara : TCGPara;shuffle : pmmshuffle); override;
 
 
-        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: tcgsize; a: aint; reg: TRegister); override;
-//        procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; const ref: TReference); override;
+        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: tcgsize; a: tcgint; reg: TRegister); override;
+//        procedure a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; const ref: TReference); override;
         procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; reg1, reg2: TRegister); override;
         procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; reg1, reg2: TRegister); override;
 
 
-        procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
+        procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
           l : tasmlabel);override;
           l : tasmlabel);override;
         procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
         procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
         procedure a_jmp_always(list : TAsmList;l: tasmlabel); override;
         procedure a_jmp_always(list : TAsmList;l: tasmlabel); override;
         procedure a_jmp_flags(list : TAsmList;const f : TResFlags;l: tasmlabel); override;
         procedure a_jmp_flags(list : TAsmList;const f : TResFlags;l: tasmlabel); override;
         procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister); override;
         procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: tresflags; reg: TRegister); override;
 
 
-        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
+        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);override;
         { generates overflow checking code for a node }
         { generates overflow checking code for a node }
         procedure g_overflowcheck(list: TAsmList; const l:tlocation; def:tdef); override;
         procedure g_overflowcheck(list: TAsmList; const l:tlocation; def:tdef); override;
-        procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);override;
+        procedure g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);override;
 
 
         procedure g_proc_entry(list : TAsmList;localsize : longint;nostackframe:boolean);override;
         procedure g_proc_entry(list : TAsmList;localsize : longint;nostackframe:boolean);override;
         procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
         procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
 
 
 //        procedure g_restore_frame_pointer(list : TAsmList);override;
 //        procedure g_restore_frame_pointer(list : TAsmList);override;
-//        procedure g_return_from_proc(list : TAsmList;parasize : aint);override;
+//        procedure g_return_from_proc(list : TAsmList;parasize : tcgint);override;
         procedure g_restore_registers(list:TAsmList);override;
         procedure g_restore_registers(list:TAsmList);override;
         procedure g_save_registers(list:TAsmList);override;
         procedure g_save_registers(list:TAsmList);override;
 
 
@@ -265,7 +265,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcg68k.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : aint;const cgpara : tcgpara);
+    procedure tcg68k.a_load_const_cgpara(list : TAsmList;size : tcgsize;a : tcgint;const cgpara : tcgpara);
       var
       var
         pushsize : tcgsize;
         pushsize : tcgsize;
         ref : treference;
         ref : treference;
@@ -292,7 +292,7 @@ unit cgcpu;
 
 
     procedure tcg68k.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);
     procedure tcg68k.a_load_ref_cgpara(list : TAsmList;size : tcgsize;const r : treference;const cgpara : tcgpara);
 
 
-        procedure pushdata(paraloc:pcgparalocation;ofs:aint);
+        procedure pushdata(paraloc:pcgparalocation;ofs:tcgint);
         var
         var
           pushsize : tcgsize;
           pushsize : tcgsize;
           tmpreg   : tregister;
           tmpreg   : tregister;
@@ -304,7 +304,7 @@ unit cgcpu;
 { TODO: FIX ME!!! this also triggers location bug }
 { TODO: FIX ME!!! this also triggers location bug }
           {if (paraloc^.loc<>LOC_REFERENCE) or
           {if (paraloc^.loc<>LOC_REFERENCE) or
              (paraloc^.reference.index<>NR_STACK_POINTER_REG) or
              (paraloc^.reference.index<>NR_STACK_POINTER_REG) or
-             (tcgsize2size[paraloc^.size]>sizeof(aint)) then
+             (tcgsize2size[paraloc^.size]>sizeof(tcgint)) then
             internalerror(200501162);}
             internalerror(200501162);}
 
 
           { Pushes are needed in reverse order, add the size of the
           { Pushes are needed in reverse order, add the size of the
@@ -335,7 +335,7 @@ unit cgcpu;
         end;
         end;
 
 
       var
       var
-        len : aint;
+        len : tcgint;
         href : treference;
         href : treference;
       begin
       begin
 {$ifdef DEBUG_CHARLIE}
 {$ifdef DEBUG_CHARLIE}
@@ -490,7 +490,7 @@ unit cgcpu;
 
 
 
 
 
 
-    procedure tcg68k.a_load_const_reg(list : TAsmList;size : tcgsize;a : aint;register : tregister);
+    procedure tcg68k.a_load_const_reg(list : TAsmList;size : tcgsize;a : tcgint;register : tregister);
       begin
       begin
 {$ifdef DEBUG_CHARLIE}
 {$ifdef DEBUG_CHARLIE}
 //        writeln('a_load_const_reg');
 //        writeln('a_load_const_reg');
@@ -512,7 +512,7 @@ unit cgcpu;
          end;
          end;
       end;
       end;
 
 
-    procedure tcg68k.a_load_const_ref(list : TAsmList; tosize: tcgsize; a : aint;const ref : treference);
+    procedure tcg68k.a_load_const_ref(list : TAsmList; tosize: tcgsize; a : tcgint;const ref : treference);
       begin
       begin
 {$ifdef DEBUG_CHARLIE}
 {$ifdef DEBUG_CHARLIE}
         list.concat(tai_comment.create(strpnew('a_load_const_ref')));
         list.concat(tai_comment.create(strpnew('a_load_const_ref')));
@@ -664,7 +664,7 @@ unit cgcpu;
       end;
       end;
 
 
 
 
-    procedure tcg68k.a_op_const_reg(list : TAsmList; Op: TOpCG; size: tcgsize; a: aint; reg: TRegister);
+    procedure tcg68k.a_op_const_reg(list : TAsmList; Op: TOpCG; size: tcgsize; a: tcgint; reg: TRegister);
       var
       var
        scratch_reg : tregister;
        scratch_reg : tregister;
        scratch_reg2: tregister;
        scratch_reg2: tregister;
@@ -817,7 +817,7 @@ unit cgcpu;
       end;
       end;
 
 
 {
 {
-    procedure tcg68k.a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; const ref: TReference);
+    procedure tcg68k.a_op_const_ref(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; const ref: TReference);
       var
       var
         opcode: tasmop;
         opcode: tasmop;
       begin
       begin
@@ -1045,7 +1045,7 @@ unit cgcpu;
 
 
 
 
 
 
-    procedure tcg68k.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
+    procedure tcg68k.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
             l : tasmlabel);
             l : tasmlabel);
       var
       var
        hregister : tregister;
        hregister : tregister;
@@ -1158,7 +1158,7 @@ unit cgcpu;
 
 
 
 
 
 
-    procedure tcg68k.g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcg68k.g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);
 
 
      var
      var
          helpsize : longint;
          helpsize : longint;
@@ -1294,7 +1294,7 @@ unit cgcpu;
       begin
       begin
       end;
       end;
 
 
-    procedure tcg68k.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:aint;destreg:tregister);
+    procedure tcg68k.g_copyvaluepara_openarray(list : TAsmList;const ref:treference;const lenloc:tlocation;elesize:tcgint;destreg:tregister);
       begin
       begin
       end;
       end;
 
 
@@ -1359,7 +1359,7 @@ unit cgcpu;
     procedure tcg68k.g_proc_exit(list : TAsmList; parasize: longint; nostackframe: boolean);
     procedure tcg68k.g_proc_exit(list : TAsmList; parasize: longint; nostackframe: boolean);
       var
       var
 //        r,hregister : TRegister;
 //        r,hregister : TRegister;
-        localsize: aint;
+        localsize: tcgint;
         spr : TRegister;
         spr : TRegister;
         fpr : TRegister;
         fpr : TRegister;
         ref : TReference;
         ref : TReference;
@@ -1740,8 +1740,8 @@ unit cgcpu;
         end;
         end;
     end; { end case }
     end; { end case }
   end;
   end;
-  
-  
+
+
 procedure create_codegen;
 procedure create_codegen;
   begin
   begin
     cg := tcg68k.create;
     cg := tcg68k.create;

+ 23 - 23
compiler/mips/cgcpu.pas

@@ -44,10 +44,10 @@ type
     procedure make_simple_ref_fpu(list: tasmlist; var ref: treference);
     procedure make_simple_ref_fpu(list: tasmlist; var ref: treference);
     procedure handle_load_store(list: tasmlist; isstore: boolean; op: tasmop; reg: tregister; ref: treference);
     procedure handle_load_store(list: tasmlist; isstore: boolean; op: tasmop; reg: tregister; ref: treference);
     procedure handle_load_store_fpu(list: tasmlist; isstore: boolean; op: tasmop; reg: tregister; ref: treference);
     procedure handle_load_store_fpu(list: tasmlist; isstore: boolean; op: tasmop; reg: tregister; ref: treference);
-    procedure handle_reg_const_reg(list: tasmlist; op: Tasmop; src: tregister; a: aint; dst: tregister);
+    procedure handle_reg_const_reg(list: tasmlist; op: Tasmop; src: tregister; a: tcgint; dst: tregister);
 
 
     { parameter }
     { parameter }
-    procedure a_load_const_cgpara(list: tasmlist; size: tcgsize; a: aint; const paraloc: TCGPara); override;
+    procedure a_load_const_cgpara(list: tasmlist; size: tcgsize; a: tcgint; const paraloc: TCGPara); override;
     procedure a_load_ref_cgpara(list: tasmlist; sz: tcgsize; const r: TReference; const paraloc: TCGPara); override;
     procedure a_load_ref_cgpara(list: tasmlist; sz: tcgsize; const r: TReference; const paraloc: TCGPara); override;
     procedure a_loadaddr_ref_cgpara(list: tasmlist; const r: TReference; const paraloc: TCGPara); override;
     procedure a_loadaddr_ref_cgpara(list: tasmlist; const r: TReference; const paraloc: TCGPara); override;
     procedure a_loadfpu_reg_cgpara(list: tasmlist; size: tcgsize; const r: tregister; const paraloc: TCGPara); override;
     procedure a_loadfpu_reg_cgpara(list: tasmlist; size: tcgsize; const r: tregister; const paraloc: TCGPara); override;
@@ -55,15 +55,15 @@ type
     procedure a_call_name(list: tasmlist; const s: string; weak : boolean); override;
     procedure a_call_name(list: tasmlist; const s: string; weak : boolean); override;
     procedure a_call_reg(list: tasmlist; Reg: TRegister); override;
     procedure a_call_reg(list: tasmlist; Reg: TRegister); override;
     { General purpose instructions }
     { General purpose instructions }
-    procedure a_op_const_reg(list: tasmlist; Op: TOpCG; size: tcgsize; a: aint; reg: TRegister); override;
+    procedure a_op_const_reg(list: tasmlist; Op: TOpCG; size: tcgsize; a: tcgint; reg: TRegister); override;
     procedure a_op_reg_reg(list: tasmlist; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
     procedure a_op_reg_reg(list: tasmlist; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
-    procedure a_op_const_reg_reg(list: tasmlist; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister); override;
+    procedure a_op_const_reg_reg(list: tasmlist; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister); override;
     procedure a_op_reg_reg_reg(list: tasmlist; op: TOpCg; size: tcgsize; src1, src2, dst: tregister); override;
     procedure a_op_reg_reg_reg(list: tasmlist; op: TOpCg; size: tcgsize; src1, src2, dst: tregister); override;
-    procedure a_op_const_reg_reg_checkoverflow(list: tasmlist; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister; setflags: boolean; var ovloc: tlocation); override;
+    procedure a_op_const_reg_reg_checkoverflow(list: tasmlist; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister; setflags: boolean; var ovloc: tlocation); override;
     procedure a_op_reg_reg_reg_checkoverflow(list: tasmlist; op: TOpCg; size: tcgsize; src1, src2, dst: tregister; setflags: boolean; var ovloc: tlocation); override;
     procedure a_op_reg_reg_reg_checkoverflow(list: tasmlist; op: TOpCg; size: tcgsize; src1, src2, dst: tregister; setflags: boolean; var ovloc: tlocation); override;
     { move instructions }
     { move instructions }
-    procedure a_load_const_reg(list: tasmlist; size: tcgsize; a: aint; reg: tregister); override;
-    procedure a_load_const_ref(list: tasmlist; size: tcgsize; a: aint; const ref: TReference); override;
+    procedure a_load_const_reg(list: tasmlist; size: tcgsize; a: tcgint; reg: tregister); override;
+    procedure a_load_const_ref(list: tasmlist; size: tcgsize; a: tcgint; const ref: TReference); override;
     procedure a_load_reg_ref(list: tasmlist; FromSize, ToSize: TCgSize; reg: TRegister; const ref: TReference); override;
     procedure a_load_reg_ref(list: tasmlist; FromSize, ToSize: TCgSize; reg: TRegister; const ref: TReference); override;
     procedure a_load_ref_reg(list: tasmlist; FromSize, ToSize: TCgSize; const ref: TReference; reg: tregister); override;
     procedure a_load_ref_reg(list: tasmlist; FromSize, ToSize: TCgSize; const ref: TReference; reg: tregister); override;
     procedure a_load_reg_reg(list: tasmlist; FromSize, ToSize: TCgSize; reg1, reg2: tregister); override;
     procedure a_load_reg_reg(list: tasmlist; FromSize, ToSize: TCgSize; reg1, reg2: tregister); override;
@@ -73,7 +73,7 @@ type
     procedure a_loadfpu_ref_reg(list: tasmlist; fromsize, tosize: tcgsize; const ref: TReference; reg: tregister); override;
     procedure a_loadfpu_ref_reg(list: tasmlist; fromsize, tosize: tcgsize; const ref: TReference; reg: tregister); override;
     procedure a_loadfpu_reg_ref(list: tasmlist; fromsize, tosize: tcgsize; reg: tregister; const ref: TReference); override;
     procedure a_loadfpu_reg_ref(list: tasmlist; fromsize, tosize: tcgsize; reg: tregister; const ref: TReference); override;
     { comparison operations }
     { comparison operations }
-    procedure a_cmp_const_reg_label(list: tasmlist; size: tcgsize; cmp_op: topcmp; a: aint; reg: tregister; l: tasmlabel); override;
+    procedure a_cmp_const_reg_label(list: tasmlist; size: tcgsize; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel); override;
     procedure a_cmp_reg_reg_label(list: tasmlist; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
     procedure a_cmp_reg_reg_label(list: tasmlist; size: tcgsize; cmp_op: topcmp; reg1, reg2: tregister; l: tasmlabel); override;
     procedure a_jmp_always(List: tasmlist; l: TAsmLabel); override;
     procedure a_jmp_always(List: tasmlist; l: TAsmLabel); override;
     procedure a_jmp_name(list: tasmlist; const s: string); override;
     procedure a_jmp_name(list: tasmlist; const s: string); override;
@@ -82,9 +82,9 @@ type
     procedure g_overflowCheck_loc(List: tasmlist; const Loc: TLocation; def: TDef; ovloc: tlocation); override;
     procedure g_overflowCheck_loc(List: tasmlist; const Loc: TLocation; def: TDef; ovloc: tlocation); override;
     procedure g_proc_entry(list: tasmlist; localsize: longint; nostackframe: boolean); override;
     procedure g_proc_entry(list: tasmlist; localsize: longint; nostackframe: boolean); override;
     procedure g_proc_exit(list: tasmlist; parasize: longint; nostackframe: boolean); override;
     procedure g_proc_exit(list: tasmlist; parasize: longint; nostackframe: boolean); override;
-    procedure g_concatcopy(list: tasmlist; const Source, dest: treference; len: aint); override;
-    procedure g_concatcopy_unaligned(list: tasmlist; const Source, dest: treference; len: aint); override;
-    procedure g_concatcopy_move(list: tasmlist; const Source, dest: treference; len: aint);
+    procedure g_concatcopy(list: tasmlist; const Source, dest: treference; len: tcgint); override;
+    procedure g_concatcopy_unaligned(list: tasmlist; const Source, dest: treference; len: tcgint); override;
+    procedure g_concatcopy_move(list: tasmlist; const Source, dest: treference; len: tcgint);
     procedure g_intf_wrapper(list: tasmlist; procdef: tprocdef; const labelname: string; ioffset: longint); override;
     procedure g_intf_wrapper(list: tasmlist; procdef: tprocdef; const labelname: string; ioffset: longint); override;
   end;
   end;
 
 
@@ -474,7 +474,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.handle_reg_const_reg(list: tasmlist; op: Tasmop; src: tregister; a: aint; dst: tregister);
+procedure TCgMPSel.handle_reg_const_reg(list: tasmlist; op: Tasmop; src: tregister; a: tcgint; dst: tregister);
 var
 var
   tmpreg: tregister;
   tmpreg: tregister;
 begin
 begin
@@ -540,7 +540,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.a_load_const_cgpara(list: tasmlist; size: tcgsize; a: aint; const paraloc: TCGPara);
+procedure TCgMPSel.a_load_const_cgpara(list: tasmlist; size: tcgsize; a: tcgint; const paraloc: TCGPara);
 var
 var
   Ref: TReference;
   Ref: TReference;
 begin
 begin
@@ -680,7 +680,7 @@ end;
 
 
 {********************** load instructions ********************}
 {********************** load instructions ********************}
 
 
-procedure TCgMPSel.a_load_const_reg(list: tasmlist; size: TCGSize; a: aint; reg: TRegister);
+procedure TCgMPSel.a_load_const_reg(list: tasmlist; size: TCGSize; a: tcgint; reg: TRegister);
 begin
 begin
   if (a = 0) then
   if (a = 0) then
     list.concat(taicpu.op_reg_reg(A_MOVE, reg, NR_R0))
     list.concat(taicpu.op_reg_reg(A_MOVE, reg, NR_R0))
@@ -698,7 +698,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.a_load_const_ref(list: tasmlist; size: tcgsize; a: aint; const ref: TReference);
+procedure TCgMPSel.a_load_const_ref(list: tasmlist; size: tcgsize; a: tcgint; const ref: TReference);
 begin
 begin
   if a = 0 then
   if a = 0 then
     a_load_reg_ref(list, size, size, NR_R0, ref)
     a_load_reg_ref(list, size, size, NR_R0, ref)
@@ -962,7 +962,7 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TCgMPSel.a_op_const_reg(list: tasmlist; Op: TOpCG; size: tcgsize; a: aint; reg: TRegister);
+procedure TCgMPSel.a_op_const_reg(list: tasmlist; Op: TOpCG; size: tcgsize; a: tcgint; reg: TRegister);
 var
 var
   power: longint;
   power: longint;
   tmpreg1: tregister;
   tmpreg1: tregister;
@@ -1048,7 +1048,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.a_op_const_reg_reg(list: tasmlist; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister);
+procedure TCgMPSel.a_op_const_reg_reg(list: tasmlist; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister);
 var
 var
   power: longint;
   power: longint;
   tmpreg1: tregister;
   tmpreg1: tregister;
@@ -1103,7 +1103,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.a_op_const_reg_reg_checkoverflow(list: tasmlist; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
+procedure TCgMPSel.a_op_const_reg_reg_checkoverflow(list: tasmlist; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister; setflags: boolean; var ovloc: tlocation);
 var
 var
   tmpreg1: tregister;
   tmpreg1: tregister;
 begin
 begin
@@ -1220,7 +1220,7 @@ end;
 
 
 {*************** compare instructructions ****************}
 {*************** compare instructructions ****************}
 
 
-procedure TCgMPSel.a_cmp_const_reg_label(list: tasmlist; size: tcgsize; cmp_op: topcmp; a: aint; reg: tregister; l: tasmlabel);
+procedure TCgMPSel.a_cmp_const_reg_label(list: tasmlist; size: tcgsize; cmp_op: topcmp; a: tcgint; reg: tregister; l: tasmlabel);
 var
 var
   tmpreg: tregister;
   tmpreg: tregister;
 begin
 begin
@@ -1461,7 +1461,7 @@ end;
 
 
 { ************* concatcopy ************ }
 { ************* concatcopy ************ }
 
 
-procedure TCgMPSel.g_concatcopy_move(list: tasmlist; const Source, dest: treference; len: aint);
+procedure TCgMPSel.g_concatcopy_move(list: tasmlist; const Source, dest: treference; len: tcgint);
 var
 var
   paraloc1, paraloc2, paraloc3: TCGPara;
   paraloc1, paraloc2, paraloc3: TCGPara;
 begin
 begin
@@ -1488,7 +1488,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.g_concatcopy(list: tasmlist; const Source, dest: treference; len: aint);
+procedure TCgMPSel.g_concatcopy(list: tasmlist; const Source, dest: treference; len: tcgint);
 var
 var
   tmpreg1, hreg, countreg: TRegister;
   tmpreg1, hreg, countreg: TRegister;
   src, dst: TReference;
   src, dst: TReference;
@@ -1575,7 +1575,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TCgMPSel.g_concatcopy_unaligned(list: tasmlist; const Source, dest: treference; len: aint);
+procedure TCgMPSel.g_concatcopy_unaligned(list: tasmlist; const Source, dest: treference; len: tcgint);
 var
 var
   src, dst: TReference;
   src, dst: TReference;
   tmpreg1, countreg: TRegister;
   tmpreg1, countreg: TRegister;
@@ -1667,7 +1667,7 @@ begin
     Internalerror(200109191);
     Internalerror(200109191);
 
 
   make_global := False;
   make_global := False;
-  if (not current_module.is_unit) or
+  if (not current_module.is_unit) or create_smartlink or
     (procdef.owner.defowner.owner.symtabletype = globalsymtable) then
     (procdef.owner.defowner.owner.symtabletype = globalsymtable) then
     make_global := True;
     make_global := True;
 
 

+ 1 - 1
compiler/mips/ncpucnv.pas

@@ -156,7 +156,7 @@ begin
       s64real:
       s64real:
       begin
       begin
         hregister := cg.getfpuregister(current_asmdata.CurrAsmList, OS_F64);
         hregister := cg.getfpuregister(current_asmdata.CurrAsmList, OS_F64);
-        current_asmdata.asmlists[al_typedconsts].concat(tai_align.Create(const_align(8)));
+        new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l1.name,const_align(8));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
         current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
 
 
         { I got this constant from a test program (FK) }
         { I got this constant from a test program (FK) }

+ 47 - 16
compiler/msg/errore.msg

@@ -364,11 +364,14 @@ scan_w_multiple_main_name_overrides=02086_W_Overriding name of "main" procedure
 % name will be used.
 % name will be used.
 scanner_w_illegal_warn_identifier=02087_W_Illegal identifier "$1" for $WARN directive
 scanner_w_illegal_warn_identifier=02087_W_Illegal identifier "$1" for $WARN directive
 % Identifier is not known by a \var{\{\$WARN\}} compiler directive.
 % Identifier is not known by a \var{\{\$WARN\}} compiler directive.
+scanner_e_illegal_alignment_directive=02088_E_Illegal alignment directive
+% The alignment directive is not valid. Either the alignment type is not known or the alignment
+% value is not a power of two.
 % \end{description}
 % \end{description}
 #
 #
 # Parser
 # Parser
 #
 #
-# 03309 is the last used one
+# 03310 is the last used one
 #
 #
 % \section{Parser messages}
 % \section{Parser messages}
 % This section lists all parser messages. The parser takes care of the
 % This section lists all parser messages. The parser takes care of the
@@ -1382,6 +1385,9 @@ parser_e_no_class_constructor_in_helpers=03308_E_Class constructors aren't allow
 parser_e_inherited_not_in_record=03309_E_The use of "inherited" is not allowed in a record
 parser_e_inherited_not_in_record=03309_E_The use of "inherited" is not allowed in a record
 % As records don't suppport inheritance the use of "inherited" is prohibited for
 % As records don't suppport inheritance the use of "inherited" is prohibited for
 % these as well as for record helpers (in mode "Delphi" only).
 % these as well as for record helpers (in mode "Delphi" only).
+parser_e_no_types_in_local_anonymous_records=03310_E_Type declarations are not allowed in local or anonymous records
+% Records with types must be defined globally. Types cannot be defined inside records which are defined in a
+% procedure or function or in anonymous records.
 % \end{description}
 % \end{description}
 # Type Checking
 # Type Checking
 #
 #
@@ -1666,7 +1672,7 @@ type_w_pointer_to_signed=04082_W_Converting pointers to signed integers may resu
 % For example both \windows and \linux allow pointers in the range \$0000000 to \$bfffffff.
 % For example both \windows and \linux allow pointers in the range \$0000000 to \$bfffffff.
 % If you convert pointers to signed types, this can cause overflow and range check errors,
 % If you convert pointers to signed types, this can cause overflow and range check errors,
 % but also \$80000000 < \$7fffffff. This can cause random errors in code like "if p>q".
 % but also \$80000000 < \$7fffffff. This can cause random errors in code like "if p>q".
-type_interface_has_no_guid=04083_E_Interface type $1 has no valid GUID
+type_e_interface_has_no_guid=04083_E_Interface type $1 has no valid GUID
 % When applying the as-operator to an interface or class, the desired interface (i.e. the right operand of the
 % When applying the as-operator to an interface or class, the desired interface (i.e. the right operand of the
 % as-operator) must have a valid GUID.
 % as-operator) must have a valid GUID.
 type_e_invalid_objc_selector_name=04084_E_Invalid selector name "$1"
 type_e_invalid_objc_selector_name=04084_E_Invalid selector name "$1"
@@ -1748,7 +1754,7 @@ type_e_record_helper_must_extend_same_record=04102_E_Derived record helper must
 #
 #
 # Symtable
 # Symtable
 #
 #
-# 05080 is the last used one
+# 05084 is the last used one
 #
 #
 % \section{Symbol handling}
 % \section{Symbol handling}
 % This section lists all the messages that concern the handling of symbols.
 % This section lists all the messages that concern the handling of symbols.
@@ -1987,11 +1993,17 @@ sym_e_objc_formal_class_not_resolved=05080_E_No complete definition of the forma
 % of the class to be in scope.
 % of the class to be in scope.
 sym_e_interprocgoto_into_init_final_code_not_allowed=05081_E_Gotos into initialization or finalization blocks of units are not allowed
 sym_e_interprocgoto_into_init_final_code_not_allowed=05081_E_Gotos into initialization or finalization blocks of units are not allowed
 % Gotos into initialization or finalization blockse of units are not allowed.
 % Gotos into initialization or finalization blockse of units are not allowed.
-sym_e_external_class_name_mismatch1=05082=E_Invalid external name "$1" for formal class "$2"
-sym_e_external_class_name_mismatch2=05083=E_Complete class definition with external name "$1" here
+sym_e_external_class_name_mismatch1=05082_E_Invalid external name "$1" for formal class "$2"
+sym_e_external_class_name_mismatch2=05083_E_Complete class definition with external name "$1" here
 % When a class is declared using a formal external definition, the actual external
 % When a class is declared using a formal external definition, the actual external
 % definition (if any) must specify the same external name as the formal definition
 % definition (if any) must specify the same external name as the formal definition
 % (since both definitions refer to the same actual class type).
 % (since both definitions refer to the same actual class type).
+sym_w_library_overload=05084_W_Possible library conflict: symbol "$1" from library "$2" also found in library "$3"
+% Some OS do not have library specific namespaces, for those
+% OS, the function declared as "external 'libname' name 'funcname'",
+% the 'libname' part is only a hint, funcname might also be loaded
+% by another library. This warning appears if 'funcname' is used twice
+% with two different library names.
 %
 %
 % \end{description}
 % \end{description}
 #
 #
@@ -2293,7 +2305,7 @@ asmr_w_id_supposed_external=07072_W_Identifier $1 supposed external
 % problems at link time if the symbol is not defined anywhere.
 % problems at link time if the symbol is not defined anywhere.
 asmr_e_string_not_allowed_as_const=07073_E_Strings not allowed as constants
 asmr_e_string_not_allowed_as_const=07073_E_Strings not allowed as constants
 % Character strings are not allowed as constants.
 % Character strings are not allowed as constants.
-asmr_e_no_var_type_specified=07074_No type of variable specified
+asmr_e_no_var_type_specified=07074_E_No type of variable specified
 % The syntax expects a type idenfitifer after the dot, but
 % The syntax expects a type idenfitifer after the dot, but
 % none was found.
 % none was found.
 asmr_w_assembler_code_not_returned_to_text=07075_E_assembler code not returned to text section
 asmr_w_assembler_code_not_returned_to_text=07075_E_assembler code not returned to text section
@@ -2402,7 +2414,7 @@ asmr_w_useless_got_for_local=07110_W_@GOTPCREL is useless and potentially danger
 #
 #
 # Assembler/binary writers
 # Assembler/binary writers
 #
 #
-# 08020 is the last used one
+# 08022 is the last used one
 #
 #
 asmw_f_too_many_asm_files=08000_F_Too many assembler files
 asmw_f_too_many_asm_files=08000_F_Too many assembler files
 % With smartlinking enabled, there are too many assembler
 % With smartlinking enabled, there are too many assembler
@@ -2429,6 +2441,11 @@ asmw_e_first_defined_label=08018_E_Asm: First defined here
 asmw_e_invalid_register=08019_E_Asm: Invalid register $1
 asmw_e_invalid_register=08019_E_Asm: Invalid register $1
 asmw_e_16bit_32bit_not_supported=08020_E_Asm: 16 or 32 Bit references not supported
 asmw_e_16bit_32bit_not_supported=08020_E_Asm: 16 or 32 Bit references not supported
 asmw_e_64bit_not_supported=08021_E_Asm: 64 Bit operands not supported
 asmw_e_64bit_not_supported=08021_E_Asm: 64 Bit operands not supported
+asmw_e_bad_reg_with_rex=08022_E_Asm: AH,BH,CH or DH cannot be used in an instruction requiring REX prefix
+% x86_64 only: instruction encoding of this platform does not allow using
+% 8086 high byte registers (AH,BH,CH or DH) together with REX prefix in a single instruction.
+% The REX prefix is required whenever the instruction operand size is 64 bits, or
+% when it uses one of extended x86_64 registers (R8-R15 or XMM8-XMM15).
 
 
 #
 #
 # Executing linker/assembler
 # Executing linker/assembler
@@ -3218,6 +3235,7 @@ S*2Aas_Assemble using GNU AS
 **2So_Same as -Mtp
 **2So_Same as -Mtp
 **2Ss_Constructor name must be init (destructor must be done)
 **2Ss_Constructor name must be init (destructor must be done)
 **2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)
 **2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)
+**2Sy_@<pointer> returns a typed pointer, same as $T+
 **1s_Do not call assembler and linker
 **1s_Do not call assembler and linker
 **2sh_Generate script to link on host
 **2sh_Generate script to link on host
 **2st_Generate script to link on target
 **2st_Generate script to link on target
@@ -3276,19 +3294,27 @@ S*2Tlinux_Linux
 **2*_    with full path              v : Write fpcdebug.txt with
 **2*_    with full path              v : Write fpcdebug.txt with
 **2*_                                    lots of debugging info
 **2*_                                    lots of debugging info
 **2*_m<x>,<y> : Don't show messages numbered <x> and <y>
 **2*_m<x>,<y> : Don't show messages numbered <x> and <y>
-3*1W<x>_Target-specific options (targets)
-A*1W<x>_Target-specific options (targets)
-P*1W<x>_Target-specific options (targets)
-p*1W<x>_Target-specific options (targets)
+**1W<x>_Target-specific options (targets)
+3*2WA_Specify native type application (Windows)
+4*2WA_Specify native type application (Windows)
+A*2WA_Specify native type application (Windows)
 3*2Wb_Create a bundle instead of a library (Darwin)
 3*2Wb_Create a bundle instead of a library (Darwin)
 P*2Wb_Create a bundle instead of a library (Darwin)
 P*2Wb_Create a bundle instead of a library (Darwin)
 p*2Wb_Create a bundle instead of a library (Darwin)
 p*2Wb_Create a bundle instead of a library (Darwin)
-3*2WB_Create a relocatable image (Windows)
+A*2Wb_Create a bundle instead of a library (Darwin)
+4*2Wb_Create a bundle instead of a library (Darwin)
+3*2WB_Create a relocatable image (Windows, Symbian)
+3*2WBxxxx_Set image base to xxxx (Windows, Symbian)
+4*2WB_Create a relocatable image (Windows)
+4*2WBxxxx_Set image base to xxxx (Windows)
 A*2WB_Create a relocatable image (Windows, Symbian)
 A*2WB_Create a relocatable image (Windows, Symbian)
+A*2WBxxxx_Set image base to xxxx (Windows, Symbian)
 3*2WC_Specify console type application (EMX, OS/2, Windows)
 3*2WC_Specify console type application (EMX, OS/2, Windows)
+4*2WC_Specify console type application (EMX, OS/2, Windows)
 A*2WC_Specify console type application (Windows)
 A*2WC_Specify console type application (Windows)
 P*2WC_Specify console type application (Classic Mac OS)
 P*2WC_Specify console type application (Classic Mac OS)
 3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
 3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
+4*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
 A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
 A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
 3*2We_Use external resources (Darwin)
 3*2We_Use external resources (Darwin)
 4*2We_Use external resources (Darwin)
 4*2We_Use external resources (Darwin)
@@ -3297,20 +3323,25 @@ P*2We_Use external resources (Darwin)
 p*2We_Use external resources (Darwin)
 p*2We_Use external resources (Darwin)
 3*2WF_Specify full-screen type application (EMX, OS/2)
 3*2WF_Specify full-screen type application (EMX, OS/2)
 3*2WG_Specify graphic type application (EMX, OS/2, Windows)
 3*2WG_Specify graphic type application (EMX, OS/2, Windows)
+4*2WG_Specify graphic type application (EMX, OS/2, Windows)
 A*2WG_Specify graphic type application (Windows)
 A*2WG_Specify graphic type application (Windows)
 P*2WG_Specify graphic type application (Classic Mac OS)
 P*2WG_Specify graphic type application (Classic Mac OS)
 3*2Wi_Use internal resources (Darwin)
 3*2Wi_Use internal resources (Darwin)
+4*2Wi_Use internal resources (Darwin)
+A*2Wi_Use internal resources (Darwin)
 P*2Wi_Use internal resources (Darwin)
 P*2Wi_Use internal resources (Darwin)
 p*2Wi_Use internal resources (Darwin)
 p*2Wi_Use internal resources (Darwin)
+3*2WI_Turn on/off the usage of import sections (Windows)
+4*2WI_Turn on/off the usage of import sections (Windows)
+A*2WI_Turn on/off the usage of import sections (Windows)
 3*2WN_Do not generate relocation code, needed for debugging (Windows)
 3*2WN_Do not generate relocation code, needed for debugging (Windows)
+4*2WN_Do not generate relocation code, needed for debugging (Windows)
 A*2WN_Do not generate relocation code, needed for debugging (Windows)
 A*2WN_Do not generate relocation code, needed for debugging (Windows)
 3*2WR_Generate relocation code (Windows)
 3*2WR_Generate relocation code (Windows)
+4*2WR_Generate relocation code (Windows)
 A*2WR_Generate relocation code (Windows)
 A*2WR_Generate relocation code (Windows)
 P*2WT_Specify MPW tool type application (Classic Mac OS)
 P*2WT_Specify MPW tool type application (Classic Mac OS)
-3*2WX_Enable executable stack (Linux)
-A*2WX_Enable executable stack (Linux)
-p*2WX_Enable executable stack (Linux)
-P*2WX_Enable executable stack (Linux)
+**2WX_Enable executable stack (Linux)
 **1X_Executable options:
 **1X_Executable options:
 **2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux)
 **2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux)
 **2Xd_Do not use standard library search path (needed for cross compile)
 **2Xd_Do not use standard library search path (needed for cross compile)

+ 3048 - 0
compiler/msg/erroriu.msg

@@ -0,0 +1,3048 @@
+#
+#   This file is part of the Free Pascal Compiler
+#   Copyright (c) 1999-2009 by the Free Pascal Development team
+#
+#   Italian Language File for Free Pascal
+#   Contributed by Massimo Soricetti <notturno at quipo.it>
+#   Translation for FPC 2.4.2, april 16, 2011, Tolentino, Italy
+#
+#   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.
+#
+#
+# The constants are build in the following order:
+# <part>_<type>_<txtidentifier>
+#
+# <part> is the part of the compiler the message is used
+#   asmr_     assembler parsing
+#   asmw_     assembler writing/binary writers
+#   unit_     unit handling
+#   scan_     scanner
+#   parser_   parser
+#   type_     type checking
+#   general_  general info
+#   exec_     calls to assembler, external linker, binder
+#   link_     internal linker
+#
+# <type> the type of the message it should normally used for
+#   f_   fatal error
+#   e_   error
+#   w_   warning
+#   n_   note
+#   h_   hint
+#   i_   info
+#   l_   add linenumber
+#   u_   used
+#   t_   tried
+#   c_   conditional
+#   d_   debug message
+#   x_   executable informations
+#   o_   normal (e.g., "press enter to continue")
+#
+
+#
+# General
+#
+# 01023 is the last used one
+#
+# BeginOfTeX
+% \section{General compiler messages}
+% This section gives the compiler messages which are not fatal, but which
+% display useful information. The number of such messages can be
+% controlled with the various verbosity level \var{-v} switches.
+% \begin{description}
+general_t_compilername=01000_T_Compilatore: $1
+% When the \var{-vt} switch is used, this line tells you what compiler
+% is used.
+general_d_sourceos=01001_D_Sistema operativo del compilatore: $1
+% When the \var{-vd} switch is used, this line tells you what the source
+% operating system is.
+general_i_targetos=01002_I_Sistema operativo di destinazione: $1
+% When the \var{-vd} switch is used, this line tells you what the target
+% operating system is.
+general_t_exepath=01003_T_Path degli eseguibili: $1
+% When the \var{-vt} switch is used, this line tells you where the compiler
+% looks for its binaries.
+general_t_unitpath=01004_T_Path delle unit: $1
+% When the \var{-vt} switch is used, this line tells you where the compiler
+% looks for compiled units. You can set this path with the \var{-Fu} option.
+general_t_includepath=01005_T_Path degli include: $1
+% When the \var{-vt} switch is used, this line tells you where the compiler
+% looks for its include files (files used in \var{\{\$I xxx\}} statements).
+% You can set this path with the \var{-Fi} option.
+general_t_librarypath=01006_T_Path delle library: $1
+% When the \var{-vt} switch is used, this line tells you where the compiler
+% looks for the libraries. You can set this path with the \var{-Fl} option.
+general_t_objectpath=01007_T_Path dei file oggetto: $1
+% When the \var{-vt} switch is used, this line tells you where the compiler
+% looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
+% You can set this path with the \var{-Fo} option.
+general_i_abslines_compiled=01008_I_$1 righe compilate, $2 sec $3 min
+% When the \var{-vi} switch is used, the compiler reports the number
+% of lines compiled, and the time it took to compile them (real time,
+% not program time).
+general_f_no_memory_left=01009_F_Memoria esaurita
+% The compiler doesn't have enough memory to compile your program. There are
+% several remedies for this:
+% \begin{itemize}
+% \item If you're using the build option of the compiler, try compiling the
+% different units manually.
+% \item If you're compiling a huge program, split it up into units, and compile
+% these separately.
+% \item If the previous two don't work, recompile the compiler with a bigger
+% heap. (You can use the \var{-Ch} option for this, \seeo{Ch}.)
+% \end{itemize}
+general_i_writingresourcefile=01010_I_Scrivo il file di risorse della stringtable: $1
+% This message is shown when the compiler writes the Resource String Table
+% file containing all the resource strings for a program.
+general_e_errorwritingresourcefile=01011_E_Scrivo il file di risorse della stringtable: $1
+% This message is shown when the compiler encounters an error when writing
+% the Resource String Table file.
+#
+#
+# La finestra dei messaggi di Lazarus filtra via tutto quello che non comincia
+# con uno di questi cinque prefissi in inglese (o meglio Lazarus versione 0.9.30 lo fa) 
+# per cui, almeno per ora, ce li dobbiamo tenere :-(
+# Fanno eccezione 'Fatale' e 'Errore' perché sono identici alle versioni inglesi, ma più lunghi.
+#
+#
+general_i_fatal=01012_I_Fatale:
+% Prefix for Fatal Errors.
+general_i_error=01013_I_Errore:
+% Prefix for Errors.
+general_i_warning=01014_I_Warning:
+% Prefix for Warnings.
+general_i_note=01015_I_Note:
+% Prefix for Notes.
+general_i_hint=01016_I_Hint:
+% Prefix for Hints.
+general_e_path_does_not_exist=01017_E_Il path "$1" non esiste
+% The specified path does not exist.
+general_f_compilation_aborted=01018_F_Compilazione abortita
+% Compilation was aborted.
+general_text_bytes_code=01019_I_$1 byte di codice
+% The size of the generated executable code, in bytes.
+general_text_bytes_data=01020_I_$1 byte di dati
+% The size of the generated program data, in bytes.
+general_i_number_of_warnings=01021_I_$1 attenzioni date
+% Total number of warnings issued during compilation.
+general_i_number_of_hints=01022_I_$1 consigli dati
+% Total number of hints issued during compilation.
+general_i_number_of_notes=01023_I_$1 note date
+% Total number of notes issued during compilation.
+% \end{description}
+#
+# Scanner
+#
+# 02086 is the last used one
+#
+% \section{Scanner messages.}
+% This section lists the messages that the scanner emits. The scanner takes
+% care of the lexical structure of the pascal file, i.e. it tries to find
+% reserved words, strings, etc. It also takes care of directives and
+% conditional compilation handling.
+% \begin{description}
+scan_f_end_of_file=02000_F_Il file è terminato troppo presto
+% This typically happens in one of the following cases:
+% \begin{itemize}
+% \item The source file ends before the final \var{end.} statement. This
+% happens mostly when the \var{begin} and \var{end} statements aren't
+% balanced;
+% \item An include file ends in the middle of a statement.
+% \item A comment was not closed.
+% \end{itemize}
+scan_f_string_exceeds_line=02001_F_La stringa continua su più righe
+% There is a missing closing ' in a string, so it occupies
+% multiple lines.
+scan_f_illegal_char=02002_F_il carattere "$1" ($2) non è ammesso
+% An illegal character was encountered in the input file.
+scan_f_syn_expected=02003_F_Errore di sintassi: era atteso "$1" ma non "$2"
+% This indicates that the compiler expected a different token than
+% the one you typed. It can occur almost anywhere it is possible to make an error
+% against the Pascal language.
+scan_t_start_include_file=02004_TL_Inizio lettura del file include $1
+% When you provide the \var{-vt} switch, the compiler tells you
+% when it starts reading an included file.
+scan_w_comment_level=02005_W_Trovato commento di livello $1
+% When the \var{-vw} switch is used, then the compiler warns you if
+% it finds nested comments. Nested comments are not allowed in Turbo Pascal
+% and Delphi, and can be a possible source of errors.
+scan_n_ignored_switch=02008_N_Ignorato lo switch "$1" del compilatore
+% With \var{-vn} on, the compiler warns if it ignores a switch.
+scan_w_illegal_switch=02009_W_Lo switch "$1" del compilatore non è ammesso
+% You included a compiler switch (i.e. \var{\{\$... \}}) which the compiler
+% does not recognise.
+scan_w_switch_is_global=02010_W_Switch globale del compilatore fuori posto
+% The compiler switch is misplaced, and should be located at
+% the start of the unit or program.
+scan_e_illegal_char_const=02011_E_Costante carattere illegale
+% This happens when you specify a character with its ASCII code, as in
+% \var{\#96}, but the number is either illegal, or out of range.
+scan_f_cannot_open_input=02012_F_Impossibile aprire il file "$1"
+% \fpc cannot find the program or unit source file you specified on the
+% command line.
+scan_f_cannot_open_includefile=02013_F_Impossibile aprire il file include "$1"
+% \fpc cannot find the source file you specified in a \var{\{\$include ..\}}
+% statement.
+scan_e_illegal_pack_records=02015_E_L'allineamento dei record a "$1" è illegale
+% You are specifying \var{\{\$PACKRECORDS n\} } or \var{\{\$ALIGN n\} }
+% with an illegal value for \var{n}. For \$PACKRECORDS valid alignments are 1, 2, 4, 8, 16, 32, C,
+% NORMAL, DEFAULT, and for \$ALIGN valid alignments are 1, 2, 4, 8, 16, 32, ON,
+% OFF. Under mode MacPas \$ALIGN also supports MAC68K, POWER and RESET.
+scan_e_illegal_pack_enum=02016_E_La dimensione minima "$1" per gli enum è illegale
+% You are specifying the \var{\{\$PACKENUM n\}} with an illegal value for
+% \var{n}. Only 1,2,4, NORMAL or DEFAULT is valid here.
+scan_e_endif_expected=02017_E_$ENDIF previsto per $1 $2 definito in $3 riga $4
+% Your conditional compilation statements are unbalanced.
+scan_e_preproc_syntax_error=02018_E_Errore di sintassi nel parsing di una espressione di compilazione condizionale
+% There is an error in the expression following the \var{\{\$if ..\}}, \var{\{\$ifc \}}
+% or \var{\{\$setc \}} compiler directives.
+scan_e_error_in_preproc_expr=02019_E_Espressione di compilazione condizionale errata
+% There is an error in the expression following the \var{\{\$if ..\}}, $ifc or $setc compiler
+% directives.
+scan_w_macro_cut_after_255_chars=02020_W_Le macro sono limitate a 255 caratteri di lunghezza
+% The contents of macros cannot be longer than 255 characters.
+scan_e_endif_without_if=02021_E_ENDIF senza IF(N)DEF
+% Your \var{\{\$IFDEF ..\}} and {\{\$ENDIF\}} statements aren't balanced.
+scan_f_user_defined=02022_F_Definito dall'utente: $1
+% A user defined fatal error occurred. See also the \progref.
+scan_e_user_defined=02023_E_Definito dall'utente: $1
+% A user defined error occurred. See also the \progref.
+scan_w_user_defined=02024_W_Definito dall'utente: $1
+% A user defined warning occurred. See also the \progref.
+scan_n_user_defined=02025_N_Definito dall'utente: $1
+% A user defined note was encountered. See also the \progref.
+scan_h_user_defined=02026_H_Definito dall'utente: $1
+% A user defined hint was encountered. See also the \progref.
+scan_i_user_defined=02027_I_Definito dall'utente: $1
+% User defined information was encountered. See also the \progref.
+scan_e_keyword_cant_be_a_macro=02028_E_Ridefinire parole chiave nelle macro non ha alcun effetto
+% You cannot redefine keywords with macros.
+scan_f_macro_buffer_overflow=02029_F_Buffer overflow di una macro durante la lettura o l'espansione
+% Your macro or its result was too long for the compiler.
+scan_w_macro_too_deep=02030_W_L'espansione della macro ha superato profondità 16
+% When expanding a macro, macros have been nested to a level of 16.
+% The compiler will expand no further, since this may be a sign that
+% recursion is used.
+scan_w_wrong_styled_switch=02031_W_Gli switch del compilatore non funzionano nei commenti che iniziano con // 
+% Compiler switches should be in normal Pascal style comments.
+scan_d_handling_switch=02032_DL_Valutazione dello switch "$1"
+% When you set debugging info on (\var{-vd}) the compiler tells you when it
+% is evaluating conditional compile statements.
+scan_c_endif_found=02033_CL_ENDIF $1 trovato
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements.
+scan_c_ifdef_found=02034_CL_IFDEF $1 trovato, $2
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements.
+scan_c_ifopt_found=02035_CL_IFOPT $1 trovato, $2
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements.
+scan_c_if_found=02036_CL_IF $1 trovato, $2
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements.
+scan_c_ifndef_found=02037_CL_IFNDEF $1 trovato, $2
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements.
+scan_c_else_found=02038_CL_ELSE $1 trovato, $2
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements.
+scan_c_skipping_until=02039_CL_Sarà ignorato tutto fino a...
+% When you turn on conditional messages (\var{-vc}), the compiler tells you
+% where it encounters conditional statements, and whether it is skipping or
+% compiling parts.
+scan_i_press_enter=02040_I_Premere <Invio> per continuare
+% When the \var{-vi} switch is used, the compiler stops compilation
+% and waits for the \var{Enter} key to be pressed when it encounters
+% a \var{\{\$STOP\}} directive.
+scan_w_unsupported_switch=02041_W_Switch "$1" non supportato
+% When warnings are turned on (\var{-vw}), the compiler warns you about
+% unsupported switches. This means that the switch is used in Delphi or
+% Turbo Pascal, but not in \fpc.
+scan_w_illegal_directive=02042_W_La direttiva "$1" del compilatore è illegale
+% When warnings are turned on (\var{-vw}), the compiler warns you about
+% unrecognised switches. For a list of recognised switches, see the \progref.
+scan_t_back_in=02043_TL_Torno in $1
+% When you use the \var{-vt} switch, the compiler tells you when it has finished
+% reading an include file.
+scan_w_unsupported_app_type=02044_W_Tipo di programma "$1" non supportato
+% You get this warning if you specify an unknown application type
+% with the directive \var{\{\$APPTYPE\}}.
+scan_w_app_type_not_support=02045_W_APPTYPE non è supportato dall'OS destinazione
+% The \var{\{\$APPTYPE\}} directive is supported by certain operating systems only.
+scan_w_description_not_support=02046_W_DESCRIPTION non è supportata dall'OS di destinazione
+% The \var{\{\$DESCRIPTION\}} direttiva non è supportata da questo OS destinazione.
+scan_n_version_not_support=02047_N_VERSION non è supportata dall'OS di destinazione
+% The \var{\{\$VERSION\}} direttiva non è supportata da questo OS destinazione.
+scan_n_only_exe_version=02048_N_VERSION vale solo per exe o DLL
+% The \var{\{\$VERSION\}} direttiva è usata solo per sorgenti eseguibili o DLL.
+scan_w_wrong_version_ignored=02049_W_Formato errato per la direttiva VERSION "$1"
+% The \var{\{\$VERSION\}} directive format is majorversion.minorversion
+% where majorversion and minorversion are words.
+scan_e_illegal_asmmode_specifier=02050_E_Lo stile assembler "$1" è illegale
+% When you specify an assembler mode with the \var{\{\$ASMMODE xxx\}} directive,
+% the compiler didn't recognize the mode you specified.
+scan_w_no_asm_reader_switch_inside_asm=02051_W_Lo switch lettore ASM non è ammesso in una istruzione asm: "$1" sarà valido solo per la prossima
+% It is not possible to switch from one assembler reader to another
+% inside an assembler block. The new reader will be used for next
+% assembler statements only.
+scan_e_wrong_switch_toggle=02052_E_Interruttore switch errato, usare ON/OFF o +/-
+% You need to use ON or OFF or a + or - to toggle the switch.
+scan_e_resourcefiles_not_supported=02053_E_I resource file non sono supportati per questa destinazione
+% The target you are compiling for doesn't support resource files.
+scan_w_include_env_not_found=02054_W_La variabile ambiente "$1" per inclusione non esiste
+% The included environment variable can't be found in the environment; it will
+% be replaced by an empty string instead.
+scan_e_invalid_maxfpureg_value=02055_E_Valore illegale per limiti registri FPU
+% Valid values for this directive are 0..8 and NORMAL/DEFAULT.
+scan_w_only_one_resourcefile_supported=02056_W_Questa destinazione supporta solo un file di risorse
+% The target you are compiling for supports only one resource file.
+% The first resource file found is used, the others are discarded.
+scan_w_macro_support_turned_off=02057_W_Il supporto alle macro è disabilitato: macro ignorata 
+% A macro declaration has been found, but macro support is currently off,
+% so the declaration will be ignored. To turn macro support on compile with
+% -Sm on the command line or add \{\$MACRO ON\} in the source.
+scan_e_invalid_interface_type=02058_E_Tipo di interfaccia illegale. Sono ammessi COM, CORBA o DEFAULT.
+% The interface type that was specified is not supported.
+scan_w_appid_not_support=02059_W_APPID è supportata solo da PalmOS
+% The \var{\{\$APPID\}} directive is only supported for the PalmOS target.
+scan_w_appname_not_support=02060_W_APPNAME è supportata solo da PalmOS
+% The \var{\{\$APPNAME\}} directive is only supported for the PalmOS target.
+scan_e_string_exceeds_255_chars=02061_E_Le costanti stringa devono essere lunghe non più di 255 caratteri
+% A single string constant can contain at most 255 chars. Try splitting up the
+% string into multiple smaller parts and concatenate them with a + operator.
+scan_f_include_deep_ten=02062_F_La inclusione nidificata di file include ha superato profondità 16.
+% When including include files the files have been nested to a level of 16.
+% The compiler will expand no further, since this may be a sign that
+% recursion is used.
+scan_e_too_many_push=02063_F_Troppi livelli di PUSH
+% A maximum of 20 levels is allowed. This error occurs only in mode MacPas.
+scan_e_too_many_pop=02064_E_Trovata POP senza una PUSH precedente
+% This error occurs only in mode MacPas.
+scan_e_error_macro_lacks_value=02065_E_La variable "$1" in una macro o espressione a tempo di compilazione non ha valore
+% Thus the conditional compile time expression cannot be evaluated.
+scan_e_wrong_switch_toggle_default=02066_E_Interruttore switch errato, usare ON/OFF/DEFAULT o +/-/*
+% You need to use ON or OFF or DEFAULT or a + or - or * to toggle the switch.
+scan_e_mode_switch_not_allowed=02067_E_Lo switch modale "$1" non è ammesso qui
+% A mode switch has already been encountered, or, in the case of option -Mmacpas,
+% a mode switch occurs after UNIT.
+scan_e_error_macro_undefined=02068_E_La variabile o macro "$1" a tempo di compilazione non è definita.
+% Thus the conditional compile time expression cannot be evaluated. Only in mode MacPas.
+scan_e_utf8_bigger_than_65535=02069_E_Trovato un codice UTF-8 maggiore di 65535
+% \fpc handles UTF-8 strings internally as widestrings, i.e. the char codes are limited to 65535.
+scan_e_utf8_malformed=02070_E_Stringa UTF-8 malformata
+% The given string isn't a valid UTF-8 string.
+scan_c_switching_to_utf8=02071_C_Trovata firma UTF-8, uso codifica UTF-8
+% The compiler found a UTF-8 encoding signature (\$ef, \$bb, \$bf) at the beginning of a file,
+% so it interprets it as a UTF-8 file.
+scan_e_compile_time_typeerror=02072_E_Espressione a tempo di compilazione: previsto $1 ma trovato $2 in $3
+% The type-check of a compile time expression failed.
+scan_n_app_type_not_support=02073_N_APPTYPE non è supportato dall'OS di destinazione
+% The \var{\{\$APPTYPE\}} directive is supported by certain operating systems only.
+scan_e_illegal_optimization_specifier=02074_E_L'ottimizzazione specificata "$1" è illegale
+% You specified an optimization with the \var{\{\$OPTIMIZATION xxx\}} directive,
+% and the compiler didn't recognize the optimization you specified.
+scan_w_setpeflags_not_support=02075_W_SETPEFLAGS non è supportato dall'OS di destinazione
+% The \var{\{\$SETPEFLAGS\}} directive is not supported by the target OS.
+scan_w_imagebase_not_support=02076_W_IMAGEBASE non è supportato dall'OS di destinazione
+% The \var{\{\$IMAGEBASE\}} directive is not supported by the target OS.
+scan_w_minstacksize_not_support=02077_W_MINSTACKSIZE non è supportato dall'OS di destinazione
+% The \var{\{\$MINSTACKSIZE\}} directive is not supported by the target OS.
+scan_w_maxstacksize_not_support=02078_W_MAXSTACKSIZE non è supportato dall'OS di destinazione
+% The \var{\{\$MAXSTACKSIZE\}} directive non è supportato dall'OS di destinazione
+scanner_e_illegal_warn_state=02079_E_Stato illegale per la direttiva $WARN
+% Only ON and OFF can be used as state with a \var{\{\$WARN\}} compiler directive.
+scan_e_only_packset=02080_E_Valore illegale di set packing
+% Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameters.
+scan_w_pic_ignored=02081_W_Direttiva o switch PIC ignorati
+% Several targets, such as \windows, do not support nor need PIC,
+% so the PIC directive and switch are ignored.
+scan_w_unsupported_switch_by_target=02082_W_Lo switch "$1" non è supportato dalla destinazione scelta
+% Some compiler switches like \$E are not supported by all targets.
+scan_w_frameworks_darwin_only=02084_W_Le opzioni relative al framework sono supportate solo da Darwin/Mac OS X
+% Frameworks are not a known concept, or at least not supported by FPC,
+% on operating systems other than Darwin/Mac OS X.
+scan_e_illegal_minfpconstprec=02085_E_Precisione minima per costanti floating point "$1" illegale
+% Valid minimal precisions for floating point constants are default, 32 and 64,
+% which mean respectively minimal (usually 32 bit), 32 bit and 64 bit precision.
+scan_w_multiple_main_name_overrides=02086_W_Nome della procedura "main" ridefinito: il vecchio nome era "$1"
+% The name for the main entry procedure is specified more than once. Only the last
+% name will be used.
+% \end{description}
+#
+# Parser
+#
+# 03265 is the last used one
+#
+% \section{Parser messages}
+% This section lists all parser messages. The parser takes care of the
+% semantics of you language, i.e. it determines if your Pascal constructs
+% are correct.
+% \begin{description}
+parser_e_syntax_error=03000_E_Analisi - Errore di sintassi
+% An error against the Turbo Pascal language was encountered. This typically
+% happens when an illegal character is found in the source file.
+parser_e_dont_nest_interrupt=03004_E_Le procedure INTERRUPT non possono essere nidificate
+% An \var{INTERRUPT} procedure must be global.
+parser_w_proc_directive_ignored=03005_W_Tipo di procedura "$1" ignorato
+% The specified procedure directive is ignored by FPC programs.
+parser_e_no_overload_for_all_procs=03006_E_Non tutte le dichiarazioni di "$1" sono dichiarate con OVERLOAD
+% When you want to use overloading using the \var{OVERLOAD} directive, then
+% all declarations need to have \var{OVERLOAD} specified.
+parser_e_export_name_double=03008_E_Nome di funzione esportata "$1" duplicato
+% Exported function names inside a specific DLL must all be different.
+parser_e_export_ordinal_double=03009_E_Indice di funzione esportata $1 duplicato
+% Exported function indexes inside a specific DLL must all be different.
+parser_e_export_invalid_index=03010_E_Indice di funzione esportata non valido
+% DLL function index must be in the range \var{1..\$FFFF}.
+parser_w_parser_reloc_no_debug=03011_W_Impossibile creare info di debug per DLL o eseguibile $1, perché è rilocabile.
+% It is currently not possible to include debug information in a relocatable DLL.
+parser_w_parser_win32_debug_needs_WN=03012_W_Per generare info di debug per codice win32 bisogna disabilitare la rilocazione con l'ozione -WN
+% Stabs debug info is wrong for relocatable DLL or EXES. Use -WN
+% if you want to debug win32 executables.
+parser_e_constructorname_must_be_init=03013_E_Il nome del costruttore deve essere INIT
+% You are declaring an object constructor with a name which is not \var{init}, and the
+% \var{-Ss} switch is in effect. See the switch \seeo{Ss}.
+parser_e_destructorname_must_be_done=03014_E_Il nome del distruttore deve essere DONE
+% You are declaring an object destructor with a name which is not \var{done}, and the
+% \var{-Ss} switch is in effect. See the switch \seeo{Ss}.
+parser_e_proc_inline_not_supported=03016_E_Tipo di procedura INLINE non supportato
+% You tried to compile a program with C++ style inlining, and forgot to
+% specify the \var{-Si} option (\seeo{Si}). The compiler doesn't support C++
+% styled inlining by default.
+parser_w_constructor_should_be_public=03018_W_Il costruttore dovrebbe essere pubblico
+% Constructors must be in the 'public' part of an object (class) declaration.
+parser_w_destructor_should_be_public=03019_W_Il distruttore dovrebbe essere pubblico
+% Destructors must be in the 'public' part of an object (class) declaration.
+parser_n_only_one_destructor=03020_N_Una classe dovrebbe avere un solo distruttore
+% You can declare only one destructor for a class.
+parser_e_no_local_objects=03021_E_Non sono ammesse definizioni di classi locali
+% Classes must be defined globally. They cannot be defined inside a
+% procedure or function.
+parser_f_no_anonym_objects=03022_F_Non sono ammesse definizioni di classi anonime
+% An invalid object (class) declaration was encountered, i.e. an
+% object or class without methods that isn't derived from another object or
+% class. For example:
+% \begin{verbatim}
+% Type o = object
+%          a : longint;
+%          end;
+% \end{verbatim}
+% will trigger this error.
+parser_n_object_has_no_vmt=03023_N_L'oggetto "$1" non ha VMT
+% This is a note indicating that the declared object has no
+% virtual method table.
+parser_e_illegal_parameter_list=03024_E_Lista di parametri illegale
+% You are calling a function with parameters that are of a different type than
+% the declared parameters of the function.
+parser_e_wrong_parameter_size=03026_E_La chiamata a "$1" ha un numero errato di parametri
+% There is an error in the parameter list of the function or procedure --
+% the number of parameters is not correct.
+parser_e_overloaded_no_procedure=03027_E_L'identificatore overloaded "$1" non è una funzione
+% The compiler encountered a symbol with the same name as an overloaded
+% function, but it is not a function it can overload.
+parser_e_overloaded_have_same_parameters=03028_E_ Due o più funzioni overloaded hanno gli stessi parametri
+% You're declaring overloaded functions, but with the same parameter list.
+% Overloaded function must have at least 1 different parameter in their
+% declaration.
+parser_e_header_dont_match_forward=03029_E_La definizione della funzione è diversa dalla dichiarazione "$1"
+% You declared a function with the same parameters but
+% different result type or function modifiers.
+parser_e_header_different_var_names=03030_E_La definizione della funzione "$1" è diversa dalla dichiarazione: $2 cambia in $3
+% You declared the function in the \var{interface} part, or with the
+% \var{forward} directive, but defined it with a different parameter list.
+parser_n_duplicate_enum=03031_N_I valori nei tipi enumerazioni devono essere ascendenti
+% \fpc allows enumeration constructions as in C. Examine the following
+% two declarations:
+% \begin{verbatim}
+% type a = (A_A,A_B,A_E:=6,A_UAS:=200);
+% type a = (A_A,A_B,A_E:=6,A_UAS:=4);
+% \end{verbatim}
+% The second declaration would produce an error. \var{A\_UAS} needs to have a
+% value higher than \var{A\_E}, i.e. at least 7.
+parser_e_no_with_for_variable_in_other_segments=03033_E_Non si può usare With per variabili in un segmento diverso
+% With stores a variable locally on the stack,
+% but this is not possible if the variable belongs to another segment.
+parser_e_too_much_lexlevel=03034_E_Nidificazione di funzioni supera profondità 31
+% You can nest function definitions only 31 levels deep.
+parser_e_range_check_error=03035_E_Costanti fuori dalla gamma di valori ammessa
+% The constants are out of their allowed range.
+parser_w_range_check_error=03036_W_Costanti fuori dalla gamma di valori ammessa
+% The constants are out of their allowed range.
+parser_e_double_caselabel=03037_E_etichetta case duplicata
+% You are specifying the same label 2 times in a \var{case} statement.
+parser_e_case_lower_less_than_upper_bound=03038_E_Il limite superiore di un intervallo case è minore del limite inferiore
+% The upper bound of a \var{case} label is less than the lower bound and this
+% is useless.
+parser_e_type_const_not_possible=03039_E_costanti di tipo classe o interfaccia non sono permesse
+% You cannot declare a constant of type class or object.
+parser_e_no_overloaded_procvars=03040_E_Variabili di funzioni in funzioni overloaded non sono permesse
+% You are trying to assign an overloaded function to a procedural variable.
+% This is not allowed.
+parser_e_invalid_string_size=03041_E_La lunghezza di una stringa deve essere fra 1 e 255
+% The length of a shortstring in Pascal is limited to 255 characters. You are
+% trying to declare a string with length less than 1 or greater than 255.
+parser_w_use_extended_syntax_for_objects=03042_W_usate la sintassi estesa di NEW e DISPOSE per le istanze di oggetti
+% If you have a pointer \var{a} to an object type, then the statement
+% \var{new(a)} will not initialize the object (i.e. the constructor isn't
+% called), although space will be allocated. You should issue the
+% \var{new(a,init)} statement. This will allocate space, and call the
+% constructor of the object.
+parser_w_no_new_dispose_on_void_pointers=03043_W_non ha senso usare NEW o DISPOSE con puntatori senza tipo
+parser_e_no_new_dispose_on_void_pointers=03044_E_usare NEW o DISPOSE con puntatori senza tipo non è permesso
+% You cannot use \var{new(p)} or \var{dispose(p)} if \var{p} is an untyped pointer
+% because no size is associated to an untyped pointer.
+% It is accepted for compatibility in \var{TP} and \var{DELPHI} modes, but the
+% compiler will still warn you if it finds such a construct.
+parser_e_class_id_expected=03045_E_Qui era atteso un identificatore di classe (ma non c'è)
+% This happens when the compiler scans a procedure declaration that contains
+% a dot, i.e., an object or class method, but the type in front of the dot is not
+% a known type.
+parser_e_no_type_not_allowed_here=03046_E_gli identificatori di tipo non sono permessi qui
+% You cannot use a type inside an expression.
+parser_e_methode_id_expected=03047_E_Qui era atteso un identificatore di metodo (ma non c'è)
+% This identifier is not a method.
+% This happens when the compiler scans a procedure declaration that contains
+% a dot, i.e., an object or class method, but the procedure name is not a
+% procedure of this type.
+parser_e_header_dont_match_any_member=03048_E_La definizione della funzione non corrisponde a nessun metodo di questa classe "$1"
+% This identifier is not a method.
+% This happens when the compiler scans a procedure declaration that contains
+% a dot, i.e., an object or class method, but the procedure name is not a
+% procedure of this type.
+parser_d_procedure_start=03049_DL_procedura/funzione $1
+% When using the \var{-vd} switch, the compiler tells you when it starts
+% processing a procedure or function implementation.
+parser_e_error_in_real=03050_E_Costante in virgola mobile illegale
+% The compiler expects a floating point expression, and gets something else.
+parser_e_fail_only_in_constructor=03051_E_FAIL si può usare solo nei costruttori
+% You are using the \var{fail} keyword outside a constructor method.
+parser_e_no_paras_for_destructor=03052_E_I distruttori non possono avere parametri
+% You are declaring a destructor with a parameter list. Destructor methods
+% cannot have parameters.
+parser_e_only_class_methods_via_class_ref=03053_E_Solo i metodi di classe si possono chiamare riferendosi a una classe
+% This error occurs in a situation like the following:
+% \begin{verbatim}
+% Type :
+%    Tclass = Class of Tobject;
+%
+% Var C : TClass;
+%
+% begin
+% ...
+% C.free
+% \end{verbatim}
+% \var{Free} is not a class method and hence cannot be called with a class
+% reference.
+parser_e_only_class_methods=03054_E_Solo i metodi di classe si possono chiamare da altri metodi di classe
+% This is related to the previous error. You cannot call a method of an object
+% from inside a class method. The following code would produce this error:
+% \begin{verbatim}
+% class procedure tobject.x;
+%
+% begin
+%   free
+% \end{verbatim}
+% Because free is a normal method of a class it cannot be called from a class
+% method.
+parser_e_case_mismatch=03055_E_I tipi di un CASE e della sua costante non corrispondono
+% One of the labels is not of the same type as the case variable.
+parser_e_illegal_symbol_exported=03056_E_Simbolo non è esportabile da una libreria
+% You can only export procedures and functions when you write a library. You
+% cannot export variables or constants.
+parser_w_should_use_override=03057_W_Un metodo ereditato è nascosto da "$1"
+% A method that is declared \var{virtual} in a parent class, should be
+% overridden in the descendant class with the \var{override} directive. If you
+% don't specify the \var{override} directive, you will hide the parent method;
+% you will not override it.
+parser_e_nothing_to_be_overridden=03058_E_Non c'è un metodo "$1" da sovrascrivere nella classe padre
+% You are trying to \var{override} a virtual method of a parent class that does
+% not exist.
+parser_e_no_procedure_to_access_property=03059_E_Non sono forniti membri per accedere alla proprietà
+% You specified no \var{read} directive for a property.
+parser_w_stored_not_implemented=03060_W_Direttiva di proprietà stored non ancora implementata
+% This message is no longer used, as the \var{stored} directive has been implemented.
+parser_e_ill_property_access_sym=03061_E_Simbolo illegale per l'accesso alla proprietà
+% There is an error in the \var{read} or \var{write} directives for an array
+% property. When you declare an array property, you can only access it with
+% procedures and functions. The following code would cause such an error.
+% \begin{verbatim}
+% tmyobject = class
+%   i : integer;
+%   property x [i : integer]: integer read I write i;
+% \end{verbatim}
+%
+parser_e_cant_access_protected_member=03062_E_Qui non si può accedere alla parte protetta di un oggetto
+% Fields that are declared in a \var{protected} section of an object or class
+% declaration cannot be accessed outside the module where the object is
+% defined, or outside descendent object methods.
+parser_e_cant_access_private_member=03063_E_Qui non si può accedere alla parte privata di un oggetto
+% Fields that are declared in a \var{private} section of an object or class
+% declaration cannot be accessed outside the module where the class is
+% defined.
+parser_e_overridden_methods_not_same_ret=03066_E_I metodi overridden devono avere lo stesso tipo di ritorno: "$2" è overriden da "$1" che ritorna un tipo diverso
+% If you declare overridden methods in a class definition, they must
+% have the same return type.
+parser_e_dont_nest_export=03067_E_Funzioni dichiarate EXPORT non possono essere nidificate
+% You cannot declare a function or procedure within a function or procedure
+% that was declared as an export procedure.
+parser_e_methods_dont_be_export=03068_E_I metodi di classe non si possono dichiarare EXPORT
+% You cannot declare a procedure that is a method for an object as
+% \var{export}ed.
+parser_e_call_by_ref_without_typeconv=03069_E_I tipi nelle chiamate a funzioni var $1 devono corrispondere esattamente: passato "$2" ma serviva "$3"
+% When calling a function declared with \var{var} parameters, the variables in
+% the function call must be of exactly the same type. There is no automatic
+% type conversion.
+parser_e_no_super_class=03070_E_La classe non è una classe padre della classe corrente
+% When calling inherited methods, you are trying to call a method of a non-related
+% class. You can only call an inherited method of a parent class.
+parser_e_self_not_in_method=03071_E_SELF is only allowed in methods
+% You are trying to use the \var{self} parameter outside an object's method.
+% Only methods get passed the \var{self} parameters.
+parser_e_generic_methods_only_in_methods=03072_E_Solo i metodi si possono chiamare direttamente da altri metodi con l'identificatore della classe
+% A construction like \var{sometype.somemethod} is only allowed in a method.
+parser_e_illegal_colon_qualifier=03073_E_Uso illegale di ':'
+% You are using the format \var{:} (colon) 2 times on an expression that
+% is not a real expression.
+parser_e_illegal_set_expr=03074_E_Errore di intervallo in un costruttore di insiemi, oppure elemento di insieme duplicato
+% The declaration of a set contains an error. Either one of the elements is
+% outside the range of the set type, or two of the elements are in fact
+% the same.
+parser_e_pointer_to_class_expected=03075_E_Qui era atteso un puntatore a un elemento
+% You specified an illegal type in a \var{new} statement.
+% The extended syntax of \var{new} needs an object as a parameter.
+parser_e_expr_have_to_be_constructor_call=03076_E_L'espressione deve essere la chiamata di un costruttore
+% When using the extended syntax of \var{new}, you must specify the constructor
+% method of the object you are trying to create. The procedure you specified
+% is not a constructor.
+parser_e_expr_have_to_be_destructor_call=03077_E_L'espressione deve essere la chiamata di un distruttore
+% When using the extended syntax of \var{dispose}, you must specify the
+% destructor method of the object you are trying to dispose of.
+% The procedure you specified is not a destructor.
+parser_e_invalid_record_const=03078_E_Elementi del record disposti in ordine illegale
+% When declaring a constant record, you specified the fields in the wrong
+% order.
+parser_e_false_with_expr=03079_E_L'espressione deve essere un tipo classe o record
+% A \var{with} statement needs an argument that is of the type \var{record}
+% or \var{class}. You are using \var{with} on an expression that is not of
+% this type.
+parser_e_void_function=03080_E_Le procedure non possono ritornare un valore
+% In \fpc, you can specify a return value for a function when using
+% the \var{exit} statement. This error occurs when you try to do this with a
+% procedure. Procedures cannot return a value.
+parser_e_constructors_always_objects=03081_E_Costruttori e distruttori devono essere metodi
+% You're declaring a procedure as destructor or constructor, when the
+% procedure isn't a class method.
+parser_e_operator_not_overloaded=03082_E_L'operatore non ha overload per il tipo specificato
+% You're trying to use an overloaded operator when it is not overloaded for
+% this type.
+parser_e_no_such_assignment=03083_E_Impossibile fare l'overload dell'assegnazione fra tipi uguali
+% You cannot overload assignment for types
+% that the compiler considers as equal.
+parser_e_overload_impossible=03084_E_Overload di operatore impossibile
+% The combination of operator, arguments and return type are
+% incompatible.
+parser_e_no_reraise_possible=03085_E_Il rilancio di un'eccezione non è permesso qui
+% You are trying to re-raise an exception where it is not allowed. You can only
+% re-raise exceptions in an \var{except} block.
+parser_e_no_new_or_dispose_for_classes=03086_E_La sintassi estesa di new o dispose non è permessa per una classe
+% You cannot generate an instance of a class with the extended syntax of
+% \var{new}. The constructor must be used for that. For the same reason, you
+% cannot call \var{dispose} to de-allocate an instance of a class, the
+% destructor must be used for that.
+parser_e_procedure_overloading_is_off=03088_E_L'overloading di procedure è disabilitato
+% When using the \var{-So} switch, procedure overloading is switched off.
+% Turbo Pascal does not support function overloading.
+parser_e_overload_operator_failed=03089_E_Impossibile fare l'overload di questo operatore. Operatori overloadabili simili (se esistono): $1
+% You are trying to overload an operator which cannot be overloaded.
+% The following operators can be overloaded :
+% \begin{verbatim}
+%    +, -, *, /, =, >, <, <=, >=, is, as, in, **, :=
+% \end{verbatim}
+parser_e_comparative_operator_return_boolean=03090_E_L'operatore di confronto deve dare un valore booleano
+% When overloading the \var{=} operator, the function must return a boolean
+% value.
+parser_e_only_virtual_methods_abstract=03091_E_Solo i metodi virtuali possono essere astratti
+% You are declaring a method as abstract, when it is not declared to be
+% virtual.
+parser_f_unsupported_feature=03092_F_Uso di capacità non supportata!
+% You're trying to force the compiler into doing something it cannot do yet.
+parser_e_mix_of_classes_and_objects=03093_E_The mix of different kind of objects (class, object, interface, etc) isn't allowed
+% You cannot derive \var{objects}, \var{classes}, \var{cppclasses} and \var{interfaces} intertwined. E.g.
+% a class cannot have an object as parent and vice versa.
+parser_w_unknown_proc_directive_ignored=03094_W_Ignorata una direttiva di procedura sconosciuta: "$1"
+% The procedure directive you specified is unknown.
+parser_e_absolute_only_one_var=03095_E_ABSOLUTE si può associare solo a una variabile
+% You cannot specify more than one variable before the \var{absolute} directive.
+% Thus, the following construct will provide this error:
+% \begin{verbatim}
+% Var Z : Longint;
+%     X,Y : Longint absolute Z;
+% \end{verbatim}
+parser_e_absolute_only_to_var_or_const=03096_E_ABSOLUTE si può associare solo a variabili o costanti
+% The address of an \var{absolute} directive can only point to a variable or
+% constant. Therefore, the following code will produce this error:
+% \begin{verbatim}
+%   Procedure X;
+%
+%  var p : longint absolute x;
+% \end{verbatim}
+parser_e_initialized_only_one_var=03097_E_Si può inizializzare solo una variabile alla volta
+% You cannot specify more than one variable with a initial value in Delphi mode.
+parser_e_abstract_no_definition=03098_E_I metodi astratti non dovrebbero avere definizioni (il corpo funzione)
+% Abstract methods can only be declared, you cannot implement them. They
+% should be overridden by a descendant class.
+parser_e_overloaded_must_be_all_global=03099_E_Questa funzione overloaded non può essere locale: deve essere esportata
+% You are defining an overloaded function in the implementation part of a unit,
+% but there is no corresponding declaration in the interface part of the unit.
+parser_w_virtual_without_constructor=03100_W_In "$1" dei metodi virtuali sono usati senza costruttore
+% If you declare objects or classes that contain virtual methods, you need
+% to have a constructor and destructor to initialize them. The compiler
+% encountered an object or class with virtual methods that doesn't have
+% a constructor/destructor pair.
+parser_c_macro_defined=03101_CL_Macro definita: $1
+% When \var{-vc} is used, the compiler tells you when it defines macros.
+parser_c_macro_undefined=03102_CL_Macro non definita: $1
+% When \var{-vc} is used, the compiler tells you when it undefines macros.
+parser_c_macro_set_to=03103_CL_Macro $1 impostata a $2
+% When \var{-vc} is used, the compiler tells you what values macros get.
+parser_i_compiling=03104_I_Compilando $1
+% When you turn on information messages (\var{-vi}), the compiler tells you
+% what units it is recompiling.
+parser_u_parsing_interface=03105_UL_Interfaccia di analisi della unit $1
+% This tells you that the reading of the interface
+% of the current unit has started
+parser_u_parsing_implementation=03106_UL_Analisi dell'implementazione di $1
+% This tells you that the code reading of the implementation
+% of the current unit, library or program starts
+parser_d_compiling_second_time=03107_DL_Compilando $1 per la seconda volta
+% When you request debug messages (\var{-vd}) the compiler tells you what
+% units it recompiles for the second time.
+parser_e_no_property_found_to_override=03109_E_Non ci sono proprietà di cui fare l'override
+% You want to override a property of a parent class, when there is, in fact,
+% no such property in the parent class.
+parser_e_only_one_default_property=03110_E_E' permessa solo una proprietà di default
+% You specified a property as \var{Default}, but the class already has a
+% default property, and a class can have only one default property.
+parser_e_property_need_paras=03111_E_La proprietà di default deve essere una proprietà array
+% Only array properties of classes can be made \var{default} properties.
+parser_e_constructor_cannot_be_not_virtual=03112_E_Costruttori virtuali sono supportati solo nel modello di oggetto classe
+% You cannot have virtual constructors in objects. You can only have them
+% in classes.
+parser_e_no_default_property_available=03113_E_Nessuna proprietà di default disponibile
+% You are trying to access a default property of a class, but this class (or one of
+% its ancestors) doesn't have a default property.
+parser_e_cant_have_published=03114_E_La classe non può avere una sezione pubblicata, usare lo switch {$M+}
+% If you want a \var{published} section in a class definition, you must
+% use the \var{\{\$M+\}} switch, which turns on generation of type
+% information.
+parser_e_forward_declaration_must_be_resolved=03115_E_La dichiarazione della classe "$1" deve essere risolta qui per poterla usare come padre
+% To be able to use an object as an ancestor object, it must be defined
+% first. This error occurs in the following situation:
+% \begin{verbatim}
+%  Type ParentClas = Class;
+%       ChildClass = Class(ParentClass)
+%         ...
+%       end;
+% \end{verbatim}
+% where \var{ParentClass} is declared but not defined.
+parser_e_no_local_operator=03116_E_Operatori locali non supportati
+% You cannot overload locally, i.e. inside procedures or function
+% definitions.
+parser_e_proc_dir_not_allowed_in_interface=03117_E_Direttiva di procedura "$1" non è permessa nella sezione interfaccia
+% This procedure directive is not allowed in the \var{interface} section of
+% a unit. You can only use it in the \var{implementation} section.
+parser_e_proc_dir_not_allowed_in_implementation=03118_E_Direttiva di procedura "$1" non è permessa nella sezione implementazione
+% This procedure directive is not allowed in the \var{implementation} section of
+% a unit. You can only use it in the \var{interface} section.
+parser_e_proc_dir_not_allowed_in_procvar=03119_E_Direttiva di procedura "$1" non è permessa in dichiarazioni procvar
+% This procedure directive cannot be part of a procedural or function
+% type declaration.
+parser_e_function_already_declared_public_forward=03120_E_La funzione è già dichiarata Public/Forward "$1"
+% You will get this error if a function is defined as \var{forward} twice.
+% Or if it occurs in the \var{interface} section, and again as a \var{forward}
+% declaration in the \var{implementation} section.
+parser_e_not_external_and_export=03121_E_Non si possono usare sia EXPORT che EXTERNAL
+% These two procedure directives are mutually exclusive.
+parser_w_not_supported_for_inline=03123_W_"$1" non è ancora supportata all'interno di procedure o funzioni inline
+% Inline procedures don't support this declaration.
+parser_w_inlining_disabled=03124_W_Inlining disabilitato
+% Inlining of procedures is disabled.
+parser_i_writing_browser_log=03125_I_Scrivo il log del browser $1
+% When information messages are on, the compiler warns you when it
+% writes the browser log (generated with the \var{\{\$Y+ \}} switch).
+parser_h_maybe_deref_caret_missing=03126_H_Forse bisogna prima dereferenziare un puntatore
+% The compiler thinks that a pointer may need a dereference.
+parser_f_assembler_reader_not_supported=03127_F_Il lettore assembler scelto non è supportato
+% The selected assembler reader (with \var{\{\$ASMMODE xxx\}} is not
+% supported. The compiler can be compiled with or without support for a
+% particular assembler reader.
+parser_e_proc_dir_conflict=03128_E_Direttiva di procedura "$1" è in conflitto con altre direttive
+% You specified a procedure directive that conflicts with other directives.
+% For instance \var{cdecl} and \var{pascal} are mutually exclusive.
+parser_e_call_convention_dont_match_forward=03129_E_La convenzione di chiamata non corrisponde alla dichiarazione
+% This error happens when you declare a function or procedure with
+% e.g. \var{cdecl;} but omit this directive in the implementation, or vice
+% versa. The calling convention is part of the function declaration, and
+% must be repeated in the function definition.
+parser_e_property_cant_have_a_default_value=03131_E_La proprietà non può avere un valore di default
+% Set properties or indexed properties cannot have a default value.
+parser_e_property_default_value_must_const=03132_E_Il valore di default di una proprietà deve essere costante
+% The value of a \var{default} declared property must be known at compile
+% time. The value you specified is only known at run time. This happens
+% e.g. if you specify a variable name as a default value.
+parser_e_cant_publish_that=03133_E_Questo simbolo non può essere pubblicato, può essere solo una classe
+% Only class type variables can be in a \var{published} section of a class
+% if they are not declared as a property.
+parser_e_cant_publish_that_property=03134_E_This kind of property can't be published
+% Properties in a \var{published} section cannot be array properties.
+% They must be moved to public sections. Properties in a \var{published}
+% section must be an ordinal type, a real type, strings or sets.
+parser_e_empty_import_name=03136_E_E' necessario un nome di importazione
+% Some targets need a name for the imported procedure or a \var{cdecl} specifier.
+parser_e_division_by_zero=03138_E_Divisione per zero
+% A division by zero was encounted.
+parser_e_invalid_float_operation=03139_E_Operazione in virgola mobile non valida
+% An operation on two real type values produced an overflow or a division
+% by zero.
+parser_e_array_lower_less_than_upper_bound=03140_E_Limite superiore dell'intervallo minore del limite inferiore
+% The upper bound of an array declaration is less than the lower bound and this
+% is not possible.
+parser_w_string_too_long=03141_W_La stringa "$1" è più lunga di "$2"
+% The size of the constant string is larger than the size you specified in
+% string type definition.
+parser_e_string_larger_array=03142_E_La stringa è più lunga dell'array di char
+% The size of the constant string is larger than the size you specified in
+% the \var{Array[x..y] of char} definition.
+parser_e_ill_msg_expr=03143_E_Espressione illegale dopo la direttiva di messaggio
+% \fpc supports only integer or string values as message constants.
+parser_e_ill_msg_param=03144_E_I gestori di messaggi possono prendere un solo parametro, dichiarato come chiamata per riferimento
+% A method declared with the \var{message} directive as message handler
+% can take only one parameter which must be declared as call by reference.
+% Parameters are declared as call by reference using the \var{var}-directive.
+parser_e_duplicate_message_label=03145_E_Label di messaggio duplicata: "$1"
+% A label for a message is used twice in one object/class.
+parser_e_self_in_non_message_handler=03146_E_In metodi che gestiscono messaggi, il parametro Self può essere solo esplicito 
+% The \var{Self} parameter can only be passed explicitly to a method which
+% is declared as message handler.
+parser_e_threadvars_only_sg=03147_E_Le threadvars possono essere solo statiche o globali
+% Threadvars must be static or global; you can't declare a thread
+% local to a procedure. Local variables are always local to a thread,
+% because every thread has its own stack and local variables
+% are stored on the stack.
+parser_f_direct_assembler_not_allowed=03148_F_L'assembler diretto non è supportato dal formato binario di output
+% You can't use direct assembler when using a binary writer. Choose an
+% other output format or use another assembler reader.
+parser_w_no_objpas_use_mode=03149_W_Non caricare manualmente la unit OBJPAS, usare \{\$mode objfpc\} oppure \{\$mode delphi\}
+% You are trying to load the \file{ObjPas} unit manually from a \var{uses} clause.
+% This is not a good idea. Use the \var{\{\$MODE OBJFPC\}} or
+% \var{\{\$mode delphi\}} directives which load the unit automatically.
+parser_e_no_object_override=03150_E_OVERRIDE non si può usare negli oggetti
+% \var{Override} is not supported for objects, use \var{virtual} instead to override
+% a method of a parent object.
+parser_e_cant_use_inittable_here=03151_E_I Tipi di dato che richiedono inizializzazione/finalizzazione non si possono usare in record variant
+% Some data types (e.g. \var{ansistring}) need initialization/finalization
+% code which is implicitly generated by the compiler. Such data types
+% can't be used in the variant part of a record.
+parser_e_resourcestring_only_sg=03152_E_Le resourcestring possono essere solo o statiche o globali
+% Resourcestring cannot be declared local, only global or using the static
+% directive.
+parser_e_exit_with_argument_not__possible=03153_E_L'istruzione Exit con argomenti non si può usare qui
+% An exit statement with an argument for the return value can't be used here. This
+% can happen for example in \var{try..except} or \var{try..finally} blocks.
+parser_e_stored_property_must_be_boolean=03154_E_Il simbolo di storage deve essere di tipo boolean
+% If you specify a storage symbol in a property declaration, it must be a
+% boolean type.
+parser_e_ill_property_storage_sym=03155_E_Questo simbolo non è ammesso come simbolo di storage
+% You can't use this type of symbol as storage specifier in property
+% declaration. You can use only methods with the result type boolean,
+% boolean class fields or boolean constants.
+parser_e_only_publishable_classes_can_be_published=03156_E_Si possono pubblicare solo classi compilate nel modo $M+
+% A class-typed field in the published section of a class can only be a class which was
+% compiled in \var{\{\$M+\}} or which is derived from such a class. Normally
+% such a class should be derived from \var{TPersistent}.
+parser_e_proc_directive_expected=03157_E_Qui era attesa una direttiva di procedura (ma non c'è)
+% This error is triggered when you have a \var{\{\$Calling\}} directive without
+% a calling convention specified.
+% It also happens when declaring a procedure in a const block and you
+% used a ; after a procedure declaration which must be followed by a
+% procedure directive.
+% Correct declarations are:
+% \begin{verbatim}
+% const
+%   p : procedure;stdcall=nil;
+%   p : procedure stdcall=nil;
+% \end{verbatim}
+parser_e_invalid_property_index_value=03158_E_Il valore di un indice di proprietà deve essere un tipo ordinale
+% The value you use to index a property must be of an ordinal type, for
+% example an integer or enumerated type.
+parser_e_procname_to_short_for_export=03159_E_Il nome di procedura è troppo corto per poterlo esportare
+% The length of the procedure/function name must be at least 2 characters
+% long. This is because of a bug in dlltool which doesn't parse the .def
+% file correctly with a name of length 1.
+parser_e_dlltool_unit_var_problem=03160_E_Non si possono generare voci DEFFILE per la variabili globali di una unit
+parser_e_dlltool_unit_var_problem2=03161_E_Questo file deve essere compilato senza l'opzione -WD
+% You need to compile this file without the -WD switch on the
+% command line.
+parser_f_need_objfpc_or_delphi_mode=03162_F_Questo file deve essere compilato in modo ObjFpc (-S2) o Delphi (-Sd)
+% You need to use \var{\{\$MODE OBJFPC\}} or \var{\{\$MODE DELPHI\}} to compile this file.
+% Or use the corresponding command line switch, either \var{-Mobjfpc} or \var{-MDelphi.}
+parser_e_no_export_with_index_for_target=03163_E_Impossibile esportare con indice sulla piattaforma $1
+% Exporting of functions or procedures with a specified index is not
+% supported on this target.
+parser_e_no_export_of_variables_for_target=03164_E_L'esportazione di variabili non è supportata sulla piattaforma $1
+% Exporting of variables is not supported on this target.
+parser_e_improper_guid_syntax=03165_E_Sintassi GUID errata
+% The GUID indication does not have the proper syntax. It should be of the form
+% \begin{verbatim}
+% {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
+% \end{verbatim}
+% Where each \var{X} represents a hexadecimal digit.
+parser_w_interface_mapping_notfound=03168_W_Non c'è nessuna procedura di nome "$1" adatta per implementare $2.$3
+% The compiler cannot find a suitable procedure which implements the given method of an interface.
+% A procedure with the same name is found, but the arguments do not match.
+parser_e_interface_id_expected=03169_E_era atteso un identificatore di interfaccia (ma non c'è)
+% This happens when the compiler scans a \var{class} declaration that contains
+% \var{interface} function name mapping code like this:
+% \begin{verbatim}
+% type
+%   TMyObject = class(TObject, IDispatch)
+%     function IUnknown.QueryInterface=MyQueryInterface;
+%     ....
+% \end{verbatim}
+% and the \var{interface} before the dot is not listed in the inheritance list.
+parser_e_type_cant_be_used_in_array_index=03170_E_Il tipo "$1" non si può usare come indice di un array
+% Types like \var{qword} or \var{int64} aren't allowed as array index type.
+parser_e_no_con_des_in_interfaces=03171_E_Le interfacce non possono avere né costruttori né distruttori
+% Constructor and destructor declarations aren't allowed in interfaces.
+% In the most cases method \var{QueryInterface} of \var{IUnknown} can
+% be used to create a new interface.
+parser_e_no_access_specifier_in_interfaces=03172_E_Non si possono usare specificatori d'accesso in INTERFACES
+% The access specifiers \var{public}, \var{private}, \var{protected} and
+% \var{published} can't be used in interfaces because all methods
+% of an interface must be public.
+parser_e_no_vars_in_interfaces=03173_E_Una interfaccia non può contenere campi
+% Declarations of fields aren't allowed in interfaces. An interface
+% can contain only methods and properties with method read/write specifiers.
+parser_e_no_local_proc_external=03174_E_Le procedure locali non si possono dichiarare EXTERNAL
+% Declaring local procedures as external is not possible. Local procedures
+% get hidden parameters that will make the chance of errors very high.
+parser_w_skipped_fields_before=03175_W_Alcuni campi all'inizio di "$1" non sono stati inizializzati
+% In Delphi mode, not all fields of a typed constant record have to be
+% initialized, but the compiler warns you when it detects such situations.
+parser_e_skipped_fields_before=03176_E_Alcuni campi all'inizio di "$1" non sono stati inizializzati
+% In all syntax modes but Delphi mode, you can't leave some fields uninitialized
+% in the middle of a typed constant record.
+parser_w_skipped_fields_after=03177_W_Alcuni campi alla fine di "$1" non sono stati inizializzati
+% You can leave some fields at the end of a type constant record uninitialized
+% (The compiler will initialize them to zero automatically). This may be the cause
+% of subtle problems.
+parser_e_varargs_need_cdecl_and_external=03178_E_Trovata direttiva VarArgs (o '...' in MacPas) senza CDecl/CPPDecl/MWPascal ed External
+% The varargs directive (or the ``...'' varargs parameter in MacPas mode) can only be
+% used with procedures or functions that are declared with \var{external} and one of
+% \var{cdecl}, \var{cppdecl} and \var{mwpascal}. This functionality
+% is only supported to provide a compatible interface to C functions like printf.
+parser_e_self_call_by_value=03179_E_Self deve essere un normale parametro (chiamata per valore)
+% You can't declare \var{Self} as a const or var parameter, it must always be
+% a call-by-value parameter.
+parser_e_interface_has_no_guid=03180_E_L'interfaccia "$1" non ha identificazione di interfaccia
+% When you want to assign an interface to a constant, then the interface
+% must have a GUID value set.
+parser_e_illegal_field_or_method=03181_E_Identificatore di classe sconosciuto per campo o metodo "$1"
+% Properties must refer to a field or method in the same class.
+parser_w_proc_overriding_calling=03182_W_Forzatura della convenzione di chiamata "$1" a "$2"
+% There are two directives in the procedure declaration that specify a calling
+% convention. Only the last directive will be used.
+parser_e_no_procvarobj_const=03183_E_Costanti tipizzate del tipo "procedura di oggetto" possono solo essere inizializzate con NIL
+% You can't assign the address of a method to a typed constant which has a
+% 'procedure of object' type, because such a constant requires two addresses:
+% that of the method (which is known at compile time) and that of the object or
+% class instance it operates on (which cannot be known at compile time).
+parser_e_default_value_only_one_para=03184_E_I valori di default si possono assegnare solo a un parametro per volta
+% It is not possible to specify a default value for several parameters at once.
+% The following is invalid:
+% \begin{verbatim}
+% Procedure MyProcedure (A,B : Integer = 0);
+% \end{verbatim}
+% Instead, this should be declared as
+% \begin{verbatim}
+% Procedure MyProcedure (A : Integer = 0; B : Integer = 0);
+% \end{verbatim}
+parser_e_default_value_expected_for_para=03185_E_Parametro di default necessario per "$1"
+% The specified parameter requires a default value.
+parser_w_unsupported_feature=03186_W_Uso di capacità non supportata!
+% You're trying to force the compiler into doing something it cannot do yet.
+parser_h_c_arrays_are_references=03187_H_Array C sono passati per riferimento
+% Any array passed to a C function is passed
+% by a pointer (i.e. by reference).
+parser_e_C_array_of_const_must_be_last=03188_E_Array C di const devono essere l'ultimo argomento
+% You cannot add any other argument after an \var{array of const} for
+% \var{cdecl} functions, as the size pushed on stack for this argument is
+% not known.
+parser_h_type_redef=03189_H_Ridefinizione del tipo "$1"
+% This is an indicator that a previously declared type is
+% being redefined as something else. This may, or may not
+% be, a potential source of errors.
+parser_w_cdecl_has_no_high=03190_W_Le funzioni dichiarate cdecl non passano parametri impliciti extra
+% Functions declared with the \var{cdecl} modifier do not pass an extra implicit parameter.
+parser_w_cdecl_no_openstring=03191_W_Le funzioni dichiarate cdecl non supportano stringhe aperte
+% Openstring is not supported for functions that have the \var{cdecl} modifier.
+parser_e_initialized_not_for_threadvar=03192_E_Le variabili dichiarate come threadvar non si possono inizializzare
+% Variables declared as threadvar cannot be initialized with a default value.
+% The variables will always be filled with zero at the start of a new thread.
+parser_e_msg_only_for_classes=03193_E_La direttiva Message è permessa solo nelle classi
+% The message directive is only supported for Class types.
+parser_e_procedure_or_function_expected=03194_E_Era attesa una procedura o una funzione (ma non ci sono)
+% A class method can only be specified for procedures and functions.
+parser_e_illegal_calling_convention=03195_W_Direttiva di convenzione di chiamata "$1" ignorata
+% Some calling conventions are supported only by certain CPUs. I.e. most non-i386 ports support
+% only the standard ABI calling convention of the CPU.
+parser_e_no_object_reintroduce=03196_E_REINTRODUCE non si può usare negli oggetti
+% \var{reintroduce} is not supported for objects.
+parser_e_paraloc_only_one_para=03197_E_Ogni argomento deve avere la sua collocazione
+% If locations for arguments are specified explicitly as it is required by
+% some syscall conventions, each argument must have its own location. Things
+% like
+% \begin{verbatim}
+% procedure p(i,j : longint 'r1');
+% \end{verbatim}
+% aren't allowed.
+parser_e_paraloc_all_paras=03198_E_Ogni argomento deve avere una collocazione esplicita
+% If one argument has an explicit argument location, all arguments of a procedure
+% must have one.
+parser_e_illegal_explicit_paraloc=03199_E_Collocazione dell'argomento sconosciuta
+% The location specified for an argument isn't recognized by the compiler.
+parser_e_32bitint_or_pointer_variable_expected=03200_E_Qui era attesa una variabile intera o puntatore a 32 Bit (ma non c'è)
+% The libbase for MorphOS/AmigaOS can be given only as \var{longint}, \var{dword} or any pointer variable.
+parser_e_goto_outside_proc=03201_E_Le istruzioni Goto fra procedure diverse non sono permesse
+% It isn't allowed to use \var{goto} statements referencing labels outside the
+% current procedure. The following example shows the problem:
+% \begin{verbatim}
+% ...
+%   procedure p1;
+%   label
+%     l1;
+%
+%     procedure p2;
+%     begin
+%       goto l1; // This goto ISN'T allowed
+%     end;
+%
+%   begin
+%     p2
+%   l1:
+%   end;
+% ...
+%
+% \end{verbatim}
+parser_f_too_complex_proc=03202_F_Procedura troppo complessa, richiede troppi registri
+% Your procedure body is too long for the compiler. You should split the
+% procedure into multiple smaller procedures.
+parser_e_illegal_expression=03203_E_Espressione illegale
+% This can occur under many circumstances. Usually when trying to evaluate
+% constant expressions.
+parser_e_invalid_integer=03204_E_Espressione intera non valida
+% You made an expression which isn't an integer, and the compiler expects the
+% result to be an integer.
+parser_e_invalid_qualifier=03205_E_Qualificatore illegale
+% One of the following is happening :
+% \begin{itemize}
+% \item You're trying to access a field of a variable that is not a record.
+% \item You're indexing a variable that is not an array.
+% \item You're dereferencing a variable that is not a pointer.
+% \end{itemize}
+parser_e_upper_lower_than_lower=03206_E_Limite superiore di intervallo minore del limite inferiore
+% You are declaring a subrange, and the high limit is less than the low limit of
+% the range.
+parser_e_macpas_exit_wrong_param=03207_E_I parametri di Exit devono essere il nome della procedura in cui è usato
+% Non local exit is not allowed. This error occurs only in mode MacPas.
+parser_e_illegal_assignment_to_count_var=03208_E_Assegnazione illegale della variabile "$1" del ciclo for-loop 
+% The type of a \var{for} loop variable must be an ordinal type.
+% Loop variables cannot be reals or strings. You also cannot assign values to
+% loop variables inside the loop (Except in Delphi and TP modes). Use a while or
+% repeat loop instead if you need to do something like that, since those
+% constructs were built for that.
+parser_e_no_local_var_external=03209_E_Le variabili locali non si possono dichiarare EXTERNAL
+% Declaring local variables as external is not allowed. Only global variables can reference
+% external variables.
+parser_e_proc_already_external=03210_E_La procedura è già dichiarata EXTERNAL
+% The procedure is already declared with the EXTERNAL directive in an interface or
+% forward declaration.
+parser_w_implicit_uses_of_variants_unit=03211_W_Uso implicito della unit Variants
+% The Variant type is used in the unit without any used unit using the Variants unit. The
+% compiler has implicitly added the Variants unit to the uses list. To remove this warning
+% the Variants unit needs to be added to the uses statement.
+parser_e_no_static_method_in_interfaces=03212_E_Classi e metodi statici non si possono usare in INTERFACES
+% The specifier \var{class} and directive \var{static} can't be used in interfaces
+% because all methods of an interface must be public.
+parser_e_arithmetic_operation_overflow=03213_E_Overflow in una operazione aritmetica
+% An operation on two integer values produced an overflow.
+parser_e_protected_or_private_expected=03214_E_Qui erano attesi Protected oppure private (ma non ci sono)
+% \var{strict} can be only used together with \var{protected} or \var{private}.
+parser_e_illegal_slice=03215_E_SLICE non si può usare fuori dalla lista dei parametri
+% \var{slice} can be used only for arguments accepting an open array parameter.
+parser_e_dispinterface_cant_have_parent=03216_E_Una DISPINTERFACE non può avere una classe antenato
+% A DISPINTERFACE is a special type of interface which can't have a parent class.
+parser_e_dispinterface_needs_a_guid=03217_E_Una DISPINTERFACE deve avere un GUID
+% A DISPINTERFACE always needs an interface identification (a GUID).
+parser_w_overridden_methods_not_same_ret=03218_W_I metodi overloadati devono avere un tipo di ritorno analogo. Questo codice può crashare a causa di un bug nel parser Delphi ("$2" è overloadato da "$1" che ritorna un tipo diverso)
+% If you declare overridden methods in a class definition, they must
+% have the same return type. Some versions of Delphi allow you to change the
+% return type of interface methods, and even to change procedures into
+% functions, but the resulting code may crash depending on the types used
+% and the way the methods are called.
+parser_e_dispid_must_be_ord_const=03219_E_Gli ID Dispatch devono essere costanti ordinali
+% The \var{dispid} keyword must be followed by an ordinal constant (the dispid index).
+parser_e_array_range_out_of_bounds=03220_E_L'intervallo dell'array è troppo grande
+% Regardless of the size taken up by its elements, an array cannot have more
+% than high(ptrint) elements. Additionally, the range type must be a subrange
+% of ptrint.
+parser_e_packed_element_no_var_addr=03221_E_Non si può accedere agli indirizzi di elementi di array o campi di record bit packed
+% If you declare an array or record as \var{packed} in Mac Pascal mode
+% (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
+% be packed at the bit level. This means it becomes impossible to take addresses
+% of individual array elements or record fields. The only exception to this rule
+% is in the case of packed arrays elements whose packed size is a multple of 8 bits.
+parser_e_packed_dynamic_open_array=03222_E_Gli array dinamici non possono essere packed
+% Only regular (and possibly in the future also open) arrays can be packed.
+parser_e_packed_element_no_loop=03223_E_Non si possono usare elementi di array o campi di record bit packed come variabili di un loop
+% If you declare an array or record as \var{packed} in Mac Pascal mode
+% (or as \var{packed} in any mode with \var{\{\$bitpacking on\}}), it will
+% be packed at the bit level. For performance reasons, they cannot be
+% used as loop variables.
+parser_e_type_and_var_only_in_generics=03224_E_VAR e TYPE sono permessi solo nei generic
+% The usage of VAR and TYPE to declare new types inside an object is allowed only inside
+% generics.
+parser_e_cant_create_generics_of_this_type=03225_E_Questo tipo non può essere un generic
+% Only Classes, Objects, Interfaces and Records are allowed to be used as generic.
+parser_w_no_lineinfo_use_switch=03226_W_Non caricare la unit LINEINFO manualmente, Usare lo switch -gl del compilatore per farlo
+% Do not use the \file{lineinfo} unit directly, Use the \var{-gl} switch which
+% automatically adds the correct unit for reading the selected type of debugging
+% information. The unit that needs to be used depends on the type of
+% debug information used when compiling the binary.
+parser_e_no_funcret_specified=03227_E_La funzione "$1" deve dichiarare il tipo del suo risultato
+% The first time you declare a function you have to declare it completely,
+% including all parameters and the result type.
+parser_e_special_onlygenerics=03228_E_La specializzazione è supportata solo per i tipi generici
+% Types which are not generics can't be specialized.
+parser_e_no_generics_as_params=03229_E_Non si possono usare generici come parametri al momento della loro specializzazione
+% When specializing a generic, only non-generic types can be used as parameters.
+parser_e_type_object_constants=03230_E_Costanti di oggetti contenenti un VMT non sono permesse
+% If an object requires a VMT either because it contains a constructor or virtual methods,
+% it's not allowed to create constants of it. In TP and Delphi mode this is allowed
+% for compatibility reasons.
+parser_e_label_outside_proc=03231_E_Non è ammesso prendere l'indirizzo di label definite fuori della visibilità corrente
+% It isn't allowed to take the address of labels outside the
+% current procedure.
+parser_e_initialized_not_for_external=03233_E_Non si possono inizializzare variabili dichiarate external
+% Variables declared as external cannot be initialized with a default value.
+parser_e_illegal_function_result=03234_E_Il tipo del risultato della funzione è illegale
+% Some types like file types cannot be used as function result.
+parser_e_no_common_type=03235_E_Non esistono tipi in comune fra "$1" e "$2"
+% To perform an operation on integers, the compiler converts both operands
+% to their common type, which appears to be an invalid type. To determine the
+% common type of the operands, the compiler takes the minimum of the minimal values
+% of both types, and the maximum of the maximal values of both types. The common
+% type is then minimum..maximum.
+parser_e_no_generics_as_types=03236_E_Generici senza specializzazione non si possono usare come tipi per una variabile
+% Generics must be always specialized before being used as variable type.
+parser_w_register_list_ignored=03237_W_Le liste di registri sono ignorate per routines in assembler puro
+% When using pure assembler routines, the list with modified registers is ignored.
+parser_e_implements_must_be_class_or_interface=03238_E_La proprietà IMPLEMENTS deve avere un tipo classe o interfaccia
+% A property which implements an interface must be of type class or interface.
+parser_e_implements_must_have_correct_type=03239_E_Le proprietà IMPLEMENTS devono implementare interfacce del tipo giusto. Trovato tipo "$1" ma serviva "$2"
+% A property which implements an interface actually implements a different interface.
+parser_e_implements_must_read_specifier=03240_E_Le proprietà IMPLEMENTS devono avere specificatore di lettura
+% A property  which implements an interface must have at least a read specifier.
+parser_e_implements_must_not_have_write_specifier=03241_E_Le proprietà IMPLEMENTS non devono avere specificatore di scrittura
+% A property  which implements an interface may not have a write specifier.
+parser_e_implements_must_not_have_stored_specifier=03242_E_Le proprietà IMPLEMENTS non devono avere specificatore stored
+% A property  which implements an interface may not have a stored specifier.
+parser_e_implements_uses_non_implemented_interface=03243_E_Proprietà IMPLEMENTS usata su una interfaccia non implementata: "$1"
+% The interface which is implemented by a property is not an interface implemented by the class.
+parser_e_unsupported_real=03244_E_Questa destinazione non supporta la virgola mobile
+% The compiler parsed a floating point expression, but it is not supported.
+parser_e_class_doesnt_implement_interface=03245_E_La classe "$1" non implementa l'interfaccia "$2"
+% The delegated interface is not implemented by the class given in the implements clause.
+parser_e_class_implements_must_be_interface=03246_E_Il tipo usato da IMPLEMENTS deve essere un'interfaccia
+% The \var{implements} keyword must be followed by an interface type.
+parser_e_cant_export_var_different_name=03247_E_Non si possono esportare variabili con un nome diverso su questa destinazione, aggiungere il nome alla dichiarazione con la direttiva "export" (nome variabile: $1, nome di export dichiarato: $2)
+% On most targets it is not possible to change the name under which a variable
+% is exported inside the \var{exports} statement of a library.
+% In that case, you have to specify the export name at the point where the
+% variable is declared, using the \var{export} and \var{alias} directives.
+parser_e_weak_external_not_supported=03248_E_La destinazione attuale non supporta simboli esterni deboli 
+% A "weak external" symbol is a symbol which may or may not exist at (either static
+% or dynamic) link time. This concept may not be available (or implemented yet)
+% on the current cpu/OS target.
+parser_e_forward_mismatch=03249_E_La dichiarazione e l'implementazione del tipo non corrispondono
+% Classes and interfaces being defined forward must have the same type
+% when being implemented. A forward interface cannot be changed into a class.
+parser_n_ignore_lower_visibility=03250_N_Il metodo virtuale "$1" ha una visibilità minore ($2) della classe padre $3 ($4)
+% The virtual method overrides a method that is declared with a higher visibility. This might give
+% unexpected results. In case the new visibility is private than it might be that a call to inherited in a
+% new child class will call the higher visible method in a parent class and ignores the private method.
+parser_e_field_not_allowed_here=03251_E_I campi non possono comparire dopo la definizione di un metodo o di una proprietà: iniziare una nuova sezione di visibilità prima
+% Once a method or property has been defined in a class or object, you cannot define any fields afterwards
+% without starting a new visibility section (such as \var{public}, \var{private}, etc.). The reason is
+% that otherwise the source code can appear ambiguous to the compiler, since it is possible to use modifiers
+% such as \var{default} and \var{register} also as field names.
+parser_e_no_local_para_def=03252_E_I parametri non possono contenere definizioni di tipo locali. Usate una definizione di tipo a parte in un blocco type.
+% In Pascal, types are not considered to be identical simply because they are semantically equivalent.
+% Two variables or parameters are only considered to be of the same type if they refer to the
+% same type definition.
+% As a result, it is not allowed to define new types inside parameter lists, because then it is impossible to
+% refer to the same type definition in the procedure headers of the interface and implementation of a unit
+% (both procedure headers would define a separate type). Keep in mind that expressions such as
+% ``file of byte'' or ``string[50]'' also define a new type.
+parser_e_abstract_and_sealed_conflict=03253_E_Conflitto fra ABSTRACT e SEALED
+% ABSTRACT and SEALED cannot be used together in one declaration
+parser_e_sealed_descendant=03254_E_Non posso creare discendenti dalla classe "$1", perché è SEALED
+% Sealed means that class cannot be derived by another class.
+parser_e_sealed_class_cannot_have_abstract_methods=03255_E_Le classi SEALED non possono avere metodi ABSTRACT
+% Sealed means that class cannot be derived. Therefore no one class is able to override an abstract method in a sealed class.
+parser_e_only_virtual_methods_final=03256_E_Solo i metodi virtuali possono essere final
+% You are declaring a method as final, when it is not declared to be
+% virtual.
+parser_e_final_can_no_be_overridden=03257_E_I metodi final non si possono overloadare: "$1"
+% You are trying to \var{override} a virtual method of a parent class that does
+% not exist.
+parser_e_invalid_enumerator_identifier=03259_E_Identificatore di enumeratore non valido: "$1"
+% Only "MoveNext" and "Current" enumerator identifiers are supported.
+parser_e_enumerator_identifier_required=03260_E_E' necessario un identificatore di enumeratore
+% "MoveNext" or "Current" identifier must follow the \var{enumerator} modifier.
+parser_e_enumerator_movenext_is_not_valid=03261_E_Il metodo pattern enumerator MoveNext non è valido. Il metodo deve essere una funzione con tipo di ritorno boolean e senza argomenti.
+% "MoveNext" enumerator pattern method must be a function with Boolean return type and no required arguments
+parser_e_enumerator_current_is_not_valid=03262_E_La proprietà del pattern enumerator Current non è valida. La proprietà deve avere un getter.
+% "Current" enumerator pattern property must have a getter
+parser_e_only_one_enumerator_movenext=03263_E_E' permesso un solo metodo enumerator MoveNext per classe/oggetto
+% Class or Object can have only one enumerator MoveNext declaration.
+parser_e_only_one_enumerator_current=03264_E_E' permessa una sola proprietà enumerator Current per classe/oggetto
+% Class or Object can have only one enumerator Current declaration.
+parser_e_for_in_loop_cannot_be_used_for_the_type=03265_E_Non si possono usare for in loop per il tipo "$1"
+% For in loop can be used not for all types. For example it cannot be used for the enumerations with jumps.
+% \end{description}
+#
+# Type Checking
+#
+# 04087 is the last used one
+#
+% \section{Type checking errors}
+% This section lists all errors that can occur when type checking is
+% performed.
+% \begin{description}
+type_e_mismatch=04000_E_Type mismatch
+% This can happen in many cases:
+% \begin{itemize}
+% \item The variable you're assigning to is of a different type than the
+% expression in the assignment.
+% \item You are calling a function or procedure with parameters that are
+% incompatible with the parameters in the function or procedure definition.
+% \end{itemize}
+type_e_incompatible_types=04001_E_Incompatible types: got "$1" expected "$2"
+% There is no conversion possible between the two types.
+% Another possiblity is that they are declared in different
+% declarations:
+% \begin{verbatim}
+% Var
+%    A1 : Array[1..10] Of Integer;
+%    A2 : Array[1..10] Of Integer;
+%
+% Begin
+%    A1:=A2; { This statement also gives this error. It
+%              is due to the strict type checking of Pascal }
+% End.
+% \end{verbatim}
+type_e_not_equal_types=04002_E_I tipi "$1" e "$2" devono essere uguali ma non lo sono
+% The types are not equal.
+type_e_type_id_expected=04003_E_Qui era atteso un identificatore di tipo (ma non c'è)
+% The identifier is not a type, or you forgot to supply a type identifier.
+type_e_variable_id_expected=04004_E_Qui era atteso un identificatore di variabile (ma non c'è)
+% This happens when you pass a constant to a routine (such as \var{Inc} var or \var{Dec})
+% when it expects a variable. You can only pass variables as arguments to these functions.
+type_e_integer_expr_expected=04005_E_Qui era attesa una espressione intera, invece c'è "$1"
+% The compiler expects an expression of type integer, but gets a different
+% type.
+type_e_boolean_expr_expected=04006_E_Qui era attesa una espressione booleana, invece c'è "$1"
+% The expression must be a boolean type. It should be return \var{True} or
+% \var{False}.
+type_e_ordinal_expr_expected=04007_E_Qui era attesa una espressione ordinale (ma non c'è)
+% The expression must be of ordinal type, i.e., maximum a \var{Longint}.
+% This happens, for instance, when you specify a second argument
+% to \var{Inc} or \var{Dec} that doesn't evaluate to an ordinal value.
+type_e_pointer_type_expected=04008_E_Qui era atteso un tipo puntatore, invece c'è "$1"
+% The variable or expression isn't of the type \var{pointer}. This
+% happens when you pass a variable that isn't a pointer to \var{New}
+% or \var{Dispose}.
+type_e_class_type_expected=04009_E_Qui era atteso un tipo classe, invece c'è "$1"
+% The variable or expression isn't of the type \var{class}. This happens
+% typically when
+% \begin{enumerate}
+% \item The parent class in a class declaration isn't a class.
+% \item An exception handler (\var{On}) contains a type identifier that
+% isn't a class.
+% \end{enumerate}
+type_e_cant_eval_constant_expr=04011_E_L'espressione da valutare non ritorna una costante
+% This error can occur when the bounds of an array you declared do
+% not evaluate to ordinal constants.
+type_e_set_element_are_not_comp=04012_E_Gli elementi dell'insieme non sono compatibili
+% You are trying to perform an operation on two sets, when the set element types
+% are not the same. The base type of a set must be the same when taking the
+% union.
+type_e_set_operation_unknown=04013_E_questa operazione non è implementata per gli insiemi
+% several binary operations are not defined for sets.
+% These include: \var{div}, \var{mod}, \var{**}, \var{>=} and \var{<=}.
+% The last two may be  defined for sets in the future.
+type_w_convert_real_2_comp=04014_W_Conversione automatica di tipo da virgola mobile a COMP (che è un tipo intero)
+% An implicit type conversion from a real type to a \var{comp} is
+% encountered. Since \var{comp} is a 64 bit integer type, this may indicate
+% an error.
+type_h_use_div_for_int=04015_H_L'operatore di divisione fra tipi interi è 'DIV' e non '/'
+% When hints are on, then an integer division with the '/' operator will
+% produce this message, because the result will then be of type real.
+type_e_strict_var_string_violation=04016_E_I tipi stringa non corrispondono, a causa dello switch $V+
+% When compiling in \var{\{\$V+\}} mode, the string you pass as a parameter
+% should be of the exact same type as the declared parameter of the procedure.
+type_e_succ_and_pred_enums_with_assign_not_possible=04017_E_Non si possono usare succ o pred su enums con assegnazione stile C
+% If you declare an enumeration type which has C-like assignments
+% in it, such as in the following:
+% \begin{verbatim}
+%   Tenum = (a,b,e:=5);
+% \end{verbatim}
+% then you cannot use the \var{Succ} or \var{Pred} functions with this enumeration.
+type_e_cant_read_write_type=04018_E_Le variabili di questo tipo non si possono leggere o scrivere da file direttamente
+% You are trying to \var{read} or \var{write} a variable from or to a
+% file of type text, which doesn't support that variable's type.
+% Only integer types, reals, pchars and strings can be read from or
+% written to a text file. Booleans can only be written to text files.
+type_e_no_readln_writeln_for_typed_file=04019_E_Non si possono usare readln o writeln su file che non sono di tipo testo
+% \var{readln} and \var{writeln} are only allowed for text files.
+type_e_no_read_write_for_untyped_file=04020_E_Non si possono usare read o write su file senza tipo.
+% \var{read} and \var{write} are only allowed for text or typed files.
+type_e_typeconflict_in_set=04021_E_Conflitto di tipo fra elementi dell'insieme
+% There is at least one set element which is of the wrong type, i.e. not of
+% the set type.
+type_w_maybe_wrong_hi_lo=04022_W_lo/hi(dword/qword) ritorna la word/dword inferiore/superiore
+% \fpc supports an overloaded version of \var{lo/hi} for \var{longint/dword/int64/qword}
+% which returns the lower/upper word/dword of the argument. \tp always uses
+% a 16 bit \var{lo/hi} which always returns bits 0..7 for \var{lo} and the
+% bits 8..15 for \var{hi}. If you want the \tp behavior you have
+% to type cast the argument to a \var{word} or \var{integer}.
+type_e_integer_or_real_expr_expected=04023_E_Qui era attesa una espressione intera o reale
+% The first argument to \var{str} must be a real or integer type.
+type_e_wrong_type_in_array_constructor=04024_E_Tipo "$1" errato nel costruttore dell'array
+% You are trying to use a type in an array constructor which is not
+% allowed.
+type_e_wrong_parameter_type=04025_E_Tipo incompatibile per l'argomento n. $1: trovato "$2", serviva "$3"
+% You are trying to pass an invalid type for the specified parameter.
+type_e_no_method_and_procedure_not_compatible=04026_E_Non si può assegnare un metodo a una variabile procedura, né una procedura a un puntatore a metodo
+% You can't assign a method to a procedure variable or a procedure to a
+% method pointer.
+type_e_wrong_math_argument=04027_E_Passata una costante illegale a una funzione matematica interna
+% The constant argument passed to a \var{ln} or \var{sqrt} function is out of
+% the definition range of these functions.
+type_e_no_addr_of_constant=04028_E_Non si può ottenere l'indirizzo di una espressione costante
+% It is not possible to get the address of a constant expression, because they
+% aren't stored in memory. You can try making it a typed constant. This error
+% can also be displayed if you try to pass a property to a var parameter.
+type_e_argument_cant_be_assigned=04029_E_A questo argomento non possono essere assegnati valori
+% Only expressions which can be on the left side of an
+% assignment can be passed as call by reference arguments.
+%
+% Remark: Properties can be used on the left side of an assignment,
+% nevertheless they cannot be used as arguments.
+type_e_cannot_local_proc_to_procvar=04030_E_Non si possono assegnare procedure/funzioni locali a variabili procedura
+% It's not allowed to assign a local procedure/function to a
+% procedure variable, because the calling convention of a local procedure/function is
+% different. You can only assign local procedure/function to a void pointer.
+type_e_no_assign_to_addr=04031_E_Non si possono assegnare valori a un indirizzo di memoria
+% It is not allowed to assign a value to an address of a variable, constant,
+% procedure or function. You can try compiling with -So if the identifier
+% is a procedure variable.
+type_e_no_assign_to_const=04032_E_Non si possono assegnare valori a variabili dichiarate const
+% It's not allowed to assign a value to a variable which is declared
+% as a const. This is normally a parameter declared as const. To allow
+% changing the value, pass the parameter by value, or a parameter by reference
+% (using var).
+type_e_array_required=04033_E_E' richiesto un tipo array
+% If you are accessing a variable using an index '[<x>]' then
+% the type must be an array. In FPC mode a pointer is also allowed.
+type_e_interface_type_expected=04034_Qui era atteso un tipo interfaccia, invece c'è "$1"
+% The compiler expected to encounter an interface type name, but got something else.
+% The following code would produce this error:
+% \begin{verbatim}
+% Type
+%   TMyStream = Class(TStream,Integer)
+% \end{verbatim}
+type_h_mixed_signed_unsigned=04035_H_Mescolare longword ed espressioni con segno dà un risultato a 64bit
+% If you divide (or calculate the modulus of) a signed expression by a longword (or vice versa),
+% or if you have overflow and/or range checking turned on and use an arithmetic
+% expression (+, -, *, div, mod) in which both signed numbers and longwords appear,
+% then everything has to be evaluated in 64-bit arithmetic which is slower than normal
+% 32-bit arithmetic. You can avoid this by typecasting one operand so it
+% matches the result type of the other one.
+type_w_mixed_signed_unsigned2=04036_W_In questo punto, mescolare espressioni con segno e tipi cardinali può provocare un errore di controllo range 
+% If you use a binary operator (and, or, xor) and one of
+% the operands is a longword while the other one is a signed expression, then,
+% if range checking is turned on, you may get a range check error because in
+% such a case both operands are converted to longword before the operation is
+% carried out. You can avoid this by typecasting one operand so it
+% matches the result type of the other one.
+type_e_typecast_wrong_size_for_assignment=04037_E_La conversione di tipo causa dimensioni diverse ($1 -> $2) nell'assegnazione
+% Type casting to a type with a different size is not allowed when the variable is
+% used in an assignment.
+type_e_array_index_enums_with_assign_not_possible=04038_E_Gli enum con assegnazione non si possono usare come indici di array
+% When you declared an enumeration type which has C-like
+% assignments, such as in the following:
+% \begin{verbatim}
+%   Tenum = (a,b,e:=5);
+% \end{verbatim}
+% you cannot use it as the index of an array.
+type_e_classes_not_related=04039_E_I tipi classe o oggetto "$1" e "$2" non sono correlati. Conversione di tipo impossibile. 
+% There is a typecast from one class or object to another while the class/object
+% are not related. This will probably lead to errors.
+type_w_classes_not_related=04040_W_I tipi classe "$1" e "$2" non sono correlati.
+% There is a typecast from one class to another while the classes
+% are not related. This will probably lead to errors.
+type_e_class_or_interface_type_expected=04041_E_Qui era atteso un tipo classe o interfaccia, invece c'è il tipo "$1"
+% The compiler expected a class or interface name, but got another type or identifier.
+type_e_type_is_not_completly_defined=04042_E_Il tipo "$1" non è completamente definito
+% This error occurs when a type is not complete: i.e. a pointer type which points to
+% an undefined type.
+type_w_string_too_long=04043_W_Il letterale stringa è troppo lungo per una short string (lunghezza maggiore di 255)
+% The size of the constant string, which is assigned to a shortstring,
+% is longer than the maximum size of the shortstring (255 characters).
+type_w_signed_unsigned_always_false=04044_W_A causa dei range diversi, il confronto è sempre FALSE
+% There is a comparison between an unsigned value and a signed constant which is
+% less than zero. Because of type promotion, the statement will always evaluate to
+% false. Explicitly typecast the constant to the correct range to avoid this problem.
+type_w_signed_unsigned_always_true=04045_W_A causa dei range diversi, il confronto è sempre TRUE
+% There is a comparison between an unsigned value and a signed constant which is
+% less than zero. Because of type promotion, the statement will always evaluate to
+% true. Explicitly typecast the constant to the correct range to avoid this problem.
+type_w_instance_with_abstract=04046_W_Costruzione della classe "$1" con metodo "$2" astratto
+% An instance of a class is created which contains non-implemented abstract
+% methods. This will probably lead to a runtime error 211 in the code if that
+% routine is ever called. All abstract methods should be overriden.
+type_h_in_range_check=04047_H_L'operando a sinistra dell'operatore IN dovrebbe avere la dimensione di un byte
+% The left operand of the \var{in} operator is not an ordinal or enumeration which fits
+% within 8 bits. This may lead to range check errors. The \var{in} operator
+% currently only supports a left operand which fits within a byte. In the case of
+% enumerations, the size of an element of an enumeration can be controlled with
+% the \var{\{\$PACKENUM\}} or \var{\{\$Zn\}} switches.
+type_w_smaller_possible_range_check=04048_W_Differenza nella dimensione dei tipi: possibili perdite di dati o errori di overflow
+% There is an assignment to a smaller type than the source type. This means that
+% this may cause a range-check error, or may lead to possible loss of data.
+type_h_smaller_possible_range_check=04049_H_Differenza nella dimensione dei tipi: possibili perdite di dati o errori di overflow
+% There is an assignment to a smaller type than the source type. This means that
+% this may cause a range-check error, or may lead to possible loss of data.
+type_e_cant_take_address_of_abstract_method=04050_E_Non si può prendere l'indirizzo di un metodo astratto
+% An abstract method has no body, so the address of an abstract method can't be taken.
+type_e_assignment_not_allowed=04051_E_Non si possono assegnare valori a parametri formali o ad array aperti
+% You are trying to assign a value to a formal (untyped var, const or out)
+% parameter, or to an open array.
+type_e_constant_expr_expected=04052_E_Qui era attesa una espressione costante
+% The compiler expects an constant expression, but gets a variable expression.
+type_e_operator_not_supported_for_types=04053_E_L'operazione "$1" non è possibile sui tipi "$2" e "$3"
+% The operation is not allowed for the supplied types.
+type_e_illegal_type_conversion=04054_E_La conversione dal tipo "$1" al tipo "$2" è illegale
+% When doing a type-cast, you must take care that the sizes of the variable and
+% the destination type are the same.
+type_h_pointer_to_longint_conv_not_portable=04055_H_La conversione fra ordinali e puntatori non è portabile
+% If you typecast a pointer to a longint (or vice-versa), this code will not compile
+% on a machine using 64 bits addressing.
+type_w_pointer_to_longint_conv_not_portable=04056_W_La conversione fra ordinali e puntatori non è portabile
+% If you typecast a pointer to an ordinal type of a different size (or vice-versa), this can
+% cause problems. This is a warning to help in finding the 32-bit specific code where cardinal/longint is used
+% to typecast pointers to ordinals. A solution is to use the ptrint/ptruint types instead.
+type_e_cant_choose_overload_function=04057_E_La funzione non ha alcun overload per parametri di questo tipo
+% You're calling overloaded functions with a parameter that doesn't correspond
+% to any of the declared function parameter lists. e.g. when you have declared
+% a function with parameters \var{word} and \var{longint}, and then you call
+% it with a parameter which is of type \var{integer}.
+type_e_illegal_count_var=04058_E_La variabile contatore del loop deve essere un tipo ordinale
+% The type of a \var{for} loop variable must be an ordinal type.
+% Loop variables cannot be reals or strings.
+type_w_double_c_varargs=04059_W_Conversione di costanti real a double per variabili argomento C: aggiungere un typecast esplicito per prevenirlo.
+% In C, constant real values are double by default. For this reason, if you
+% pass a constant real value to a variable argument part of a C function, FPC
+% by default converts this constant to double as well. If you want to prevent
+% this from happening, add an explicit typecast around the constant.
+type_e_class_or_cominterface_type_expected=04060_E_Qui era atteso un tipo interfaccia classe o COM, invece c'è il tipo "$1"
+% Some operators, such as the AS operator, are only applicable to classes or COM interfaces.
+type_e_no_const_packed_array=04061_E_Array packed costanti non sono ancora supportati
+% You cannot declare a (bit)packed array as a typed constant.
+type_e_got_expected_packed_array=04062_E_Tipo incompatibile: argomento n. $1 di tipo "$2", invece deve essere "(Bit)Packed Array"
+% The compiler expects a (bit)packed array as the specified parameter.
+type_e_got_expected_unpacked_array=04063_E_Tipo incompatibile: argomento n. $1 di tipo "$2", invece deve essere "(not packed) Array"
+% The compiler expects a regular (i.e., not packed) array as the specified parameter.
+type_e_no_packed_inittable=04064_E_Gli elementi di un array packed non possono essere di un tipo che deve essere inizializzato
+% Support for packed arrays of types that need initialization
+% (such as ansistrings, or records which contain ansistrings) is not yet implemented.
+type_e_no_const_packed_record=04065_E_Oggetti o record packed costanti non sono ancora supportati
+% You cannot declare a (bit)packed array as a typed constant at this time.
+type_w_untyped_arithmetic_unportable=04066_W_L'aritmetica "$1" su puntatori senza tipo non è portabile su {$T+}, si suggerisce un typecast
+% Addition/subtraction from an untyped pointer may work differently in \var{\{\$T+\}}.
+% Use a typecast to a typed pointer.
+type_e_cant_take_address_of_local_subroutine=04076_E_Non si può prendere l'indirizzo di una subroutine marcata come local
+% The address of a subroutine marked as local can't be taken.
+type_e_cant_export_local=04077_E_Una subroutine marcata come local non è esportabile fuori dalla unit
+% A subroutine marked as local can't be exported from a unit.
+type_e_not_automatable=04078_E_Il tipo "$1" non è automatizzabile
+% Only byte, integer, longint, smallint, currency, single, double, ansistring,
+% widestring, tdatetime, variant, olevariant, wordbool and all interfaces are automatable.
+type_h_convert_add_operands_to_prevent_overflow=04079_H_Convertire gli operandi a "$1" prima dell'addizione può evitare errori di overflow
+% Adding two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the addition.
+type_h_convert_sub_operands_to_prevent_overflow=04080_H_Convertire gli operandi a "$1" prima della sottrazione può evitare errori di overflow
+% Subtracting two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the subtraction.
+type_h_convert_mul_operands_to_prevent_overflow=04081_H_Convertire gli operandi a "$1" prima della moltiplicazione può evitare errori di overflow
+% Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the multiplication.
+type_w_pointer_to_signed=04082_W_Convertire puntatori in interi con segno può portare a confronti errati ed errori di range: meglio usare un tipo senza segno
+% The virtual address space on 32-bit machines runs from \$00000000 to \$ffffffff.
+% Many operating systems allow you to allocate memory above \$80000000.
+% For example both \windows and \linux allow pointers in the range \$0000000 to \$bfffffff.
+% If you convert pointers to signed types, this can cause overflow and range check errors,
+% but also \$80000000 < \$7fffffff. This can cause random errors in code like "if p>q".
+type_interface_has_no_guid=04083_E_Il tipo interfaccia $1 non ha un GUID valido
+% When applying the as-operator to an interface or class, the desired interface (i.e. the right operand of the
+% as-operator) must have a valid GUID.
+type_e_invalid_objc_selector_name=04084_E_Nome di selettore non valido
+% An Objective-C selector cannot be empty, must be a valid identifier or a single colon,
+% and if it contains at least one colon it must also end in one.
+type_e_expected_objc_method_but_got=04085_E_Qui era atteso un metodo Objective-C, invece c'è $1
+% A selector can only be created for Objective-C methods, not for any other kind
+% of procedure/function/method.
+type_e_expected_objc_method=04086_E_Qui era atteso un metodo Objective-C o un nome di un metodo costante
+% A selector can only be created for Objective-C methods, either by specifying
+% the name using a string constant, or by using an Objective-C method identifier
+% that is visible in the current scope.
+type_e_no_type_info=04087_E_Nessuna informazione sul tipo disponibile per questo tipo
+% Type information is not generated for some types, such as enumerations with gaps
+% in their value range (this includes enumerations whose lower bound is different
+% from zero).
+% \end{description}
+#
+# Symtable
+#
+# 05069 is the last used one
+#
+% \section{Symbol handling}
+% This section lists all the messages that concern the handling of symbols.
+% This means all things that have to do with procedure and variable names.
+% \begin{description}
+sym_e_id_not_found=05000_E_Identificatore "$1" non trovato
+% The compiler doesn't know this symbol. Usually happens when you misspell
+% the name of a variable or procedure, or when you forget to declare a
+% variable.
+sym_f_internal_error_in_symtablestack=05001_F_Errore interno del compilatore in SymTableStack()
+% An internal error occurred in the compiler; If you encounter such an error,
+% please contact the developers and try to provide an exact description of
+% the circumstances in which the error occurs.
+sym_e_duplicate_id=05002_E_Identificatore "$1" duplicato
+% The identifier was already declared in the current scope.
+sym_h_duplicate_id_where=05003_H_Identificatore già definito in $1 alla riga $2
+% The identifier was already declared in a previous scope.
+sym_e_unknown_id=05004_E_Identificatore "$1" sconosciuto
+% The identifier encountered has not been declared, or is used outside the
+% scope where it is defined.
+sym_e_forward_not_resolved=05005_E_Dichiarazione "$1" priva di implementazione
+% This can happen in two cases:
+% \begin{itemize}
+% \item You declare a function in the \var{interface} part, or
+% with a \var{forward} directive, but do not implement it.
+% \item You reference a type which isn't declared in the current \var{type}
+% block.
+% \end{itemize}
+sym_e_error_in_type_def=05007_E_Errore nella definizione del tipo
+% There is an error in your definition of a new array type.
+% One of the range delimiters in an array declaration is erroneous.
+% For example, \var{Array [1..1.25]} will trigger this error.
+sym_e_forward_type_not_resolved=05009_E_Tipo "$1" dichiarato ma non implementato
+% A symbol was forward defined, but no declaration was encountered.
+sym_e_only_static_in_static=05010_E_Al di fuori dei metodi o nei metodi statici si possono usare solo variabli statiche
+% A static method of an object can only access static variables.
+sym_f_type_must_be_rec_or_class=05012_F_Qui era atteso un tipo record o classe
+% The variable or expression isn't of the type \var{record} or \var{class}.
+sym_e_no_instance_of_abstract_object=05013_E_Non sono permesse istanze di classi o di oggetti con un metodo astratto
+% You are trying to generate an instance of a class which has an abstract
+% method that wasn't overridden.
+sym_w_label_not_defined=05014_W_Label "$1" non definita
+% A label was declared, but not defined.
+sym_e_label_used_and_not_defined=05015_E_Label "$1" usata ma non definita
+% A label was declared and used, but not defined.
+sym_e_ill_label_decl=05016_E_Dichiarazione di label illegale
+% This error should never happen; it occurs if a label is defined outside a
+% procedure or function.
+sym_e_goto_and_label_not_supported=05017_E_GOTO e LABEL non sono supportati (usare lo switch -Sg)
+% You must use the -Sg switch to compile a program which has \var{label}s
+% and \var{goto} statements. By default, \var{label} and \var{goto} aren't
+% supported.
+sym_e_label_not_found=05018_E_Label non trovata
+% A \var{goto label} was encountered, but the label wasn't declared.
+sym_e_id_is_no_label_id=05019_E_L'identificatore non è una label
+% The identifier specified after the \var{goto} isn't of type label.
+sym_e_label_already_defined=05020_E_Label già definita
+% You are defining a label twice. You can define a label only once.
+sym_e_ill_type_decl_set=05021_E_La dichiarazione del tipo di un elemento in un insieme è illegale
+% The declaration of a set contains an invalid type definition.
+sym_e_class_forward_not_resolved=05022_E_Classe "$1" dichiarata ma non implementata
+% You declared a class, but you did not implement it.
+sym_n_unit_not_used=05023_H_La unit "$1" non è usata in $2
+% The unit referenced in the \var{uses} clause is not used.
+sym_h_para_identifier_not_used=05024_H_Parametro "$1" non usato
+% The identifier was declared (locally or globally) but
+% was not used (locally or globally).
+sym_n_local_identifier_not_used=05025_N_Variabile locale "$1" non usata
+% You have declared, but not used, a variable in a procedure or function
+% implementation.
+sym_h_para_identifier_only_set=05026_H_Al parametro "$1" è assegnato un valore, ma poi non viene mai usato
+% The identifier was declared (locally or globally) and
+% assigned to, but is not used (locally or globally) after the assignment.
+sym_n_local_identifier_only_set=05027_N_La variabile locale "$1" è assegnata ma non viene mai usata
+% The variable in a procedure or function implementation is declared and
+% assigned to, but is not used after the assignment.
+sym_h_local_symbol_not_used=05028_H_Locale $1 "$2" non è mai usato
+% A local symbol is never used.
+sym_n_private_identifier_not_used=05029_N_Il campo privato "$1.$2" non viene mai usato
+% The indicated private field is defined, but is never used in the code.
+sym_n_private_identifier_only_set=05030_N_Il campo privato "$1.$2" è assegnato ma poi non viene mai usato
+% The indicated private field is declared and assigned to, but never read.
+sym_n_private_method_not_used=05031_N_Il metodo privato "$1.$2" non è mai usato
+% The indicated private method is declared but is never used in the code.
+sym_e_set_expected=05032_E_Qui era atteso un tipo insieme
+% The variable or expression is not of type \var{set}. This happens in an
+% \var{in} statement.
+sym_w_function_result_not_set=05033_W_Il valore di ritorno della funzione non sembra essere mai assegnato
+% You can get this warning if the compiler thinks that a function return
+% value is not set. This will not be displayed for assembler procedures,
+% or procedures that contain assembler blocks.
+sym_w_wrong_C_pack=05034_W_Il tipo "$1" non è allineato correttamente per il linguaggio C
+% Arrays with sizes not multiples of 4 will be wrongly aligned
+% for C structures.
+sym_e_illegal_field=05035_E_L'identificatore del campo di un record "$1" è sconosciuto
+% The field doesn't exist in the record/object definition.
+sym_w_uninitialized_local_variable=05036_W_La variabile locale "$1" non sembra essere inizializzata
+% This message is displayed if the compiler thinks that a variable will
+% be used (i.e. it appears in the right-hand side of an expression) when it
+% was not initialized first (i.e. appeared in the left-hand side of an
+% assignment).
+sym_w_uninitialized_variable=05037_W_La variabile "$1" non sembra essere inizializzata
+% This message is displayed if the compiler thinks that a variable will
+% be used (i.e. it appears in the right-hand side of an expression) when it
+% was not initialized first (i.e. appeared in the left-hand side of an
+% assignment).
+sym_e_id_no_member=05038_E_L'identificatore "$1" non identifica alcun membro
+% This error is generated when an identifier of a record,
+% field or method is accessed while it is not defined.
+sym_h_param_list=05039_H_Trovata dichiarazione: $1
+% You get this when you use the \var{-vh} switch.In the case of an overloaded procedure
+% not being found. Then all candidate overloaded procedures are
+% listed, with their parameter lists.
+sym_e_segment_too_large=05040_E_Elemento dati troppo grande
+% You get this when you declare a data element whose size exceeds the
+% prescribed limit (2 Gb on 80386+/68020+ processors).
+sym_e_no_matching_implementation_found=05042_E_Non ci sono implementazioni corrispondenti per il metodo di interfaccia "$1"
+% There was no matching method found which could implement the interface
+% method. Check argument types and result type of the methods.
+sym_w_deprecated_symbol=05043_W_Il simbolo "$1" è deprecato
+% This means that a symbol (a variable, routine, etc...) which is
+% declared as \var{deprecated} is used. Deprecated symbols may no longer
+% be available in newer versions of the unit / library. Use of this symbol
+% should be avoided as much as possible.
+sym_w_non_portable_symbol=05044_W_Il simbolo "$1" non è portabile
+% This means that a symbol (a variable, routine, etc...) which is
+% declared as \var{platform} is used. This symbol's value, use
+% and availability is platform specific and should not be used
+% if the source code must be portable.
+sym_w_non_implemented_symbol=05055_W_Il simbolo "$1" non è implementato
+% This means that a symbol (a variable, routine, etc...) which is
+% declared as \var{unimplemented} is used. This symbol is defined,
+% but is not yet implemented on this specific platform.
+sym_e_cant_create_unique_type=05056_E_Non si può creare un tipo univoco dal tipo fornito
+% Only simple types like ordinal, float and string types are supported when
+% redefining a type with \var{type newtype = type oldtype;}.
+sym_h_uninitialized_local_variable=05057_H_La variabile locale "$1" non sembra essere inizializzata
+% This message is displayed if the compiler thinks that a variable will
+% be used (i.e. it appears in the right-hand side of an expression) when it
+% was not initialized first (i.e. it did not appear in the left-hand side of an
+% assignment).
+sym_h_uninitialized_variable=05058_H_La variabile "$1" non sembra essere inizializzata
+% This message is displayed if the compiler thinks that a variable will
+% be used (i.e. it appears in the right-hand side of an expression) when it
+% was not initialized first (i.e. t did not appear in the left-hand side of an
+% assignment).
+sym_w_function_result_uninitialized=05059_W_La variabile risultato della funzione sembra non essere ancora stata assegnata
+% This message is displayed if the compiler thinks that the function result
+% variable will be used (i.e. it appears in the right-hand side of an expression)
+% before it is initialized (i.e. before it appeared in the left-hand side of an
+% assignment).
+sym_h_function_result_uninitialized=05060_H_La variabile risultato della funzione sembra non essere ancora stata assegnata
+% This message is displayed if the compiler thinks that the function result
+% variable will be used (i.e. it appears in the right-hand side of an expression)
+% before it is initialized (i.e. it appears in the left-hand side of an
+% assignment)
+sym_w_identifier_only_read=05061_W_La variabile "$1" è letta ma mai assegnata
+% You have read the value of a variable, but nowhere assigned a value to
+% it.
+sym_h_abstract_method_list=05062_H_Trovato metodo astratto: $1
+% When getting a warning about constructing a class/object with abstract methods
+% you get this hint to assist you in finding the affected method.
+sym_w_experimental_symbol=05063_W_Il simbolo "$1" è sperimentale
+% This means that a symbol (a variable, routine, etc...) which is
+% declared as \var{experimental} is used. Experimental symbols
+% might disappear or change semantics in future versions. Usage of this symbol
+% should be avoided as much as possible.
+sym_w_forward_not_resolved=05064_W_Dichiarazione "$1" non implementata, si assume che sia external
+% This happens if you declare a function in the \var{interface} of a unit in macpas mode,
+% but do not implement it.
+sym_w_library_symbol=05065_W_Il simbolo "$1" appartiene a una libreria
+% This means that a symbol (a variable, routine, etc...) which is
+% declared as \var{library} is used. Library symbols may not be
+% available in other libraries.
+sym_w_deprecated_symbol_with_msg=05066_W_Il simbolo "$1" è deprecato: "$2"
+% This means that a symbol (a variable, routine, etc...) which is
+% declared as \var{deprecated} is used. Deprecated symbols may no longer
+% be available in newer versions of the unit / library. Use of this symbol
+% should be avoided as much as possible.
+sym_e_no_enumerator=05067_E_Non c'è un enumeratore per il tipo "$1"
+% This means that compiler cannot find an apropriate enumerator to use in the for-in loop.
+% To create an enumerator you need to defind an operator enumerator or add a public or published 
+% GetEnumerator method to the class or object definition.
+sym_e_no_enumerator_move=05068_E_Non c'è un metodo "MoveNext" nell'enumeratore "$1"
+% This means that compiler cannot find a public MoveNext method with the Boolean return type in
+% the enumerator class or object definition.
+sym_e_no_enumerator_current=05069_E_Non c'è una proprietà "Current" nell'enumeratore "$1"
+% This means that compiler cannot find a public Current property in  the enumerator class or object
+% definition.
+% \end{description}
+#
+# Codegenerator
+#
+# 06049 is the last used one
+#
+% \section{Code generator messages}
+% This section lists all messages that can be displayed if the code
+% generator encounters an error condition.
+% \begin{description}
+cg_e_parasize_too_big=06009_E_La lista dei parametri è più grande di 65535 bytes
+% The I386 processor limits the parameter list to 65535 bytes. (The \var{RET}
+% instruction causes this.)
+cg_e_file_must_call_by_reference=06012_E_I tipi file devono essere parametri var
+% You cannot specify files as value parameters, i.e., they must always be
+% declared \var{var} parameters.
+cg_e_cant_use_far_pointer_there=06013_E_Usare un puntatore far non è permesso qui
+% Free Pascal doesn't support far pointers, so you cannot take the address of
+% an expression which has a far reference as a result. The \var{mem} construct
+% has a far reference as a result, so the following code will produce this
+% error:
+% \begin{verbatim}
+% var p : pointer;
+% ...
+% p:=@mem[a000:000];
+% \end{verbatim}
+cg_e_dont_call_exported_direct=06015_E_Le funzioni dichiarare EXPORT non possono essere chiamate
+% No longer in use.
+cg_w_member_cd_call_from_method=06016_W_Possibile chiamata illegale di un costruttore o distruttore
+% The compiler detected that a constructor or destructor is called within a
+% a method. This will probably lead to problems, since constructors / destructors
+% require parameters on entry.
+cg_n_inefficient_code=06017_N_Codice inefficiente
+% Your statement seems dubious to the compiler.
+cg_w_unreachable_code=06018_W_Codice irraggiungibile
+% You specified a construct which will never be executed. Example:
+% \begin{verbatim}
+% while false do
+%   begin
+%   {.. code ...}
+%   end;
+% \end{verbatim}
+cg_e_cant_call_abstract_method=06020_E_I metodi astratti non possono essere chiamati direttamente
+% You cannot call an abstract method directly. Instead, you must call an
+% overriding child method, because an abstract method isn't implemented.
+cg_d_register_weight=06027_DL_Il Registro $1 pesa $2 $3
+% Debugging message. Shown when the compiler considers a variable for
+% keeping in the registers.
+cg_d_stackframe_omited=06029_DL_Stack frame omesso
+% Some procedure/functions do not need a complete stack-frame, so it is omitted.
+% This message will be displayed when the {-vd} switch is used.
+cg_e_unable_inline_object_methods=06031_E_I metodi di oggetti e classi non possono essere inline
+% You cannot have inlined object methods.
+cg_e_unable_inline_procvar=06032_E_Chiamate procvar non possono essere inline
+% A procedure with a procedural variable call cannot be inlined.
+cg_e_no_code_for_inline_stored=06033_E_Non è stato memorizzato codice per la procedura inline
+% The compiler couldn't store code for the inline procedure.
+cg_e_can_access_element_zero=06035_E_Non si può accedere all'elemento zero di una ansi/wide/longstring, usare (set)length
+% You should use \var{setlength} to set the length of an ansi/wide/longstring
+% and \var{length} to get the length of such string type.
+cg_e_cannot_call_cons_dest_inside_with=06037_E_Non si possono chiamare costruttoro o distruttori all'interno di una clausola 'with'
+% Inside a \var{with} clause you cannot call a constructor or destructor for the
+% object you have in the \var{with} clause.
+cg_e_cannot_call_message_direct=06038_E_I metodi gestori di messaggi non possono essere chiamati direttamente
+% A message method handler method cannot be called directly if it contains an
+% explicit \var{Self} argument.
+cg_e_goto_inout_of_exception_block=06039_E_Non è permesso saltare da dentro a fuori un blocco di gestione delle eccezioni o viceversa
+% It is not allowed to jump in or outside of an exception block like \var{try..finally..end;}.
+% For example, the following code will produce this error:
+
+% \begin{verbatim}
+% label 1;
+%
+% ...
+%
+% try
+%    if not(final) then
+%      goto 1;   // this line will cause an error
+% finally
+%   ...
+% end;
+% 1:
+% ...
+% \end{verbatim}
+cg_e_control_flow_outside_finally=06040_E_Le istruzioni 'break', 'continue' ed 'exit' non sono ammesse in un blocco finally
+% It isn't allowed to use the control flow statements \var{break},
+% \var{continue} and \var{exit}
+% inside a finally statement. The following example shows the problem:
+% \begin{verbatim}
+% ...
+%   try
+%      p;
+%   finally
+%      ...
+%      exit;  // This exit ISN'T allowed
+%   end;
+% ...
+%
+% \end{verbatim}
+% If the procedure \var{p} raises an exception the finally block is
+% executed. If the execution reaches the exit, it's unclear what to do:
+% exit the procedure or search for another exception handler.
+cg_w_parasize_too_big=06041_W_La dimensione dei parametri eccede il limite massimo di alcune CPU
+% This indicates that you are declaring more than 64K of parameters, which
+% might not be supported on other processor targets.
+cg_w_localsize_too_big=06042_W_La dimensione delle variabili locali eccede il limite massimo di alcune CPU
+% This indicates that you are declaring more than 32K of local variables, which
+% might not be supported on other processor targets.
+cg_e_localsize_too_big=06043_E_La dimensione delle variabili locali è eccessiva
+% This indicates that you are declaring more than 32K of local variables, which
+% is not supported by this processor.
+cg_e_break_not_allowed=06044_E_BREAK non è permesso fuori da un loop
+% You're trying to use \var{break} outside a loop construction.
+cg_e_continue_not_allowed=06045_E_CONTINUE non è permesso fuori da un loop
+% You're trying to use \var{continue} outside a loop construction.
+cg_f_unknown_compilerproc=06046_F_Compilerproc "$1" sconosciuta. Verificate di stare usando la giusta libreria di runtime
+% The compiler expects that the runtime library contains certain subroutines. If you see this error
+% and you didn't change the runtime library code, it's very likely that the runtime library
+% you're using doesn't match the compiler in use. If you changed the runtime library this error means
+% that you removed a subroutine which the compiler needs for internal use.
+cg_f_unknown_system_type=06047_F_Il tipo di sistema "$1" non esiste. Verificate di stare usando la giusta libreria di runtime.
+% The compiler expects that the runtime library contains certain type definitions. If you see this error
+% and you didn't change the runtime library code, it's very likely that the runtime library
+% you're using doesn't match the compiler in use. If you changed the runtime library this error means
+% that you removed a type which the compiler needs for internal use.
+cg_h_inherited_ignored=06048_H_Ignorata una chiamata ereditata a un metodo astratto
+% This message appears only in Delphi mode when you call an abstract method
+% of a parent class via \var{inherited;}. The call is then ignored.
+cg_e_goto_label_not_found=06049_E_La label goto "$1" non è definita o è stata eliminata dalle ottimizzazioni
+% The label used in the goto definition is not defined or optimized away by the
+% unreachable code elemination.
+% \end{description}
+# EndOfTeX
+
+#
+# Assembler reader
+#
+# 07107 is the last used one
+#
+asmr_d_start_reading=07000_DL_Inizio analisi assembler stile $1
+% This informs you that an assembler block is being parsed
+asmr_d_finish_reading=07001_DL_Fine analisi assembler stile $1
+% This informs you that an assembler block has finished.
+asmr_e_none_label_contain_at=07002_E_Il pattern contiene @ ma non è una label
+% A identifier which isn't a label can't contain a @.
+asmr_e_building_record_offset=07004_E_Errore nella costruzione dell'offset di un record
+% There has an error occured while building the offset of a record/object
+% structure, this can happend when there is no field specified at all or
+% an unknown field identifier is used.
+asmr_e_offset_without_identifier=07005_E_usato OFFSET senza identificatore
+% You can only use OFFSET with an identifier. Other syntaxes aren't
+% supported
+asmr_e_type_without_identifier=07006_E_usato TYPE senza identificatore
+% You can only use TYPE with an identifier. Other syntaxes aren't
+% supported
+asmr_e_no_local_or_para_allowed=07007_E_Qui non si possono usare variabili o parametri locali
+% You can't use a local variable or parameter here, mostly because the
+% addressing of locals and parameters is done using the frame pointer register so the
+% address can't be obtained directly.
+asmr_e_need_offset=07008_E_Qui è necessario usare OFFSET
+% You need to use OFFSET <id> here to get the address of the identifier.
+asmr_e_need_dollar=07009_E_Qui è necessario usare $
+% You need to use $<id> here to get the address of the identifier.
+asmr_e_cant_have_multiple_relocatable_symbols=07010_E_Si può usare un solo simbolo rilocabile per ogni argomento
+% You can't have more than one relocatable symbol (variable/typed constant)
+% in one argument.
+asmr_e_only_add_relocatable_symbol=07011_E_Un simbolo rilocabile puà solo essere sommato
+% Relocatable symbols (variable/typed constant) can't be used with other
+% operators. Only addition is allowed.
+asmr_e_invalid_constant_expression=07012_E_Espressione costante non valida
+% There is an error in the constant expression.
+asmr_e_relocatable_symbol_not_allowed=07013_E_I simboli rilocabili non sono permessi qui
+% You can't use a relocatable symbol (variable/typed constant) here.
+asmr_e_invalid_reference_syntax=07014_E_Sintassi del reference non valida
+% There is an error in the reference.
+asmr_e_local_para_unreachable=07015_E_Impossibile raggiungere $1 da quel codice
+% You cannot read directly the value of a local variable or parameter
+% of a higher level procedure in assembler code (except for
+% local assembler code without parameter nor locals).
+asmr_e_local_label_not_allowed_as_ref=07016_E_Simboli o label locali non sono ammessi come reference
+% You can't use local symbols/labels as references
+asmr_e_wrong_base_index=07017_E_Uso errato dei registri base e indice
+% There is an error with the base and index register, they are
+% probably incorrect
+asmr_w_possible_object_field_bug=07018_W_Possibile errore nella gestione dei campi di un oggetto
+% Fields of objects or classes can be reached directly in normal or objfpc
+% modes but TP and Delphi modes treat the field name as a simple offset.
+asmr_e_wrong_scale_factor=07019_E_Specificato un fattore di scala errato
+% The scale factor given is wrong, only 1,2,4 and 8 are allowed
+asmr_e_multiple_index=07020_E_Uso di registri indice multipli
+% You are trying to use more than one index register
+asmr_e_invalid_operand_type=07021_E_Tipo di operando non valido
+% The operand type doesn't match with the opcode used
+asmr_e_invalid_string_as_opcode_operand=07022_E_Stringa non valida come operando dell'opcode: $1
+% The string specified as operand is not correct with this opcode
+asmr_w_CODE_and_DATA_not_supported=07023_W_@CODE e @DATA non supportati
+% @CODE and @DATA are unsupported and are ignored.
+asmr_e_null_label_ref_not_allowed=07024_E_Non sono ammessi riferimenti a label nulle
+asmr_e_expr_zero_divide=07025_E_Divisione per zero in una espressione asm costante
+% There is a division by zero in a constant expression
+asmr_e_expr_illegal=07026_E_Espressione illegale
+% There is an illegal expression in a constant expression
+asmr_e_escape_seq_ignored=07027_E_Ignorata sequenza di escape: $1
+% There is a C-styled string, but the escape sequence in the string
+% is unknown, and is therefore ignored
+asmr_e_invalid_symbol_ref=07028_E_Riferimento a simbolo non valido
+asmr_w_fwait_emu_prob=07029_W_Fwait può creare problemi di emulazione con emu387
+asmr_w_fadd_to_faddp=07030_W_$1 senza operandi tradotto in $1P
+asmr_w_enter_not_supported_by_linux=07031_W_L'istruzione ENTER non è supportata dal kernel Linux
+% ENTER instruction can generate a stack page fault that is not
+% caught correctly by the i386 Linux page handler.
+asmr_w_calling_overload_func=07032_W_Chiamata da assembler di una funzione overloaded
+% There is a call to an overloaded method in the assembler block,
+% this might be the sign there is a problem
+asmr_e_unsupported_symbol_type=07033_E_Tipo di simbolo non supportato per l'operando
+asmr_e_constant_out_of_bounds=07034_E_Costante fuori dai limiti
+asmr_e_error_converting_decimal=07035_E_Errore nella conversione decimale $1
+% A constant decimal value does not have the correct syntax
+asmr_e_error_converting_octal=07036_E_Errore nella conversione ottale $1
+% A constant octal value does not have the correct syntax
+asmr_e_error_converting_binary=07037_E_Errore nella conversione binaria $1
+% A constant binary value does not have the correct syntax
+asmr_e_error_converting_hexadecimal=07038_E_Errore nella conversione esadecimale $1
+% A constant hexadecimal value does not have the correct syntax
+asmr_h_direct_global_to_mangled=07039_H_$1 tradotto con $2
+asmr_w_direct_global_is_overloaded_func=07040_W_$1 è associato a una funzione overloaded
+asmr_e_cannot_use_SELF_outside_a_method=07041_E_Non si può usare SELF al di fuori di un metodo
+% There is a reference to the \var{self} symbol while it is not
+% allowed. \var{self} can only be referenced inside methods
+asmr_e_cannot_use_OLDEBP_outside_nested_procedure=07042_E_Non si può usare OLDEBP al di fuori di una procedura nidificata
+% There is a reference to the \var{oldebp} symbol while it is not
+% allowed. \var{oldebp} can only be referenced inside nested routines
+asmr_e_void_function=07043_W_Le procedure non possono ritornare alcun valore nel codice assembler
+% Trying to return a value while in a procedure. A procedure
+% does not have any return value
+asmr_e_SEG_not_supported=07044_E_SEG non supportato
+asmr_e_size_suffix_and_dest_dont_match=07045_E_Il suffisso di dimensione e la dimensione della destinazione non corrispondono
+% The register size and the opcode size suffix don't match. This is
+% probably an error in the assembler statement
+asmr_w_size_suffix_and_dest_dont_match=07046_W_Il suffisso di dimensione e la dimensione della destinazione non corrispondono
+% The register size and the opcode size suffix don't match. This is
+% probably an error in the assembler statement
+asmr_e_syntax_error=07047_E_Errore di sintassi nell'assembler
+% There is an assembler syntax error
+asmr_e_invalid_opcode_and_operand=07048_E_Combinazione di opcode e operandi non valida
+% The opcode cannot be used with this type of operand
+asmr_e_syn_operand=07049_E_Errore di sintassi nell'operando assembler
+asmr_e_syn_constant=07050_E_Errore di sintassi nella costante assembler
+asmr_e_invalid_string_expression=07051_E_Espressione stringa non valida
+asmr_w_const32bit_for_address=07052_W_costante con simbolo di indirizzo $1 che non entra in un puntatore
+% A constant expression represents an address which does not fit
+% into a pointer. The address is probably incorrect
+asmr_e_unknown_opcode=07053_E_Opcode $1 non riconosciuto
+% This opcode is not known
+asmr_e_invalid_or_missing_opcode=07054_E_Opcode non valido o mancante
+asmr_e_invalid_prefix_and_opcode=07055_E_Combinazione di prefisso e opcode: $1
+asmr_e_invalid_override_and_opcode=07056_E_Combinazione di override e opcode $1 non valida
+asmr_e_too_many_operands=07057_E_Troppi operandi su una sola riga
+% There are too many operands for this opcode. Check your
+% assembler syntax
+asmr_w_near_ignored=07058_W_NEAR ignorato
+asmr_w_far_ignored=07059_W_FAR ignorato
+asmr_e_dup_local_sym=07060_E_Simbolo locale $1 ignorato
+asmr_e_unknown_local_sym=07061_E_Simbolo locale $1 non definito
+asmr_e_unknown_label_identifier=07062_E_Identificatore label $1 non riconosciuto
+asmr_e_invalid_register=07063_E_Nome di registro non valido
+% There is an unknown register name used as operand.
+asmr_e_invalid_fpu_register=07064_E_Nome di registro virgola mobile non valido
+% There is an unknown register name used as operand.
+asmr_w_modulo_not_supported=07066_W_Modulo non supportato
+asmr_e_invalid_float_const=07067_E_Costante in virgola mobile $1 non valida
+% The floating point constant declared in an assembler block is
+% invalid.
+asmr_e_invalid_float_expr=07068_E_Espressione in virgola mobile non valida
+% The floating point expression declared in an assembler block is
+% invalid.
+asmr_e_wrong_sym_type=07069_E_Tipo di simbolo errato
+asmr_e_cannot_index_relative_var=07070_E_Non si possono indicizzare una variabile o un parametro locali con un registro
+% Trying to index using a base register a symbol which is already relative
+% to a register. This is not possible, and will probably lead to crashes.
+asmr_e_invalid_seg_override=07071_E_Espressione di override di segmento non valida
+asmr_w_id_supposed_external=07072_W_L'identificatore $1 non è definito: sarà considerato esterno
+% There is a reference to an undefined symbol. This will not result
+% in an error, since the symbol might be external, but may cause
+% problems at link time if the symbol is not defined anywhere.
+asmr_e_string_not_allowed_as_const=07073_E_Le stringhe non sono ammesse come costanti
+% Character strings are not allowed as constants.
+asmr_e_no_var_type_specified=07074_Nessun tipo di variabile specificato
+% The syntax expects a type identifier after the dot, but
+% none was found.
+asmr_w_assembler_code_not_returned_to_text=07075_E_Il codice assembler non è tornato nella sezione text
+% There was a directive in the assembler block to change sections,
+% but there is a missing return to the text section at the end
+% of the assembler block. This might cause errors during link time.
+asmr_e_not_directive_or_local_symbol=07076_E_$1 non è una direttiva né un simbolo locale
+% This symbol is unknown.
+asmr_w_using_defined_as_local=07077_E_Uso di un nome definito come label locale
+asmr_e_dollar_without_identifier=07078_E_Il token '$' è usato senza identificatori
+% A constant expression has an identifier which does not start with
+% the $ symbol.
+asmr_w_32bit_const_for_address=07079_W_Creata una costante a 32 bit per l'indirizzo
+% A constant was used as an address. This is probably an error,
+% since using absolute addresses will probably not work.
+asmr_n_align_is_target_specific=07080_N_.align è specifico per la destinazione: usare .balign oppure .p2align
+% Using the .align directive is platform specific, and its meaning will vary
+% from one platform to another.
+asmr_e_cannot_access_field_directly_for_parameters=07081_E_Non si può accedere direttamente dal parametro ai campi
+% You should load the parameter first into a register and then access the
+% fields using that register.
+asmr_e_cannot_access_object_field_directly=07082_E_Non si può accedere direttamente dalla classe/oggetto ai campi
+% You should load the self pointer first into a register and then access the
+% fields using the register as base. By default the self pointer is available
+% in the esi register on i386.
+asmr_e_unable_to_determine_reference_size=07083_E_Dimensione degli operandi non specificata ed impossibile da determinare
+% You should specify explicitly a size for the reference, because
+% the compiler is unable to determine what size (byte,word,dword,etc.) it
+% should use for the reference.
+asmr_e_cannot_use_RESULT_here=07084_E_Non si può usare RESULT in questa funzione
+% Some functions which return complex types cannot use the \var{result}
+% keyword.
+asmr_w_adding_explicit_args_fXX=07086_W_"$1" senza operandi tradotto con "$1 %st,%st(1)"
+asmr_w_adding_explicit_first_arg_fXX=07087_W_"$1 %st(n)" tradotto con "$1 %st,%st(n)"
+asmr_w_adding_explicit_second_arg_fXX=07088_W_"$1 %st(n)" tradotto con "$1 %st(n),%st"
+asmr_e_invalid_char_smaller=07089_E_Il carattere '<' non è permesso qui
+% The shift operator requires the << characters. Only one
+% of those characters was found.
+asmr_e_invalid_char_greater=07090_E_Il carattere '>' non è permesso qui
+% The shift operator requires the >> characters. Only one
+% of those characters was found.
+asmr_w_align_not_supported=07093_W_ALIGN non è supportato
+asmr_e_no_inc_and_dec_together=07094_E_Non si possono usare Inc e Dec insieme
+% Trying to use an increment and a decrement within the same
+% opcode on the 680x0. This is impossible.
+asmr_e_invalid_reg_list_in_movem=07095_E_La reglist per movem non è valida
+% Trying to use the \var{movem} opcode with invalid registers
+% to save or restore.
+asmr_e_invalid_reg_list_for_opcode=07096_E_La reglist per l'opcode non è valida
+asmr_e_higher_cpu_mode_required=07097_E_Necessaria una classe di cpu più alta ($1)
+% Trying to use an instruction which is not supported in the current
+% cpu mode. Use a higher cpu generation to be able to use this
+% opcode in your assembler block
+asmr_w_unable_to_determine_reference_size_using_dword=07098_W_Dimensione degli operandi non specificata ed impossibile da determinare, assunta DWORD come default
+% You should specify explicitly a size for the reference, because
+% the compiler is unable to determine what size (byte,word,dword,etc.) it
+% should use for the reference. This warning is only used in Delphi mode where
+% it falls back to use DWORD as default.
+asmr_e_illegal_shifterop_syntax=07099_E_Errore di sintassi nell'analisi di un operando shifter
+% ARM only; ARM assembler supports a so called shifter operand. The used syntax isn't
+% a valid shifter operand. Example for an operation with shifter operand:
+% \begin{verbatim}
+% asm
+%   orr     r2,r2,r2,lsl #8
+% end;
+% \end{verbatim}
+asmr_e_packed_element=07100_E_Indirizzo di componenti packed non allineato al byte
+% Packed components (record fields and array elements) may start at an arbitrary
+% bit inside a byte. On CPU which do not support bit-addressable memory (which
+% includes all currently supported CPUs by FPC) you will therefore get an error
+% message when trying to index arrays with elements whose size is not a multiple
+% of 8 bits. The same goes for accessing record fields with such an address.
+% multiple of 8 bits.
+asmr_w_unable_to_determine_reference_size_using_byte=07101_W_Dimensione degli operandi non specificata ed impossibile da determinare, assunta BYTE come default
+% You should specify explicitly a size for the reference, because
+% the compiler is unable to determine what size (byte,word,dword,etc.) it
+% should use for the reference. This warning is only used in Delphi mode where
+% it falls back to use BYTE as default.
+asmr_w_no_direct_ebp_for_parameter=07102_W_Qui non si può usare +offset(%ebp) per i parametri
+% Using direct 8(%ebp) reference for function/procedure parameters is invalid
+% if parameters are in registers.
+asmr_w_direct_ebp_for_parameter_regcall=07103_W_Usare +offset(%ebp) non è compatibile con la convenzione di chiamata regcall
+% Using direct 8(%ebp) reference for function/procedure parameters is invalid
+% if parameters are in registers.
+asmr_w_direct_ebp_neg_offset=07104_W_Usare -offset(%ebp) non è consigliato per accedere a variabili locali
+% Using -8(%ebp) to access a local variable is not recommended
+asmr_w_direct_esp_neg_offset=07105_W_Usando -offset(%esp), l'accesso può causare un crash o perdite di dati
+% Using -8(%esp) to access a local stack is not recommended, as
+% this stack portion can be overwritten by any function calls or interrupts.
+asmr_e_no_vmtoffset_possible=07106_E_VMTOffset deve essere usato in combinazione con un metodo virtuale, ma "$1" non lo è
+% Only virtual methods have VMT offsets
+asmr_e_need_pic_ref=07107_E_Non si può generare PIC: ci sono reference dipendenti dalla posizione
+% The compiler has been configured to generate position-independent code
+% (PIC), but there are position-dependent references in the current
+% handwritten assembler instruction.
+#
+# Assembler/binary writers
+#
+# 08020 is the last used one
+#
+asmw_f_too_many_asm_files=08000_F_Troppi file assembler
+% With smartlinking enabled, there are too many assembler
+% files generated. Disable smartlinking.
+asmw_f_assembler_output_not_supported=08001_F_L'assembler di output selezionato non è supportato
+asmw_f_comp_not_supported=08002_F_Comp not supported
+asmw_f_direct_not_supported=08003_F_Modo diretto non supportato perscrittori binari
+% Direct assembler mode is not supported for binary writers.
+asmw_e_alloc_data_only_in_bss=08004_E_Si possono allocare dati solo nella sezione bss
+asmw_f_no_binary_writer_selected=08005_F_Nessuno scrittore binario selezionato
+asmw_e_opcode_not_in_table=08006_E_Asm: L'opcode $1 non è in tabella
+asmw_e_invalid_opcode_and_operands=08007_E_Asm: $1 combinazione di opcode e operandi non valida
+asmw_e_16bit_not_supported=08008_E_Asm: riferimenti a 16 Bit non sono supportati
+asmw_e_invalid_effective_address=08009_E_Asm: indirizzo effettivo non valido
+asmw_e_immediate_or_reference_expected=08010_E_Asm: era previsto un immediate o un reference
+asmw_e_value_exceeds_bounds=08011_E_Asm: valore $1 fuori dal limite $2
+asmw_e_short_jmp_out_of_range=08012_E_Asm: lo short jump è fuori dal limite $1
+asmw_e_undefined_label=08013_E_Asm: Label $1 non definita
+asmw_e_comp_not_supported=08014_E_Asm: il tipo comp non è supportato per questa destinazione
+asmw_e_extended_not_supported=08015_E_Asm: il tipo extended non è supportato per questa destinazione
+asmw_e_duplicate_label=08016_E_Asm: label $1 duplicata
+asmw_e_redefined_label=08017_E_Asm: label $1 ridefinita
+asmw_e_first_defined_label=08018_E_Asm: definito qui per la prima volta
+asmw_e_invalid_register=08019_E_Asm: registro $1 non valido
+asmw_e_16bit_32bit_not_supported=08020_E_Asm: riferimenti a 16 o a 32 Bit non supportati
+asmw_e_64bit_not_supported=08021_E_Asm: operandi a 64 Bit non supportati
+
+#
+# Executing linker/assembler
+#
+# 09032 is the last used one
+#
+# BeginOfTeX
+%
+% \section{Errors of assembling/linking stage}
+% This section lists errors that occur when the compiler is processing the
+% command line or handling the configuration files.
+% \begin{description}
+exec_w_source_os_redefined=09000_W_Sistema operativo sorgente ridefinito
+% The source operating system is redefined.
+exec_i_assembling_pipe=09001_I_Uso del'assemblatore $1  (tramite pipe)
+% Assembling using a pipe to an external assembler.
+exec_d_cant_create_asmfile=09002_E_Non posso creare il file assembler $1
+% The mentioned file can't be created. Check if you have
+% access permissions to create this file.
+exec_e_cant_create_objectfile=09003_E_Non posso creare il file oggetto: $1
+% The mentioned file can't be created. Check if you have
+% got access permissions to create this file.
+exec_e_cant_create_archivefile=09004_E_Non posso creare il file archivio: $1
+% The mentioned file can't be created. Check if you have
+% access permissions to create this file.
+exec_e_assembler_not_found=09005_E_Assemblatore $1 non trovato, sarà usato un assemblatore esterno
+% The assembler program was not found. The compiler will produce a script that
+% can be used to assemble and link the program.
+exec_t_using_assembler=09006_T_Assemblatore in uso: $1
+% An informational message saying which assembler is being used.
+exec_e_error_while_assembling=09007_E_Errore nell'assembaggio dell'exitcode $1
+% There was an error while assembling the file using an external assembler.
+% Consult the documentation of the assembler tool to find out more information
+% on this error.
+exec_e_cant_call_assembler=09008_E_Non è possibile chiamare l'assemblatore, errore $1: sarà usato un assemblatore esterno
+% An error occurred when calling an external assembler. The compiler will produce a script that
+% can be used to assemble and link the program.
+exec_i_assembling=09009_I_Assemblaggio di $1
+% An informational message stating which file is being assembled.
+exec_i_assembling_smart=09010_I_Assemblaggio con smartlinking di $1
+% An informational message stating which file is being assembled using smartlinking.
+exec_w_objfile_not_found=09011_W_Oggetto $1 non trovato, il linking potrebbe fallire!
+% One of the object files is missing, and linking will probably fail.
+% Check your paths.
+exec_w_libfile_not_found=09012_W_Libreria $1 non trovata, il linking potrebbe fallire!
+% One of the library files is missing, and linking will probably fail.
+% Check your paths.
+exec_e_error_while_linking=09013_E_Errore durante il linking
+% Generic error while linking.
+exec_e_cant_call_linker=09014_E_Impossibile chiamare il linker, sarà usato un linker esterno
+% An error occurred when calling an external linker. The compiler will produce a script that
+% can be used to assemble and link the program.
+exec_i_linking=09015_I_Linking di $1
+% An informational message, showing which program or library is being linked.
+exec_e_util_not_found=09016_E_Utility $1 non trovata, sarà usato un linker esterno
+% An external tool was not found. The compiler will produce a script that
+% can be used to assemble and link or postprocess the program.
+exec_t_using_util=09017_T_Uso di utility $1
+% An informational message, showing which external program (usually a postprocessor) is being used.
+exec_e_exe_not_supported=09018_E_La creazione di eseguibili non è supportata
+% Creating executable programs is not supported for this platform, because it was
+% not yet implemented in the compiler.
+exec_e_dll_not_supported=09019_E_La creazione di librerie dinamiche o condivise non è supportata
+% Creating dynamically loadable libraries is not supported for this platform, because it was
+% not yet implemented in the compiler.
+exec_i_closing_script=09020_I_Chiusura dello script $1
+% Informational message showing when writing of the external assembling and linking script is finished.
+exec_e_res_not_found=09021_E_Compilatore di risorse "$1" non trovato, creazione di uno script esterno
+% An external resource compiler was not found. The compiler will produce a script that
+% can be used to assemble, compile resources and link or postprocess the program.
+exec_i_compilingresource=09022_I_Compilazione della risorsa $1
+% An informational message, showing which resource is being compiled.
+exec_t_unit_not_static_linkable_switch_to_smart=09023_T_La unit $1 non si può linkare staticamente, sarà usato lo smart linking
+% Static linking was requested, but a unit which is not statically linkable was used.
+exec_t_unit_not_smart_linkable_switch_to_static=09024_T_La unit $1 deve essere linkata staticamente
+% Smart linking was requested, but a unit which is not smart-linkable was used.
+exec_t_unit_not_shared_linkable_switch_to_static=09025_T_La unit $1 non si può linkare in modo shared o smart
+% Shared linking was requested, but a unit which is not shared-linkable was used.
+exec_e_unit_not_smart_or_static_linkable=09026_E_La unit $1 deve essere linkata in modo shared
+% Smart or static linking was requested, but a unit which cannot be used for either  was used.
+exec_e_unit_not_shared_or_static_linkable=09027_E_La unit $1 non si può linkare in modo shared o statico
+% Shared or static linking was requested, but a unit which cannot be used for either  was used.
+exec_d_resbin_params=09028_D_Chiamata al compilatore di risorse "$1" con riga di comando "$2"
+% An informational message showing which command line is used for the resource compiler.
+exec_e_error_while_compiling_resources=09029_E_Errore nella compilazione delle risorse
+% The resource compiler or converter returned an error.
+exec_e_cant_call_resource_compiler=09030_E_Impossibile chiamare il compilatore di risorse "$1", creazione di uno script esterno
+% An error occurred when calling a resource compiler. The compiler will produce
+% a script that can be used to assemble, compile resources and link or
+% postprocess the program.
+exec_e_cant_open_resource_file=09031_E_Impossibile aprire il file di risorse "$1"
+% An error occurred resource file cannot be opened.
+exec_e_cant_write_resource_file=09032_E_Impossibile scrivere il file di risorse "$1"
+% An error occurred resource file cannot be written.
+%\end{description}
+# EndOfTeX
+
+#
+# Executable information
+#
+# 09134 is the last used one
+#
+# BeginOfTeX
+% \section{Executable information messages.}
+% This section lists all messages that the compiler emits when an executable program is produced,
+% and only when the internal linker is used.
+% \begin{description}
+execinfo_f_cant_process_executable=09128_F_Impossibile postprocessare l'eseguibile $1
+% Fatal error when the compiler is unable to post-process an executable.
+execinfo_f_cant_open_executable=09129_F_Impossibile aprire l'eseguibile $1
+% Fatal error when the compiler cannot open the file for the executable.
+execinfo_x_codesize=09130_X_Dimnesione del codice: $1 byte
+% Informational message showing the size of the produced code section.
+execinfo_x_initdatasize=09131_X_Dimensione dei dati inizializzati: $1 byte
+% Informational message showing the size of the initialized data section.
+execinfo_x_uninitdatasize=09132_X_Dimensione dei dati non inizializzati: $1 byte
+% Informational message showing the size of the uninitialized data section.
+execinfo_x_stackreserve=09133_X_Spazio di stack riservato: $1 byte
+% Informational message showing the stack size that the compiler reserved for the executable.
+execinfo_x_stackcommit=09134_X_Spazio di stack impegnato: $1 byte
+% Informational message showing the stack size that the compiler committed for the executable.
+%\end{description}
+# EndOfTeX
+
+#
+# Internal linker messages
+#
+# 09200 is the last used one
+#
+# BeginOfTeX
+% \section{Linker messages}
+% This section lists messages produced by internal linker.
+% \begin{description}
+link_f_executable_too_big=09200_F_L'immagine dell'eseguibile è troppo grande per la destinazione $1.
+% Fatal error when resulting executable is too big.
+link_w_32bit_absolute_reloc=09201_W_Il file oggetto "$1" contiene rilocazioni assolute a 32-bit al simbolo "$2".
+% Warning when 64-bit object file contains 32-bit absolute relocations.
+% In such case an executable image can be loaded into lower 4Gb of
+% address space only.
+%\end{description}
+# EndOfTeX
+
+#
+# Unit loading
+#
+# 10061 is the last used one
+#
+# BeginOfTeX
+% \section{Unit loading messages.}
+% This section lists all messages that can occur when the compiler is
+% loading a unit from disk into memory. Many of these messages are
+% informational messages.
+% \begin{description}
+unit_t_unitsearch=10000_T_Ricerca della unit: $1
+% When you use the \var{-vt} option, the compiler tells you where it tries to find
+% unit files.
+unit_t_ppu_loading=10001_T_Caricamento del PPU $1
+% When the \var{-vt} switch is used, the compiler tells you
+% what units it loads.
+unit_u_ppu_name=10002_U_Nome del PPU: $1
+% When you use the \var{-vu} flag, the unit name is shown.
+unit_u_ppu_flags=10003_U_Flag del PPU: $1
+% When you use the \var{-vu} flag, the unit flags are shown.
+unit_u_ppu_crc=10004_U_Crc del PPU: $1
+% When you use the \var{-vu} flag, the unit CRC check is shown.
+unit_u_ppu_time=10005_U_Ora del PPU: $1
+% When you use the \var{-vu} flag, the time the unit was compiled is shown.
+unit_u_ppu_file_too_short=10006_U_File PPU troppo corto
+% The ppufile is too short, not all declarations are present.
+unit_u_ppu_invalid_header=10007_U_Header del PPU non valido (non c'è PPU all'inizio)
+% A unit file contains as the first three bytes the ASCII codes of the characters \var{PPU}.
+unit_u_ppu_invalid_version=10008_U_Versione del PPU $1 non valida
+% This unit file was compiled with a different version of the compiler, and
+% cannot be read.
+unit_u_ppu_invalid_processor=10009_U_Il PPU è compilato per un altro processore
+% This unit file was compiled for a different processor type, and
+% cannot be read.
+unit_u_ppu_invalid_target=10010_U_Il PPU è compilato per un'altra destinazione
+% This unit file was compiled for a different target, and
+% cannot be read.
+unit_u_ppu_source=10011_U_Sorgente del PPU: $1
+% When you use the \var{-vu} flag, the unit source file name is shown.
+unit_u_ppu_write=10012_U_Scrittura di $1
+% When you specify the \var{-vu} switch, the compiler will tell you where it
+% writes the unit file.
+unit_f_ppu_cannot_write=10013_F_Impossibile scrivere il file PPU
+% An error occurred when writing the unit file.
+unit_f_ppu_read_error=10014_F_Impossibile leggere il file PPU
+% This means that the unit file was corrupted, and contains invalid
+% information. Recompilation will be necessary.
+unit_f_ppu_read_unexpected_end=10015_F_Fine del file PPU inaspettata
+% Unexpected end of file. This may mean that the PPU file is
+% corrupted.
+unit_f_ppu_invalid_entry=10016_F_Voce del file PPU non valida: $1
+% The unit the compiler is trying to read is corrupted, or generated with a
+% newer version of the compiler.
+unit_f_ppu_dbx_count_problem=10017_F_Problemi nel conteggi Dbx nel PPU
+% There is an inconsistency in the debugging information of the unit.
+unit_e_illegal_unit_name=10018_E_Nome della unit $1 illegale
+% The name of the unit does not match the file name.
+unit_f_too_much_units=10019_F_Troppe unit 
+% \fpc has a limit of 1024 units in a program. You can change this behavior
+% by changing the \var{maxunits} constant in the \file{fmodule.pas} file of the
+% compiler, and recompiling the compiler.
+unit_f_circular_unit_reference=10020_F_Riferimento circolare fra le unit $1 e $2
+% Two units are using each other in the interface part. This is only allowed
+% in the \var{implementation} part. At least one unit must contain the other one
+% in the \var{implementation} section.
+unit_f_cant_compile_unit=10021_F_Impossibile compilare la unit $1, i sorgenti non sono disponibili
+% A unit was found that needs to be recompiled, but no sources are
+% available.
+unit_f_cant_find_ppu=10022_F_Impossibile trovare la unit unit $1 usata da $2
+% You tried to use a unit of which the PPU file isn't found by the
+% compiler. Check your configuration file for the unit paths.
+unit_w_unit_name_error=10023_W_La unit $1 non è stata trovata ma la $2 esiste
+% This error message is no longer used.
+unit_f_unit_name_error=10024_F_Cercata la unit $1 ma trovata la $2
+% \dos truncation of 8 letters for unit PPU files
+% may lead to problems when unit name is longer than 8 letters.
+unit_w_switch_us_missed=10025_W_E' necessario lo switch -Us per compilare la unit 'system'
+% When recompiling the system unit (it needs special treatment), the
+% \var{-Us} switch must be specified.
+unit_f_errors_in_unit=10026_F_Riscontrati $1 errori nella compilazione del modulo: terminata.
+% When the compiler encounters a fatal error or too many errors in a module
+% then it stops with this message.
+unit_u_load_unit=10027_U_Caricamento da $1 ($2) unit $3
+% When you use the \var{-vu} flag, which unit is loaded from which unit is
+% shown.
+unit_u_recompile_crc_change=10028_U_Ricompilazione di $1, il checksum di $2 è cambiato
+% The unit is recompiled because the checksum of a unit it depends on has
+% changed.
+unit_u_recompile_source_found_alone=10029_U_Ricompilazione di $1, trovato solo il sorgente
+% When you use the \var{-vu} flag, these messages tell you why the current
+% unit is recompiled.
+unit_u_recompile_staticlib_is_older=10030_U_La libreria statica è più vecchia del file PPU: ricompilo la unit
+% When you use the \var{-vu} flag, the compiler warns if the static library
+% of the unit is older than the unit file itself.
+unit_u_recompile_sharedlib_is_older=10031_U_La libreria condivisa è più vecchia del file PPU: ricompilo la unit
+% When you use the \var{-vu} flag, the compiler warns if the shared library
+% of the unit is older than the unit file itself.
+unit_u_recompile_obj_and_asm_older=10032_U_i file obj e asm sono più vecchi del file PPU: ricompilo la unit
+% When you use the \var{-vu} flag, the compiler warns if the assembler or
+% object file of the unit is older than the unit file itself.
+unit_u_recompile_obj_older_than_asm=10033_U_Il file obj è più vecchio del file asm: ricompilo la unit
+% When you use the \var{-vu} flag, the compiler warns if the assembler
+% file of the unit is older than the object file of the unit.
+unit_u_parsing_interface=10034_U_Analisi dell'interfaccia di $1
+% When you use the \var{-vu} flag, the compiler warns that it starts
+% parsing the interface part of the unit.
+unit_u_parsing_implementation=10035_U_Analisi dell'implementazione di $1
+% When you use the \var{-vu} flag, the compiler warns that it starts
+% parsing the implementation part of the unit.
+unit_u_second_load_unit=10036_U_Secondo caricamento della unit $1
+% When you use the \var{-vu} flag, the compiler warns that it starts
+% recompiling a unit for the second time. This can happen with
+% interdependent units.
+unit_u_check_time=10037_U_PPU Controllo del file $1 ora $2
+% When you use the \var{-vu} flag, the compiler shows the filename and
+% date and time of the file on which a recompile depends.
+### The following two error msgs is currently disabled.
+#unit_h_cond_not_set_in_last_compile=10038_H_Il condizionale $1 non era settato all'inizio dell'ultima compilazione di $2
+#% when recompilation of an unit is required the compiler will check that
+#% the same conditionals are set for the recompiliation. The compiler has
+#% found a conditional that currently is defined, but was not used the last
+#% time the unit was compiled.
+#unit_h_cond_set_in_last_compile=10039_H_Il condizionale $1 era settato all'inizio dell'ultima compilazione di $2
+#% when recompilation of an unit is required the compiler will check that
+#% the same conditionals are set for the recompiliation. The compiler has
+#% found a conditional that was used the last time the unit was compiled, but
+#% the conditional is currently not defined.
+unit_w_cant_compile_unit_with_changed_incfile=10040_W_Impossibile ricompilare la unit $1, ma sono stati trovati file include modificati
+% A unit was found to have modified include files, but
+% some source files were not found, so recompilation is impossible.
+unit_u_source_modified=10041_U_Il file $1 è più recente del file PPU $2
+% A modified source file for a compiler unit was found.
+unit_u_ppu_invalid_fpumode=10042_U_Tentativo di usare una unit compilata con un modo FPU diverso
+% Trying to compile code while using units which were not compiled with
+% the same floating point format mode. Either all code should be compiled
+% with FPU emulation on, or with FPU emulation off.
+unit_u_loading_interface_units=10043_U_Caricamento delle unit dall'interfaccia di $1
+% When you use the \var{-vu} flag, the compiler warns that it is starting
+% to load the units defined in the interface part of the unit.
+unit_u_loading_implementation_units=10044_U_Caricamento delle unit dall'implementazione di $1
+% When you use the \var{-vu} flag, the compiler warns that it is starting
+% to load the units defined in the implementation part of the unit.
+unit_u_interface_crc_changed=10045_U_Il CRC dell'interfaccia per la unit $1 è cambiato
+% When you use the \var{-vu} flag, the compiler warns that the
+% CRC calculated for the interface has been changed after the implementation
+% has been parsed.
+unit_u_implementation_crc_changed=10046_U_Il CRC dell'implementazione per la unit $1 è cambiato
+% When you use the \var{-vu} flag, the compiler warns that the
+% CRC calculated has been changed after the implementation
+% has been parsed.
+unit_u_finished_compiling=10047_U_Compilazione della unit $1 terminata
+% When you use the \var{-vu} flag, the compiler warns that it
+% has finished compiling the unit.
+unit_u_add_depend_to=10048_U_Aggiunta dipendenza da $1 a $2
+% When you use the \var{-vu} flag, the compiler warns that it
+% has added a dependency between the two units.
+unit_u_no_reload_is_caller=10049_U_Nessun ricaricamento, chiamante: $1
+% When you use the \var{-vu} flag, the compiler warns that it
+% will not reload the unit because it is the unit that wants
+% to load this unit.
+unit_u_no_reload_in_second_compile=10050_U_Nessun ricaricamento, già in ricompilazione: $1
+% When you use the \var{-vu} flag, the compiler warns that it
+% will not reload the unit because it is already in a second recompile.
+unit_u_flag_for_reload=10051_U_Flag per il ricaricamento: $1
+% When you use the \var{-vu} flag, the compiler warns that it
+% has to reload the unit.
+unit_u_forced_reload=10052_U_Ricaricamento forzato
+% When you use the \var{-vu} flag, the compiler warns that it
+% is reloading the unit because it was required.
+unit_u_previous_state=10053_U_Stato precedente di $1: $2
+% When you use the \var{-vu} flag, the compiler shows the
+% previous state of the unit.
+unit_u_second_compile_unit=10054_U_Unit $1 già in fase di compilazione, sarà compilata una seconda volta
+% When you use the \var{-vu} flag, the compiler warns that it is starting
+% to recompile a unit for the second time. This can happen with interdependent
+% units.
+unit_u_loading_unit=10055_U_Caricamento della unit $1
+% When you use the \var{-vu} flag, the compiler warns that it starts
+% loading the unit.
+unit_u_finished_loading_unit=10056_U_Finito di caricare la unit $1
+% When you use the \var{-vu} flag, the compiler warns that it finished
+% loading the unit.
+unit_u_registering_new_unit=10057_U_Registrazione della nuova unit $1
+% When you use the \var{-vu} flag, the compiler warns that it has
+% found a new unit and is registering it in the internal lists.
+unit_u_reresolving_unit=10058_U_Ri-risoluzione della unit $1
+% When you use the \var{-vu} flag, the compiler warns that it
+% has to recalculate the internal data of the unit.
+unit_u_skipping_reresolving_unit=10059_U_Abortita ri-risoluzione della unit $1, ancora caricamento delle unit usate
+% When you use the \var{-vu} flag, the compiler warns that it is
+% skipping the recalculation of the internal data of the unit
+% because there is no data to recalculate.
+unit_u_unload_resunit=10060_U_Unit di risorse $1 scaricata perché non necessaria
+% When you use the \var{-vu} flag, the compiler warns that it is unloading the
+% resource handling unit, since no resources are used.
+unit_e_different_wpo_file=10061_E_La unit $1 è compilata con un diverso feedback di ottimizzazione globale ($2, $3); ricompilarla senza wpo o usare lo stesso file input wpo per questa compilazione
+% When a unit has been compiled using a particular ottimizzazione globale (wpo) feedback file (\var{-FW<x>} \var{-OW<x>}),
+% this compiled version of the unit is specialised for that particular compilation scenario and cannot be used in
+% any other context. It has to be recompiled before you can use it in another program or with another wpo feedback input file.
+% \end{description}
+# EndOfTeX
+
+#
+#  Options
+#
+# 11047 is the last used one
+#
+option_usage=11000_O_$1 [options] <inputfile> [options]
+# BeginOfTeX
+%
+% \section{Command line handling errors}
+% This section lists errors that occur when the compiler is processing the
+% command line or handling the configuration files.
+% \begin{description}
+option_only_one_source_support=11001_W_Supportato un solo file sorgente, cambio il file sorgente da compilare da "$1" in "$2"
+% You can specify only one source file on the command line. The last
+% one will be compiled, others will be ignored. This may indicate that
+% you forgot a \var{'-'} sign.
+option_def_only_for_os2=11002_W_I file DEF si possono creare solo per OS/2
+% This option can only be specified when you're compiling for OS/2.
+option_no_nested_response_file=11003_E_I file di risposta nidificati non sono supportati
+% You cannot nest response files with the \var{@file} command line option.
+option_no_source_found=11004_F_Nella riga di comando manca il nome del file sorgente
+% The compiler expects a source file name on the command line.
+option_no_option_found=11005_N_Non ci sono opzioni nel file di configurazione $1
+% The compiler didn't find any option in that config file.
+option_illegal_para=11006_E_Parametro $1 illegale
+% You specified an unknown option.
+option_help_pages_para=11007_H_-? fornisce le pagine di aiuto
+% When an unknown option is given, this message is displayed.
+option_too_many_cfg_files=11008_F_Troppi file di configurazione nidificati
+% You can only nest up to 16 config files.
+option_unable_open_file=11009_F_Impossibile aprire il file $1
+% The option file cannot be found.
+option_reading_further_from=11010_D_Lettura di ulteriori opzioni da $1
+% Displayed when you have notes turned on, and the compiler switches
+% to another options file.
+option_target_is_already_set=11011_W_Destinazione già impostata a: $1
+% Displayed if more than one \var{-T} option is specified.
+option_no_shared_lib_under_dos=11012_W_Le librerie condivise non sono supportate sotto DOS: passaggio a librerie statiche
+% If you specify \var{-CD} for the \dos platform, this message is displayed.
+% The compiler supports only static libraries under \dos.
+option_too_many_ifdef=11013_F_Nel file opzioni $1 alla riga $2 ci sono troppi \var{\#IF(N)DEFs}
+% The \var{\#IF(N)DEF} statements in the options file are not balanced with
+% the \var{\#ENDIF} statements.
+option_too_many_endif=11014_F_Nel file opzioni $1 alla riga $2 c'è un \var{\#ENDIFs} che non dovrebbe esserci
+% The \var{\#IF(N)DEF} statements in the options file are not balanced with
+% the \var{\#ENDIF} statements.
+option_too_less_endif=11015_F_Condizionale aperto alla fine del file di opzioni
+% The \var{\#IF(N)DEF} statements in the options file are not balanced with
+% the \var{\#ENDIF} statements.
+option_no_debug_support=11016_W_La generazione delle informazioni di debug non è supportata da questo eseguibile
+% It is possible to have a compiler executable that doesn't support
+% the generation of debugging info. If you use such an executable with the
+% \var{-g} switch, this warning will be displayed.
+option_no_debug_support_recompile_fpc=11017_H_Provate a ricompilare il compilatore con -dGDB
+% It is possible to have a compiler executable that doesn't support
+% the generation of debugging info. If you use such an executable with the
+% \var{-g} switch, this warning will be displayed.
+option_obsolete_switch=11018_W_State usando lo switch $1 che è obsoleto
+% This warns you when you use a switch that is not needed/supported anymore.
+% It is recommended that you remove the switch to overcome problems in the
+% future, when the meaning of the switch may change.
+option_obsolete_switch_use_new=11019_W_State usando lo switch $1, che è obsoleto: si prega usare $2 al suo posto
+% This warns you when you use a switch that is not supported anymore. You
+% must now use the second switch instead.
+% It is recommended that you change the switch to overcome problems in the
+% future, when the meaning of the switch may change.
+option_switch_bin_to_src_assembler=11020_N_Cambio dell'assemblatore a quello di scrittora dei sorgenti di default
+% This notifies you that the assembler has been changed because you used the
+% -a switch, which can't be used with a binary assembler writer.
+option_incompatible_asm=11021_W_L'output assembler selezionato "$1" non è compatibile con "$2"
+option_asm_forced=11022_W_Forzato l'uso dell'assemblatore "$1"
+% The assembler output selected cannot generate
+% object files with the correct format. Therefore, the
+% default assembler for this target is used instead.
+option_using_file=11026_T_Lettura delle opzioni dal file $1
+% Options are also read from this file.
+option_using_env=11027_T_Lettura dell opzioni dall'ambiente $1
+% Options are also read from this environment string.
+option_handling_option=11028_D_Gestione dell'opzione "$1"
+% Debug info that an option is found and will be handled.
+option_help_press_enter=11029_O_*** premere invio ***
+% Message shown when help is shown page per page. When pressing the ENTER
+% Key, the next page of help is shown. If you press q and then ENTER, the
+% compiler exits.
+option_start_reading_configfile=11030_H_Inizio lettura del file di configurazione $1
+% Start of configuration file parsing.
+option_end_reading_configfile=11031_H_Fine lettura del file di configurazione $1
+% End of configuration file parsing.
+option_interpreting_option=11032_D_Interpretando l'opzione "$1"
+% The compiler is interpreting an option
+option_interpreting_firstpass_option=11036_D_Interpretando l'opzione  "$1" (primo passo)
+% The compiler is interpreting an option for the first time.
+option_interpreting_file_option=11033_D_Interpretando l'opzione da file "$1"
+% The compiler is interpreting an option which it read from the configuration file.
+option_read_config_file=11034_D_Lettura del file di configurazione "$1"
+% The compiler is starting to read the configuration file.
+option_found_file=11035_D_trovato nome di file sorgente "$1"
+% Additional information about options.
+% Displayed when you have the debug option turned on.
+option_code_page_not_available=11039_E_Codepage (lingua del sorgente) sconosciuta
+% An unknown code page for the source files was requested.
+% The compiler is compiled with support for several code pages built-in.
+% The requested code page is not in that list. You will need to recompile
+% the compiler with support for the codepage you need.
+option_config_is_dir=11040_F_Il file di configurazione $1 è una directory
+% Directories cannot be used as configuration files.
+option_confict_asm_debug=11041_W_L'assemblatore selezionato "$1" non può gneerare informazioni di debug: debugging disabilitato
+% The selected assembler output cannot generate
+% debugging information, debugging option is therefore disabled.
+option_ppc386_deprecated=11042_W_L'uso di ppc386.cfg è deprecato, prego usate fpc.cfg al suo posto
+% Using ppc386.cfg is still supported for historical reasons, however, for a multiplatform
+% system the naming makes no sense anymore. Please continue to use fpc.cfg instead.
+option_else_without_if=11043_F_Nel file opzioni $1 alla riga $2 c'è una direttiva \var{\#ELSE} senza il \var{\#IF(N)DEF} corrispondente
+% An \var{\#ELSE} statement was found in the options file without a matching \var{\#IF(N)DEF} statement.
+option_unsupported_target=11044_F_L'opzione "$1" non è supportata sulla destinazione corrente
+% Not all options are supported or implemented for all target platforms. This message informs you that a chosen
+% option is incompatible with the currently selected target platform.
+option_unsupported_target_for_feature=11045_F_La capacità "$1" non è supportata sulla destinazione corrente
+% Not all features are supported or implemented for all target platforms. This message informs you that a chosen
+% feature is incompatible with the currently selected target platform.
+option_dwarf_smart_linking=11046_N_Le informazioni di debug DWARF non si possono usare con lo smart linking: passaggio al linking statico
+% Smart linking is currently incompatble with DWARF debug information on most
+% platforms, so smart linking is disabled in such cases.
+option_ignored_target=11047_W_L'opzione "$1" è ignorata per la destinazione corrente
+% Not all options are supported or implemented for all target platforms. This message informs you that a chosen
+% option is ignored for the currently selected target platform.
+%\end{description}
+# EndOfTeX
+
+#
+#  Whole program optimization
+#
+# 12019 is the last used one
+#
+# BeginOfTeX
+%
+% \section{Whole program optimization messages}
+% This section lists errors that occur when the compiler is performing
+% ottimizzazione globale.
+% \begin{description}
+wpo_cant_find_file=12000_F_Impossibile aprire il file di feedback "$1" per la ottimizzazione globale
+% The compiler cannot open the specified feedback file with ottimizzazione globale information.
+wpo_begin_processing=12001_D_Elaborazione dell'informazione per l'ottimizzazione globale dal file di feedback "$1"
+% The compiler starts processing ottimizzazione globale information found in the named file.
+wpo_end_processing=12002_D_Fine elaborazione dell'informazione per l'ottimizzazione globale dal file di feedback "$1"
+% The compiler has finished processing the ottimizzazione globale information found in the named file.
+wpo_expected_section=12003_E_Header di sezione errato: trovato "$2" alla riga $1 del file di feedback
+% The compiler expected a section header in the ottimizzazione globale file (starting with \%),
+% but did not find it.
+wpo_no_section_handler=12004_W_Nessun handler registrato per la sezione ottimizzazione globale "$2" alla riga $1 del file feedback wpo: sezione ignorata
+% The compiler has no handler to deal with the mentioned ottimizzazione globale information
+% section, and will therefore ignore it and skip to the next section.
+wpo_found_section=12005_D_Trovata sezione WPO "$1" con informazioni su "$2"
+% The compiler encountered a section with ottimizzazione globale information, and according
+% to its handler this section contains information usable for the mentioned purpose.
+wpo_no_input_specified=12006_F_Le ottimizzazioni globali selezionate richiedono un file di feedback pre-generato (usare -Fw per specificarlo)
+% The compiler needs information gathered during a previous compilation run to perform the selected
+% ottimizzazione globales. You can specify the location of the feedback file containing this
+% information using the -Fw switch.
+wpo_not_enough_info=12007_E_Non sono state trovate le informazioni necessarie per eseguire le ottimizzazioni globali "$1"
+% While you pointed the compiler to a file containing ottimizzazione globale feedback, it
+% did not contain the information necessary to perform the selected optimizations. You most likely
+% have to recompile the program using the appropriate -OWxxx switch.
+wpo_no_output_specified=12008_F_Specificare un file di feedback (usando -FW) in cui memorizzare le informazioni per l'ottimizzazione globale
+% You have to specify the feedback file in which the compiler has to store the ottimizzazione globale
+% feedback that is generated during the compilation run. This can be done using the -FW switch.
+wpo_output_without_info_gen=12009_E_Non saranno generate informazioni per l'ottimizzazione globale, ma è stato comunque specificato un file (con -FW)
+% The compiler was instructed to store ottimizzazione globale feedback into a file specified using -FW,
+% but not to actually generated any ottimizzazione globale feedback. The classes of to be
+% generated information can be speciied using -OWxxx.
+wpo_input_without_info_use=12010_E_Non saranno generate informazioni per l'ottimizzazione globale, ma è stato comunque specificato un file (con -Fw)
+% The compiler was not instructed to perform any ottimizzazione globales (no -Owxxx parameters),
+% but nevertheless an input file with such feedback was specified (using -Fwyyy). Since this can
+% indicate that you forgot to specify an -Owxxx parameter, the compiler generates an error in this case.
+wpo_skipping_unnecessary_section=12011_D_Sezione del file di feedback "$1" ignorata, perché non necessaria per le ottimizzazioni richieste
+% The ottimizzazione globale feedback file contains a section with information that is not
+% required by the selected ottimizzazione globales.
+wpo_duplicate_wpotype=12012_W_Sovrascrittura delle informazioni già lette dal file di feedback "$1" con le informazioni nella sezione "$2"
+% The feedback file contains multiple sections that provide the same class of information (e.g.,
+% information about which virtual methods can be devirtualized). In this case, the information in last encountered
+% section is used. Turn on debugging output (-vd) to see which class of information is provided by each section.
+wpo_cannot_extract_live_symbol_info_strip=12013_E_Impossibile estrarre informazioni di vitalità dei simboli se il programma ne è privo: usate -Xs-
+% Certain symbol liveness collectors extract the symbol information from the linked program. If the symbol information
+% is stripped (option -Xs), this is not possible.
+wpo_cannot_extract_live_symbol_info_no_link=12014_E_Impossibile estrarre informazioni di vitalità dei simboli se il programma non è in fase di linking
+% Certain symbol liveness collectors extract the symbol information from the linked program. If the program is not
+% linked by the compiler, this is not possible.
+wpo_cannot_find_symbol_progs=12015_F_Impossibile trovare "$1" o "$2" per estrarre informazioni di vitalità dei simboli dal programma linkato
+% Certain symbol liveness collectors need a helper program to extract the symbol information from the linked program.
+% This helper program is normally 'nm', which is part of the GNU binutils.
+wpo_error_reading_symbol_file=12016_E_Errore nella lettura delle informazioni di vitalità dei simboli prodotte da "$1"
+% An error occurred during the reading of the symbol liveness file that was generated using the 'nm' or 'objdump' program. The reason
+% can be that it was shorter than expected, or that its format was not understood.
+wpo_error_executing_symbol_prog=12017_F_Errore nell'esecuzione di "$1" (exitcode: $2) per l'estrazione di informazioni sui simboli dal programma linkato
+% Certain symbol liveness collectors need a helper program to extract the symbol information from the linked program.
+% The helper program produced the reported error code when it was run on the linked program.
+wpo_symbol_live_info_needs_smart_linking=12018_E_La raccolta di informazioni sulla vitalità dei simboli è utile solo in caso di smart linking: usate -CX -XX
+% Whether or not a symbol is live is determined by looking whether it exists in the final linked program.
+% Without smart linking/dead code stripping, all symbols are always included, regardless of whether they are
+% actually used or not. So in that case all symbols will be seen as live, which makes this optimization ineffective.
+wpo_cant_create_feedback_file=12019_E_Impossibile creare il file di feedback "$1" per l'ottimizzazione globale
+% The compiler is unable to create the file specified using the -FW parameter to store the whole program optimisation information.
+%\end{description}
+# EndOfTeX
+
+
+#
+# Logo (option -l)
+#
+option_logo=11023_[
+Compilatore Free Pascal, versione $FPCFULLVERSION [$FPCDATE] per $FPCCPU
+Copyright (c) 1993-2010 di Florian Klaempfl
+]
+
+#
+# Info (option -i)
+#
+option_info=11024_[
+Compilatore Free Pascal, versione $FPCVERSION
+
+Data creazione del compilatore : $FPCDATE
+CPU nativa del compilatore     : $FPCCPU
+
+Destinazioni supportate:
+  $OSTARGETS
+
+Set di istruzioni di CPU supportate:
+  $INSTRUCTIONSETS
+
+Set di istruzioni di FPU supportate:
+  $FPUINSTRUCTIONSETS
+
+Destinazioni ABI supportate:
+  $ABITARGETS
+
+Ottimizzazioni supportate:
+  $OPTIMIZATIONS
+
+Ottimizzazioni globali supportate:
+  All
+  $WPOPTIMIZATIONS
+
+Tipi di microcontroller supportati:
+  $CONTROLLERTYPES
+
+Questo programma è distribuito sotto la GNU General Public Licence
+Per ulteriori informazioni leggere il file COPYING.FPC
+
+Riferire difetti, suggerimenti ecc. a:
+                 http://bugs.freepascal.org
+oppure a
+                 [email protected]
+]
+
+#
+# Help pages (option -? and -h)
+#
+# The first character on the line indicates who will display this
+# line, the current possibilities are :
+#    * = every target
+#    3 = 80x86 targets
+#    6 = 680x0 targets
+#    e = in extended debug mode only
+#    P = PowerPC targets
+#    S = Sparc targets
+#    V = Virtual machine targets
+# The second character also indicates who will display this line,
+# (if the above character was TRUE) the current possibilities are :
+#    * = everyone
+#    g = with GDB info supported by the compiler
+#    O = OS/2
+#    L = UNIX systems
+#  The third character represents the indentation level.
+#
+option_help_pages=11025_[
+**0*_Mettere + dopo uno switch per attivarlo, - per disattivarlo
+**1a_Il compilatore non cancella i file asm generati
+**2al_Elenca le linee del codice sorgente nel file asm
+**2an_Elenca informazioni sui nodi nel file assembler
+*L2ap_Usa pipes invece di creare file assembler temporanei
+**2ar_Elenca info allocaz./rilascio registri nel file asm
+**2at_Elenca info allocaz./rilascio nei file asm
+**1A<x>_Formato di uscita:
+**2Adefault_Usa l'assemblatore di default
+3*2Aas_Assembla usando GNU AS
+3*2Anasmcoff_File COFF (Go32v2) con Nasm
+3*2Anasmelf_File ELF32 (Linux) con Nasm
+3*2Anasmwin32_File oggetto Win32 con Nasm
+3*2Anasmwdosx_File oggetto Win32/WDOSX con Nasm
+3*2Awasm_File oggetto con Wasm (Watcom)
+3*2Anasmobj_File oggetto con Nasm
+3*2Amasm_File oggetto con Masm (Microsoft)
+3*2Atasm_File oggetto con Tasm (Borland)
+3*2Aelf_File ELF (Linux) con assemblatore interno
+3*2Acoff_File COFF (Go32v2) con assemblatore interno
+3*2Apecoff_File PE-COFF (Win32) con assemblatore interno
+4*2Aas_Assembla using GNU AS
+6*2Aas_Unix o-file using GNU AS
+6*2Agas_GNU Motorola assembler
+6*2Amit_MIT Syntax (old GAS)
+6*2Amot_Usa l'assemblatore standard Motorola
+A*2Aas_Assembla con GNU AS
+P*2Aas_Assembla con GNU AS
+S*2Aas_Assembla con GNU AS
+**1b_Genera info per il browser
+**2bl_Genera info sui simboli locali
+**1B_Costruisce tutti i moduli
+**1C<x>_Opzioni di generazione del codice:
+**2Ca<x>_Seleziona l'ABI, vedi fpc -i per i valori possibili
+**2Cb_Genera codice big-endian
+**2Cc<x>_Imposta la convenzione di chiamata di default a <x>
+**2CD_Crea anche la libreria dinamica (non supportato)
+**2Ce_Compilazione con opcode in virgola mobile emulati
+**2Cf<x>_Sceglie il set di istruzioni FPU, (vedi fpc -i)
+**2CF<x>_Precisione minima per costanti virgola mobile (default/32/64)
+**2Cg_Genera codice position-independent (PIC)
+**2Ch<n>_<n> dimensione in byte dello heap 
+**3*_        (fra 1023 e 67107840)
+**2Ci_controllo dell'I/O
+**2Cn_Non fare il linking
+**2Co_Controlla l'overflow di operazioni su interi
+**2CO_Controlla il possibile overflow di operazioni su interi
+**2Cp<x>_Scegli il set di istruzioni, 
+**3*_        (vedi fpc -i per i valori possibili)
+**2CP<x>=<y>_ impostazioni per il packing
+**3CPPACKSET=<y>_ <y> imposta l'allocazione: 
+**3*_        (0, 1 o DEFAULT o NORMAL, 2, 4 e 8)
+**2Cr_Controllo degli intervalli (range)
+**2CR_Controlla la validità di chiamate a metodi di oggetti
+**2Cs<n>_Imposta controllo validità dello stack a <n>
+**2Ct_Controllo stack (solo testing, vedi manuale)
+**2CX_Crea anche librerie smartlinked
+**1d<x>_Definisce il simbolo <x>
+**1D_Genera un file DEF
+**2Dd<x>_Imposta descrizione a <x>
+**2Dv<x>_Imposta versione della DLL a <x>
+*O2Dw_Applicazione PM
+**1e<x>_Imposta il path all'eseguibile
+**1E_Identico a -Cn
+**1fPIC_Identico a -Cg
+**1F<x>_Imposta nomi di file e path:
+**2Fa<x>[,y]_(programma) carica unit <x> e [y] 
+**3*_        (prima di parsare la sezione uses)
+**2Fc<x>_Imposta codepage di input a <x>
+**2FC<x>_Imposta il nome dell'exe del compilatore RC a <x>
+**2Fd_Disabilita cache interna delle dir. del compilatore
+**2FD<x>_Imposta la directory in cui cercare le utility
+**2Fe<x>_Redirezione l'output degli errori a <x>
+**2Ff<x>_Aggiunge <x> al path del framework (solo Darwin)
+**2FE<x>_Imposta il path di output exe/unit a <x>
+**2Fi<x>_Aggiunge <x> al path degli include
+**2Fl<x>_Aggiunge <x> al path delle library
+**2FL<x>_Usa <x> come linker dinamico
+**2Fm<x>_Carica tabella conversione unicode da <x>.txt 
+**3*_        (nella directory del compilatore)
+**2Fo<x>_Aggiunge <x> al path dei file oggetto
+**2Fr<x>_Carica file dei messaggi di errore <x>
+**2FR<x>_Imposta linker delle risorse (.res) a <x>
+**2Fu<x>_Aggiunge <x> al path delle unit
+**2FU<x>_Setta output path delle unit a <x>, sovrascrive -FE
+**2FW<x>_Memorizza il feedback per l'ottimizz. globale in <x>
+**2Fw<x>_Carica info ottimizz. globale dal feedback file <x>
+*g1g_Genera info di debug (formato di default per la destinaz.)
+*g2gc_Genera controlli per i puntatori
+*g2gh_Usa unit heaptrace (debug di memory leak o corruzioni)
+*g2gl_Usa unit line info (mostra più info con i backtrace)
+*g2go<x>_Imposta opzioni delle informazioni di debug
+*g3godwarfsets_Abilita debug info tipo DWARF 'set' 
+*g3*_        (attenzione: fa crashare gdb < 6.5)
+*g3gostabsabsincludes_Memorizza path assoluto per 
+*g3*_        gli include file in Stabs
+*g3godwarfmethodclassprefix_Prefissa i nomi dei metodi 
+**3*_        in DWARF con il nome di classe
+*g2gp_Conserva maiuscole nei nomi di simboli stabs
+*g2gs_Genera info di debug Stabs
+*g2gt_Scarta variabili locali 
+*g3*_        (rileva il loro uso non inizializzato)
+*g2gv_Genera programmi tracciabili con Valgrind
+*g2gw_Genera info di debug DWARFv2 (come -gw2)
+*g2gw2_Genera info di debug DWARFv2 
+*g2gw3_Genera info di debug DWARFv3 
+**1i_Informazioni
+**2iD_Ritorna la data del compilatore
+**2iV_Ritorna la versione breve del compilatore
+**2iW_Ritorna la versione completa del compilatore
+**2iSO_Ritorna il sistema operativo del compilatore
+**2iSP_Ritorna la CPU ospite del compilatore
+**2iTO_Ritorna il sistema operativo di destinazione
+**2iTP_Ritorna la CPU di destinazione
+**1I<x>_Aggiunge <x> al path degli include file
+**1k<x>_Passa <x> al linker
+**1l_Scrive il logo
+**1M<x>_Imposta il modo del linguaggio a <x>
+**2Mfpc_Dialetto Free Pascal (default)
+**2Mobjfpc_Modo FPC con supporto Object Pascal
+**2Mdelphi_Modo compatibilità Delphi 7 
+**2Mtp_Modo compatibilità TP/BP 7.0 
+**2Mmacpas_Modo compatibilità Macintosh Pascal e dialetti
+**1n_Non leggere i file configurazione di default
+**1N<x>_Ottimizzazioni dell'albero dei nodi
+**2Nu_Srotola i loop
+**1o<x>_Rinomina l'eseguibile prodotto in <x>
+**1O<x>_Ottimizzazioni:
+**2O-_Disabilita le ottimizzazioni
+**2O1_Ottimizzazione livello 1 
+**3*_        (rapide e trasparenti al debugger)
+**2O2_Ottimizzazione livello 2 (-O1 + ottimizz. veloce)
+**2O3_Ottimizzazione livello 3 (-O2 + ottimizz. lenta)
+**2Oa<x>=<y>_Imposta allineamento
+**2Oo[NO]<x>_Abilita/disabilita ottimizzazioni, 
+**3*_        (vedi fpc -i per possibili valori)
+**2Op<x>_Imposta ottimizzazione per una CPU specifica, 
+**3*_        (vedi fpc -i per possibili valori)
+**2OW<x>_Genera feedback per l'ottimizz. globale <x> (vedi fpc -i)
+**2Ow<x>_Esegue ottimizzazione globale <x> (vedi fpc -i)
+**2Os_Ottimizza per la dimensione e non per la velocità
+**1pg_Genera codici di profiling per gprof (FPC_PROFILE: on)
+**1R<x>_Stile di lettura assembler:
+**2Rdefault_Usa assembler di default per la destinazione
+3*2Ratt_Leggi assembler stile AT&T
+3*2Rintel_Leggi assembler stile Intel 
+6*2RMOT_Leggi assembler stile motorola
+**1S<x>_Opzioni di sintassi:
+**2S2_Come -Mobjfpc
+**2Sc_Supporta operatori simil-C (*=,+=,/= e -=)
+**2Sa_Abilita le asserzioni
+**2Sd_Come -Mdelphi
+**2Se<x>_Opzioni sugli errori. <x> è la combinazione di:
+**3*_<n> : Il compilatore si ferma dopo <n> errori (default = 1)
+**3*_w : Il compilatore si ferma anche con warning
+**3*_n : Il compilatore si ferma anche con note
+**3*_h : Il compilatore si ferma anche con consigli
+**2Sg_Abilita LABEL e GOTO (default in -Mtp e -Mdelphi)
+**2Sh_Usa ansistring per default invece di shortstring
+**2Si_Abilita l'inlining di procedure e funzioni 
+**3*_        dichiarate come "inline"
+**2Sk_Carica unit fpcylix
+**2SI<x>_Imposta stile di interfacce a <x>
+**3SIcom_Interfaccia COM compatibile (default)
+**3SIcorba_Interfaccia CORBA compatible
+**2Sm_Supporta macro simil-C (global)
+**2So_Come -Mtp
+**2Ss_Il nome del costruttore deve essere 'init' 
+**3*_        (e il nome del distruttore deve essere 'done')
+**2St_Permetti la parola chiave static negli oggetti
+**2Sx_Abilita la parola chiave exception 
+**3*_        (default nei modi Delphi/ObjFPC)
+**1s_Non chiamare assembler e linker
+**2sh_Genera script per il linking sull'host
+**2st_Genera script per il linking sulla destinazione
+**2sr_Salta la fase di allocazione dei registri (usare con -alr)
+**1T<x>_Sistema operativo di destinazione:
+3*2Temx_OS/2 via EMX (inclusi extender EMX/RSX)
+3*2Tfreebsd_FreeBSD
+3*2Tgo32v2_DJ Delorie DOS extender versione 2
+3*2Tlinux_Linux
+3*2Tnetbsd_NetBSD
+3*2Tnetware_Novell Netware Module (clib)
+3*2Tnetwlibc_Novell Netware Module (libc)
+3*2Topenbsd_OpenBSD
+3*2Tos2_OS/2 / eComStation
+3*2Tsunos_SunOS/Solaris
+3*2Tsymbian_Symbian OS
+3*2Twatcom_DOS extender compatibile Watcom
+3*2Twdosx_WDOSX DOS extender
+3*2Twin32_Windows 32 Bit
+3*2Twince_Windows CE
+4*2Tlinux_Linux
+6*2Tamiga_Commodore Amiga
+6*2Tatari_Atari ST/STe/TT
+6*2Tlinux_Linux/m68k
+6*2Tmacos_Macintosh m68k (non supportato)
+6*2Tpalmos_PalmOS
+A*2Tlinux_Linux
+A*2Twince_Windows CE
+P*2Tamiga_AmigaOS su PowerPC
+P*2Tdarwin_Darwin e Mac OS X su PowerPC
+P*2Tlinux_Linux su PowerPC
+P*2Tmacos_Mac OS (classic) su PowerPC
+P*2Tmorphos_MorphOS
+S*2Tlinux_Linux
+**1u<x>_Elimina il simbolo <x>
+**1U_Opzioni per le unit:
+**2Un_Non controllare se i nomi della unit e 
+**3*_        del file che la contiene sono uguali
+**2Ur_Genera file di release delle unit 
+**3*_        (niente ricompilazione automatica)
+**2Us_Compila una unit di sistema
+**1v<x>_Prolisso. <x> è una combinazione dei seguenti:
+**2*_e : Mostra errori (default)  0 : Mostra solo errori e basta
+**2*_w : Mostra warning           u : Mostra info sulla unit
+**2*_n : Mostra note              t : Mostra files usati/tentati
+**2*_h : Mostra consigli          c : Mostra i condizionali
+**2*_i : Mostra info generiche    d : Mostra info di debug
+**2*_l : Mostra numri di riga     r : Modo compatibile Rhide/GCC
+**2*_s : Mostra date/ore          q : Mostra numeri dei messaggi
+**2*_a : Mostra tutto             x : Info degli exe (solo Win32)
+**2*_b : Nei messaggi scrivi nomi p : Scrivi parse tree in tree.log
+**2*_    file con path completo   v : Scrivi fpcdebug.txt con
+**2*_                                 molte informazioni di debug
+**2*_m<x>,<y> : Non mostrare messaggi con i numeri <x> e <y>
+3*1W<x>_Opzioni specifiche della destinazione (destinazioni)
+A*1W<x>_Opzioni specifiche della destinazione (destinazioni)
+P*1W<x>_Opzioni specifiche della destinazione (destinazioni)
+p*1W<x>_Opzioni specifiche della destinazione (destinazioni)
+3*2Wb_Crea un bundle e non una libreria (Darwin)
+P*2Wb_Crea un bundle e non una libreria (Darwin)
+p*2Wb_Crea un bundle e non una libreria (Darwin)
+3*2WB_Crea una immagine rilocabile (Windows)
+A*2WB_Crea una immagine rilocabile (Windows, Symbian)
+3*2WC_Specifica applicazione di tipo console 
+3*3*_        (EMX, OS/2, Windows)
+A*2WC_Specifica applicazione console (Windows)
+P*2WC_Specifica applicazione console (Classic Mac OS)
+3*2WD_Usa DEFFILE per esportare funz. di DLL o EXE (Windows)
+A*2WD_Usa DEFFILE per esportare funz. di DLL o EXE (Windows)
+3*2We_Usa risorse esterne (Darwin)
+P*2We_Usa risorse esterne (Darwin)
+p*2We_Usa risorse esterne (Darwin)
+3*2WF_Specifica un'applicazione a tutto schermo (EMX, OS/2)
+3*2WG_Specifica una applicazione grafica (EMX, OS/2, Windows)
+A*2WG_Specifica una applicazione grafica (Windows)
+P*2WG_Specifica una applicazione grafica (Classic Mac OS)
+3*2Wi_Usa risorse interne (Darwin)
+P*2Wi_Usa risorse interne (Darwin)
+p*2Wi_Usa risorse interne (Darwin)
+3*2WN_Non generare codice di rilocazione, 
+3*3*_        (necessario per il debug sotto Windows)
+A*2WN_Non generare codice di rilocazione, 
+A*3*_(necessario per il debug sotto Windows)
+3*2WR_Genera codice di rilocazione (Windows)
+A*2WR_Genera codice di rilocazione (Windows)
+P*2WT_Specifica applicazione tipo tool MPW (Classic Mac OS)
+3*2WX_Abilita stack dell'eseguibile (Linux)
+A*2WX_Abilita stack dell'eseguibile (Linux)
+p*2WX_Abilita stack dell'eseguibile (Linux)
+P*2WX_Abilita stack dell'eseguibile (Linux)
+**1X_Opzioni per gli eseguibili:
+**2Xc_Passa --shared/-dynamic al linker 
+**3*_        (BeOS, Darwin, FreeBSD, Linux)
+**2Xd_Non usare il path per la standard library 
+**3*_        (per crosscompilazione)
+**2Xe_Usa linker esterno
+**2Xg_Metti le info di debug in un file diverso e inserisci
+**3*_        una sezione debuglink nell'eseguibile
+**2XD_Cerca di linkare le unit dinamicamente 
+**3*_        (FPC_LINK_DYNAMIC: on)
+**2Xi_Usa linker interno
+**2Xm_Genera la mappa di linking
+**2XM<x>_Rinomina la routine 'main' del programma (default: main)
+**2XP<x>_Aggiunge il prefisso <x> ai nomi delle binutils
+**2Xr<x>_Pone il path rlink del linker a <x> 
+**3*_        per crosscompilazioni, vedi manuale di ld (BeOS, Linux)
+**2XR<x>_Prepone <x> ai path del linker 
+**3*_        (BeOS, Darwin, FreeBSD, Linux, Mac OS, Solaris)
+**2Xs_Elimina tutti i simboli dall'eseguibile finale
+**2XS_Prova a linkare tutte le unit staticamente 
+**3*_        (default, FPC_LINK_STATIC: on)
+**2Xt_Linka a librerie statiche (passa -static al linker)
+**2XX_Prova a usare lo smartlinking (FPC_LINK_SMART: on)
+**1*_
+**1?_Mostra questo help
+**1h_Mostra questo help senza interruzioni
+]
+
+#
+# The End...

+ 7 - 3
compiler/msgidx.inc

@@ -107,6 +107,7 @@ const
   scan_e_illegal_minfpconstprec=02085;
   scan_e_illegal_minfpconstprec=02085;
   scan_w_multiple_main_name_overrides=02086;
   scan_w_multiple_main_name_overrides=02086;
   scanner_w_illegal_warn_identifier=02087;
   scanner_w_illegal_warn_identifier=02087;
+  scanner_e_illegal_alignment_directive=02088;
   parser_e_syntax_error=03000;
   parser_e_syntax_error=03000;
   parser_e_dont_nest_interrupt=03004;
   parser_e_dont_nest_interrupt=03004;
   parser_w_proc_directive_ignored=03005;
   parser_w_proc_directive_ignored=03005;
@@ -398,6 +399,7 @@ const
   parser_e_not_allowed_in_helper=03307;
   parser_e_not_allowed_in_helper=03307;
   parser_e_no_class_constructor_in_helpers=03308;
   parser_e_no_class_constructor_in_helpers=03308;
   parser_e_inherited_not_in_record=03309;
   parser_e_inherited_not_in_record=03309;
+  parser_e_no_types_in_local_anonymous_records=03310;
   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;
@@ -471,7 +473,7 @@ const
   type_h_convert_sub_operands_to_prevent_overflow=04080;
   type_h_convert_sub_operands_to_prevent_overflow=04080;
   type_h_convert_mul_operands_to_prevent_overflow=04081;
   type_h_convert_mul_operands_to_prevent_overflow=04081;
   type_w_pointer_to_signed=04082;
   type_w_pointer_to_signed=04082;
-  type_interface_has_no_guid=04083;
+  type_e_interface_has_no_guid=04083;
   type_e_invalid_objc_selector_name=04084;
   type_e_invalid_objc_selector_name=04084;
   type_e_expected_objc_method_but_got=04085;
   type_e_expected_objc_method_but_got=04085;
   type_e_expected_objc_method=04086;
   type_e_expected_objc_method=04086;
@@ -561,6 +563,7 @@ const
   sym_e_interprocgoto_into_init_final_code_not_allowed=05081;
   sym_e_interprocgoto_into_init_final_code_not_allowed=05081;
   sym_e_external_class_name_mismatch1=05082;
   sym_e_external_class_name_mismatch1=05082;
   sym_e_external_class_name_mismatch2=05083;
   sym_e_external_class_name_mismatch2=05083;
+  sym_w_library_overload=05084;
   cg_e_parasize_too_big=06009;
   cg_e_parasize_too_big=06009;
   cg_e_file_must_call_by_reference=06012;
   cg_e_file_must_call_by_reference=06012;
   cg_e_cant_use_far_pointer_there=06013;
   cg_e_cant_use_far_pointer_there=06013;
@@ -720,6 +723,7 @@ const
   asmw_e_invalid_register=08019;
   asmw_e_invalid_register=08019;
   asmw_e_16bit_32bit_not_supported=08020;
   asmw_e_16bit_32bit_not_supported=08020;
   asmw_e_64bit_not_supported=08021;
   asmw_e_64bit_not_supported=08021;
+  asmw_e_bad_reg_with_rex=08022;
   exec_w_source_os_redefined=09000;
   exec_w_source_os_redefined=09000;
   exec_i_assembling_pipe=09001;
   exec_i_assembling_pipe=09001;
   exec_d_cant_create_asmfile=09002;
   exec_d_cant_create_asmfile=09002;
@@ -891,9 +895,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 59257;
+  MsgTxtSize = 60342;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
-    24,88,310,103,84,54,111,22,202,63,
+    24,89,311,103,85,54,111,23,202,63,
     49,20,1,1,1,1,1,1,1,1
     49,20,1,1,1,1,1,1,1,1
   );
   );

File diff suppressed because it is too large
+ 309 - 297
compiler/msgtxt.inc


+ 32 - 0
compiler/nadd.pas

@@ -2476,6 +2476,9 @@ implementation
          rd,ld   : tdef;
          rd,ld   : tdef;
          i       : longint;
          i       : longint;
          lt,rt   : tnodetype;
          lt,rt   : tnodetype;
+{$ifdef cpuneedsmulhelper}
+         procname : string[32];
+{$endif cpuneedsmulhelper}
       begin
       begin
          result:=nil;
          result:=nil;
 
 
@@ -2577,6 +2580,7 @@ implementation
                     expectloc:=LOC_JUMP;
                     expectloc:=LOC_JUMP;
                end
                end
 {$endif cpu64bitaddr}
 {$endif cpu64bitaddr}
+{$ifndef cpuneedsmulhelper}
              { is there a cardinal? }
              { is there a cardinal? }
              else if (torddef(ld).ordtype=u32bit) then
              else if (torddef(ld).ordtype=u32bit) then
                begin
                begin
@@ -2585,9 +2589,37 @@ implementation
                   else
                   else
                     expectloc:=LOC_FLAGS;
                     expectloc:=LOC_FLAGS;
                end
                end
+{$endif cpuneedsmulhelper}
              { generic s32bit conversion }
              { generic s32bit conversion }
              else
              else
                begin
                begin
+{$ifdef cpuneedsmulhelper}
+                 if (nodetype=muln) and not(torddef(resultdef).ordtype in [u8bit,s8bit]) then
+                   begin
+                     result := nil;
+
+                     case torddef(resultdef).ordtype of
+                       s16bit:
+                         procname := 'fpc_mul_integer';
+                       u16bit:
+                         procname := 'fpc_mul_word';
+                       s32bit:
+                         procname := 'fpc_mul_longint';
+                       u32bit:
+                         procname := 'fpc_mul_dword';
+                       else
+                         internalerror(2011022301);
+                     end;
+                     result := ccallnode.createintern(procname,
+                       ccallparanode.create(cordconstnode.create(0,booltype,false),
+                       ccallparanode.create(right,
+                       ccallparanode.create(left,nil))));
+                     left := nil;
+                     right := nil;
+                     firstpass(result);
+                     exit;
+                   end;
+{$endif cpuneedsmulhelper}
                   if nodetype in [addn,subn,muln,andn,orn,xorn] then
                   if nodetype in [addn,subn,muln,andn,orn,xorn] then
                     expectloc:=LOC_REGISTER
                     expectloc:=LOC_REGISTER
                   else
                   else

+ 2 - 2
compiler/nbas.pas

@@ -98,10 +98,10 @@ interface
                         ti_addr_taken,ti_executeinitialisation);
                         ti_addr_taken,ti_executeinitialisation);
        ttempinfoflags = set of ttempinfoflag;
        ttempinfoflags = set of ttempinfoflag;
 
 
-const
+     const
        tempinfostoreflags = [ti_may_be_in_reg,ti_addr_taken];
        tempinfostoreflags = [ti_may_be_in_reg,ti_addr_taken];
 
 
-type
+     type
        { to allow access to the location by temp references even after the temp has }
        { to allow access to the location by temp references even after the temp has }
        { already been disposed and to make sure the coherency between temps and     }
        { already been disposed and to make sure the coherency between temps and     }
        { temp references is kept after a getcopy                                    }
        { temp references is kept after a getcopy                                    }

+ 45 - 22
compiler/ncal.pas

@@ -230,7 +230,8 @@ interface
        );
        );
 
 
     function reverseparameters(p: tcallparanode): tcallparanode;
     function reverseparameters(p: tcallparanode): tcallparanode;
-    function translate_disp_call(selfnode,parametersnode: tnode; calltype: tdispcalltype; const methodname : ansistring;dispid : longint;resultdef : tdef) : tnode;
+    function translate_disp_call(selfnode,parametersnode: tnode; calltype: tdispcalltype; const methodname : ansistring;
+      dispid : longint;resultdef : tdef) : tnode;
 
 
     var
     var
       ccallnode : tcallnodeclass = tcallnode;
       ccallnode : tcallnodeclass = tcallnode;
@@ -282,7 +283,8 @@ implementation
         reverseparameters:=hp1;
         reverseparameters:=hp1;
       end;
       end;
 
 
-    function translate_disp_call(selfnode,parametersnode: tnode; calltype: tdispcalltype; const methodname : ansistring;dispid : longint;resultdef : tdef) : tnode;
+    function translate_disp_call(selfnode,parametersnode: tnode; calltype: tdispcalltype; const methodname : ansistring;
+      dispid : longint;resultdef : tdef) : tnode;
       const
       const
         DISPATCH_METHOD = $1;
         DISPATCH_METHOD = $1;
         DISPATCH_PROPERTYGET = $2;
         DISPATCH_PROPERTYGET = $2;
@@ -1318,7 +1320,6 @@ implementation
 
 
 
 
     procedure tcallnode.insertintolist(l : tnodelist);
     procedure tcallnode.insertintolist(l : tnodelist);
-
       begin
       begin
       end;
       end;
 
 
@@ -1805,14 +1806,14 @@ implementation
               if not(cnf_dispose_call in callnodeflags) and
               if not(cnf_dispose_call in callnodeflags) and
                  not(cnf_inherited in callnodeflags) and
                  not(cnf_inherited in callnodeflags) and
                  not(cnf_member_call in callnodeflags) then
                  not(cnf_member_call in callnodeflags) then
-             begin
-               if (procdefinition.proctypeoption=potype_constructor) then
-                 begin
-                   if (methodpointer.nodetype<>typen) and
-                      checklive(methodpointer.resultdef) then
-                     methodpointer.resultdef.register_created_object_type;
-                 end
-             end;
+                begin
+                  if (procdefinition.proctypeoption=potype_constructor) then
+                    begin
+                      if (methodpointer.nodetype<>typen) and
+                         checklive(methodpointer.resultdef) then
+                        methodpointer.resultdef.register_created_object_type;
+                    end
+                end;
           end;
           end;
        end;
        end;
 
 
@@ -2713,7 +2714,9 @@ implementation
                   { ignore possible private for properties or in delphi mode for anon. inherited (FK) }
                   { ignore possible private for properties or in delphi mode for anon. inherited (FK) }
                   ignorevisibility:=(nf_isproperty in flags) or
                   ignorevisibility:=(nf_isproperty in flags) or
                                     ((m_delphi in current_settings.modeswitches) and (cnf_anon_inherited in callnodeflags));
                                     ((m_delphi in current_settings.modeswitches) and (cnf_anon_inherited in callnodeflags));
-                  candidates:=tcallcandidates.create(symtableprocentry,symtableproc,left,ignorevisibility,not(nf_isproperty in flags),cnf_objc_id_call in callnodeflags,cnf_unit_specified in callnodeflags,callnodeflags*[cnf_anon_inherited,cnf_inherited]=[]);
+                  candidates:=tcallcandidates.create(symtableprocentry,symtableproc,left,ignorevisibility,
+                    not(nf_isproperty in flags),cnf_objc_id_call in callnodeflags,cnf_unit_specified in callnodeflags,
+                    callnodeflags*[cnf_anon_inherited,cnf_inherited]=[]);
 
 
                    { no procedures found? then there is something wrong
                    { no procedures found? then there is something wrong
                      with the parameter size or the procedures are
                      with the parameter size or the procedures are
@@ -2847,7 +2850,8 @@ implementation
                 { Ignore vs_hidden parameters }
                 { Ignore vs_hidden parameters }
                 repeat
                 repeat
                   inc(paraidx);
                   inc(paraidx);
-                until (paraidx>=procdefinition.paras.count) or not(vo_is_hidden_para in tparavarsym(procdefinition.paras[paraidx]).varoptions);
+                until (paraidx>=procdefinition.paras.count) or
+                  not(vo_is_hidden_para in tparavarsym(procdefinition.paras[paraidx]).varoptions);
               end;
               end;
            end;
            end;
 
 
@@ -2864,7 +2868,19 @@ implementation
            begin
            begin
              if assigned(left) then
              if assigned(left) then
               begin
               begin
-                { ptr and settextbuf needs two args }
+                { convert types to those of the prototype, this is required by functions like ror, rol, sar
+                  some use however a dummy type (Typedfile) so this would break them }
+                if not(tprocdef(procdefinition).extnumber in [fpc_in_Reset_TypedFile,fpc_in_Rewrite_TypedFile]) then
+                  begin
+                    { bind parasyms to the callparanodes and insert hidden parameters }
+                    bind_parasym;
+
+                    { insert type conversions for parameters }
+                    if assigned(left) then
+                      tcallparanode(left).insert_typeconv;
+                  end;
+
+                { ptr and settextbuf need two args }
                 if assigned(tcallparanode(left).right) then
                 if assigned(tcallparanode(left).right) then
                  begin
                  begin
                    hpt:=geninlinenode(tprocdef(procdefinition).extnumber,is_const,left);
                    hpt:=geninlinenode(tprocdef(procdefinition).extnumber,is_const,left);
@@ -3021,10 +3037,12 @@ implementation
              if (cnf_return_value_used in callnodeflags) and not is_void(procdefinition.returndef) then
              if (cnf_return_value_used in callnodeflags) and not is_void(procdefinition.returndef) then
                begin
                begin
                  result:=internalstatements(statements);
                  result:=internalstatements(statements);
-                 converted_result_data:=ctempcreatenode.create(procdefinition.returndef,sizeof(procdefinition.returndef),tt_persistent,true);
+                 converted_result_data:=ctempcreatenode.create(procdefinition.returndef,sizeof(procdefinition.returndef),
+                   tt_persistent,true);
                  addstatement(statements,converted_result_data);
                  addstatement(statements,converted_result_data);
                  addstatement(statements,cassignmentnode.create(ctemprefnode.create(converted_result_data),
                  addstatement(statements,cassignmentnode.create(ctemprefnode.create(converted_result_data),
-                   ctypeconvnode.create_internal(translate_disp_call(methodpointer,parameters,calltype,'',tprocdef(procdefinition).dispid,procdefinition.returndef),
+                   ctypeconvnode.create_internal(
+                     translate_disp_call(methodpointer,parameters,calltype,'',tprocdef(procdefinition).dispid,procdefinition.returndef),
                    procdefinition.returndef)));
                    procdefinition.returndef)));
                  addstatement(statements,ctempdeletenode.create_normal_temp(converted_result_data));
                  addstatement(statements,ctempdeletenode.create_normal_temp(converted_result_data));
                  addstatement(statements,ctemprefnode.create(converted_result_data));
                  addstatement(statements,ctemprefnode.create(converted_result_data));
@@ -3120,7 +3138,8 @@ implementation
                             { parameter to be in this order so it can use   }
                             { parameter to be in this order so it can use   }
                             { pushes in case of no fixed stack              }
                             { pushes in case of no fixed stack              }
                             if (not paramanager.use_fixed_stack and
                             if (not paramanager.use_fixed_stack and
-                                (hpcurr.parasym.paraloc[callerside].location^.reference.offset>hp.parasym.paraloc[callerside].location^.reference.offset)) or
+                                (hpcurr.parasym.paraloc[callerside].location^.reference.offset>
+                                 hp.parasym.paraloc[callerside].location^.reference.offset)) or
                                (paramanager.use_fixed_stack and
                                (paramanager.use_fixed_stack and
                                 (node_complexity(hpcurr)<node_complexity(hp))) then
                                 (node_complexity(hpcurr)<node_complexity(hp))) then
 {$else i386}
 {$else i386}
@@ -3224,7 +3243,8 @@ implementation
               begin
               begin
                 if not para.can_be_inlined then
                 if not para.can_be_inlined then
                   begin
                   begin
-                    Comment(V_lineinfo+V_Debug,'Not inlining "'+tprocdef(procdefinition).procsym.realname+'", invocation parameter contains an unsafe/unsupported construct');
+                    Comment(V_lineinfo+V_Debug,'Not inlining "'+tprocdef(procdefinition).procsym.realname+
+                      '", invocation parameter contains an unsafe/unsupported construct');
                     exclude(callnodeflags,cnf_do_inline);
                     exclude(callnodeflags,cnf_do_inline);
                     break;
                     break;
                   end;
                   end;
@@ -3476,7 +3496,8 @@ implementation
           end
           end
         else
         else
           begin
           begin
-            tempnode :=ctempcreatenode.create(tabstractvarsym(p).vardef,tabstractvarsym(p).vardef.size,tt_persistent,tabstractvarsym(p).is_regvar(false));
+            tempnode :=ctempcreatenode.create(tabstractvarsym(p).vardef,
+              tabstractvarsym(p).vardef.size,tt_persistent,tabstractvarsym(p).is_regvar(false));
             addstatement(inlineinitstatement,tempnode);
             addstatement(inlineinitstatement,tempnode);
             addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
             addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
             { inherit addr_taken flag }
             { inherit addr_taken flag }
@@ -3617,7 +3638,8 @@ implementation
                        (((tparavarsym(para.parasym).varregable in [vr_none,vr_addr])) and
                        (((tparavarsym(para.parasym).varregable in [vr_none,vr_addr])) and
                         (ti_may_be_in_reg in ttemprefnode(para.left).tempinfo^.flags)) then
                         (ti_may_be_in_reg in ttemprefnode(para.left).tempinfo^.flags)) then
                       begin
                       begin
-                        tempnode := ctempcreatenode.create(para.parasym.vardef,para.parasym.vardef.size,tt_persistent,tparavarsym(para.parasym).is_regvar(false));
+                        tempnode := ctempcreatenode.create(para.parasym.vardef,para.parasym.vardef.size,
+                          tt_persistent,tparavarsym(para.parasym).is_regvar(false));
                         addstatement(inlineinitstatement,tempnode);
                         addstatement(inlineinitstatement,tempnode);
                         addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
                         addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
                         addstatement(inlineinitstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
                         addstatement(inlineinitstatement,cassignmentnode.create(ctemprefnode.create(tempnode),
@@ -3668,7 +3690,7 @@ implementation
         result:=nil;
         result:=nil;
         if not assigned(funcretnode) or
         if not assigned(funcretnode) or
            not(cnf_return_value_used in callnodeflags) then
            not(cnf_return_value_used in callnodeflags) then
-        exit;
+          exit;
 
 
         { tempcreatenode for the function result }
         { tempcreatenode for the function result }
         hp:=tstatementnode(inlineblock.left);
         hp:=tstatementnode(inlineblock.left);
@@ -3736,7 +3758,8 @@ implementation
         inlinelocals:=TFPObjectList.create(true);
         inlinelocals:=TFPObjectList.create(true);
 
 
         { inherit flags }
         { inherit flags }
-        current_procinfo.flags := current_procinfo.flags + ((procdefinition as tprocdef).inlininginfo^.flags*inherited_inlining_flags);
+        current_procinfo.flags:=current_procinfo.flags+
+          ((procdefinition as tprocdef).inlininginfo^.flags*inherited_inlining_flags);
 
 
         { Create new code block for inlining }
         { Create new code block for inlining }
         inlineblock:=internalstatements(inlineinitstatement);
         inlineblock:=internalstatements(inlineinitstatement);

+ 2 - 2
compiler/ncgadd.pas

@@ -208,8 +208,8 @@ interface
 {$ifndef cpu64bitalu}
 {$ifndef cpu64bitalu}
             if location.size in [OS_64,OS_S64] then
             if location.size in [OS_64,OS_S64] then
               begin
               begin
-                location.register64.reglo := cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
-                location.register64.reghi := cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+                location.register64.reglo := cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+                location.register64.reghi := cg.getintregister(current_asmdata.CurrAsmList,OS_32);
               end
               end
             else
             else
 {$endif}
 {$endif}

+ 114 - 0
compiler/ncgcnv.pas

@@ -30,6 +30,9 @@ interface
        node,ncnv,defutil,defcmp;
        node,ncnv,defutil,defcmp;
 
 
     type
     type
+
+       { tcgtypeconvnode }
+
        tcgtypeconvnode = class(ttypeconvnode)
        tcgtypeconvnode = class(ttypeconvnode)
          procedure second_int_to_int;override;
          procedure second_int_to_int;override;
          procedure second_cstring_to_pchar;override;
          procedure second_cstring_to_pchar;override;
@@ -49,6 +52,10 @@ interface
          procedure second_char_to_char;override;
          procedure second_char_to_char;override;
          procedure second_nothing;override;
          procedure second_nothing;override;
          procedure pass_generate_code;override;
          procedure pass_generate_code;override;
+{$ifdef cpuflags}
+         { CPUs without flags need a specific implementation of int -> bool }
+         procedure second_int_to_bool;override;
+{$endif cpuflags}
        end;
        end;
 
 
        tcgasnode = class(tasnode)
        tcgasnode = class(tasnode)
@@ -131,6 +138,113 @@ interface
       end;
       end;
 
 
 
 
+{$ifdef cpuflags}
+    procedure tcgtypeconvnode.second_int_to_bool;
+      var
+        hregister : tregister;
+        href      : treference;
+        resflags  : tresflags;
+        hlabel,oldTrueLabel,oldFalseLabel : tasmlabel;
+        newsize   : tcgsize;
+      begin
+        oldTrueLabel:=current_procinfo.CurrTrueLabel;
+        oldFalseLabel:=current_procinfo.CurrFalseLabel;
+        current_asmdata.getjumplabel(current_procinfo.CurrTrueLabel);
+        current_asmdata.getjumplabel(current_procinfo.CurrFalseLabel);
+        secondpass(left);
+        if codegenerror then
+         exit;
+
+        { Explicit typecasts from any ordinal type to a boolean type }
+        { must not change the ordinal value                          }
+        if (nf_explicit in flags) and
+           not(left.location.loc in [LOC_FLAGS,LOC_JUMP]) then
+          begin
+             location_copy(location,left.location);
+             newsize:=def_cgsize(resultdef);
+             { change of size? change sign only if location is LOC_(C)REGISTER? Then we have to sign/zero-extend }
+             if (tcgsize2size[newsize]<>tcgsize2size[left.location.size]) or
+                ((newsize<>left.location.size) and (location.loc in [LOC_REGISTER,LOC_CREGISTER])) then
+               location_force_reg(current_asmdata.CurrAsmList,location,newsize,true)
+             else
+               location.size:=newsize;
+             current_procinfo.CurrTrueLabel:=oldTrueLabel;
+             current_procinfo.CurrFalseLabel:=oldFalseLabel;
+             exit;
+          end;
+        { though ppc/ppc64 doesn't use the generic code, we need to ifdef here
+          because the code is included into the powerpc compilers }
+{$if defined(POWERPC) or defined(POWERPC64)}
+        resflags.cr := RS_CR0;
+        resflags.flag:=F_NE;
+{$else defined(POWERPC) or defined(POWERPC64)}
+        { Load left node into flag F_NE/F_E }
+        resflags:=F_NE;
+{$endif defined(POWERPC) or defined(POWERPC64)}
+        case left.location.loc of
+          LOC_CREFERENCE,
+          LOC_REFERENCE :
+            begin
+              if left.location.size in [OS_64,OS_S64] then
+               begin
+                 hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+                 cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_32,OS_32,left.location.reference,hregister);
+                 href:=left.location.reference;
+                 inc(href.offset,4);
+                 cg.a_op_ref_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,href,hregister);
+               end
+              else
+               begin
+                 location_force_reg(current_asmdata.CurrAsmList,left.location,left.location.size,true);
+                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,left.location.size,left.location.register,left.location.register);
+               end;
+            end;
+          LOC_FLAGS :
+            begin
+              resflags:=left.location.resflags;
+            end;
+          LOC_REGISTER,LOC_CREGISTER :
+            begin
+{$ifndef cpu64bitalu}
+              if left.location.size in [OS_64,OS_S64] then
+               begin
+                 hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_32);
+                 cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_32,OS_32,left.location.register64.reglo,hregister);
+                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_32,left.location.register64.reghi,hregister);
+               end
+              else
+{$endif cpu64bitalu}
+               begin
+                 cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,left.location.size,left.location.register,left.location.register);
+               end;
+            end;
+          LOC_JUMP :
+            begin
+              hregister:=cg.getintregister(current_asmdata.CurrAsmList,OS_INT);
+              current_asmdata.getjumplabel(hlabel);
+              cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrTrueLabel);
+              cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_INT,1,hregister);
+              cg.a_jmp_always(current_asmdata.CurrAsmList,hlabel);
+              cg.a_label(current_asmdata.CurrAsmList,current_procinfo.CurrFalseLabel);
+              cg.a_load_const_reg(current_asmdata.CurrAsmList,OS_INT,0,hregister);
+              cg.a_label(current_asmdata.CurrAsmList,hlabel);
+              cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_OR,OS_INT,hregister,hregister);
+            end;
+          else
+            internalerror(200311301);
+        end;
+        { load flags to register }
+        location_reset(location,LOC_REGISTER,def_cgsize(resultdef));
+        location.register:=cg.getintregister(current_asmdata.CurrAsmList,location.size);
+        cg.g_flags2reg(current_asmdata.CurrAsmList,location.size,resflags,location.register);
+        if (is_cbool(resultdef)) then
+          cg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,location.size,location.register,location.register);
+        current_procinfo.CurrTrueLabel:=oldTrueLabel;
+        current_procinfo.CurrFalseLabel:=oldFalseLabel;
+      end;
+{$endif cpuflags}
+
+
     procedure tcgtypeconvnode.second_cstring_to_pchar;
     procedure tcgtypeconvnode.second_cstring_to_pchar;
 
 
       var
       var

+ 35 - 91
compiler/ncgcon.pas

@@ -109,10 +109,22 @@ implementation
       const
       const
         floattype2ait:array[tfloattype] of taitype=
         floattype2ait:array[tfloattype] of taitype=
           (ait_real_32bit,ait_real_64bit,ait_real_80bit,ait_real_80bit,ait_comp_64bit,ait_comp_64bit,ait_real_128bit);
           (ait_real_32bit,ait_real_64bit,ait_real_80bit,ait_real_80bit,ait_comp_64bit,ait_comp_64bit,ait_real_128bit);
+
+      { Since the value is stored always as bestreal, we share a single pool
+        between all float types. This requires type and hiloswapped flag to
+        be matched along with the value }
+      type
+        tfloatkey = record
+          value: bestreal;
+          typ: tfloattype;
+          swapped: boolean;
+        end;
+
       var
       var
-         hp1 : tai;
          lastlabel : tasmlabel;
          lastlabel : tasmlabel;
          realait : taitype;
          realait : taitype;
+         entry : PHashSetItem;
+         key: tfloatkey;
 {$ifdef ARM}
 {$ifdef ARM}
          hiloswapped : boolean;
          hiloswapped : boolean;
 {$endif ARM}
 {$endif ARM}
@@ -127,44 +139,25 @@ implementation
         { const already used ? }
         { const already used ? }
         if not assigned(lab_real) then
         if not assigned(lab_real) then
           begin
           begin
-             { tries to find an old entry }
-             hp1:=tai(current_asmdata.asmlists[al_typedconsts].first);
-             while assigned(hp1) do
-               begin
-                  if hp1.typ=ait_label then
-                    lastlabel:=tai_label(hp1).labsym
-                  else
-                    begin
-                       if (hp1.typ=realait) and (lastlabel<>nil) then
-                         begin
-                            if is_number_float(value_real) and
-                              (
-                               ((realait=ait_real_32bit) and (tai_real_32bit(hp1).value=value_real) and is_number_float(tai_real_32bit(hp1).value) and (get_real_sign(value_real) = get_real_sign(tai_real_32bit(hp1).value))) or
-                               ((realait=ait_real_64bit) and
+            if current_asmdata.ConstPools[sp_floats] = nil then
+              current_asmdata.ConstPools[sp_floats] := THashSet.Create(64, True, False);
+
+            { there may be gap between record fields, zero it out }
+            fillchar(key,sizeof(key),0);
+            key.value:=value_real;
+            key.typ:=tfloatdef(resultdef).floattype;
 {$ifdef ARM}
 {$ifdef ARM}
-                                 ((tai_real_64bit(hp1).formatoptions=fo_hiloswapped)=hiloswapped) and
+            key.swapped:=hiloswapped;
 {$endif ARM}
 {$endif ARM}
-                                 (tai_real_64bit(hp1).value=value_real) and is_number_float(tai_real_64bit(hp1).value) and (get_real_sign(value_real) = get_real_sign(tai_real_64bit(hp1).value))) or
-                               ((realait=ait_real_80bit) and (tai_real_80bit(hp1).value=value_real) and (tai_real_80bit(hp1).savesize=resultdef.size) and is_number_float(tai_real_80bit(hp1).value) and (get_real_sign(value_real) = get_real_sign(tai_real_80bit(hp1).value))) or
-{$ifdef cpufloat128}
-                               ((realait=ait_real_128bit) and (tai_real_128bit(hp1).value=value_real) and is_number_float(tai_real_128bit(hp1).value) and (get_real_sign(value_real) = get_real_sign(tai_real_128bit(hp1).value))) or
-{$endif cpufloat128}
-                               ((realait=ait_comp_64bit) and (tai_comp_64bit(hp1).value=value_real) and is_number_float(tai_comp_64bit(hp1).value) and (get_real_sign(value_real) = get_real_sign(tai_comp_64bit(hp1).value)))
-                              ) then
-                              begin
-                                { found! }
-                                lab_real:=lastlabel;
-                                break;
-                              end;
-                         end;
-                       lastlabel:=nil;
-                    end;
-                  hp1:=tai(hp1.next);
-               end;
+            entry := current_asmdata.ConstPools[sp_floats].FindOrAdd(@key, sizeof(key));
+
+            lab_real := TAsmLabel(entry^.Data);  // is it needed anymore?
+
              { :-(, we must generate a new entry }
              { :-(, we must generate a new entry }
              if not assigned(lab_real) then
              if not assigned(lab_real) then
                begin
                begin
                   current_asmdata.getdatalabel(lastlabel);
                   current_asmdata.getdatalabel(lastlabel);
+                  entry^.Data:=lastlabel;
                   lab_real:=lastlabel;
                   lab_real:=lastlabel;
                   maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
                   maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
                   new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,lastlabel.name,const_align(resultdef.alignment));
                   new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,lastlabel.name,const_align(resultdef.alignment));
@@ -412,76 +405,27 @@ implementation
 
 
         procedure varsetconst;
         procedure varsetconst;
         var
         var
-           hp1         : tai;
            lastlabel   : tasmlabel;
            lastlabel   : tasmlabel;
            i           : longint;
            i           : longint;
-           neededtyp   : taiconst_type;
+           entry       : PHashSetItem;
         begin
         begin
           location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(8));
           location_reset_ref(location,LOC_CREFERENCE,OS_NO,const_align(8));
-          neededtyp:=aitconst_8bit;
           lastlabel:=nil;
           lastlabel:=nil;
           { const already used ? }
           { const already used ? }
           if not assigned(lab_set) then
           if not assigned(lab_set) then
             begin
             begin
-              { tries to found an old entry }
-              hp1:=tai(current_asmdata.asmlists[al_typedconsts].first);
-              while assigned(hp1) do
-                begin
-                   if hp1.typ=ait_label then
-                     lastlabel:=tai_label(hp1).labsym
-                   else
-                     begin
-                       if (lastlabel<>nil) and
-                         (hp1.typ=ait_const) and
-                         (tai_const(hp1).consttype=neededtyp) then
-                         begin
-                           if (tai_const(hp1).consttype=aitconst_8bit) then
-                            begin
-                              { compare normal set }
-                              i:=0;
-                              while assigned(hp1) and (i<32) do
-                               begin
-                                 if (source_info.endian=target_info.endian) then
-                                   begin
-                                     if tai_const(hp1).value<>Psetbytes(value_set)^[i ] then
-                                       break
-                                   end
-                                 else if tai_const(hp1).value<>reverse_byte(Psetbytes(value_set)^[i]) then
-                                   break;
-                                 inc(i);
-                                 hp1:=tai(hp1.next);
-                               end;
-                              if i=32 then
-                               begin
-                                 { found! }
-                                 lab_set:=lastlabel;
-                                 break;
-                               end;
-                              { leave when the end of consts is reached, so no
-                                hp1.next is done }
-                              if not assigned(hp1) then
-                               break;
-                            end
-                           else
-                            begin
-                              { compare small set }
-                              if paint(value_set)^=tai_const(hp1).value then
-                               begin
-                                 { found! }
-                                 lab_set:=lastlabel;
-                                 break;
-                               end;
-                            end;
-                         end;
-                       lastlabel:=nil;
-                     end;
-                   hp1:=tai(hp1.next);
-                 end;
+              if current_asmdata.ConstPools[sp_varsets] = nil then
+                current_asmdata.ConstPools[sp_varsets] := THashSet.Create(64, True, False);
+              entry := current_asmdata.ConstPools[sp_varsets].FindOrAdd(value_set, 32);
+
+              lab_set := TAsmLabel(entry^.Data);  // is it needed anymore?
+
                { :-(, we must generate a new entry }
                { :-(, we must generate a new entry }
-               if not assigned(lab_set) then
+               if not assigned(entry^.Data) then
                  begin
                  begin
                    current_asmdata.getdatalabel(lastlabel);
                    current_asmdata.getdatalabel(lastlabel);
                    lab_set:=lastlabel;
                    lab_set:=lastlabel;
+                   entry^.Data:=lastlabel;
                    maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
                    maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
                    new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,lastlabel.name,const_align(8));
                    new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,lastlabel.name,const_align(8));
                    current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));
                    current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(lastlabel));

+ 6 - 0
compiler/ncgflw.pas

@@ -1178,11 +1178,17 @@ implementation
               get_exception_temps(current_asmdata.CurrAsmList,destroytemps);
               get_exception_temps(current_asmdata.CurrAsmList,destroytemps);
               new_exception(current_asmdata.CurrAsmList,destroytemps,doobjectdestroyandreraise);
               new_exception(current_asmdata.CurrAsmList,destroytemps,doobjectdestroyandreraise);
 
 
+              { except block needs line info }
+              current_asmdata.CurrAsmList.concat(tai_marker.create(mark_NoLineInfoEnd));
+
               { here we don't have to reset flowcontrol           }
               { here we don't have to reset flowcontrol           }
               { the default and on flowcontrols are handled equal }
               { the default and on flowcontrols are handled equal }
               secondpass(t1);
               secondpass(t1);
               exceptflowcontrol:=flowcontrol;
               exceptflowcontrol:=flowcontrol;
 
 
+              { don't generate line info for internal cleanup }
+              current_asmdata.CurrAsmList.concat(tai_marker.create(mark_NoLineInfoStart));
+
               cg.a_label(current_asmdata.CurrAsmList,doobjectdestroyandreraise);
               cg.a_label(current_asmdata.CurrAsmList,doobjectdestroyandreraise);
 
 
               free_exception(current_asmdata.CurrAsmList,destroytemps,0,doobjectdestroy,false);
               free_exception(current_asmdata.CurrAsmList,destroytemps,0,doobjectdestroy,false);

+ 4 - 4
compiler/ncginl.pas

@@ -163,9 +163,9 @@ implementation
               end;
               end;
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
             in_rol_x,
             in_rol_x,
-            in_rol_x_x,
+            in_rol_x_y,
             in_ror_x,
             in_ror_x,
-            in_ror_x_x:
+            in_ror_x_y:
               second_rox;
               second_rox;
             in_sar_x,
             in_sar_x,
             in_sar_x_y:
             in_sar_x_y:
@@ -741,10 +741,10 @@ implementation
         location_copy(location,op1.location);
         location_copy(location,op1.location);
         case inlinenumber of
         case inlinenumber of
           in_ror_x,
           in_ror_x,
-          in_ror_x_x:
+          in_ror_x_y:
             op:=OP_ROR;
             op:=OP_ROR;
           in_rol_x,
           in_rol_x,
-          in_rol_x_x:
+          in_rol_x_y:
             op:=OP_ROL;
             op:=OP_ROL;
         end;
         end;
         location_force_reg(current_asmdata.CurrAsmList,location,location.size,false);
         location_force_reg(current_asmdata.CurrAsmList,location,location.size,false);

+ 10 - 5
compiler/ncgld.pas

@@ -567,6 +567,7 @@ implementation
          otlabel,hlabel,oflabel : tasmlabel;
          otlabel,hlabel,oflabel : tasmlabel;
          href : treference;
          href : treference;
          releaseright : boolean;
          releaseright : boolean;
+         alignmentrequirement,
          len : aint;
          len : aint;
          r : tregister;
          r : tregister;
          oldflowcontrol : tflowcontrol;
          oldflowcontrol : tflowcontrol;
@@ -777,13 +778,17 @@ implementation
 { TODO: HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler}
 { TODO: HACK: unaligned test, maybe remove all unaligned locations (array of char) from the compiler}
                             { Use unaligned copy when the offset is not aligned }
                             { Use unaligned copy when the offset is not aligned }
                             len:=left.resultdef.size;
                             len:=left.resultdef.size;
-                            if (right.location.reference.offset mod sizeof(aint)<>0) or
-                              (left.location.reference.offset mod sizeof(aint)<>0) or
-                              (right.resultdef.alignment<sizeof(aint)) or
+
+                            { data smaller than an aint has less alignment requirements }
+                            alignmentrequirement:=min(len,sizeof(aint));
+
+                            if (right.location.reference.offset mod alignmentrequirement<>0) or
+                              (left.location.reference.offset mod alignmentrequirement<>0) or
+                              (right.resultdef.alignment<alignmentrequirement) or
                               ((right.location.reference.alignment<>0) and
                               ((right.location.reference.alignment<>0) and
-                               (right.location.reference.alignment<sizeof(aint))) or
+                               (right.location.reference.alignment<alignmentrequirement)) or
                               ((left.location.reference.alignment<>0) and
                               ((left.location.reference.alignment<>0) and
-                               (left.location.reference.alignment<sizeof(aint))) then
+                               (left.location.reference.alignment<alignmentrequirement)) then
                               cg.g_concatcopy_unaligned(current_asmdata.CurrAsmList,right.location.reference,left.location.reference,len)
                               cg.g_concatcopy_unaligned(current_asmdata.CurrAsmList,right.location.reference,left.location.reference,len)
                             else
                             else
                               cg.g_concatcopy(current_asmdata.CurrAsmList,right.location.reference,left.location.reference,len);
                               cg.g_concatcopy(current_asmdata.CurrAsmList,right.location.reference,left.location.reference,len);

+ 5 - 0
compiler/ncgmat.pas

@@ -410,11 +410,16 @@ implementation
            shln: op:=OP_SHL;
            shln: op:=OP_SHL;
            shrn: op:=OP_SHR;
            shrn: op:=OP_SHR;
          end;
          end;
+{$ifdef cpunodefaultint}
+        opsize:=left.location.size;
+{$else cpunodefaultint}
          { load left operators in a register }
          { load left operators in a register }
          if is_signed(left.resultdef) then
          if is_signed(left.resultdef) then
            opsize:=OS_SINT
            opsize:=OS_SINT
          else
          else
            opsize:=OS_INT;
            opsize:=OS_INT;
+{$endif cpunodefaultint}
+
          location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,true);
          location_force_reg(current_asmdata.CurrAsmList,left.location,opsize,true);
          location_reset(location,LOC_REGISTER,opsize);
          location_reset(location,LOC_REGISTER,opsize);
          location.register:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
          location.register:=cg.getintregister(current_asmdata.CurrAsmList,opsize);

+ 2 - 0
compiler/ncgrtti.pas

@@ -478,6 +478,8 @@ implementation
             end;
             end;
           { write unit name }
           { write unit name }
           write_string(current_module.realmodulename^);
           write_string(current_module.realmodulename^);
+          { write zero which is required by RTL }
+          current_asmdata.asmlists[al_rtti].concat(Tai_const.Create_8bit(0));
         end;
         end;
 
 
         procedure orddef_rtti(def:torddef);
         procedure orddef_rtti(def:torddef);

+ 16 - 39
compiler/ncgutil.pas

@@ -159,8 +159,6 @@ interface
 
 
     function getprocalign : shortint;
     function getprocalign : shortint;
 
 
-    procedure gen_pic_helpers(list : TAsmList);
-
     procedure gen_fpc_dummy(list : TAsmList);
     procedure gen_fpc_dummy(list : TAsmList);
 
 
     procedure InsertInterruptTable;
     procedure InsertInterruptTable;
@@ -493,11 +491,18 @@ implementation
               { load a smaller size to OS_64 }
               { load a smaller size to OS_64 }
               if l.loc=LOC_REGISTER then
               if l.loc=LOC_REGISTER then
                begin
                begin
+{$ifdef AVR}
+                 { on avr, we cannot change the size of a register
+                   due to the nature how register with size > OS8 are handled
+                 }
+                 hregister:=cg.getintregister(list,OS_32);
+{$else AVR}
                  hregister:=cg.makeregsize(list,l.register64.reglo,OS_32);
                  hregister:=cg.makeregsize(list,l.register64.reglo,OS_32);
+{$endif AVR}
                  cg.a_load_reg_reg(list,l.size,OS_32,l.register64.reglo,hregister);
                  cg.a_load_reg_reg(list,l.size,OS_32,l.register64.reglo,hregister);
                end
                end
               else
               else
-               hregister:=cg.getintregister(list,OS_INT);
+               hregister:=cg.getintregister(list,OS_32);
               { load value in low register }
               { load value in low register }
               case l.loc of
               case l.loc of
 {$ifdef cpuflags}
 {$ifdef cpuflags}
@@ -518,7 +523,7 @@ implementation
                   cg.a_load_loc_reg(list,OS_INT,l,hregister);
                   cg.a_load_loc_reg(list,OS_INT,l,hregister);
               end;
               end;
               { reset hi part, take care of the signed bit of the current value }
               { reset hi part, take care of the signed bit of the current value }
-              hregisterhi:=cg.getintregister(list,OS_INT);
+              hregisterhi:=cg.getintregister(list,OS_32);
               if (l.size in [OS_S8,OS_S16,OS_S32]) then
               if (l.size in [OS_S8,OS_S16,OS_S32]) then
                begin
                begin
                  if l.loc=LOC_CONSTANT then
                  if l.loc=LOC_CONSTANT then
@@ -551,8 +556,8 @@ implementation
                end
                end
               else
               else
                begin
                begin
-                 hregister:=cg.getintregister(list,OS_INT);
-                 hregisterhi:=cg.getintregister(list,OS_INT);
+                 hregister:=cg.getintregister(list,OS_32);
+                 hregisterhi:=cg.getintregister(list,OS_32);
                  const_location := false;
                  const_location := false;
                end;
                end;
               hreg64.reglo:=hregister;
               hreg64.reglo:=hregister;
@@ -622,8 +627,8 @@ implementation
                         l.reference.alignment:=newalignment(l.reference.alignment,TCGSize2Size[l.size]-TCGSize2Size[dst_size]);
                         l.reference.alignment:=newalignment(l.reference.alignment,TCGSize2Size[l.size]-TCGSize2Size[dst_size]);
                       end;
                       end;
 {$ifdef x86}
 {$ifdef x86}
-                  if not (l.loc in [LOC_SUBSETREG,LOC_CSUBSETREG]) then
-                     l.size:=dst_size;
+                    if not (l.loc in [LOC_SUBSETREG,LOC_CSUBSETREG]) then
+                      l.size:=dst_size;
 {$endif x86}
 {$endif x86}
                   end;
                   end;
                  cg.a_load_loc_reg(list,dst_size,l,hregister);
                  cg.a_load_loc_reg(list,dst_size,l,hregister);
@@ -2531,7 +2536,7 @@ implementation
         if sym.section<>'' then
         if sym.section<>'' then
           new_section(list,sec_user,sym.section,varalign)
           new_section(list,sec_user,sym.section,varalign)
         else
         else
-         new_section(list,sectype,lower(sym.mangledname),varalign);
+          new_section(list,sectype,lower(sym.mangledname),varalign);
         if (sym.owner.symtabletype=globalsymtable) or
         if (sym.owner.symtabletype=globalsymtable) or
            create_smartlink or
            create_smartlink or
            DLLSource or
            DLLSource or
@@ -3098,36 +3103,6 @@ implementation
       end;
       end;
 
 
 
 
-    procedure gen_pic_helpers(list : TAsmList);
-{$ifdef i386}
-      var
-        href : treference;
-{$endif i386}
-      begin
-        { if other cpus require such helpers as well, it can be solved more cleanly }
-{$ifdef i386}
-        if current_module.requires_ebx_pic_helper then
-          begin
-            new_section(list,sec_code,'fpc_geteipasebx',0);
-            list.concat(tai_symbol.Createname('fpc_geteipasebx',AT_FUNCTION,getprocalign));
-            reference_reset(href,sizeof(pint));
-            href.base:=NR_ESP;
-            list.concat(taicpu.op_ref_reg(A_MOV,S_L,href,NR_EBX));
-            list.concat(taicpu.op_none(A_RET,S_NO));
-          end;
-        if current_module.requires_ecx_pic_helper then
-          begin
-            new_section(list,sec_code,'fpc_geteipasecx',0);
-            list.concat(tai_symbol.Createname('fpc_geteipasecx',AT_FUNCTION,getprocalign));
-            reference_reset(href,sizeof(pint));
-            href.base:=NR_ESP;
-            list.concat(taicpu.op_ref_reg(A_MOV,S_L,href,NR_ECX));
-            list.concat(taicpu.op_none(A_RET,S_NO));
-          end;
-{$endif i386}
-      end;
-
-
     procedure gen_fpc_dummy(list : TAsmList);
     procedure gen_fpc_dummy(list : TAsmList);
       begin
       begin
 {$ifdef i386}
 {$ifdef i386}
@@ -3141,8 +3116,10 @@ implementation
     procedure InsertInterruptTable;
     procedure InsertInterruptTable;
 
 
       procedure WriteVector(const name: string);
       procedure WriteVector(const name: string);
+{$IFDEF arm}
         var
         var
           ai: taicpu;
           ai: taicpu;
+{$ENDIF arm}
         begin
         begin
 {$IFDEF arm}
 {$IFDEF arm}
           if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then
           if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then

+ 7 - 8
compiler/ncnv.pas

@@ -187,7 +187,7 @@ interface
           procedure second_nothing; virtual;abstract;
           procedure second_nothing; virtual;abstract;
        end;
        end;
        ttypeconvnodeclass = class of ttypeconvnode;
        ttypeconvnodeclass = class of ttypeconvnode;
-       
+
        { common functionality of as-nodes and is-nodes }
        { common functionality of as-nodes and is-nodes }
        tasisnode = class(tbinarynode)
        tasisnode = class(tbinarynode)
          public
          public
@@ -365,8 +365,7 @@ implementation
                    constsetlo:=tenumdef(def).min;
                    constsetlo:=tenumdef(def).min;
                  { for constant set elements, delphi allows the usage of elements of enumerations which
                  { for constant set elements, delphi allows the usage of elements of enumerations which
                    have value>255 if there is no element with a value > 255 used }
                    have value>255 if there is no element with a value > 255 used }
-                 if (maybetruncenumrange) and
-                    (m_delphi in current_settings.modeswitches) then
+                 if (maybetruncenumrange) then
                    begin
                    begin
                     if constsethi>255 then
                     if constsethi>255 then
                       constsethi:=255;
                       constsethi:=255;
@@ -1378,7 +1377,7 @@ implementation
         if assigned(tobjectdef(left.resultdef).iidstr) then
         if assigned(tobjectdef(left.resultdef).iidstr) then
           begin
           begin
             if not(oo_has_valid_guid in tobjectdef(left.resultdef).objectoptions) then
             if not(oo_has_valid_guid in tobjectdef(left.resultdef).objectoptions) then
-              CGMessage1(type_interface_has_no_guid,tobjectdef(left.resultdef).typename);
+              CGMessage1(type_e_interface_has_no_guid,tobjectdef(left.resultdef).typename);
             result:=cstringconstnode.createstr(tobjectdef(left.resultdef).iidstr^);
             result:=cstringconstnode.createstr(tobjectdef(left.resultdef).iidstr^);
             tstringconstnode(result).changestringtype(cshortstringtype);
             tstringconstnode(result).changestringtype(cshortstringtype);
           end;
           end;
@@ -1390,7 +1389,7 @@ implementation
         if assigned(tobjectdef(left.resultdef).iidguid) then
         if assigned(tobjectdef(left.resultdef).iidguid) then
           begin
           begin
             if not(oo_has_valid_guid in tobjectdef(left.resultdef).objectoptions) then
             if not(oo_has_valid_guid in tobjectdef(left.resultdef).objectoptions) then
-              CGMessage1(type_interface_has_no_guid,tobjectdef(left.resultdef).typename);
+              CGMessage1(type_e_interface_has_no_guid,tobjectdef(left.resultdef).typename);
             result:=cguidconstnode.create(tobjectdef(left.resultdef).iidguid^);
             result:=cguidconstnode.create(tobjectdef(left.resultdef).iidguid^);
           end;
           end;
       end;
       end;
@@ -1798,7 +1797,7 @@ implementation
               te_convert_operator :
               te_convert_operator :
                 begin
                 begin
                   include(current_procinfo.flags,pi_do_call);
                   include(current_procinfo.flags,pi_do_call);
-                  aprocdef.procsym.IncRefCountBy(1);
+                  addsymref(aprocdef.procsym);
                   hp:=ccallnode.create(ccallparanode.create(left,nil),Tprocsym(aprocdef.procsym),nil,nil,[]);
                   hp:=ccallnode.create(ccallparanode.create(left,nil),Tprocsym(aprocdef.procsym),nil,nil,[]);
                   { tell explicitly which def we must use !! (PM) }
                   { tell explicitly which def we must use !! (PM) }
                   tcallnode(hp).procdefinition:=aprocdef;
                   tcallnode(hp).procdefinition:=aprocdef;
@@ -2464,7 +2463,7 @@ implementation
                   fname:='int64_to_'
                   fname:='int64_to_'
                 else
                 else
                   { we can't do better currently }
                   { we can't do better currently }
-                  fname:='int64_to_';
+                  fname:='qword_to_';
               end
               end
             else
             else
               { other integers are supposed to be 32 bit }
               { other integers are supposed to be 32 bit }
@@ -3387,7 +3386,7 @@ implementation
                     if assigned(tobjectdef(right.resultdef).iidguid) then
                     if assigned(tobjectdef(right.resultdef).iidguid) then
                       begin
                       begin
                         if not(oo_has_valid_guid in tobjectdef(right.resultdef).objectoptions) then
                         if not(oo_has_valid_guid in tobjectdef(right.resultdef).objectoptions) then
-                          CGMessage1(type_interface_has_no_guid,tobjectdef(right.resultdef).typename);
+                          CGMessage1(type_e_interface_has_no_guid,tobjectdef(right.resultdef).typename);
                         hp:=cguidconstnode.create(tobjectdef(right.resultdef).iidguid^);
                         hp:=cguidconstnode.create(tobjectdef(right.resultdef).iidguid^);
                         right.free;
                         right.free;
                         right:=hp;
                         right:=hp;

+ 77 - 4
compiler/ninl.pas

@@ -1521,6 +1521,74 @@ implementation
         end;
         end;
 
 
 
 
+      function handle_const_rox : tnode;
+        var
+          vl,vl2    : TConstExprInt;
+          bits,shift: integer;
+          def : tdef;
+        begin
+          result:=nil;
+          if (left.nodetype=ordconstn) or ((left.nodetype=callparan) and (tcallparanode(left).left.nodetype=ordconstn)) then
+            begin
+              if (left.nodetype=callparan) and
+                 assigned(tcallparanode(left).right) then
+                begin
+                  if (tcallparanode(tcallparanode(left).right).left.nodetype=ordconstn) then
+                    begin
+                      def:=tcallparanode(tcallparanode(left).right).left.resultdef;
+                      vl:=tordconstnode(tcallparanode(left).left).value;
+                      vl2:=tordconstnode(tcallparanode(tcallparanode(left).right).left).value;
+                    end
+                  else
+                    exit;
+                end
+              else
+                begin
+                  def:=left.resultdef;
+                  vl:=1;
+                  vl2:=tordconstnode(left).value;
+                end;
+
+              bits:=def.size*8;
+              shift:=vl.svalue and (bits-1);
+{$push}
+{$r-,q-}
+              if shift=0 then
+                result:=cordconstnode.create(vl2.svalue,def,false)
+              else
+                case inlinenumber of
+                  in_ror_x,in_ror_x_y:
+                    case def.size of
+                      1:
+                        result:=cordconstnode.create(RorByte(Byte(vl2.svalue),shift),def,false);
+                      2:
+                        result:=cordconstnode.create(RorWord(Word(vl2.svalue),shift),def,false);
+                      4:
+                        result:=cordconstnode.create(RorDWord(DWord(vl2.svalue),shift),def,false);
+                      8:
+                        result:=cordconstnode.create(RorQWord(QWord(vl2.svalue),shift),def,false);
+                      else
+                        internalerror(2011061903);
+                    end;
+                  in_rol_x,in_rol_x_y:
+                    case def.size of
+                      1:
+                        result:=cordconstnode.create(RolByte(Byte(vl2.svalue),shift),def,false);
+                      2:
+                        result:=cordconstnode.create(RolWord(Word(vl2.svalue),shift),def,false);
+                      4:
+                        result:=cordconstnode.create(RolDWord(DWord(vl2.svalue),shift),def,false);
+                      8:
+                        result:=cordconstnode.create(RolQWord(QWord(vl2.svalue),shift),def,false);
+                      else
+                        internalerror(2011061902);
+                    end;
+                  else
+                    internalerror(2011061901);
+                  end;
+            end;
+        end;
+
       var
       var
         hp        : tnode;
         hp        : tnode;
         vl,vl2    : TConstExprInt;
         vl,vl2    : TConstExprInt;
@@ -1931,6 +1999,11 @@ implementation
                 begin
                 begin
                   result:=handle_const_sar;
                   result:=handle_const_sar;
                 end;
                 end;
+              in_rol_x,
+              in_rol_x_y,
+              in_ror_x,
+              in_ror_x_y :
+                result:=handle_const_rox;
             end;
             end;
           end;
           end;
       end;
       end;
@@ -2621,8 +2694,8 @@ implementation
                   set_varstate(left,vs_read,[vsf_must_be_valid]);
                   set_varstate(left,vs_read,[vsf_must_be_valid]);
                   resultdef:=left.resultdef;
                   resultdef:=left.resultdef;
                 end;
                 end;
-              in_rol_x_x,
-              in_ror_x_x,
+              in_rol_x_y,
+              in_ror_x_y,
               in_sar_x_y:
               in_sar_x_y:
                 begin
                 begin
                   set_varstate(tcallparanode(left).left,vs_read,[vsf_must_be_valid]);
                   set_varstate(tcallparanode(left).left,vs_read,[vsf_must_be_valid]);
@@ -3040,9 +3113,9 @@ implementation
              expectloc:=tcallparanode(left).left.expectloc;
              expectloc:=tcallparanode(left).left.expectloc;
            end;
            end;
          in_rol_x,
          in_rol_x,
-         in_rol_x_x,
+         in_rol_x_y,
          in_ror_x,
          in_ror_x,
-         in_ror_x_x,
+         in_ror_x_y,
          in_sar_x,
          in_sar_x,
          in_sar_x_y,
          in_sar_x_y,
          in_bsf_x,
          in_bsf_x,

+ 39 - 14
compiler/nmat.pas

@@ -111,7 +111,6 @@ implementation
 
 
     function tmoddivnode.simplify(forinline : boolean):tnode;
     function tmoddivnode.simplify(forinline : boolean):tnode;
       var
       var
-        t : tnode;
         rv,lv : tconstexprint;
         rv,lv : tconstexprint;
       begin
       begin
         result:=nil;
         result:=nil;
@@ -143,12 +142,10 @@ implementation
 
 
             case nodetype of
             case nodetype of
               modn:
               modn:
-                t:=create_simplified_ord_const(lv mod rv,resultdef,forinline);
+                result:=create_simplified_ord_const(lv mod rv,resultdef,forinline);
               divn:
               divn:
-                t:=create_simplified_ord_const(lv div rv,resultdef,forinline);
+                result:=create_simplified_ord_const(lv div rv,resultdef,forinline);
             end;
             end;
-            result:=t;
-            exit;
          end;
          end;
       end;
       end;
 
 
@@ -460,8 +457,6 @@ implementation
  ****************************************************************************}
  ****************************************************************************}
 
 
     function tshlshrnode.simplify(forinline : boolean):tnode;
     function tshlshrnode.simplify(forinline : boolean):tnode;
-      var
-        t : tnode;
       begin
       begin
         result:=nil;
         result:=nil;
         { constant folding }
         { constant folding }
@@ -469,12 +464,10 @@ implementation
           begin
           begin
              case nodetype of
              case nodetype of
                 shrn:
                 shrn:
-                  t:=create_simplified_ord_const(tordconstnode(left).value shr tordconstnode(right).value,resultdef,forinline);
+                  result:=create_simplified_ord_const(tordconstnode(left).value shr tordconstnode(right).value,resultdef,forinline);
                 shln:
                 shln:
-                  t:=create_simplified_ord_const(tordconstnode(left).value shl tordconstnode(right).value,resultdef,forinline);
+                  result:=create_simplified_ord_const(tordconstnode(left).value shl tordconstnode(right).value,resultdef,forinline);
              end;
              end;
-             result:=t;
-             exit;
           end;
           end;
 
 
       end;
       end;
@@ -483,6 +476,9 @@ implementation
     function tshlshrnode.pass_typecheck:tnode;
     function tshlshrnode.pass_typecheck:tnode;
       var
       var
          t : tnode;
          t : tnode;
+{$ifdef cpunodefaultint}
+         nd : tdef;
+{$endif cpunodefaultint}
       begin
       begin
          result:=nil;
          result:=nil;
          typecheckpass(left);
          typecheckpass(left);
@@ -508,6 +504,14 @@ implementation
               exit;
               exit;
            end;
            end;
 
 
+{$ifdef cpunodefaultint}
+         { for small cpus we use the smallest common type }
+         if (left.resultdef.typ=orddef) and (right.resultdef.typ=orddef) then
+           nd:=get_common_intdef(torddef(left.resultdef),torddef(right.resultdef),false)
+         else
+           nd:=s32inttype;
+{$endif cpunodefaultint}
+
          { calculations for ordinals < 32 bit have to be done in
          { calculations for ordinals < 32 bit have to be done in
            32 bit for backwards compatibility. That way 'shl 33' is
            32 bit for backwards compatibility. That way 'shl 33' is
            the same as 'shl 1'. It's ugly but compatible with delphi/tp/gcc }
            the same as 'shl 1'. It's ugly but compatible with delphi/tp/gcc }
@@ -516,12 +520,26 @@ implementation
            begin
            begin
              { keep singness of orignal type }
              { keep singness of orignal type }
              if is_signed(left.resultdef) then
              if is_signed(left.resultdef) then
+{$ifdef cpunodefaultint}
+               inserttypeconv(left,nd)
+{$else cpunodefaultint}
                inserttypeconv(left,s32inttype)
                inserttypeconv(left,s32inttype)
+{$endif cpunodefaultint}
              else
              else
-               inserttypeconv(left,u32inttype);
+               begin
+{$ifdef cpunodefaultint}
+                 inserttypeconv(left,nd)
+{$else cpunodefaultint}
+                 inserttypeconv(left,u32inttype);
+{$endif cpunodefaultint}
+               end
            end;
            end;
 
 
+{$ifdef cpunodefaultint}
+         inserttypeconv(right,nd);
+{$else cpunodefaultint}
          inserttypeconv(right,sinttype);
          inserttypeconv(right,sinttype);
+{$endif cpunodefaultint}
 
 
          resultdef:=left.resultdef;
          resultdef:=left.resultdef;
       end;
       end;
@@ -533,11 +551,18 @@ implementation
         procname: string[31];
         procname: string[31];
       begin
       begin
         result := nil;
         result := nil;
+        { Normally already done below, but called again,
+          just in case it is called directly }
+        firstpass(left);
         { otherwise create a call to a helper }
         { otherwise create a call to a helper }
+        if is_signed(left.resultdef) then
+          procname:='int64'
+        else
+          procname:='qword';
         if nodetype = shln then
         if nodetype = shln then
-          procname := 'fpc_shl_int64'
+          procname := 'fpc_shl_'+procname
         else
         else
-          procname := 'fpc_shr_int64';
+          procname := 'fpc_shr_'+procname;
         { this order of parameters works at least for the arm,
         { this order of parameters works at least for the arm,
           however it should work for any calling conventions (FK) }
           however it should work for any calling conventions (FK) }
         result := ccallnode.createintern(procname,ccallparanode.create(right,
         result := ccallnode.createintern(procname,ccallparanode.create(right,

+ 1 - 2
compiler/nobj.pas

@@ -1161,8 +1161,7 @@ implementation
                (pd.visibility=vis_published) then
                (pd.visibility=vis_published) then
               begin
               begin
                 current_asmdata.getdatalabel(l);
                 current_asmdata.getdatalabel(l);
-
-                current_asmdata.asmlists[al_typedconsts].concat(cai_align.create(const_align(sizeof(pint))));
+                new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l.name,const_align(sizeof(pint)));
                 current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l));
                 current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l));
                 current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_8bit(length(tsym(p).realname)));
                 current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_8bit(length(tsym(p).realname)));
                 current_asmdata.asmlists[al_typedconsts].concat(Tai_string.Create(tsym(p).realname));
                 current_asmdata.asmlists[al_typedconsts].concat(Tai_string.Create(tsym(p).realname));

+ 0 - 1
compiler/nset.pas

@@ -187,7 +187,6 @@ implementation
 
 
       var
       var
         t : tnode;
         t : tnode;
-        pst : pconstset;
 
 
         function createsetconst(psd : tsetdef) : pconstset;
         function createsetconst(psd : tsetdef) : pconstset;
         var
         var

+ 118 - 5
compiler/ogbase.pas

@@ -397,7 +397,7 @@ interface
         FIsVar  : boolean;
         FIsVar  : boolean;
         FMangledName : string;
         FMangledName : string;
       public
       public
-        constructor create(AList:TFPHashObjectList;const AName:string;AOrdNr:longint;AIsVar:boolean);
+        constructor create(AList:TFPHashObjectList;const AName,AMangledName:string;AOrdNr:longint;AIsVar:boolean);
         property OrdNr: longint read FOrdNr;
         property OrdNr: longint read FOrdNr;
         property MangledName: string read FMangledName;
         property MangledName: string read FMangledName;
         property IsVar: boolean read FIsVar;
         property IsVar: boolean read FIsVar;
@@ -413,6 +413,7 @@ interface
         FCurrExeSec       : TExeSection;
         FCurrExeSec       : TExeSection;
         FExeSectionList   : TFPHashObjectList;
         FExeSectionList   : TFPHashObjectList;
         Fzeronr           : longint;
         Fzeronr           : longint;
+        Fvaluesnr         : longint;
         { Symbols }
         { Symbols }
         FExeSymbolList    : TFPHashObjectList;
         FExeSymbolList    : TFPHashObjectList;
         FUnresolvedExeSymbols : TFPObjectList;
         FUnresolvedExeSymbols : TFPObjectList;
@@ -450,6 +451,7 @@ interface
         procedure Load_Start;virtual;
         procedure Load_Start;virtual;
         procedure Load_EntryName(const aname:string);virtual;
         procedure Load_EntryName(const aname:string);virtual;
         procedure Load_Symbol(const aname:string);virtual;
         procedure Load_Symbol(const aname:string);virtual;
+        procedure Load_ProvideSymbol(const aname:string);virtual;
         procedure Load_IsSharedLibrary;
         procedure Load_IsSharedLibrary;
         procedure Load_ImageBase(const avalue:string);
         procedure Load_ImageBase(const avalue:string);
         procedure Order_Start;virtual;
         procedure Order_Start;virtual;
@@ -457,7 +459,9 @@ interface
         procedure Order_ExeSection(const aname:string);virtual;
         procedure Order_ExeSection(const aname:string);virtual;
         procedure Order_Align(const avalue:string);virtual;
         procedure Order_Align(const avalue:string);virtual;
         procedure Order_Zeros(const avalue:string);virtual;
         procedure Order_Zeros(const avalue:string);virtual;
+        procedure Order_Values(bytesize : aword; const avalue:string);virtual;
         procedure Order_Symbol(const aname:string);virtual;
         procedure Order_Symbol(const aname:string);virtual;
+        procedure Order_ProvideSymbol(const aname:string);virtual;
         procedure Order_EndExeSection;virtual;
         procedure Order_EndExeSection;virtual;
         procedure Order_ObjSection(const aname:string);virtual;
         procedure Order_ObjSection(const aname:string);virtual;
         procedure MemPos_Start;virtual;
         procedure MemPos_Start;virtual;
@@ -549,9 +553,15 @@ implementation
           internalerror(200603016);
           internalerror(200603016);
         if not assigned(aobjsec) then
         if not assigned(aobjsec) then
           internalerror(200603017);
           internalerror(200603017);
-        if (bind in [AB_EXTERNAL,AB_LAZY]) then
+        if (bind in [AB_EXTERNAL,AB_LAZY]) or
+          { Put all COMMON to GLOBAL in step 3 of
+            TExeOutput.ResolveSymbols }
+           ((abind=AB_GLOBAL) and (bind=AB_COMMON)) then
           begin
           begin
-            bind:=abind;
+            { Do not change the AB_TYPE of common symbols yet }
+            { This will be done in FixupSymbols }
+            if (pass<>0) or (bind<>AB_COMMON) then
+              bind:=abind;
             typ:=atyp;
             typ:=atyp;
           end
           end
         else
         else
@@ -1467,12 +1477,13 @@ implementation
                                 TImportSymbol
                                 TImportSymbol
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor TImportSymbol.create(AList:TFPHashObjectList;const AName:string;AOrdNr:longint;AIsVar:boolean);
+    constructor TImportSymbol.create(AList:TFPHashObjectList;
+            const AName,AMangledName:string;AOrdNr:longint;AIsVar:boolean);
       begin
       begin
         inherited Create(AList, AName);
         inherited Create(AList, AName);
         FOrdNr:=AOrdNr;
         FOrdNr:=AOrdNr;
         FIsVar:=AIsVar;
         FIsVar:=AIsVar;
-        FMangledName:=AName;
+        FMangledName:=AMangledName;
         { Replace ? and @ in import name, since GNU AS does not allow these characters in symbol names. }
         { Replace ? and @ in import name, since GNU AS does not allow these characters in symbol names. }
         { This allows to import VC++ mangled names from DLLs. }
         { This allows to import VC++ mangled names from DLLs. }
         if target_info.system in systems_all_windows then
         if target_info.system in systems_all_windows then
@@ -1620,6 +1631,15 @@ implementation
         internalObjData.SymbolDefine(aname,AB_GLOBAL,AT_FUNCTION);
         internalObjData.SymbolDefine(aname,AB_GLOBAL,AT_FUNCTION);
       end;
       end;
 
 
+    procedure TExeOutput.Load_ProvideSymbol(const aname:string);
+      begin
+        if assigned(ExeSymbolList.Find(aname)) then
+          exit;
+        internalObjData.createsection('*'+aname,0,[]);
+        // Use AB_COMMON to avoid muliple defined complaints
+        internalObjData.SymbolDefine(aname,AB_COMMON,AT_DATA);
+      end;
+
 
 
     procedure TExeOutput.Order_Start;
     procedure TExeOutput.Order_Start;
       begin
       begin
@@ -1700,6 +1720,19 @@ implementation
         CurrExeSec.AddObjSection(ObjSection);
         CurrExeSec.AddObjSection(ObjSection);
       end;
       end;
 
 
+    procedure TExeOutput.Order_ProvideSymbol(const aname:string);
+      var
+        ObjSection : TObjSection;
+      begin
+        ObjSection:=internalObjData.findsection('*'+aname);
+        if not assigned(ObjSection) then
+          internalerror(200603041);
+        { Only include this section if the symbol doesn't
+          exist otherwisee }
+        if not assigned(ExeSymbolList.Find(aname)) then
+          CurrExeSec.AddObjSection(ObjSection);
+      end;
+
 
 
     procedure TExeOutput.Order_Align(const avalue:string);
     procedure TExeOutput.Order_Align(const avalue:string);
       var
       var
@@ -1740,6 +1773,86 @@ implementation
         CurrExeSec.AddObjSection(objsec);
         CurrExeSec.AddObjSection(objsec);
       end;
       end;
 
 
+    procedure TExeOutput.Order_Values(bytesize : aword; const avalue:string);
+      const
+        MAXVAL = 128;
+      var
+        bytevalues : array[0..MAXVAL-1] of byte;
+        twobytevalues : array[0..MAXVAL-1] of word;
+        fourbytevalues : array[0..MAXVAL-1] of dword;
+        eightbytevalues : array[0..MAXVAL-1] of qword;
+        allvals, oneval : string;
+        len, commapos : longint;
+        indexpos, code  : integer;
+        anumval : qword;
+        signedval : int64;
+        objsec : TObjSection;
+      begin
+        indexpos:=0;
+        allvals:=avalue;
+        repeat
+          commapos:=pos(',',allvals);
+          if commapos>0 then
+            begin
+              oneval:=trim(copy(allvals,1,commapos-1));
+              allvals:=copy(allvals,commapos+1,length(allvals));
+            end
+          else
+            begin
+              oneval:=trim(allvals);
+              allvals:='';
+            end;
+          if oneval<>'' then
+            begin
+              if oneval[1]='-' then
+                val(oneval,signedval,code)
+              else
+                val(oneval,anumval,code);
+              if code<>0 then
+                Comment(V_Error,'Invalid number '+avalue)
+              else if (indexpos<MAXVAL) then
+                begin
+                  anumval:=qword(signedval);
+                  if source_info.endian<>target_info.endian then
+                    swapendian(anumval);
+                  { No range checking here }
+
+                  if bytesize=1 then
+                    bytevalues[indexpos]:=byte(anumval)
+                  else if bytesize=2 then
+                    twobytevalues[indexpos]:=word(anumval)
+                  else if bytesize=4 then
+                    fourbytevalues[indexpos]:=dword(anumval)
+                  else if bytesize=8 then
+                    eightbytevalues[indexpos]:=anumval;
+                  inc(indexpos);
+                end;
+            end;
+        until allvals='';
+        if indexpos=0 then
+          begin
+            Comment(V_Error,'Invalid number '+avalue);
+            exit;
+          end;
+        if indexpos=MAXVAL then
+          begin
+            Comment(V_Error,'Too many values '+avalue);
+            internalerror(200602254);
+          end;
+        len:=bytesize*indexpos;
+        inc(Fvaluesnr);
+        objsec:=internalObjData.createsection('*values'+tostr(Fvaluesnr),0,CurrExeSec.SecOptions+[oso_Data,oso_keep]);
+        if bytesize=1 then
+          internalObjData.writebytes(bytevalues,len)
+        else if bytesize=2 then
+          internalObjData.writebytes(twobytevalues,len)
+        else if bytesize=4 then
+          internalObjData.writebytes(fourbytevalues,len)
+        else if bytesize=8 then
+          internalObjData.writebytes(eightbytevalues,len);
+        CurrExeSec.AddObjSection(objsec);
+      end;
+
 
 
     procedure TExeOutput.MemPos_Start;
     procedure TExeOutput.MemPos_Start;
       begin
       begin

+ 30 - 5
compiler/ogelf.pas

@@ -295,8 +295,8 @@ implementation
         end;
         end;
         telf64reloc=packed record
         telf64reloc=packed record
           address : qword;
           address : qword;
-          info    : qword; { bit 0-7: type, 8-31: symbol }
-          addend  : qword;
+          info    : qword; { bit 0-31: type, 32-63: symbol }
+          addend  : int64; { signed! }
         end;
         end;
         telf64symbol=packed record
         telf64symbol=packed record
           st_name  : longint;
           st_name  : longint;
@@ -810,6 +810,8 @@ implementation
         relsym,
         relsym,
         reltyp   : longint;
         reltyp   : longint;
         relocsect : TObjSection;
         relocsect : TObjSection;
+        tmp: aint;
+        asize: longint;
       begin
       begin
         with elf32data do
         with elf32data do
          begin
          begin
@@ -861,7 +863,7 @@ implementation
                    begin
                    begin
                      reltyp:=R_X86_64_PC32;
                      reltyp:=R_X86_64_PC32;
                      { length of the relocated location is handled here }
                      { length of the relocated location is handled here }
-                     rel.addend:=qword(-4);
+                     rel.addend:=-4;
                    end;
                    end;
                  RELOC_ABSOLUTE :
                  RELOC_ABSOLUTE :
                    reltyp:=R_X86_64_64;
                    reltyp:=R_X86_64_64;
@@ -871,19 +873,42 @@ implementation
                    begin
                    begin
                      reltyp:=R_X86_64_GOTPCREL;
                      reltyp:=R_X86_64_GOTPCREL;
                      { length of the relocated location is handled here }
                      { length of the relocated location is handled here }
-                     rel.addend:=qword(-4);
+                     rel.addend:=-4;
                    end;
                    end;
                  RELOC_PLT32 :
                  RELOC_PLT32 :
                    begin
                    begin
                      reltyp:=R_X86_64_PLT32;
                      reltyp:=R_X86_64_PLT32;
                      { length of the relocated location is handled here }
                      { length of the relocated location is handled here }
-                     rel.addend:=qword(-4);
+                     rel.addend:=-4;
                    end;
                    end;
 {$endif x86_64}
 {$endif x86_64}
                  else
                  else
                    internalerror(200602261);
                    internalerror(200602261);
                end;
                end;
 
 
+{ This handles ELF 'rela'-styled relocations, which are currently used only for x86_64,
+  but can be used other targets, too. }
+{$ifdef x86_64}
+               s.Data.Seek(objreloc.dataoffset);
+               if objreloc.typ=RELOC_ABSOLUTE then
+                 begin
+                   asize:=8;
+                   s.Data.Read(tmp,8);
+                   rel.addend:=rel.addend+tmp;
+                 end
+               else
+                 begin
+                   asize:=4;
+                   s.Data.Read(tmp,4);
+                   rel.addend:=rel.addend+longint(tmp);
+                 end;
+
+               { and zero the data member out }
+               tmp:=0;
+               s.Data.Seek(objreloc.dataoffset);
+               s.Data.Write(tmp,asize);
+{$endif}
+
                { Symbol }
                { Symbol }
                if assigned(objreloc.symbol) then
                if assigned(objreloc.symbol) then
                  begin
                  begin

+ 132 - 70
compiler/options.pas

@@ -52,15 +52,15 @@ Type
     procedure WriteInfo;
     procedure WriteInfo;
     procedure WriteHelpPages;
     procedure WriteHelpPages;
     procedure WriteQuickInfo;
     procedure WriteQuickInfo;
-    procedure IllegalPara(const opt:string);
-    procedure UnsupportedPara(const opt:string);
-    procedure IgnoredPara(const opt:string);
+    procedure IllegalPara(const opt:TCmdStr);
+    procedure UnsupportedPara(const opt:TCmdStr);
+    procedure IgnoredPara(const opt:TCmdStr);
     function  Unsetbool(var Opts:TCmdStr; Pos: Longint):boolean;
     function  Unsetbool(var Opts:TCmdStr; Pos: Longint):boolean;
-    procedure interpret_option(const opt :string;ispara:boolean);
-    procedure Interpret_envvar(const envname : string);
-    procedure Interpret_file(const filename : string);
+    procedure interpret_option(const opt :TCmdStr;ispara:boolean);
+    procedure Interpret_envvar(const envname : TCmdStr);
+    procedure Interpret_file(const filename : TPathStr);
     procedure Read_Parameters;
     procedure Read_Parameters;
-    procedure parsecmd(cmd:string);
+    procedure parsecmd(cmd:TCmdStr);
     procedure TargetOptions(def:boolean);
     procedure TargetOptions(def:boolean);
     procedure CheckOptionsCompatibility;
     procedure CheckOptionsCompatibility;
     procedure ForceStaticLinking;
     procedure ForceStaticLinking;
@@ -71,7 +71,7 @@ Type
 var
 var
   coption : TOptionClass;
   coption : TOptionClass;
 
 
-procedure read_arguments(cmd:string);
+procedure read_arguments(cmd:TCmdStr);
 
 
 
 
 implementation
 implementation
@@ -440,7 +440,7 @@ begin
 end;
 end;
 
 
 
 
-procedure Toption.IllegalPara(const opt:string);
+procedure Toption.IllegalPara(const opt:TCmdStr);
 begin
 begin
   Message1(option_illegal_para,opt);
   Message1(option_illegal_para,opt);
   Message(option_help_pages_para);
   Message(option_help_pages_para);
@@ -448,14 +448,14 @@ begin
 end;
 end;
 
 
 
 
-procedure toption.UnsupportedPara(const opt: string);
+procedure toption.UnsupportedPara(const opt: TCmdStr);
 begin
 begin
   Message1(option_unsupported_target,opt);
   Message1(option_unsupported_target,opt);
   StopOptions(1);
   StopOptions(1);
 end;
 end;
 
 
 
 
-procedure toption.IgnoredPara(const opt: string);
+procedure toption.IgnoredPara(const opt: TCmdStr);
 begin
 begin
   Message1(option_ignored_target,opt);
   Message1(option_ignored_target,opt);
 end;
 end;
@@ -488,7 +488,7 @@ begin
 end;
 end;
 
 
 
 
-procedure TOption.interpret_option(const opt:string;ispara:boolean);
+procedure TOption.interpret_option(const opt:TCmdStr;ispara:boolean);
 var
 var
   code : integer;
   code : integer;
   c    : char;
   c    : char;
@@ -517,7 +517,7 @@ begin
   case opt[1] of
   case opt[1] of
     '-' :
     '-' :
       begin
       begin
-         more:=Copy(opt,3,255);
+         more:=Copy(opt,3,2147483647);
          if firstpass then
          if firstpass then
            Message1(option_interpreting_firstpass_option,opt)
            Message1(option_interpreting_firstpass_option,opt)
          else
          else
@@ -1363,12 +1363,21 @@ begin
                            exclude(init_settings.globalswitches,cs_support_exceptions)
                            exclude(init_settings.globalswitches,cs_support_exceptions)
                          else
                          else
                            include(init_settings.globalswitches,cs_support_exceptions);
                            include(init_settings.globalswitches,cs_support_exceptions);
+                       'y' :
+                         If UnsetBool(More, j) then
+                           exclude(init_settings.localswitches,cs_typed_addresses)
+                         else
+                           include(init_settings.localswitches,cs_typed_addresses);
                        '-' :
                        '-' :
                          begin
                          begin
-                           init_settings.globalswitches:=init_settings.globalswitches - [cs_constructor_name,cs_support_exceptions];
-                           init_settings.localswitches:=init_settings.localswitches - [cs_do_assertion, cs_do_inline, cs_ansistrings];
+                           init_settings.globalswitches:=init_settings.globalswitches - [cs_constructor_name,cs_support_exceptions,
+                                                                                         cs_support_vectors,cs_load_fpcylix_unit];
+
+                           init_settings.localswitches:=init_settings.localswitches - [cs_do_assertion,cs_do_inline, cs_ansistrings,
+                                                                                       cs_typed_addresses];
+
                            init_settings.moduleswitches:=init_settings.moduleswitches - [cs_support_c_operators, cs_support_goto,
                            init_settings.moduleswitches:=init_settings.moduleswitches - [cs_support_c_operators, cs_support_goto,
-                                                                     cs_support_macro];
+                                                                                         cs_support_macro];
                          end;
                          end;
                        else
                        else
                          IllegalPara(opt);
                          IllegalPara(opt);
@@ -1454,54 +1463,74 @@ begin
                   case More[j] of
                   case More[j] of
                     'A':
                     'A':
                       begin
                       begin
-                        if UnsetBool(More, j) then
-                          apptype:=app_native
+                        if target_info.system in systems_all_windows then
+                          begin
+                            if UnsetBool(More, j) then
+                              apptype:=app_cui
+                            else
+                              apptype:=app_native;
+                          end
                         else
                         else
-                          apptype:=app_cui;
+                          IllegalPara(opt);
                       end;
                       end;
                     'b':
                     'b':
                       begin
                       begin
-                        if (target_info.system in systems_darwin) then
+                        if target_info.system in systems_darwin then
                           begin
                           begin
-                            if not UnsetBool(More, j) then
-                              apptype:=app_bundle
-                            else
+                            if UnsetBool(More, j) then
                               apptype:=app_cui
                               apptype:=app_cui
+                            else
+                              apptype:=app_bundle
                           end
                           end
                         else
                         else
                           IllegalPara(opt);
                           IllegalPara(opt);
                       end;
                       end;
                     'B':
                     'B':
                       begin
                       begin
-                        {  -WB200000 means set trefered base address
-                          to $200000, but does not change relocsection boolean
-                          this way we can create both relocatble and
-                          non relocatable DLL at a specific base address PM }
-                        if (length(More)>j) then
+                        if target_info.system in systems_all_windows+systems_symbian then
                           begin
                           begin
-                            val('$'+Copy(More,j+1,255),imagebase,code);
-                            if code<>0 then
-                              IllegalPara(opt);
-                            ImageBaseSetExplicity:=true;
+                            {  -WB200000 means set trefered base address
+                              to $200000, but does not change relocsection boolean
+                              this way we can create both relocatble and
+                              non relocatable DLL at a specific base address PM }
+                            if (length(More)>j) then
+                              begin
+                                val('$'+Copy(More,j+1,255),imagebase,code);
+                                if code<>0 then
+                                  IllegalPara(opt);
+                                ImageBaseSetExplicity:=true;
+                              end
+                            else
+                              begin
+                                RelocSection:=true;
+                                RelocSectionSetExplicitly:=true;
+                              end;
+                            break;
                           end
                           end
                         else
                         else
-                          begin
-                            RelocSection:=true;
-                            RelocSectionSetExplicitly:=true;
-                          end;
-                        break;
+                          IllegalPara(opt);
                       end;
                       end;
                     'C':
                     'C':
                       begin
                       begin
-                        if UnsetBool(More, j) then
-                          apptype:=app_gui
+                        if target_info.system in systems_all_windows+systems_os2+systems_macos then
+                          begin
+                            if UnsetBool(More, j) then
+                              apptype:=app_gui
+                            else
+                              apptype:=app_cui;
+                          end
                         else
                         else
-                          apptype:=app_cui;
+                          IllegalPara(opt);
                       end;
                       end;
                     'D':
                     'D':
                       begin
                       begin
-                        UseDeffileForExports:=not UnsetBool(More, j);
-                        UseDeffileForExportsSetExplicitly:=true;
+                        if target_info.system in systems_all_windows then
+                          begin
+                            UseDeffileForExports:=not UnsetBool(More, j);
+                            UseDeffileForExportsSetExplicitly:=true;
+                          end
+                        else
+                          IllegalPara(opt);
                       end;
                       end;
                     'e':
                     'e':
                       begin
                       begin
@@ -1516,22 +1545,37 @@ begin
                       end;
                       end;
                     'F':
                     'F':
                       begin
                       begin
-                        if UnsetBool(More, j) then
-                          apptype:=app_cui
+                        if target_info.system in systems_os2 then
+                          begin
+                            if UnsetBool(More, j) then
+                              apptype:=app_cui
+                            else
+                              apptype:=app_fs;
+                          end
                         else
                         else
-                          apptype:=app_fs;
+                          IllegalPara(opt);
                       end;
                       end;
                     'G':
                     'G':
                       begin
                       begin
-                        if UnsetBool(More, j) then
-                          apptype:=app_cui
+                        if target_info.system in systems_all_windows+systems_os2+systems_macos then
+                          begin
+                            if UnsetBool(More, j) then
+                              apptype:=app_cui
+                            else
+                              apptype:=app_gui;
+                          end
                         else
                         else
-                          apptype:=app_gui;
+                          IllegalPara(opt);
                       end;
                       end;
                     'I':
                     'I':
                       begin
                       begin
-                        GenerateImportSection:=not UnsetBool(More,j);
-                        GenerateImportSectionSetExplicitly:=true;
+                        if target_info.system in systems_all_windows then
+                          begin
+                            GenerateImportSection:=not UnsetBool(More,j);
+                            GenerateImportSectionSetExplicitly:=true;
+                          end
+                        else
+                          IllegalPara(opt);
                       end;
                       end;
                     'i':
                     'i':
                       begin
                       begin
@@ -1546,8 +1590,13 @@ begin
                       end;
                       end;
                     'N':
                     'N':
                       begin
                       begin
-                        RelocSection:=UnsetBool(More,j);
-                        RelocSectionSetExplicitly:=true;
+                        if target_info.system in systems_all_windows then
+                          begin
+                            RelocSection:=UnsetBool(More,j);
+                            RelocSectionSetExplicitly:=true;
+                          end
+                        else
+                          IllegalPara(opt);
                       end;
                       end;
                     'p':
                     'p':
                       begin
                       begin
@@ -1565,16 +1614,26 @@ begin
                       end;
                       end;
                     'R':
                     'R':
                       begin
                       begin
-                        { support -WR+ / -WR- as synonyms to -WR / -WN }
-                        RelocSection:=not UnsetBool(More,j);
-                        RelocSectionSetExplicitly:=true;
+                        if target_info.system in systems_all_windows then
+                          begin
+                            { support -WR+ / -WR- as synonyms to -WR / -WN }
+                            RelocSection:=not UnsetBool(More,j);
+                            RelocSectionSetExplicitly:=true;
+                          end
+                        else
+                          IllegalPara(opt);
                       end;
                       end;
                     'T':
                     'T':
                       begin
                       begin
-                        if UnsetBool(More, j) then
-                          apptype:=app_cui
+                        if target_info.system in systems_macos then
+                          begin
+                            if UnsetBool(More, j) then
+                              apptype:=app_cui
+                            else
+                              apptype:=app_tool;
+                          end
                         else
                         else
-                          apptype:=app_tool;
+                          IllegalPara(opt);
                       end;
                       end;
                     'X':
                     'X':
                       begin
                       begin
@@ -1769,9 +1828,9 @@ begin
 end;
 end;
 
 
 
 
-procedure Toption.Interpret_file(const filename : string);
+procedure Toption.Interpret_file(const filename : TPathStr);
 
 
-  procedure RemoveSep(var fn:string);
+  procedure RemoveSep(var fn:TPathStr);
   var
   var
     i : longint;
     i : longint;
   begin
   begin
@@ -1785,7 +1844,7 @@ procedure Toption.Interpret_file(const filename : string);
     fn:=copy(fn,1,i);
     fn:=copy(fn,1,i);
   end;
   end;
 
 
-  function GetName(var fn:string):string;
+  function GetName(var fn:TPathStr):TPathStr;
   var
   var
     i : longint;
     i : longint;
   begin
   begin
@@ -1801,7 +1860,7 @@ const
 var
 var
   f     : text;
   f     : text;
   s, tmp,
   s, tmp,
-  opts  : string;
+  opts  : TCmdStr;
   skip  : array[0..maxlevel] of boolean;
   skip  : array[0..maxlevel] of boolean;
   line,
   line,
   level : longint;
   level : longint;
@@ -1954,14 +2013,14 @@ begin
 end;
 end;
 
 
 
 
-procedure Toption.Interpret_envvar(const envname : string);
+procedure Toption.Interpret_envvar(const envname : TCmdStr);
 var
 var
   argstart,
   argstart,
   env,
   env,
   pc     : pchar;
   pc     : pchar;
   arglen : longint;
   arglen : longint;
   quote  : set of char;
   quote  : set of char;
-  hs     : string;
+  hs     : TCmdStr;
 begin
 begin
   Message1(option_using_env,envname);
   Message1(option_using_env,envname);
   env:=GetEnvPChar(envname);
   env:=GetEnvPChar(envname);
@@ -2013,14 +2072,14 @@ end;
 
 
 procedure toption.read_parameters;
 procedure toption.read_parameters;
 var
 var
-  opts       : string;
+  opts       : TCmdStr;
   paramindex : longint;
   paramindex : longint;
 begin
 begin
   paramindex:=0;
   paramindex:=0;
   while paramindex<paramcount do
   while paramindex<paramcount do
    begin
    begin
      inc(paramindex);
      inc(paramindex);
-     opts:=system.paramstr(paramindex);
+     opts:=objpas.paramstr(paramindex);
      case opts[1] of
      case opts[1] of
        '@' :
        '@' :
          if not firstpass then
          if not firstpass then
@@ -2043,10 +2102,10 @@ begin
 end;
 end;
 
 
 
 
-procedure toption.parsecmd(cmd:string);
+procedure toption.parsecmd(cmd:TCmdStr);
 var
 var
   i,ps  : longint;
   i,ps  : longint;
-  opts  : string;
+  opts  : TCmdStr;
 begin
 begin
   while (cmd<>'') do
   while (cmd<>'') do
    begin
    begin
@@ -2054,7 +2113,7 @@ begin
       delete(cmd,1,1);
       delete(cmd,1,1);
      i:=pos(' ',cmd);
      i:=pos(' ',cmd);
      if i=0 then
      if i=0 then
-      i:=256;
+       i:=2147483647;
      opts:=Copy(cmd,1,i-1);
      opts:=Copy(cmd,1,i-1);
      Delete(cmd,1,i);
      Delete(cmd,1,i);
      case opts[1] of
      case opts[1] of
@@ -2351,7 +2410,7 @@ begin
 end;
 end;
 
 
 
 
-procedure read_arguments(cmd:string);
+procedure read_arguments(cmd:TCmdStr);
 var
 var
   env: ansistring;
   env: ansistring;
   i : tfeature;
   i : tfeature;
@@ -2389,6 +2448,9 @@ begin
     end;
     end;
   option.firstpass:=false;
   option.firstpass:=false;
 
 
+  { redefine target options so all defines are written even if no -Txxx is passed on the command line }
+  Option.TargetOptions(true);
+
 { target is set here, for wince the default app type is gui }
 { target is set here, for wince the default app type is gui }
   if target_info.system in systems_wince then
   if target_info.system in systems_wince then
     apptype:=app_gui;
     apptype:=app_gui;

+ 1 - 1
compiler/pdecobj.pas

@@ -1082,7 +1082,7 @@ implementation
         current_specializedef:=nil;
         current_specializedef:=nil;
 
 
         { objects and class types can't be declared local }
         { objects and class types can't be declared local }
-        if not(symtablestack.top.symtabletype in [globalsymtable,staticsymtable,objectsymtable]) and
+        if not(symtablestack.top.symtabletype in [globalsymtable,staticsymtable,objectsymtable,recordsymtable]) and
            not assigned(genericlist) then
            not assigned(genericlist) then
           Message(parser_e_no_local_objects);
           Message(parser_e_no_local_objects);
 
 

+ 2 - 2
compiler/pdecsub.pas

@@ -184,7 +184,7 @@ implementation
              paranr:=paranr_result_leftright
              paranr:=paranr_result_leftright
            else
            else
 {$elseif defined(x86) or defined(arm)}
 {$elseif defined(x86) or defined(arm)}
-           if (target_info.system in systems_all_windows) and
+           if (tf_safecall_exceptions in target_info.flags) and
               (pd.proccalloption = pocall_safecall)  then
               (pd.proccalloption = pocall_safecall)  then
              paranr:=paranr_result_leftright
              paranr:=paranr_result_leftright
            else
            else
@@ -2756,7 +2756,7 @@ const
                     if target_info.system in (systems_all_windows + systems_nativent +
                     if target_info.system in (systems_all_windows + systems_nativent +
                                        [system_i386_emx, system_i386_os2]) then
                                        [system_i386_emx, system_i386_os2]) then
                    { cprefix is not used in DLL imports under Windows or OS/2 }
                    { cprefix is not used in DLL imports under Windows or OS/2 }
-                      result:=pd.import_name^
+                      result:='_$dll$'+ExtractFileName(pd.import_dll^)+'$'+pd.import_name^
                     else
                     else
                       result:=maybe_cprefix(pd.import_name^);
                       result:=maybe_cprefix(pd.import_name^);
                   end
                   end

+ 10 - 3
compiler/pdecvar.pas

@@ -926,7 +926,7 @@ implementation
       is_weak_external,
       is_weak_external,
       is_public_var  : boolean;
       is_public_var  : boolean;
       dll_name,
       dll_name,
-      C_name      : string;
+      C_name,mangledname      : string;
     begin
     begin
       { only allowed for one var }
       { only allowed for one var }
       { only allow external and public on global symbols }
       { only allow external and public on global symbols }
@@ -1016,6 +1016,7 @@ implementation
           inc(vs.refs);
           inc(vs.refs);
         end;
         end;
 
 
+      mangledname:=C_name;
       { now we can insert it in the import lib if its a dll, or
       { now we can insert it in the import lib if its a dll, or
         add it to the externals }
         add it to the externals }
       if is_external_var then
       if is_external_var then
@@ -1031,14 +1032,20 @@ implementation
             end;
             end;
           vs.varregable := vr_none;
           vs.varregable := vr_none;
           if is_dll then
           if is_dll then
-            current_module.AddExternalImport(dll_name,C_Name,0,true,false)
+            begin
+              if target_info.system in (systems_all_windows + systems_nativent +
+                                       [system_i386_emx, system_i386_os2]) then
+                mangledname:='_$dll$'+ExtractFileName(dll_name)+'$'+C_name;
+
+              current_module.AddExternalImport(dll_name,C_Name,mangledname,0,true,false);
+            end
           else
           else
             if tf_has_dllscanner in target_info.flags then
             if tf_has_dllscanner in target_info.flags then
               current_module.dllscannerinputlist.Add(vs.mangledname,vs);
               current_module.dllscannerinputlist.Add(vs.mangledname,vs);
         end;
         end;
 
 
       { Set the assembler name }
       { Set the assembler name }
-      tstaticvarsym(vs).set_mangledname(C_Name);
+      tstaticvarsym(vs).set_mangledname(mangledname);
     end;
     end;
 
 
 
 

+ 8 - 4
compiler/pexpr.pas

@@ -1927,10 +1927,10 @@ implementation
                _LECKKLAMMER:
                _LECKKLAMMER:
                   begin
                   begin
                     if is_class_or_interface_or_object(p1.resultdef) or
                     if is_class_or_interface_or_object(p1.resultdef) or
-                      is_dispinterface(p1.resultdef) then
+                      is_dispinterface(p1.resultdef) or is_record(p1.resultdef) then
                       begin
                       begin
                         { default property }
                         { default property }
-                        protsym:=search_default_property(tobjectdef(p1.resultdef));
+                        protsym:=search_default_property(tabstractrecorddef(p1.resultdef));
                         if not(assigned(protsym)) then
                         if not(assigned(protsym)) then
                           begin
                           begin
                              p1.destroy;
                              p1.destroy;
@@ -2698,7 +2698,7 @@ implementation
              _MINUS :
              _MINUS :
                begin
                begin
                  consume(_MINUS);
                  consume(_MINUS);
-                 if (token = _INTCONST) then
+                 if (token = _INTCONST) and not(m_isolike_unary_minus in current_settings.modeswitches) then
                     begin
                     begin
                       { ugly hack, but necessary to be able to parse }
                       { ugly hack, but necessary to be able to parse }
                       { -9223372036854775808 as int64 (JM)           }
                       { -9223372036854775808 as int64 (JM)           }
@@ -2726,7 +2726,11 @@ implementation
                     end
                     end
                  else
                  else
                    begin
                    begin
-                     p1:=sub_expr(oppower,false,false);
+                     if m_isolike_unary_minus in current_settings.modeswitches then
+                       p1:=sub_expr(opmultiply,false,false)
+                     else
+                       p1:=sub_expr(oppower,false,false);
+
                      p1:=cunaryminusnode.create(p1);
                      p1:=cunaryminusnode.create(p1);
                    end;
                    end;
                end;
                end;

+ 1 - 7
compiler/pmodules.pas

@@ -1357,9 +1357,6 @@ implementation
          gen_intf_wrappers(current_asmdata.asmlists[al_procedures],current_module.globalsymtable,false);
          gen_intf_wrappers(current_asmdata.asmlists[al_procedures],current_module.globalsymtable,false);
          gen_intf_wrappers(current_asmdata.asmlists[al_procedures],current_module.localsymtable,false);
          gen_intf_wrappers(current_asmdata.asmlists[al_procedures],current_module.localsymtable,false);
 
 
-         { generate pic helpers to load eip if necessary }
-         gen_pic_helpers(current_asmdata.asmlists[al_procedures]);
-
          { generate rtti/init tables }
          { generate rtti/init tables }
          write_persistent_type_info(current_module.globalsymtable);
          write_persistent_type_info(current_module.globalsymtable);
          write_persistent_type_info(current_module.localsymtable);
          write_persistent_type_info(current_module.localsymtable);
@@ -1752,7 +1749,7 @@ implementation
         hp:=texported_item(current_module._exports.first);
         hp:=texported_item(current_module._exports.first);
         while assigned(hp) do
         while assigned(hp) do
           begin
           begin
-            current_module.AddExternalImport(current_module.realmodulename^,hp.name^,hp.index,hp.is_var,false);
+            current_module.AddExternalImport(current_module.realmodulename^,hp.name^,hp.name^,hp.index,hp.is_var,false);
             hp:=texported_item(hp.next);
             hp:=texported_item(hp.next);
           end;
           end;
       end;
       end;
@@ -2313,9 +2310,6 @@ implementation
 
 
          InsertThreadvars;
          InsertThreadvars;
 
 
-         { generate pic helpers to load eip if necessary }
-         gen_pic_helpers(current_asmdata.asmlists[al_procedures]);
-
          { generate rtti/init tables }
          { generate rtti/init tables }
          write_persistent_type_info(current_module.localsymtable);
          write_persistent_type_info(current_module.localsymtable);
 
 

+ 7 - 68
compiler/powerpc/agppcmpw.pas

@@ -479,25 +479,6 @@ interface
       t[3]:= b;
       t[3]:= b;
     end;
     end;
 
 
-   function fixline(s:string):string;
-   {
-     return s with all leading and ending spaces and tabs removed
-   }
-     var
-       i,j,k : longint;
-     begin
-       i:=length(s);
-       while (i>0) and (s[i] in [#9,' ']) do
-        dec(i);
-       j:=1;
-       while (j<i) and (s[j] in [#9,' ']) do
-        inc(j);
-       for k:=j to i do
-        if s[k] in [#0..#31,#127..#255] then
-         s[k]:='.';
-       fixline:=Copy(s,j,i-j+1);
-     end;
-
     Function PadTabs(const p:string;addch:char):string;
     Function PadTabs(const p:string;addch:char):string;
     var
     var
       s : string;
       s : string;
@@ -712,7 +693,6 @@ interface
     var
     var
       s        : string;
       s        : string;
       hp       : tai;
       hp       : tai;
-      hp1      : tailineinfo;
       counter,
       counter,
       lines,
       lines,
       InlineLevel : longint;
       InlineLevel : longint;
@@ -735,54 +715,13 @@ interface
       hp:=tai(p.first);
       hp:=tai(p.first);
       while assigned(hp) do
       while assigned(hp) do
        begin
        begin
-         if not(hp.typ in SkipLineInfo) and
-            not DoNotSplitLine then
-           begin
-             hp1 := hp as tailineinfo;
-
-             if do_line then
-              begin
-           { load infile }
-             if lastfileinfo.fileindex<>hp1.fileinfo.fileindex then
-              begin
-                infile:=current_module.sourcefiles.get_file(hp1.fileinfo.fileindex);
-                if assigned(infile) then
-                 begin
-                   { open only if needed !! }
-                   if (cs_asm_source in current_settings.globalswitches) then
-                    infile.open;
-                 end;
-                { avoid unnecessary reopens of the same file !! }
-                lastfileinfo.fileindex:=hp1.fileinfo.fileindex;
-                { be sure to change line !! }
-                lastfileinfo.line:=-1;
-              end;
-           { write source }
-             if (cs_asm_source in current_settings.globalswitches) and
-                assigned(infile) then
-              begin
-                if (infile<>lastinfile) then
-                  begin
-                    AsmWriteLn(target_asm.comment+'['+infile.name^+']');
-                    if assigned(lastinfile) then
-                      lastinfile.close;
-                  end;
-                if (hp1.fileinfo.line<>lastfileinfo.line) and
-                   ((hp1.fileinfo.line<infile.maxlinebuf) or (InlineLevel>0)) then
-                  begin
-                    if (hp1.fileinfo.line<>0) and
-                       ((infile.linebuf^[hp1.fileinfo.line]>=0) or (InlineLevel>0)) then
-                      AsmWriteLn(target_asm.comment+'['+tostr(hp1.fileinfo.line)+'] '+
-                        fixline(infile.GetLineStr(hp1.fileinfo.line)));
-                    { set it to a negative value !
-                    to make that is has been read already !! PM }
-                    if (infile.linebuf^[hp1.fileinfo.line]>=0) then
-                      infile.linebuf^[hp1.fileinfo.line]:=-infile.linebuf^[hp1.fileinfo.line]-1;
-                  end;
-              end;
-             lastfileinfo:=hp1.fileinfo;
-             lastinfile:=infile;
-           end;
+         prefetch(pointer(hp.next)^);
+         if not(hp.typ in SkipLineInfo) then
+          begin
+            current_filepos:=tailineinfo(hp).fileinfo;
+            { no line info for inlined code }
+            if do_line and (inlinelevel=0) and not DoNotSplitLine then
+              WriteSourceLine(hp as tailineinfo);
           end;
           end;
 
 
          DoNotSplitLine:=false;
          DoNotSplitLine:=false;

+ 21 - 21
compiler/powerpc/cgcpu.pas

@@ -40,16 +40,16 @@ unit cgcpu;
         procedure a_call_name(list : TAsmList;const s : string; weak: boolean);override;
         procedure a_call_name(list : TAsmList;const s : string; weak: boolean);override;
         procedure a_call_reg(list : TAsmList;reg: tregister); override;
         procedure a_call_reg(list : TAsmList;reg: tregister); override;
 
 
-        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; reg: TRegister); override;
+        procedure a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister); override;
         procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
         procedure a_op_reg_reg(list : TAsmList; Op: TOpCG; size: TCGSize; src, dst: TRegister); override;
 
 
         procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg;
         procedure a_op_const_reg_reg(list: TAsmList; op: TOpCg;
-          size: tcgsize; a: aint; src, dst: tregister); override;
+          size: tcgsize; a: tcgint; src, dst: tregister); override;
         procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg;
         procedure a_op_reg_reg_reg(list: TAsmList; op: TOpCg;
           size: tcgsize; src1, src2, dst: tregister); override;
           size: tcgsize; src1, src2, dst: tregister); override;
 
 
         { move instructions }
         { move instructions }
-        procedure a_load_const_reg(list : TAsmList; size: tcgsize; a : aint;reg : tregister);override;
+        procedure a_load_const_reg(list : TAsmList; size: tcgsize; a : tcgint;reg : tregister);override;
         procedure a_load_ref_reg(list : TAsmList; fromsize, tosize : tcgsize;const Ref : treference;reg : tregister);override;
         procedure a_load_ref_reg(list : TAsmList; fromsize, tosize : tcgsize;const Ref : treference;reg : tregister);override;
         procedure a_load_reg_reg(list : TAsmList; fromsize, tosize : tcgsize;reg1,reg2 : tregister);override;
         procedure a_load_reg_reg(list : TAsmList; fromsize, tosize : tcgsize;reg1,reg2 : tregister);override;
 
 
@@ -58,7 +58,7 @@ unit cgcpu;
         procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize: tcgsize; const fromsreg, tosreg: tsubsetregister); override;
         procedure a_load_subsetreg_subsetreg(list: TAsmlist; fromsubsetsize, tosubsetsize: tcgsize; const fromsreg, tosreg: tsubsetregister); override;
 
 
         {  comparison operations }
         {  comparison operations }
-        procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
+        procedure a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
           l : tasmlabel);override;
           l : tasmlabel);override;
         procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
         procedure a_cmp_reg_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;reg1,reg2 : tregister;l : tasmlabel); override;
 
 
@@ -73,7 +73,7 @@ unit cgcpu;
         procedure g_save_registers(list:TAsmList); override;
         procedure g_save_registers(list:TAsmList); override;
         procedure g_restore_registers(list:TAsmList); override;
         procedure g_restore_registers(list:TAsmList); override;
 
 
-        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
+        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);override;
 
 
         { find out whether a is of the form 11..00..11b or 00..11...00. If }
         { find out whether a is of the form 11..00..11b or 00..11...00. If }
         { that's the case, we can use rlwinm to do an AND operation        }
         { that's the case, we can use rlwinm to do an AND operation        }
@@ -86,7 +86,7 @@ unit cgcpu;
         (* NOT IN USE: *)
         (* NOT IN USE: *)
         procedure g_stackframe_entry_mac(list : TAsmList;localsize : longint);
         procedure g_stackframe_entry_mac(list : TAsmList;localsize : longint);
         (* NOT IN USE: *)
         (* NOT IN USE: *)
-        procedure g_return_from_proc_mac(list : TAsmList;parasize : aint);
+        procedure g_return_from_proc_mac(list : TAsmList;parasize : tcgint);
 
 
         { clear out potential overflow bits from 8 or 16 bit operations  }
         { clear out potential overflow bits from 8 or 16 bit operations  }
         { the upper 24/16 bits of a register after an operation          }
         { the upper 24/16 bits of a register after an operation          }
@@ -230,7 +230,7 @@ const
 
 
 {********************** load instructions ********************}
 {********************** load instructions ********************}
 
 
-     procedure tcgppc.a_load_const_reg(list : TAsmList; size: TCGSize; a : aint; reg : TRegister);
+     procedure tcgppc.a_load_const_reg(list : TAsmList; size: TCGSize; a : tcgint; reg : TRegister);
 
 
        begin
        begin
           if not(size in [OS_8,OS_S8,OS_16,OS_S16,OS_32,OS_S32]) then
           if not(size in [OS_8,OS_S8,OS_16,OS_S16,OS_32,OS_S32]) then
@@ -386,7 +386,7 @@ const
          end;
          end;
 
 
 
 
-     procedure tcgppc.a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: aint; reg: TRegister);
+     procedure tcgppc.a_op_const_reg(list : TAsmList; Op: TOpCG; size: TCGSize; a: tcgint; reg: TRegister);
 
 
        begin
        begin
          a_op_const_reg_reg(list,op,size,a,reg,reg);
          a_op_const_reg_reg(list,op,size,a,reg,reg);
@@ -411,7 +411,7 @@ const
 
 
 
 
     procedure tcgppc.a_op_const_reg_reg(list: TAsmList; op: TOpCg;
     procedure tcgppc.a_op_const_reg_reg(list: TAsmList; op: TOpCg;
-                       size: tcgsize; a: aint; src, dst: tregister);
+                       size: tcgsize; a: tcgint; src, dst: tregister);
       var
       var
         l1,l2: longint;
         l1,l2: longint;
         oplo, ophi: tasmop;
         oplo, ophi: tasmop;
@@ -584,14 +584,14 @@ const
 	    begin
 	    begin
 	      if (not (size in [OS_32, OS_S32])) then begin
 	      if (not (size in [OS_32, OS_S32])) then begin
 	        internalerror(2008091307);
 	        internalerror(2008091307);
-	      end;    
+	      end;
 	      list.concat(taicpu.op_reg_reg_const_const_const(A_RLWINM, dst, src, a and 31, 0, 31));
 	      list.concat(taicpu.op_reg_reg_const_const_const(A_RLWINM, dst, src, a and 31, 0, 31));
 	    end;
 	    end;
 	  OP_ROR:
 	  OP_ROR:
 	    begin
 	    begin
 	      if (not (size in [OS_32, OS_S32])) then begin
 	      if (not (size in [OS_32, OS_S32])) then begin
 		internalerror(2008091308);
 		internalerror(2008091308);
-	      end;    
+	      end;
 	      list.concat(taicpu.op_reg_reg_const_const_const(A_RLWINM, dst, src, (32 - a) and 31, 0, 31));
 	      list.concat(taicpu.op_reg_reg_const_const_const(A_RLWINM, dst, src, (32 - a) and 31, 0, 31));
 	    end
 	    end
           else
           else
@@ -656,7 +656,7 @@ const
 
 
 {*************** compare instructructions ****************}
 {*************** compare instructructions ****************}
 
 
-      procedure tcgppc.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : aint;reg : tregister;
+      procedure tcgppc.a_cmp_const_reg_label(list : TAsmList;size : tcgsize;cmp_op : topcmp;a : tcgint;reg : tregister;
         l : tasmlabel);
         l : tasmlabel);
 
 
         var
         var
@@ -1006,7 +1006,7 @@ const
          regcounter,firstregfpu,firstregint: TsuperRegister;
          regcounter,firstregfpu,firstregint: TsuperRegister;
          href : treference;
          href : treference;
          usesfpr,usesgpr,genret : boolean;
          usesfpr,usesgpr,genret : boolean;
-         localsize: aint;
+         localsize: tcgint;
       begin
       begin
         { AltiVec context restore, not yet implemented !!! }
         { AltiVec context restore, not yet implemented !!! }
 
 
@@ -1129,7 +1129,7 @@ const
      var regcounter,firstregfpu,firstreggpr: TSuperRegister;
      var regcounter,firstregfpu,firstreggpr: TSuperRegister;
          usesfpr,usesgpr: boolean;
          usesfpr,usesgpr: boolean;
          href : treference;
          href : treference;
-         offset: aint;
+         offset: tcgint;
          regcounter2, firstfpureg: Tsuperregister;
          regcounter2, firstfpureg: Tsuperregister;
     begin
     begin
       usesfpr:=false;
       usesfpr:=false;
@@ -1369,7 +1369,7 @@ const
           end;
           end;
       end;
       end;
 
 
-    procedure tcgppc.g_return_from_proc_mac(list : TAsmList;parasize : aint);
+    procedure tcgppc.g_return_from_proc_mac(list : TAsmList;parasize : tcgint);
  (* NOT IN USE *)
  (* NOT IN USE *)
 
 
       var
       var
@@ -1426,7 +1426,7 @@ const
     maxmoveunit = 4;
     maxmoveunit = 4;
 {$endif use8byteconcatcopy}
 {$endif use8byteconcatcopy}
 
 
-    procedure tcgppc.g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcgppc.g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);
 
 
       var
       var
         countreg: TRegister;
         countreg: TRegister;
@@ -1742,8 +1742,8 @@ const
         case op of
         case op of
           OP_AND,OP_OR,OP_XOR:
           OP_AND,OP_OR,OP_XOR:
             begin
             begin
-              cg.a_op_const_reg_reg(list,op,OS_32,aint(value),regsrc.reglo,regdst.reglo);
-              cg.a_op_const_reg_reg(list,op,OS_32,aint(value shr 32),regsrc.reghi,
+              cg.a_op_const_reg_reg(list,op,OS_32,tcgint(value),regsrc.reglo,regdst.reglo);
+              cg.a_op_const_reg_reg(list,op,OS_32,tcgint(value shr 32),regsrc.reghi,
                 regdst.reghi);
                 regdst.reghi);
             end;
             end;
           OP_ADD, OP_SUB:
           OP_ADD, OP_SUB:
@@ -1771,7 +1771,7 @@ const
                   else if ((value shr 32) = 0) then
                   else if ((value shr 32) = 0) then
                     begin
                     begin
                       tmpreg := tcgppc(cg).rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
                       tmpreg := tcgppc(cg).rg[R_INTREGISTER].getregister(list,R_SUBWHOLE);
-                      cg.a_load_const_reg(list,OS_32,aint(value),tmpreg);
+                      cg.a_load_const_reg(list,OS_32,tcgint(value),tmpreg);
                       list.concat(taicpu.op_reg_reg_reg(ops[issub,2],
                       list.concat(taicpu.op_reg_reg_reg(ops[issub,2],
                         regdst.reglo,regsrc.reglo,tmpreg));
                         regdst.reglo,regsrc.reglo,tmpreg));
                       list.concat(taicpu.op_reg_reg(ops[issub,3],
                       list.concat(taicpu.op_reg_reg(ops[issub,3],
@@ -1788,7 +1788,7 @@ const
               else
               else
                 begin
                 begin
                   cg.a_load_reg_reg(list,OS_INT,OS_INT,regsrc.reglo,regdst.reglo);
                   cg.a_load_reg_reg(list,OS_INT,OS_INT,regsrc.reglo,regdst.reglo);
-                  cg.a_op_const_reg_reg(list,op,OS_32,aint(value shr 32),regsrc.reghi,
+                  cg.a_op_const_reg_reg(list,op,OS_32,tcgint(value shr 32),regsrc.reghi,
                     regdst.reghi);
                     regdst.reghi);
                 end;
                 end;
             end;
             end;
@@ -1803,5 +1803,5 @@ const
         cg := tcgppc.create;
         cg := tcgppc.create;
         cg64 :=tcg64fppc.create;
         cg64 :=tcg64fppc.create;
       end;
       end;
-      
+
 end.
 end.

+ 4 - 1
compiler/ppcavr.lpi

@@ -12,7 +12,7 @@
       </Flags>
       </Flags>
       <SessionStorage Value="InProjectDir"/>
       <SessionStorage Value="InProjectDir"/>
       <MainUnit Value="0"/>
       <MainUnit Value="0"/>
-      <Title Value="pp"/>
+      <Title Value="ppavr"/>
     </General>
     </General>
     <BuildModes Count="1">
     <BuildModes Count="1">
       <Item1 Name="default" Default="True"/>
       <Item1 Name="default" Default="True"/>
@@ -74,6 +74,9 @@
       <ConfigFile>
       <ConfigFile>
         <StopAfterErrCount Value="50"/>
         <StopAfterErrCount Value="50"/>
       </ConfigFile>
       </ConfigFile>
+      <CompilerMessages>
+        <UseMsgFile Value="True"/>
+      </CompilerMessages>
       <CustomOptions Value="-davr"/>
       <CustomOptions Value="-davr"/>
       <CompilerPath Value="$(CompPath)"/>
       <CompilerPath Value="$(CompPath)"/>
     </Other>
     </Other>

+ 11 - 11
compiler/ppcgen/cgppc.pas

@@ -34,7 +34,7 @@ unit cgppc;
 
 
     type
     type
       tcgppcgen = class(tcg)
       tcgppcgen = class(tcg)
-        procedure a_load_const_cgpara(list: TAsmList; size: tcgsize; a: aint; const paraloc : tcgpara); override;
+        procedure a_load_const_cgpara(list: TAsmList; size: tcgsize; a: tcgint; const paraloc : tcgpara); override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
         procedure a_loadaddr_ref_cgpara(list : TAsmList;const r : treference;const paraloc : tcgpara); override;
 
 
         procedure a_call_reg(list : TAsmList;reg: tregister); override;
         procedure a_call_reg(list : TAsmList;reg: tregister); override;
@@ -117,7 +117,7 @@ unit cgppc;
          if (assigned(ref.symbol)) then
          if (assigned(ref.symbol)) then
            result := result + ref.symbol.name;
            result := result + ref.symbol.name;
        end;
        end;
-     
+
      function cgsize2string(const size : TCgSize) : string;
      function cgsize2string(const size : TCgSize) : string;
        const
        const
          cgsize_strings : array[TCgSize] of string[8] = (
          cgsize_strings : array[TCgSize] of string[8] = (
@@ -128,7 +128,7 @@ unit cgppc;
        begin
        begin
          result := cgsize_strings[size];
          result := cgsize_strings[size];
        end;
        end;
-     
+
      function cgop2string(const op : TOpCg) : String;
      function cgop2string(const op : TOpCg) : String;
        const
        const
          opcg_strings : array[TOpCg] of string[6] = (
          opcg_strings : array[TOpCg] of string[6] = (
@@ -139,7 +139,7 @@ unit cgppc;
          result := opcg_strings[op];
          result := opcg_strings[op];
        end;
        end;
 {$endif extdebug}
 {$endif extdebug}
-    
+
 
 
     function tcgppcgen.hasLargeOffset(const ref : TReference) : Boolean;
     function tcgppcgen.hasLargeOffset(const ref : TReference) : Boolean;
       begin
       begin
@@ -151,13 +151,13 @@ unit cgppc;
       begin
       begin
         result:=
         result:=
         (not (po_assembler in current_procinfo.procdef.procoptions) and
         (not (po_assembler in current_procinfo.procdef.procoptions) and
-         ((pi_do_call in current_procinfo.flags) or 
+         ((pi_do_call in current_procinfo.flags) or
           (cs_profile in init_settings.moduleswitches)))  or
           (cs_profile in init_settings.moduleswitches)))  or
         ([cs_lineinfo,cs_debuginfo] * current_settings.moduleswitches <> []);
         ([cs_lineinfo,cs_debuginfo] * current_settings.moduleswitches <> []);
       end;
       end;
 
 
 
 
-    procedure tcgppcgen.a_load_const_cgpara(list: TAsmList; size: tcgsize; a: aint; const
+    procedure tcgppcgen.a_load_const_cgpara(list: TAsmList; size: tcgsize; a: tcgint; const
       paraloc: tcgpara);
       paraloc: tcgpara);
     var
     var
       ref: treference;
       ref: treference;
@@ -751,21 +751,21 @@ unit cgppc;
       reference_reset_symbol(ref,l,0,sizeof(pint));
       reference_reset_symbol(ref,l,0,sizeof(pint));
       ref.base := NR_R2;
       ref.base := NR_R2;
       ref.refaddr := addr_pic;
       ref.refaddr := addr_pic;
-    
+
       result := rg[R_INTREGISTER].getregister(list, R_SUBWHOLE);
       result := rg[R_INTREGISTER].getregister(list, R_SUBWHOLE);
       {$IFDEF EXTDEBUG}
       {$IFDEF EXTDEBUG}
       list.concat(tai_comment.create(strpnew('loading got reference for ' + symbol)));
       list.concat(tai_comment.create(strpnew('loading got reference for ' + symbol)));
       {$ENDIF EXTDEBUG}
       {$ENDIF EXTDEBUG}
     //  cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,result);
     //  cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,result);
-      
+
 {$ifdef cpu64bitaddr}
 {$ifdef cpu64bitaddr}
       list.concat(taicpu.op_reg_ref(A_LD, result, ref));
       list.concat(taicpu.op_reg_ref(A_LD, result, ref));
 {$else cpu64bitaddr}
 {$else cpu64bitaddr}
       list.concat(taicpu.op_reg_ref(A_LWZ, result, ref));
       list.concat(taicpu.op_reg_ref(A_LWZ, result, ref));
 {$endif cpu64bitaddr}
 {$endif cpu64bitaddr}
     end;
     end;
-    
-    
+
+
     function tcgppcgen.fixref(list: TAsmList; var ref: treference): boolean;
     function tcgppcgen.fixref(list: TAsmList; var ref: treference): boolean;
       var
       var
         tmpreg: tregister;
         tmpreg: tregister;
@@ -813,7 +813,7 @@ unit cgppc;
 
 
         { if we have to create PIC, add the symbol to the TOC/GOT }
         { if we have to create PIC, add the symbol to the TOC/GOT }
         if (target_info.system = system_powerpc64_linux) and
         if (target_info.system = system_powerpc64_linux) and
-           (cs_create_pic in current_settings.moduleswitches) and 
+           (cs_create_pic in current_settings.moduleswitches) and
            (assigned(ref.symbol)) then
            (assigned(ref.symbol)) then
           begin
           begin
             tmpreg := load_got_symbol(list, ref.symbol.name);
             tmpreg := load_got_symbol(list, ref.symbol.name);

+ 11 - 17
compiler/ppu.pas

@@ -43,7 +43,7 @@ type
 {$endif Test_Double_checksum}
 {$endif Test_Double_checksum}
 
 
 const
 const
-  CurrentPPUVersion = 128;
+  CurrentPPUVersion = 131;
 
 
 { buffer sizes }
 { buffer sizes }
   maxentrysize = 1024;
   maxentrysize = 1024;
@@ -413,7 +413,6 @@ end;
 
 
 function tppufile.openfile:boolean;
 function tppufile.openfile:boolean;
 var
 var
-  ofmode : byte;
   i      : integer;
   i      : integer;
 begin
 begin
   openfile:=false;
   openfile:=false;
@@ -1182,6 +1181,7 @@ procedure tppufile.tempclose;
      begin
      begin
        closepos:=f.Position;
        closepos:=f.Position;
        f.Free;
        f.Free;
+       f:=nil;
        closed:=true;
        closed:=true;
        tempclosed:=true;
        tempclosed:=true;
      end;
      end;
@@ -1189,25 +1189,19 @@ procedure tppufile.tempclose;
 
 
 
 
 function tppufile.tempopen:boolean;
 function tppufile.tempopen:boolean;
-  var
-    ofm : byte;
   begin
   begin
     tempopen:=false;
     tempopen:=false;
     if not closed or not tempclosed then
     if not closed or not tempclosed then
      exit;
      exit;
-    // MG: not sure, if this is correct
-
-    f.Position:=0;
-    (*
-    ofm:=filemode;
-    filemode:=0;
-    {$I-}
-     reset(f,1);
-    {$I+}
-    filemode:=ofm;
-    if ioresult<>0 then
-     exit;
-    *)
+   { MG: not sure, if this is correct
+     f.position:=0;
+       No, f was freed in tempclose above, we need to
+       recreate it.  PM 2011/06/06 }
+    try
+      f:=CFileStreamClass.Create(fname,fmOpenRead);
+    except
+      exit;
+    end;
     closed:=false;
     closed:=false;
     tempclosed:=false;
     tempclosed:=false;
 
 

+ 2 - 4
compiler/pstatmnt.pas

@@ -1297,8 +1297,7 @@ implementation
          include(current_procinfo.flags,pi_is_assembler);
          include(current_procinfo.flags,pi_is_assembler);
          p:=_asm_statement;
          p:=_asm_statement;
 
 
-{$ifndef sparc}
-{$ifndef arm}
+{$if not(defined(sparc)) and not(defined(arm)) and not(defined(avr))}
          if (po_assembler in current_procinfo.procdef.procoptions) then
          if (po_assembler in current_procinfo.procdef.procoptions) then
            begin
            begin
              { set the framepointer to esp for assembler functions when the
              { set the framepointer to esp for assembler functions when the
@@ -1323,8 +1322,7 @@ implementation
                  current_procinfo.framepointer:=NR_STACK_POINTER_REG;
                  current_procinfo.framepointer:=NR_STACK_POINTER_REG;
                end;
                end;
            end;
            end;
-{$endif arm}
-{$endif sparc}
+{$endif not(defined(sparc)) and not(defined(arm)) and not(defined(avr))}
 
 
         { Flag the result as assigned when it is returned in a
         { Flag the result as assigned when it is returned in a
           register.
           register.

+ 43 - 24
compiler/psub.pas

@@ -162,6 +162,8 @@ implementation
 
 
 
 
     function block(islibrary : boolean) : tnode;
     function block(islibrary : boolean) : tnode;
+      var
+        oldfilepos: tfileposinfo;
       begin
       begin
          { parse const,types and vars }
          { parse const,types and vars }
          read_declarations(islibrary);
          read_declarations(islibrary);
@@ -240,7 +242,14 @@ implementation
             begin
             begin
                block:=statement_block(_BEGIN);
                block:=statement_block(_BEGIN);
                if current_procinfo.procdef.localst.symtabletype=localsymtable then
                if current_procinfo.procdef.localst.symtabletype=localsymtable then
-                 current_procinfo.procdef.localst.SymList.ForEachCall(@initializevars,block);
+                 begin
+                   { initialization of local variables with their initial
+                     values: part of function entry }
+                   oldfilepos:=current_filepos;
+                   current_filepos:=current_procinfo.entrypos;
+                   current_procinfo.procdef.localst.SymList.ForEachCall(@initializevars,block);
+                   current_filepos:=oldfilepos;
+                 end;
             end;
             end;
       end;
       end;
 
 
@@ -1768,7 +1777,16 @@ implementation
 
 
                  { Import DLL specified? }
                  { Import DLL specified? }
                  if assigned(pd.import_dll) then
                  if assigned(pd.import_dll) then
-                   current_module.AddExternalImport(pd.import_dll^,proc_get_importname(pd),pd.import_nr,false,pd.import_name=nil)
+                   begin
+                     if assigned (pd.import_name) then
+                       current_module.AddExternalImport(pd.import_dll^,
+                         pd.import_name^,proc_get_importname(pd),
+                         pd.import_nr,false,false)
+                     else
+                       current_module.AddExternalImport(pd.import_dll^,
+                         proc_get_importname(pd),proc_get_importname(pd),
+                         pd.import_nr,false,true);
+                   end
                  else
                  else
                    begin
                    begin
                      { add import name to external list for DLL scanning }
                      { add import name to external list for DLL scanning }
@@ -1986,6 +2004,10 @@ implementation
 
 
         { Setup symtablestack a definition time }
         { Setup symtablestack a definition time }
         specobj:=tabstractrecorddef(ttypesym(p).typedef);
         specobj:=tabstractrecorddef(ttypesym(p).typedef);
+
+        if not (is_class_or_object(specobj) or is_record(specobj)) then
+          exit;
+
         oldsymtablestack:=symtablestack;
         oldsymtablestack:=symtablestack;
         oldextendeddefs:=current_module.extendeddefs;
         oldextendeddefs:=current_module.extendeddefs;
         current_module.extendeddefs:=TFPHashObjectList.create(true);
         current_module.extendeddefs:=TFPHashObjectList.create(true);
@@ -2009,31 +2031,28 @@ implementation
           symtablestack.push(hmodule.localsymtable);
           symtablestack.push(hmodule.localsymtable);
 
 
         { procedure definitions for classes or objects }
         { procedure definitions for classes or objects }
-        if is_class_or_object(specobj) or is_record(specobj) then
+        for i:=0 to specobj.symtable.DefList.Count-1 do
           begin
           begin
-            for i:=0 to specobj.symtable.DefList.Count-1 do
-              begin
-                hp:=tdef(specobj.symtable.DefList[i]);
-                if hp.typ=procdef then
+            hp:=tdef(specobj.symtable.DefList[i]);
+            if hp.typ=procdef then
+             begin
+               if assigned(tprocdef(hp).genericdef) and
+                 (tprocdef(hp).genericdef.typ=procdef) and
+                 assigned(tprocdef(tprocdef(hp).genericdef).generictokenbuf) then
                  begin
                  begin
-                   if assigned(tprocdef(hp).genericdef) and
-                     (tprocdef(hp).genericdef.typ=procdef) and
-                     assigned(tprocdef(tprocdef(hp).genericdef).generictokenbuf) then
-                     begin
-                       oldcurrent_filepos:=current_filepos;
-                       current_filepos:=tprocdef(tprocdef(hp).genericdef).fileinfo;
-                       { use the index the module got from the current compilation process }
-                       current_filepos.moduleindex:=hmodule.unit_index;
-                       current_tokenpos:=current_filepos;
-                       current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf);
-                       read_proc_body(nil,tprocdef(hp));
-                       current_filepos:=oldcurrent_filepos;
-                     end
-                   else
-                     MessagePos1(tprocdef(hp).fileinfo,sym_e_forward_not_resolved,tprocdef(hp).fullprocname(false));
-                 end;
+                   oldcurrent_filepos:=current_filepos;
+                   current_filepos:=tprocdef(tprocdef(hp).genericdef).fileinfo;
+                   { use the index the module got from the current compilation process }
+                   current_filepos.moduleindex:=hmodule.unit_index;
+                   current_tokenpos:=current_filepos;
+                   current_scanner.startreplaytokens(tprocdef(tprocdef(hp).genericdef).generictokenbuf);
+                   read_proc_body(nil,tprocdef(hp));
+                   current_filepos:=oldcurrent_filepos;
+                 end
+               else
+                 MessagePos1(tprocdef(hp).fileinfo,sym_e_forward_not_resolved,tprocdef(hp).fullprocname(false));
              end;
              end;
-          end;
+         end;
 
 
         { Restore symtablestack }
         { Restore symtablestack }
         current_module.extendeddefs.free;
         current_module.extendeddefs.free;

+ 5 - 2
compiler/ptype.pas

@@ -491,7 +491,6 @@ implementation
         srsymtable : TSymtable;
         srsymtable : TSymtable;
         s,sorg : TIDString;
         s,sorg : TIDString;
         t : ttoken;
         t : ttoken;
-        structdef : tabstractrecorddef;
       begin
       begin
          s:=pattern;
          s:=pattern;
          sorg:=orgpattern;
          sorg:=orgpattern;
@@ -684,6 +683,11 @@ implementation
               begin
               begin
                 consume(_TYPE);
                 consume(_TYPE);
                 member_blocktype:=bt_type;
                 member_blocktype:=bt_type;
+
+                { local and anonymous records can not have inner types. skip top record symtable }
+                if (current_structdef.objname^='') or 
+                   not(symtablestack.stack^.next^.symtable.symtabletype in [globalsymtable,staticsymtable,objectsymtable,recordsymtable]) then
+                  Message(parser_e_no_types_in_local_anonymous_records);
               end;
               end;
             _VAR :
             _VAR :
               begin
               begin
@@ -1002,7 +1006,6 @@ implementation
            lv,hv   : TConstExprInt;
            lv,hv   : TConstExprInt;
            old_block_type : tblock_type;
            old_block_type : tblock_type;
            dospecialize : boolean;
            dospecialize : boolean;
-           structdef: tdef;
         begin
         begin
            old_block_type:=block_type;
            old_block_type:=block_type;
            dospecialize:=false;
            dospecialize:=false;

+ 2 - 1
compiler/scandir.pas

@@ -1330,7 +1330,8 @@ unit scandir;
       begin
       begin
         current_scanner.skipspace;
         current_scanner.skipspace;
         s:=current_scanner.readcomment;
         s:=current_scanner.readcomment;
-        UpdateAlignmentStr(s,current_settings.alignment);
+        if not(UpdateAlignmentStr(s,current_settings.alignment)) then
+          message(scanner_e_illegal_alignment_directive);
       end;
       end;
 
 
     procedure dir_codepage;
     procedure dir_codepage;

+ 97 - 42
compiler/scanner.pas

@@ -78,6 +78,8 @@ interface
 
 
        tspecialgenerictoken = (ST_LOADSETTINGS,ST_LINE,ST_COLUMN,ST_FILEINDEX);
        tspecialgenerictoken = (ST_LOADSETTINGS,ST_LINE,ST_COLUMN,ST_FILEINDEX);
 
 
+       { tscannerfile }
+
        tscannerfile = class
        tscannerfile = class
        private
        private
          procedure do_gettokenpos(out tokenpos: longint; out filepos: tfileposinfo);
          procedure do_gettokenpos(out tokenpos: longint; out filepos: tfileposinfo);
@@ -85,6 +87,8 @@ interface
          procedure setnexttoken;
          procedure setnexttoken;
          procedure savetokenpos;
          procedure savetokenpos;
          procedure restoretokenpos;
          procedure restoretokenpos;
+         procedure writetoken(t: ttoken);
+         function readtoken : ttoken;
        public
        public
           inputfile    : tinputfile;  { current inputfile list }
           inputfile    : tinputfile;  { current inputfile list }
           inputfilecount : longint;
           inputfilecount : longint;
@@ -1684,8 +1688,8 @@ In case not, the value returned can be arbitrary.
         foundfile : TCmdStr;
         foundfile : TCmdStr;
         path,
         path,
         name,
         name,
-        args,
         hs    : tpathstr;
         hs    : tpathstr;
+        args  : string;
         hp    : tinputfile;
         hp    : tinputfile;
         found : boolean;
         found : boolean;
       begin
       begin
@@ -2057,11 +2061,26 @@ In case not, the value returned can be arbitrary.
       end;
       end;
 
 
 
 
+    procedure tscannerfile.writetoken(t : ttoken);
+      var
+        b : byte;
+      begin
+        if ord(t)>$7f then
+          begin
+            b:=(ord(t) shr 8) or $80;
+            recordtokenbuf.write(b,1);
+          end;
+        b:=ord(t) and $ff;
+        recordtokenbuf.write(b,1);
+      end;
+
+
     procedure tscannerfile.recordtoken;
     procedure tscannerfile.recordtoken;
       var
       var
         t : ttoken;
         t : ttoken;
         s : tspecialgenerictoken;
         s : tspecialgenerictoken;
         len : sizeint;
         len : sizeint;
+        b : byte;
       begin
       begin
         if not assigned(recordtokenbuf) then
         if not assigned(recordtokenbuf) then
           internalerror(200511176);
           internalerror(200511176);
@@ -2071,7 +2090,7 @@ In case not, the value returned can be arbitrary.
           begin
           begin
             { use a special token to record it }
             { use a special token to record it }
             s:=ST_LOADSETTINGS;
             s:=ST_LOADSETTINGS;
-            recordtokenbuf.write(t,SizeOf(t));
+            writetoken(t);
             recordtokenbuf.write(s,1);
             recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_settings,sizeof(current_settings));
             recordtokenbuf.write(current_settings,sizeof(current_settings));
             last_settings:=current_settings;
             last_settings:=current_settings;
@@ -2081,7 +2100,7 @@ In case not, the value returned can be arbitrary.
         if current_tokenpos.line<>last_filepos.line then
         if current_tokenpos.line<>last_filepos.line then
           begin
           begin
             s:=ST_LINE;
             s:=ST_LINE;
-            recordtokenbuf.write(t,SizeOf(t));
+            writetoken(t);
             recordtokenbuf.write(s,1);
             recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_tokenpos.line,sizeof(current_tokenpos.line));
             recordtokenbuf.write(current_tokenpos.line,sizeof(current_tokenpos.line));
             last_filepos.line:=current_tokenpos.line;
             last_filepos.line:=current_tokenpos.line;
@@ -2089,23 +2108,32 @@ In case not, the value returned can be arbitrary.
         if current_tokenpos.column<>last_filepos.column then
         if current_tokenpos.column<>last_filepos.column then
           begin
           begin
             s:=ST_COLUMN;
             s:=ST_COLUMN;
-            recordtokenbuf.write(t,SizeOf(t));
-            recordtokenbuf.write(s,1);
-            recordtokenbuf.write(current_tokenpos.column,sizeof(current_tokenpos.column));
+            writetoken(t);
+            { can the column be written packed? }
+            if current_tokenpos.column<$80 then
+              begin
+                b:=$80 or current_tokenpos.column;
+                recordtokenbuf.write(b,1);
+              end
+            else
+              begin
+                recordtokenbuf.write(s,1);
+                recordtokenbuf.write(current_tokenpos.column,sizeof(current_tokenpos.column));
+              end;
             last_filepos.column:=current_tokenpos.column;
             last_filepos.column:=current_tokenpos.column;
           end;
           end;
         if current_tokenpos.fileindex<>last_filepos.fileindex then
         if current_tokenpos.fileindex<>last_filepos.fileindex then
           begin
           begin
             s:=ST_FILEINDEX;
             s:=ST_FILEINDEX;
-            recordtokenbuf.write(t,SizeOf(t));
+            writetoken(t);
             recordtokenbuf.write(s,1);
             recordtokenbuf.write(s,1);
             recordtokenbuf.write(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
             recordtokenbuf.write(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
             last_filepos.fileindex:=current_tokenpos.fileindex;
             last_filepos.fileindex:=current_tokenpos.fileindex;
           end;
           end;
 
 
-        recordtokenbuf.write(token,SizeOf(token));
-        if token=_ID then
-          recordtokenbuf.write(idtoken,SizeOf(idtoken));
+        writetoken(token);
+        if token<>_GENERICSPECIALTOKEN then
+          writetoken(idtoken);
         case token of
         case token of
           _CWCHAR,
           _CWCHAR,
           _CWSTRING :
           _CWSTRING :
@@ -2160,6 +2188,21 @@ In case not, the value returned can be arbitrary.
       end;
       end;
 
 
 
 
+    function tscannerfile.readtoken: ttoken;
+      var
+        b,b2 : byte;
+      begin
+        replaytokenbuf.read(b,1);
+        if (b and $80)<>0 then
+          begin
+            replaytokenbuf.read(b2,1);
+            result:=ttoken(((b and $7f) shl 8) or b2);
+          end
+        else
+          result:=ttoken(b);
+      end;
+
+
     procedure tscannerfile.replaytoken;
     procedure tscannerfile.replaytoken;
       var
       var
         wlen : sizeint;
         wlen : sizeint;
@@ -2184,9 +2227,9 @@ In case not, the value returned can be arbitrary.
           end;
           end;
         repeat
         repeat
           { load token from the buffer }
           { load token from the buffer }
-          replaytokenbuf.read(token,SizeOf(token));
-          if token=_ID then
-            replaytokenbuf.read(idtoken,SizeOf(idtoken))
+          token:=readtoken;
+          if token<>_GENERICSPECIALTOKEN then
+            idtoken:=readtoken
           else
           else
             idtoken:=_NOID;
             idtoken:=_NOID;
           case token of
           case token of
@@ -2225,45 +2268,57 @@ In case not, the value returned can be arbitrary.
             _GENERICSPECIALTOKEN:
             _GENERICSPECIALTOKEN:
               begin
               begin
                 replaytokenbuf.read(specialtoken,1);
                 replaytokenbuf.read(specialtoken,1);
-                case specialtoken of
-                  ST_LOADSETTINGS:
-                    replaytokenbuf.read(current_settings,sizeof(current_settings));
-                  ST_LINE:
-                    begin
-                      replaytokenbuf.read(current_tokenpos.line,sizeof(current_tokenpos.line));
+                { packed column? }
+                if (ord(specialtoken) and $80)<>0 then
+                  begin
+                      current_tokenpos.column:=ord(specialtoken) and $7f;
 
 
                       { don't generate invalid line info if no sources are available for the current module }
                       { don't generate invalid line info if no sources are available for the current module }
                       if not(get_module(current_filepos.moduleindex).sources_avail) then
                       if not(get_module(current_filepos.moduleindex).sources_avail) then
-                        current_tokenpos.line:=0;
+                        current_tokenpos.column:=0;
 
 
                       current_filepos:=current_tokenpos;
                       current_filepos:=current_tokenpos;
-                    end;
-                  ST_COLUMN:
-                    begin
-                      replaytokenbuf.read(current_tokenpos.column,sizeof(current_tokenpos.column));
+                  end
+                else
+                  case specialtoken of
+                    ST_LOADSETTINGS:
+                      replaytokenbuf.read(current_settings,sizeof(current_settings));
+                    ST_LINE:
+                      begin
+                        replaytokenbuf.read(current_tokenpos.line,sizeof(current_tokenpos.line));
 
 
-                      { don't generate invalid line info if no sources are available for the current module }
-                      if not(get_module(current_filepos.moduleindex).sources_avail) then
-                        current_tokenpos.column:=0;
+                        { don't generate invalid line info if no sources are available for the current module }
+                        if not(get_module(current_filepos.moduleindex).sources_avail) then
+                          current_tokenpos.line:=0;
 
 
-                      current_filepos:=current_tokenpos;
-                    end;
-                  ST_FILEINDEX:
-                    begin
-                      replaytokenbuf.read(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
+                        current_filepos:=current_tokenpos;
+                      end;
+                    ST_COLUMN:
+                      begin
+                        replaytokenbuf.read(current_tokenpos.column,sizeof(current_tokenpos.column));
 
 
-                      { don't generate invalid line info if no sources are available for the current module }
-                      if not(get_module(current_filepos.moduleindex).sources_avail) then
-                        begin
+                        { don't generate invalid line info if no sources are available for the current module }
+                        if not(get_module(current_filepos.moduleindex).sources_avail) then
                           current_tokenpos.column:=0;
                           current_tokenpos.column:=0;
-                          current_tokenpos.line:=0;
-                        end;
 
 
-                      current_filepos:=current_tokenpos;
-                    end;
-                  else
-                    internalerror(2006103010);
-                end;
+                        current_filepos:=current_tokenpos;
+                      end;
+                    ST_FILEINDEX:
+                      begin
+                        replaytokenbuf.read(current_tokenpos.fileindex,sizeof(current_tokenpos.fileindex));
+
+                        { don't generate invalid line info if no sources are available for the current module }
+                        if not(get_module(current_filepos.moduleindex).sources_avail) then
+                          begin
+                            current_tokenpos.column:=0;
+                            current_tokenpos.line:=0;
+                          end;
+
+                        current_filepos:=current_tokenpos;
+                      end;
+                    else
+                      internalerror(2006103010);
+                  end;
                 continue;
                 continue;
               end;
               end;
           end;
           end;

+ 36 - 36
compiler/sparc/cgcpu.pas

@@ -44,9 +44,9 @@ interface
         { sparc special, needed by cg64 }
         { sparc special, needed by cg64 }
         procedure make_simple_ref(list:TAsmList;var ref: treference);
         procedure make_simple_ref(list:TAsmList;var ref: treference);
         procedure handle_load_store(list:TAsmList;isstore:boolean;op: tasmop;reg:tregister;ref: treference);
         procedure handle_load_store(list:TAsmList;isstore:boolean;op: tasmop;reg:tregister;ref: treference);
-        procedure handle_reg_const_reg(list:TAsmList;op:Tasmop;src:tregister;a:aint;dst:tregister);
+        procedure handle_reg_const_reg(list:TAsmList;op:Tasmop;src:tregister;a:tcgint;dst:tregister);
         { parameter }
         { parameter }
-        procedure a_load_const_cgpara(list:TAsmList;size:tcgsize;a:aint;const paraloc:TCGPara);override;
+        procedure a_load_const_cgpara(list:TAsmList;size:tcgsize;a:tcgint;const paraloc:TCGPara);override;
         procedure a_load_ref_cgpara(list:TAsmList;sz:tcgsize;const r:TReference;const paraloc:TCGPara);override;
         procedure a_load_ref_cgpara(list:TAsmList;sz:tcgsize;const r:TReference;const paraloc:TCGPara);override;
         procedure a_loadaddr_ref_cgpara(list:TAsmList;const r:TReference;const paraloc:TCGPara);override;
         procedure a_loadaddr_ref_cgpara(list:TAsmList;const r:TReference;const paraloc:TCGPara);override;
         procedure a_loadfpu_reg_cgpara(list : TAsmList;size : tcgsize;const r : tregister;const paraloc : TCGPara);override;
         procedure a_loadfpu_reg_cgpara(list : TAsmList;size : tcgsize;const r : tregister;const paraloc : TCGPara);override;
@@ -55,15 +55,15 @@ interface
         procedure a_call_reg(list:TAsmList;Reg:TRegister);override;
         procedure a_call_reg(list:TAsmList;Reg:TRegister);override;
         { General purpose instructions }
         { General purpose instructions }
         procedure maybeadjustresult(list: TAsmList; op: TOpCg; size: tcgsize; dst: tregister);
         procedure maybeadjustresult(list: TAsmList; op: TOpCg; size: tcgsize; dst: tregister);
-        procedure a_op_const_reg(list:TAsmList;Op:TOpCG;size:tcgsize;a:aint;reg:TRegister);override;
+        procedure a_op_const_reg(list:TAsmList;Op:TOpCG;size:tcgsize;a:tcgint;reg:TRegister);override;
         procedure a_op_reg_reg(list:TAsmList;Op:TOpCG;size:TCGSize;src, dst:TRegister);override;
         procedure a_op_reg_reg(list:TAsmList;Op:TOpCG;size:TCGSize;src, dst:TRegister);override;
-        procedure a_op_const_reg_reg(list:TAsmList;op:TOpCg;size:tcgsize;a:aint;src, dst:tregister);override;
+        procedure a_op_const_reg_reg(list:TAsmList;op:TOpCg;size:tcgsize;a:tcgint;src, dst:tregister);override;
         procedure a_op_reg_reg_reg(list:TAsmList;op:TOpCg;size:tcgsize;src1, src2, dst:tregister);override;
         procedure a_op_reg_reg_reg(list:TAsmList;op:TOpCg;size:tcgsize;src1, src2, dst:tregister);override;
-        procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
+        procedure a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op_reg_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister;setflags : boolean;var ovloc : tlocation);override;
         { move instructions }
         { move instructions }
-        procedure a_load_const_reg(list:TAsmList;size:tcgsize;a:aint;reg:tregister);override;
-        procedure a_load_const_ref(list:TAsmList;size:tcgsize;a:aint;const ref:TReference);override;
+        procedure a_load_const_reg(list:TAsmList;size:tcgsize;a:tcgint;reg:tregister);override;
+        procedure a_load_const_ref(list:TAsmList;size:tcgsize;a:tcgint;const ref:TReference);override;
         procedure a_load_reg_ref(list:TAsmList;FromSize,ToSize:TCgSize;reg:TRegister;const ref:TReference);override;
         procedure a_load_reg_ref(list:TAsmList;FromSize,ToSize:TCgSize;reg:TRegister;const ref:TReference);override;
         procedure a_load_ref_reg(list:TAsmList;FromSize,ToSize:TCgSize;const ref:TReference;reg:tregister);override;
         procedure a_load_ref_reg(list:TAsmList;FromSize,ToSize:TCgSize;const ref:TReference;reg:tregister);override;
         procedure a_load_reg_reg(list:TAsmList;FromSize,ToSize:TCgSize;reg1,reg2:tregister);override;
         procedure a_load_reg_reg(list:TAsmList;FromSize,ToSize:TCgSize;reg1,reg2:tregister);override;
@@ -73,7 +73,7 @@ interface
         procedure a_loadfpu_ref_reg(list:TAsmList;fromsize,tosize:tcgsize;const ref:TReference;reg:tregister);override;
         procedure a_loadfpu_ref_reg(list:TAsmList;fromsize,tosize:tcgsize;const ref:TReference;reg:tregister);override;
         procedure a_loadfpu_reg_ref(list:TAsmList;fromsize,tosize:tcgsize;reg:tregister;const ref:TReference);override;
         procedure a_loadfpu_reg_ref(list:TAsmList;fromsize,tosize:tcgsize;reg:tregister;const ref:TReference);override;
         { comparison operations }
         { comparison operations }
-        procedure a_cmp_const_reg_label(list:TAsmList;size:tcgsize;cmp_op:topcmp;a:aint;reg:tregister;l:tasmlabel);override;
+        procedure a_cmp_const_reg_label(list:TAsmList;size:tcgsize;cmp_op:topcmp;a:tcgint;reg:tregister;l:tasmlabel);override;
         procedure a_cmp_reg_reg_label(list:TAsmList;size:tcgsize;cmp_op:topcmp;reg1,reg2:tregister;l:tasmlabel);override;
         procedure a_cmp_reg_reg_label(list:TAsmList;size:tcgsize;cmp_op:topcmp;reg1,reg2:tregister;l:tasmlabel);override;
         procedure a_jmp_always(List:TAsmList;l:TAsmLabel);override;
         procedure a_jmp_always(List:TAsmList;l:TAsmLabel);override;
         procedure a_jmp_name(list : TAsmList;const s : string);override;
         procedure a_jmp_name(list : TAsmList;const s : string);override;
@@ -86,9 +86,9 @@ interface
         procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
         procedure g_proc_exit(list : TAsmList;parasize:longint;nostackframe:boolean);override;
         procedure g_restore_registers(list:TAsmList);override;
         procedure g_restore_registers(list:TAsmList);override;
         procedure g_save_registers(list : TAsmList);override;
         procedure g_save_registers(list : TAsmList);override;
-        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);override;
-        procedure g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : aint);override;
-        procedure g_concatcopy_move(list : TAsmList;const source,dest : treference;len : aint);
+        procedure g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);override;
+        procedure g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : tcgint);override;
+        procedure g_concatcopy_move(list : TAsmList;const source,dest : treference;len : tcgint);
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
         procedure g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);override;
        private
        private
         g1_used : boolean;
         g1_used : boolean;
@@ -108,7 +108,7 @@ interface
         procedure a_op64_const_reg_reg_checkoverflow(list: TAsmList;op:TOpCG;size : tcgsize;value : int64;regsrc,regdst : tregister64;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op64_const_reg_reg_checkoverflow(list: TAsmList;op:TOpCG;size : tcgsize;value : int64;regsrc,regdst : tregister64;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op64_reg_reg_reg_checkoverflow(list: TAsmList;op:TOpCG;size : tcgsize;regsrc1,regsrc2,regdst : tregister64;setflags : boolean;var ovloc : tlocation);override;
         procedure a_op64_reg_reg_reg_checkoverflow(list: TAsmList;op:TOpCG;size : tcgsize;regsrc1,regsrc2,regdst : tregister64;setflags : boolean;var ovloc : tlocation);override;
       end;
       end;
-      
+
     procedure create_codegen;
     procedure create_codegen;
 
 
     const
     const
@@ -245,7 +245,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcgsparc.handle_reg_const_reg(list:TAsmList;op:Tasmop;src:tregister;a:aint;dst:tregister);
+    procedure tcgsparc.handle_reg_const_reg(list:TAsmList;op:Tasmop;src:tregister;a:tcgint;dst:tregister);
       var
       var
         tmpreg : tregister;
         tmpreg : tregister;
       begin
       begin
@@ -258,7 +258,7 @@ implementation
               begin
               begin
                 tmpreg:=NR_G1;
                 tmpreg:=NR_G1;
                 g1_used:=true;
                 g1_used:=true;
-              end;   
+              end;
             a_load_const_reg(list,OS_INT,a,tmpreg);
             a_load_const_reg(list,OS_INT,a,tmpreg);
             list.concat(taicpu.op_reg_reg_reg(op,src,tmpreg,dst));
             list.concat(taicpu.op_reg_reg_reg(op,src,tmpreg,dst));
             if tmpreg=NR_G1 then
             if tmpreg=NR_G1 then
@@ -322,7 +322,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TCgSparc.a_load_const_cgpara(list:TAsmList;size:tcgsize;a:aint;const paraloc:TCGPara);
+    procedure TCgSparc.a_load_const_cgpara(list:TAsmList;size:tcgsize;a:tcgint;const paraloc:TCGPara);
       var
       var
         Ref:TReference;
         Ref:TReference;
       begin
       begin
@@ -375,7 +375,7 @@ implementation
                     begin
                     begin
                       tmpreg:=NR_G1;
                       tmpreg:=NR_G1;
                       g1_used:=true;
                       g1_used:=true;
-                    end;   
+                    end;
                   a_load_ref_reg(list,sz,sz,r,tmpreg);
                   a_load_ref_reg(list,sz,sz,r,tmpreg);
                   a_load_reg_ref(list,sz,sz,tmpreg,ref);
                   a_load_reg_ref(list,sz,sz,tmpreg,ref);
                   if tmpreg=NR_G1 then
                   if tmpreg=NR_G1 then
@@ -487,26 +487,26 @@ implementation
 
 
     {********************** load instructions ********************}
     {********************** load instructions ********************}
 
 
-    procedure TCgSparc.a_load_const_reg(list : TAsmList;size : TCGSize;a : aint;reg : TRegister);
+    procedure TCgSparc.a_load_const_reg(list : TAsmList;size : TCGSize;a : tcgint;reg : TRegister);
       begin
       begin
         { we don't use the set instruction here because it could be evalutated to two
         { we don't use the set instruction here because it could be evalutated to two
           instructions which would cause problems with the delay slot (FK) }
           instructions which would cause problems with the delay slot (FK) }
         if (a=0) then
         if (a=0) then
           list.concat(taicpu.op_reg(A_CLR,reg))
           list.concat(taicpu.op_reg(A_CLR,reg))
         { sethi allows to set the upper 22 bit, so we'll take full advantage of it }
         { sethi allows to set the upper 22 bit, so we'll take full advantage of it }
-        else if (a and aint($1fff))=0 then
-          list.concat(taicpu.op_const_reg(A_SETHI,a shr 10,reg))
+        else if (aint(a) and aint($1fff))=0 then
+          list.concat(taicpu.op_const_reg(A_SETHI,aint(a) shr 10,reg))
         else if (a>=simm13lo) and (a<=simm13hi) then
         else if (a>=simm13lo) and (a<=simm13hi) then
           list.concat(taicpu.op_const_reg(A_MOV,a,reg))
           list.concat(taicpu.op_const_reg(A_MOV,a,reg))
         else
         else
           begin
           begin
-            list.concat(taicpu.op_const_reg(A_SETHI,a shr 10,reg));
-            list.concat(taicpu.op_reg_const_reg(A_OR,reg,a and aint($3ff),reg));
+            list.concat(taicpu.op_const_reg(A_SETHI,aint(a) shr 10,reg));
+            list.concat(taicpu.op_reg_const_reg(A_OR,reg,aint(a) and aint($3ff),reg));
           end;
           end;
       end;
       end;
 
 
 
 
-    procedure TCgSparc.a_load_const_ref(list : TAsmList;size : tcgsize;a : aint;const ref : TReference);
+    procedure TCgSparc.a_load_const_ref(list : TAsmList;size : tcgsize;a : tcgint;const ref : TReference);
       begin
       begin
         if a=0 then
         if a=0 then
           a_load_reg_ref(list,size,size,NR_G0,ref)
           a_load_reg_ref(list,size,size,NR_G0,ref)
@@ -795,7 +795,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TCgSparc.a_op_const_reg(list:TAsmList;Op:TOpCG;size:tcgsize;a:aint;reg:TRegister);
+    procedure TCgSparc.a_op_const_reg(list:TAsmList;Op:TOpCG;size:tcgsize;a:tcgint;reg:TRegister);
       begin
       begin
         if Op in [OP_NEG,OP_NOT] then
         if Op in [OP_NEG,OP_NOT] then
           internalerror(200306011);
           internalerror(200306011);
@@ -833,7 +833,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TCgSparc.a_op_const_reg_reg(list:TAsmList;op:TOpCg;size:tcgsize;a:aint;src, dst:tregister);
+    procedure TCgSparc.a_op_const_reg_reg(list:TAsmList;op:TOpCg;size:tcgsize;a:tcgint;src, dst:tregister);
       var
       var
         power : longInt;
         power : longInt;
       begin
       begin
@@ -870,7 +870,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcgsparc.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: aint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
+    procedure tcgsparc.a_op_const_reg_reg_checkoverflow(list: TAsmList; op: TOpCg; size: tcgsize; a: tcgint; src, dst: tregister;setflags : boolean;var ovloc : tlocation);
       var
       var
         power : longInt;
         power : longInt;
         tmpreg1,tmpreg2 : tregister;
         tmpreg1,tmpreg2 : tregister;
@@ -955,7 +955,7 @@ implementation
 
 
   {*************** compare instructructions ****************}
   {*************** compare instructructions ****************}
 
 
-    procedure TCgSparc.a_cmp_const_reg_label(list:TAsmList;size:tcgsize;cmp_op:topcmp;a:aint;reg:tregister;l:tasmlabel);
+    procedure TCgSparc.a_cmp_const_reg_label(list:TAsmList;size:tcgsize;cmp_op:topcmp;a:tcgint;reg:tregister;l:tasmlabel);
       begin
       begin
         if (a=0) then
         if (a=0) then
           list.concat(taicpu.op_reg_reg_reg(A_SUBcc,reg,NR_G0,NR_G0))
           list.concat(taicpu.op_reg_reg_reg(A_SUBcc,reg,NR_G0,NR_G0))
@@ -1166,7 +1166,7 @@ implementation
 
 
     { ************* concatcopy ************ }
     { ************* concatcopy ************ }
 
 
-    procedure tcgsparc.g_concatcopy_move(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcgsparc.g_concatcopy_move(list : TAsmList;const source,dest : treference;len : tcgint);
       var
       var
         paraloc1,paraloc2,paraloc3 : TCGPara;
         paraloc1,paraloc2,paraloc3 : TCGPara;
       begin
       begin
@@ -1193,7 +1193,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TCgSparc.g_concatcopy(list:TAsmList;const source,dest:treference;len:aint);
+    procedure TCgSparc.g_concatcopy(list:TAsmList;const source,dest:treference;len:tcgint);
       var
       var
         tmpreg1,
         tmpreg1,
         hreg,
         hreg,
@@ -1286,7 +1286,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tcgsparc.g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : aint);
+    procedure tcgsparc.g_concatcopy_unaligned(list : TAsmList;const source,dest : treference;len : tcgint);
       var
       var
         src, dst: TReference;
         src, dst: TReference;
         tmpreg1,
         tmpreg1,
@@ -1363,7 +1363,7 @@ implementation
           Internalerror(200109191);
           Internalerror(200109191);
 
 
         make_global:=false;
         make_global:=false;
-        if (not current_module.is_unit) or
+        if (not current_module.is_unit) or create_smartlink or
            (procdef.owner.defowner.owner.symtabletype=globalsymtable) then
            (procdef.owner.defowner.owner.symtabletype=globalsymtable) then
           make_global:=true;
           make_global:=true;
 
 
@@ -1383,7 +1383,7 @@ implementation
             { mov  0(%rdi),%rax ; load vmt}
             { mov  0(%rdi),%rax ; load vmt}
             reference_reset_base(href,NR_O0,0,sizeof(pint));
             reference_reset_base(href,NR_O0,0,sizeof(pint));
             cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_G1);
             cg.a_load_ref_reg(list,OS_ADDR,OS_ADDR,href,NR_G1);
-            g1_used:=true; 
+            g1_used:=true;
             { jmp *vmtoffs(%eax) ; method offs }
             { jmp *vmtoffs(%eax) ; method offs }
             reference_reset_base(href,NR_G1,tobjectdef(procdef.struct).vmtmethodoffset(procdef.extnumber),sizeof(pint));
             reference_reset_base(href,NR_G1,tobjectdef(procdef.struct).vmtmethodoffset(procdef.extnumber),sizeof(pint));
             list.concat(taicpu.op_ref_reg(A_LD,href,NR_G1));
             list.concat(taicpu.op_ref_reg(A_LD,href,NR_G1));
@@ -1524,8 +1524,8 @@ implementation
             internalerror(200306017);
             internalerror(200306017);
         end;
         end;
         get_64bit_ops(op,op1,op2,false);
         get_64bit_ops(op,op1,op2,false);
-        tcgsparc(cg).handle_reg_const_reg(list,op1,regdst.reglo,aint(lo(value)),regdst.reglo);
-        tcgsparc(cg).handle_reg_const_reg(list,op2,regdst.reghi,aint(hi(value)),regdst.reghi);
+        tcgsparc(cg).handle_reg_const_reg(list,op1,regdst.reglo,tcgint(lo(value)),regdst.reglo);
+        tcgsparc(cg).handle_reg_const_reg(list,op2,regdst.reghi,tcgint(hi(value)),regdst.reghi);
       end;
       end;
 
 
 
 
@@ -1555,8 +1555,8 @@ implementation
             internalerror(200306017);
             internalerror(200306017);
         end;
         end;
         get_64bit_ops(op,op1,op2,setflags);
         get_64bit_ops(op,op1,op2,setflags);
-        tcgsparc(cg).handle_reg_const_reg(list,op1,regsrc.reglo,aint(lo(value)),regdst.reglo);
-        tcgsparc(cg).handle_reg_const_reg(list,op2,regsrc.reghi,aint(hi(value)),regdst.reghi);
+        tcgsparc(cg).handle_reg_const_reg(list,op1,regsrc.reglo,tcgint(lo(value)),regdst.reglo);
+        tcgsparc(cg).handle_reg_const_reg(list,op2,regsrc.reghi,tcgint(hi(value)),regdst.reghi);
       end;
       end;
 
 
 
 
@@ -1580,5 +1580,5 @@ implementation
         cg:=TCgSparc.Create;
         cg:=TCgSparc.Create;
         cg64:=TCg64Sparc.Create;
         cg64:=TCg64Sparc.Create;
       end;
       end;
-      
+
 end.
 end.

+ 1 - 1
compiler/sparc/ncpucnv.pas

@@ -167,7 +167,7 @@ implementation
                s64real:
                s64real:
                  begin
                  begin
                    hregister:=cg.getfpuregister(current_asmdata.CurrAsmList,OS_F64);
                    hregister:=cg.getfpuregister(current_asmdata.CurrAsmList,OS_F64);
-                   current_asmdata.asmlists[al_typedconsts].concat(tai_align.create(const_align(8)));
+                   new_section(current_asmdata.asmlists[al_typedconsts],sec_rodata_norel,l1.name,const_align(8));
                    current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
                    current_asmdata.asmlists[al_typedconsts].concat(Tai_label.Create(l1));
                    { I got this constant from a test program (FK) }
                    { I got this constant from a test program (FK) }
                    current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit($41f00000));
                    current_asmdata.asmlists[al_typedconsts].concat(Tai_const.Create_32bit($41f00000));

+ 7 - 5
compiler/symdef.pas

@@ -2804,8 +2804,6 @@ implementation
       end;
       end;
 
 
     function tabstractrecorddef.RttiName: string;
     function tabstractrecorddef.RttiName: string;
-      var
-        tmp: tabstractrecorddef;
       begin
       begin
         Result:=OwnerHierarchyName+objrealname^;
         Result:=OwnerHierarchyName+objrealname^;
       end;
       end;
@@ -4433,6 +4431,7 @@ implementation
           tobjectdef(result).import_lib:=stringdup(import_lib^);
           tobjectdef(result).import_lib:=stringdup(import_lib^);
         tobjectdef(result).objectoptions:=objectoptions;
         tobjectdef(result).objectoptions:=objectoptions;
         include(tobjectdef(result).defoptions,df_copied_def);
         include(tobjectdef(result).defoptions,df_copied_def);
+        tobjectdef(result).extendeddef:=extendeddef;
         tobjectdef(result).vmt_offset:=vmt_offset;
         tobjectdef(result).vmt_offset:=vmt_offset;
         if assigned(iidguid) then
         if assigned(iidguid) then
           begin
           begin
@@ -5276,7 +5275,7 @@ implementation
               begin
               begin
                 { copied from psub.read_proc }
                 { copied from psub.read_proc }
                 if assigned(tobjectdef(pd.struct).import_lib) then
                 if assigned(tobjectdef(pd.struct).import_lib) then
-                   current_module.AddExternalImport(tobjectdef(pd.struct).import_lib^,pd.mangledname,0,false,false)
+                   current_module.AddExternalImport(tobjectdef(pd.struct).import_lib^,pd.mangledname,pd.mangledname,0,false,false)
                  else
                  else
                    begin
                    begin
                      { add import name to external list for DLL scanning }
                      { add import name to external list for DLL scanning }
@@ -5421,15 +5420,18 @@ implementation
     function TImplementedInterface.getcopy:TImplementedInterface;
     function TImplementedInterface.getcopy:TImplementedInterface;
       begin
       begin
         Result:=TImplementedInterface.Create(nil);
         Result:=TImplementedInterface.Create(nil);
-        {$warning: this is completely wrong on so many levels...}
         { 1) the procdefs list will be freed once for each copy
         { 1) the procdefs list will be freed once for each copy
           2) since the procdefs list owns its elements, those will also be freed for each copy
           2) since the procdefs list owns its elements, those will also be freed for each copy
           3) idem for the name mappings
           3) idem for the name mappings
         }
         }
+        { warning: this is completely wrong on so many levels...
         Move(pointer(self)^,pointer(result)^,InstanceSize);
         Move(pointer(self)^,pointer(result)^,InstanceSize);
+        We need to make clean copies of the different fields
+        this is not implemented yet, and thus we generate an internal
+        error instead PM 2011-06-14 }
+        internalerror(2011061401);
       end;
       end;
 
 
-
 {****************************************************************************
 {****************************************************************************
                                 TFORWARDDEF
                                 TFORWARDDEF
 ****************************************************************************}
 ****************************************************************************}

+ 8 - 7
compiler/symtable.pas

@@ -247,7 +247,7 @@ interface
     function  defined_macro(const s : string):boolean;
     function  defined_macro(const s : string):boolean;
 
 
 {*** Object Helpers ***}
 {*** Object Helpers ***}
-    function search_default_property(pd : tobjectdef) : tpropertysym;
+    function search_default_property(pd : tabstractrecorddef) : tpropertysym;
     function find_real_objcclass_definition(pd: tobjectdef; erroronfailure: boolean): tobjectdef;
     function find_real_objcclass_definition(pd: tobjectdef; erroronfailure: boolean): tobjectdef;
 
 
 {*** Macro Helpers ***}
 {*** Macro Helpers ***}
@@ -2854,7 +2854,7 @@ implementation
                               Object Helpers
                               Object Helpers
 ****************************************************************************}
 ****************************************************************************}
 
 
-   function search_default_property(pd : tobjectdef) : tpropertysym;
+   function search_default_property(pd : tabstractrecorddef) : tpropertysym;
    { returns the default property of a class, searches also anchestors }
    { returns the default property of a class, searches also anchestors }
      var
      var
        _defaultprop : tpropertysym;
        _defaultprop : tpropertysym;
@@ -2881,7 +2881,10 @@ implementation
              pd.symtable.SymList.ForEachCall(@tstoredsymtable(pd.symtable).testfordefaultproperty,@_defaultprop);
              pd.symtable.SymList.ForEachCall(@tstoredsymtable(pd.symtable).testfordefaultproperty,@_defaultprop);
              if assigned(_defaultprop) then
              if assigned(_defaultprop) then
                break;
                break;
-             pd:=pd.childof;
+             if (pd.typ=objectdef) then
+               pd:=tobjectdef(pd).childof
+             else
+               break;
           end;
           end;
         search_default_property:=_defaultprop;
         search_default_property:=_defaultprop;
      end;
      end;
@@ -2908,8 +2911,7 @@ implementation
              else
              else
                initialmacrosymtable.insert(mac);
                initialmacrosymtable.insert(mac);
            end;
            end;
-         if not mac.defined then
-           Message1(parser_c_macro_defined,mac.name);
+         Message1(parser_c_macro_defined,mac.name);
          mac.defined:=true;
          mac.defined:=true;
       end;
       end;
 
 
@@ -2990,8 +2992,7 @@ implementation
            {If not found, then it's already undefined.}
            {If not found, then it's already undefined.}
          else
          else
            begin
            begin
-             if mac.defined then
-               Message1(parser_c_macro_undefined,mac.name);
+             Message1(parser_c_macro_undefined,mac.name);
              mac.defined:=false;
              mac.defined:=false;
              mac.is_compiler_var:=false;
              mac.is_compiler_var:=false;
              { delete old definition }
              { delete old definition }

+ 1 - 4
compiler/symtype.pas

@@ -954,11 +954,8 @@ implementation
         {$if sizeof(TConstPtrUInt)=8}
         {$if sizeof(TConstPtrUInt)=8}
           putint64(int64(v));
           putint64(int64(v));
         {$else}
         {$else}
-        {$if sizeof(TConstPtrUInt)=4}
           putlongint(longint(v));
           putlongint(longint(v));
-        {$else}
-          internalerror(2002082601);
-        {$endif} {$endif}
+        {$endif}
       end;
       end;
 
 
 
 

+ 216 - 0
compiler/systems.inc

@@ -0,0 +1,216 @@
+{
+    Copyright (c) 1998-2008 by Florian Klaempfl
+
+    This include contains the enumeration
+    information about the target systems supported
+    (these are not processor specific)
+
+    This program is free software; you can redistribute it and/or modify
+    iu under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge- MA 02139, USA.
+
+ ****************************************************************************
+}
+   type
+       tendian = (endian_little,endian_big);
+
+     (*
+       IMPORTANT NOTE:
+       The value of this enumeration is stored in PPU files.
+       Therefore adding new CPU targets should not change the
+       values of the pre-existing targets. (CEC)
+       FURTHERMORE : Make sure that this branch values, are
+       consistant with the main branch version always.
+     *)
+       tsystemcpu=
+       (
+             cpu_no,                       { 0 }
+             cpu_i386,                     { 1 }
+             cpu_m68k,                     { 2 }
+             cpu_alpha,                    { 3 }
+             cpu_powerpc,                  { 4 }
+             cpu_sparc,                    { 5 }
+             cpu_vm,                       { 6 }
+             cpu_iA64,                     { 7 }
+             cpu_x86_64,                   { 8 }
+             cpu_mips,                     { 9 }
+             cpu_arm,                      { 10 }
+             cpu_powerpc64,                { 11 }
+             cpu_avr,                      { 12 }
+             cpu_mipsel                    { 13 }
+       );
+
+       tasmmode= (asmmode_none
+            { standard assembler (cpu dependant) with full parsing }
+            ,asmmode_standard
+            ,asmmode_i386_att
+            ,asmmode_i386_intel
+            ,asmmode_ppc_gas
+            ,asmmode_ppc_motorola
+            ,asmmode_arm_gas
+            ,asmmode_sparc_gas
+            ,asmmode_x86_64_gas
+            ,asmmode_m68k_mot
+            ,asmmode_x86_64_intel
+            ,asmmode_x86_64_att
+            ,asmmode_avr_gas
+       );
+
+     (* IMPORTANT NOTE:
+       the integer value of this enum is stored in PPU
+       files to recognize the target, so if you add new targets
+       allways add them at end PM
+       FURTHERMORE : Make sure that this branch values are
+       consistant with the main branch version always. (CEC)
+       *)
+     type
+       tsystem =
+       (
+             system_none,               { 0 }
+             obsolete_system_i386_GO32V1,{ 1 }
+             system_i386_GO32V2,        { 2 }
+             system_i386_linux,         { 3 }
+             system_i386_OS2,           { 4 }
+             system_i386_Win32,         { 5 }
+             system_i386_freebsd,       { 6 }
+             system_m68k_Amiga,         { 7 }
+             system_m68k_Atari,         { 8 }
+             system_m68k_Mac,           { 9 }
+             system_m68k_linux,         { 10 }
+             system_m68k_PalmOS,        { 11 }
+             system_alpha_linux,        { 12 }
+             system_powerpc_linux,      { 13 }
+             system_powerpc_macos,      { 14 }
+             system_i386_solaris,       { 15 }
+             system_i386_beos,          { 16 }
+             system_i386_netbsd,        { 17 }
+             system_m68k_netbsd,        { 18 }
+             system_i386_Netware,       { 19 }
+             system_i386_qnx,           { 20 }
+             system_i386_wdosx,         { 21 }
+             system_sparc_solaris,      { 22 }
+             system_sparc_linux,        { 23 }
+             system_i386_openbsd,       { 24 }
+             system_m68k_openbsd,       { 25 }
+             system_x86_64_linux,       { 26 }
+             system_powerpc_darwin,     { 27 }
+             system_i386_EMX,           { 28 }
+             system_powerpc_netbsd,     { 29 }
+             system_powerpc_openbsd,    { 30 }
+             system_arm_linux,          { 31 }
+             system_i386_watcom,        { 32 }
+             system_powerpc_MorphOS,    { 33 }
+             system_x86_64_freebsd,     { 34 }
+             system_i386_netwlibc,      { 35 }
+             system_powerpc_Amiga,      { 36 }
+             system_x86_64_win64,       { 37 }
+             system_arm_wince,          { 38 }
+             system_ia64_win64,         { 39 }
+             system_i386_wince,         { 40 }
+             system_x86_6432_linux,     { 41 }
+             system_arm_gba,            { 42 }
+             system_powerpc64_linux,    { 43 }
+             system_i386_darwin,        { 44 }
+             system_arm_palmos,         { 45 }
+             system_powerpc64_darwin,   { 46 }
+             system_arm_nds,            { 47 }
+             system_i386_embedded,      { 48 }
+             system_m68k_embedded,      { 49 }
+             system_alpha_embedded,     { 50 }
+             system_powerpc_embedded,   { 51 }
+             system_sparc_embedded,     { 52 }
+             system_vm_embedded,        { 53 }
+             system_iA64_embedded,      { 54 }
+             system_x86_64_embedded,    { 55 }
+             system_mips_embedded,      { 56 }
+             system_arm_embedded,       { 57 }
+             system_powerpc64_embedded, { 58 }
+             system_i386_symbian,       { 59 }
+             system_arm_symbian,        { 60 }
+             system_x86_64_darwin,      { 61 }
+             system_avr_embedded,       { 62 }
+             system_i386_haiku,         { 63 }
+             system_arm_darwin,         { 64 }
+             system_x86_64_solaris,     { 65 }
+             system_mips_linux,         { 66 }
+             system_mipsel_linux,       { 67 }
+             system_i386_nativent,      { 68 }
+             system_i386_iphonesim,     { 69 }
+             system_powerpc_wii         { 70 }
+       );
+
+     type
+       tasm = (as_none
+             ,as_gas                   { standard gnu assembler }
+             ,as_i386_as_aout
+             ,as_i386_nasmcoff
+             ,as_i386_nasmwin32
+             ,as_i386_nasmwdosx
+             ,as_i386_nasmelf
+             ,as_i386_nasmobj
+             ,as_i386_nasmbeos
+             ,as_i386_tasm
+             ,as_i386_masm
+             ,as_i386_wasm
+             ,as_i386_coff
+             ,as_i386_pecoff
+             ,as_i386_elf32
+             ,as_i386_pecoffwdosx
+             ,as_m68k_mit
+             ,as_powerpc_mpw
+             ,as_darwin
+             ,as_i386_macho
+             ,as_x86_64_masm
+             ,as_x86_64_pecoff
+             ,as_i386_pecoffwince
+             ,as_arm_pecoffwince
+             ,as_x86_64_elf64
+             ,as_sparc_elf32
+             ,as_ggas                  { gnu assembler called "gas" instead of "as" }
+             ,as_i386_nasmhaiku
+             ,as_powerpc_vasm
+             ,as_i386_nlmcoff
+       );
+
+       tar = (ar_none
+            ,ar_gnu_ar
+            ,ar_mpw_ar
+            ,ar_gnu_ar_scripted
+            ,ar_gnu_gar
+       );
+
+       tres = (res_none
+            ,res_gnu_windres,res_watcom_wrc_os2
+            ,res_m68k_palmos,res_m68k_mpw
+            ,res_powerpc_mpw,res_elf
+            ,res_win64_gorc, res_macho, res_ext
+       );
+
+       tresinfoflags = (res_external_file,res_arch_in_file_name
+            ,res_single_file);
+
+       tdbg = (dbg_none
+            ,dbg_stabs,dbg_dwarf2,dbg_dwarf3,dbg_dwarf4
+       );
+
+       tscripttype = (script_none
+            ,script_dos,script_unix,script_amiga,
+            script_mpw
+       );
+
+       tabi = (abi_default
+            ,abi_powerpc_sysv,abi_powerpc_aix
+            ,abi_eabi,abi_armeb
+       );
+
+

+ 35 - 212
compiler/systems.pas

@@ -26,198 +26,7 @@ unit systems;
 
 
 interface
 interface
 
 
-
-   type
-       tendian = (endian_little,endian_big);
-
-     (*
-       IMPORTANT NOTE:
-       The value of this enumeration is stored in PPU files.
-       Therefore adding new CPU targets should not change the
-       values of the pre-existing targets. (CEC)
-       FURTHERMORE : Make sure that this branch values, are
-       consistant with the main branch version always.
-     *)
-       tsystemcpu=
-       (
-             cpu_no,                       { 0 }
-             cpu_i386,                     { 1 }
-             cpu_m68k,                     { 2 }
-             cpu_alpha,                    { 3 }
-             cpu_powerpc,                  { 4 }
-             cpu_sparc,                    { 5 }
-             cpu_vm,                       { 6 }
-             cpu_iA64,                     { 7 }
-             cpu_x86_64,                   { 8 }
-             cpu_mips,                     { 9 }
-             cpu_arm,                      { 10 }
-             cpu_powerpc64,                { 11 }
-             cpu_avr,                      { 12 }
-             cpu_mipsel                    { 13 }
-       );
-
-       tasmmode= (asmmode_none
-            { standard assembler (cpu dependant) with full parsing }
-            ,asmmode_standard
-            ,asmmode_i386_att
-            ,asmmode_i386_intel
-            ,asmmode_ppc_gas
-            ,asmmode_ppc_motorola
-            ,asmmode_arm_gas
-            ,asmmode_sparc_gas
-            ,asmmode_x86_64_gas
-            ,asmmode_m68k_mot
-            ,asmmode_x86_64_intel
-            ,asmmode_x86_64_att
-            ,asmmode_avr_gas
-       );
-
-     (* IMPORTANT NOTE:
-       the integer value of this enum is stored in PPU
-       files to recognize the target, so if you add new targets
-       allways add them at end PM
-       FURTHERMORE : Make sure that this branch values are
-       consistant with the main branch version always. (CEC)
-       *)
-     type
-       tsystem =
-       (
-             system_none,               { 0 }
-             obsolete_system_i386_GO32V1,{ 1 }
-             system_i386_GO32V2,        { 2 }
-             system_i386_linux,         { 3 }
-             system_i386_OS2,           { 4 }
-             system_i386_Win32,         { 5 }
-             system_i386_freebsd,       { 6 }
-             system_m68k_Amiga,         { 7 }
-             system_m68k_Atari,         { 8 }
-             system_m68k_Mac,           { 9 }
-             system_m68k_linux,         { 10 }
-             system_m68k_PalmOS,        { 11 }
-             system_alpha_linux,        { 12 }
-             system_powerpc_linux,      { 13 }
-             system_powerpc_macos,      { 14 }
-             system_i386_solaris,       { 15 }
-             system_i386_beos,          { 16 }
-             system_i386_netbsd,        { 17 }
-             system_m68k_netbsd,        { 18 }
-             system_i386_Netware,       { 19 }
-             system_i386_qnx,           { 20 }
-             system_i386_wdosx,         { 21 }
-             system_sparc_solaris,      { 22 }
-             system_sparc_linux,        { 23 }
-             system_i386_openbsd,       { 24 }
-             system_m68k_openbsd,       { 25 }
-             system_x86_64_linux,       { 26 }
-             system_powerpc_darwin,     { 27 }
-             system_i386_EMX,           { 28 }
-             system_powerpc_netbsd,     { 29 }
-             system_powerpc_openbsd,    { 30 }
-             system_arm_linux,          { 31 }
-             system_i386_watcom,        { 32 }
-             system_powerpc_MorphOS,    { 33 }
-             system_x86_64_freebsd,     { 34 }
-             system_i386_netwlibc,      { 35 }
-             system_powerpc_Amiga,      { 36 }
-             system_x86_64_win64,       { 37 }
-             system_arm_wince,          { 38 }
-             system_ia64_win64,         { 39 }
-             system_i386_wince,         { 40 }
-             system_x86_6432_linux,     { 41 }
-             system_arm_gba,            { 42 }
-             system_powerpc64_linux,    { 43 }
-             system_i386_darwin,        { 44 }
-             system_arm_palmos,         { 45 }
-             system_powerpc64_darwin,   { 46 }
-             system_arm_nds,            { 47 }
-             system_i386_embedded,      { 48 }
-             system_m68k_embedded,      { 49 }
-             system_alpha_embedded,     { 50 }
-             system_powerpc_embedded,   { 51 }
-             system_sparc_embedded,     { 52 }
-             system_vm_embedded,        { 53 }
-             system_iA64_embedded,      { 54 }
-             system_x86_64_embedded,    { 55 }
-             system_mips_embedded,      { 56 }
-             system_arm_embedded,       { 57 }
-             system_powerpc64_embedded, { 58 }
-             system_i386_symbian,       { 59 }
-             system_arm_symbian,        { 60 }
-             system_x86_64_darwin,      { 61 }
-             system_avr_embedded,       { 62 }
-             system_i386_haiku,         { 63 }
-             system_arm_darwin,         { 64 }
-             system_x86_64_solaris,     { 65 }
-             system_mips_linux,         { 66 }
-             system_mipsel_linux,       { 67 }
-             system_i386_nativent,      { 68 }
-             system_i386_iphonesim,     { 69 }
-             system_powerpc_wii         { 70 }
-       );
-
-     type
-       tasm = (as_none
-             ,as_gas                   { standard gnu assembler }
-             ,as_i386_as_aout
-             ,as_i386_nasmcoff
-             ,as_i386_nasmwin32
-             ,as_i386_nasmwdosx
-             ,as_i386_nasmelf
-             ,as_i386_nasmobj
-             ,as_i386_nasmbeos
-             ,as_i386_tasm
-             ,as_i386_masm
-             ,as_i386_wasm
-             ,as_i386_coff
-             ,as_i386_pecoff
-             ,as_i386_elf32
-             ,as_i386_pecoffwdosx
-             ,as_m68k_mit
-             ,as_powerpc_mpw
-             ,as_darwin
-             ,as_i386_macho
-             ,as_x86_64_masm
-             ,as_x86_64_pecoff
-             ,as_i386_pecoffwince
-             ,as_arm_pecoffwince
-             ,as_x86_64_elf64
-             ,as_sparc_elf32
-             ,as_ggas                  { gnu assembler called "gas" instead of "as" }
-             ,as_i386_nasmhaiku
-             ,as_powerpc_vasm
-             ,as_i386_nlmcoff
-       );
-
-       tar = (ar_none
-            ,ar_gnu_ar
-            ,ar_mpw_ar
-            ,ar_gnu_ar_scripted
-            ,ar_gnu_gar
-       );
-
-       tres = (res_none
-            ,res_gnu_windres,res_watcom_wrc_os2
-            ,res_m68k_palmos,res_m68k_mpw
-            ,res_powerpc_mpw,res_elf
-            ,res_win64_gorc, res_macho, res_ext
-       );
-
-       tresinfoflags = (res_external_file,res_arch_in_file_name
-            ,res_single_file);
-
-       tdbg = (dbg_none
-            ,dbg_stabs,dbg_dwarf2,dbg_dwarf3,dbg_dwarf4
-       );
-
-       tscripttype = (script_none
-            ,script_dos,script_unix,script_amiga,
-            script_mpw
-       );
-
-       tabi = (abi_default
-            ,abi_powerpc_sysv,abi_powerpc_aix
-            ,abi_eabi,abi_armeb
-       );
+{$i systems.inc}
 
 
 {*****************************************************************************
 {*****************************************************************************
                                Structures
                                Structures
@@ -408,6 +217,7 @@ interface
 
 
        { all real windows systems, no cripple ones like wince, wdosx et. al. }
        { all real windows systems, no cripple ones like wince, wdosx et. al. }
        systems_windows = [system_i386_win32,system_x86_64_win64,system_ia64_win64];
        systems_windows = [system_i386_win32,system_x86_64_win64,system_ia64_win64];
+
        { all windows systems }
        { all windows systems }
        systems_all_windows = [system_i386_win32,system_x86_64_win64,system_ia64_win64,
        systems_all_windows = [system_i386_win32,system_x86_64_win64,system_ia64_win64,
                              system_arm_wince,system_i386_wince];
                              system_arm_wince,system_i386_wince];
@@ -421,12 +231,6 @@ interface
        systems_solaris = [system_sparc_solaris, system_i386_solaris,
        systems_solaris = [system_sparc_solaris, system_i386_solaris,
 			  system_x86_64_solaris];
 			  system_x86_64_solaris];
 
 
-       { systems supporting Objective-C }
-       systems_objc_supported = systems_darwin;
-
-       { systems using the non-fragile Objective-C ABI }
-       systems_objc_nfabi = [system_powerpc64_darwin,system_x86_64_darwin,system_arm_darwin,system_i386_iphonesim];
-
        { all embedded systems }
        { all embedded systems }
        systems_embedded = [system_i386_embedded,system_m68k_embedded,
        systems_embedded = [system_i386_embedded,system_m68k_embedded,
                            system_alpha_embedded,system_powerpc_embedded,
                            system_alpha_embedded,system_powerpc_embedded,
@@ -435,6 +239,24 @@ interface
                            system_mips_embedded,system_arm_embedded,
                            system_mips_embedded,system_arm_embedded,
                            system_powerpc64_embedded];
                            system_powerpc64_embedded];
 
 
+       { all symbian systems }
+       systems_symbian = [system_i386_symbian,system_arm_symbian];
+
+       { all classic Mac OS targets }
+       systems_macos = [system_m68k_Mac,system_powerpc_Macos];
+
+       { all OS/2 targets }
+       systems_os2 = [system_i386_OS2,system_i386_emx];
+
+       { all native nt systems }
+       systems_nativent = [system_i386_nativent];
+
+       { systems supporting Objective-C }
+       systems_objc_supported = systems_darwin;
+
+       { systems using the non-fragile Objective-C ABI }
+       systems_objc_nfabi = [system_powerpc64_darwin,system_x86_64_darwin,system_arm_darwin,system_i386_iphonesim];
+
        { all systems supporting exports from programs or units }
        { all systems supporting exports from programs or units }
        systems_unit_program_exports = [system_i386_win32,
        systems_unit_program_exports = [system_i386_win32,
                                          system_i386_wdosx,
                                          system_i386_wdosx,
@@ -451,12 +273,6 @@ interface
 
 
        systems_interrupt_table = [{system_arm_embedded}];
        systems_interrupt_table = [{system_arm_embedded}];
 
 
-       { all symbian systems }
-       systems_symbian = [system_i386_symbian,system_arm_symbian];
-
-       { all native nt systems }
-       systems_nativent = [system_i386_nativent];
-
        { all systems for which istack must be at a 16 byte boundary
        { all systems for which istack must be at a 16 byte boundary
          when calling a function }
          when calling a function }
        systems_need_16_byte_stack_alignment = [
        systems_need_16_byte_stack_alignment = [
@@ -505,7 +321,7 @@ interface
 
 
     procedure set_source_info(const ti : tsysteminfo);
     procedure set_source_info(const ti : tsysteminfo);
 
 
-    procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
+    function UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo) : boolean;
 
 
     procedure RegisterTarget(const r:tsysteminfo);
     procedure RegisterTarget(const r:tsysteminfo);
     procedure RegisterRes(const r:tresinfo; rcf : TAbstractResourceFileClass);
     procedure RegisterRes(const r:tresinfo; rcf : TAbstractResourceFileClass);
@@ -697,19 +513,26 @@ begin
 end;
 end;
 
 
 
 
-procedure UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo);
+function UpdateAlignment(var d:talignmentinfo;const s:talignmentinfo) : boolean;
 begin
 begin
+  result:=true;
   with d do
   with d do
    begin
    begin
+     if (s.procalign in [1,2,4,8,16,32,64,128]) or (s.procalign=256) then
+       procalign:=s.procalign
+     else if s.procalign<>0 then
+       result:=false;
+     if (s.loopalign in [1,2,4,8,16,32,64,128]) or (s.loopalign=256) then
+       loopalign:=s.loopalign
+     else if s.loopalign<>0 then
+       result:=false;
+     if (s.jumpalign in [1,2,4,8,16,32,64,128]) or (s.jumpalign=256) then
+       jumpalign:=s.jumpalign
+     else if s.jumpalign<>0 then
+       result:=false;
      { general update rules:
      { general update rules:
        minimum: if higher then update
        minimum: if higher then update
        maximum: if lower then update or if undefined then update }
        maximum: if lower then update or if undefined then update }
-     if s.procalign>procalign then
-      procalign:=s.procalign;
-     if s.loopalign>loopalign then
-      loopalign:=s.loopalign;
-     if s.jumpalign>jumpalign then
-      jumpalign:=s.jumpalign;
      if s.constalignmin>constalignmin then
      if s.constalignmin>constalignmin then
       constalignmin:=s.constalignmin;
       constalignmin:=s.constalignmin;
      if (constalignmax=0) or
      if (constalignmax=0) or

+ 1 - 1
compiler/systems/i_linux.pas

@@ -414,7 +414,7 @@ unit i_linux;
             shortname    : 'Linux';
             shortname    : 'Linux';
             flags        : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
             flags        : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_smartlink_library,
                             tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
                             tf_library_needs_pic,tf_needs_symbol_type,tf_files_case_sensitive,
-                            tf_has_winlike_resources];
+                            tf_has_winlike_resources,tf_safecall_exceptions,tf_safecall_clearstack];
             cpu          : cpu_x86_64;
             cpu          : cpu_x86_64;
             unit_env     : 'LINUXUNITS';
             unit_env     : 'LINUXUNITS';
             extradefines : 'UNIX;HASUNIX';
             extradefines : 'UNIX;HASUNIX';

+ 1 - 0
compiler/systems/t_bsd.pas

@@ -243,6 +243,7 @@ begin
             result:='/usr/lib/dylib1.o'
             result:='/usr/lib/dylib1.o'
         end;
         end;
     end;
     end;
+  result:=maybequoted(result);
 end;    
 end;    
 
 
 
 

Some files were not shown because too many files changed in this diff