mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-29 03:24:36 +00:00
SPU ASMJIT: fix BISLED
Properly prevent losing branch target (addr) vs get_events result (flags). Move get_events() to the beginning. Match BISL indirect_branch() args.
This commit is contained in:
parent
6416fee986
commit
85920253b3
@ -2688,25 +2688,26 @@ void spu_recompiler::IRET(spu_opcode_t op)
|
|||||||
|
|
||||||
void spu_recompiler::BISLED(spu_opcode_t op)
|
void spu_recompiler::BISLED(spu_opcode_t op)
|
||||||
{
|
{
|
||||||
|
get_events();
|
||||||
|
|
||||||
c->mov(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 3));
|
c->mov(*addr, SPU_OFF_32(gpr, op.ra, &v128::_u32, 3));
|
||||||
c->and_(*addr, 0x3fffc);
|
|
||||||
|
|
||||||
const XmmLink& vr = XmmAlloc();
|
const XmmLink& vr = XmmAlloc();
|
||||||
c->lea(*qw0, get_pc(m_pos + 4));
|
c->lea(*qw0, get_pc(m_pos + 4));
|
||||||
c->and_(qw0->r32(), 0x3fffc);
|
|
||||||
c->movd(vr, qw0->r32());
|
c->movd(vr, qw0->r32());
|
||||||
|
c->pand(vr, XmmConst(_mm_set1_epi32(0x3fffc)));
|
||||||
c->pslldq(vr, 12);
|
c->pslldq(vr, 12);
|
||||||
c->movdqa(SPU_OFF_128(gpr, op.rt), vr);
|
c->movdqa(SPU_OFF_128(gpr, op.rt), vr);
|
||||||
|
|
||||||
asmjit::Label branch_label = c->newLabel();
|
asmjit::Label branch_label = c->newLabel();
|
||||||
get_events();
|
|
||||||
c->jne(branch_label);
|
c->jne(branch_label);
|
||||||
|
|
||||||
after.emplace_back([=]
|
after.emplace_back([=]
|
||||||
{
|
{
|
||||||
c->align(asmjit::kAlignCode, 16);
|
c->align(asmjit::kAlignCode, 16);
|
||||||
c->bind(branch_label);
|
c->bind(branch_label);
|
||||||
branch_indirect(op);
|
c->and_(*addr, 0x3fffc);
|
||||||
|
branch_indirect(op, true, false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user