summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-04-21 06:07:06 +0000
committersvenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-04-21 06:07:06 +0000
commit5b15057bda2f141d0db5ffb79366f105837caaec (patch)
treef4499c284620fa8fc1fa4da5a2d88d1205b20a05
parentf9fe25de07eef0b894496fa57436ac4740d7b5cd (diff)
downloadfpc-5b15057bda2f141d0db5ffb79366f105837caaec.tar.gz
* implement dogetcopy for the Aarch64 variant of the tryfinally node
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@44957 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/aarch64/ncpuflw.pas21
1 files changed, 21 insertions, 0 deletions
diff --git a/compiler/aarch64/ncpuflw.pas b/compiler/aarch64/ncpuflw.pas
index c5faff991c..6cf02aa609 100644
--- a/compiler/aarch64/ncpuflw.pas
+++ b/compiler/aarch64/ncpuflw.pas
@@ -47,6 +47,7 @@ interface
constructor create_implicit(l,r:TNode);override;
function simplify(forinline: boolean): tnode;override;
procedure pass_generate_code;override;
+ function dogetcopy:tnode;override;
end;
implementation
@@ -346,6 +347,26 @@ procedure taarch64tryfinallynode.pass_generate_code;
flowcontrol:=oldflowcontrol;
end;
+function taarch64tryfinallynode.dogetcopy: tnode;
+ var
+ p : taarch64tryfinallynode absolute result;
+ begin
+ result:=inherited dogetcopy;
+ if (target_info.system=system_aarch64_win64) then
+ begin
+ if df_generic in current_procinfo.procdef.defoptions then
+ InternalError(2020033101);
+
+ p.finalizepi:=tcgprocinfo(current_procinfo.create_for_outlining('$fin$',current_procinfo.procdef.struct,potype_exceptfilter,voidtype,p.right));
+ if pi_do_call in finalizepi.flags then
+ include(p.finalizepi.flags,pi_do_call);
+ { the init/final code is messing with asm nodes, so inform the compiler about this }
+ include(p.finalizepi.flags,pi_has_assembler_block);
+ if implicitframe then
+ p.finalizepi.allocate_push_parasize(32);
+ end;
+ end;
+
{ taarch64tryexceptnode }
procedure taarch64tryexceptnode.pass_generate_code;