backend/arm64: Implement A32SetCheckBit
This commit is contained in:
parent
3e5309bd96
commit
84cad9f831
2 changed files with 12 additions and 0 deletions
|
@ -25,6 +25,8 @@ void EmitIR(oaknut::CodeGenerator&, EmitContext&, IR::Inst*) {
|
||||||
ASSERT_FALSE("Unimplemented opcode {}", op);
|
ASSERT_FALSE("Unimplemented opcode {}", op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void EmitIR<IR::Opcode::A32SetCheckBit>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::A32GetRegister>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
void EmitIR<IR::Opcode::A32GetRegister>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst);
|
||||||
template<>
|
template<>
|
||||||
|
|
|
@ -122,6 +122,16 @@ void EmitA32Terminal(oaknut::CodeGenerator& code, EmitContext& ctx) {
|
||||||
EmitA32Terminal(code, ctx, ctx.block.GetTerminal(), location.SetSingleStepping(false), location.SingleStepping());
|
EmitA32Terminal(code, ctx, ctx.block.GetTerminal(), location.SetSingleStepping(false), location.SingleStepping());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void EmitIR<IR::Opcode::A32SetCheckBit>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
|
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||||
|
|
||||||
|
auto Wbit = ctx.reg_alloc.ReadW(args[0]);
|
||||||
|
RegAlloc::Realize(Wbit);
|
||||||
|
|
||||||
|
code.STRB(Wbit, SP, offsetof(StackLayout, check_bit));
|
||||||
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
void EmitIR<IR::Opcode::A32GetRegister>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
void EmitIR<IR::Opcode::A32GetRegister>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
|
||||||
const A32::Reg reg = inst->GetArg(0).GetA32RegRef();
|
const A32::Reg reg = inst->GetArg(0).GetA32RegRef();
|
||||||
|
|
Loading…
Reference in a new issue