]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
target-i386: SSE4.2: fix pcmpXstrX instructions in "Ranges" mode
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:16 +0000 (18:49 +0200)
Fix the order of the of the comparisons to match the "Intel 64 and
IA-32 Architectures Software Developer's Manual".

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

index 4a95f4130a1ef1edad2b032daa3e6469c240e6d8..51c5fc9313499ab487d59043ccff7c63927e14e9 100644 (file)
@@ -2019,8 +2019,8 @@ static inline unsigned pcmpxstrx(CPUX86State *env, Reg *d, Reg *s,
             res <<= 1;
             v = pcmp_val(s, ctrl, j);
             for (i = ((validd - 1) | 1); i >= 0; i -= 2) {
-                res |= (pcmp_val(d, ctrl, i - 0) <= v &&
-                        pcmp_val(d, ctrl, i - 1) >= v);
+                res |= (pcmp_val(d, ctrl, i - 0) >= v &&
+                        pcmp_val(d, ctrl, i - 1) <= v);
             }
         }
         break;