Commit 572c8952ae6c69458550036d7406df1b418e7220
1 parent
a16b45e7
target-ppc: improve correctness of the fsel instruction
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6139 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
target-ppc/op_helper.c
... | ... | @@ -1561,7 +1561,7 @@ uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3) |
1561 | 1561 | |
1562 | 1562 | farg1.ll = arg1; |
1563 | 1563 | |
1564 | - if (!float64_is_neg(farg1.d) || float64_is_zero(farg1.d)) | |
1564 | + if ((!float64_is_neg(farg1.d) || float64_is_zero(farg1.d)) && !float64_is_nan(farg1.d)) | |
1565 | 1565 | return arg2; |
1566 | 1566 | else |
1567 | 1567 | return arg3; | ... | ... |