1 # FRV testcase for dcul GRi
4 .include "../testutils.inc"
10 or_spr_immed 0xc8000000,hsr0 ; caches enabled -- copy-back mode
12 ; preload and lock all the lines in set 0 of the data cache
13 set_gr_immed 0x70000,gr10
15 set_mem_immed 0x11111111,gr10
16 test_mem_immed 0x11111111,gr10
18 inc_gr_immed 0x2000,gr10
21 set_mem_immed 0x22222222,gr10
22 test_mem_immed 0x22222222,gr10
24 inc_gr_immed 0x2000,gr10
27 set_mem_immed 0x33333333,gr10
28 test_mem_immed 0x33333333,gr10
30 inc_gr_immed 0x2000,gr10
33 set_mem_immed 0x44444444,gr10
34 test_mem_immed 0x44444444,gr10
36 ; Now write to another address which should be in the same set
37 ; the write should go through to memory, since all the lines in the
39 inc_gr_immed 0x2000,gr10
40 set_mem_immed 0xdeadbeef,gr10
41 test_mem_immed 0xdeadbeef,gr10
43 ; Invalidate the data cache. Only the last value stored should have made
44 ; it through to memory
45 set_gr_immed 0x70000,gr10
46 invalidate_data_cache gr10
49 inc_gr_immed 0x2000,gr10
50 invalidate_data_cache gr10
53 inc_gr_immed 0x2000,gr10
54 invalidate_data_cache gr10
57 inc_gr_immed 0x2000,gr10
58 invalidate_data_cache gr10
61 inc_gr_immed 0x2000,gr10
62 invalidate_data_cache gr10
63 test_mem_immed 0xdeadbeef,gr10
65 ; Now preload load and lock all the lines in set 0 of the data cache
67 set_gr_immed 0x70000,gr10
69 set_mem_immed 0x11111111,gr10
70 test_mem_immed 0x11111111,gr10
72 inc_gr_immed 0x2000,gr10
75 set_mem_immed 0x22222222,gr10
76 test_mem_immed 0x22222222,gr10
78 inc_gr_immed 0x2000,gr10
81 set_mem_immed 0x33333333,gr10
82 test_mem_immed 0x33333333,gr10
84 inc_gr_immed 0x2000,gr10
87 set_mem_immed 0x44444444,gr10
88 test_mem_immed 0x44444444,gr10
91 set_gr_immed 0x78000,gr10
94 ; Now write to another address which should be in the same set.
95 set_gr_immed 0x7a000,gr10
96 set_mem_immed 0xbeefdead,gr10
98 ; All of the stored values should be retrievable
100 set_gr_immed 0x70000,gr10
101 test_mem_immed 0x11111111,gr10
103 inc_gr_immed 0x2000,gr10
104 test_mem_immed 0x22222222,gr10
106 inc_gr_immed 0x2000,gr10
107 test_mem_immed 0x33333333,gr10
109 inc_gr_immed 0x2000,gr10
110 test_mem_immed 0x44444444,gr10
112 inc_gr_immed 0x2000,gr10
113 test_mem_immed 0xdeadbeef,gr10
115 inc_gr_immed 0x2000,gr10
116 test_mem_immed 0xbeefdead,gr10