1 //Original:/proj/frio/dv/testcases/core/c_except_illopcode/c_except_illopcode.dsp
2 // Spec Reference: c_exception illegal opcode
4 # sim: --environment operating
7 .include "testutils.inc"
11 include(selfcheck.inc)
14 //CHECK_INIT(p5, 0xe0000000);
18 // load address of exception handler
20 P0 = 0x200C (Z); // 0xFFE0200C EVT3 EXCEPTION
22 R0 = exception_handler (Z); // wr address of exception handler to MMR EVT3
23 R0.H = exception_handler;
26 // Jump to User mode and enable exceptions
31 RTI; // cause it to go to Midusercode, .dd cause exception
39 CHECKREG(r0, 0x00000000);
40 CHECKREG(r1, 0x00000001);
41 CHECKREG(r2, 0x00000002);
42 CHECKREG(r3, 0x00000003);
43 // CHECKREG(r4, 0x00000098);
44 CHECKREG(r5, 0x00000005);
45 CHECKREG(r6, 0x00000006);
46 CHECKREG(r7, 0x00000007);
47 CHECKREG(p1, 0x00000001);
48 CHECKREG(p2, 0x00000002);
49 CHECKREG(p3, 0x00000003);
50 CHECKREG(p4, 0x00000004);
73 IF !CC JUMP BeginUserCode;
87 R4 = RETX; // error handler: RETX has the address of the same Illegal instr
91 R4 += 4; // we have to add 4 to point to next instr after return
94 RTX; // return from exception
97 .section MEM_DATA_ADDR_1,"aw"