From 7bd7cf275c84fd9b26d22b350449ee231073106a Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 18 Oct 2012 09:44:11 +0000 Subject: [PATCH] handle po_nostackframe for calc_stack_size git-svn-id: trunk@22718 - --- compiler/mips/cpupi.pas | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/compiler/mips/cpupi.pas b/compiler/mips/cpupi.pas index 0395503c36..e35dbacfa1 100644 --- a/compiler/mips/cpupi.pas +++ b/compiler/mips/cpupi.pas @@ -81,7 +81,7 @@ implementation { for testing } needs_frame_pointer := true;//false; computed_local_size:=-1; - { pi_needs_got is not yet set correctly + { pi_needs_got is not yet set correctly so include it always if creating PIC code } if (cs_create_pic in current_settings.moduleswitches) then begin @@ -101,8 +101,14 @@ implementation if tg.direction = -1 then tg.setfirsttemp(0) else - tg.setfirsttemp(maxpushedparasize+ - floatregssave*sizeof(aint)+intregssave*sizeof(aint)); + begin + if not (po_nostackframe in procdef.procoptions) then + tg.setfirsttemp(Align(maxpushedparasize+ + floatregssave*sizeof(aint)+intregssave*sizeof(aint) + ,max(current_settings.alignment.localalignmin,8))) + else + tg.setfirsttemp(align(maxpushedparasize,max(current_settings.alignment.localalignmin,8))); + end; end;