emit_x64_vector: Fix vector upper output of EmitVectorSignedSaturatedNarrowToSigned
This commit is contained in:
parent
e26a9769dc
commit
43e8d0d7fc
1 changed files with 3 additions and 2 deletions
|
@ -4245,10 +4245,11 @@ static void EmitVectorSignedSaturatedNarrowToSigned(size_t original_esize, Block
|
||||||
const Xbyak::Xmm sign = ctx.reg_alloc.ScratchXmm();
|
const Xbyak::Xmm sign = ctx.reg_alloc.ScratchXmm();
|
||||||
|
|
||||||
code.movdqa(dest, src);
|
code.movdqa(dest, src);
|
||||||
|
code.pxor(xmm0, xmm0);
|
||||||
|
|
||||||
switch (original_esize) {
|
switch (original_esize) {
|
||||||
case 16:
|
case 16:
|
||||||
code.packsswb(dest, dest);
|
code.packsswb(dest, xmm0);
|
||||||
code.movdqa(sign, src);
|
code.movdqa(sign, src);
|
||||||
code.psraw(sign, 15);
|
code.psraw(sign, 15);
|
||||||
code.packsswb(sign, sign);
|
code.packsswb(sign, sign);
|
||||||
|
@ -4256,7 +4257,7 @@ static void EmitVectorSignedSaturatedNarrowToSigned(size_t original_esize, Block
|
||||||
code.punpcklbw(reconstructed, sign);
|
code.punpcklbw(reconstructed, sign);
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
code.packssdw(dest, dest);
|
code.packssdw(dest, xmm0);
|
||||||
code.movdqa(reconstructed, dest);
|
code.movdqa(reconstructed, dest);
|
||||||
code.movdqa(sign, dest);
|
code.movdqa(sign, dest);
|
||||||
code.psraw(sign, 15);
|
code.psraw(sign, 15);
|
||||||
|
|
Loading…
Reference in a new issue