2 FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
\r
4 FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
\r
5 http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 ***************************************************************************
\r
9 * FreeRTOS tutorial books are available in pdf and paperback. *
\r
10 * Complete, revised, and edited pdf reference manuals are also *
\r
13 * Purchasing FreeRTOS documentation will not only help you, by *
\r
14 * ensuring you get running as quickly as possible and with an *
\r
15 * in-depth knowledge of how to use FreeRTOS, it will also help *
\r
16 * the FreeRTOS project to continue with its mission of providing *
\r
17 * professional grade, cross platform, de facto standard solutions *
\r
18 * for microcontrollers - completely free of charge! *
\r
20 * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
\r
22 * Thank you for using FreeRTOS, and thank you for your support! *
\r
24 ***************************************************************************
\r
27 This file is part of the FreeRTOS distribution.
\r
29 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
30 the terms of the GNU General Public License (version 2) as published by the
\r
31 Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
\r
32 >>>NOTE<<< The modification to the GPL is included to allow you to
\r
33 distribute a combined work that includes FreeRTOS without being obliged to
\r
34 provide the source code for proprietary components outside of the FreeRTOS
\r
35 kernel. FreeRTOS is distributed in the hope that it will be useful, but
\r
36 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
37 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
38 more details. You should have received a copy of the GNU General Public
\r
39 License and the FreeRTOS license exception along with FreeRTOS; if not it
\r
40 can be viewed here: http://www.freertos.org/a00114.html and also obtained
\r
41 by writing to Richard Barry, contact details for whom are available on the
\r
46 ***************************************************************************
\r
48 * Having a problem? Start by reading the FAQ "My application does *
\r
49 * not run, what could be wrong?" *
\r
51 * http://www.FreeRTOS.org/FAQHelp.html *
\r
53 ***************************************************************************
\r
56 http://www.FreeRTOS.org - Documentation, training, latest versions, license
\r
57 and contact details.
\r
59 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
60 including FreeRTOS+Trace - an indispensable productivity tool.
\r
62 Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
\r
63 the code with commercial support, indemnification, and middleware, under
\r
64 the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
\r
65 provide a safety engineered and independently SIL3 certified version under
\r
66 the SafeRTOS brand: http://www.SafeRTOS.com.
\r
70 * Creates all the demo application tasks, then starts the scheduler.
\r
71 * In addition to the standard demo tasks, the following tasks and tests are
\r
72 * defined and/or created within this file:
\r
74 * "Check" task - This only executes every five seconds but has the highest
\r
75 * priority so is guaranteed to get processor time. Its main function is to
\r
76 * check that all the standard demo tasks are still operational. The check
\r
77 * task will write an error message to the console should an error be detected
\r
78 * within any of the demo tasks. The check task also toggles the LED defined
\r
79 * by mainCHECK_LED every 5 seconds while the system is error free, with the
\r
80 * toggle rate increasing to every 500ms should an error occur.
\r
82 * "Reg test" tasks - These fill the registers with known values, then check
\r
83 * that each register still contains its expected value. Each task uses
\r
84 * different values. The tasks run with very low priority so get preempted very
\r
85 * frequently. A register containing an unexpected value is indicative of an
\r
86 * error in the context switching mechanism.
\r
88 * See the online documentation for this demo for more information on interrupt
\r
92 /* Standard includes. */
\r
97 /* Scheduler includes. */
\r
98 #include "FreeRTOS.h"
\r
102 /* Demo application includes. */
\r
103 #include "partest.h"
\r
105 #include "blocktim.h"
\r
106 #include "semtest.h"
\r
107 #include "serial.h"
\r
108 #include "comtest.h"
\r
109 #include "GenQTest.h"
\r
111 #include "integer.h"
\r
113 #include "BlockQ.h"
\r
114 #include "dynamic.h"
\r
115 #include "countsem.h"
\r
116 #include "recmutex.h"
\r
119 /*-----------------------------------------------------------*/
\r
121 #error The batch file Demo\NiosII_CycloneIII_DBC3C40_GCC\CreateProjectDirectoryStructure.bat must be executed before the project is imported into the workspace. Failure to do this will result in the include paths stored in the project being deleted. Remove this line after CreateProjectDirectoryStructure.bat has been executed.
\r
123 /*-----------------------------------------------------------*/
\r
125 /* The rate at which the LED controlled by the 'check' task will toggle when no
\r
126 errors have been detected. */
\r
127 #define mainNO_ERROR_PERIOD ( 5000 )
\r
129 /* The rate at which the LED controlled by the 'check' task will toggle when an
\r
130 error has been detected. */
\r
131 #define mainERROR_PERIOD ( 500 )
\r
133 /* The LED toggled by the Check task. */
\r
134 #define mainCHECK_LED ( 7 )
\r
136 /* The first LED used by the ComTest tasks. One LED toggles each time a
\r
137 character is transmitted, and one each time a character is received and
\r
138 verified as being the expected character. */
\r
139 #define mainCOMTEST_LED ( 4 )
\r
141 /* Priority definitions for the tasks in the demo application. */
\r
142 #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
143 #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
144 #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
\r
145 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
146 #define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
147 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
148 #define mainSEMAPHORE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
149 #define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
\r
150 #define mainREG_TEST_PRIORITY ( tskIDLE_PRIORITY )
\r
153 #define mainDONT_WAIT ( 0 )
\r
155 /* The parameters passed to the reg test tasks. This is just done to check
\r
156 the parameter passing mechanism is working correctly. */
\r
157 #define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12345678 )
\r
158 #define mainREG_TEST_2_PARAMETER ( ( void * ) 0x87654321 )
\r
160 /*-----------------------------------------------------------*/
\r
163 * Setup the processor ready for the demo.
\r
165 static void prvSetupHardware( void );
\r
168 * Execute all of the check functions to ensure the tests haven't failed.
\r
170 static void prvCheckTask( void *pvParameters );
\r
173 * The register test (or RegTest) tasks as described at the top of this file.
\r
175 static void prvFirstRegTestTask( void *pvParameters );
\r
176 static void prvSecondRegTestTask( void *pvParameters );
\r
178 /*-----------------------------------------------------------*/
\r
180 /* Counters that are incremented on each iteration of the RegTest tasks
\r
181 so long as no errors have been detected. */
\r
182 volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
\r
184 /*-----------------------------------------------------------*/
\r
187 * Create the demo tasks then start the scheduler.
\r
191 /* Configure any hardware required for this demo. */
\r
192 prvSetupHardware();
\r
194 /* Create all the other standard demo tasks. These serve no purpose other
\r
195 than to test the port and demonstrate the use of the FreeRTOS API. */
\r
196 vStartLEDFlashTasks( tskIDLE_PRIORITY );
\r
197 vStartIntegerMathTasks( mainGENERIC_QUEUE_PRIORITY );
\r
198 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\r
199 vStartBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );
\r
200 vCreateBlockTimeTasks();
\r
201 vStartSemaphoreTasks( mainSEMAPHORE_TASK_PRIORITY );
\r
202 vStartDynamicPriorityTasks();
\r
203 vStartQueuePeekTasks();
\r
204 vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
\r
205 vStartCountingSemaphoreTasks();
\r
206 vStartRecursiveMutexTasks();
\r
207 vAltStartComTestTasks( mainCOM_TEST_PRIORITY, 0, mainCOMTEST_LED );
\r
209 /* prvCheckTask uses sprintf so requires more stack. */
\r
210 xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
\r
212 /* The RegTest tasks as described at the top of this file. */
\r
213 xTaskCreate( prvFirstRegTestTask, "Rreg1", configMINIMAL_STACK_SIZE, mainREG_TEST_1_PARAMETER, mainREG_TEST_PRIORITY, NULL );
\r
214 xTaskCreate( prvSecondRegTestTask, "Rreg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, mainREG_TEST_PRIORITY, NULL );
\r
216 /* This task has to be created last as it keeps account of the number of tasks
\r
217 it expects to see running. */
\r
218 vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
\r
220 /* Finally start the scheduler. */
\r
221 vTaskStartScheduler();
\r
223 /* Will only reach here if there is insufficient heap available to start
\r
227 /*-----------------------------------------------------------*/
\r
229 static void prvSetupHardware( void )
\r
231 /* Setup the digital IO for the LED's. */
\r
232 vParTestInitialise();
\r
234 /*-----------------------------------------------------------*/
\r
236 void vApplicationStackOverflowHook( void )
\r
238 /* Look at pxCurrentTCB to see which task overflowed its stack. */
\r
244 /*-----------------------------------------------------------*/
\r
246 void _general_exception_handler( unsigned long ulCause, unsigned long ulStatus )
\r
248 /* This overrides the definition provided by the kernel. Other exceptions
\r
249 should be handled here. */
\r
255 /*-----------------------------------------------------------*/
\r
257 static void prvCheckTask( void *pvParameters )
\r
259 portTickType xLastExecutionTime, ulTicksToWait = mainNO_ERROR_PERIOD;
\r
260 unsigned long ulLastRegTest1 = 0UL, ulLastRegTest2 = 0UL;
\r
261 const char * pcMessage;
\r
263 /* Initialise the variable used to control our iteration rate prior to
\r
265 xLastExecutionTime = xTaskGetTickCount();
\r
269 /* Wait until it is time to run the tests again. */
\r
270 vTaskDelayUntil( &xLastExecutionTime, ulTicksToWait );
\r
272 /* Have any of the standard demo tasks detected an error in their
\r
274 if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
276 ulTicksToWait = mainERROR_PERIOD;
\r
277 pcMessage = "Error: Integer Maths.\n";
\r
279 else if( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
281 ulTicksToWait = mainERROR_PERIOD;
\r
282 pcMessage = "Error: GenQ.\n";
\r
284 else if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
286 ulTicksToWait = mainERROR_PERIOD;
\r
287 pcMessage = "Error: BlockQ.\n";
\r
289 else if( xArePollingQueuesStillRunning() != pdTRUE )
\r
291 ulTicksToWait = mainERROR_PERIOD;
\r
292 pcMessage = "Error: PollQ.\n";
\r
294 else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
\r
296 ulTicksToWait = mainERROR_PERIOD;
\r
297 pcMessage = "Error: PeekQ.\n";
\r
299 else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
301 ulTicksToWait = mainERROR_PERIOD;
\r
302 pcMessage = "Error: Block Time.\n";
\r
304 else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
306 ulTicksToWait = mainERROR_PERIOD;
\r
307 pcMessage = "Error: Semaphore Test.\n";
\r
309 else if( xAreComTestTasksStillRunning() != pdTRUE )
\r
311 ulTicksToWait = mainERROR_PERIOD;
\r
312 pcMessage = "Error: Comm Test.\n";
\r
314 else if( xIsCreateTaskStillRunning() != pdTRUE )
\r
316 ulTicksToWait = mainERROR_PERIOD;
\r
317 pcMessage = "Error: Suicidal Tasks.\n";
\r
319 else if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
\r
321 ulTicksToWait = mainERROR_PERIOD;
\r
322 pcMessage = "Error: Dynamic Priority.\n";
\r
324 else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
\r
326 ulTicksToWait = mainERROR_PERIOD;
\r
327 pcMessage = "Error: Count Semaphore.\n";
\r
329 else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
331 ulTicksToWait = mainERROR_PERIOD;
\r
332 pcMessage = "Error: Recursive Mutex.\n";
\r
334 else if( ulLastRegTest1 == ulRegTest1Counter )
\r
336 /* ulRegTest1Counter is no longer being incremented, indicating
\r
337 that an error has been discovered in prvFirstRegTestTask(). */
\r
338 ulTicksToWait = mainERROR_PERIOD;
\r
339 pcMessage = "Error: Reg Test1.\n";
\r
341 else if( ulLastRegTest2 == ulRegTest2Counter )
\r
343 /* ulRegTest2Counter is no longer being incremented, indicating
\r
344 that an error has been discovered in prvSecondRegTestTask(). */
\r
345 ulTicksToWait = mainERROR_PERIOD;
\r
346 pcMessage = "Error: Reg Test2.\n";
\r
353 /* Remember the counter values this time around so a counter failing
\r
354 to be incremented correctly can be spotted. */
\r
355 ulLastRegTest1 = ulRegTest1Counter;
\r
356 ulLastRegTest2 = ulRegTest2Counter;
\r
358 /* Print out an error message if there is one. Mutual exclusion is
\r
359 not used as this is the only task accessing stdout. */
\r
360 if( pcMessage != NULL )
\r
362 printf( pcMessage );
\r
365 /* Provide visual feedback of the system status. If the LED is toggled
\r
366 every 5 seconds then no errors have been found. If the LED is toggled
\r
367 every 500ms then at least one error has been found. */
\r
368 vParTestToggleLED( mainCHECK_LED );
\r
371 /*-----------------------------------------------------------*/
\r
373 static void prvFirstRegTestTask( void *pvParameters )
\r
375 /* Check the parameters are passed in as expected. */
\r
376 if( pvParameters != mainREG_TEST_1_PARAMETER )
\r
378 /* Don't execute any further so an error is recognised by the check
\r
380 vTaskDelete( NULL );
\r
383 /* Fill registers with known values, then check that each register still
\r
384 contains its expected value. An incorrect value is indicative of an error
\r
385 in the context switching process.
\r
387 If no errors are found ulRegTest1Counter is incremented. The check task
\r
388 will recognise an error if ulRegTest1Counter stops being incremented.
\r
389 This task also performs a manual yield in the middle of its execution, just
\r
390 to increase the test coverage. */
\r
392 " .extern ulRegTest1Counter \n" \
\r
394 " addi r3, r0, 3 \n" \
\r
395 " addi r4, r0, 4 \n" \
\r
396 " addi r5, r0, 5 \n" \
\r
397 " addi r6, r0, 6 \n" \
\r
398 " addi r7, r0, 7 \n" \
\r
399 " addi r8, r0, 8 \n" \
\r
400 " addi r9, r0, 9 \n" \
\r
401 " addi r10, r0, 10 \n" \
\r
402 " addi r11, r0, 11 \n" \
\r
403 " addi r12, r0, 12 \n" \
\r
404 " addi r13, r0, 13 \n" \
\r
405 " addi r14, r0, 14 \n" \
\r
406 " addi r15, r0, 15 \n" \
\r
407 " addi r16, r0, 16 \n" \
\r
408 " addi r17, r0, 17 \n" \
\r
409 " addi r18, r0, 18 \n" \
\r
410 " addi r19, r0, 19 \n" \
\r
411 " addi r20, r0, 20 \n" \
\r
412 " addi r21, r0, 21 \n" \
\r
413 " addi r22, r0, 22 \n" \
\r
414 " addi r23, r0, 23 \n" \
\r
415 " addi r28, r0, 28 \n" \
\r
416 " addi r31, r0, 31 \n" \
\r
418 " addi r2, r0, 0 \n" \
\r
420 " bne r2, r0, RegTest1Error \n" \
\r
421 " addi r2, r0, 3 \n" \
\r
422 " bne r2, r3, RegTest1Error \n" \
\r
423 " addi r2, r0, 4 \n" \
\r
424 " bne r2, r4, RegTest1Error \n" \
\r
425 " addi r2, r0, 5 \n" \
\r
426 " bne r2, r5, RegTest1Error \n" \
\r
427 " addi r2, r0, 6 \n" \
\r
428 " bne r2, r6, RegTest1Error \n" \
\r
429 " addi r2, r0, 7 \n" \
\r
430 " bne r2, r7, RegTest1Error \n" \
\r
431 " addi r2, r0, 8 \n" \
\r
432 " bne r2, r8, RegTest1Error \n" \
\r
433 " addi r2, r0, 9 \n" \
\r
434 " bne r2, r9, RegTest1Error \n" \
\r
435 " addi r2, r0, 10 \n" \
\r
436 " bne r2, r10, RegTest1Error \n" \
\r
437 " addi r2, r0, 11 \n" \
\r
438 " bne r2, r11, RegTest1Error \n" \
\r
439 " addi r2, r0, 12 \n" \
\r
440 " bne r2, r12, RegTest1Error \n" \
\r
441 " addi r2, r0, 13 \n" \
\r
442 " bne r2, r13, RegTest1Error \n" \
\r
443 " addi r2, r0, 14 \n" \
\r
444 " bne r2, r14, RegTest1Error \n" \
\r
445 " addi r2, r0, 15 \n" \
\r
446 " bne r2, r15, RegTest1Error \n" \
\r
447 " addi r2, r0, 16 \n" \
\r
448 " bne r2, r16, RegTest1Error \n" \
\r
449 " addi r2, r0, 17 \n" \
\r
450 " bne r2, r17, RegTest1Error \n" \
\r
451 " addi r2, r0, 18 \n" \
\r
452 " bne r2, r18, RegTest1Error \n" \
\r
453 " addi r2, r0, 19 \n" \
\r
454 " bne r2, r19, RegTest1Error \n" \
\r
455 " addi r2, r0, 20 \n" \
\r
456 " bne r2, r20, RegTest1Error \n" \
\r
457 " addi r2, r0, 21 \n" \
\r
458 " bne r2, r21, RegTest1Error \n" \
\r
459 " addi r2, r0, 22 \n" \
\r
460 " bne r2, r22, RegTest1Error \n" \
\r
461 " addi r2, r0, 23 \n" \
\r
462 " bne r2, r23, RegTest1Error \n" \
\r
463 " addi r2, r0, 28 \n" \
\r
464 " bne r2, r28, RegTest1Error \n" \
\r
465 " addi r2, r0, 31 \n" \
\r
466 " bne r2, r31, RegTest1Error \n" \
\r
467 " ldw r2, %gprel(ulRegTest1Counter)(gp) \n" \
\r
468 " addi r2, r2, 1 \n" \
\r
469 " stw r2, %gprel(ulRegTest1Counter)(gp) \n" \
\r
470 " br RegTest1 \n" \
\r
471 "RegTest1Error: \n" \
\r
472 " br RegTest1Error \n"
\r
475 /*-----------------------------------------------------------*/
\r
477 static void prvSecondRegTestTask( void *pvParameters )
\r
479 /* Check the parameters are passed in as expected. */
\r
480 if( pvParameters != mainREG_TEST_2_PARAMETER )
\r
482 /* Don't execute any further so an error is recognised by the check
\r
484 vTaskDelete( NULL );
\r
487 /* Fill registers with known values, then check that each register still
\r
488 contains its expected value. An incorrect value is indicative of an error
\r
489 in the context switching process.
\r
491 If no errors are found ulRegTest2Counter is incremented. The check task
\r
492 will recognise an error if ulRegTest2Counter stops being incremented. */
\r
494 " .extern ulRegTest2Counter \n" \
\r
496 " addi r3, r0, 3 \n" \
\r
497 " addi r4, r0, 4 \n" \
\r
498 " addi r5, r0, 5 \n" \
\r
499 " addi r6, r0, 6 \n" \
\r
500 " addi r7, r0, 7 \n" \
\r
501 " addi r8, r0, 8 \n" \
\r
502 " addi r9, r0, 9 \n" \
\r
503 " addi r10, r0, 10 \n" \
\r
504 " addi r11, r0, 11 \n" \
\r
505 " addi r12, r0, 12 \n" \
\r
506 " addi r13, r0, 13 \n" \
\r
507 " addi r14, r0, 14 \n" \
\r
508 " addi r15, r0, 15 \n" \
\r
509 " addi r16, r0, 16 \n" \
\r
510 " addi r17, r0, 17 \n" \
\r
511 " addi r18, r0, 18 \n" \
\r
512 " addi r19, r0, 19 \n" \
\r
513 " addi r20, r0, 20 \n" \
\r
514 " addi r21, r0, 21 \n" \
\r
515 " addi r22, r0, 22 \n" \
\r
516 " addi r23, r0, 23 \n" \
\r
517 " addi r28, r0, 28 \n" \
\r
518 " addi r31, r0, 31 \n" \
\r
520 " addi r2, r0, 0 \n" \
\r
521 " bne r2, r0, RegTest2Error \n" \
\r
522 " addi r2, r0, 3 \n" \
\r
523 " bne r2, r3, RegTest2Error \n" \
\r
524 " addi r2, r0, 4 \n" \
\r
525 " bne r2, r4, RegTest2Error \n" \
\r
526 " addi r2, r0, 5 \n" \
\r
527 " bne r2, r5, RegTest2Error \n" \
\r
528 " addi r2, r0, 6 \n" \
\r
529 " bne r2, r6, RegTest2Error \n" \
\r
530 " addi r2, r0, 7 \n" \
\r
531 " bne r2, r7, RegTest2Error \n" \
\r
532 " addi r2, r0, 8 \n" \
\r
533 " bne r2, r8, RegTest2Error \n" \
\r
534 " addi r2, r0, 9 \n" \
\r
535 " bne r2, r9, RegTest2Error \n" \
\r
536 " addi r2, r0, 10 \n" \
\r
537 " bne r2, r10, RegTest2Error \n" \
\r
538 " addi r2, r0, 11 \n" \
\r
539 " bne r2, r11, RegTest2Error \n" \
\r
540 " addi r2, r0, 12 \n" \
\r
541 " bne r2, r12, RegTest2Error \n" \
\r
542 " addi r2, r0, 13 \n" \
\r
543 " bne r2, r13, RegTest2Error \n" \
\r
544 " addi r2, r0, 14 \n" \
\r
545 " bne r2, r14, RegTest2Error \n" \
\r
546 " addi r2, r0, 15 \n" \
\r
547 " bne r2, r15, RegTest2Error \n" \
\r
548 " addi r2, r0, 16 \n" \
\r
549 " bne r2, r16, RegTest2Error \n" \
\r
550 " addi r2, r0, 17 \n" \
\r
551 " bne r2, r17, RegTest2Error \n" \
\r
552 " addi r2, r0, 18 \n" \
\r
553 " bne r2, r18, RegTest2Error \n" \
\r
554 " addi r2, r0, 19 \n" \
\r
555 " bne r2, r19, RegTest2Error \n" \
\r
556 " addi r2, r0, 20 \n" \
\r
557 " bne r2, r20, RegTest2Error \n" \
\r
558 " addi r2, r0, 21 \n" \
\r
559 " bne r2, r21, RegTest2Error \n" \
\r
560 " addi r2, r0, 22 \n" \
\r
561 " bne r2, r22, RegTest2Error \n" \
\r
562 " addi r2, r0, 23 \n" \
\r
563 " bne r2, r23, RegTest2Error \n" \
\r
564 " addi r2, r0, 28 \n" \
\r
565 " bne r2, r28, RegTest2Error \n" \
\r
566 " addi r2, r0, 31 \n" \
\r
567 " bne r2, r31, RegTest2Error \n" \
\r
568 " ldw r2, %gprel(ulRegTest2Counter)(gp) \n" \
\r
569 " addi r2, r2, 1 \n" \
\r
570 " stw r2, %gprel(ulRegTest2Counter)(gp) \n" \
\r
571 " br RegTest2 \n" \
\r
572 "RegTest2Error: \n" \
\r
573 " br RegTest2Error \n"
\r
576 /*-----------------------------------------------------------*/
\r