提交 75c9527e 编写于 作者: A Aurelien Jarno

target-i386: SSE4.2: fix pcmpXstrX instructions in "Equal ordered" mode

The inner loop should only change the current bit of the result, instead
of the whole result.
Reviewed-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 b27a6cac
......@@ -2036,10 +2036,11 @@ static inline unsigned pcmpxstrx(CPUX86State *env, Reg *d, Reg *s,
case 3:
for (j = valids - validd; j >= 0; j--) {
res <<= 1;
res |= 1;
v = 1;
for (i = MIN(upper - j, validd); i >= 0; i--) {
res &= (pcmp_val(s, ctrl, i + j) == pcmp_val(d, ctrl, i));
v &= (pcmp_val(s, ctrl, i + j) == pcmp_val(d, ctrl, i));
}
res |= v;
}
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册