source: rtems/c/src/tests/sptests/sp19/inttest.h @ d2b93bfd

4.104.114.84.95
Last change on this file since d2b93bfd was d2b93bfd, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:53:48

2003-09-04 Joel Sherrill <joel@…>

  • sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c, sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c, sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc, sp03/system.h, sp03/task1.c, sp03/task2.c, sp04/init.c, sp04/sp04.doc, sp04/system.h, sp04/task1.c, sp04/task2.c, sp04/task3.c, sp04/tswitch.c, sp05/init.c, sp05/sp05.doc, sp05/system.h, sp05/task1.c, sp05/task2.c, sp05/task3.c, sp06/init.c, sp06/sp06.doc, sp06/system.h, sp06/task1.c, sp06/task2.c, sp06/task3.c, sp07/init.c, sp07/sp07.doc, sp07/system.h, sp07/task1.c, sp07/task2.c, sp07/task3.c, sp07/task4.c, sp07/taskexit.c, sp07/tcreate.c, sp07/tdelete.c, sp07/trestart.c, sp07/tstart.c, sp08/init.c, sp08/sp08.doc, sp08/system.h, sp08/task1.c, sp09/delay.c, sp09/init.c, sp09/isr.c, sp09/screen01.c, sp09/screen02.c, sp09/screen03.c, sp09/screen04.c, sp09/screen05.c, sp09/screen06.c, sp09/screen07.c, sp09/screen08.c, sp09/screen09.c, sp09/screen10.c, sp09/screen11.c, sp09/screen12.c, sp09/screen13.c, sp09/screen14.c, sp09/sp09.doc, sp09/system.h, sp09/task1.c, sp09/task2.c, sp09/task3.c, sp09/task4.c, sp11/init.c, sp11/sp11.doc, sp11/system.h, sp11/task1.c, sp11/task2.c, sp11/timer.c, sp12/init.c, sp12/pridrv.c, sp12/pritask.c, sp12/sp12.doc, sp12/system.h, sp12/task1.c, sp12/task2.c, sp12/task3.c, sp12/task4.c, sp12/task5.c, sp13/fillbuff.c, sp13/init.c, sp13/putbuff.c, sp13/sp13.doc, sp13/system.h, sp13/task1.c, sp13/task2.c, sp13/task3.c, sp14/asr.c, sp14/init.c, sp14/sp14.doc, sp14/system.h, sp14/task1.c, sp14/task2.c, sp15/init.c, sp15/sp15.doc, sp15/system.h, sp15/task1.c, sp16/init.c, sp16/sp16.doc, sp16/system.h, sp16/task1.c, sp16/task2.c, sp16/task3.c, sp16/task4.c, sp16/task5.c, sp17/asr.c, sp17/init.c, sp17/sp17.doc, sp17/system.h, sp17/task1.c, sp17/task2.c, sp19/first.c, sp19/fptask.c, sp19/fptest.h, sp19/init.c, sp19/inttest.h, sp19/sp19.doc, sp19/system.h, sp19/task1.c, sp20/getall.c, sp20/init.c, sp20/sp20.doc, sp20/system.h, sp20/task1.c, sp21/init.c, sp21/sp21.doc, sp21/system.h, sp21/task1.c, sp22/delay.c, sp22/init.c, sp22/prtime.c, sp22/sp22.doc, sp22/system.h, sp22/task1.c, sp23/init.c, sp23/sp23.doc, sp23/system.h, sp23/task1.c, sp24/init.c, sp24/resume.c, sp24/sp24.doc, sp24/system.h, sp24/task1.c, sp25/init.c, sp25/sp25.doc, sp25/system.h, sp25/task1.c, sp26/init.c, sp26/sp26.doc, sp26/system.h, sp26/task1.c, sp30/init.c, sp30/resume.c, sp30/sp30.doc, sp30/system.h, sp30/task1.c, sp31/delay.c, sp31/init.c, sp31/prtime.c, sp31/sp31.doc, sp31/system.h, sp31/task1.c, sp32/init.c, spfatal/fatal.c, spfatal/init.c, spfatal/puterr.c, spfatal/spfatal.doc, spfatal/system.h, spfatal/task1.c, spsize/getint.c, spsize/init.c, spsize/size.c, spsize/system.h: URL for license changed.
  • Property mode set to 100644
File size: 4.7 KB
Line 
1/*  inttest.h
2 *
3 *  XXX: ???
4 *  This include file contains the CPU dependent implementation
5 *  of the following routines needed to test RTEMS floating
6 *  point support:
7 *           INTEGER_load( &context )
8 *           INTEGER_check( &context )
9 *
10 *  INTEGER_load   - loads the specified floating point context
11 *  INTEGER_check  - checks the specified floating point context
12 *
13 *  NOTE:  These routines are VERY CPU dependent and are thus
14 *         located in in the CPU dependent include file
15 *         inttest.h.  These routines form the core of the
16 *         floating point context switch test.
17 *
18 *  COPYRIGHT (c) 1989-1999.
19 *  On-Line Applications Research Corporation (OAR).
20 *
21 *  The license and distribution terms for this file may be
22 *  found in the file LICENSE in this distribution or at
23 *  http://www.rtems.com/license/LICENSE.
24 *
25 *  $Id$
26 */
27
28
29#ifndef __INTEGER_TEST_h
30#define __INTEGER_TEST_h
31
32#include <stdio.h>
33#define REG_VARIABLE rtems_unsigned32
34
35#define INTEGER_DECLARE \
36    REG_VARIABLE int01 = 1; \
37    REG_VARIABLE int02 = 2; \
38    REG_VARIABLE int03 = 3; \
39    REG_VARIABLE int04 = 4; \
40    REG_VARIABLE int05 = 5; \
41    REG_VARIABLE int06 = 6; \
42    REG_VARIABLE int07 = 7; \
43    REG_VARIABLE int08 = 8; \
44    REG_VARIABLE int09 = 9; \
45    REG_VARIABLE int10 = 10; \
46    REG_VARIABLE int11 = 11; \
47    REG_VARIABLE int12 = 12; \
48    REG_VARIABLE int13 = 13; \
49    REG_VARIABLE int14 = 14; \
50    REG_VARIABLE int15 = 15; \
51    REG_VARIABLE int16 = 16; \
52    REG_VARIABLE int17 = 17; \
53    REG_VARIABLE int18 = 18; \
54    REG_VARIABLE int19 = 19; \
55    REG_VARIABLE int20 = 20; \
56    REG_VARIABLE int21 = 21; \
57    REG_VARIABLE int22 = 22; \
58    REG_VARIABLE int23 = 23; \
59    REG_VARIABLE int24 = 24; \
60    REG_VARIABLE int25 = 25; \
61    REG_VARIABLE int26 = 26; \
62    REG_VARIABLE int27 = 27; \
63    REG_VARIABLE int28 = 28; \
64    REG_VARIABLE int29 = 29; \
65    REG_VARIABLE int30 = 30; \
66    REG_VARIABLE int31 = 31; \
67    REG_VARIABLE int32 = 32
68
69#define INTEGER_LOAD( _factor ) \
70  do {                \
71    int01  += _factor; \
72    int02  += _factor; \
73    int03  += _factor; \
74    int04  += _factor; \
75    int05  += _factor; \
76    int06  += _factor; \
77    int07  += _factor; \
78    int08  += _factor; \
79    int09  += _factor; \
80    int10  += _factor; \
81    int11  += _factor; \
82    int12  += _factor; \
83    int13  += _factor; \
84    int14  += _factor; \
85    int15  += _factor; \
86    int16  += _factor; \
87    int17  += _factor; \
88    int18  += _factor; \
89    int19  += _factor; \
90    int20  += _factor; \
91    int21  += _factor; \
92    int22  += _factor; \
93    int23  += _factor; \
94    int24  += _factor; \
95    int25  += _factor; \
96    int26  += _factor; \
97    int27  += _factor; \
98    int28  += _factor; \
99    int29  += _factor; \
100    int30  += _factor; \
101    int31  += _factor; \
102    int32  += _factor; \
103  } while (0)
104
105#define INTEGER_CHECK_ONE( _v, _base, _factor ) \
106      if ( (_v) != ((_base) + (_factor)) )  { \
107          printf("%d: " #_v " wrong -- (0x%x not 0x%x)\n", \
108             task_index, (_v), (_base + _factor));  \
109      }
110
111
112#define INTEGER_CHECK( _factor ) \
113    do { \
114      INTEGER_CHECK_ONE( int01,  1, (_factor) ); \
115      INTEGER_CHECK_ONE( int02,  2, (_factor) ); \
116      INTEGER_CHECK_ONE( int03,  3, (_factor) ); \
117      INTEGER_CHECK_ONE( int04,  4, (_factor) ); \
118      INTEGER_CHECK_ONE( int05,  5, (_factor) ); \
119      INTEGER_CHECK_ONE( int06,  6, (_factor) ); \
120      INTEGER_CHECK_ONE( int07,  7, (_factor) ); \
121      INTEGER_CHECK_ONE( int08,  8, (_factor) ); \
122      INTEGER_CHECK_ONE( int09,  9, (_factor) ); \
123      INTEGER_CHECK_ONE( int10, 10, (_factor) ); \
124      INTEGER_CHECK_ONE( int11, 11, (_factor) ); \
125      INTEGER_CHECK_ONE( int12, 12, (_factor) ); \
126      INTEGER_CHECK_ONE( int13, 13, (_factor) ); \
127      INTEGER_CHECK_ONE( int14, 14, (_factor) ); \
128      INTEGER_CHECK_ONE( int15, 15, (_factor) ); \
129      INTEGER_CHECK_ONE( int16, 16, (_factor) ); \
130      INTEGER_CHECK_ONE( int17, 17, (_factor) ); \
131      INTEGER_CHECK_ONE( int18, 18, (_factor) ); \
132      INTEGER_CHECK_ONE( int19, 19, (_factor) ); \
133      INTEGER_CHECK_ONE( int20, 20, (_factor) ); \
134      INTEGER_CHECK_ONE( int21, 21, (_factor) ); \
135      INTEGER_CHECK_ONE( int22, 22, (_factor) ); \
136      INTEGER_CHECK_ONE( int23, 23, (_factor) ); \
137      INTEGER_CHECK_ONE( int24, 24, (_factor) ); \
138      INTEGER_CHECK_ONE( int25, 25, (_factor) ); \
139      INTEGER_CHECK_ONE( int26, 26, (_factor) ); \
140      INTEGER_CHECK_ONE( int27, 27, (_factor) ); \
141      INTEGER_CHECK_ONE( int28, 28, (_factor) ); \
142      INTEGER_CHECK_ONE( int29, 29, (_factor) ); \
143      INTEGER_CHECK_ONE( int30, 30, (_factor) ); \
144      INTEGER_CHECK_ONE( int31, 31, (_factor) ); \
145      INTEGER_CHECK_ONE( int32, 32, (_factor) ); \
146    } while (0)
147
148#endif
Note: See TracBrowser for help on using the repository browser.