From: Aurelien Jarno Date: Thu, 6 Jan 2011 14:38:18 +0000 (+0100) Subject: target-ppc: fix default qNaN X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~3143 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3eb28bbd472c0d4e3182421c4af7043afa059903;p=sdk%2Femulator%2Fqemu.git target-ppc: fix default qNaN On PPC the default qNaN doesn't have the sign bit set. Acked-by: Alexander Graf Signed-off-by: Aurelien Jarno --- diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 31520ab639..c69ffc96b1 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -643,7 +643,7 @@ static inline uint64_t fload_invalid_op_excp(int op) env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI)); if (ve == 0) { /* Set the result to quiet NaN */ - ret = 0xFFF8000000000000ULL; + ret = 0x7FF8000000000000ULL; env->fpscr &= ~(0xF << FPSCR_FPCC); env->fpscr |= 0x11 << FPSCR_FPCC; } @@ -654,7 +654,7 @@ static inline uint64_t fload_invalid_op_excp(int op) env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI)); if (ve == 0) { /* Set the result to quiet NaN */ - ret = 0xFFF8000000000000ULL; + ret = 0x7FF8000000000000ULL; env->fpscr &= ~(0xF << FPSCR_FPCC); env->fpscr |= 0x11 << FPSCR_FPCC; }