mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 20:56:13 +00:00
Fix wamrc link error and arm assembly code issue (#335)
This commit is contained in:
parent
37aae1bc49
commit
aa7b0ba6b6
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
invokeNative:
|
invokeNative:
|
||||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||||
|
sub sp, sp, #4 /* make sp 8 byte aligned */
|
||||||
mov ip, r0 /* ip = function ptr */
|
mov ip, r0 /* ip = function ptr */
|
||||||
mov r4, r1 /* r4 = argv */
|
mov r4, r1 /* r4 = argv */
|
||||||
mov r5, r2 /* r5 = argc */
|
mov r5, r2 /* r5 = argc */
|
||||||
|
@ -48,7 +49,6 @@ invokeNative:
|
||||||
mov r6, r5, lsl#2 /* r6 = argc * 4 */
|
mov r6, r5, lsl#2 /* r6 = argc * 4 */
|
||||||
add r6, r6, #7 /* r6 = (r6 + 7) & ~7 */
|
add r6, r6, #7 /* r6 = (r6 + 7) & ~7 */
|
||||||
bic r6, r6, #7
|
bic r6, r6, #7
|
||||||
add r6, r6, #4 /* +4 because odd(5) registers are in stack */
|
|
||||||
sub sp, sp, r6 /* reserved stack space for left arguments */
|
sub sp, sp, r6 /* reserved stack space for left arguments */
|
||||||
mov r7, sp
|
mov r7, sp
|
||||||
|
|
||||||
|
@ -65,5 +65,6 @@ call_func:
|
||||||
add sp, sp, r6 /* restore sp */
|
add sp, sp, r6 /* restore sp */
|
||||||
|
|
||||||
return:
|
return:
|
||||||
|
add sp, sp, #4
|
||||||
ldmfd sp!, {r4, r5, r6, r7, lr}
|
ldmfd sp!, {r4, r5, r6, r7, lr}
|
||||||
bx lr
|
bx lr
|
||||||
|
|
|
@ -101,6 +101,7 @@ include (${SHARED_DIR}/platform/${WAMR_BUILD_PLATFORM}/shared_platform.cmake)
|
||||||
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
|
include (${SHARED_DIR}/mem-alloc/mem_alloc.cmake)
|
||||||
include (${SHARED_DIR}/utils/shared_utils.cmake)
|
include (${SHARED_DIR}/utils/shared_utils.cmake)
|
||||||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||||
|
include (${IWASM_DIR}/libraries/thread-mgr/thread_mgr.cmake)
|
||||||
include (${IWASM_DIR}/libraries/libc-builtin/libc_builtin.cmake)
|
include (${IWASM_DIR}/libraries/libc-builtin/libc_builtin.cmake)
|
||||||
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
||||||
include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
|
include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
|
||||||
|
@ -129,6 +130,7 @@ add_library (vmlib
|
||||||
${MEM_ALLOC_SHARED_SOURCE}
|
${MEM_ALLOC_SHARED_SOURCE}
|
||||||
${UTILS_SHARED_SOURCE}
|
${UTILS_SHARED_SOURCE}
|
||||||
${UNCOMMON_SHARED_SOURCE}
|
${UNCOMMON_SHARED_SOURCE}
|
||||||
|
${THREAD_MGR_SOURCE}
|
||||||
${LIBC_BUILTIN_SOURCE}
|
${LIBC_BUILTIN_SOURCE}
|
||||||
${IWASM_COMMON_SOURCE}
|
${IWASM_COMMON_SOURCE}
|
||||||
${IWASM_INTERP_SOURCE}
|
${IWASM_INTERP_SOURCE}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user