2 * FreeRTOS Kernel V10.0.0
\r
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software. If you wish to use our Amazon
\r
14 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
\r
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
18 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
19 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 * http://www.FreeRTOS.org
\r
24 * http://aws.amazon.com/freertos
\r
26 * 1 tab == 4 spaces!
\r
29 .global vRegTest1Implementation
\r
30 .global vRegTest2Implementation
\r
31 .extern ullRegTest1LoopCounter
\r
32 .extern ullRegTest2LoopCounter
\r
36 /* This function is explained in the comments at the top of main-full.c. */
\r
37 .type vRegTest1Implementation, %function
\r
38 vRegTest1Implementation:
\r
40 /* Fill each general purpose register with a known value. */
\r
73 /* Fill each FPU register with a known value. */
\r
107 /* Loop, checking each itteration that each register still contains the
\r
110 /* Yield to increase test coverage */
\r
113 /* Test each general purpose register to check that it still contains the
\r
114 expected known value, jumping to reg1_error_loop if any register contains
\r
115 an unexpected value. */
\r
117 bne reg1_error_loop
\r
119 bne reg1_error_loop
\r
121 bne reg1_error_loop
\r
123 bne reg1_error_loop
\r
125 bne reg1_error_loop
\r
127 bne reg1_error_loop
\r
129 bne reg1_error_loop
\r
131 bne reg1_error_loop
\r
133 bne reg1_error_loop
\r
135 bne reg1_error_loop
\r
137 bne reg1_error_loop
\r
139 bne reg1_error_loop
\r
141 bne reg1_error_loop
\r
143 bne reg1_error_loop
\r
145 bne reg1_error_loop
\r
147 bne reg1_error_loop
\r
149 bne reg1_error_loop
\r
151 bne reg1_error_loop
\r
153 bne reg1_error_loop
\r
155 bne reg1_error_loop
\r
157 bne reg1_error_loop
\r
159 bne reg1_error_loop
\r
161 bne reg1_error_loop
\r
163 bne reg1_error_loop
\r
165 bne reg1_error_loop
\r
167 bne reg1_error_loop
\r
169 bne reg1_error_loop
\r
171 bne reg1_error_loop
\r
173 bne reg1_error_loop
\r
175 bne reg1_error_loop
\r
177 bne reg1_error_loop
\r
179 /* Check every floating point register to ensure it contains the expected
\r
180 value. First save the registers clobbered by the test. */
\r
181 stp x0, x1, [sp,#-0x10]!
\r
185 bne reg1_error_loop
\r
188 bne reg1_error_loop
\r
191 bne reg1_error_loop
\r
194 bne reg1_error_loop
\r
197 bne reg1_error_loop
\r
200 bne reg1_error_loop
\r
203 bne reg1_error_loop
\r
206 bne reg1_error_loop
\r
209 bne reg1_error_loop
\r
212 bne reg1_error_loop
\r
215 bne reg1_error_loop
\r
218 bne reg1_error_loop
\r
221 bne reg1_error_loop
\r
224 bne reg1_error_loop
\r
227 bne reg1_error_loop
\r
230 bne reg1_error_loop
\r
233 bne reg1_error_loop
\r
236 bne reg1_error_loop
\r
239 bne reg1_error_loop
\r
242 bne reg1_error_loop
\r
245 bne reg1_error_loop
\r
248 bne reg1_error_loop
\r
251 bne reg1_error_loop
\r
254 bne reg1_error_loop
\r
257 bne reg1_error_loop
\r
260 bne reg1_error_loop
\r
263 bne reg1_error_loop
\r
266 bne reg1_error_loop
\r
269 bne reg1_error_loop
\r
272 bne reg1_error_loop
\r
275 bne reg1_error_loop
\r
278 bne reg1_error_loop
\r
280 /* Restore the registers clobbered by the test. */
\r
281 ldp x0, x1, [sp], #0x10
\r
283 /* Everything passed, increment the loop counter. */
\r
284 stp x0, x1, [sp,#-0x10]!
\r
285 ldr x0, =ullRegTest1LoopCounter
\r
289 ldp x0, x1, [sp], #0x10
\r
295 /* If this line is hit then there was an error in a core register value.
\r
296 The loop ensures the loop counter stops incrementing. */
\r
300 /*-----------------------------------------------------------*/
\r
302 .type vRegTest2Implementation, %function
\r
303 vRegTest2Implementation:
\r
305 /* Fill each general purpose register with a known value. */
\r
338 /* Fill each FPU register with a known value. */
\r
372 /* Loop, checking each itteration that each register still contains the
\r
376 /* Test each general purpose register to check that it still contains the
\r
377 expected known value, jumping to reg2_error_loop if any register contains
\r
378 an unexpected value. */
\r
380 bne reg2_error_loop
\r
382 bne reg2_error_loop
\r
384 bne reg2_error_loop
\r
386 bne reg2_error_loop
\r
388 bne reg2_error_loop
\r
390 bne reg2_error_loop
\r
392 bne reg2_error_loop
\r
394 bne reg2_error_loop
\r
396 bne reg2_error_loop
\r
398 bne reg2_error_loop
\r
400 bne reg2_error_loop
\r
402 bne reg2_error_loop
\r
404 bne reg2_error_loop
\r
406 bne reg2_error_loop
\r
408 bne reg2_error_loop
\r
410 bne reg2_error_loop
\r
412 bne reg2_error_loop
\r
414 bne reg2_error_loop
\r
416 bne reg2_error_loop
\r
418 bne reg2_error_loop
\r
420 bne reg2_error_loop
\r
422 bne reg2_error_loop
\r
424 bne reg2_error_loop
\r
426 bne reg2_error_loop
\r
428 bne reg2_error_loop
\r
430 bne reg2_error_loop
\r
432 bne reg2_error_loop
\r
434 bne reg2_error_loop
\r
436 bne reg2_error_loop
\r
438 bne reg2_error_loop
\r
440 bne reg2_error_loop
\r
442 /* Check every floating point register to ensure it contains the expected
\r
443 value. First save the registers clobbered by the test. */
\r
444 stp x0, x1, [sp,#-0x10]!
\r
448 bne reg1_error_loop
\r
451 bne reg1_error_loop
\r
454 bne reg1_error_loop
\r
457 bne reg1_error_loop
\r
460 bne reg1_error_loop
\r
463 bne reg1_error_loop
\r
466 bne reg1_error_loop
\r
469 bne reg1_error_loop
\r
472 bne reg1_error_loop
\r
475 bne reg1_error_loop
\r
478 bne reg1_error_loop
\r
481 bne reg1_error_loop
\r
484 bne reg1_error_loop
\r
487 bne reg1_error_loop
\r
490 bne reg1_error_loop
\r
493 bne reg1_error_loop
\r
496 bne reg1_error_loop
\r
499 bne reg1_error_loop
\r
502 bne reg1_error_loop
\r
505 bne reg1_error_loop
\r
508 bne reg1_error_loop
\r
511 bne reg1_error_loop
\r
514 bne reg1_error_loop
\r
517 bne reg1_error_loop
\r
520 bne reg1_error_loop
\r
523 bne reg1_error_loop
\r
526 bne reg1_error_loop
\r
529 bne reg1_error_loop
\r
532 bne reg1_error_loop
\r
535 bne reg1_error_loop
\r
538 bne reg1_error_loop
\r
541 bne reg1_error_loop
\r
543 /* Restore the registers clobbered by the test. */
\r
544 ldp x0, x1, [sp], #0x10
\r
546 /* Everything passed, increment the loop counter. */
\r
547 stp x0, x1, [sp,#-0x10]!
\r
548 ldr x0, =ullRegTest2LoopCounter
\r
552 ldp x0, x1, [sp], #0x10
\r
558 /* If this line is hit then there was an error in a core register value.
\r
559 The loop ensures the loop counter stops incrementing. */
\r