mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-08 05:07:30 +01:00
Fix bugs caused by swapping of operands in float comparisons.
git-svn-id: branches/laksen/riscv_new@39697 -
This commit is contained in:
parent
ba8245dccb
commit
2af0ca8546
@ -292,6 +292,8 @@ implementation
|
|||||||
singleprec , inv: boolean;
|
singleprec , inv: boolean;
|
||||||
begin
|
begin
|
||||||
pass_left_and_right;
|
pass_left_and_right;
|
||||||
|
if (nf_swapped in flags) then
|
||||||
|
swapleftright;
|
||||||
|
|
||||||
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,left.location,left.resultdef,true);
|
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,left.location,left.resultdef,true);
|
||||||
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,right.location,right.resultdef,true);
|
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,right.location,right.resultdef,true);
|
||||||
@ -375,11 +377,6 @@ implementation
|
|||||||
internalerror(200403182);
|
internalerror(200403182);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// get the operands in the correct order, there are no special cases
|
|
||||||
// here, everything is register-based
|
|
||||||
if (nf_swapped in flags) and (not cmpop) then
|
|
||||||
swapleftright;
|
|
||||||
|
|
||||||
// put both operands in a register
|
// put both operands in a register
|
||||||
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,right.location,right.resultdef,true);
|
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,right.location,right.resultdef,true);
|
||||||
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,left.location,left.resultdef,true);
|
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,left.location,left.resultdef,true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user