在ARM中,拇指-EE指令集支持自动空指针检查.
In ThumbEE state, the processor uses almost the same instruction set as Thumb-2 although some instructions behave differently, and a few are removed, or added.
The key differences are:
additional state changing instructions in both Thumb state and ThumbEE state
new instructions to branch to handlers
null pointer checking on loads and stores
an additional instruction in ThumbEE state to check array bounds
some other modifications to the load, store, and branch instructionsARM手册说,当拇指-EE指令试图引用空指针时,将调用一个“处理程序”。但是谁来设置这个处理程序的地址呢?怎么做?什么时候?我无法从手臂拇指-EE手册中得到答案。
发布于 2014-06-11 15:36:38
参见ARM架构参考手册(ARM DDI 0406C)中的"B1.12拇指执行环境“一节。
ThumbEE检查处理程序的基本地址保存在TEEHBR寄存器中,该寄存器驻留在CP14 sysrem寄存器空间中:
MRC p14, 6, <Rt>, c1, c0, 0 ; Read TEEHBR into Rt
MCR p14, 6, <Rt>, c1, c0, 0 ; Write Rt to TEEHBR注意,ThumbEE和Jazelle一样,被ARM否决了。
https://stackoverflow.com/questions/24165955
复制相似问题