Skip to content

Commit

Permalink
Fix compile warning on non-x86 targets, fix alios build error (#923)
Browse files Browse the repository at this point in the history
And fix os_thread_signal_init issue on windows platform
  • Loading branch information
wenyongh authored Dec 30, 2021
1 parent 20867c9 commit cdf3063
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions core/iwasm/common/wasm_runtime_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]; \
Expand All @@ -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]; \
} \
Expand Down
2 changes: 1 addition & 1 deletion core/shared/platform/windows/win_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ os_thread_signal_init()
bool ret;

if (thread_signal_inited)
return true;
return 0;

ret = SetThreadStackGuarantee(&StackSizeInBytes);
if (ret)
Expand Down
3 changes: 2 additions & 1 deletion product-mini/platforms/alios-things/aos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cdf3063

Please sign in to comment.