Browse Source

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

This partially reverts commit 50f8d4130d.

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
pull/3176/head
Caio Oliveira 7 days ago
parent
commit
d0e42f1b61
No known key found for this signature in database GPG Key ID: AAAE6C7FD4186B0C
  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