From b8dd1c751086f407bc12ac199ddb0c90583eb281 Mon Sep 17 00:00:00 2001 From: merry Date: Sat, 12 Feb 2022 21:47:15 +0000 Subject: [PATCH] emit_x64_floating_point: Correct dead-code warning in MSVC 2019 --- .../backend/x64/emit_x64_floating_point.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dynarmic/backend/x64/emit_x64_floating_point.cpp b/src/dynarmic/backend/x64/emit_x64_floating_point.cpp index 2ff633a1..8e0fea9b 100644 --- a/src/dynarmic/backend/x64/emit_x64_floating_point.cpp +++ b/src/dynarmic/backend/x64/emit_x64_floating_point.cpp @@ -1136,14 +1136,13 @@ static void EmitFPRSqrtEstimate(BlockOfCode& code, EmitContext& ctx, IR::Inst* i code.SwitchToNearCode(); ctx.reg_alloc.DefineValue(inst, result); - return; + } else { + auto args = ctx.reg_alloc.GetArgumentInfo(inst); + ctx.reg_alloc.HostCall(inst, args[0]); + code.mov(code.ABI_PARAM2.cvt32(), ctx.FPCR().Value()); + code.lea(code.ABI_PARAM3, code.ptr[code.r15 + code.GetJitStateInfo().offsetof_fpsr_exc]); + code.CallFunction(&FP::FPRSqrtEstimate); } - - auto args = ctx.reg_alloc.GetArgumentInfo(inst); - ctx.reg_alloc.HostCall(inst, args[0]); - code.mov(code.ABI_PARAM2.cvt32(), ctx.FPCR().Value()); - code.lea(code.ABI_PARAM3, code.ptr[code.r15 + code.GetJitStateInfo().offsetof_fpsr_exc]); - code.CallFunction(&FP::FPRSqrtEstimate); } void EmitX64::EmitFPRSqrtEstimate16(EmitContext& ctx, IR::Inst* inst) {