* Xtensa: handle localsize > 32760

git-svn-id: trunk@44840 -
This commit is contained in:
florian 2020-04-19 08:41:32 +00:00
parent 7b2bd0b917
commit c2df0f2300
3 changed files with 19 additions and 1 deletions

View File

@ -619,6 +619,7 @@ implementation
regoffset : LongInt;
stack_parameters : Boolean;
registerarea : PtrInt;
l : TAsmLabel;
begin
LocalSize:=align(LocalSize,4);
stack_parameters:=current_procinfo.procdef.stack_tainting_parameter(calleeside);
@ -705,7 +706,22 @@ implementation
localsize:=align(localsize,current_settings.alignment.localalignmax);
end;
list.concat(taicpu.op_reg_const(A_ENTRY,NR_STACK_POINTER_REG,localsize));
if localsize>32760 then
begin
list.concat(taicpu.op_reg_const(A_ENTRY,NR_STACK_POINTER_REG,32));
reference_reset(ref,4,[]);
current_asmdata.getjumplabel(l);
cg.a_label(current_procinfo.aktlocaldata,l);
current_procinfo.aktlocaldata.concat(tai_const.Create_32bit(longint(localsize-32)));
ref.symbol:=l;
list.concat(taicpu.op_reg_ref(A_L32R,NR_A8,ref));
list.concat(taicpu.op_reg_reg_reg(A_SUB,NR_A8,NR_STACK_POINTER_REG,NR_A8));
list.concat(taicpu.op_reg_reg(A_MOVSP,NR_STACK_POINTER_REG,NR_A8));
end
else
list.concat(taicpu.op_reg_const(A_ENTRY,NR_STACK_POINTER_REG,localsize));
end;
else
Internalerror(2020031401);

View File

@ -28,6 +28,7 @@
'j',
'j.l',
'mov',
'movsp',
'mov.s',
'movnez',
'movi',

View File

@ -28,6 +28,7 @@ A_LSI,
A_J,
A_J_L,
A_MOV,
A_MOVSP,
A_MOV_S,
A_MOVNEZ,
A_MOVI,