1 # cr16 testcase for excp uimm4
4 .include "testutils.inc"
10 pass # pass macro use the excp 8
12 ## Test 1: bbpsw = 0, bpsw = 1, psw = 0
14 # # bbsm = 0, bie = 0, bbcond = 0
18 # # bsm = 1, bie = 1, bcond = 1, sm = 0, ie = 0, cond = 0
30 # # Copy excp2_handler to excp area of memory.
31 # ld24 r0,#0x48 # address of excp 2 handler
32 # ld24 r1,#excp2_handler
35 # # Set up return address.
43 # # test bbsm = 1, bbie = 1, bbcond = 1
47 # # test bsm = 0, bie = 0, bcond = 0, sm = 0, ie = 0, cond = 0
55 # # test bpc = proper return address
57 # test_h_gr r4, excp_insn1 + 4
59 ## Test 2: bbpsw = 1, bpsw = 0, psw = 1
61 # # bbsm = 1, bie = 1, bbcond = 1
65 # # bsm = 0, bie = 0, bcond = 0, sm = 1, ie = 1, cond = 1
77 # # Set up return address.
85 # # test bbsm = 0, bbie = 0, bbcond = 0
89 # # test bsm = 1, bie = 1, bcond = 1, sm = 1, ie = 0, cond = 0
91 # test_h_gr r4, 0xc180
97 # # test bpc = proper return address
99 # test_h_gr r4, excp_insn2 + 4
105 ## Don't use rte as it will undo the effects of excp we're testing.