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:
Wenyong Huang 2021-12-30 10:07:50 +08:00 committed by GitHub
parent 20867c9227
commit cdf306364e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -115,22 +115,22 @@ GET_F64_FROM_ADDR(uint32 *addr)
/* For STORE opcodes */
#define STORE_I64(addr, value) \
do { \
uintptr_t addr1 = (uintptr_t)(addr); \
uintptr_t addr_ = (uintptr_t)(addr); \
union { \
int64 val; \
uint32 u32[2]; \
uint16 u16[4]; \
uint8 u8[8]; \
} u; \
if ((addr1 & (uintptr_t)7) == 0) \
if ((addr_ & (uintptr_t)7) == 0) \
*(int64 *)(addr) = (int64)(value); \
else { \
u.val = (int64)(value); \
if ((addr1 & (uintptr_t)3) == 0) { \
if ((addr_ & (uintptr_t)3) == 0) { \
((uint32 *)(addr))[0] = u.u32[0]; \
((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))[1] = u.u16[1]; \
((uint16 *)(addr))[2] = u.u16[2]; \
@ -146,17 +146,17 @@ GET_F64_FROM_ADDR(uint32 *addr)
#define STORE_U32(addr, value) \
do { \
uintptr_t addr1 = (uintptr_t)(addr); \
uintptr_t addr_ = (uintptr_t)(addr); \
union { \
uint32 val; \
uint16 u16[2]; \
uint8 u8[4]; \
} u; \
if ((addr1 & (uintptr_t)3) == 0) \
if ((addr_ & (uintptr_t)3) == 0) \
*(uint32 *)(addr) = (uint32)(value); \
else { \
u.val = (uint32)(value); \
if ((addr1 & (uintptr_t)1) == 0) { \
if ((addr_ & (uintptr_t)1) == 0) { \
((uint16 *)(addr))[0] = u.u16[0]; \
((uint16 *)(addr))[1] = u.u16[1]; \
} \

View File

@ -614,7 +614,7 @@ os_thread_signal_init()
bool ret;
if (thread_signal_inited)
return true;
return 0;
ret = SetThreadStackGuarantee(&StackSizeInBytes);
if (ret)

View File

@ -112,6 +112,7 @@ endif
ifeq (${WAMR_BUILD_AOT}, 1)
$(NAME)_SOURCES += ${IWASM_ROOT}/aot/aot_loader.c \
${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