ARM ThumbEE自动空指针检查

ARM ThumbEE自动空指针检查,arm,thumb,Arm,Thumb,在ARM中,Thumb 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 instruct

在ARM中,Thumb 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 instructions
ARM手册说,当thumb EE指令试图引用空指针时,“将调用处理程序”。但谁来设定这个处理者的地址?怎么做?什么时候?我无法从ARM Thumb EE手册中得到答案。

请参阅ARM体系结构参考手册(ARM DDI 0406C)中的“B1.12 Thumb执行环境”一节

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
mrcp14,6,c1,c0,0;将TEEHBR读入Rt
MCR p14,6,c1,c0,0;将Rt写入TEEHBR
请注意,与Jazelle一样,ThumbEE也被ARM弃用