From: Aurelien Jarno Date: Wed, 13 Apr 2011 22:49:29 +0000 (+0200) Subject: target-i386: fix CMPUNORDPS/D and CMPORDPS/D instructions X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~5957 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0b29ce1cf961223a21caa459b14647c1da117ec;p=sdk%2Femulator%2Fqemu.git target-i386: fix CMPUNORDPS/D and CMPORDPS/D instructions SSE instructions CMPUNORDPS/D and CMPORDPS/D do not trigger an invalid exception if operands are qNANs. Reviewed-by: Peter Maydell Signed-off-by: Aurelien Jarno --- diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h index 3232abd..986cbe3 100644 --- a/target-i386/ops_sse.h +++ b/target-i386/ops_sse.h @@ -924,11 +924,11 @@ void helper_ ## name ## sd (Reg *d, Reg *s)\ #define FPU_CMPEQ(size, a, b) float ## size ## _eq(a, b, &env->sse_status) ? -1 : 0 #define FPU_CMPLT(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? -1 : 0 #define FPU_CMPLE(size, a, b) float ## size ## _le(a, b, &env->sse_status) ? -1 : 0 -#define FPU_CMPUNORD(size, a, b) float ## size ## _unordered(a, b, &env->sse_status) ? - 1 : 0 +#define FPU_CMPUNORD(size, a, b) float ## size ## _unordered_quiet(a, b, &env->sse_status) ? - 1 : 0 #define FPU_CMPNEQ(size, a, b) float ## size ## _eq(a, b, &env->sse_status) ? 0 : -1 #define FPU_CMPNLT(size, a, b) float ## size ## _lt(a, b, &env->sse_status) ? 0 : -1 #define FPU_CMPNLE(size, a, b) float ## size ## _le(a, b, &env->sse_status) ? 0 : -1 -#define FPU_CMPORD(size, a, b) float ## size ## _unordered(a, b, &env->sse_status) ? 0 : -1 +#define FPU_CMPORD(size, a, b) float ## size ## _unordered_quiet(a, b, &env->sse_status) ? 0 : -1 SSE_HELPER_CMP(cmpeq, FPU_CMPEQ) SSE_HELPER_CMP(cmplt, FPU_CMPLT)