Bläddra i källkod

* renamed abi_linux386_sysv to abi_i386_dynalignedstack, and also use it
for Darwin-based i386 platforms

git-svn-id: trunk@43650 -

Jonas Maebe 5 år sedan
förälder
incheckning
54d3c26e27

+ 1 - 1
compiler/i386/cpupi.pas

@@ -92,7 +92,7 @@ unit cpupi;
           from the stack at the end of the procedure (in the "ret $xx").
           from the stack at the end of the procedure (in the "ret $xx").
           If the stack is fixed, nothing has to be removed by the callee, except
           If the stack is fixed, nothing has to be removed by the callee, except
           if a 16 byte aligned stack on i386-linux is used     }
           if a 16 byte aligned stack on i386-linux is used     }
-        if paramanager.use_fixed_stack and not(target_info.abi=abi_linux386_sysv) then
+        if paramanager.use_fixed_stack and not(target_info.abi=abi_i386_dynalignedstack) then
           para_stack_size := 0;
           para_stack_size := 0;
       end;
       end;
 
 

+ 1 - 1
compiler/ncgcal.pas

@@ -1206,7 +1206,7 @@ implementation
            This does not apply to interrupt procedures, their ret statment never clears any stack parameters }
            This does not apply to interrupt procedures, their ret statment never clears any stack parameters }
          else if paramanager.use_fixed_stack and
          else if paramanager.use_fixed_stack and
                  not(po_interrupt in procdefinition.procoptions) and
                  not(po_interrupt in procdefinition.procoptions) and
-                 (target_info.abi=abi_linux386_sysv) then
+                 (target_info.abi=abi_i386_dynalignedstack) then
            begin
            begin
              { however, a delphi style frame pointer for a nested subroutine
              { however, a delphi style frame pointer for a nested subroutine
                is not cleared by the callee, so we have to compensate for this
                is not cleared by the callee, so we have to compensate for this

+ 1 - 1
compiler/ncgutil.pas

@@ -776,7 +776,7 @@ implementation
             parasize:=current_procinfo.para_stack_size;
             parasize:=current_procinfo.para_stack_size;
             { the parent frame pointer para has to be removed always by the caller in
             { the parent frame pointer para has to be removed always by the caller in
               case of Delphi-style parent frame pointer passing }
               case of Delphi-style parent frame pointer passing }
-            if (not(paramanager.use_fixed_stack) or (target_info.abi=abi_linux386_sysv)) and
+            if (not(paramanager.use_fixed_stack) or (target_info.abi=abi_i386_dynalignedstack)) and
                (po_delphi_nested_cc in current_procinfo.procdef.procoptions) then
                (po_delphi_nested_cc in current_procinfo.procdef.procoptions) then
               dec(parasize,sizeof(pint));
               dec(parasize,sizeof(pint));
           end;
           end;

+ 5 - 1
compiler/systems.inc

@@ -321,7 +321,11 @@
             ,abi_old_win32_gnu
             ,abi_old_win32_gnu
             ,abi_aarch64_darwin
             ,abi_aarch64_darwin
             ,abi_riscv_hf
             ,abi_riscv_hf
-            ,abi_linux386_sysv
+            { stack is aligned and all room for parameters is reserved on
+              entry, but depending on the calling convention, the parameters
+              may still be removed by the callee (and then the stack needs to
+              be restored by the caller) }
+            ,abi_i386_dynalignedstack
        );
        );
 
 
      const
      const

+ 2 - 2
compiler/systems/i_bsd.pas

@@ -874,7 +874,7 @@ unit i_bsd;
             first_parm_offset : 8;
             first_parm_offset : 8;
             stacksize   : 262144;
             stacksize   : 262144;
             stackalign   : 16;
             stackalign   : 16;
-            abi         : abi_default;
+            abi         : abi_i386_dynalignedstack;
             llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128';
             llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128';
           );
           );
 
 
@@ -943,7 +943,7 @@ unit i_bsd;
             first_parm_offset : 8;
             first_parm_offset : 8;
             stacksize   : 262144;
             stacksize   : 262144;
             stackalign   : 16;
             stackalign   : 16;
-            abi         : abi_default;
+            abi         : abi_i386_dynalignedstack;
             llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128';
             llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128';
           );
           );
 
 

+ 1 - 1
compiler/systems/i_linux.pas

@@ -101,7 +101,7 @@ unit i_linux;
             first_parm_offset : 8;
             first_parm_offset : 8;
             stacksize    : 8*1024*1024;
             stacksize    : 8*1024*1024;
             stackalign   : 16;
             stackalign   : 16;
-            abi : abi_linux386_sysv;
+            abi : abi_i386_dynalignedstack;
             { note: default LLVM stack alignment is 16 bytes for this target }
             { note: default LLVM stack alignment is 16 bytes for this target }
             llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
             llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
           );
           );