mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
spu: Implement DFCMGT for interpreter and recompiler
This commit is contained in:
parent
17cf24d0ed
commit
ad97780c4f
2 changed files with 12 additions and 2 deletions
|
@ -1862,7 +1862,14 @@ void spu_recompiler::FCMGT(spu_opcode_t op)
|
||||||
|
|
||||||
void spu_recompiler::DFCMGT(spu_opcode_t op)
|
void spu_recompiler::DFCMGT(spu_opcode_t op)
|
||||||
{
|
{
|
||||||
fmt::throw_exception("Unexpected instruction" HERE);
|
const auto mask = XmmConst(_mm_set1_epi64x(0x7fffffffffffffff));
|
||||||
|
const XmmLink& va = XmmGet(op.ra, XmmType::Double);
|
||||||
|
const XmmLink& vb = XmmGet(op.rb, XmmType::Double);
|
||||||
|
|
||||||
|
c->andpd(va, mask);
|
||||||
|
c->andpd(vb, mask);
|
||||||
|
c->cmppd(vb, va, 1);
|
||||||
|
c->movaps(SPU_OFF_128(gpr, op.rt), vb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void spu_recompiler::DFA(spu_opcode_t op)
|
void spu_recompiler::DFA(spu_opcode_t op)
|
||||||
|
|
|
@ -837,7 +837,10 @@ void spu_interpreter_fast::FCMGT(SPUThread& spu, spu_opcode_t op)
|
||||||
|
|
||||||
void spu_interpreter::DFCMGT(SPUThread& spu, spu_opcode_t op)
|
void spu_interpreter::DFCMGT(SPUThread& spu, spu_opcode_t op)
|
||||||
{
|
{
|
||||||
fmt::throw_exception("Unexpected instruction" HERE);
|
const auto mask = _mm_castsi128_pd(_mm_set1_epi64x(0x7fffffffffffffff));
|
||||||
|
const auto ra = _mm_and_pd(spu.gpr[op.ra].vd, mask);
|
||||||
|
const auto rb = _mm_and_pd(spu.gpr[op.rb].vd, mask);
|
||||||
|
spu.gpr[op.rt].vd = _mm_cmpgt_pd(ra, rb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void spu_interpreter_fast::DFA(SPUThread& spu, spu_opcode_t op)
|
void spu_interpreter_fast::DFA(SPUThread& spu, spu_opcode_t op)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue