Fix bugs caused by swapping of operands in float comparisons.

git-svn-id: branches/laksen/riscv_new@39697 -
This commit is contained in:
Jeppe Johansen 2018-09-01 19:47:28 +00:00
parent ba8245dccb
commit 2af0ca8546

View File

@ -292,6 +292,8 @@ implementation
singleprec , inv: boolean;
begin
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,right.location,right.resultdef,true);
@ -375,11 +377,6 @@ implementation
internalerror(200403182);
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
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,right.location,right.resultdef,true);
hlcg.location_force_fpureg(current_asmdata.CurrAsmList,left.location,left.resultdef,true);