mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-05 12:06:01 +02:00
Do not modify $sp inside function body for mipscpu
git-svn-id: trunk@21536 -
This commit is contained in:
parent
c1269b0305
commit
4d8ebe5d1e
@ -45,15 +45,19 @@ uses
|
|||||||
|
|
||||||
procedure tMIPSELcallnode.extra_call_code;
|
procedure tMIPSELcallnode.extra_call_code;
|
||||||
begin
|
begin
|
||||||
if pushedparasize > 0 then
|
{ MIPS functions should never modify the stack pointer
|
||||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_const(A_ADDIU, NR_STACK_POINTER_REG, NR_STACK_POINTER_REG, -pushedparasize));
|
after the prologue.
|
||||||
|
Enough space must be allocated inside the prologue, not after. }
|
||||||
|
// if pushedparasize > 0 then
|
||||||
|
// current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_const(A_ADDIU, NR_STACK_POINTER_REG, NR_STACK_POINTER_REG, -pushedparasize));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tMIPSELcallnode.extra_post_call_code;
|
procedure tMIPSELcallnode.extra_post_call_code;
|
||||||
begin
|
begin
|
||||||
if pushedparasize > 0 then
|
{ MIPS functions should never modify the stack pointer
|
||||||
current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_const(A_ADDIU, NR_STACK_POINTER_REG, NR_STACK_POINTER_REG, pushedparasize));
|
after the prologue.
|
||||||
|
// if pushedparasize > 0 then
|
||||||
|
// current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_const(A_ADDIU, NR_STACK_POINTER_REG, NR_STACK_POINTER_REG, pushedparasize));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user