spu: Implement DFCMGT for interpreter and recompiler

This commit is contained in:
Jake 2017-11-30 21:01:09 -06:00 committed by kd-11
parent 17cf24d0ed
commit ad97780c4f
2 changed files with 12 additions and 2 deletions

View File

@ -1862,7 +1862,14 @@ void spu_recompiler::FCMGT(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)

View File

@ -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)
{
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)