diff options
author | laksen <laksen@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-09-01 19:47:28 +0000 |
---|---|---|
committer | laksen <laksen@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-09-01 19:47:28 +0000 |
commit | d4aa1d617723940296de20fa1e2a386fcb45d5f0 (patch) | |
tree | 3d336f0b137c6e47dc7311c48c5f02bf2f375d7a | |
parent | 1f598039cbaaf19442a78c0c09eba966bff5f3ee (diff) | |
download | fpc-d4aa1d617723940296de20fa1e2a386fcb45d5f0.tar.gz |
Fix bugs caused by swapping of operands in float comparisons.
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/laksen@39697 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | riscv_new/compiler/riscv/nrvadd.pas | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/riscv_new/compiler/riscv/nrvadd.pas b/riscv_new/compiler/riscv/nrvadd.pas index 60f7095b2e..291fd037c3 100644 --- a/riscv_new/compiler/riscv/nrvadd.pas +++ b/riscv_new/compiler/riscv/nrvadd.pas @@ -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); |