aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2013-03-26 19:56:02 +0100
committerAurelien Jarno <aurelien@aurel32.net>2013-04-01 18:49:16 +0200
commite4eba27e29114842978234a44c92b2a945a6b46d (patch)
tree291f4ce5e3aa0dcdb886cde197392b713d7130fb
parent75c9527e190231fbc2fd8470e132f360e70206be (diff)
target-i386: SSE4.2: fix pcmpXstrX instructions with "Masked(-)" polarity
valids can equals to -1 if the reg/mem string is empty. Change the expression to have an empty xor mask in that case. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--target-i386/ops_sse.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h
index 77ab410b9e..a0bac07ba3 100644
--- a/target-i386/ops_sse.h
+++ b/target-i386/ops_sse.h
@@ -2050,7 +2050,7 @@ static inline unsigned pcmpxstrx(CPUX86State *env, Reg *d, Reg *s,
res ^= (2 << upper) - 1;
break;
case 3:
- res ^= (2 << valids) - 1;
+ res ^= (1 << (valids + 1)) - 1;
break;
}