2 FreeRTOS V8.2.0rc1 - Copyright (C) 2014 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 This file is part of the FreeRTOS distribution.
\r
9 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
10 the terms of the GNU General Public License (version 2) as published by the
\r
11 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
13 >>! NOTE: The modification to the GPL is included to allow you to !<<
\r
14 >>! distribute a combined work that includes FreeRTOS without being !<<
\r
15 >>! obliged to provide the source code for proprietary components !<<
\r
16 >>! outside of the FreeRTOS kernel. !<<
\r
18 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
19 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
20 FOR A PARTICULAR PURPOSE. Full license text is available on the following
\r
21 link: http://www.freertos.org/a00114.html
\r
25 ***************************************************************************
\r
27 * Having a problem? Start by reading the FAQ "My application does *
\r
28 * not run, what could be wrong?". Have you defined configASSERT()? *
\r
30 * http://www.FreeRTOS.org/FAQHelp.html *
\r
32 ***************************************************************************
\r
34 ***************************************************************************
\r
36 * FreeRTOS provides completely free yet professionally developed, *
\r
37 * robust, strictly quality controlled, supported, and cross *
\r
38 * platform software that is more than just the market leader, it *
\r
39 * is the industry's de facto standard. *
\r
41 * Help yourself get started quickly while simultaneously helping *
\r
42 * to support the FreeRTOS project by purchasing a FreeRTOS *
\r
43 * tutorial book, reference manual, or both: *
\r
44 * http://www.FreeRTOS.org/Documentation *
\r
46 ***************************************************************************
\r
48 ***************************************************************************
\r
50 * Investing in training allows your team to be as productive as *
\r
51 * possible as early as possible, lowering your overall development *
\r
52 * cost, and enabling you to bring a more robust product to market *
\r
53 * earlier than would otherwise be possible. Richard Barry is both *
\r
54 * the architect and key author of FreeRTOS, and so also the world's *
\r
55 * leading authority on what is the world's most popular real time *
\r
56 * kernel for deeply embedded MCU designs. Obtaining your training *
\r
57 * from Richard ensures your team will gain directly from his in-depth *
\r
58 * product knowledge and years of usage experience. Contact Real Time *
\r
59 * Engineers Ltd to enquire about the FreeRTOS Masterclass, presented *
\r
60 * by Richard Barry: http://www.FreeRTOS.org/contact
\r
62 ***************************************************************************
\r
64 ***************************************************************************
\r
66 * You are receiving this top quality software for free. Please play *
\r
67 * fair and reciprocate by reporting any suspected issues and *
\r
68 * participating in the community forum: *
\r
69 * http://www.FreeRTOS.org/support *
\r
73 ***************************************************************************
\r
75 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
76 license and Real Time Engineers Ltd. contact details.
\r
78 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
79 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
80 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
82 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
\r
83 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
\r
85 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
86 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
87 licenses offer ticketed support, indemnification and commercial middleware.
\r
89 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
90 engineered and independently SIL3 certified version for use in safety and
\r
91 mission critical applications that require provable dependability.
\r
97 * Creates all the demo application tasks, then starts the scheduler.
\r
98 * In addition to the standard demo tasks, the following tasks and tests are
\r
99 * defined and/or created within this file:
\r
101 * "Check" task - This only executes every five seconds but has the highest
\r
102 * priority so is guaranteed to get processor time. Its main function is to
\r
103 * check that all the standard demo tasks are still operational. The check
\r
104 * task will write an error message to the console should an error be detected
\r
105 * within any of the demo tasks. The check task also toggles the LED defined
\r
106 * by mainCHECK_LED every 5 seconds while the system is error free, with the
\r
107 * toggle rate increasing to every 500ms should an error occur.
\r
109 * "Reg test" tasks - These fill the registers with known values, then check
\r
110 * that each register still contains its expected value. Each task uses
\r
111 * different values. The tasks run with very low priority so get preempted very
\r
112 * frequently. A register containing an unexpected value is indicative of an
\r
113 * error in the context switching mechanism.
\r
115 * See the online documentation for this demo for more information on interrupt
\r
119 /* Standard includes. */
\r
120 #include <stddef.h>
\r
122 #include <string.h>
\r
124 /* Scheduler includes. */
\r
125 #include "FreeRTOS.h"
\r
129 /* Demo application includes. */
\r
130 #include "partest.h"
\r
132 #include "blocktim.h"
\r
133 #include "semtest.h"
\r
134 #include "serial.h"
\r
135 #include "comtest.h"
\r
136 #include "GenQTest.h"
\r
138 #include "integer.h"
\r
140 #include "BlockQ.h"
\r
141 #include "dynamic.h"
\r
142 #include "countsem.h"
\r
143 #include "recmutex.h"
\r
146 /*-----------------------------------------------------------*/
\r
148 #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
150 /*-----------------------------------------------------------*/
\r
152 /* The rate at which the LED controlled by the 'check' task will toggle when no
\r
153 errors have been detected. */
\r
154 #define mainNO_ERROR_PERIOD ( 5000 )
\r
156 /* The rate at which the LED controlled by the 'check' task will toggle when an
\r
157 error has been detected. */
\r
158 #define mainERROR_PERIOD ( 500 )
\r
160 /* The LED toggled by the Check task. */
\r
161 #define mainCHECK_LED ( 7 )
\r
163 /* The first LED used by the ComTest tasks. One LED toggles each time a
\r
164 character is transmitted, and one each time a character is received and
\r
165 verified as being the expected character. */
\r
166 #define mainCOMTEST_LED ( 4 )
\r
168 /* Priority definitions for the tasks in the demo application. */
\r
169 #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
170 #define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
171 #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
\r
172 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
173 #define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 3 )
\r
174 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
\r
175 #define mainSEMAPHORE_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
\r
176 #define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
\r
177 #define mainREG_TEST_PRIORITY ( tskIDLE_PRIORITY )
\r
180 #define mainDONT_WAIT ( 0 )
\r
182 /* The parameters passed to the reg test tasks. This is just done to check
\r
183 the parameter passing mechanism is working correctly. */
\r
184 #define mainREG_TEST_1_PARAMETER ( ( void * ) 0x12345678 )
\r
185 #define mainREG_TEST_2_PARAMETER ( ( void * ) 0x87654321 )
\r
187 /*-----------------------------------------------------------*/
\r
190 * Setup the processor ready for the demo.
\r
192 static void prvSetupHardware( void );
\r
195 * Execute all of the check functions to ensure the tests haven't failed.
\r
197 static void prvCheckTask( void *pvParameters );
\r
200 * The register test (or RegTest) tasks as described at the top of this file.
\r
202 static void prvFirstRegTestTask( void *pvParameters );
\r
203 static void prvSecondRegTestTask( void *pvParameters );
\r
205 /*-----------------------------------------------------------*/
\r
207 /* Counters that are incremented on each iteration of the RegTest tasks
\r
208 so long as no errors have been detected. */
\r
209 volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
\r
211 /*-----------------------------------------------------------*/
\r
214 * Create the demo tasks then start the scheduler.
\r
218 /* Configure any hardware required for this demo. */
\r
219 prvSetupHardware();
\r
221 /* Create all the other standard demo tasks. These serve no purpose other
\r
222 than to test the port and demonstrate the use of the FreeRTOS API. */
\r
223 vStartLEDFlashTasks( tskIDLE_PRIORITY );
\r
224 vStartIntegerMathTasks( mainGENERIC_QUEUE_PRIORITY );
\r
225 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\r
226 vStartBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );
\r
227 vCreateBlockTimeTasks();
\r
228 vStartSemaphoreTasks( mainSEMAPHORE_TASK_PRIORITY );
\r
229 vStartDynamicPriorityTasks();
\r
230 vStartQueuePeekTasks();
\r
231 vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );
\r
232 vStartCountingSemaphoreTasks();
\r
233 vStartRecursiveMutexTasks();
\r
234 vAltStartComTestTasks( mainCOM_TEST_PRIORITY, 0, mainCOMTEST_LED );
\r
236 /* prvCheckTask uses sprintf so requires more stack. */
\r
237 xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
\r
239 /* The RegTest tasks as described at the top of this file. */
\r
240 xTaskCreate( prvFirstRegTestTask, "Rreg1", configMINIMAL_STACK_SIZE, mainREG_TEST_1_PARAMETER, mainREG_TEST_PRIORITY, NULL );
\r
241 xTaskCreate( prvSecondRegTestTask, "Rreg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, mainREG_TEST_PRIORITY, NULL );
\r
243 /* This task has to be created last as it keeps account of the number of tasks
\r
244 it expects to see running. */
\r
245 vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
\r
247 /* Finally start the scheduler. */
\r
248 vTaskStartScheduler();
\r
250 /* Will only reach here if there is insufficient heap available to start
\r
254 /*-----------------------------------------------------------*/
\r
256 static void prvSetupHardware( void )
\r
258 /* Setup the digital IO for the LED's. */
\r
259 vParTestInitialise();
\r
261 /*-----------------------------------------------------------*/
\r
263 void vApplicationStackOverflowHook( void )
\r
265 /* Look at pxCurrentTCB to see which task overflowed its stack. */
\r
271 /*-----------------------------------------------------------*/
\r
273 void _general_exception_handler( unsigned long ulCause, unsigned long ulStatus )
\r
275 /* This overrides the definition provided by the kernel. Other exceptions
\r
276 should be handled here. */
\r
282 /*-----------------------------------------------------------*/
\r
284 static void prvCheckTask( void *pvParameters )
\r
286 TickType_t xLastExecutionTime, ulTicksToWait = mainNO_ERROR_PERIOD;
\r
287 unsigned long ulLastRegTest1 = 0UL, ulLastRegTest2 = 0UL;
\r
288 const char * pcMessage;
\r
290 /* Initialise the variable used to control our iteration rate prior to
\r
292 xLastExecutionTime = xTaskGetTickCount();
\r
296 /* Wait until it is time to run the tests again. */
\r
297 vTaskDelayUntil( &xLastExecutionTime, ulTicksToWait );
\r
299 /* Have any of the standard demo tasks detected an error in their
\r
301 if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
\r
303 ulTicksToWait = mainERROR_PERIOD;
\r
304 pcMessage = "Error: Integer Maths.\n";
\r
306 else if( xAreGenericQueueTasksStillRunning() != pdTRUE )
\r
308 ulTicksToWait = mainERROR_PERIOD;
\r
309 pcMessage = "Error: GenQ.\n";
\r
311 else if( xAreBlockingQueuesStillRunning() != pdTRUE )
\r
313 ulTicksToWait = mainERROR_PERIOD;
\r
314 pcMessage = "Error: BlockQ.\n";
\r
316 else if( xArePollingQueuesStillRunning() != pdTRUE )
\r
318 ulTicksToWait = mainERROR_PERIOD;
\r
319 pcMessage = "Error: PollQ.\n";
\r
321 else if( xAreQueuePeekTasksStillRunning() != pdTRUE )
\r
323 ulTicksToWait = mainERROR_PERIOD;
\r
324 pcMessage = "Error: PeekQ.\n";
\r
326 else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
\r
328 ulTicksToWait = mainERROR_PERIOD;
\r
329 pcMessage = "Error: Block Time.\n";
\r
331 else if( xAreSemaphoreTasksStillRunning() != pdTRUE )
\r
333 ulTicksToWait = mainERROR_PERIOD;
\r
334 pcMessage = "Error: Semaphore Test.\n";
\r
336 else if( xAreComTestTasksStillRunning() != pdTRUE )
\r
338 ulTicksToWait = mainERROR_PERIOD;
\r
339 pcMessage = "Error: Comm Test.\n";
\r
341 else if( xIsCreateTaskStillRunning() != pdTRUE )
\r
343 ulTicksToWait = mainERROR_PERIOD;
\r
344 pcMessage = "Error: Suicidal Tasks.\n";
\r
346 else if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
\r
348 ulTicksToWait = mainERROR_PERIOD;
\r
349 pcMessage = "Error: Dynamic Priority.\n";
\r
351 else if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )
\r
353 ulTicksToWait = mainERROR_PERIOD;
\r
354 pcMessage = "Error: Count Semaphore.\n";
\r
356 else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
\r
358 ulTicksToWait = mainERROR_PERIOD;
\r
359 pcMessage = "Error: Recursive Mutex.\n";
\r
361 else if( ulLastRegTest1 == ulRegTest1Counter )
\r
363 /* ulRegTest1Counter is no longer being incremented, indicating
\r
364 that an error has been discovered in prvFirstRegTestTask(). */
\r
365 ulTicksToWait = mainERROR_PERIOD;
\r
366 pcMessage = "Error: Reg Test1.\n";
\r
368 else if( ulLastRegTest2 == ulRegTest2Counter )
\r
370 /* ulRegTest2Counter is no longer being incremented, indicating
\r
371 that an error has been discovered in prvSecondRegTestTask(). */
\r
372 ulTicksToWait = mainERROR_PERIOD;
\r
373 pcMessage = "Error: Reg Test2.\n";
\r
380 /* Remember the counter values this time around so a counter failing
\r
381 to be incremented correctly can be spotted. */
\r
382 ulLastRegTest1 = ulRegTest1Counter;
\r
383 ulLastRegTest2 = ulRegTest2Counter;
\r
385 /* Print out an error message if there is one. Mutual exclusion is
\r
386 not used as this is the only task accessing stdout. */
\r
387 if( pcMessage != NULL )
\r
389 printf( pcMessage );
\r
392 /* Provide visual feedback of the system status. If the LED is toggled
\r
393 every 5 seconds then no errors have been found. If the LED is toggled
\r
394 every 500ms then at least one error has been found. */
\r
395 vParTestToggleLED( mainCHECK_LED );
\r
398 /*-----------------------------------------------------------*/
\r
400 static void prvFirstRegTestTask( void *pvParameters )
\r
402 /* Check the parameters are passed in as expected. */
\r
403 if( pvParameters != mainREG_TEST_1_PARAMETER )
\r
405 /* Don't execute any further so an error is recognised by the check
\r
407 vTaskDelete( NULL );
\r
410 /* Fill registers with known values, then check that each register still
\r
411 contains its expected value. An incorrect value is indicative of an error
\r
412 in the context switching process.
\r
414 If no errors are found ulRegTest1Counter is incremented. The check task
\r
415 will recognise an error if ulRegTest1Counter stops being incremented.
\r
416 This task also performs a manual yield in the middle of its execution, just
\r
417 to increase the test coverage. */
\r
419 " .extern ulRegTest1Counter \n" \
\r
421 " addi r3, r0, 3 \n" \
\r
422 " addi r4, r0, 4 \n" \
\r
423 " addi r5, r0, 5 \n" \
\r
424 " addi r6, r0, 6 \n" \
\r
425 " addi r7, r0, 7 \n" \
\r
426 " addi r8, r0, 8 \n" \
\r
427 " addi r9, r0, 9 \n" \
\r
428 " addi r10, r0, 10 \n" \
\r
429 " addi r11, r0, 11 \n" \
\r
430 " addi r12, r0, 12 \n" \
\r
431 " addi r13, r0, 13 \n" \
\r
432 " addi r14, r0, 14 \n" \
\r
433 " addi r15, r0, 15 \n" \
\r
434 " addi r16, r0, 16 \n" \
\r
435 " addi r17, r0, 17 \n" \
\r
436 " addi r18, r0, 18 \n" \
\r
437 " addi r19, r0, 19 \n" \
\r
438 " addi r20, r0, 20 \n" \
\r
439 " addi r21, r0, 21 \n" \
\r
440 " addi r22, r0, 22 \n" \
\r
441 " addi r23, r0, 23 \n" \
\r
442 " addi r28, r0, 28 \n" \
\r
443 " addi r31, r0, 31 \n" \
\r
445 " addi r2, r0, 0 \n" \
\r
447 " bne r2, r0, RegTest1Error \n" \
\r
448 " addi r2, r0, 3 \n" \
\r
449 " bne r2, r3, RegTest1Error \n" \
\r
450 " addi r2, r0, 4 \n" \
\r
451 " bne r2, r4, RegTest1Error \n" \
\r
452 " addi r2, r0, 5 \n" \
\r
453 " bne r2, r5, RegTest1Error \n" \
\r
454 " addi r2, r0, 6 \n" \
\r
455 " bne r2, r6, RegTest1Error \n" \
\r
456 " addi r2, r0, 7 \n" \
\r
457 " bne r2, r7, RegTest1Error \n" \
\r
458 " addi r2, r0, 8 \n" \
\r
459 " bne r2, r8, RegTest1Error \n" \
\r
460 " addi r2, r0, 9 \n" \
\r
461 " bne r2, r9, RegTest1Error \n" \
\r
462 " addi r2, r0, 10 \n" \
\r
463 " bne r2, r10, RegTest1Error \n" \
\r
464 " addi r2, r0, 11 \n" \
\r
465 " bne r2, r11, RegTest1Error \n" \
\r
466 " addi r2, r0, 12 \n" \
\r
467 " bne r2, r12, RegTest1Error \n" \
\r
468 " addi r2, r0, 13 \n" \
\r
469 " bne r2, r13, RegTest1Error \n" \
\r
470 " addi r2, r0, 14 \n" \
\r
471 " bne r2, r14, RegTest1Error \n" \
\r
472 " addi r2, r0, 15 \n" \
\r
473 " bne r2, r15, RegTest1Error \n" \
\r
474 " addi r2, r0, 16 \n" \
\r
475 " bne r2, r16, RegTest1Error \n" \
\r
476 " addi r2, r0, 17 \n" \
\r
477 " bne r2, r17, RegTest1Error \n" \
\r
478 " addi r2, r0, 18 \n" \
\r
479 " bne r2, r18, RegTest1Error \n" \
\r
480 " addi r2, r0, 19 \n" \
\r
481 " bne r2, r19, RegTest1Error \n" \
\r
482 " addi r2, r0, 20 \n" \
\r
483 " bne r2, r20, RegTest1Error \n" \
\r
484 " addi r2, r0, 21 \n" \
\r
485 " bne r2, r21, RegTest1Error \n" \
\r
486 " addi r2, r0, 22 \n" \
\r
487 " bne r2, r22, RegTest1Error \n" \
\r
488 " addi r2, r0, 23 \n" \
\r
489 " bne r2, r23, RegTest1Error \n" \
\r
490 " addi r2, r0, 28 \n" \
\r
491 " bne r2, r28, RegTest1Error \n" \
\r
492 " addi r2, r0, 31 \n" \
\r
493 " bne r2, r31, RegTest1Error \n" \
\r
494 " ldw r2, %gprel(ulRegTest1Counter)(gp) \n" \
\r
495 " addi r2, r2, 1 \n" \
\r
496 " stw r2, %gprel(ulRegTest1Counter)(gp) \n" \
\r
497 " br RegTest1 \n" \
\r
498 "RegTest1Error: \n" \
\r
499 " br RegTest1Error \n"
\r
502 /*-----------------------------------------------------------*/
\r
504 static void prvSecondRegTestTask( void *pvParameters )
\r
506 /* Check the parameters are passed in as expected. */
\r
507 if( pvParameters != mainREG_TEST_2_PARAMETER )
\r
509 /* Don't execute any further so an error is recognised by the check
\r
511 vTaskDelete( NULL );
\r
514 /* Fill registers with known values, then check that each register still
\r
515 contains its expected value. An incorrect value is indicative of an error
\r
516 in the context switching process.
\r
518 If no errors are found ulRegTest2Counter is incremented. The check task
\r
519 will recognise an error if ulRegTest2Counter stops being incremented. */
\r
521 " .extern ulRegTest2Counter \n" \
\r
523 " addi r3, r0, 3 \n" \
\r
524 " addi r4, r0, 4 \n" \
\r
525 " addi r5, r0, 5 \n" \
\r
526 " addi r6, r0, 6 \n" \
\r
527 " addi r7, r0, 7 \n" \
\r
528 " addi r8, r0, 8 \n" \
\r
529 " addi r9, r0, 9 \n" \
\r
530 " addi r10, r0, 10 \n" \
\r
531 " addi r11, r0, 11 \n" \
\r
532 " addi r12, r0, 12 \n" \
\r
533 " addi r13, r0, 13 \n" \
\r
534 " addi r14, r0, 14 \n" \
\r
535 " addi r15, r0, 15 \n" \
\r
536 " addi r16, r0, 16 \n" \
\r
537 " addi r17, r0, 17 \n" \
\r
538 " addi r18, r0, 18 \n" \
\r
539 " addi r19, r0, 19 \n" \
\r
540 " addi r20, r0, 20 \n" \
\r
541 " addi r21, r0, 21 \n" \
\r
542 " addi r22, r0, 22 \n" \
\r
543 " addi r23, r0, 23 \n" \
\r
544 " addi r28, r0, 28 \n" \
\r
545 " addi r31, r0, 31 \n" \
\r
547 " addi r2, r0, 0 \n" \
\r
548 " bne r2, r0, RegTest2Error \n" \
\r
549 " addi r2, r0, 3 \n" \
\r
550 " bne r2, r3, RegTest2Error \n" \
\r
551 " addi r2, r0, 4 \n" \
\r
552 " bne r2, r4, RegTest2Error \n" \
\r
553 " addi r2, r0, 5 \n" \
\r
554 " bne r2, r5, RegTest2Error \n" \
\r
555 " addi r2, r0, 6 \n" \
\r
556 " bne r2, r6, RegTest2Error \n" \
\r
557 " addi r2, r0, 7 \n" \
\r
558 " bne r2, r7, RegTest2Error \n" \
\r
559 " addi r2, r0, 8 \n" \
\r
560 " bne r2, r8, RegTest2Error \n" \
\r
561 " addi r2, r0, 9 \n" \
\r
562 " bne r2, r9, RegTest2Error \n" \
\r
563 " addi r2, r0, 10 \n" \
\r
564 " bne r2, r10, RegTest2Error \n" \
\r
565 " addi r2, r0, 11 \n" \
\r
566 " bne r2, r11, RegTest2Error \n" \
\r
567 " addi r2, r0, 12 \n" \
\r
568 " bne r2, r12, RegTest2Error \n" \
\r
569 " addi r2, r0, 13 \n" \
\r
570 " bne r2, r13, RegTest2Error \n" \
\r
571 " addi r2, r0, 14 \n" \
\r
572 " bne r2, r14, RegTest2Error \n" \
\r
573 " addi r2, r0, 15 \n" \
\r
574 " bne r2, r15, RegTest2Error \n" \
\r
575 " addi r2, r0, 16 \n" \
\r
576 " bne r2, r16, RegTest2Error \n" \
\r
577 " addi r2, r0, 17 \n" \
\r
578 " bne r2, r17, RegTest2Error \n" \
\r
579 " addi r2, r0, 18 \n" \
\r
580 " bne r2, r18, RegTest2Error \n" \
\r
581 " addi r2, r0, 19 \n" \
\r
582 " bne r2, r19, RegTest2Error \n" \
\r
583 " addi r2, r0, 20 \n" \
\r
584 " bne r2, r20, RegTest2Error \n" \
\r
585 " addi r2, r0, 21 \n" \
\r
586 " bne r2, r21, RegTest2Error \n" \
\r
587 " addi r2, r0, 22 \n" \
\r
588 " bne r2, r22, RegTest2Error \n" \
\r
589 " addi r2, r0, 23 \n" \
\r
590 " bne r2, r23, RegTest2Error \n" \
\r
591 " addi r2, r0, 28 \n" \
\r
592 " bne r2, r28, RegTest2Error \n" \
\r
593 " addi r2, r0, 31 \n" \
\r
594 " bne r2, r31, RegTest2Error \n" \
\r
595 " ldw r2, %gprel(ulRegTest2Counter)(gp) \n" \
\r
596 " addi r2, r2, 1 \n" \
\r
597 " stw r2, %gprel(ulRegTest2Counter)(gp) \n" \
\r
598 " br RegTest2 \n" \
\r
599 "RegTest2Error: \n" \
\r
600 " br RegTest2Error \n"
\r
603 /*-----------------------------------------------------------*/
\r