2 * FreeRTOS Kernel V10.1.1
\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 .extern ulRegTest1LoopCounter
\r
29 .extern ulRegTest2LoopCounter
\r
31 .global vRegTest1Task
\r
32 .global vRegTest2Task
\r
34 /*-----------------------------------------------------------*/
\r
38 /* Fill the core registers with known values. */
\r
68 /* Check each register still contains the expected known value.
\r
69 vRegTest1Implementation uses x31 as the temporary, vRegTest2Implementation
\r
70 uses x5 as the temporary. */
\r
72 bne x31, x5, reg1_error_loop
\r
74 bne x31, x6, reg1_error_loop
\r
76 bne x31, x7, reg1_error_loop
\r
78 bne x31, x8, reg1_error_loop
\r
80 bne x31, x9, reg1_error_loop
\r
82 bne x31, x10, reg1_error_loop
\r
84 bne x31, x11, reg1_error_loop
\r
86 bne x31, x12, reg1_error_loop
\r
88 bne x31, x13, reg1_error_loop
\r
90 bne x31, x14, reg1_error_loop
\r
92 bne x31, x15, reg1_error_loop
\r
94 bne x31, x16, reg1_error_loop
\r
96 bne x31, x17, reg1_error_loop
\r
98 bne x31, x18, reg1_error_loop
\r
100 bne x31, x19, reg1_error_loop
\r
102 bne x31, x20, reg1_error_loop
\r
104 bne x31, x21, reg1_error_loop
\r
106 bne x31, x22, reg1_error_loop
\r
108 bne x31, x23, reg1_error_loop
\r
110 bne x31, x24, reg1_error_loop
\r
112 bne x31, x25, reg1_error_loop
\r
114 bne x31, x26, reg1_error_loop
\r
116 bne x31, x27, reg1_error_loop
\r
118 bne x31, x28, reg1_error_loop
\r
120 bne x31, x29, reg1_error_loop
\r
122 bne x31, x30, reg1_error_loop
\r
124 /* Everything passed, increment the loop counter. */
\r
125 lw x31, ulRegTest1LoopCounterConst
\r
130 /* Restore clobbered register reading for next loop. */
\r
133 /* Yield to increase code coverage. */
\r
140 /* Jump here if a register contains an uxpected value. This stops the loop
\r
141 counter being incremented so the check task knows an error was found. */
\r
142 jal reg1_error_loop
\r
144 ulRegTest1LoopCounterConst: .word ulRegTest1LoopCounter
\r
146 /*-----------------------------------------------------------*/
\r
150 /* Fill the core registers with known values. */
\r
180 /* Check each register still contains the expected known value.
\r
181 vRegTest2Implementation uses x5 as the temporary, vRegTest1Implementation
\r
182 uses x31 as the temporary. */
\r
184 bne x5, x6, reg2_error_loop
\r
186 bne x5, x7, reg2_error_loop
\r
188 bne x5, x8, reg2_error_loop
\r
190 bne x5, x9, reg2_error_loop
\r
192 bne x5, x10, reg2_error_loop
\r
194 bne x5, x11, reg2_error_loop
\r
196 bne x5, x12, reg2_error_loop
\r
198 bne x5, x13, reg2_error_loop
\r
200 bne x5, x14, reg2_error_loop
\r
202 bne x5, x15, reg2_error_loop
\r
204 bne x5, x16, reg2_error_loop
\r
206 bne x5, x17, reg2_error_loop
\r
208 bne x5, x18, reg2_error_loop
\r
210 bne x5, x19, reg2_error_loop
\r
212 bne x5, x20, reg2_error_loop
\r
214 bne x5, x21, reg2_error_loop
\r
216 bne x5, x22, reg2_error_loop
\r
218 bne x5, x23, reg2_error_loop
\r
220 bne x5, x24, reg2_error_loop
\r
222 bne x5, x25, reg2_error_loop
\r
224 bne x5, x26, reg2_error_loop
\r
226 bne x5, x27, reg2_error_loop
\r
228 bne x5, x28, reg2_error_loop
\r
230 bne x5, x29, reg2_error_loop
\r
232 bne x5, x30, reg2_error_loop
\r
234 bne x5, x31, reg2_error_loop
\r
236 /* Everything passed, increment the loop counter. */
\r
237 lw x5, ulRegTest2LoopCounterConst
\r
242 /* Restore clobbered register reading for next loop. */
\r
249 /* Jump here if a register contains an uxpected value. This stops the loop
\r
250 counter being incremented so the check task knows an error was found. */
\r
251 jal reg2_error_loop
\r
253 ulRegTest2LoopCounterConst: .word ulRegTest2LoopCounter
\r