From 8f1f1c8f0b63c351f3dcafd6feba0cf48dfc18a5 Mon Sep 17 00:00:00 2001 From: Merry Date: Tue, 26 Jul 2022 08:07:16 +0100 Subject: [PATCH] emit_arm64_packed: Implement {Get,Set}GEFlags --- src/dynarmic/backend/arm64/emit_arm64_a32.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/dynarmic/backend/arm64/emit_arm64_a32.cpp b/src/dynarmic/backend/arm64/emit_arm64_a32.cpp index ae1a4bf7..9a6fab01 100644 --- a/src/dynarmic/backend/arm64/emit_arm64_a32.cpp +++ b/src/dynarmic/backend/arm64/emit_arm64_a32.cpp @@ -312,18 +312,20 @@ void EmitIR(oaknut::CodeGenerator& code, EmitContext& ct template<> void EmitIR(oaknut::CodeGenerator& code, EmitContext& ctx, IR::Inst* inst) { - (void)code; - (void)ctx; - (void)inst; - ASSERT_FALSE("Unimplemented"); + auto Snzcv = ctx.reg_alloc.WriteS(inst); + RegAlloc::Realize(Snzcv); + + code.LDR(Snzcv, Xstate, offsetof(A32JitState, cpsr_ge)); } 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 Snzcv = ctx.reg_alloc.ReadS(args[0]); + RegAlloc::Realize(Snzcv); + + code.STR(Snzcv, Xstate, offsetof(A32JitState, cpsr_ge)); } template<>