emit_x64_vector_floating_point: Reduce codesize of ForceToDefaultNaN

This commit is contained in:
MerryMage 2018-07-31 20:25:56 +01:00
parent 7731dcdca9
commit 746dc521b9

View file

@ -154,13 +154,10 @@ template<size_t fsize>
void ForceToDefaultNaN(BlockOfCode& code, EmitContext& ctx, Xbyak::Xmm result) {
if (ctx.FPSCR_DN()) {
const Xbyak::Xmm nan_mask = ctx.reg_alloc.ScratchXmm();
const Xbyak::Xmm tmp = ctx.reg_alloc.ScratchXmm();
code.pcmpeqw(tmp, tmp);
code.movaps(nan_mask, result);
FCODE(cmpordp)(nan_mask, nan_mask);
code.andps(result, nan_mask);
code.xorps(nan_mask, tmp);
code.andps(nan_mask, GetNaNVector<fsize>(code));
code.andnps(nan_mask, GetNaNVector<fsize>(code));
code.orps(result, nan_mask);
}
}