[dynarmic] spinlock: (re-)allow RWE on execute-supported targets (#393)
regr. #273 Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: #393
This commit is contained in:
parent
2f82b63e6a
commit
ecc99ce9ab
1 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,12 @@
|
|||
#include "dynarmic/backend/x64/hostloc.h"
|
||||
#include "dynarmic/common/spin_lock.h"
|
||||
|
||||
#ifdef DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT
|
||||
static const auto default_cg_mode = Xbyak::DontSetProtectRWE;
|
||||
#else
|
||||
static const auto default_cg_mode = nullptr; //Allow RWE
|
||||
#endif
|
||||
|
||||
namespace Dynarmic {
|
||||
|
||||
void EmitSpinLockLock(Xbyak::CodeGenerator& code, Xbyak::Reg64 ptr, Xbyak::Reg32 tmp) {
|
||||
|
@ -37,7 +43,7 @@ namespace {
|
|||
struct SpinLockImpl {
|
||||
void Initialize();
|
||||
|
||||
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, Xbyak::DontSetProtectRWE);
|
||||
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, default_cg_mode);
|
||||
|
||||
void (*lock)(volatile int*);
|
||||
void (*unlock)(volatile int*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue