summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2023-08-16 23:28:33 +0200
committerJosJuice <josjuice@gmail.com>2023-08-17 19:19:25 +0200
commit1104b93ee4944313d39bb7869dcba1ff21758d6d (patch)
tree4510a70db6bec40575a65c535482e1e090fc8747 /Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp
parent2b17e89336ed09db7298ca66a7c697a4db9d3cf9 (diff)
UnitTests: Declare as CPU thread when using CPUThreadConfigCallback
This fixes a bunch of DEBUG_ASSERTs in the unit tests.
Diffstat (limited to 'Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp')
-rw-r--r--Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp b/Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp
index 0e87fddcda..588a1622ef 100644
--- a/Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp
+++ b/Source/UnitTests/Core/PowerPC/JitArm64/ConvertSingleDouble.cpp
@@ -7,6 +7,8 @@
#include "Common/BitUtils.h"
#include "Common/CommonTypes.h"
#include "Common/FPURoundMode.h"
+#include "Common/ScopeGuard.h"
+#include "Core/Core.h"
#include "Core/PowerPC/Interpreter/Interpreter_FPUtils.h"
#include "Core/PowerPC/JitArm64/Jit.h"
#include "Core/System.h"
@@ -120,6 +122,9 @@ private:
TEST(JitArm64, ConvertDoubleToSingle)
{
+ Core::DeclareAsCPUThread();
+ Common::ScopeGuard cpu_thread_guard([] { Core::UndeclareAsCPUThread(); });
+
TestConversion test(Core::System::GetInstance());
for (const u64 input : double_test_values)
@@ -155,6 +160,9 @@ TEST(JitArm64, ConvertDoubleToSingle)
TEST(JitArm64, ConvertSingleToDouble)
{
+ Core::DeclareAsCPUThread();
+ Common::ScopeGuard cpu_thread_guard([] { Core::UndeclareAsCPUThread(); });
+
TestConversion test(Core::System::GetInstance());
for (const u32 input : single_test_values)