Fix wamrc link error and arm assembly code issue (#335)

This commit is contained in:
Wenyong Huang 2020-08-05 09:07:30 +08:00 committed by GitHub
parent 37aae1bc49
commit aa7b0ba6b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,7 @@
invokeNative:
stmfd sp!, {r4, r5, r6, r7, lr}
sub sp, sp, #4 /* make sp 8 byte aligned */
mov ip, r0 /* ip = function ptr */
mov r4, r1 /* r4 = argv */
mov r5, r2 /* r5 = argc */
@ -48,7 +49,6 @@ invokeNative:
mov r6, r5, lsl#2 /* r6 = argc * 4 */
add r6, r6, #7 /* r6 = (r6 + 7) & ~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 */
mov r7, sp
@ -65,5 +65,6 @@ call_func:
add sp, sp, r6 /* restore sp */
return:
add sp, sp, #4
ldmfd sp!, {r4, r5, r6, r7, lr}
bx lr

View File

@ -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}/utils/shared_utils.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}/common/iwasm_common.cmake)
include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
@ -129,6 +130,7 @@ add_library (vmlib
${MEM_ALLOC_SHARED_SOURCE}
${UTILS_SHARED_SOURCE}
${UNCOMMON_SHARED_SOURCE}
${THREAD_MGR_SOURCE}
${LIBC_BUILTIN_SOURCE}
${IWASM_COMMON_SOURCE}
${IWASM_INTERP_SOURCE}