emit_x64_vector_floating_point: AVX implementation of ForceToDefaultNaN
This commit is contained in:
parent
746dc521b9
commit
8252efd7b1
1 changed files with 10 additions and 5 deletions
|
@ -154,6 +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();
|
||||
if (code.DoesCpuSupport(Xbyak::util::Cpu::tAVX)) {
|
||||
FCODE(vcmpunordp)(nan_mask, result, result);
|
||||
FCODE(vblendvp)(result, result, GetNaNVector<fsize>(code), nan_mask);
|
||||
} else {
|
||||
code.movaps(nan_mask, result);
|
||||
FCODE(cmpordp)(nan_mask, nan_mask);
|
||||
code.andps(result, nan_mask);
|
||||
|
@ -161,6 +165,7 @@ void ForceToDefaultNaN(BlockOfCode& code, EmitContext& ctx, Xbyak::Xmm result) {
|
|||
code.orps(result, nan_mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<size_t fsize>
|
||||
void DenormalsAreZero(BlockOfCode& code, EmitContext& ctx, std::initializer_list<Xbyak::Xmm> to_daz, Xbyak::Xmm tmp) {
|
||||
|
|
Loading…
Reference in a new issue