在 MIPS32 架构中导致寄存器的值
Cause register's value in MIPS32 architecture
如果原因寄存器中的值是,例如,0x00000100
,我如何获得生成该代码的异常类型?(来自下面的table)
0 Int interrupt (hardware)
4 AdEL address error exception (load or instruction fetch)
5 AdES address error exception (store)
6 IBE bus error on instruction fetch
7 DBE bus error on data load or store
8 Sys syscall exception
9 Bp breakpoint exception
10 RI reserved instruction exception
11 CpU coprocessor unimplemented
12 Ov arithmetic overfl ow exception
13 Tr trap
15 FPE fl oating point
这在 MIPS32™ 程序员架构中名为 6.15 状态寄存器(CP 寄存器 12,Select0) 的部分中进行了描述
第三卷:MIPS32™ 特权资源
架构.
Cause Register Format
31 | 30 | 29 28 | 27 24 | 23 | 22 | 21 16 | 15 8 | 7 | 6 2 | 1 0
------------------------------------------------------------------------
BD | 0 | CE | 0 | IV | WP | 0 | IP | 0 | ExcCode | 0
IP[1:0] Controls the request for software interrupts
在您使用 0x100 的示例中,这意味着仅设置了原因寄存器的 IP0
(位 8),这意味着原因是软件中断请求(具体为软件中断 0)。
如果原因寄存器中的值是,例如,0x00000100
,我如何获得生成该代码的异常类型?(来自下面的table)
0 Int interrupt (hardware)
4 AdEL address error exception (load or instruction fetch)
5 AdES address error exception (store)
6 IBE bus error on instruction fetch
7 DBE bus error on data load or store
8 Sys syscall exception
9 Bp breakpoint exception
10 RI reserved instruction exception
11 CpU coprocessor unimplemented
12 Ov arithmetic overfl ow exception
13 Tr trap
15 FPE fl oating point
这在 MIPS32™ 程序员架构中名为 6.15 状态寄存器(CP 寄存器 12,Select0) 的部分中进行了描述 第三卷:MIPS32™ 特权资源 架构.
Cause Register Format
31 | 30 | 29 28 | 27 24 | 23 | 22 | 21 16 | 15 8 | 7 | 6 2 | 1 0 ------------------------------------------------------------------------ BD | 0 | CE | 0 | IV | WP | 0 | IP | 0 | ExcCode | 0 IP[1:0] Controls the request for software interrupts
在您使用 0x100 的示例中,这意味着仅设置了原因寄存器的 IP0
(位 8),这意味着原因是软件中断请求(具体为软件中断 0)。