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>
master
Aurelien Jarno 2013-03-26 19:56:02 +01:00
parent 75c9527e19
commit e4eba27e29
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}