backend/arm64: Implement IsZero64
This commit is contained in:
parent
3821c4a16b
commit
b6bb94872a
1 changed files with 9 additions and 4 deletions
|
@ -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<>
|
||||
|
|
Loading…
Reference in a new issue