Browse Source

Merge branch 'fixes_3_2' into release_3_2_4-branch

florian 10 months ago
parent
commit
cd84c2d5cd
3 changed files with 11 additions and 5 deletions
  1. 3 3
      compiler/ncgflw.pas
  2. 3 1
      compiler/nflw.pas
  3. 5 1
      rtl/linux/ostypes.inc

+ 3 - 3
compiler/ncgflw.pas

@@ -131,7 +131,7 @@ implementation
       fmodule,
       fmodule,
       cpubase,
       cpubase,
       tgobj,paramgr,
       tgobj,paramgr,
-      cgobj,hlcgobj,nutils
+      cgobj,hlcgobj,nutils,node
       ;
       ;
 
 
 {*****************************************************************************
 {*****************************************************************************
@@ -512,8 +512,8 @@ implementation
     procedure tcglabelnode.pass_generate_code;
     procedure tcglabelnode.pass_generate_code;
       begin
       begin
          location_reset(location,LOC_VOID,OS_NO);
          location_reset(location,LOC_VOID,OS_NO);
-
-         include(flowcontrol,fc_gotolabel);
+         if not (nf_internal in flags) then
+           include(flowcontrol,fc_gotolabel);
 {$ifdef OLDREGVARS}
 {$ifdef OLDREGVARS}
          load_all_regvars(current_asmdata.CurrAsmList);
          load_all_regvars(current_asmdata.CurrAsmList);
 {$endif OLDREGVARS}
 {$endif OLDREGVARS}

+ 3 - 1
compiler/nflw.pas

@@ -2118,7 +2118,8 @@ implementation
         result:=nil;
         result:=nil;
         expectloc:=LOC_VOID;
         expectloc:=LOC_VOID;
 
 
-        include(current_procinfo.flags,pi_has_label);
+        if not (nf_internal in flags) then
+          include(current_procinfo.flags,pi_has_label);
 
 
         if assigned(labsym) and labsym.nonlocal then
         if assigned(labsym) and labsym.nonlocal then
           begin
           begin
@@ -2223,6 +2224,7 @@ implementation
               begin
               begin
                 third:=cinlinenode.create(in_get_frame,false,nil);
                 third:=cinlinenode.create(in_get_frame,false,nil);
                 current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
                 current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
+                current_addr.toggleflag(nf_internal);
                 addstatement(statements,current_addr);
                 addstatement(statements,current_addr);
                 right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
                 right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
               end;
               end;

+ 5 - 1
rtl/linux/ostypes.inc

@@ -75,14 +75,18 @@ TYPE
 { include /include/asm-<cpu>/posix-types.h                       }
 { include /include/asm-<cpu>/posix-types.h                       }
 
 
 const
 const
-{$ifndef cpux86_64}
+{$if not defined(cpux86_64) and not defined (cpuaarch64)}
   _STAT_VER_LINUX_OLD = 1;
   _STAT_VER_LINUX_OLD = 1;
   _STAT_VER_KERNEL = 1;
   _STAT_VER_KERNEL = 1;
   _STAT_VER_SVR4 = 2;
   _STAT_VER_SVR4 = 2;
   _STAT_VER_LINUX = 3;
   _STAT_VER_LINUX = 3;
 {$else}
 {$else}
   _STAT_VER_KERNEL = 0;
   _STAT_VER_KERNEL = 0;
+{$if defined(cpuaarch64)}
+  _STAT_VER_LINUX = 0;
+{$else}
   _STAT_VER_LINUX = 1;
   _STAT_VER_LINUX = 1;
+{$endif}
 {$endif}
 {$endif}
   _STAT_VER = _STAT_VER_LINUX;
   _STAT_VER = _STAT_VER_LINUX;