* use a LD sequence for 2-byte moves as well in tcgz80.g_concatcopy

git-svn-id: branches/z80@44961 -
This commit is contained in:
nickysn 2020-04-21 16:26:04 +00:00
parent f8b0c24024
commit c67fa28d7c

View File

@ -1912,14 +1912,25 @@ unit cgcpu;
var
tmpreg,srcreg,dstreg: tregister;
srcref,dstref : treference;
i: Integer;
begin
if (len=1) and
if (len<=2) and
is_ref_in_opertypes(source,[OT_REF_IX_d,OT_REF_IY_d,OT_REF_HL]) and
is_ref_in_opertypes(dest,[OT_REF_IX_d,OT_REF_IY_d,OT_REF_HL]) then
begin
srcref:=source;
dstref:=dest;
tmpreg:=getintregister(list,OS_8);
list.concat(taicpu.op_reg_ref(A_LD,tmpreg,source));
list.concat(taicpu.op_ref_reg(A_LD,dest,tmpreg));
for i:=1 to len do
begin
list.concat(taicpu.op_reg_ref(A_LD,tmpreg,srcref));
list.concat(taicpu.op_ref_reg(A_LD,dstref,tmpreg));
if i<>len then
begin
adjust_normalized_ref(list,srcref,1);
adjust_normalized_ref(list,dstref,1);
end;
end;
end
else
begin