From 92ef9a7276402329d7c6a494f3c8acb5c36c60b8 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 13 Nov 2022 14:38:04 -0500 Subject: [PATCH] Add TestBit --- .../backend/arm64/emit_arm64_data_processing.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/dynarmic/backend/arm64/emit_arm64_data_processing.cpp b/src/dynarmic/backend/arm64/emit_arm64_data_processing.cpp index f0250361..4f479d90 100644 --- a/src/dynarmic/backend/arm64/emit_arm64_data_processing.cpp +++ b/src/dynarmic/backend/arm64/emit_arm64_data_processing.cpp @@ -189,10 +189,14 @@ void EmitIR(oaknut::CodeGenerator& code, EmitContext& ctx, 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 Xresult = ctx.reg_alloc.WriteX(inst); + auto Xoperand = ctx.reg_alloc.ReadX(args[0]); + RegAlloc::Realize(Xresult, Xoperand); + ASSERT(args[1].IsImmediate()); + ASSERT(args[1].GetImmediateU8() < 64); + + code.UBFX(Xresult, Xoperand, args[1].GetImmediateU8(), 1); } template<>