From 163ed9b185ce2eed9a9e5a54da840fd8788608b4 Mon Sep 17 00:00:00 2001 From: Merry Date: Fri, 22 Jul 2022 23:58:30 +0100 Subject: [PATCH] backend/arm64: Implement LeastSignificantWord --- .../backend/arm64/emit_arm64_data_processing.cpp | 11 +++++++---- 1 file changed, 7 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 fb7ca191..2b221d46 100644 --- a/src/dynarmic/backend/arm64/emit_arm64_data_processing.cpp +++ b/src/dynarmic/backend/arm64/emit_arm64_data_processing.cpp @@ -73,10 +73,13 @@ void EmitIR(oaknut::CodeGenerator& code, EmitContex 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 Wresult = ctx.reg_alloc.WriteW(inst); + auto Xoperand = ctx.reg_alloc.ReadX(args[0]); + RegAlloc::Realize(Wresult, Xoperand); + + code.MOV(Wresult, Xoperand->toW()); // TODO: Zext elimination } template<>