1 //Original:/proj/frio/dv/testcases/core/c_progctrl_except_rtx/c_progctrl_except_rtx.dsp
2 // Spec Reference: c_progctrl_except_rtx
4 # sim: --environment operating
7 .include "testutils.inc"
11 include(selfcheck.inc)
14 //CHECK_INIT(p5, 0xe0000000);
17 // load address of exception handler
19 P0 = 0x200C (Z); // 0xFFE0200C EVT3 EXCEPTION
21 R0 = exception_handler (Z); // wr address of exception handler to MMR EVT3
22 R0.H = exception_handler;
25 // Jump to User mode and enable exceptions
30 RTI; // cause it to go to Midusercode, .dd cause exception
38 CHECKREG(r0, 0x00000000);
39 CHECKREG(r1, 0x00000001);
40 CHECKREG(r2, 0x00000002);
41 CHECKREG(r3, 0x00000003);
42 CHECKREG(r5, 0x00000000);
43 CHECKREG(r6, 0x00000000);
44 CHECKREG(r7, 0x00000000);
45 CHECKREG(p1, 0x00000001);
46 CHECKREG(p2, 0x00000002);
47 CHECKREG(p3, 0x00000003);
48 CHECKREG(p4, 0x00000004);
71 IF !CC JUMP BeginUserCode;
84 R4 = RETX; // error handler: RETX has the address of the same Illegal instr
89 R4 += 4; // we have to add 4 to point to next instr after return
92 RTX; // return from exception
94 .section MEM_DATA_ADDR_1,"aw"