mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 17:39:20 +02:00
* Factored reusable (SEH-related) piece of code into separate procedure.
git-svn-id: trunk@26157 -
This commit is contained in:
parent
4b59b42df2
commit
409e176ded
@ -138,6 +138,7 @@ interface
|
|||||||
function getprocalign : shortint;
|
function getprocalign : shortint;
|
||||||
|
|
||||||
procedure gen_fpc_dummy(list : TAsmList);
|
procedure gen_fpc_dummy(list : TAsmList);
|
||||||
|
procedure gen_load_frame_for_exceptfilter(list : TAsmList);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -2213,4 +2214,18 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure gen_load_frame_for_exceptfilter(list : TAsmList);
|
||||||
|
var
|
||||||
|
para: tparavarsym;
|
||||||
|
begin
|
||||||
|
para:=tparavarsym(current_procinfo.procdef.paras[0]);
|
||||||
|
if not (vo_is_parentfp in para.varoptions) then
|
||||||
|
InternalError(201201142);
|
||||||
|
if (para.paraloc[calleeside].location^.loc<>LOC_REGISTER) or
|
||||||
|
(para.paraloc[calleeside].location^.next<>nil) then
|
||||||
|
InternalError(201201143);
|
||||||
|
cg.a_load_reg_reg(list,OS_ADDR,OS_ADDR,para.paraloc[calleeside].location^.register,
|
||||||
|
NR_FRAME_POINTER_REG);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -57,7 +57,7 @@ unit cgcpu;
|
|||||||
uses
|
uses
|
||||||
globtype,globals,verbose,systems,cutils,cclasses,
|
globtype,globals,verbose,systems,cutils,cclasses,
|
||||||
symsym,symtable,defutil,paramgr,fmodule,cpupi,
|
symsym,symtable,defutil,paramgr,fmodule,cpupi,
|
||||||
rgobj,tgobj,rgcpu;
|
rgobj,tgobj,rgcpu,ncgutil;
|
||||||
|
|
||||||
|
|
||||||
procedure Tcgx86_64.init_register_allocators;
|
procedure Tcgx86_64.init_register_allocators;
|
||||||
@ -140,7 +140,6 @@ unit cgcpu;
|
|||||||
frame_offset: longint;
|
frame_offset: longint;
|
||||||
suppress_endprologue: boolean;
|
suppress_endprologue: boolean;
|
||||||
stackmisalignment: longint;
|
stackmisalignment: longint;
|
||||||
para: tparavarsym;
|
|
||||||
xmmsize: longint;
|
xmmsize: longint;
|
||||||
|
|
||||||
procedure push_one_reg(reg: tregister);
|
procedure push_one_reg(reg: tregister);
|
||||||
@ -196,15 +195,7 @@ unit cgcpu;
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
push_regs;
|
push_regs;
|
||||||
{ load framepointer from hidden $parentfp parameter }
|
gen_load_frame_for_exceptfilter(list);
|
||||||
para:=tparavarsym(current_procinfo.procdef.paras[0]);
|
|
||||||
if not (vo_is_parentfp in para.varoptions) then
|
|
||||||
InternalError(201201142);
|
|
||||||
if (para.paraloc[calleeside].location^.loc<>LOC_REGISTER) or
|
|
||||||
(para.paraloc[calleeside].location^.next<>nil) then
|
|
||||||
InternalError(201201143);
|
|
||||||
list.concat(Taicpu.op_reg_reg(A_MOV,tcgsize2opsize[OS_ADDR],
|
|
||||||
para.paraloc[calleeside].location^.register,NR_FRAME_POINTER_REG));
|
|
||||||
{ Need only as much stack space as necessary to do the calls.
|
{ Need only as much stack space as necessary to do the calls.
|
||||||
Exception filters don't have own local vars, and temps are 'mapped'
|
Exception filters don't have own local vars, and temps are 'mapped'
|
||||||
to the parent procedure.
|
to the parent procedure.
|
||||||
|
Loading…
Reference in New Issue
Block a user