backend/arm64: Implement Not

This commit is contained in:
Merry 2022-07-24 17:03:25 +01:00 committed by merry
parent 6ad7758165
commit 46f4063952

View file

@ -809,18 +809,24 @@ void EmitIR<IR::Opcode::Or64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR:
template<> template<>
void EmitIR<IR::Opcode::Not32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) { void EmitIR<IR::Opcode::Not32>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
(void)code; auto args = ctx.reg_alloc.GetArgumentInfo(inst);
(void)ctx;
(void)inst; auto Wresult = ctx.reg_alloc.WriteW(inst);
ASSERT_FALSE("Unimplemented"); auto Wa = ctx.reg_alloc.ReadW(args[0]);
RegAlloc::Realize(Wresult, Wa);
code.MVN(Wresult, Wa);
} }
template<> template<>
void EmitIR<IR::Opcode::Not64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) { void EmitIR<IR::Opcode::Not64>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
(void)code; auto args = ctx.reg_alloc.GetArgumentInfo(inst);
(void)ctx;
(void)inst; auto Xresult = ctx.reg_alloc.WriteX(inst);
ASSERT_FALSE("Unimplemented"); auto Xa = ctx.reg_alloc.ReadX(args[0]);
RegAlloc::Realize(Xresult, Xa);
code.MVN(Xresult, Xa);
} }
template<> template<>