Add cmake variable to disable writing gs register (#2284)
Support to disable writing x86-64 GS segment register by `cmake -DWAMR_DISABLE_WRITE_GS_BASE=1` and update document. Issue was reported in #2273.
This commit is contained in:
@ -63,6 +63,7 @@ typedef sem_t korp_sem;
|
||||
|
||||
#define bh_socket_t int
|
||||
|
||||
#if WASM_DISABLE_WRITE_GS_BASE == 0
|
||||
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
|
||||
#define os_writegsbase(base_addr) \
|
||||
do { \
|
||||
@ -76,6 +77,7 @@ typedef sem_t korp_sem;
|
||||
_writegsbase_u64(((uint64)(uintptr_t)base_addr))
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if WASM_DISABLE_HW_BOUND_CHECK == 0
|
||||
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64) \
|
||||
|
||||
Reference in New Issue
Block a user