mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 17:19:33 +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;
|
||||
|
||||
procedure gen_fpc_dummy(list : TAsmList);
|
||||
procedure gen_load_frame_for_exceptfilter(list : TAsmList);
|
||||
|
||||
implementation
|
||||
|
||||
@ -2213,4 +2214,18 @@ implementation
|
||||
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.
|
||||
|
@ -57,7 +57,7 @@ unit cgcpu;
|
||||
uses
|
||||
globtype,globals,verbose,systems,cutils,cclasses,
|
||||
symsym,symtable,defutil,paramgr,fmodule,cpupi,
|
||||
rgobj,tgobj,rgcpu;
|
||||
rgobj,tgobj,rgcpu,ncgutil;
|
||||
|
||||
|
||||
procedure Tcgx86_64.init_register_allocators;
|
||||
@ -140,7 +140,6 @@ unit cgcpu;
|
||||
frame_offset: longint;
|
||||
suppress_endprologue: boolean;
|
||||
stackmisalignment: longint;
|
||||
para: tparavarsym;
|
||||
xmmsize: longint;
|
||||
|
||||
procedure push_one_reg(reg: tregister);
|
||||
@ -196,15 +195,7 @@ unit cgcpu;
|
||||
else
|
||||
begin
|
||||
push_regs;
|
||||
{ load framepointer from hidden $parentfp parameter }
|
||||
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));
|
||||
gen_load_frame_for_exceptfilter(list);
|
||||
{ Need only as much stack space as necessary to do the calls.
|
||||
Exception filters don't have own local vars, and temps are 'mapped'
|
||||
to the parent procedure.
|
||||
|
Loading…
Reference in New Issue
Block a user