frontend/ir_emitter: Add half-precision opcode for FPRecipEstimate

This commit is contained in:
Lioncash
2019-04-13 19:00:49 -04:00
committed by MerryMage
parent af2e5afed6
commit 2184d24e8f
5 changed files with 17 additions and 4 deletions

View File

@@ -1922,11 +1922,18 @@ U16U32U64 IREmitter::FPNeg(const U16U32U64& a) {
}
}
U32U64 IREmitter::FPRecipEstimate(const U32U64& a) {
if (a.GetType() == Type::U32) {
U16U32U64 IREmitter::FPRecipEstimate(const U16U32U64& a) {
switch (a.GetType()) {
case Type::U16:
return Inst<U16>(Opcode::FPRecipEstimate16, a);
case Type::U32:
return Inst<U32>(Opcode::FPRecipEstimate32, a);
case Type::U64:
return Inst<U64>(Opcode::FPRecipEstimate64, a);
default:
UNREACHABLE();
return U16U32U64{};
}
return Inst<U64>(Opcode::FPRecipEstimate64, a);
}
U16U32U64 IREmitter::FPRecipExponent(const U16U32U64& a) {