mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-05 15:38:46 +02:00
* handle nf_swapped properly in TZ80AddNode.second_cmp16_32_64bit
git-svn-id: branches/z80@45128 -
This commit is contained in:
parent
647725ea0c
commit
368f4412c4
@ -332,6 +332,7 @@ interface
|
|||||||
i, size: Integer;
|
i, size: Integer;
|
||||||
tmpref: treference;
|
tmpref: treference;
|
||||||
op: TAsmOp;
|
op: TAsmOp;
|
||||||
|
actualnodetype: tnodetype;
|
||||||
begin
|
begin
|
||||||
truelabel:=nil;
|
truelabel:=nil;
|
||||||
falselabel:=nil;
|
falselabel:=nil;
|
||||||
@ -437,6 +438,24 @@ interface
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
if nf_swapped in Flags then
|
||||||
|
begin
|
||||||
|
case NodeType of
|
||||||
|
ltn:
|
||||||
|
actualnodetype:=gtn;
|
||||||
|
lten:
|
||||||
|
actualnodetype:=gten;
|
||||||
|
gtn:
|
||||||
|
actualnodetype:=ltn;
|
||||||
|
gten:
|
||||||
|
actualnodetype:=lten;
|
||||||
|
else
|
||||||
|
internalerror(2020042701);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
actualnodetype:=NodeType;
|
||||||
|
|
||||||
if left.location.loc<>LOC_REGISTER then
|
if left.location.loc<>LOC_REGISTER then
|
||||||
hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false);
|
hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false);
|
||||||
|
|
||||||
@ -456,7 +475,7 @@ interface
|
|||||||
op:=A_CP;
|
op:=A_CP;
|
||||||
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_ref(op,NR_A,tmpref));
|
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_ref(op,NR_A,tmpref));
|
||||||
if (i=(size-1)) and (not unsigned) then
|
if (i=(size-1)) and (not unsigned) then
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn,
|
ltn,
|
||||||
lten:
|
lten:
|
||||||
tcgz80(cg).a_jmp_signed_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
tcgz80(cg).a_jmp_signed_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
||||||
@ -467,7 +486,7 @@ interface
|
|||||||
internalerror(2020042202);
|
internalerror(2020042202);
|
||||||
end
|
end
|
||||||
else if i<>0 then
|
else if i<>0 then
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn,
|
ltn,
|
||||||
lten:
|
lten:
|
||||||
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
||||||
@ -478,7 +497,7 @@ interface
|
|||||||
internalerror(2020042202);
|
internalerror(2020042202);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn:
|
ltn:
|
||||||
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,falselabel,falselabel);
|
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,falselabel,falselabel);
|
||||||
lten:
|
lten:
|
||||||
@ -511,7 +530,7 @@ interface
|
|||||||
op:=A_CP;
|
op:=A_CP;
|
||||||
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_const(op,NR_A,byte(right.location.value shr (i*8))));
|
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_const(op,NR_A,byte(right.location.value shr (i*8))));
|
||||||
if (i=(size-1)) and (not unsigned) then
|
if (i=(size-1)) and (not unsigned) then
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn,
|
ltn,
|
||||||
lten:
|
lten:
|
||||||
tcgz80(cg).a_jmp_signed_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
tcgz80(cg).a_jmp_signed_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
||||||
@ -522,7 +541,7 @@ interface
|
|||||||
internalerror(2020042202);
|
internalerror(2020042202);
|
||||||
end
|
end
|
||||||
else if i<>0 then
|
else if i<>0 then
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn,
|
ltn,
|
||||||
lten:
|
lten:
|
||||||
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
||||||
@ -533,7 +552,7 @@ interface
|
|||||||
internalerror(2020042202);
|
internalerror(2020042202);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn:
|
ltn:
|
||||||
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,falselabel,falselabel);
|
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,falselabel,falselabel);
|
||||||
lten:
|
lten:
|
||||||
@ -560,7 +579,7 @@ interface
|
|||||||
op:=A_CP;
|
op:=A_CP;
|
||||||
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_reg(op,NR_A,tcgz80(cg).GetOffsetReg64(right.location.register,right.location.registerhi,i)));
|
current_asmdata.CurrAsmList.Concat(taicpu.op_reg_reg(op,NR_A,tcgz80(cg).GetOffsetReg64(right.location.register,right.location.registerhi,i)));
|
||||||
if (i=(size-1)) and (not unsigned) then
|
if (i=(size-1)) and (not unsigned) then
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn,
|
ltn,
|
||||||
lten:
|
lten:
|
||||||
tcgz80(cg).a_jmp_signed_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
tcgz80(cg).a_jmp_signed_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
||||||
@ -571,7 +590,7 @@ interface
|
|||||||
internalerror(2020042202);
|
internalerror(2020042202);
|
||||||
end
|
end
|
||||||
else if i<>0 then
|
else if i<>0 then
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn,
|
ltn,
|
||||||
lten:
|
lten:
|
||||||
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,nil,falselabel);
|
||||||
@ -582,7 +601,7 @@ interface
|
|||||||
internalerror(2020042202);
|
internalerror(2020042202);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
case NodeType of
|
case actualnodetype of
|
||||||
ltn:
|
ltn:
|
||||||
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,falselabel,falselabel);
|
tcgz80(cg).a_jmp_unsigned_cmp_3way(current_asmdata.CurrAsmList,truelabel,falselabel,falselabel);
|
||||||
lten:
|
lten:
|
||||||
|
Loading…
Reference in New Issue
Block a user