mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 04:09:30 +02:00
* always pop DS in huge memory models in asm routines that don't specify
'nostackframe' git-svn-id: trunk@31520 -
This commit is contained in:
parent
98ec7a2211
commit
a1d29b8251
@ -1762,6 +1762,9 @@ unit cgcpu;
|
||||
{ remove stackframe }
|
||||
if not nostackframe then
|
||||
begin
|
||||
if (current_settings.x86memorymodel=mm_huge) and
|
||||
not (po_interrupt in current_procinfo.procdef.procoptions) then
|
||||
list.concat(Taicpu.Op_reg(A_POP,S_W,NR_DS));
|
||||
if (current_procinfo.framepointer=NR_STACK_POINTER_REG) then
|
||||
begin
|
||||
stacksize:=current_procinfo.calc_stackframe_size;
|
||||
@ -1776,12 +1779,7 @@ unit cgcpu;
|
||||
cg.a_op_const_reg(list,OP_ADD,OS_ADDR,stacksize,current_procinfo.framepointer);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if (current_settings.x86memorymodel=mm_huge) and
|
||||
not (po_interrupt in current_procinfo.procdef.procoptions) then
|
||||
list.concat(Taicpu.Op_reg(A_POP,S_W,NR_DS));
|
||||
generate_leave(list);
|
||||
end;
|
||||
generate_leave(list);
|
||||
list.concat(tai_regalloc.dealloc(current_procinfo.framepointer,nil));
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user