mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Fix compile warning on non-x86 targets, fix alios build error (#923)
And fix os_thread_signal_init issue on windows platform
This commit is contained in:
parent
20867c9227
commit
cdf306364e
|
@ -115,22 +115,22 @@ GET_F64_FROM_ADDR(uint32 *addr)
|
||||||
/* For STORE opcodes */
|
/* For STORE opcodes */
|
||||||
#define STORE_I64(addr, value) \
|
#define STORE_I64(addr, value) \
|
||||||
do { \
|
do { \
|
||||||
uintptr_t addr1 = (uintptr_t)(addr); \
|
uintptr_t addr_ = (uintptr_t)(addr); \
|
||||||
union { \
|
union { \
|
||||||
int64 val; \
|
int64 val; \
|
||||||
uint32 u32[2]; \
|
uint32 u32[2]; \
|
||||||
uint16 u16[4]; \
|
uint16 u16[4]; \
|
||||||
uint8 u8[8]; \
|
uint8 u8[8]; \
|
||||||
} u; \
|
} u; \
|
||||||
if ((addr1 & (uintptr_t)7) == 0) \
|
if ((addr_ & (uintptr_t)7) == 0) \
|
||||||
*(int64 *)(addr) = (int64)(value); \
|
*(int64 *)(addr) = (int64)(value); \
|
||||||
else { \
|
else { \
|
||||||
u.val = (int64)(value); \
|
u.val = (int64)(value); \
|
||||||
if ((addr1 & (uintptr_t)3) == 0) { \
|
if ((addr_ & (uintptr_t)3) == 0) { \
|
||||||
((uint32 *)(addr))[0] = u.u32[0]; \
|
((uint32 *)(addr))[0] = u.u32[0]; \
|
||||||
((uint32 *)(addr))[1] = u.u32[1]; \
|
((uint32 *)(addr))[1] = u.u32[1]; \
|
||||||
} \
|
} \
|
||||||
else if ((addr1 & (uintptr_t)1) == 0) { \
|
else if ((addr_ & (uintptr_t)1) == 0) { \
|
||||||
((uint16 *)(addr))[0] = u.u16[0]; \
|
((uint16 *)(addr))[0] = u.u16[0]; \
|
||||||
((uint16 *)(addr))[1] = u.u16[1]; \
|
((uint16 *)(addr))[1] = u.u16[1]; \
|
||||||
((uint16 *)(addr))[2] = u.u16[2]; \
|
((uint16 *)(addr))[2] = u.u16[2]; \
|
||||||
|
@ -146,17 +146,17 @@ GET_F64_FROM_ADDR(uint32 *addr)
|
||||||
|
|
||||||
#define STORE_U32(addr, value) \
|
#define STORE_U32(addr, value) \
|
||||||
do { \
|
do { \
|
||||||
uintptr_t addr1 = (uintptr_t)(addr); \
|
uintptr_t addr_ = (uintptr_t)(addr); \
|
||||||
union { \
|
union { \
|
||||||
uint32 val; \
|
uint32 val; \
|
||||||
uint16 u16[2]; \
|
uint16 u16[2]; \
|
||||||
uint8 u8[4]; \
|
uint8 u8[4]; \
|
||||||
} u; \
|
} u; \
|
||||||
if ((addr1 & (uintptr_t)3) == 0) \
|
if ((addr_ & (uintptr_t)3) == 0) \
|
||||||
*(uint32 *)(addr) = (uint32)(value); \
|
*(uint32 *)(addr) = (uint32)(value); \
|
||||||
else { \
|
else { \
|
||||||
u.val = (uint32)(value); \
|
u.val = (uint32)(value); \
|
||||||
if ((addr1 & (uintptr_t)1) == 0) { \
|
if ((addr_ & (uintptr_t)1) == 0) { \
|
||||||
((uint16 *)(addr))[0] = u.u16[0]; \
|
((uint16 *)(addr))[0] = u.u16[0]; \
|
||||||
((uint16 *)(addr))[1] = u.u16[1]; \
|
((uint16 *)(addr))[1] = u.u16[1]; \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -614,7 +614,7 @@ os_thread_signal_init()
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
if (thread_signal_inited)
|
if (thread_signal_inited)
|
||||||
return true;
|
return 0;
|
||||||
|
|
||||||
ret = SetThreadStackGuarantee(&StackSizeInBytes);
|
ret = SetThreadStackGuarantee(&StackSizeInBytes);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
|
@ -112,6 +112,7 @@ endif
|
||||||
ifeq (${WAMR_BUILD_AOT}, 1)
|
ifeq (${WAMR_BUILD_AOT}, 1)
|
||||||
$(NAME)_SOURCES += ${IWASM_ROOT}/aot/aot_loader.c \
|
$(NAME)_SOURCES += ${IWASM_ROOT}/aot/aot_loader.c \
|
||||||
${IWASM_ROOT}/aot/arch/${AOT_RELOC} \
|
${IWASM_ROOT}/aot/arch/${AOT_RELOC} \
|
||||||
${IWASM_ROOT}/aot/aot_runtime.c
|
${IWASM_ROOT}/aot/aot_runtime.c \
|
||||||
|
${IWASM_ROOT}/aot/aot_intrinsic.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user