ref:http://kmittal82.wordpress.com/2012/02/17/armthumbthumb-2/ A few months ago I gave a presentation titled “Introduction to the ARM architecture”. One of the most well received sections of that was a bit where I explained the difference between the…
编译NDK项目时,编译器无法识别arm汇编,设置LOCAL_ARM_MODE := arm后问题解决, NDK文档上对LOCAL_ARM_MODE的说明如下: LOCAL_ARM_MODE By default, ARM target binaries are generated in 'thumb' mode, where each instruction are 16-bit wide, and linked with /thumb STL libraries. You can define…
通常函数返回使用 pop {r7,pc}或bx lr等方式(bx,b类似jmp为跳转指令,但bx可以指定跳转区域究竟为thumb还是arm指令.thumb指令指令的时候,直接填写该地址却总是产生SIGSYS信号(非法指令执行).原因就是该函数为thumb指令,因此跳转时必须要把指令地址的最低位设置为1(bx 通过这一位来区分指令集),所以函数地址就加了一. thumb指令集与arm指令集切换 mov R0,# ;Argument to function is in R0 add R1,PC,#…