Browse Source

[FIXUP] Partially revert "[dynarmic] allow better dtrace diagnostics for code - do not clobber %rbp and save frame pointer (#2653)" (#3176)

This partially reverts commit 50f8d4130d.

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3176
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-committed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
android-root
Caio Oliveira 5 days ago
committed by crueter
parent
commit
057d566ff4
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 6
      src/dynarmic/src/dynarmic/backend/x64/abi.cpp

6
src/dynarmic/src/dynarmic/backend/x64/abi.cpp

@ -28,8 +28,7 @@ static_assert(ABI_SHADOW_SPACE <= 32);
static FrameInfo CalculateFrameInfo(const size_t num_gprs, const size_t num_xmms, size_t frame_size) {
// We are initially 8 byte aligned because the return value is pushed onto an aligned stack after a call.
// (It's an extra GPR save due to %rbp)
const size_t rsp_alignment = ((num_gprs + 1) % 2 == 0) ? 8 : 0;
const size_t rsp_alignment = (num_gprs % 2 == 0) ? 8 : 0;
const size_t total_xmm_size = num_xmms * XMM_SIZE;
if (frame_size & 0xF) {
frame_size += 0x10 - (frame_size & 0xF);
@ -49,8 +48,6 @@ void ABI_PushRegistersAndAdjustStack(BlockOfCode& code, const size_t frame_size,
const size_t num_xmms = std::count_if(regs.begin(), regs.end(), HostLocIsXMM);
const FrameInfo frame_info = CalculateFrameInfo(num_gprs, num_xmms, frame_size);
code.push(rbp);
code.mov(rbp, rsp);
for (auto const gpr : regs)
if (HostLocIsGPR(gpr))
code.push(HostLocToReg64(gpr));
@ -96,7 +93,6 @@ void ABI_PopRegistersAndAdjustStack(BlockOfCode& code, const size_t frame_size,
if (HostLocIsGPR(gpr))
code.pop(HostLocToReg64(gpr));
}
code.pop(rbp);
}
void ABI_PushCalleeSaveRegistersAndAdjustStack(BlockOfCode& code, const std::size_t frame_size) {

Loading…
Cancel
Save