2024-07-09 09:18:34 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Xbyak {
|
|
|
|
class CodeGenerator;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
2024-07-19 08:09:07 +00:00
|
|
|
/// Initializes a stack for the current thread for use by patch implementations.
|
|
|
|
void InitializeThreadPatchStack();
|
|
|
|
|
|
|
|
/// Cleans up the patch stack for the current thread.
|
|
|
|
void CleanupThreadPatchStack();
|
|
|
|
|
2024-07-14 04:38:20 +00:00
|
|
|
/// Patches CPU instructions that cannot run as-is on the host.
|
2024-07-09 09:18:34 +00:00
|
|
|
void PatchInstructions(u64 segment_addr, u64 segment_size, Xbyak::CodeGenerator& c);
|
|
|
|
|
|
|
|
} // namespace Core
|