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<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::IsZero64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::IsZero64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
(void)code;
|
// TODO: Use host flags
|
||||||
(void)ctx;
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
(void)inst;
|
|
||||||
ASSERT_FALSE("Unimplemented");
|
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<>
|
template<>
|
||||||
|
|
Loading…
Reference in a new issue