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<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::FPVectorFromHalf32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::FPVectorFromHalf32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
(void)ctx;
|
const auto rounding_mode = static_cast<FP::RoundingMode>(args[1].GetImmediateU8());
|
||||||
(void)inst;
|
ASSERT(rounding_mode == FP::RoundingMode::ToNearest_TieEven);
|
||||||
ASSERT_FALSE("Unimplemented");
|
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<>
|
template<>
|
||||||
|
|
Loading…
Reference in a new issue