mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 16:19:28 +02:00
* avoid esp to be freed
git-svn-id: trunk@2203 -
This commit is contained in:
parent
155b36dc87
commit
a3e3e7e8c5
@ -706,7 +706,8 @@ unit cgx86;
|
||||
instr:=taicpu.op_reg_reg(op,s,reg1,reg2);
|
||||
{ Notify the register allocator that we have written a move instruction so
|
||||
it can try to eliminate it. }
|
||||
add_move_instruction(instr);
|
||||
if reg1<>NR_ESP then
|
||||
add_move_instruction(instr);
|
||||
list.concat(instr);
|
||||
end;
|
||||
{$ifdef x86_64}
|
||||
@ -1844,7 +1845,6 @@ unit cgx86;
|
||||
CGmessage(cg_d_stackframe_omited)
|
||||
else
|
||||
begin
|
||||
|
||||
include(rg[R_INTREGISTER].preserved_by_proc,RS_FRAME_POINTER_REG);
|
||||
list.concat(Taicpu.op_reg(A_PUSH,tcgsize2opsize[OS_ADDR],NR_FRAME_POINTER_REG));
|
||||
{ Return address and FP are both on stack }
|
||||
|
Loading…
Reference in New Issue
Block a user