1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

SPU ASMJIT: minor change to ROTH instruction

Only AVX-512 path is changed (third version).
This instruction is extremely rare.
And the code is probably not optimal.
So this commit is pretty useless.
This commit is contained in:
Nekotekina 2018-02-01 00:53:37 +03:00
parent 3972b176cd
commit c7c49ab286

View File

@ -828,14 +828,15 @@ void spu_recompiler::ROTH(spu_opcode_t op) //nf
const XmmLink& vb = XmmGet(op.rb, XmmType::Int); const XmmLink& vb = XmmGet(op.rb, XmmType::Int);
const XmmLink& vt = XmmAlloc(); const XmmLink& vt = XmmAlloc();
const XmmLink& v4 = XmmAlloc(); const XmmLink& v4 = XmmAlloc();
c->movdqa(v4, XmmConst(_mm_set1_epi16(0xf))); c->vmovdqa(v4, XmmConst(_mm_set_epi32(0x0d0c0d0c, 0x09080908, 0x05040504, 0x01000100)));
c->pand(vb, v4); c->vpshufb(vt, va, v4); // duplicate low word
c->vpsllvw(vt, va, vb); c->vpsrld(va, va, 16);
c->psubw(vb, XmmConst(_mm_set1_epi16(1))); c->vpshufb(va, va, v4);
c->pandn(vb, v4); c->vpsrld(v4, vb, 16);
c->vpsrlvw(va, va, vb); c->vprolvd(va, va, v4);
c->por(vt, va); c->vprolvd(vb, vt, vb);
c->movdqa(SPU_OFF_128(gpr, op.rt), vt); c->vpblendw(vt, vb, va, 0xaa);
c->vmovdqa(SPU_OFF_128(gpr, op.rt), vt);
return; return;
} }