Automatic date update in version.in
[binutils-gdb.git] / sim / testsuite / frv / icul.cgs
blobb112f41f5eaea7d5011a4188b1d7849d465910a4
1 # FRV testcase for icul $GRi
2 # mach: all
4         .include "testutils.inc"
6         start
8         .global icul
9 icul:
10         or_spr_immed    0xc8000000,hsr0 ; caches enabled -- copy-back mode
12         ; preload and lock all the lines in set 0 of the insn cache
13         set_gr_immed    0x70000,gr10
14         set_bctrlr_0_0  gr10
15         lock_insn_cache gr10
17         inc_gr_immed    0x1000,gr10
18         set_bctrlr_0_0  gr10
19         lock_insn_cache gr10
21         inc_gr_immed    0x1000,gr10
22         set_bctrlr_0_0  gr10
23         lock_insn_cache gr10
25         inc_gr_immed    0x1000,gr10
26         set_bctrlr_0_0  gr10
27         lock_insn_cache gr10
29         ; execute the pre-loaded insn
30         set_gr_immed    0x70000,gr10
31         calll           @(gr10,gr0)     ; should come right back
32         inc_gr_immed    0x1000,gr10
33         calll           @(gr10,gr0)     ; should come right back
34         inc_gr_immed    0x1000,gr10
35         calll           @(gr10,gr0)     ; should come right back
36         inc_gr_immed    0x1000,gr10
37         calll           @(gr10,gr0)     ; should come right back
39         ; Now execute another insn which would have gone into set 0.
40         inc_gr_immed    0x1000,gr10
41         set_bctrlr_0_0  gr10
42         set_spr_immed   128,lcr
43         calll           @(gr10,gr0)     ; should come right back
45         ; Now unlock one of the lines and do it again
46         set_gr_immed    0x71000,gr10
47         icul            gr10
48         calll           @(gr10,gr0)     ; should come right back
50         inc_gr_immed    0x3000,gr10
51         calll           @(gr10,gr0)     ; should come right back
53         pass