Commit 4cf7b14e authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][x64][ia32] Fix i8x16.popcnt codegen for ATOM

Fixed: v8:11591
Change-Id: I1d1d3ea94c969e17accb9651cd3e2dc29357ce12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2780218Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73591}
parent a9631a77
...@@ -961,8 +961,8 @@ void TurboAssembler::I8x16Popcnt(XMMRegister dst, XMMRegister src, ...@@ -961,8 +961,8 @@ void TurboAssembler::I8x16Popcnt(XMMRegister dst, XMMRegister src,
// PSHUFB instruction, thus use PSHUFB-free divide-and-conquer // PSHUFB instruction, thus use PSHUFB-free divide-and-conquer
// algorithm on these processors. ATOM CPU feature captures exactly // algorithm on these processors. ATOM CPU feature captures exactly
// the right set of processors. // the right set of processors.
xorps(tmp1, tmp1); movaps(tmp1, src);
pavgb(tmp1, src); psrlw(tmp1, 1);
if (dst != src) { if (dst != src) {
movaps(dst, src); movaps(dst, src);
} }
......
...@@ -2435,8 +2435,8 @@ void TurboAssembler::I8x16Popcnt(XMMRegister dst, XMMRegister src, ...@@ -2435,8 +2435,8 @@ void TurboAssembler::I8x16Popcnt(XMMRegister dst, XMMRegister src,
// PSHUFB instruction, thus use PSHUFB-free divide-and-conquer // PSHUFB instruction, thus use PSHUFB-free divide-and-conquer
// algorithm on these processors. ATOM CPU feature captures exactly // algorithm on these processors. ATOM CPU feature captures exactly
// the right set of processors. // the right set of processors.
xorps(tmp, tmp); movaps(tmp, src);
pavgb(tmp, src); psrlw(tmp, 1);
if (dst != src) { if (dst != src) {
movaps(dst, src); movaps(dst, src);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment