emit_arm64_packed: Implement PackedAddU16
This commit is contained in:
parent
179137be5a
commit
66858c99b8
1 changed files with 16 additions and 4 deletions
|
@ -77,10 +77,22 @@ void EmitIR<IR::Opcode::PackedSubS8>(oaknut::CodeGenerator& code, EmitContext& c
|
|||
|
||||
template<>
|
||||
void EmitIR<IR::Opcode::PackedAddU16>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||
(void)code;
|
||||
(void)ctx;
|
||||
(void)inst;
|
||||
ASSERT_FALSE("Unimplemented");
|
||||
const auto ge_inst = inst->GetAssociatedPseudoOperation(IR::Opcode::GetGEFromOp);
|
||||
|
||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||
auto Vresult = ctx.reg_alloc.WriteD(inst);
|
||||
auto Va = ctx.reg_alloc.ReadD(args[0]);
|
||||
auto Vb = ctx.reg_alloc.ReadD(args[1]);
|
||||
RegAlloc::Realize(Vresult, Va, Vb);
|
||||
|
||||
code.ADD(Vresult->H4(), Va->H4(), Vb->H4());
|
||||
|
||||
if (ge_inst) {
|
||||
auto Vge = ctx.reg_alloc.WriteD(ge_inst);
|
||||
RegAlloc::Realize(Vge);
|
||||
|
||||
code.CMHI(Vge->H4(), Va->H4(), Vresult->H4());
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Reference in a new issue