]> git.proxmox.com Git - qemu.git/commitdiff
target-i386: SSE4.2: fix pcmpgtq instruction
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 26 Mar 2013 18:56:01 +0000 (19:56 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 1 Apr 2013 16:49:15 +0000 (18:49 +0200)
The "Intel 64 and IA-32 Architectures Software Developer's Manual" (at
least recent versions) clearly says that the comparison is signed.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-i386/ops_sse.h

index cad9d758de4622ef1c8324848002309c934f6607..0136df934512a8d33ba9c61e4021920f55f45485 100644 (file)
@@ -1933,8 +1933,7 @@ void glue(helper_mpsadbw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
 }
 
 /* SSE4.2 op helpers */
-/* it's unclear whether signed or unsigned */
-#define FCMPGTQ(d, s) (d > s ? -1 : 0)
+#define FCMPGTQ(d, s) ((int64_t)d > (int64_t)s ? -1 : 0)
 SSE_HELPER_Q(helper_pcmpgtq, FCMPGTQ)
 
 static inline int pcmp_elen(CPUX86State *env, int reg, uint32_t ctrl)