From 572c8952ae6c69458550036d7406df1b418e7220 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Mon, 29 Dec 2008 09:47:11 +0000 Subject: [PATCH] target-ppc: improve correctness of the fsel instruction Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6139 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-ppc/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 922060bcca..876b5170fb 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -1561,7 +1561,7 @@ uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3) farg1.ll = arg1; - if (!float64_is_neg(farg1.d) || float64_is_zero(farg1.d)) + if ((!float64_is_neg(farg1.d) || float64_is_zero(farg1.d)) && !float64_is_nan(farg1.d)) return arg2; else return arg3; -- GitLab