Browse Source

[dynarmic] Define LSW on the same argument/use scratch gpr (#3520)

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3520
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
descriptor_pool_opt
lizzie 2 days ago
committed by crueter
parent
commit
f6547fac8c
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 9
      src/dynarmic/src/dynarmic/backend/x64/emit_x64_data_processing.cpp

9
src/dynarmic/src/dynarmic/backend/x64/emit_x64_data_processing.cpp

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
/* This file is part of the dynarmic project. /* This file is part of the dynarmic project.
@ -57,10 +57,9 @@ void EmitX64::EmitLeastSignificantWord(EmitContext& ctx, IR::Inst* inst) {
auto args = ctx.reg_alloc.GetArgumentInfo(inst); auto args = ctx.reg_alloc.GetArgumentInfo(inst);
// TODO: DefineValue directly on Argument // TODO: DefineValue directly on Argument
const Xbyak::Reg64 result = ctx.reg_alloc.ScratchGpr(code);
const Xbyak::Reg64 source = ctx.reg_alloc.UseGpr(code, args[0]);
code.mov(result.cvt32(), source.cvt32());
ctx.reg_alloc.DefineValue(code, inst, result);
const Xbyak::Reg64 res = ctx.reg_alloc.UseScratchGpr(code, args[0]);
code.mov(res.cvt32(), res.cvt32());
ctx.reg_alloc.DefineValue(code, inst, res);
} }
void EmitX64::EmitMostSignificantWord(EmitContext& ctx, IR::Inst* inst) { void EmitX64::EmitMostSignificantWord(EmitContext& ctx, IR::Inst* inst) {

Loading…
Cancel
Save