mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-01-18 20:48:29 +00:00
5b6e0ab238
* core: Split error codes into separate files * Reduces build times and is cleaner * core: Bring structs and enums to codebase style * core: More style changes
24 lines
758 B
C++
24 lines
758 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "common/types.h"
|
|
|
|
namespace Core {
|
|
|
|
/// 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();
|
|
|
|
/// Registers a module for patching, providing an area to generate trampoline code.
|
|
void RegisterPatchModule(void* module_ptr, u64 module_size, void* trampoline_area_ptr,
|
|
u64 trampoline_area_size);
|
|
|
|
/// Applies CPU patches that need to be done before beginning executions.
|
|
void PrePatchInstructions(u64 segment_addr, u64 segment_size);
|
|
|
|
} // namespace Core
|