SPU: rewrite ORX instruction

This commit is contained in:
Nekotekina 2018-01-30 00:34:51 +03:00
parent 9b9ac3ca62
commit 74834527eb

View File

@ -1859,16 +1859,14 @@ void spu_recompiler::SHLQBY(spu_opcode_t op)
void spu_recompiler::ORX(spu_opcode_t op) void spu_recompiler::ORX(spu_opcode_t op)
{ {
c->mov(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 0)); const XmmLink& va = XmmGet(op.ra, XmmType::Int);
c->or_(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 1)); const XmmLink& v1 = XmmAlloc();
c->or_(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 2)); c->pshufd(v1, va, 0xb1);
c->or_(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 3)); c->por(va, v1);
c->mov(SPU_OFF_32(gpr, op.rt, &v128::_u32, 3), *addr); c->pshufd(v1, va, 0x4e);
c->xor_(*addr, *addr); c->por(va, v1);
c->mov(SPU_OFF_32(gpr, op.rt, &v128::_u32, 0), *addr); c->pslldq(va, 12);
c->mov(SPU_OFF_32(gpr, op.rt, &v128::_u32, 1), *addr); c->movdqa(SPU_OFF_128(gpr, op.rt), va);
c->mov(SPU_OFF_32(gpr, op.rt, &v128::_u32, 2), *addr);
c->unuse(*addr);
} }
void spu_recompiler::CBD(spu_opcode_t op) void spu_recompiler::CBD(spu_opcode_t op)