Преглед на файлове

* synchronized with trunk

git-svn-id: branches/wasm@48412 -
nickysn преди 4 години
родител
ревизия
64bb0359d2
променени са 97 файла, в които са добавени 1063 реда и са изтрити 665 реда
  1. 9 4
      .gitattributes
  2. 0 3
      compiler/aarch64/agcpugas.pas
  3. 0 7
      compiler/aarch64/aoptcpu.pas
  4. 0 1
      compiler/aggas.pas
  5. 3 4
      compiler/arm/aoptcpu.pas
  6. 0 2
      compiler/avr/agavrgas.pas
  7. 0 1
      compiler/avr/aoptcpu.pas
  8. 7 15
      compiler/avr/cgcpu.pas
  9. 0 4
      compiler/avr/cpupara.pas
  10. 2 1
      compiler/avr/navradd.pas
  11. 1 1
      compiler/avr/navrmat.pas
  12. 3 7
      compiler/avr/raavrgas.pas
  13. 3 7
      compiler/avr/rgcpu.pas
  14. 1 1
      compiler/dbgcodeview.pas
  15. 3 1
      compiler/globtype.pas
  16. 0 3
      compiler/i8086/cpupara.pas
  17. 1 1
      compiler/i8086/n8086mem.pas
  18. 0 1
      compiler/i8086/n8086tcon.pas
  19. 1 0
      compiler/i8086/symcpu.pas
  20. 0 3
      compiler/jvm/agjasmin.pas
  21. 2 2
      compiler/jvm/cpubase.pas
  22. 0 2
      compiler/jvm/dbgjasm.pas
  23. 2 2
      compiler/jvm/hlcgcpu.pas
  24. 1 2
      compiler/jvm/njvminl.pas
  25. 0 1
      compiler/jvm/njvmmat.pas
  26. 0 3
      compiler/jvm/njvmmem.pas
  27. 1 1
      compiler/msg/errord.msg
  28. 1 1
      compiler/msg/errorda.msg
  29. 1 1
      compiler/msg/errordu.msg
  30. 2 1
      compiler/msg/errore.msg
  31. 1 1
      compiler/msg/errores.msg
  32. 1 1
      compiler/msg/errorfi.msg
  33. 1 1
      compiler/msg/errorheu.msg
  34. 1 1
      compiler/msg/errorid.msg
  35. 1 1
      compiler/msg/errorn.msg
  36. 1 1
      compiler/msg/errorptu.msg
  37. 1 1
      compiler/msg/errorru.msg
  38. 1 1
      compiler/msg/errorues.msg
  39. 1 1
      compiler/msgidx.inc
  40. 180 180
      compiler/msgtxt.inc
  41. 1 2
      compiler/nadd.pas
  42. 2 0
      compiler/nbas.pas
  43. 0 1
      compiler/ncginl.pas
  44. 1 1
      compiler/ncgvmt.pas
  45. 6 3
      compiler/nflw.pas
  46. 8 15
      compiler/ogomf.pas
  47. 12 0
      compiler/options.pas
  48. 0 2
      compiler/optloop.pas
  49. 1 7
      compiler/pgenutil.pas
  50. 11 3
      compiler/psabiehpi.pas
  51. 1 1
      compiler/psub.pas
  52. 9 5
      compiler/rgobj.pas
  53. 0 2
      compiler/scandir.pas
  54. 2 0
      compiler/symdef.pas
  55. 2 0
      compiler/systems.pas
  56. 0 2
      compiler/systems/t_bsd.pas
  57. 2 3
      compiler/systems/t_darwin.pas
  58. 110 8
      compiler/systems/t_embed.pas
  59. 5 5
      compiler/systems/t_freertos.pas
  60. 2 0
      compiler/systems/t_win.pas
  61. 0 3
      compiler/systems/t_win16.pas
  62. 104 104
      compiler/utils/Makefile
  63. 1 1
      compiler/utils/Makefile.fpc
  64. 88 2
      compiler/utils/mkx86inl.pp
  65. 32 1
      compiler/utils/mkz80ins.pp
  66. 38 22
      compiler/utils/msg2inc.pp
  67. 2 1
      compiler/utils/ppuutils/ppudump.pp
  68. 1 1
      compiler/verbose.pas
  69. 17 6
      compiler/x86/aasmcpu.pas
  70. 2 4
      compiler/x86/agx86nsm.pas
  71. 10 11
      compiler/x86/aoptx86.pas
  72. 10 2
      compiler/x86/cgx86.pas
  73. 2 2
      compiler/x86/cx86mminnr.inc
  74. 4 0
      compiler/x86/nx86inl.pas
  75. 0 4
      compiler/x86/nx86mat.pas
  76. 1 1
      compiler/x86/nx86set.pas
  77. 0 2
      compiler/x86/rax86.pas
  78. 14 2
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp
  79. 1 1
      packages/fcl-db/src/sqldb/mysql/mysqlconn.inc
  80. 1 2
      packages/fcl-registry/fpmake.pp
  81. 104 104
      packages/fcl-registry/tests/Makefile
  82. 2 2
      packages/fcl-registry/tests/Makefile.fpc
  83. 2 1
      packages/fcl-registry/tests/regtcxmlreg.pp
  84. 2 2
      packages/fcl-registry/tests/regtestbasics.pp
  85. 1 1
      packages/fcl-registry/tests/tregistry2.pp
  86. 35 34
      packages/fcl-registry/tests/tregtestframework.pp
  87. 44 10
      packages/fcl-stl/src/gdeque.pp
  88. 1 1
      packages/rtl-objpas/src/inc/dateutil.inc
  89. 7 3
      rtl/objpas/sysutils/syshelpo.inc
  90. 1 1
      tests/Makefile
  91. 1 1
      tests/Makefile.fpc
  92. 10 1
      tests/test/theapthread.pp
  93. 41 0
      tests/webtbs/tw38385.pp
  94. 23 0
      tests/webtbs/tw38390.pp
  95. 17 0
      tests/webtbs/uw38385a.pp
  96. 18 0
      tests/webtbs/uw38385b.pp
  97. 18 0
      tests/webtbs/uw38385c.pp

+ 9 - 4
.gitattributes

@@ -4011,9 +4011,10 @@ packages/fcl-registry/src/xmlreg.pp svneol=native#text/plain
 packages/fcl-registry/src/xregreg.inc svneol=native#text/plain
 packages/fcl-registry/tests/Makefile svneol=native#text/plain
 packages/fcl-registry/tests/Makefile.fpc -text
-packages/fcl-registry/tests/regtestframework.pp -text
-packages/fcl-registry/tests/tcxmlreg.pp svneol=native#text/plain
-packages/fcl-registry/tests/testbasics.pp svneol=native#text/plain
+packages/fcl-registry/tests/regtcxmlreg.pp svneol=native#text/plain
+packages/fcl-registry/tests/regtestbasics.pp svneol=native#text/plain
+packages/fcl-registry/tests/tregistry2.pp svneol=native#text/plain
+packages/fcl-registry/tests/tregtestframework.pp svneol=native#text/plain
 packages/fcl-report/Makefile svneol=native#text/plain
 packages/fcl-report/Makefile.fpc svneol=native#text/plain
 packages/fcl-report/demos/company-logo.png -text svneol=unset#image/png
@@ -14485,7 +14486,6 @@ tests/test/packages/fcl-db/tdb5.pp svneol=native#text/plain
 tests/test/packages/fcl-db/tdb6.pp svneol=native#text/plain
 tests/test/packages/fcl-db/toolsunit.pas svneol=native#text/plain
 tests/test/packages/fcl-registry/tregistry1.pp svneol=native#text/plain
-tests/test/packages/fcl-registry/tregistry2.pp svneol=native#text/plain
 tests/test/packages/fcl-registry/tw35060a.pp svneol=native#text/plain
 tests/test/packages/fcl-registry/tw35060b.pp svneol=native#text/plain
 tests/test/packages/fcl-registry/tw35060c.pp svneol=native#text/plain
@@ -18705,6 +18705,8 @@ tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw38337.pp svneol=native#text/plain
 tests/webtbs/tw38339.pp svneol=native#text/plain
 tests/webtbs/tw38351.pp -text svneol=native#text/pascal
+tests/webtbs/tw38385.pp svneol=native#text/pascal
+tests/webtbs/tw38390.pp svneol=native#text/pascal
 tests/webtbs/tw3840.pp svneol=native#text/plain
 tests/webtbs/tw3841.pp svneol=native#text/plain
 tests/webtbs/tw3863.pp svneol=native#text/plain
@@ -19241,6 +19243,9 @@ tests/webtbs/uw35918b.pp svneol=native#text/pascal
 tests/webtbs/uw35918c.pp svneol=native#text/pascal
 tests/webtbs/uw36544.pp svneol=native#text/pascal
 tests/webtbs/uw38069.pp svneol=native#text/pascal
+tests/webtbs/uw38385a.pp svneol=native#text/pascal
+tests/webtbs/uw38385b.pp svneol=native#text/pascal
+tests/webtbs/uw38385c.pp svneol=native#text/pascal
 tests/webtbs/uw3968.pp svneol=native#text/plain
 tests/webtbs/uw4056.pp svneol=native#text/plain
 tests/webtbs/uw4140.pp svneol=native#text/plain

+ 0 - 3
compiler/aarch64/agcpugas.pas

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

+ 0 - 7
compiler/aarch64/aoptcpu.pas

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

+ 0 - 1
compiler/aggas.pas

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

+ 3 - 4
compiler/arm/aoptcpu.pas

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

+ 0 - 2
compiler/avr/agavrgas.pas

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

+ 0 - 1
compiler/avr/aoptcpu.pas

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

+ 7 - 15
compiler/avr/cgcpu.pas

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

+ 0 - 4
compiler/avr/cpupara.pas

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

+ 2 - 1
compiler/avr/navradd.pas

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

+ 1 - 1
compiler/avr/navrmat.pas

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

+ 3 - 7
compiler/avr/raavrgas.pas

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

+ 3 - 7
compiler/avr/rgcpu.pas

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

+ 1 - 1
compiler/dbgcodeview.pas

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

+ 3 - 1
compiler/globtype.pas

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

+ 0 - 3
compiler/i8086/cpupara.pas

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

+ 1 - 1
compiler/i8086/n8086mem.pas

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

+ 0 - 1
compiler/i8086/n8086tcon.pas

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

+ 1 - 0
compiler/i8086/symcpu.pas

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

+ 0 - 3
compiler/jvm/agjasmin.pas

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

+ 2 - 2
compiler/jvm/cpubase.pas

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

+ 0 - 2
compiler/jvm/dbgjasm.pas

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

+ 2 - 2
compiler/jvm/hlcgcpu.pas

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

+ 1 - 2
compiler/jvm/njvminl.pas

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

+ 0 - 1
compiler/jvm/njvmmat.pas

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

+ 0 - 3
compiler/jvm/njvmmem.pas

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

+ 1 - 1
compiler/msg/errord.msg

@@ -3585,7 +3585,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Ung
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_Sie m�ssen beim Ziel EABIHF ABI einen der FPU Typen VFPV2, VFPV3 oder VFPV3_D16 verwenden
+option_illegal_fpu_eabihf=11052_E_Sie m�ssen beim Ziel EABIHF ABI einen der VFP FPU-Typen verwenden
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_Das ausgew„hlte Debugformat wird auf dem aktuellen Ziel nicht unterst�tzt. Die aktuelle Einstellung wird beibehalten
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorda.msg

@@ -3438,7 +3438,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errordu.msg

@@ -3585,7 +3585,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Ungültiger Wert für die Umge
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_Sie müssen beim Ziel EABIHF ABI einen der FPU Typen VFPV2, VFPV3 oder VFPV3_D16 verwenden
+option_illegal_fpu_eabihf=11052_E_Sie müssen beim Ziel EABIHF ABI einen der VFP FPU-Typen verwenden
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_Das ausgewählte Debugformat wird auf dem aktuellen Ziel nicht unterstützt. Die aktuelle Einstellung wird beibehalten
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 2 - 1
compiler/msg/errore.msg

@@ -3557,7 +3557,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).
@@ -4352,6 +4352,7 @@ F*2Xp<x>_First search for the compiler binary in the directory <x>
 **2Xs_Strip all symbols from executable
 **2XS_Try to link units statically (default, defines FPC_LINK_STATIC)
 **2Xt_Link with static libraries (-static is passed to linker)
+**2Xu_Generate executable in UF2 format  (embedded targets only)
 **2Xv_Generate table for Virtual Entry calls
 **2XV_Use VLink as external linker       (default on Amiga, MorphOS)
 **2XX_Try to smartlink units             (defines FPC_LINK_SMART)

+ 1 - 1
compiler/msg/errores.msg

@@ -3380,7 +3380,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorfi.msg

@@ -3403,7 +3403,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorheu.msg

@@ -3399,7 +3399,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorid.msg

@@ -3407,7 +3407,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorn.msg

@@ -3388,7 +3388,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorptu.msg

@@ -3417,7 +3417,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorru.msg

@@ -3292,7 +3292,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msg/errorues.msg

@@ -3374,7 +3374,7 @@ option_invalid_iphoneos_deployment_target=11051_E_Invalid value for IPHONEOS_DEP
 % XY.Z or XY.Z.AB with X, Y,Z , A and B all digits from 0-9.
 % In case of iOS, it has to be X.Z.A, where X, Z and A can all be either 1 or 2
 % digits from 0-9.
-option_illegal_fpu_eabihf=11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when using the EABIHF ABI target
+option_illegal_fpu_eabihf=11052_E_You must use one of the VFP FPU types when using the EABIHF ABI target
 % The EABIHF (VFP hardfloat) ABI target can only be used with VFP FPUs.
 option_w_unsupported_debug_format=11053_W_The selected debug format is not supported on the current target, not changing the current setting
 % Not all targets support all debug formats (in particular, Stabs is not supported on 64 bit targets).

+ 1 - 1
compiler/msgidx.inc

@@ -1136,7 +1136,7 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 86998;
+  MsgTxtSize = 87048;
 
   MsgIdxMax : array[1..20] of longint=(
     28,107,361,130,99,63,145,36,223,68,

+ 180 - 180
compiler/msgtxt.inc

@@ -1305,94 +1305,94 @@ const msgtxt : array[0..000362,1..240] of char=(
   'e: $1'#000+
   '11051_E_Invalid value for IPHONEOS_DEPLOYMENT_TARGET environment ','var'+
   'iable: $1'#000+
-  '11052_E_You must use a FPU type of VFPV2, VFPV3 or VFPV3_D16 when usin'+
-  'g the EABIHF ABI target'#000+
+  '11052_E_You must use one of the VFP FPU types when using the EABIHF AB'+
+  'I target'#000+
   '11053_W_The selected debug format is not supported on the current targ'+
   'et, not changing the current setting'#000+
-  '11054_E_Argument to "$1" i','s missing'#000+
-  '11055_E_Malformed parameter: $1'#000+
+  '11054_E_Argument to "$1" is missing'#000+
+  '11055','_E_Malformed parameter: $1'#000+
   '11056_W_Smart linking requires external linker'#000+
   '11057_E_Creating .COM files is not supported in the current memory mod'+
   'el. Only the tiny memory model supports making .COM files.'#000+
-  '11058_W_Experimental C','heckPointer option not enabled because it is i'+
+  '11058_W_Experimental CheckPointer opt','ion not enabled because it is i'+
   'ncomptatible with -Ur option.'#000+
   '11059_E_Unsupported target architecture -P$1, invoke the "fpc" compile'+
   'r driver instead.'#000+
   '11060_E_Feature switches are only supported while compiling the system'+
-  ' unit.',#000+
-  '11061_N_The selected debug format is not supported by the internal lin'+
-  'ker, switching to external linking'#000+
+  ' unit.'#000+
+  '11061_N_The se','lected debug format is not supported by the internal l'+
+  'inker, switching to external linking'#000+
   '11062_E_You can not use both options ($1) ($2) at same time.'#000+
   '12000_F_Cannot open whole program optimization feedback file "$1"'#000+
-  '12001_D','_Processing whole program optimization information in wpo fee'+
+  '12001_D_Processing who','le program optimization information in wpo fee'+
   'dback file "$1"'#000+
   '12002_D_Finished processing the whole program optimization information'+
   ' in wpo feedback file "$1"'#000+
-  '12003_E_Expected section header, but got "$2" at line $1 of wpo fe','ed'+
-  'back file'#000+
-  '12004_W_No handler registered for whole program optimization section "'+
-  '$2" at line $1 of wpo feedback file, ignoring'#000+
+  '12003_E_Expected section header, but got "$2" at line $1 of wpo feedba'+
+  'ck file'#000+
+  '120','04_W_No handler registered for whole program optimization section'+
+  ' "$2" at line $1 of wpo feedback file, ignoring'#000+
   '12005_D_Found whole program optimization section "$1" with information'+
   ' about "$2"'#000+
-  '12006_F_The selected whole pro','gram optimizations require a previousl'+
+  '12006_F_The selected whole program optimizati','ons require a previousl'+
   'y generated feedback file (use -Fw to specify)'#000+
   '12007_E_No collected information necessary to perform "$1" whole progr'+
   'am optimization found'#000+
-  '12008_F_Specify a whole program optimization feedback file to s','tore '+
-  'the generated info in (using -FW)'#000+
+  '12008_F_Specify a whole program optimization feedback file to store th'+
+  'e genera','ted info in (using -FW)'#000+
   '12009_E_Not generating any whole program optimization information, yet'+
   ' a feedback file was specified (using -FW)'#000+
   '12010_E_Not performing any whole program optimizations, yet an input f'+
-  'eedback file was s','pecified (using -Fw)'#000+
+  'eedback file was specified (using',' -Fw)'#000+
   '12011_D_Skipping whole program optimization section "$1", because not '+
   'needed by the requested optimizations'#000+
   '12012_W_Overriding previously read information for "$1" from feedback '+
-  'input file using information in section "','$2"'#000+
-  '12013_E_Cannot extract symbol liveness information from program when s'+
-  'tripping symbols, use -Xs-'#000+
+  'input file using information in section "$2"'#000+
+  '12013_E_Can','not extract symbol liveness information from program when'+
+  ' stripping symbols, use -Xs-'#000+
   '12014_E_Cannot extract symbol liveness information from program when w'+
   'hen not linking'#000+
-  '12015_F_Cannot find "$1" or "$2" to extract symbol li','veness informat'+
-  'ion from linked program'#000+
+  '12015_F_Cannot find "$1" or "$2" to extract symbol liveness informat','i'+
+  'on from linked program'#000+
   '12016_E_Error during reading symbol liveness information produced by "'+
   '$1"'#000+
   '12017_F_Error executing "$1" (exitcode: $2) to extract symbol informat'+
   'ion from linked program'#000+
-  '12018_E_Collection of symbol live','ness information can only help when'+
+  '12018_E_Collection of symbol liveness informatio','n can only help when'+
   ' using smart linking, use -CX -XX'#000+
   '12019_E_Cannot create specified whole program optimisation feedback fi'+
   'le "$1"'#000+
   '13001_F_Can'#039't find package $1'#000+
   '13002_U_PCP file for package $1 found'#000+
-  '13003_E_Duplicate package',' $1'#000+
-  '13004_E_Unit $1 can not be part of a package'#000+
+  '13003_E_Duplicate package $1'#000+
+  '13004_E_Uni','t $1 can not be part of a package'#000+
   '13005_N_Unit $1 is implicitely imported into package $2'#000+
   '13006_F_Failed to create PCP file $2 for package $1'#000+
   '13007_F_Failed to read PCP file for package $1'#000+
   '13008_T_PCP loading $1'#000+
-  '13009_U_PCP N','ame: $1'#000+
-  '13010_U_PCP Flags: $1'#000+
+  '13009_U_PCP Name: $1'#000+
+  '13010_U','_PCP Flags: $1'#000+
   '13011_U_PCP Crc: $1'#000+
   '13012_U_PCP Time: $1'#000+
   '13013_U_PCP File too short'#000+
   '13014_U_PCP Invalid Header (no PCP at the begin)'#000+
   '13015_U_PCP Invalid Version $1'#000+
   '13016_U_PCP is compiled for another processor'#000+
-  '13017_U_PCP is c','ompiled for another target'#000+
+  '13017_U_PCP is compiled for ano','ther target'#000+
   '13018_U_Writing $1'#000+
   '13019_F_Can'#039't Write PCP-File'#000+
   '13020_F_Error reading PCP-File'#000+
   '13021_F_Unexpected end of PCP-File'#000+
   '13022_F_Invalid PCP-File entry: $1'#000+
-  '13023_U_Trying to use a unit which was compiled with a different',' FPU'+
-  ' mode'#000+
-  '13024_T_Packagesearch: $1'#000+
+  '13023_U_Trying to use a unit which was compiled with a different FPU m'+
+  'ode'#000+
+  '13024','_T_Packagesearch: $1'#000+
   '13025_U_Required package $1'#000+
   '13026_U_Contained unit $1'#000+
   '13027_E_Unit $1 is already contained in package $2'#000+
   '13028_W_Unit $1 is imported from indirectly required package $2'#000+
   '13029_U_PPL filename $1'#000+
-  '11023_Free ','Pascal Compiler version $FPCFULLVERSION [$FPCDATE] for $F'+
+  '11023_Free Pascal Compiler',' version $FPCFULLVERSION [$FPCDATE] for $F'+
   'PCCPU'#010+
   'Copyright (c) 1993-2020 by Florian Klaempfl and others'#000+
   '11024_Free Pascal Compiler version $FPCVERSION'#010+
@@ -1400,7 +1400,7 @@ const msgtxt : array[0..000362,1..240] of char=(
   'Compiler date      : $FPCDATE'#010+
   'Compiler CPU target: $FPCCPU'#010+
   #010+
-  'Supported targ','ets (targets marked with '#039'{*}'#039' are under devel'+
+  'Supported targets (targets ma','rked with '#039'{*}'#039' are under devel'+
   'opment):'#010+
   '  $OSTARGETS'#010+
   #010+
@@ -1413,7 +1413,7 @@ const msgtxt : array[0..000362,1..240] of char=(
   'Supported inline assembler modes:'#010+
   '  $ASMMODES'#010+
   #010+
-  'Recognized compil','er and RTL features:'#010+
+  'Recognized compiler and RTL feat','ures:'#010+
   '  $FEATURELIST'#010+
   #010+
   'Recognized modeswitches:'#010+
@@ -1429,343 +1429,342 @@ const msgtxt : array[0..000362,1..240] of char=(
   '  All'#010+
   '  $WPOPTIMIZATIONS'#010+
   #010+
-  'Code Generation',' Backend'#010+
-  '  $CODEGENERATIONBACKEND'#010+
+  'Code Generation Backend'#010+
+  '  $COD','EGENERATIONBACKEND'#010+
   #010+
   'Supported Microcontroller types:$\n  $CONTROLLERTYPES$\n'#010+
   'This program comes under the GNU General Public Licence'#010+
   'For more information read COPYING.v2'#010+
   #010+
   'Please report bugs in our bug tracker on:'#010+
-  '            ','     https://bugs.freepascal.org'#010+
+  '                 https://bu','gs.freepascal.org'#010+
   #010+
   'More information may be found on our WWW pages (including directions'#010+
   'for mailing lists useful for asking questions or discussing potential'#010+
   'new features, etc.):'#010+
   '                 https://www.freepascal.org'#000+
-  '11','025_F*0*_Only options valid for the default or selected platform a'+
+  '11025_F*0*_Only o','ptions valid for the default or selected platform a'+
   're listed.'#010+
   '**0*_Put + after a boolean switch option to enable it, - to disable it'+
   '.'#010+
   '**1@<x>_Read compiler options from <x> in addition to the default fpc.'+
   'cfg'#010+
-  '**1a_The compiler',' does not delete the generated assembler file'#010+
+  '**1a_The compiler does not delet','e the generated assembler file'#010+
   '**2a5_Don'#039't generate Big Obj COFF files for GNU Binutils older tha'+
   'n 2.25 (Windows, NativeNT)'#010+
   '**2al_List sourcecode lines in assembler file'#010+
-  '**2an_List node info in assembler file (-dEXTDEBUG comp','iler)'#010+
-  '**2ao_Add an extra option to external assembler call (ignored for inte'+
-  'rnal)'#010+
+  '**2an_List node info in assembler file (-dEXTDEBUG compiler)'#010+
+  '**2ao_Add',' an extra option to external assembler call (ignored for in'+
+  'ternal)'#010+
   '*L2ap_Use pipes instead of creating temporary assembler files'#010+
   '**2ar_List register allocation/release info in assembler file'#010+
-  '**2at_List temp allocation/release',' info in assembler file'#010+
+  '**2at_List temp allocation/release info in assemb','ler file'#010+
   '**1A<x>_Output format:'#010+
   '**2Adefault_Use default assembler'#010+
   '3*2Aas_Assemble using GNU AS'#010+
   '3*2Aas-darwin_Assemble Darwin Mach-O using GNU GAS'#010+
   '3*2Amacho_Mach-O (Darwin, Intel 32 bit) using internal writer'#010+
-  '8*2Anasm_Assemble',' using Nasm'#010+
-  '8*2Anasmobj_Assemble using Nasm'#010+
+  '8*2Anasm_Assemble using Nasm'#010+
+  '8*2','Anasmobj_Assemble using Nasm'#010+
   '3*2Anasm_Assemble using Nasm'#010+
   '3*2Anasmcoff_COFF (Go32v2) file using Nasm'#010+
   '3*2Anasmelf_ELF32 (Linux) file using Nasm'#010+
   '3*2Anasmwin32_Win32 object file using Nasm'#010+
-  '3*2Anasmwdosx_Win32/WDOSX object file u','sing Nasm'#010+
-  '3*2Anasmdarwin_macho32 object file using Nasm (experimental)'#010+
+  '3*2Anasmwdosx_Win32/WDOSX object file using Nasm'#010+
+  '3*2An','asmdarwin_macho32 object file using Nasm (experimental)'#010+
   '3*2Awasm_Obj file using Wasm (Watcom)'#010+
   '3*2Anasmobj_Obj file using Nasm'#010+
   '3*2Amasm_Obj file using Masm (Microsoft)'#010+
   '3*2Atasm_Obj file using Tasm (Borland)'#010+
-  '3*2Aelf_ELF (Linux)',' using internal writer'#010+
+  '3*2Aelf_ELF (Linux) using internal',' writer'#010+
   '3*2Acoff_COFF (Go32v2) using internal writer'#010+
   '3*2Apecoff_PE-COFF (Win32) using internal writer'#010+
   '3*2Ayasm_Assemble using Yasm (experimental)'#010+
   '4*2Aas_Assemble using GNU AS'#010+
   '4*2Agas_Assemble using GNU GAS'#010+
-  '4*2Aas-darwin_Assem','ble Darwin Mach-O using GNU GAS'#010+
+  '4*2Aas-darwin_Assemble Darwin Mach','-O using GNU GAS'#010+
   '4*2Amasm_Win64 object file using ml64 (Microsoft)'#010+
   '4*2Apecoff_PE-COFF (Win64) using internal writer'#010+
   '4*2Aelf_ELF (Linux-64bit) using internal writer'#010+
   '4*2Ayasm_Assemble using Yasm (experimental)'#010+
-  '4*2Anasm_Assemble',' using Nasm (experimental)'#010+
+  '4*2Anasm_Assemble using Nasm (ex','perimental)'#010+
   '4*2Anasmwin64_Assemble Win64 object file using Nasm (experimental)'#010+
   '4*2Anasmelf_Assemble Linux-64bit object file using Nasm (experimental)'+
   #010+
   '4*2Anasmdarwin_Assemble darwin macho64 object file using Nasm (experim'+
-  'ental',')'#010+
-  '6*2Aas_Unix o-file using GNU AS'#010+
+  'ental)'#010+
+  '6*2Aas_Unix o','-file using GNU AS'#010+
   '6*2Agas_GNU Motorola assembler'#010+
   '6*2Amit_MIT Syntax (old GAS)'#010+
   '6*2Amot_Standard Motorola assembler'#010+
   '6*2Avasm_Use vasm to assemble'#010+
   'A*2Aas_Assemble using GNU AS'#010+
   'P*2Aas_Assemble using GNU AS'#010+
-  'S*2Aas_Assemble using ','GNU AS'#010+
-  'Z*2Asdcc-sdasz80_Assemble using SDCC-SDASZ80'#010+
+  'S*2Aas_Assemble using GNU AS'#010+
+  'Z*2Asdcc','-sdasz80_Assemble using SDCC-SDASZ80'#010+
   'Z*2Az80asm_Assemble using z80asm'#010+
   '**1b_Generate browser info'#010+
   '**2bl_Generate local symbol info'#010+
   '**1B_Build all modules'#010+
   '**1C<x>_Code generation options:'#010+
-  '**2C3_Turn on ieee error checking for c','onstants'#010+
-  '**2Ca<x>_Select ABI; see fpc -i or fpc -ia for possible values'#010+
+  '**2C3_Turn on ieee error checking for constants'#010+
+  '**2Ca<','x>_Select ABI; see fpc -i or fpc -ia for possible values'#010+
   '**2Cb_Generate code for a big-endian variant of the target architectur'+
   'e'#010+
   '**2Cc<x>_Set default calling convention to <x>'#010+
-  '**2CD_Create also dynamic library (not supported)',#010+
-  '**2Ce_Compilation with emulated floating point opcodes'#010+
+  '**2CD_Create also dynamic library (not supported)'#010+
+  '**2Ce_Compilat','ion with emulated floating point opcodes'#010+
   '**2CE_Generate FPU code which can raise exceptions'#010+
   '**2Cf<x>_Select fpu instruction set to use; see fpc -i or fpc -if for '+
   'possible values'#010+
-  '**2CF<x>_Minimal floating point constant precis','ion (default, 32, 64)'+
+  '**2CF<x>_Minimal floating point constant precision (default, 3','2, 64)'+
   #010+
   '**2Cg_Generate PIC code'#010+
   '**2Ch<n>[,m]_<n> bytes min heap size (between 1023 and 67107840) and o'+
   'ptionally [m] max heap size'#010+
   '**2Ci_IO-checking'#010+
   'A*2CI<x>_Select instruction set on ARM: ARM or THUMB'#010+
-  'L*2Cl<x>_LLVM code genera','tion options'#010+
-  'L*3Clflto_Enable Link-time optimisation (needed both when compiling un'+
-  'its and programs/libraries)'#010+
+  'L*2Cl<x>_LLVM code generation options'#010+
+  'L*','3Clflto_Enable Link-time optimisation (needed both when compiling '+
+  'units and programs/libraries)'#010+
   'L*3Clfltonosystem_Disable LTO for the system unit (needed with at leas'+
   't Xcode 10.2 and earlier due to linker bugs)'#010+
-  'L*3Clv<x>_LLVM',' target version: Xcode-10.1, 7.0, 8.0, .., 10.0'#010+
+  'L*3Clv<x>_LLVM target version',': Xcode-10.1, 7.0, 8.0, .., 10.0'#010+
   '**2Cn_Omit linking stage'#010+
   'P*2CN_Generate nil-pointer checks (AIX-only)'#010+
   '**2Co_Check overflow of integer operations'#010+
   '**2CO_Check for possible overflow of integer operations'#010+
-  '**2Cp<x>_Select instruc','tion set; see fpc -i or fpc -ic for possible '+
+  '**2Cp<x>_Select instruction set; see f','pc -i or fpc -ic for possible '+
   'values'#010+
   '**2CP<x>=<y>_ packing settings'#010+
   '**3CPPACKSET=<y>_ <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 '+
   'and 8'#010+
   '**3CPPACKENUM=<y>_ <y> enum packing: 0, 1, 2 and 4 or DEFAULT or NORMA'+
   'L'#010+
-  '**3CPPACK','RECORD=<y>_ <y> record packing: 0 or DEFAULT or NORMAL, 1, '+
+  '**3CPPACKRECORD=<y>_ <y>',' record packing: 0 or DEFAULT or NORMAL, 1, '+
   '2, 4, 8, 16 and 32'#010+
   '**2Cr_Range checking'#010+
   '**2CR_Verify object method call validity'#010+
   '**2Cs<n>_Set stack checking size to <n>'#010+
   '**2Ct_Stack checking (for testing only, see manual)'#010+
-  '8*2CT<x>','_Target-specific code generation options'#010+
+  '8*2CT<x>_Target-specifi','c code generation options'#010+
   '3*2CT<x>_Target-specific code generation options'#010+
   '4*2CT<x>_Target-specific code generation options'#010+
   'p*2CT<x>_Target-specific code generation options'#010+
   'P*2CT<x>_Target-specific code generation options'#010+
-  'J*2','CT<x>_Target-specific code generation options'#010+
+  'J*2CT<x>_Target-sp','ecific code generation options'#010+
   'A*2CT<x>_Target-specific code generation options'#010+
   'p*3CTsmalltoc_ Generate smaller TOCs at the expense of execution speed'+
   ' (AIX)'#010+
-  'P*3CTsmalltoc_ Generate smaller TOCs at the expense of execution spe','e'+
-  'd (AIX)'#010+
-  'J*3CTautogetterprefix=X_  Automatically create getters for properties '+
-  'with prefix X (empty string disables)'#010+
+  'P*3CTsmalltoc_ Generate smaller TOCs at the expense of execution speed'+
+  ' (AIX)'#010+
+  'J*3CTa','utogetterprefix=X_  Automatically create getters for propertie'+
+  's with prefix X (empty string disables)'#010+
   'J*3CTautosetterprefix=X_  Automatically create setters for properties '+
   'with prefix X (empty string disables)'#010+
-  '8*3CTcld_      ','           Emit a CLD instruction before using the x8'+
+  '8*3CTcld_                 Emit',' a CLD instruction before using the x8'+
   '6 string instructions'#010+
   '3*3CTcld_                 Emit a CLD instruction before using the x86 '+
   'string instructions'#010+
   '4*3CTcld_                 Emit a CLD instruction before using the x86 '+
-  'strin','g instructions'#010+
+  'string instructions'#010,
   '8*3CTfarprocspushoddbp_       Increment BP before pushing it in the pr'+
   'ologue of far functions'#010+
   'J*3CTcompactintarrayinit_ Generate smaller (but potentially slower) co'+
   'de for initializing integer array constants'#010+
-  'J*3CTenumfieldini','t_       Initialize enumeration fields in construct'+
+  'J*3CTenumfieldinit_       Initia','lize enumeration fields in construct'+
   'ors to enumtype(0), after calling inherited constructors'#010+
   'J*3CTinitlocals_          Initialize local variables that trigger a JV'+
-  'M bytecode verification error if used uninitialized (slows dow','n code'+
-  ')'#010+
-  'J*3CTlowercaseprocstart_  Lowercase the first character of procedure/f'+
-  'unction/method names'#010+
+  'M bytecode verification error if used uninitialized (slows down code)'#010+
+  'J*3CTlo','wercaseprocstart_  Lowercase the first character of procedure'+
+  '/function/method names'#010+
   'A*3CTthumbinterworking_ Generate Thumb interworking-safe code if possi'+
   'ble'#010+
   'J*2Cv_Var/out parameter copy-out checking'#010+
-  'A*2CV<x>_Set section thre','advar model to <x>'#010+
+  'A*2CV<x>_Set section threadvar model to ','<x>'#010+
   '**2CX_Create also smartlinked library'#010+
   '**1d<x>_Defines the symbol <x>'#010+
   '**1D_Generate a DEF file'#010+
   '**2DD<x>_Set the date string returned by %DATE% to x, it is not checke'+
   'd for being a valid date string'#010+
-  '**2Dd<x>_Set description ','to <x>'#010+
-  '**2DT<x>_Set the time string returned by %TIME% to x, it is not checke'+
-  'd for being a valid time string'#010+
+  '**2Dd<x>_Set description to <x>'#010+
+  '**2DT<x>','_Set the time string returned by %TIME% to x, it is not chec'+
+  'ked for being a valid time string'#010+
   '**2Dv<x>_Set DLL version to <x>'#010+
   '*O2Dw_PM application'#010+
   '**1e<x>_Set path to executable'#010+
   '**1E_Same as -Cn'#010+
   '**1fPIC_Same as -Cg'#010+
-  '**1F<x>_Se','t file names and paths:'#010+
+  '**1F<x>_Set file names an','d paths:'#010+
   '**2Fa<x>[,y]_(for a program) load units <x> and [y] before uses is par'+
   'sed'#010+
   '**2Fc<x>_Set input codepage to <x>'#010+
   '**2FC<x>_Set RC compiler binary name to <x>'#010+
   '**2Fd_Disable the compiler'#039's internal directory cache'#010+
-  '**2FD<x>_','Set the directory where to search for compiler utilities'#010+
+  '**2FD<x>_Set the directo','ry where to search for compiler utilities'#010+
   '**2Fe<x>_Redirect error output to <x>'#010+
   '**2FE<x>_Set exe/unit output path to <x>'#010+
   '**2Ff<x>_Add <x> to framework path (Darwin only), or set IDF path to <'+
   'x> (Xtensa-FreeRTOS)'#010+
-  '**2FF_Use fpc','res as RC to RES compiler instead of windres or gorc'#010+
+  '**2FF_Use fpcres as RC to RE','S compiler instead of windres or gorc'#010+
   '**2Fi<x>_Add <x> to include path'#010+
   '**2Fl<x>_Add <x> to library path'#010+
   '**2FL<x>_Use <x> as dynamic linker'#010+
   '**2Fm<x>_Load unicode conversion table from <x>.txt in the compiler di'+
   'r'#010+
-  '**2FM<x>_Set t','he directory where to search for unicode binary files'#010+
+  '**2FM<x>_Set the directory wh','ere to search for unicode binary files'#010+
   '**2FN<x>_Add <x> to list of default unit scopes (namespaces)'#010+
   '**2Fo<x>_Add <x> to object path'#010+
   '**2Fr<x>_Load error message file <x>'#010+
   '**2FR<x>_Set resource (.res) linker to <x>'#010+
-  '**2Fu<x>_Add ','<x> to unit path'#010+
+  '**2Fu<x>_Add <x> to unit pat','h'#010+
   '**2FU<x>_Set unit output path to <x>, overrides -FE'#010+
   '**2FW<x>_Store generated whole-program optimization feedback in <x>'#010+
   '**2Fw<x>_Load previously stored whole-program optimization feedback fr'+
   'om <x>'#010+
-  '*g1g_Generate debug inform','ation (default format for target)'#010+
+  '*g1g_Generate debug information (default ','format for target)'#010+
   '*g2gc_Generate checks for pointers (experimental, only available on so'+
   'me targets, might generate false positive)'#010+
   '*g2gh_Use heaptrace unit (for memory leak/corruption debugging)'#010+
-  '*g2gl_Use line info unit (sho','w more info with backtraces)'#010+
+  '*g2gl_Use line info unit (show more info wit','h backtraces)'#010+
   '*g2gm_Generate Microsoft CodeView debug information (experimental)'#010+
   '*g2go<x>_Set debug information options'#010+
   '*g3godwarfsets_ Enable DWARF '#039'set'#039' type debug information (bre'+
   'aks gdb < 6.5)'#010+
-  '*g3gostabsabsincludes_ Store',' absolute/full include file paths in Sta'+
+  '*g3gostabsabsincludes_ Store absolute/full ','include file paths in Sta'+
   'bs'#010+
   '*g3godwarfmethodclassprefix_ Prefix method names in DWARF with class n'+
   'ame'#010+
   '*g3godwarfcpp_ Simulate C++ debug information in DWARF'#010+
-  '*g3godwarfomflinnum_ Generate line number information in OMF LINNUM ','r'+
-  'ecords in MS LINK format in addition to the DWARF debug information (O'+
-  'pen Watcom Debugger/Linker compatibility)'#010+
+  '*g3godwarfomflinnum_ Generate line number information in OMF LINNUM re'+
+  'cords in MS L','INK format in addition to the DWARF debug information ('+
+  'Open Watcom Debugger/Linker compatibility)'#010+
   '*g2gp_Preserve case in stabs symbol names'#010+
   '*g2gs_Generate Stabs debug information'#010+
-  '*g2gt_Trash local variables (to detect uniniti','alized uses; multiple '+
+  '*g2gt_Trash local variables (to detect uninitialized uses; mu','ltiple '+
   #039't'#039' changes the trashing value)'#010+
   '*g2gv_Generates programs traceable with Valgrind'#010+
   '*g2gw_Generate DWARFv2 debug information (same as -gw2)'#010+
   '*g2gw2_Generate DWARFv2 debug information'#010+
-  '*g2gw3_Generate DWARFv3 debug informati','on'#010+
-  '*g2gw4_Generate DWARFv4 debug information (experimental)'#010+
+  '*g2gw3_Generate DWARFv3 debug information'#010+
+  '*g2gw4_Gener','ate DWARFv4 debug information (experimental)'#010+
   '**1i_Information'#010+
   '**2iD_Return compiler date'#010+
   '**2iSO_Return compiler OS'#010+
   '**2iSP_Return compiler host processor'#010+
   '**2iTO_Return target OS'#010+
   '**2iTP_Return target processor'#010+
-  '**2iV_Return shor','t compiler version'#010+
+  '**2iV_Return short compiler vers','ion'#010+
   '**2iW_Return full compiler version'#010+
   '**2ia_Return list of supported ABI targets'#010+
   '**2ib_Return the used code generation backend type'#010+
   '**2ic_Return list of supported CPU instruction sets'#010+
-  '**2if_Return list of supported FPU instr','uction sets'#010+
-  '**2ii_Return list of supported inline assembler modes'#010+
+  '**2if_Return list of supported FPU instruction sets'#010+
+  '**2','ii_Return list of supported inline assembler modes'#010+
   '**2im_Return list of supported modeswitches'#010+
   '**2io_Return list of supported optimizations'#010+
   '**2ir_Return list of recognized compiler and RTL features'#010+
-  '**2it_Return list of suppor','ted targets'#010+
-  '**2iu_Return list of supported microcontroller types'#010+
+  '**2it_Return list of supported targets'#010+
+  '**2','iu_Return list of supported microcontroller types'#010+
   '**2iw_Return list of supported whole program optimizations'#010+
   '**1I<x>_Add <x> to include path'#010+
   '**1k<x>_Pass <x> to the linker'#010+
   '**1l_Write logo'#010+
-  '**1M<x>_Set language mode to <x> / en','able modeswitch <x> (see option'+
+  '**1M<x>_Set language mode to <x> / enable modeswitch',' <x> (see option'+
   ' -im)'#010+
   '**2Mfpc_Free Pascal dialect (default)'#010+
   '**2Mobjfpc_FPC mode with Object Pascal support'#010+
   '**2Mdelphi_Delphi 7 compatibility mode'#010+
   '**2Mtp_TP/BP 7.0 compatibility mode'#010+
-  '**2Mmacpas_Macintosh Pascal dialects compat','ibility mode'#010+
-  '**2Miso_ISO 7185 mode'#010+
+  '**2Mmacpas_Macintosh Pascal dialects compatibility mode'#010+
+  '**','2Miso_ISO 7185 mode'#010+
   '**2Mextendedpascal_ISO 10206 mode'#010+
   '**2Mdelphiunicode_Delphi 2009 and later compatibility mode'#010+
   '**2*_Each mode (as listed above) enables its default set of modeswitch'+
   'es.'#010+
-  '**2*_Other modeswitches are disabled a','nd need to be enabled one by a'+
+  '**2*_Other modeswitches are disabled and need to be e','nabled one by a'+
   'nother.'#010+
   '**1M<x>-_Disable modeswitch <x> (see option -im)'#010+
   '**1n_Do not read the default config files'#010+
   '**1o<x>_Change the name of the executable produced to <x>'#010+
   '**1O<x>_Optimizations:'#010+
   '**2O-_Disable optimizations'#010+
-  '**','2O1_Level 1 optimizations (quick and debugger friendly)'#010+
+  '**2O1_Level 1 opt','imizations (quick and debugger friendly)'#010+
   '**2O2_Level 2 optimizations (-O1 + quick optimizations)'#010+
   '**2O3_Level 3 optimizations (-O2 + slow optimizations)'#010+
   '**2O4_Level 4 optimizations (-O3 + optimizations which might have unex'+
-  'pec','ted side effects)'#010+
+  'pected side effect','s)'#010+
   '**2Oa<x>=<y>_Set alignment'#010+
   '**2Oo[NO]<x>_Enable or disable optimizations; see fpc -i or fpc -io fo'+
   'r possible values'#010+
   '**2Op<x>_Set target cpu for optimizing; see fpc -i or fpc -ic for poss'+
   'ible values'#010+
-  '**2OW<x>_Generate whole-p','rogram optimization feedback for optimizati'+
+  '**2OW<x>_Generate whole-program optimiza','tion feedback for optimizati'+
   'on <x>; see fpc -i or fpc -iw for possible values'#010+
   '**2Ow<x>_Perform whole-program optimization <x>; see fpc -i or fpc -iw'+
   ' for possible values'#010+
   '**2Os_Optimize for size rather than speed'#010+
-  '**1pg_Generate',' profile code for gprof (defines FPC_PROFILE)'#010+
+  '**1pg_Generate profile code f','or gprof (defines FPC_PROFILE)'#010+
   'F*1P<x>_Target CPU / compiler related options:'#010+
   'F*2PB_Show default compiler binary'#010+
   'F*2PP_Show default target cpu'#010+
   'F*2P<x>_Set target CPU (aarch64,arm,avr,i386,i8086,jvm,m68k,mips,mipse'+
-  'l,powerpc,po','werpc64,sparc,x86_64)'#010+
+  'l,powerpc,powerpc64,sparc,x','86_64)'#010+
   '**1R<x>_Assembler reading style:'#010+
   '**2Rdefault_Use default assembler for target'#010+
   '3*2Ratt_Read AT&T style assembler'#010+
   '3*2Rintel_Read Intel style assembler'#010+
   '4*2Ratt_Read AT&T style assembler'#010+
-  '4*2Rintel_Read Intel style assemble','r'#010+
-  '8*2Ratt_Read AT&T style assembler'#010+
+  '4*2Rintel_Read Intel style assembler'#010+
+  '8*2Ratt_Read ','AT&T style assembler'#010+
   '8*2Rintel_Read Intel style assembler'#010+
   '6*2RMOT_Read Motorola style assembler'#010+
   '**1S<x>_Syntax options:'#010+
   '**2S2_Same as -Mobjfpc'#010+
   '**2Sc_Support operators like C (*=,+=,/= and -=)'#010+
   '**2Sa_Turn on assertions'#010+
-  '**2Sd_Sa','me as -Mdelphi'#010+
+  '**2Sd_Same as -Mdelphi'#010,
   '**2Se<x>_Error options. <x> is a combination of the following:'#010+
   '**3*_<n> : Compiler halts after the <n> errors (default is 1)'#010+
   '**3*_w : Compiler also halts after warnings'#010+
   '**3*_n : Compiler also halts after notes'#010+
-  '**3*_h : Compil','er also halts after hints'#010+
+  '**3*_h : Compiler also halts a','fter hints'#010+
   '**2Sf_Enable certain features in compiler and RTL; see fpc -i or fpc -'+
   'ir for possible values)'#010+
   '**2Sg_Enable LABEL and GOTO (default in -Mtp and -Mdelphi)'#010+
-  '**2Sh_Use reference counted strings (ansistring by default) i','nstead '+
-  'of shortstrings'#010+
+  '**2Sh_Use reference counted strings (ansistring by default) instead of'+
+  ' short','strings'#010+
   '**2Si_Turn on inlining of procedures/functions declared as "inline"'#010+
   '**2Sj_Allows typed constants to be writeable (default in all modes)'#010+
   '**2Sk_Load fpcylix unit'#010+
   '**2SI<x>_Set interface style to <x>'#010+
-  '**3SIcom_COM compatib','le interface (default)'#010+
+  '**3SIcom_COM compatible interface (d','efault)'#010+
   '**3SIcorba_CORBA compatible interface'#010+
   '**2sT_Generate script only to link on target'#010+
   '**2Sm_Support macros like C (global)'#010+
   '**2So_Same as -Mtp'#010+
   '**2Sr_Transparent file names in ISO mode'#010+
-  '**2Ss_Constructor name must be init (','destructor must be done)'#010+
+  '**2Ss_Constructor name must be init (destructor must',' be done)'#010+
   '**2Sv_Support vector processing (use CPU vector extensions if availabl'+
   'e)'#010+
   '**2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)'#010+
   '**2Sy_@<pointer> returns a typed pointer, same as $T+'#010+
-  '**1s_Do not call assemb','ler and linker'#010+
+  '**1s_Do not call assembler and linker'#010,
   '**2sh_Generate script to link on host'#010+
   '**2st_Generate script to assemble and link on target'#010+
   '**2sr_Skip register allocation phase (use with -alr)'#010+
   '**1T<x>_Target operating system:'#010+
   '3*2Tandroid_Android'#010+
   '3*2Taros_AROS'#010+
-  '3*2Tbeos_BeOS'#010,
-  '3*2Tdarwin_Darwin/Mac OS X'#010+
+  '3*2Tbeos_BeOS'#010+
+  '3*2Tdarwin_Darw','in/Mac OS X'#010+
   '3*2Tembedded_Embedded'#010+
   '3*2Temx_OS/2 via EMX (including EMX/RSX extender)'#010+
   '3*2Tfreebsd_FreeBSD'#010+
   '3*2Tgo32v2_Version 2 of DJ Delorie DOS extender'#010+
   '3*2Thaiku_Haiku'#010+
-  '3*2Tiphonesim_iPhoneSimulator from iOS SDK 3.2+ (older ve','rsions: -Td'+
-  'arwin)'#010+
+  '3*2Tiphonesim_iPhoneSimulator from iOS SDK 3.2+ (older versions: -Tdar'+
+  'wi','n)'#010+
   '3*2Tlinux_Linux'#010+
   '3*2Tnativent_Native NT API (experimental)'#010+
   '3*2Tnetbsd_NetBSD'#010+
@@ -1773,8 +1772,8 @@ const msgtxt : array[0..000362,1..240] of char=(
   '3*2Tnetwlibc_Novell Netware Module (libc)'#010+
   '3*2Topenbsd_OpenBSD'#010+
   '3*2Tos2_OS/2 / eComStation'#010+
-  '3*2Tsymbian_Symb','ian OS'#010+
-  '3*2Tsolaris_Solaris'#010+
+  '3*2Tsymbian_Symbian OS'#010+
+  '3*2Tsola','ris_Solaris'#010+
   '3*2Twatcom_Watcom compatible DOS extender'#010+
   '3*2Twdosx_WDOSX DOS extender'#010+
   '3*2Twin32_Windows 32 Bit'#010+
@@ -1783,7 +1782,7 @@ const msgtxt : array[0..000362,1..240] of char=(
   '4*2Taros_AROS'#010+
   '4*2Tdarwin_Darwin/Mac OS X'#010+
   '4*2Tdragonfly_DragonFly BSD'#010+
-  '4*2Temb','edded_Embedded'#010+
+  '4*2Tembedded_Embedded'#010,
   '4*2Tfreebsd_FreeBSD'#010+
   '4*2Thaiku_Haiku'#010+
   '4*2Tiphonesim_iPhoneSimulator'#010+
@@ -1793,8 +1792,8 @@ const msgtxt : array[0..000362,1..240] of char=(
   '4*2Tsolaris_Solaris'#010+
   '4*2Twin64_Win64 (64 bit Windows systems)'#010+
   '6*2Tamiga_Commodore Amiga'#010+
-  '6*2Tatari_Atari ST','/STe/TT'#010+
-  '6*2Tembedded_Embedded'#010+
+  '6*2Tatari_Atari ST/STe/TT'#010+
+  '6*2Temb','edded_Embedded'#010+
   '6*2Tlinux_Linux'#010+
   '6*2Tnetbsd_NetBSD'#010+
   '6*2Tmacosclassic_Classic Mac OS'#010+
@@ -1803,8 +1802,8 @@ const msgtxt : array[0..000362,1..240] of char=(
   '8*2Tembedded_Embedded'#010+
   '8*2Tmsdos_MS-DOS (and compatible)'#010+
   '8*2Twin16_Windows 16 Bit'#010+
-  'A*2Tandroid_Androi','d'#010+
-  'A*2Taros_AROS'#010+
+  'A*2Tandroid_Android'#010+
+  'A*2Taros_AROS',#010+
   'A*2Tembedded_Embedded'#010+
   'A*2Tfreertos_FreeRTOS'#010+
   'A*2Tgba_Game Boy Advance'#010+
@@ -1816,7 +1815,7 @@ const msgtxt : array[0..000362,1..240] of char=(
   'A*2Tsymbian_Symbian'#010+
   'A*2Twince_Windows CE'#010+
   'a*2Tandroid_Android'#010+
-  'a*2Tdarwin','_Darwin/Mac OS X'#010+
+  'a*2Tdarwin_Darwin/Mac OS ','X'#010+
   'a*2Tios_iOS'#010+
   'a*2Tlinux_Linux'#010+
   'a*2Twin64_Windows 64'#010+
@@ -1829,8 +1828,8 @@ const msgtxt : array[0..000362,1..240] of char=(
   'M*2Tlinux_Linux'#010+
   'P*2Taix_AIX'#010+
   'P*2Tamiga_AmigaOS'#010+
-  'P*2Tdarwin_Dar','win/Mac OS X'#010+
-  'P*2Tembedded_Embedded'#010+
+  'P*2Tdarwin_Darwin/Mac OS X'#010+
+  'P*','2Tembedded_Embedded'#010+
   'P*2Tlinux_Linux'#010+
   'P*2Tmacosclassic_Classic Mac OS'#010+
   'P*2Tmorphos_MorphOS'#010+
@@ -1841,8 +1840,8 @@ const msgtxt : array[0..000362,1..240] of char=(
   'p*2Tembedded_Embedded'#010+
   'p*2Tlinux_Linux'#010+
   'R*2Tlinux_Linux'#010+
-  'R*2Tembedded_E','mbedded'#010+
-  'r*2Tlinux_Linux'#010+
+  'R*2Tembedded_Embedded'#010+
+  'r*2Tlin','ux_Linux'#010+
   'r*2Tembedded_Embedded'#010+
   'S*2Tlinux_Linux'#010+
   'S*2Tsolaris_Solaris'#010+
@@ -1853,77 +1852,76 @@ const msgtxt : array[0..000362,1..240] of char=(
   'x*2Tlinux_Linux'#010+
   'Z*2Tembedded_Embedded'#010+
   'Z*2Tzxspectrum_ZX Spectrum'#010+
-  'Z*2Tmsxdos_','MSX-DOS'#010+
-  'W*2Tembedded_Embedded'#010+
+  'Z*2Tmsxdos_MSX-DOS'#010+
+  'W*2Temb','edded_Embedded'#010+
   'W*2Twasi_The WebAssembly System Interface (WASI)'#010+
   '**1u<x>_Undefines the symbol <x>'#010+
   '**1U_Unit options:'#010+
   '**2Un_Do not check where the unit name matches the file name'#010+
-  '**2Ur_Generate release unit files (never automat','ically recompiled)'#010+
+  '**2Ur_Generate release unit files (never automatically recompil','ed)'#010+
   '**2Us_Compile a system unit'#010+
   '**1v<x>_Be verbose. <x> is a combination of the following letters:'#010+
   '**2*_e : Show errors (default)       0 : Show nothing (except errors)'#010+
-  '**2*_w : Show warnings               u : Show unit info'#010,
-  '**2*_n : Show notes                  t : Show tried/used files'#010+
+  '**2*_w : Show warnings               u : Show unit info'#010+
+  '**2*_n : Show n','otes                  t : Show tried/used files'#010+
   '**2*_h : Show hints                  c : Show conditionals'#010+
   '**2*_i : Show general info           d : Show debug info'#010+
-  '**2*_l : Show linenumbers            r : Rhide/GCC compatibil','ity mod'+
-  'e'#010+
-  '**2*_s : Show time stamps            q : Show message numbers'#010+
+  '**2*_l : Show linenumbers            r : Rhide/GCC compatibility mode'#010+
+  '**2*_s',' : Show time stamps            q : Show message numbers'#010+
   '**2*_a : Show everything             x : Show info about invoked tools'+
   #010+
   '**2*_b : Write file names messages   p : Write tree.log with parse tre'+
   'e'#010+
-  '**2*_    with full path   ','           v : Write fpcdebug.txt with'#010+
+  '**2*_    with full path              v : ','Write fpcdebug.txt with'#010+
   '**2*_z : Write output to stderr          lots of debugging info'#010+
   '**2*_m<x>,<y> : Do not show messages numbered <x> and <y>'#010+
   'F*1V<x>_Append '#039'-<x>'#039' to the used compiler binary name (e.g. f'+
   'or version)'#010+
-  '**1W<','x>_Target-specific options (targets)'#010+
+  '**1W<x>_Target-speci','fic options (targets)'#010+
   '3*2WA_Specify native type application (Windows)'#010+
   '4*2WA_Specify native type application (Windows)'#010+
   'A*2WA_Specify native type application (Windows)'#010+
   '3*2Wb_Create a bundle instead of a library (Darwin)'#010+
-  'P*2Wb_C','reate a bundle instead of a library (Darwin)'#010+
+  'P*2Wb_Create a bundle ','instead of a library (Darwin)'#010+
   'p*2Wb_Create a bundle instead of a library (Darwin)'#010+
   'a*2Wb_Create a bundle instead of a library (Darwin)'#010+
   'A*2Wb_Create a bundle instead of a library (Darwin)'#010+
-  '4*2Wb_Create a bundle instead of a libr','ary (Darwin)'#010+
-  '3*2WB_Create a relocatable image (Windows, Symbian)'#010+
+  '4*2Wb_Create a bundle instead of a library (Darwin)'#010+
+  '3*','2WB_Create a relocatable image (Windows, Symbian)'#010+
   '3*2WB<x>_Set image base to <x> (Windows, Symbian)'#010+
   '4*2WB_Create a relocatable image (Windows)'#010+
   '4*2WB<x>_Set image base to <x> (Windows)'#010+
-  'A*2WB_Create a relocatable image (Windows',', Symbian)'#010+
-  'A*2WB<x>_Set image base to <x> (Windows, Symbian)'#010+
+  'A*2WB_Create a relocatable image (Windows, Symbian)'#010+
+  'A*2W','B<x>_Set image base to <x> (Windows, Symbian)'#010+
   'Z*2WB<x>_Set image base to <x> (ZX Spectrum)'#010+
   '3*2WC_Specify console type application (EMX, OS/2, Windows)'#010+
   '4*2WC_Specify console type application (Windows)'#010+
-  'A*2WC_Specify console typ','e application (Windows)'#010+
+  'A*2WC_Specify console type application (','Windows)'#010+
   'P*2WC_Specify console type application (Classic Mac OS)'#010+
   '3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+
   '4*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)'#010+
-  'A*2WD_Use DEFFILE to export function','s of DLL or EXE (Windows)'#010+
+  'A*2WD_Use DEFFILE to export functions of DLL or EXE',' (Windows)'#010+
   '3*2We_Use external resources (Darwin)'#010+
   '4*2We_Use external resources (Darwin)'#010+
   'a*2We_Use external resources (Darwin)'#010+
   'A*2We_Use external resources (Darwin)'#010+
   'P*2We_Use external resources (Darwin)'#010+
-  'p*2We_Use external resou','rces (Darwin)'#010+
-  '3*2WF_Specify full-screen type application (EMX, OS/2)'#010+
+  'p*2We_Use external resources (Darwin)'#010+
+  '3','*2WF_Specify full-screen type application (EMX, OS/2)'#010+
   '3*2WG_Specify graphic type application (EMX, OS/2, Windows)'#010+
   '4*2WG_Specify graphic type application (Windows)'#010+
   'A*2WG_Specify graphic type application (Windows)'#010+
-  'P*2WG_Specify',' graphic type application (Classic Mac OS)'#010+
+  'P*2WG_Specify graphic type a','pplication (Classic Mac OS)'#010+
   '3*2Wi_Use internal resources (Darwin)'#010+
   '4*2Wi_Use internal resources (Darwin)'#010+
   'a*2Wi_Use internal resources (Darwin)'#010+
   'A*2Wi_Use internal resources (Darwin)'#010+
   'P*2Wi_Use internal resources (Darwin)'#010+
-  'p*2Wi_U','se internal resources (Darwin)'#010+
+  'p*2Wi_Use internal res','ources (Darwin)'#010+
   '3*2WI_Turn on/off the usage of import sections (Windows)'#010+
   '4*2WI_Turn on/off the usage of import sections (Windows)'#010+
   'A*2WI_Turn on/off the usage of import sections (Windows)'#010+
-  '8*2Wh_Use huge code for units (ignored',' for models with CODE in a uni'+
+  '8*2Wh_Use huge code for units (ignored for models wit','h CODE in a uni'+
   'que segment)'#010+
   '8*2Wm<x>_Set memory model'#010+
   '8*3WmTiny_Tiny memory model'#010+
@@ -1931,83 +1929,85 @@ const msgtxt : array[0..000362,1..240] of char=(
   '8*3WmMedium_Medium memory model'#010+
   '8*3WmCompact_Compact memory model'#010+
   '8*3WmLarge_Large memory model'#010+
-  '8*3WmHu','ge_Huge memory model'#010+
+  '8*3WmHuge_Huge memory ','model'#010+
   '3*2WM<x>_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+
   'n)'#010+
   '4*2WM<x>_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+
   'n)'#010+
   'p*2WM<x>_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+
-  'n)'#010,
-  'P*2WM<x>_Minimum Mac OS X deployment version: 10.4, 10.5.1, ... (Darwi'+
   'n)'#010+
+  'P*2WM<x>_Minimu','m Mac OS X deployment version: 10.4, 10.5.1, ... (Dar'+
+  'win)'#010+
   '3*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+
   '4*2WN_Do not generate relocation code, needed for debugging (Windows)'#010+
-  'A*2WN_Do not generate reloc','ation code, needed for debugging (Windows'+
+  'A*2WN_Do not generate relocation code, nee','ded for debugging (Windows'+
   ')'#010+
   'A*2Wp<x>_Specify the controller type; see fpc -i or fpc -iu for possib'+
   'le values'#010+
   'm*2Wp<x>_Specify the controller type; see fpc -i or fpc -iu for possib'+
   'le values'#010+
-  'R*2Wp<x>_Specify the controller type;',' see fpc -i or fpc -iu for poss'+
+  'R*2Wp<x>_Specify the controller type; see fpc -i or ','fpc -iu for poss'+
   'ible values'#010+
   'V*2Wp<x>_Specify the controller type; see fpc -i or fpc -iu for possib'+
   'le values'#010+
   'x*2Wp<x>_Specify the controller type; see fpc -i or fpc -iu for possib'+
   'le values'#010+
-  '3*2WP<x>_Minimum iOS deployment versi','on: 3.0, 5.0.1, ... (iphonesim)'+
+  '3*2WP<x>_Minimum iOS deployment version: 3.0, 5.0.1,',' ... (iphonesim)'+
   #010+
   '4*2WP<x>_Minimum iOS deployment version: 8.0, 8.0.2, ... (iphonesim)'#010+
   'a*2WP<x>_Minimum iOS deployment version: 7.0, 7.1.2, ... (Darwin)'#010+
   'A*2WP<x>_Minimum iOS deployment version: 3.0, 5.0.1, ... (Darwin)'#010+
-  '3*2WR_G','enerate relocation code (Windows)'#010+
+  '3*2WR_Generate relocat','ion code (Windows)'#010+
   '4*2WR_Generate relocation code (Windows)'#010+
   'A*2WR_Generate relocation code (Windows)'#010+
   '8*2Wt<x>_Set the target executable format'#010+
   '8*3Wtexe_Create a DOS .EXE file (default)'#010+
-  '8*3Wtcom_Create a DOS .COM file (require','s tiny memory model)'#010+
+  '8*3Wtcom_Create a DOS .COM file (requires tiny memory m','odel)'#010+
   'P*2WT_Specify MPW tool type application (Classic Mac OS)'#010+
   '6*2WQ<x>_Set executable metadata format (Sinclair QL)'#010+
   '6*3WQqhdr_Set metadata to QDOS File Header style (default)'#010+
   '6*3WQxtcc_Set metadata to XTcc style'#010+
-  '**2WX_Enable',' executable stack (Linux)'#010+
+  '**2WX_Enable executable sta','ck (Linux)'#010+
   '**1X_Executable options:'#010+
   '**2X9_Generate linkerscript for GNU Binutils ld older than version 2.1'+
   '9.1 (Linux)'#010+
   '**2Xa_Generate code which allows to use more than 2 GB static data on '+
   '64 Bit targets (Linux)'#010+
-  '**2Xc_Pass --s','hared/-dynamic to the linker (BeOS, Darwin, FreeBSD, L'+
+  '**2Xc_Pass --shared/-dynamic ','to the linker (BeOS, Darwin, FreeBSD, L'+
   'inux)'#010+
   '**2Xd_Do not search default library path (sometimes required for cross'+
   '-compiling when not using -XR)'#010+
   '**2Xe_Use external linker'#010+
-  '**2Xf_Substitute pthread library name for linking (BS','D)'#010+
-  '**2Xg_Create debuginfo in a separate file and add a debuglink section '+
-  'to executable'#010+
+  '**2Xf_Substitute pthread library name for linking (BSD)'#010+
+  '**2Xg_Create',' debuginfo in a separate file and add a debuglink sectio'+
+  'n to executable'#010+
   '**2XD_Try to link units dynamically      (defines FPC_LINK_DYNAMIC)'#010+
   '**2Xi_Use internal linker'#010+
-  'L*2XlS<x>_LLVM utilties suffix (e.g. -7 in case clang is ca','lled clan'+
-  'g-7)'#010+
-  '**2XLA_Define library substitutions for linking'#010+
+  'L*2XlS<x>_LLVM utilties suffix (e.g. -7 in case clang is called clang-'+
+  '7)'#010+
+  '*','*2XLA_Define library substitutions for linking'#010+
   '**2XLO_Define order of library linking'#010+
   '**2XLD_Exclude default order of standard libraries'#010+
   '**2Xm_Generate link map'#010+
   '**2XM<x>_Set the name of the '#039'main'#039' program routine (default i'+
-  's ',#039'main'#039')'#010+
-  '**2Xn_Use target system native linker instead of GNU ld (Solaris, AIX)'+
-  #010+
+  's '#039'main'#039')'#010+
+  '**2Xn_U','se target system native linker instead of GNU ld (Solaris, AI'+
+  'X)'#010+
   'F*2Xp<x>_First search for the compiler binary in the directory <x>'#010+
   '**2XP<x>_Prepend the binutils names with the prefix <x>'#010+
-  '**2Xr<x>_Set the linker'#039's rlink-path t','o <x> (needed for cross co'+
+  '**2Xr<x>_Set the linker'#039's rlink-path to <x> (needed f','or cross co'+
   'mpile, see the ld manual for more information) (BeOS, Linux)'#010+
   '**2XR<x>_Prepend <x> to all linker search paths (BeOS, Darwin, FreeBSD'+
   ', Linux, Mac OS, Solaris)'#010+
   '**2Xs_Strip all symbols from executable'#010+
-  '**2XS_Try to link',' units statically (default, defines FPC_LINK_STATIC'+
+  '**2XS_Try to link units statical','ly (default, defines FPC_LINK_STATIC'+
   ')'#010+
   '**2Xt_Link with static libraries (-static is passed to linker)'#010+
+  '**2Xu_Generate executable in UF2 format  (embedded targets only)'#010+
   '**2Xv_Generate table for Virtual Entry calls'#010+
-  '**2XV_Use VLink as external linker       (default on Amiga, MorphOS)'#010+
-  '**2XX_Try ','to smartlink units             (defines FPC_LINK_SMART)'#010+
+  '**2XV_Use VLink as external l','inker       (default on Amiga, MorphOS)'+
+  #010+
+  '**2XX_Try to smartlink units             (defines FPC_LINK_SMART)'#010+
   '**1*_'#010+
   '**1?_Show this help'#010+
   '**1h_Shows this help without waiting'

+ 1 - 2
compiler/nadd.pas

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

+ 2 - 0
compiler/nbas.pas

@@ -706,8 +706,10 @@ implementation
 
 
     function tblocknode.simplify(forinline : boolean): tnode;
+{$ifdef break_inlining}
       var
         a : array[0..3] of tstatementnode;
+{$endif break_inlining}
       begin
         result := nil;
         { Warning: never replace a blocknode with another node type,

+ 0 - 1
compiler/ncginl.pas

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

+ 1 - 1
compiler/ncgvmt.pas

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

+ 6 - 3
compiler/nflw.pas

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

+ 8 - 15
compiler/ogomf.pas

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

+ 12 - 0
compiler/options.pas

@@ -2791,6 +2791,18 @@ begin
                       end;
                     't' :
                       include(init_settings.globalswitches,cs_link_staticflag);
+                    'u' :
+                      begin
+                        if target_info.system in systems_support_uf2 then
+                          begin
+                            if UnsetBool(More, j, opt, false) then
+                              exclude(init_settings.globalswitches,cs_generate_uf2)
+                            else
+                              include(init_settings.globalswitches,cs_generate_uf2);
+                          end
+                        else
+                          IgnoredPara('-Xu');
+                      end;
                     'v' :
                       begin
                         If UnsetBool(More, j, opt, false) then

+ 0 - 2
compiler/optloop.pas

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

+ 1 - 7
compiler/pgenutil.pas

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

+ 11 - 3
compiler/psabiehpi.pas

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

+ 1 - 1
compiler/psub.pas

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

+ 9 - 5
compiler/rgobj.pas

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

+ 0 - 2
compiler/scandir.pas

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

+ 2 - 0
compiler/symdef.pas

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

+ 2 - 0
compiler/systems.pas

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

+ 0 - 2
compiler/systems/t_bsd.pas

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

+ 2 - 3
compiler/systems/t_darwin.pas

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

+ 110 - 8
compiler/systems/t_embed.pas

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

+ 5 - 5
compiler/systems/t_freertos.pas

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

+ 2 - 0
compiler/systems/t_win.pas

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

+ 0 - 3
compiler/systems/t_win16.pas

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

+ 104 - 104
compiler/utils/Makefile

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

+ 1 - 1
compiler/utils/Makefile.fpc

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

+ 88 - 2
compiler/utils/mkx86inl.pp

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

+ 32 - 1
compiler/utils/mkz80ins.pp

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

+ 38 - 22
compiler/utils/msg2inc.pp

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

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

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

+ 1 - 1
compiler/verbose.pas

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

+ 17 - 6
compiler/x86/aasmcpu.pas

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

+ 2 - 4
compiler/x86/agx86nsm.pas

@@ -53,7 +53,9 @@ interface
       private
         FSections: TFPHashObjectList;
         FGroups: TFPHashObjectList;
+{$ifndef i8086}
         using_relative : boolean;
+{$endif i8086}
         function CodeSectionName(const aname:string): string;
         procedure WriteReference(var ref : treference);
         procedure WriteOper(const o:toper;s : topsize; opcode: tasmop;ops:longint;dest : boolean);
@@ -681,10 +683,6 @@ interface
       end;
 
     procedure TX86NasmAssembler.WriteGroups;
-      {$ifdef i8086}
-      var
-        i: Integer;
-      {$endif i8086}
       begin
 {$ifdef i8086}
         if target_info.system in [system_i8086_msdos,system_i8086_win16,system_i8086_embedded] then

+ 10 - 11
compiler/x86/aoptx86.pas

@@ -1654,9 +1654,6 @@ unit aoptx86;
 
     { Replaces all references to AOldReg in a memory reference to ANewReg }
     class function TX86AsmOptimizer.ReplaceRegisterInRef(var ref: TReference; const AOldReg, ANewReg: TRegister): Boolean;
-      var
-        OldSupReg: TSuperRegister;
-        OldSubReg, MemSubReg: TSubRegister;
       begin
         Result := False;
         { For safety reasons, only check for exact register matches }
@@ -1681,7 +1678,7 @@ unit aoptx86;
     class function TX86AsmOptimizer.ReplaceRegisterInOper(const p: taicpu; const OperIdx: Integer; const AOldReg, ANewReg: TRegister): Boolean;
       var
         OldSupReg, NewSupReg: TSuperRegister;
-        OldSubReg, NewSubReg, MemSubReg: TSubRegister;
+        OldSubReg, NewSubReg: TSubRegister;
         OldRegType: TRegisterType;
         ThisOper: POper;
       begin
@@ -1839,7 +1836,6 @@ unit aoptx86;
     function TX86AsmOptimizer.DeepMOVOpt(const p_mov: taicpu; const hp: taicpu): Boolean;
       var
         CurrentReg, ReplaceReg: TRegister;
-        SubReg: TSubRegister;
       begin
         Result := False;
 
@@ -3210,8 +3206,7 @@ unit aoptx86;
 
     function TX86AsmOptimizer.OptPass1LEA(var p : tai) : boolean;
       var
-        hp1, hp2, hp3: tai;
-        l : ASizeInt;
+        hp1: tai;
         ref: Integer;
         saveref: treference;
         TempReg: TRegister;
@@ -5686,13 +5681,15 @@ unit aoptx86;
 
     function TX86AsmOptimizer.OptPass2Jcc(var p : tai) : boolean;
       var
-        hp1,hp2,hp3,hp4,hpmov2: tai;
-        carryadd_opcode : TAsmOp;
+        hp1,hp2: tai;
+{$ifndef i8086}
+        hp3,hp4,hpmov2: tai;
         l : Longint;
         condition : TAsmCond;
+{$endif i8086}
+        carryadd_opcode : TAsmOp;
         symbol: TAsmSymbol;
         reg: tsuperregister;
-        regavailable: Boolean;
         increg, tmpreg: TRegister;
       begin
         result:=false;
@@ -7072,12 +7069,14 @@ unit aoptx86;
 
 
     function TX86AsmOptimizer.PostPeepholeOptPush(var p : tai) : Boolean;
+{$ifdef x86_64}
       var
         hp1, hp2, hp3, hp4, hp5: tai;
+{$endif x86_64}
       begin
         Result:=false;
-        hp5:=nil;
 {$ifdef x86_64}
+        hp5:=nil;
         { replace
             push %rax
             call   procname

+ 10 - 2
compiler/x86/cgx86.pas

@@ -445,13 +445,17 @@ unit cgx86;
 
     procedure tcgx86.make_simple_ref(list:TAsmList;var ref: treference;isdirect:boolean);
       var
+{$ifndef i8086}
         hreg : tregister;
+{$endif i8086}
         href : treference;
-{$ifndef x86_64}
+{$ifdef i386}
         add_hreg: boolean;
-{$endif not  x86_64}
+{$endif i386}
       begin
+{$ifndef i8086}
         hreg:=NR_NO;
+{$endif i8086}
         { make_simple_ref() may have already been called earlier, and in that
           case make sure we don't perform the PIC-simplifications twice }
         if (ref.refaddr in [addr_pic,addr_pic_no_got]) then
@@ -1083,7 +1087,9 @@ unit cgx86;
     procedure tcgx86.a_loadaddr_ref_reg(list : TAsmList;const ref : treference;r : tregister);
       var
         dirref,tmpref : treference;
+{$ifndef i8086}
         tmpreg : TRegister;
+{$endif i8086}
       begin
         dirref:=ref;
 
@@ -3231,10 +3237,12 @@ unit cgx86;
 
 {$ifdef x86}
 {$ifndef NOTARGETWIN}
+{$ifndef i8086}
       var
         href : treference;
         i : integer;
         again : tasmlabel;
+{$endif i8086}
 {$endif NOTARGETWIN}
 {$endif x86}
       begin

+ 2 - 2
compiler/x86/cx86mminnr.inc

@@ -499,5 +499,5 @@
   in_x86_pcmpistrm = in_x86_mm_first+498,
   in_x86_pcmpistrm_from_mem = in_x86_mm_first+499,
   in_x86_pcmpgtq = in_x86_mm_first+500,
-  in_x86_pcmpgtq_from_mem = in_x86_mm_first+501,
-  in_x86mm_last = in_x86_mm_first+501
+  in_x86_pcmpgtq_from_mem = in_x86_mm_first+501
+

+ 4 - 0
compiler/x86/nx86inl.pas

@@ -1144,6 +1144,7 @@ implementation
 
 
     procedure tx86inlinenode.second_fma;
+{$ifndef i8086}
       const
         op : array[false..true,false..true,s32real..s64real,0..3] of TAsmOp =
           (
@@ -1178,6 +1179,7 @@ implementation
         negop3,
         negproduct,
         gotmem : boolean;
+{$endif i8086}
       begin
 {$ifndef i8086}
          if (cpu_capabilities[current_settings.cputype]*[CPUX86_HAS_FMA,CPUX86_HAS_FMA4])<>[] then
@@ -1444,6 +1446,7 @@ implementation
 
 
     procedure tx86inlinenode.second_minmax;
+{$ifndef i8086}
       const
         oparray : array[false..true,false..true,s32real..s64real] of TAsmOp =
           (
@@ -1463,6 +1466,7 @@ implementation
         i : integer;
         gotmem : boolean;
         op: TAsmOp;
+{$endif i8086}
       begin
 {$ifndef i8086}
          if

+ 0 - 4
compiler/x86/nx86mat.pas

@@ -164,10 +164,6 @@ interface
 
 
     procedure tx86unaryminusnode.second_float;
-      var
-        reg : tregister;
-        href : treference;
-        l1 : tasmlabel;
       begin
         secondpass(left);
 

+ 1 - 1
compiler/x86/nx86set.pas

@@ -420,7 +420,7 @@ implementation
            start,stop : byte;    {Start/stop when range; Stop=element when an element.}
          end;
        var
-         hreg,hreg2,
+         hreg,{$ifndef i8086} hreg2, {$endif}
          pleftreg   : tregister;
          opsize     : tcgsize;
          opdef      : torddef;

+ 0 - 2
compiler/x86/rax86.pas

@@ -1475,8 +1475,6 @@ procedure Tx86Instruction.SetInstructionOpsize;
     end;
   end;
 
-var
-  isBCastMemRef: boolean;
 begin
   if opsize<>S_NO then
    exit;

+ 14 - 2
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -92,7 +92,8 @@ type
     procedure GetFloat(CurrBuff, Buffer : pointer; Size : Byte);
     procedure SetFloat(CurrBuff: pointer; Dbl: Double; Size: integer);
 
-    procedure CheckError(ProcName : string; Status : PISC_STATUS);
+    procedure CheckError(ProcName : string; Status : PISC_STATUS;IgnoreErrors : Array of Longint); overload;
+    procedure CheckError(ProcName : string; Status : PISC_STATUS); overload;
     procedure SetParameters(cursor : TSQLCursor; aTransation : TSQLTransaction; AParams : TParams);
     procedure FreeSQLDABuffer(var aSQLDA : PXSQLDA);
     function  IsDialectStored: boolean;
@@ -170,6 +171,12 @@ const
   INVALID_DATA = -1;
 
 procedure TIBConnection.CheckError(ProcName : string; Status : PISC_STATUS);
+
+begin
+  CheckError(ProcName,Status,[]);
+end;
+
+procedure TIBConnection.CheckError(ProcName : string; Status : PISC_STATUS; IgnoreErrors : Array of Longint);
 var
   i,ErrorCode : longint;
   Msg, SQLState : string;
@@ -181,6 +188,10 @@ begin
   if ((Status[0] = 1) and (Status[1] <> 0)) then
     begin
     ErrorCode := Status[1];
+    if Length(IgnoreErrors)>0 then
+      for I in IgnoreErrors do
+        if I=ErrorCode then
+          Exit;
 {$IFDEF LinkDynamically}
     if assigned(fb_sqlstate) then // >= Firebird 2.5
     begin
@@ -967,7 +978,8 @@ begin
     if FSelectable and (CursorName<>'') then
       begin
       if isc_dsql_free_statement(@Status, @StatementHandle, DSQL_close)<>0 then
-        CheckError('Close Cursor', Status); // Ignore this, it can already be closed.
+        // If transaction was closed (keepOpenOnCommit, then the cursor is already closed.
+        CheckError('Close Cursor', Status, [335544577]); 
       end;
     end;
 end;

+ 1 - 1
packages/fcl-db/src/sqldb/mysql/mysqlconn.inc

@@ -1058,7 +1058,7 @@ begin
     Result := 0
   else
     Result := EncodeDate(EY, EM, ED);
-  Result := ComposeDateTime(Result, EncodeTime(EH, EN, ES, EMS));
+  Result := ComposeDateTime(Result, EncodeTimeInterval(EH, EN, ES, EMS));
 end;
 
 function TConnectionName.InternalStrToTime(C: pchar; Len: integer): TDateTime;

+ 1 - 2
packages/fcl-registry/fpmake.pp

@@ -46,8 +46,7 @@ begin
     T:=P.Targets.AddUnit('xmlreg.pp');
 
     P.ExamplePath.Add('examples');
-    P.Targets.AddExampleProgram('tests/testbasics.pp');
-    P.Targets.AddExampleProgram('tests/regtestframework.pp');
+    P.Targets.AddExampleProgram('tests/tregtestframework.pp');
     // 'tests/Makefile
     // 'tests/Makefile.fpc
 

+ 104 - 104
packages/fcl-registry/tests/Makefile

@@ -350,319 +350,319 @@ endif
 override PACKAGE_NAME=fcl
 PACKAGEDIR_MAIN:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /fcl/Makefile.fpc,$(PACKAGESDIR))))))
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-nativent)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-iphonesim)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-android)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i386-aros)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-macosclassic)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),m68k-sinclairql)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-macosclassic)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-wii)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc-aix)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-haiku)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-netbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-solaris)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-openbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-iphonesim)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-android)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-aros)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),x86_64-dragonfly)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-netbsd)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-android)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-aros)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-freertos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),arm-ios)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),powerpc64-aix)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),mips-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),mipsel-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),mipsel-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),mipsel-android)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),mips64el-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),jvm-java)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),jvm-android)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i8086-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i8086-msdos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),i8086-win16)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),aarch64-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),aarch64-darwin)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),aarch64-win64)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),aarch64-android)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),aarch64-ios)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),wasm32-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),wasm32-wasi)
 override TARGET_EXAMPLES+=regtestframework
 endif
 ifeq ($(FULL_TARGET),sparc64-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),riscv32-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),riscv32-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),riscv64-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),riscv64-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),xtensa-linux)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),xtensa-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),xtensa-freertos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),z80-embedded)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),z80-zxspectrum)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),z80-msxdos)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 ifeq ($(FULL_TARGET),z80-amstradcpc)
-override TARGET_EXAMPLES+=regtestframework
+override TARGET_EXAMPLES+=tregtestframework
 endif
 override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR

+ 2 - 2
packages/fcl-registry/tests/Makefile.fpc

@@ -1,12 +1,12 @@
 #
-#   Makefile.fpc for DB TestFramework
+#   Makefile.fpc for Registry TestFramework
 #
 
 [package]
 main=fcl
 
 [target]
-examples=regtestframework
+examples=tregtestframework
 
 [install]
 fpcpackage=y

+ 2 - 1
packages/fcl-registry/tests/tcxmlreg.pp → packages/fcl-registry/tests/regtcxmlreg.pp

@@ -1,4 +1,4 @@
-unit tcxmlreg;
+unit regtcxmlreg;
 
 {$mode objfpc}{$H+}
 
@@ -39,6 +39,7 @@ end;
 procedure TTestXMLRegistry.TearDown;
 begin
   FreeAndNil(FXMLReg);
+  DeleteFile('test.xml');
   inherited TearDown;
 end;
 

+ 2 - 2
packages/fcl-registry/tests/testbasics.pp → packages/fcl-registry/tests/regtestbasics.pp

@@ -1,4 +1,4 @@
-unit TestBasics;
+unit RegTestBasics;
 
 {$IFDEF FPC}
   {$mode objfpc}{$H+}
@@ -266,7 +266,7 @@ begin
     AssertTrue(format('OpenKey(''%s'') failed.',[Base]),B);
 
     B := R.DeleteKey('One');
-    AssertFalse(format('DeleteKey(''%s'') should have failed, but it succeeded.',[OneFull]),B);
+    AssertTrue(format('DeleteKey(''%s'') should have succeeded, but it failed.',[OneFull]),B);
   finally
     R.Free;
     CleanUp(ExceptObject <> nil);

+ 1 - 1
tests/test/packages/fcl-registry/tregistry2.pp → packages/fcl-registry/tests/tregistry2.pp

@@ -1,4 +1,4 @@
-{ %TARGET=win32,win64,wince,linux }
+{ %TARGET=win32,win64,wince,linux,solaris,openbsd }
 
 {
   This unit tests mostly TRegIniFile to work properly and be Delphi compatible.

+ 35 - 34
packages/fcl-registry/tests/regtestframework.pp → packages/fcl-registry/tests/tregtestframework.pp

@@ -1,34 +1,35 @@
-program regtestframework;
-
-{$IFDEF FPC}
-{$mode objfpc}{$H+}
-{$ENDIF}
-
-{$IFDEF WINDOWS}
-{$APPTYPE CONSOLE}
-{$ENDIF}
-
-uses
-  {$ifdef unix}
-  cwstring,
-  {$endif}
-  SysUtils,
-  fpcunit,  testreport, testregistry, consoletestrunner,
-// Units wich contains the tests
-  tcxmlreg,
-  testbasics;
-
-Var
-  A : TTestRunner;
-
-begin
-  DefaultFormat:=fPlain;
-  DefaultRunAllTests:=True;
-  A:=TTestRunner.Create(Nil);
-  try
-    A.Initialize;
-    A.Run;
-  finally
-    A.Free;
-  end;
-end.
+{ %TARGET=win32,win64,wince,linux,solaris,openbsd }
+program tregtestframework;
+
+{$IFDEF FPC}
+{$mode objfpc}{$H+}
+{$ENDIF}
+
+{$IFDEF WINDOWS}
+{$APPTYPE CONSOLE}
+{$ENDIF}
+
+uses
+  {$ifdef unix}
+  cwstring,
+  {$endif}
+  SysUtils,
+  fpcunit,  testreport, testregistry, consoletestrunner,
+// Units wich contains the tests
+  regtcxmlreg,
+  regtestbasics;
+
+Var
+  A : TTestRunner;
+
+begin
+  DefaultFormat:=fPlain;
+  DefaultRunAllTests:=True;
+  A:=TTestRunner.Create(Nil);
+  try
+    A.Initialize;
+    A.Run;
+  finally
+    A.Free;
+  end;
+end.

+ 44 - 10
packages/fcl-stl/src/gdeque.pp

@@ -31,6 +31,10 @@ type
     function GetValue(position:SizeUInt):T;inline;
     function GetMutable(position:SizeUInt):PT;inline;
     procedure IncreaseCapacity();
+  protected
+    procedure MoveSimpleData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
+    procedure MoveManagedData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
+    procedure MoveData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
   public
     function Size():SizeUInt;inline;
     constructor Create();
@@ -127,6 +131,8 @@ end;
 procedure TDeque.SetValue(position:SizeUInt; value:T);inline;
 begin
   Assert(position < size, 'Deque access out of range');
+  if IsManagedType(T) then
+    Finalize(FData[(FStart+position)mod FCapacity]);
   FData[(FStart+position)mod FCapacity]:=value;
 end;
 
@@ -142,6 +148,40 @@ begin
   GetMutable:=@FData[(FStart+position) mod FCapacity];
 end;
 
+
+
+procedure TDeque.MoveSimpleData(StartIndex: SizeUInt; Offset: SizeInt;  NrElems: SizeUInt);
+begin
+  Move(FData[StartIndex], FData[StartIndex+Offset], NrElems*SizeOf(T));
+  if Offset>0 then
+    FillChar(FData[StartIndex], NrElems*SizeOf(T), 0)
+  else
+    FillChar(FData[StartIndex+NrElems+Offset], -Offset*SizeOf(T), 0);
+end;
+
+procedure TDeque.MoveManagedData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
+var
+  i: SizeUInt;
+begin
+  //since we always move blocks where Abs(Offset)>=NrElems, there is no need for
+  //2 seperate loops (1 for ngeative and 1 for positive Offsett)
+  for i := 0 to NrElems-1 do
+  begin
+    Finalize(FData[StartIndex+i+Offset]);
+    FData[StartIndex+i+Offset] := FData[StartIndex+i];
+    Finalize(FData[StartIndex+i]);
+    FillChar(FData[StartIndex+i], SizeOf(T), 0);
+  end;
+end;
+
+procedure TDeque.MoveData(StartIndex: SizeUInt; Offset: SizeInt; NrElems: SizeUInt);
+begin
+  if IsManagedType(T) then
+    MoveManagedData(StartIndex, Offset, NrElems)
+  else
+    MoveSimpleData(StartIndex, Offset, NrElems);
+end;
+
 procedure TDeque.IncreaseCapacity;
   function Min(const A,B: SizeUInt): SizeUInt; inline; //no need to drag in the entire Math unit ;-)
   begin
@@ -177,11 +217,7 @@ begin
   begin
     if (FCapacity-OldEnd>=FStart) then //we have room to move all items in one go
     begin
-      if IsManagedType(T) then
-        for i:=0 to FStart-1 do
-          FData[OldEnd+i]:=FData[i]
-      else
-        Move(FData[0], FData[OldEnd], FStart*SizeOf(T));
+      MoveData(0, OldEnd ,FStart)
     end
     else
     begin  //we have to move things around in chunks: we have more data in front of FStart than we have newly created unused elements
@@ -189,11 +225,9 @@ begin
       EmptyElems:=FCapacity-1-CurLast;
       while (FStart>0) do
       begin
-        Elems:=Min(EmptyElems, FStart);
-        for i:=0 to Elems-1 do
-          FData[CurLast+1+i]:=FData[i];
-        for i := 0 to FCapacity-Elems-1 do
-          FData[i]:=FData[Elems+i];
+        Elems := Min(EmptyElems, FStart);
+        MoveData(0, CurLast+1, Elems);
+        MoveData(Elems, -Elems, FCapacity-Elems);
         Dec(FStart, Elems);
       end;
     end;

+ 1 - 1
packages/rtl-objpas/src/inc/dateutil.inc

@@ -1885,7 +1885,7 @@ end;
 
 function TryEncodeTimeInterval(Hour, Min, Sec, MSec: word; out Time: TDateTime): boolean;
 begin
- Result:= (Min<60) and (Sec<60) and (MSec<1000);
+ Result:= (Min<60) and (Sec<60) and (MSec<=1000);
  If Result then
    Time:=TDateTime(cardinal(Hour)*3600000+cardinal(Min)*60000+cardinal(Sec)*1000+MSec)/MSecsPerDay;
 end;

+ 7 - 3
rtl/objpas/sysutils/syshelpo.inc

@@ -1,8 +1,12 @@
 
 Class Function TORDINALHELPER.Parse(const AString: string): TORDINALTYPE; inline; static;
 
+var
+  Error: Integer;
 begin
-  Result:=StrToInt(AString);
+  Val(AString,Result,Error);
+  if Error<>0 then
+    raise EConvertError.CreateFmt(SInvalidInteger,[AString]);
 end;
 
 Class Function TORDINALHELPER.Size: Integer; inline; static;
@@ -14,7 +18,7 @@ end;
 Class Function TORDINALHELPER.ToString(const AValue: TORDINALTYPE): string; overload; inline; static;
 
 begin
-  Result:=IntToStr(AValue);
+  Str(AValue,Result);
 end;
 
 Class Function TORDINALHELPER.TryParse(const AString: string; out AValue: TORDINALTYPE): Boolean; inline; static;
@@ -73,7 +77,7 @@ end;
 Function TORDINALHELPER.ToString: string; overload; inline;
 
 begin
-  Result:=IntToStr(Self);
+  Str(Self,Result);
 end;
 
 Function TORDINALHELPER.SetBit(const index: TORDINALBITINDEX) : TORDINALTYPE; inline;

+ 1 - 1
tests/Makefile

@@ -2431,7 +2431,7 @@ TESTDIRECTDIRS=
 TESTSUBDIRS=cg cg/variants cg/cdecl cpu16 cpu16/i8086 library opt $(addprefix units/,$(TESTUNITDIRS))
 TESTPACKAGESDIRS=win-base webtbs hash fcl-registry fcl-process zlib fcl-db fcl-xml cocoaint bzip2
 TESTPACKAGESUBDIRS=$(addprefix packages/,$(TESTPACKAGESDIRS))
-TESTPACKAGESDIRECTDIRS=rtl-objpas rtl-generics hash regexpr
+TESTPACKAGESDIRECTDIRS=rtl-objpas rtl-generics hash regexpr fcl-registry
 TESTPACKAGESDIRECTSUBDIRS=$(addprefix ../packages/,$(addsuffix /tests,$(TESTPACKAGESDIRECTDIRS)))
 ifdef QUICKTEST
 export QUICKTEST

+ 1 - 1
tests/Makefile.fpc

@@ -164,7 +164,7 @@ TESTDIRECTDIRS=
 TESTSUBDIRS=cg cg/variants cg/cdecl cpu16 cpu16/i8086 library opt $(addprefix units/,$(TESTUNITDIRS))
 TESTPACKAGESDIRS=win-base webtbs hash fcl-registry fcl-process zlib fcl-db fcl-xml cocoaint bzip2
 TESTPACKAGESUBDIRS=$(addprefix packages/,$(TESTPACKAGESDIRS))
-TESTPACKAGESDIRECTDIRS=rtl-objpas rtl-generics hash regexpr
+TESTPACKAGESDIRECTDIRS=rtl-objpas rtl-generics hash regexpr fcl-registry
 TESTPACKAGESDIRECTSUBDIRS=$(addprefix ../packages/,$(addsuffix /tests,$(TESTPACKAGESDIRECTDIRS)))
 
 ifdef QUICKTEST

+ 10 - 1
tests/test/theapthread.pp

@@ -15,12 +15,14 @@ type
   tpair = class;
 
   tproducethread = class(tthread)
+    running: boolean;
     pair: tpair;
     constructor create(apair: tpair);
     procedure execute; override;
   end;
 
   tconsumethread = class(tthread)
+    running: boolean;
     pair: tpair;
     constructor create(apair: tpair);
     procedure execute; override;
@@ -197,11 +199,13 @@ end;
 
 procedure tproducethread.execute;
 begin
+  running:=true;
   producer(pair);
 end;
 
 procedure tconsumethread.execute;
 begin
+  running:=true;
   consumer(pair);
 end;
 
@@ -221,7 +225,12 @@ begin
       pairs[i] := tpair.create;
     for i := low(pairs) to high(pairs) do
       pairs[i].resume;
-    sleep(1500);
+
+    { wait till all threads are really resumed }
+    for i :=  low(pairs) to high(pairs) do
+      while not(pairs[i].produce_thread.running) or not(pairs[i].consume_thread.running) do
+        sleep(100);
+
     done := true;
     for i := low(pairs) to high(pairs) do
     begin

+ 41 - 0
tests/webtbs/tw38385.pp

@@ -0,0 +1,41 @@
+{ %norun }
+Unit tw38385;
+
+{$mode objfpc}{$H+}
+
+Interface
+
+Uses
+  uw38385a, uw38385b, uw38385c;
+
+Type
+
+  { TFoo }
+
+  TFoo = Class(TInterfacedObject, uw38385a.IInterface1, uw38385b.IInterface1, uw38385c.IInterface1)
+    Procedure p1();
+    Procedure p2();
+    Procedure p3();
+  End;
+
+Implementation
+
+{ TFoo }
+
+Procedure TFoo.p1();
+Begin
+  WriteLn('p1');
+End;
+
+Procedure TFoo.p2();
+Begin
+  WriteLn('p2');
+End;
+
+Procedure TFoo.p3();
+Begin
+  WriteLn('p3');
+End;
+
+End.
+

+ 23 - 0
tests/webtbs/tw38390.pp

@@ -0,0 +1,23 @@
+program tw38390;
+{$MODE Delphi}
+uses SysUtils;
+
+var
+  s: String;
+  x: UInt64;
+
+begin
+  s := '20000000000';
+  x := UInt64.Parse(s);
+  WriteLn(x);
+  if x <> 20000000000 then
+    Halt(1);
+  UInt64.TryParse(s, x);
+  WriteLn(x);
+  if x <> 20000000000 then
+    Halt(2);
+  x := StrToQWord(s);
+  WriteLn(x);
+  if x <> 20000000000 then
+    Halt(3);
+end.

+ 17 - 0
tests/webtbs/uw38385a.pp

@@ -0,0 +1,17 @@
+Unit uw38385a;
+
+{$mode objfpc}{$H+}
+
+Interface
+
+Type
+  IInterface1 = Interface(IInterface)
+    Procedure p1();
+  End;
+
+Implementation
+
+
+
+End.
+

+ 18 - 0
tests/webtbs/uw38385b.pp

@@ -0,0 +1,18 @@
+unit uw38385b;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  uw38385a;
+
+type
+   IInterface1 = Interface(uw38385a.IInterface1)
+    Procedure p2();
+  End;
+
+implementation
+
+end.
+

+ 18 - 0
tests/webtbs/uw38385c.pp

@@ -0,0 +1,18 @@
+Unit uw38385c;
+
+{$mode objfpc}{$H+}
+
+Interface
+
+Uses
+  uw38385a;
+
+Type
+  IInterface1 = Interface(uw38385a.IInterface1)
+    Procedure p3();
+  End;
+
+Implementation
+
+End.
+