From 02d3a5a24217403ad03c5c45245333d83404699b Mon Sep 17 00:00:00 2001 From: Merry Date: Tue, 26 Jul 2022 09:02:02 +0100 Subject: [PATCH] emit_arm64_a32: Implement A32OrQFlag --- src/dynarmic/backend/arm64/emit_arm64_a32.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dynarmic/backend/arm64/emit_arm64_a32.cpp b/src/dynarmic/backend/arm64/emit_arm64_a32.cpp index 9a6fab01..dbb8daca 100644 --- a/src/dynarmic/backend/arm64/emit_arm64_a32.cpp +++ b/src/dynarmic/backend/arm64/emit_arm64_a32.cpp @@ -304,10 +304,13 @@ void EmitIR(oaknut::CodeGenerator& code, EmitContext& c template<> void EmitIR(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<>