mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-23 09:17:02 +02:00
Revert "[common, hle/kernel] Remove LTO_NOINLINE (#2908)"
This reverts commit 2dc6d773ee.
This commit is contained in:
parent
b9e052b3a7
commit
d3b0541c44
2 changed files with 13 additions and 10 deletions
|
|
@ -1,6 +1,3 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
|
@ -34,6 +31,12 @@
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define locale_t _locale_t // Locale Cross-Compatibility
|
# define locale_t _locale_t // Locale Cross-Compatibility
|
||||||
|
#define LTO_NOINLINE __attribute__((noinline))
|
||||||
|
|
||||||
|
#else // _MSC_VER
|
||||||
|
|
||||||
|
#define LTO_NOINLINE
|
||||||
|
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
||||||
#define DECLARE_ENUM_FLAG_OPERATORS(type) \
|
#define DECLARE_ENUM_FLAG_OPERATORS(type) \
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ struct KernelCore::Impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the host thread ID for the caller.
|
/// Sets the host thread ID for the caller.
|
||||||
u32 SetHostThreadId(std::size_t core_id) {
|
LTO_NOINLINE u32 SetHostThreadId(std::size_t core_id) {
|
||||||
// This should only be called during core init.
|
// This should only be called during core init.
|
||||||
ASSERT(tls_data.host_thread_id == UINT8_MAX);
|
ASSERT(tls_data.host_thread_id == UINT8_MAX);
|
||||||
|
|
||||||
|
|
@ -367,12 +367,12 @@ struct KernelCore::Impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Gets the host thread ID for the caller
|
/// Gets the host thread ID for the caller
|
||||||
u32 GetHostThreadId() const {
|
LTO_NOINLINE u32 GetHostThreadId() const {
|
||||||
return tls_data.host_thread_id;
|
return tls_data.host_thread_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the dummy KThread for the caller, allocating a new one if this is the first time
|
// Gets the dummy KThread for the caller, allocating a new one if this is the first time
|
||||||
KThread* GetHostDummyThread(KThread* existing_thread) {
|
LTO_NOINLINE KThread* GetHostDummyThread(KThread* existing_thread) {
|
||||||
if (tls_data.thread == nullptr) {
|
if (tls_data.thread == nullptr) {
|
||||||
auto const initialize{[](KThread* thread) {
|
auto const initialize{[](KThread* thread) {
|
||||||
ASSERT(KThread::InitializeDummyThread(thread, nullptr).IsSuccess());
|
ASSERT(KThread::InitializeDummyThread(thread, nullptr).IsSuccess());
|
||||||
|
|
@ -406,10 +406,10 @@ struct KernelCore::Impl {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forces singlecore
|
// Forces singlecore
|
||||||
bool IsPhantomModeForSingleCore() const {
|
LTO_NOINLINE bool IsPhantomModeForSingleCore() const {
|
||||||
return tls_data.is_phantom_mode_for_singlecore;
|
return tls_data.is_phantom_mode_for_singlecore;
|
||||||
}
|
}
|
||||||
void SetIsPhantomModeForSingleCore(bool value) {
|
LTO_NOINLINE void SetIsPhantomModeForSingleCore(bool value) {
|
||||||
ASSERT(!is_multicore);
|
ASSERT(!is_multicore);
|
||||||
tls_data.is_phantom_mode_for_singlecore = value;
|
tls_data.is_phantom_mode_for_singlecore = value;
|
||||||
}
|
}
|
||||||
|
|
@ -418,13 +418,13 @@ struct KernelCore::Impl {
|
||||||
return is_shutting_down.load(std::memory_order_relaxed);
|
return is_shutting_down.load(std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
KThread* GetCurrentEmuThread() {
|
LTO_NOINLINE KThread* GetCurrentEmuThread() {
|
||||||
if (!tls_data.current_thread)
|
if (!tls_data.current_thread)
|
||||||
tls_data.current_thread = GetHostDummyThread(nullptr);
|
tls_data.current_thread = GetHostDummyThread(nullptr);
|
||||||
return tls_data.current_thread;
|
return tls_data.current_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentEmuThread(KThread* thread) {
|
LTO_NOINLINE void SetCurrentEmuThread(KThread* thread) {
|
||||||
tls_data.current_thread = thread;
|
tls_data.current_thread = thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue