From 0ebbc4a9c513bc3d82ed18fcbfe49c32e35f9c0b Mon Sep 17 00:00:00 2001 From: Merry Date: Wed, 27 Jul 2022 20:08:11 +0100 Subject: [PATCH] emit_arm64_packed: Implement PackedSelect --- src/dynarmic/backend/arm64/emit_arm64_packed.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dynarmic/backend/arm64/emit_arm64_packed.cpp b/src/dynarmic/backend/arm64/emit_arm64_packed.cpp index 5876910b..6430bad6 100644 --- a/src/dynarmic/backend/arm64/emit_arm64_packed.cpp +++ b/src/dynarmic/backend/arm64/emit_arm64_packed.cpp @@ -386,10 +386,16 @@ void EmitIR(oaknut::CodeGenerator& code, EmitCon 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 Vresult = ctx.reg_alloc.WriteD(inst); + auto Vge = ctx.reg_alloc.ReadD(args[0]); + auto Va = ctx.reg_alloc.ReadD(args[1]); + auto Vb = ctx.reg_alloc.ReadD(args[2]); + RegAlloc::Realize(Vresult, Vge, Va, Vb); + + code.FMOV(Vresult, Vge); // TODO: Move elimination + code.BSL(Vresult->B8(), Vb->B8(), Va->B8()); } } // namespace Dynarmic::Backend::Arm64