A64: Implement FMAXNM (scalar)

This commit is contained in:
MerryMage
2018-02-20 14:05:14 +00:00
parent 1dfce0894d
commit 1c9804ea07
6 changed files with 123 additions and 13 deletions

View File

@@ -1185,6 +1185,16 @@ U32U64 IREmitter::FPMax(const U32U64& a, const U32U64& b, bool fpscr_controlled)
}
}
U32U64 IREmitter::FPMaxNumeric(const U32U64& a, const U32U64& b, bool fpscr_controlled) {
ASSERT(fpscr_controlled);
ASSERT(a.GetType() == b.GetType());
if (a.GetType() == Type::U32) {
return Inst<U32>(Opcode::FPMaxNumeric32, a, b);
} else {
return Inst<U64>(Opcode::FPMaxNumeric64, a, b);
}
}
U32U64 IREmitter::FPMin(const U32U64& a, const U32U64& b, bool fpscr_controlled) {
ASSERT(fpscr_controlled);
ASSERT(a.GetType() == b.GetType());