emit_arm64_a32: Implement A32OrQFlag

This commit is contained in:
Merry 2022-07-26 09:02:02 +01:00 committed by merry
parent a50eb6cf34
commit 02d3a5a242

View file

@ -304,10 +304,13 @@ void EmitIR<IR::Opcode::A32GetCFlag>(oaknut::CodeGenerator& code, EmitContext& c
template<>
void EmitIR<IR::Opcode::A32OrQFlag>(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) {
(void)code;
(void)ctx;
(void)inst;
ASSERT_FALSE("Unimplemented");
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
auto Wflag = ctx.reg_alloc.ReadW(args[0]);
RegAlloc::Realize(Wflag);
code.LDR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_q));
code.ORR(Wscratch0, Wscratch0, Wflag, LSL, 27);
code.STR(Wscratch0, Xstate, offsetof(A32JitState, cpsr_q));
}
template<>