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
29 * This file defines the RegTest tasks as described at the top of main.c
\r
32 .global _vRegTest1Task
\r
33 .short _vRegTest1Task
\r
34 .global _vRegTest2Task
\r
35 .short _vRegTest2Task
\r
37 .extern _vRegTestError
\r
38 .extern _usRegTest1LoopCounter
\r
39 .extern _usRegTest2LoopCounter
\r
43 * Fill all the registers with known values, then check that the registers
\r
44 * contain the expected value. An incorrect value being indicative of an
\r
45 * error in the context switch mechanism.
\r
49 /* First fill the registers. */
\r
66 /* Register bank 3 is not used outside of interrupts so is not saved as part
\r
67 of the task context. */
\r
72 /* Continuously check that the register values remain at their expected
\r
73 values. The BRK is to test the yield. This task runs at low priority
\r
74 so will also regularly get preempted. */
\r
77 /* Compare with the expected value. */
\r
81 /* Jump over the branch to vRegTestError() if the register contained the
\r
82 expected value - otherwise flag an error by executing vRegTestError(). */
\r
85 /* Repeat for all the registers. */
\r
99 /* Set AX back to its initial value. */
\r
105 BR !!_vRegTestError
\r
109 BR !!_vRegTestError
\r
113 BR !!_vRegTestError
\r
117 BR !!_vRegTestError
\r
124 BR !!_vRegTestError
\r
128 BR !!_vRegTestError
\r
132 BR !!_vRegTestError
\r
136 BR !!_vRegTestError
\r
140 /* Register bank 3 is not used outside of interrupts so is not saved as
\r
141 part of the task context. */
\r
145 /* Indicate that this task is still cycling. */
\r
146 INCW !_usRegTest1LoopCounter
\r
152 * Fill all the registers with known values, then check that the registers
\r
153 * contain the expected value. An incorrect value being indicative of an
\r
154 * error in the context switch mechanism.
\r
174 /* Register bank 3 is not used outside of interrupts so is not saved as
\r
175 part of the task context. */
\r
181 BR !!_vRegTestError
\r
185 BR !!_vRegTestError
\r
189 BR !!_vRegTestError
\r
193 BR !!_vRegTestError
\r
199 BR !!_vRegTestError
\r
203 BR !!_vRegTestError
\r
207 BR !!_vRegTestError
\r
211 BR !!_vRegTestError
\r
217 BR !!_vRegTestError
\r
221 BR !!_vRegTestError
\r
225 BR !!_vRegTestError
\r
229 BR !!_vRegTestError
\r
232 /* Register bank 3 is not used outside of interrupts so is not saved as
\r
233 part of the task context. */
\r
237 /* Indicate that this task is still cycling. */
\r
238 INCW !_usRegTest2LoopCounter
\r