backend/arm64: Implement Not
This commit is contained in:
parent
6ad7758165
commit
46f4063952
1 changed files with 14 additions and 8 deletions
|
@ -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<>
|
||||||
|
|
Loading…
Reference in a new issue