aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2025-11-07 16:50:14 +0100
committercrueter <crueter@eden-emu.dev>2025-11-07 16:50:14 +0100
commita1930d10635014903c282f30c56b7ffd22b60648 (patch)
tree121efda462113258eb352c7fe35de8371111c00a /src
parent48843306e2ea51b95525a0a5f04d2afac3193176 (diff)
[dynarmic] remove MCL_ARCHITECTURE macros; fix unreachable macro builtin (#2889)
Eventually we shall use std::unreachable() ONCE all platforms support it :) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2889 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src')
-rw-r--r--src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp6
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/emit_x64_floating_point.cpp18
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp18
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_saturation.cpp19
4 files changed, 9 insertions, 52 deletions
diff --git a/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp b/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp
index 85a3cdf7b8..9f508f72e5 100644
--- a/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp
+++ b/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp
@@ -188,15 +188,15 @@ private:
ExceptionHandler::ExceptionHandler() = default;
ExceptionHandler::~ExceptionHandler() = default;
-#if defined(MCL_ARCHITECTURE_X86_64)
+#if defined(ARCHITECTURE_x86_64)
void ExceptionHandler::Register(X64::BlockOfCode& code) {
impl = std::make_unique<Impl>(std::bit_cast<u64>(code.getCode()), code.GetTotalCodeSize());
}
-#elif defined(MCL_ARCHITECTURE_ARM64)
+#elif defined(ARCHITECTURE_arm64)
void ExceptionHandler::Register(oaknut::CodeBlock& mem, std::size_t size) {
impl = std::make_unique<Impl>(std::bit_cast<u64>(mem.ptr()), size);
}
-#elif defined(MCL_ARCHITECTURE_RISCV)
+#elif defined(ARCHITECTURE_riscv64)
void ExceptionHandler::Register(RV64::CodeBlock& mem, std::size_t size) {
impl = std::make_unique<Impl>(std::bit_cast<u64>(mem.ptr<u64>()), size);
}
diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_floating_point.cpp b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_floating_point.cpp
index d9bb254e9b..67d0e06808 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_floating_point.cpp
+++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_floating_point.cpp
@@ -36,22 +36,8 @@
#include "dynarmic/ir/basic_block.h"
#include "dynarmic/ir/microinstruction.h"
-#define FCODE(NAME) \
- [&code](auto... args) { \
- if constexpr (fsize == 32) { \
- code.NAME##s(args...); \
- } else { \
- code.NAME##d(args...); \
- } \
- }
-#define ICODE(NAME) \
- [&code](auto... args) { \
- if constexpr (fsize == 32) { \
- code.NAME##d(args...); \
- } else { \
- code.NAME##q(args...); \
- } \
- }
+#define FCODE(NAME) [&](auto... args) { if (fsize == 32) code.NAME##s(args...); else code.NAME##d(args...); }
+#define ICODE(NAME) [&](auto... args) { if (fsize == 32) code.NAME##d(args...); else code.NAME##q(args...); }
namespace Dynarmic::Backend::X64 {
diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp
index 66a179a481..0c93b517c1 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp
+++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_floating_point.cpp
@@ -36,22 +36,8 @@
#include "dynarmic/ir/basic_block.h"
#include "dynarmic/ir/microinstruction.h"
-#define FCODE(NAME) \
- [&code](auto... args) { \
- if constexpr (fsize == 32) { \
- code.NAME##s(args...); \
- } else { \
- code.NAME##d(args...); \
- } \
- }
-#define ICODE(NAME) \
- [&code](auto... args) { \
- if constexpr (fsize == 32) { \
- code.NAME##d(args...); \
- } else { \
- code.NAME##q(args...); \
- } \
- }
+#define FCODE(NAME) [&](auto... args) { if (fsize == 32) code.NAME##s(args...); else code.NAME##d(args...); }
+#define ICODE(NAME) [&](auto... args) { if (fsize == 32) code.NAME##d(args...); else code.NAME##q(args...); }
namespace Dynarmic::Backend::X64 {
diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_saturation.cpp b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_saturation.cpp
index 580a32dec8..412bb2bfaa 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_saturation.cpp
+++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_vector_saturation.cpp
@@ -14,23 +14,8 @@
#include "dynarmic/ir/microinstruction.h"
#include "dynarmic/ir/opcodes.h"
-#define FCODE(NAME) \
- [&code](auto... args) { \
- if constexpr (esize == 32) { \
- code.NAME##s(args...); \
- } else { \
- code.NAME##d(args...); \
- } \
- }
-
-#define ICODE(NAME) \
- [&code](auto... args) { \
- if constexpr (esize == 32) { \
- code.NAME##d(args...); \
- } else { \
- code.NAME##q(args...); \
- } \
- }
+#define FCODE(NAME) [&](auto... args) { if (esize == 32) code.NAME##s(args...); else code.NAME##d(args...); }
+#define ICODE(NAME) [&](auto... args) { if (esize == 32) code.NAME##d(args...); else code.NAME##q(args...); }
namespace Dynarmic::Backend::X64 {