mirror of https://github.com/xemu-project/xemu.git
target-i386: SSE4.2: fix pcmpXstrX instructions in "Equal each" mode
pcmpXstrX instructions in "Equal each" mode force both invalid element pair to true. It means (upper - MAX(valids, validd)) bits should be set to 1, not (upper - MAX(valids, validd) + 1). Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
649ad05ed4
commit
b27a6cacb7
|
@ -2025,7 +2025,7 @@ static inline unsigned pcmpxstrx(CPUX86State *env, Reg *d, Reg *s,
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
res = (2 << (upper - MAX(valids, validd))) - 1;
|
||||
res = (1 << (upper - MAX(valids, validd))) - 1;
|
||||
res <<= MAX(valids, validd) - MIN(valids, validd);
|
||||
for (i = MIN(valids, validd); i >= 0; i--) {
|
||||
res <<= 1;
|
||||
|
|
Loading…
Reference in New Issue