From 38bdbf4c4f2bcbe8dcc326dd5bfcf6eed3c74aac Mon Sep 17 00:00:00 2001 From: lizzie Date: Tue, 19 May 2026 07:06:12 +0000 Subject: [PATCH] fx --- src/common/x64/xbyak.h | 3 +-- src/dynarmic/CMakeLists.txt | 4 ++++ src/dynarmic/src/dynarmic/backend/x64/block_of_code.cpp | 7 +------ src/dynarmic/src/dynarmic/backend/x64/xbyak.h | 1 + 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/common/x64/xbyak.h b/src/common/x64/xbyak.h index 11d3e2b184..fae76608d5 100644 --- a/src/common/x64/xbyak.h +++ b/src/common/x64/xbyak.h @@ -25,14 +25,13 @@ #include "common/container/unordered_map.h" #include "common/container/unordered_set.h" #include +#define XBYAK_NO_EXCEPTION 1 #define XBYAK_STD_UNORDERED_SET ::Common::unordered_set #define XBYAK_STD_UNORDERED_MAP ::Common::unordered_map #define XBYAK_STD_UNORDERED_MULTIMAP boost::unordered_multimap #include #include -#include - namespace Common::X64 { constexpr size_t RegToIndex(const Xbyak::Reg& reg) { diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt index bacbd7ab57..a34b3aba32 100644 --- a/src/dynarmic/CMakeLists.txt +++ b/src/dynarmic/CMakeLists.txt @@ -113,6 +113,10 @@ else() # Clang mistakenly blames CMake for using unused arguments during compilation list(APPEND DYNARMIC_CXX_FLAGS -Wno-unused-command-line-argument) endif() + # TODO: oaknut exceptions + if ("x86_64" IN_LIST ARCHITECTURE) + list(APPEND DYNARMIC_CXX_FLAGS -fno-exceptions) + endif() endif() if (NOT Boost_FOUND) diff --git a/src/dynarmic/src/dynarmic/backend/x64/block_of_code.cpp b/src/dynarmic/src/dynarmic/backend/x64/block_of_code.cpp index 24bfa799f2..3b451601fe 100644 --- a/src/dynarmic/src/dynarmic/backend/x64/block_of_code.cpp +++ b/src/dynarmic/src/dynarmic/backend/x64/block_of_code.cpp @@ -465,13 +465,8 @@ size_t BlockOfCode::GetTotalCodeSize() const { } void* BlockOfCode::AllocateFromCodeSpace(size_t alloc_size) { - if (size_ + alloc_size >= maxSize_) { - using Xbyak::Error; - XBYAK_THROW(Xbyak::ERR_CODE_IS_TOO_BIG); - } - + ASSERT(size_ + alloc_size < maxSize_); EnsureMemoryCommitted(alloc_size); - void* ret = getCurr(); size_ += alloc_size; memset(ret, 0, alloc_size); diff --git a/src/dynarmic/src/dynarmic/backend/x64/xbyak.h b/src/dynarmic/src/dynarmic/backend/x64/xbyak.h index 9dc67f3778..7fe4b36a00 100644 --- a/src/dynarmic/src/dynarmic/backend/x64/xbyak.h +++ b/src/dynarmic/src/dynarmic/backend/x64/xbyak.h @@ -7,6 +7,7 @@ #include "common/container/unordered_map.h" #include "common/container/unordered_set.h" #include +#define XBYAK_NO_EXCEPTION 1 #define XBYAK_STD_UNORDERED_SET ::Common::unordered_set #define XBYAK_STD_UNORDERED_MAP ::Common::unordered_map #define XBYAK_STD_UNORDERED_MULTIMAP boost::unordered_multimap