I am trying to use assembly code in Android app. I found an example code online.
This question may related to another question on Stackoverflow.Question Link
The code seems clear and easy to run. But after I do
$ ndk-build
in the root directory of the program.
Error Message is as the following:
[arm64-v8a] Compile : hello-jni <= multiple.s
jni/multiple.s:6:2: error: unexpected token at start of statement
@ Multiply by 10, input value and return value in r0
^
jni/multiple.s:7:10: error: unexpected token in argument list
stmfd sp!, {fp,ip,lr}
^
jni/multiple.s:8:6: error: invalid operand for instruction
mov r3, r0, asl #3
^
jni/multiple.s:9:6: error: invalid operand for instruction
add r0, r3, r0, asl #1
^
jni/multiple.s:10:10: error: unexpected token in argument list
ldmfd sp!, {fp,ip,lr}
^
jni/multiple.s:11:2: error: unrecognized instruction mnemonic
bx lr
^
make: *** [obj/local/arm64-v8a/objs/hello-jni/multiple.o] Error 1
Thanks for your help ! Do not know how to do now:)