2 * FreeRTOS Kernel V10.1.0
\r
3 * Copyright (C) 2018 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.
\r
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
22 * http://www.FreeRTOS.org
\r
23 * http://aws.amazon.com/freertos
\r
25 * 1 tab == 4 spaces!
\r
28 .global vRegTest1Implementation
\r
29 .global vRegTest2Implementation
\r
30 .extern ullRegTest1LoopCounter
\r
31 .extern ullRegTest2LoopCounter
\r
35 /* This function is explained in the comments at the top of main-full.c. */
\r
36 .type vRegTest1Implementation, %function
\r
37 vRegTest1Implementation:
\r
39 /* Fill each general purpose register with a known value. */
\r
72 /* Fill each FPU register with a known value. */
\r
106 /* Loop, checking each itteration that each register still contains the
\r
109 /* Yield to increase test coverage */
\r
112 /* Test each general purpose register to check that it still contains the
\r
113 expected known value, jumping to reg1_error_loop if any register contains
\r
114 an unexpected value. */
\r
116 bne reg1_error_loop
\r
118 bne reg1_error_loop
\r
120 bne reg1_error_loop
\r
122 bne reg1_error_loop
\r
124 bne reg1_error_loop
\r
126 bne reg1_error_loop
\r
128 bne reg1_error_loop
\r
130 bne reg1_error_loop
\r
132 bne reg1_error_loop
\r
134 bne reg1_error_loop
\r
136 bne reg1_error_loop
\r
138 bne reg1_error_loop
\r
140 bne reg1_error_loop
\r
142 bne reg1_error_loop
\r
144 bne reg1_error_loop
\r
146 bne reg1_error_loop
\r
148 bne reg1_error_loop
\r
150 bne reg1_error_loop
\r
152 bne reg1_error_loop
\r
154 bne reg1_error_loop
\r
156 bne reg1_error_loop
\r
158 bne reg1_error_loop
\r
160 bne reg1_error_loop
\r
162 bne reg1_error_loop
\r
164 bne reg1_error_loop
\r
166 bne reg1_error_loop
\r
168 bne reg1_error_loop
\r
170 bne reg1_error_loop
\r
172 bne reg1_error_loop
\r
174 bne reg1_error_loop
\r
176 bne reg1_error_loop
\r
178 /* Check every floating point register to ensure it contains the expected
\r
179 value. First save the registers clobbered by the test. */
\r
180 stp x0, x1, [sp,#-0x10]!
\r
184 bne reg1_error_loop
\r
187 bne reg1_error_loop
\r
190 bne reg1_error_loop
\r
193 bne reg1_error_loop
\r
196 bne reg1_error_loop
\r
199 bne reg1_error_loop
\r
202 bne reg1_error_loop
\r
205 bne reg1_error_loop
\r
208 bne reg1_error_loop
\r
211 bne reg1_error_loop
\r
214 bne reg1_error_loop
\r
217 bne reg1_error_loop
\r
220 bne reg1_error_loop
\r
223 bne reg1_error_loop
\r
226 bne reg1_error_loop
\r
229 bne reg1_error_loop
\r
232 bne reg1_error_loop
\r
235 bne reg1_error_loop
\r
238 bne reg1_error_loop
\r
241 bne reg1_error_loop
\r
244 bne reg1_error_loop
\r
247 bne reg1_error_loop
\r
250 bne reg1_error_loop
\r
253 bne reg1_error_loop
\r
256 bne reg1_error_loop
\r
259 bne reg1_error_loop
\r
262 bne reg1_error_loop
\r
265 bne reg1_error_loop
\r
268 bne reg1_error_loop
\r
271 bne reg1_error_loop
\r
274 bne reg1_error_loop
\r
277 bne reg1_error_loop
\r
279 /* Restore the registers clobbered by the test. */
\r
280 ldp x0, x1, [sp], #0x10
\r
282 /* Everything passed, increment the loop counter. */
\r
283 stp x0, x1, [sp,#-0x10]!
\r
284 ldr x0, =ullRegTest1LoopCounter
\r
288 ldp x0, x1, [sp], #0x10
\r
294 /* If this line is hit then there was an error in a core register value.
\r
295 The loop ensures the loop counter stops incrementing. */
\r
299 /*-----------------------------------------------------------*/
\r
301 .type vRegTest2Implementation, %function
\r
302 vRegTest2Implementation:
\r
304 /* Fill each general purpose register with a known value. */
\r
337 /* Fill each FPU register with a known value. */
\r
371 /* Loop, checking each itteration that each register still contains the
\r
375 /* Test each general purpose register to check that it still contains the
\r
376 expected known value, jumping to reg2_error_loop if any register contains
\r
377 an unexpected value. */
\r
379 bne reg2_error_loop
\r
381 bne reg2_error_loop
\r
383 bne reg2_error_loop
\r
385 bne reg2_error_loop
\r
387 bne reg2_error_loop
\r
389 bne reg2_error_loop
\r
391 bne reg2_error_loop
\r
393 bne reg2_error_loop
\r
395 bne reg2_error_loop
\r
397 bne reg2_error_loop
\r
399 bne reg2_error_loop
\r
401 bne reg2_error_loop
\r
403 bne reg2_error_loop
\r
405 bne reg2_error_loop
\r
407 bne reg2_error_loop
\r
409 bne reg2_error_loop
\r
411 bne reg2_error_loop
\r
413 bne reg2_error_loop
\r
415 bne reg2_error_loop
\r
417 bne reg2_error_loop
\r
419 bne reg2_error_loop
\r
421 bne reg2_error_loop
\r
423 bne reg2_error_loop
\r
425 bne reg2_error_loop
\r
427 bne reg2_error_loop
\r
429 bne reg2_error_loop
\r
431 bne reg2_error_loop
\r
433 bne reg2_error_loop
\r
435 bne reg2_error_loop
\r
437 bne reg2_error_loop
\r
439 bne reg2_error_loop
\r
441 /* Check every floating point register to ensure it contains the expected
\r
442 value. First save the registers clobbered by the test. */
\r
443 stp x0, x1, [sp,#-0x10]!
\r
447 bne reg1_error_loop
\r
450 bne reg1_error_loop
\r
453 bne reg1_error_loop
\r
456 bne reg1_error_loop
\r
459 bne reg1_error_loop
\r
462 bne reg1_error_loop
\r
465 bne reg1_error_loop
\r
468 bne reg1_error_loop
\r
471 bne reg1_error_loop
\r
474 bne reg1_error_loop
\r
477 bne reg1_error_loop
\r
480 bne reg1_error_loop
\r
483 bne reg1_error_loop
\r
486 bne reg1_error_loop
\r
489 bne reg1_error_loop
\r
492 bne reg1_error_loop
\r
495 bne reg1_error_loop
\r
498 bne reg1_error_loop
\r
501 bne reg1_error_loop
\r
504 bne reg1_error_loop
\r
507 bne reg1_error_loop
\r
510 bne reg1_error_loop
\r
513 bne reg1_error_loop
\r
516 bne reg1_error_loop
\r
519 bne reg1_error_loop
\r
522 bne reg1_error_loop
\r
525 bne reg1_error_loop
\r
528 bne reg1_error_loop
\r
531 bne reg1_error_loop
\r
534 bne reg1_error_loop
\r
537 bne reg1_error_loop
\r
540 bne reg1_error_loop
\r
542 /* Restore the registers clobbered by the test. */
\r
543 ldp x0, x1, [sp], #0x10
\r
545 /* Everything passed, increment the loop counter. */
\r
546 stp x0, x1, [sp,#-0x10]!
\r
547 ldr x0, =ullRegTest2LoopCounter
\r
551 ldp x0, x1, [sp], #0x10
\r
557 /* If this line is hit then there was an error in a core register value.
\r
558 The loop ensures the loop counter stops incrementing. */
\r