FPVectorFromHalf32 implementation
This commit is contained in:
parent
58a1e4cc63
commit
f374d6acb0
1 changed files with 13 additions and 4 deletions
|
@ -290,10 +290,19 @@ void EmitIR<IR::Opcode::FPVectorEqual64>(oaknut::CodeGenerator& code, EmitContex
|
|||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::FPVectorFromHalf32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||
const auto rounding_mode = static_cast<FP::RoundingMode>(args[1].GetImmediateU8());
|
||||
ASSERT(rounding_mode == FP::RoundingMode::ToNearest_TieEven);
|
||||
const bool fpcr_controlled = args[2].GetImmediateU1();
|
||||
|
||||
auto Qresult = ctx.reg_alloc.WriteQ(inst);
|
||||
auto Doperand = ctx.reg_alloc.ReadD(args[0]);
|
||||
RegAlloc::Realize(Qresult, Doperand);
|
||||
ctx.fpsr.Load();
|
||||
|
||||
MaybeStandardFPSCRValue(code, ctx, fpcr_controlled, [&] {
|
||||
code.FCVTL(Qresult->S4(), Doperand->H4());
|
||||
});
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Reference in a new issue