diff options
author | zmt00 <[email protected]> | 2023-12-09 15:46:10 -0800 |
---|---|---|
committer | merry <[email protected]> | 2023-12-11 13:18:19 +0000 |
commit | 73a75b50349320174321969502c8ec11f7bbdf64 (patch) | |
tree | ca7fc913618c14b374eee287bbade317ac0132f1 /src | |
parent | a43c176fc3984446d15e473fd2803493536412b6 (diff) | |
download | dynarmic-73a75b50349320174321969502c8ec11f7bbdf64.tar.gz dynarmic-73a75b50349320174321969502c8ec11f7bbdf64.zip |
emit_x64_vector: Add SSE4.1 implementation of VUZP1.8H
Diffstat (limited to 'src')
-rw-r--r-- | src/dynarmic/backend/x64/emit_x64_vector.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/dynarmic/backend/x64/emit_x64_vector.cpp b/src/dynarmic/backend/x64/emit_x64_vector.cpp index bd393dc7..fbcfc8c5 100644 --- a/src/dynarmic/backend/x64/emit_x64_vector.cpp +++ b/src/dynarmic/backend/x64/emit_x64_vector.cpp @@ -1079,13 +1079,22 @@ void EmitX64::EmitVectorDeinterleaveEven16(EmitContext& ctx, IR::Inst* inst) { const Xbyak::Xmm lhs = ctx.reg_alloc.UseScratchXmm(args[0]); const Xbyak::Xmm rhs = ctx.reg_alloc.UseScratchXmm(args[1]); - code.pslld(lhs, 16); - code.psrad(lhs, 16); + if (code.HasHostFeature(HostFeature::SSE41)) { + const Xbyak::Xmm zero = ctx.reg_alloc.ScratchXmm(); + code.pxor(zero, zero); - code.pslld(rhs, 16); - code.psrad(rhs, 16); + code.pblendw(lhs, zero, 0b10101010); + code.pblendw(rhs, zero, 0b10101010); + code.packusdw(lhs, rhs); + } else { + code.pslld(lhs, 16); + code.psrad(lhs, 16); - code.packssdw(lhs, rhs); + code.pslld(rhs, 16); + code.psrad(rhs, 16); + + code.packssdw(lhs, rhs); + } ctx.reg_alloc.DefineValue(inst, lhs); } |