From 4a0ad586d05502bc209e2663d97f14735be08333 Mon Sep 17 00:00:00 2001 From: nickysn Date: Thu, 23 Apr 2020 03:14:09 +0000 Subject: [PATCH] + implemented record copy in tcgz80.a_load_ref_cgpara git-svn-id: branches/z80@45035 - --- compiler/z80/cgcpu.pas | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/z80/cgcpu.pas b/compiler/z80/cgcpu.pas index 11f1e9ef4c..9e346353d1 100644 --- a/compiler/z80/cgcpu.pas +++ b/compiler/z80/cgcpu.pas @@ -578,9 +578,10 @@ unit cgcpu; end; var - tmpref, ref: treference; + tmpref, ref, href: treference; location: pcgparalocation; sizeleft: tcgint; + len: tcgint; begin { cgpara.size=OS_NO requires a copy on the stack } if use_push(cgpara) then @@ -588,12 +589,11 @@ unit cgcpu; { Record copy? } if (cgpara.size in [OS_NO,OS_F64]) or (size=OS_NO) then begin - internalerror(2020040802); - //cgpara.check_simple_location; - //len:=align(cgpara.intsize,cgpara.alignment); - //g_stackpointer_alloc(list,len); - //reference_reset_base(href,NR_STACK_POINTER_REG,0,ctempposinvalid,4,[]); - //g_concatcopy(list,r,href,len); + cgpara.check_simple_location; + len:=align(cgpara.intsize,cgpara.alignment); + g_stackpointer_alloc(list,len); + reference_reset_base(href,NR_STACK_POINTER_REG,0,ctempposinvalid,4,[]); + g_concatcopy(list,r,href,len); end else begin