Browse Source
[compat] fix spinlock default ctor causing crash on OpenBSD
Signed-off-by: lizzie <lizzie@eden-emu.dev>
pull/273/head
lizzie
7 months ago
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
3 changed files with
5 additions and
5 deletions
-
docs/build/OpenBSD.md
-
src/dynarmic/src/dynarmic/backend/x64/block_of_code.cpp
-
src/dynarmic/src/dynarmic/common/spin_lock_x64.cpp
|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
```sh |
|
|
|
pkg_add -u |
|
|
|
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 |
|
|
|
pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gmake llvm-19.1.7p3 qt6 |
|
|
|
git --recursive https://git.eden-emu.dev/eden-emu/eden |
|
|
|
cmake -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DDYNARMIC_USE_PRECOMPILED_HEADERS=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_QT=OFF -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -B /usr/obj/eden |
|
|
|
``` |
|
|
|
|
|
|
|
@ -225,10 +225,10 @@ bool IsUnderRosetta() { |
|
|
|
|
|
|
|
} // anonymous namespace
|
|
|
|
|
|
|
|
#ifdef __OpenBSD__
|
|
|
|
constexpr auto default_cg_mode = Xbyak::DontSetProtectRWE; |
|
|
|
#ifdef DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT
|
|
|
|
static const auto default_cg_mode = Xbyak::DontSetProtectRWE; |
|
|
|
#else
|
|
|
|
constexpr auto default_cg_mode = nullptr; //Allow RWE
|
|
|
|
static const auto default_cg_mode = nullptr; //Allow RWE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
BlockOfCode::BlockOfCode(RunCodeCallbacks cb, JitStateInfo jsi, size_t total_code_size, std::function<void(BlockOfCode&)> rcp) |
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ namespace { |
|
|
|
struct SpinLockImpl { |
|
|
|
void Initialize(); |
|
|
|
|
|
|
|
Xbyak::CodeGenerator code; |
|
|
|
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, Xbyak::DontSetProtectRWE); |
|
|
|
|
|
|
|
void (*lock)(volatile int*); |
|
|
|
void (*unlock)(volatile int*); |
|
|
|
|