1 # frv testcase to generate interrupt for st $GRk,@($GRi,$GRj)
3 # sim(fr550): --memory-region 0xfeff0600,0x8000 --memory-region 0xfe800000,0x7f0010
4 .include "testutils.inc"
10 and_spr_immed -4081,tbr ; clear tbr.tt
12 inc_gr_immed 0x140,gr17 ; address of exception handler
20 set_gr_immed 0xdeadbeef,gr15
21 set_gr_addr 0xfeff0600,gr17
22 bad1: sti gr15,@(gr17,0) ; no interrupt
25 set_gr_immed 0xbeefdead,gr15
26 set_gr_addr 0xfeff7ffc,gr17
27 bad2: sti gr15,@(gr17,0) ; no interrupt
30 set_gr_immed 0xbeefbeef,gr15
31 set_gr_addr 0xfe800000,gr17
32 bad3: sti gr15,@(gr17,0) ; cause interrupt
35 set_gr_immed 0xdeaddead,gr15
36 set_gr_addr 0xfefefffc,gr17
37 bad4: sti gr15,@(gr17,0) ; cause interrupt
40 sti gr0,@(sp,0) ; no interrupt
46 test_spr_immed 0x4000,esfr1 ; esr14 is active
47 test_spr_bits 0x0001,0,0x1,esr14 ; esr14 is valid
48 test_spr_bits 0x003e,1,0x0,esr14 ; esr14.ec is set
49 test_spr_bits 0x0800,11,0x0,esr14 ; esr14.eav is not set