5 #if XCHAL_HAVE_WINDOWED
9 .macro reset_window start
21 .macro overflow_test shift, window, probe_ok, probe_ex
22 set_vector window_overflow_4, 0
23 set_vector window_overflow_8, 0
24 set_vector window_overflow_12, 0
26 movi a2, 1 | (((1 << ((\window) / 4)) | 1) << ((\shift) / 4))
31 set_vector window_overflow_\window, 10f
54 movi a3, 1 | ((1 << ((\window) / 4)) << ((\shift) / 4))
61 .macro overflow_tests shift, window, probe
63 overflow_test \shift, \window, %((\shift) - 1), \probe
64 overflow_tests \shift, \window, %((\probe) + 1)
68 .macro all_overflow_tests
71 overflow_tests \shift, \window, \shift
81 .macro underflow_test window
82 set_vector window_underflow_4, 0
83 set_vector window_underflow_8, 0
84 set_vector window_underflow_12, 0
86 set_vector window_underflow_\window, 10f
94 movi a3, (\window) / 4
110 movi a3, (XCHAL_NUM_AREGS - (\window)) / 4
123 assert bsi.l, a2, (XCHAL_NUM_AREGS - (\window)) / 4
127 set_vector window_overflow_4, 0
128 set_vector window_overflow_8, 0
129 set_vector window_overflow_12, 0
137 .macro retw_test window
138 reset_window %(1 | (1 << ((XCHAL_NUM_AREGS - \window) / 4)))
144 movi a3, (\window) / 4
153 movi a3, (XCHAL_NUM_AREGS - (\window)) / 4
157 assert bsi.l, a2, (XCHAL_NUM_AREGS - (\window)) / 4
161 set_vector window_underflow_4, 0
162 set_vector window_underflow_8, 0
163 set_vector window_underflow_12, 0
171 set_vector kernel, 2f
187 reset_window %(0x1 | (1 << ((XCHAL_NUM_AREGS / 4) - 1)))
218 #if XCHAL_NUM_AREGS == 32
221 #elif XCHAL_NUM_AREGS == 64
226 #error XCHAL_NUM_AREGS unsupported
258 .macro callw_test window
267 movi a3, 0x4000f | ((\window) << 14)
272 movi a3, (\window) / 4
274 assert eq, a2, a\window
287 .macro entry_test window
290 movi a2, 0x4000f | ((\window) << 14)
301 assert eqi, a2, (\window) / 4
303 movi a3, 1 | (1 << ((\window) / 4))
314 .macro entry_overflow_test window, free, next_window
315 set_vector window_overflow_4, 0
316 set_vector window_overflow_8, 0
317 set_vector window_overflow_12, 0
318 set_vector window_overflow_\next_window, 10f
322 movi a2, \next_window
323 reset_window %(1 | ((1 | (1 << ((\next_window) / 4))) << ((\free) / 4)))
325 movi a2, 0x4000f | ((\window) << 14)
349 .macro all_entry_overflow_tests
350 .irp window, 4, 8, 12
351 .irp next_window, 4, 8, 12
354 entry_overflow_test \window, \free, \next_window
362 all_entry_overflow_tests