Browse Source

* improve call0 calling conventions

git-svn-id: trunk@46797 -
florian 5 năm trước cách đây
mục cha
commit
93eef547ae

+ 1 - 1
compiler/psub.pas

@@ -1173,7 +1173,7 @@ implementation
           with an internal error, so this switch is not enabled by default yet. To overcome this,
           with an internal error, so this switch is not enabled by default yet. To overcome this,
           multipass compilation of subroutines must be supported
           multipass compilation of subroutines must be supported
         }
         }
-        if (target_info.abi=abi_xtensa_windowed) and (procdef.stack_tainting_parameter(calleeside)) then
+        if procdef.stack_tainting_parameter(calleeside) then
           begin
           begin
             include(flags,pi_estimatestacksize);
             include(flags,pi_estimatestacksize);
             set_first_temp_offset;
             set_first_temp_offset;

+ 2 - 0
compiler/xtensa/cpupara.pas

@@ -158,6 +158,8 @@ unit cpupara;
             begin
             begin
               curintreg:=RS_A2;
               curintreg:=RS_A2;
               maxintreg:=RS_A7;
               maxintreg:=RS_A7;
+              if (side=calleeside) and (current_procinfo.framepointer=NR_STACK_POINTER_REG) then
+                cur_stack_offset:=(p as tcpuprocdef).total_stackframe_size;
             end;
             end;
           else
           else
             Internalerror(2020031404);
             Internalerror(2020031404);

+ 2 - 1
compiler/xtensa/cpupi.pas

@@ -84,7 +84,8 @@ unit cpupi;
             callins:=A_CALL0;
             callins:=A_CALL0;
             callxins:=A_CALLX0;
             callxins:=A_CALLX0;
             maxcall:=0;
             maxcall:=0;
-            framepointer:=NR_FRAME_POINTER_REG;
+            { we do not use a frame pointer }
+            framepointer:=NR_STACK_POINTER_REG;
           end;
           end;
       end;
       end;