7 .macro reset_window start
19 .macro overflow_test shift, window, probe_ok, probe_ex
20 set_vector window_overflow_4, 0
21 set_vector window_overflow_8, 0
22 set_vector window_overflow_12, 0
24 movi a2, 1 | (((1 << ((\window) / 4)) | 1) << ((\shift) / 4))
29 set_vector window_overflow_\window, 10f
52 movi a3, 1 | ((1 << ((\window) / 4)) << ((\shift) / 4))
59 .macro overflow_tests shift, window, probe
61 overflow_test \shift, \window, %((\shift) - 1), \probe
62 overflow_tests \shift, \window, %((\probe) + 1)
66 .macro all_overflow_tests
69 overflow_tests \shift, \window, \shift
79 .macro underflow_test window
80 set_vector window_underflow_4, 0
81 set_vector window_underflow_8, 0
82 set_vector window_underflow_12, 0
84 set_vector window_underflow_\window, 10f
92 movi a3, (\window) / 4
108 assert eqi, a2, 8 - ((\window) / 4)
120 assert bsi, a2, 8 - ((\window) / 4)
124 set_vector window_overflow_4, 0
125 set_vector window_overflow_8, 0
126 set_vector window_overflow_12, 0
134 .macro retw_test window
135 reset_window %(1 | (1 << (8 - (\window) / 4)))
141 movi a3, (\window) / 4
150 assert eqi, a2, 8 - ((\window) / 4)
153 assert bsi, a2, 8 - ((\window) / 4)
157 set_vector window_underflow_4, 0
158 set_vector window_underflow_8, 0
159 set_vector window_underflow_12, 0
167 set_vector kernel, 2f
246 .macro callw_test window
255 movi a3, 0x4000f | ((\window) << 14)
260 movi a3, (\window) / 4
262 assert eq, a2, a\window
275 .macro entry_test window
278 movi a2, 0x4000f | ((\window) << 14)
289 assert eqi, a2, (\window) / 4
291 movi a3, 1 | (1 << ((\window) / 4))