backend/arm64: Implement IsZero64

This commit is contained in:
Merry 2022-07-23 00:02:45 +01:00 committed by merry
parent 3821c4a16b
commit b6bb94872a

View file

@ -142,10 +142,15 @@ void EmitIR<IR::Opcode::IsZero32>(oaknut::CodeGenerator& code, EmitContext& ctx,
template<>
void EmitIR<IR::Opcode::IsZero64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
(void)code;
(void)ctx;
(void)inst;
ASSERT_FALSE("Unimplemented");
// TODO: Use host flags
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
auto Wresult = ctx.reg_alloc.WriteW(inst);
auto Xoperand = ctx.reg_alloc.ReadX(args[0]);
RegAlloc::Realize(Wresult, Xoperand);
code.CMP(Xoperand, 0);
code.CSET(Wresult, EQ);
}
template<>