source: rtems/c/src/ada-tests/support/fp.inc @ 948a069

Last change on this file since 948a069 was f6bcc8f5, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 13:25:16

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

  • samples/base_sp/base_sp.adb, samples/base_sp/config.h, samples/base_sp/sptest.adb, samples/base_sp/sptest.ads, samples/hello/config.h, samples/hello/hello.adb, samples/hello/sptest.adb, samples/hello/sptest.ads, samples/ticker/config.h, samples/ticker/sptest.adb, samples/ticker/sptest.ads, samples/ticker/ticker.adb, sptests/sp01/config.h, sptests/sp01/sp01.adb, sptests/sp01/sptest.adb, sptests/sp01/sptest.ads, sptests/sp02/config.h, sptests/sp02/sp02.adb, sptests/sp02/sptest.adb, sptests/sp02/sptest.ads, sptests/sp03/config.h, sptests/sp03/sp03.adb, sptests/sp03/sptest.adb, sptests/sp03/sptest.ads, sptests/sp04/config.h, sptests/sp04/sp04.adb, sptests/sp04/sptest.adb, sptests/sp04/sptest.ads, sptests/sp05/config.h, sptests/sp05/sp05.adb, sptests/sp05/sptest.adb, sptests/sp05/sptest.ads, sptests/sp06/config.h, sptests/sp06/sp06.adb, sptests/sp06/sptest.adb, sptests/sp06/sptest.ads, sptests/sp07/config.h, sptests/sp07/sp07.adb, sptests/sp07/sptest.adb, sptests/sp07/sptest.ads, sptests/sp08/config.h, sptests/sp08/sp08.adb, sptests/sp08/sptest.adb, sptests/sp08/sptest.ads, sptests/sp09/config.h, sptests/sp09/sp09.adb, sptests/sp09/sptest.adb, sptests/sp09/sptest.ads, sptests/sp11/config.h, sptests/sp11/sp11.adb, sptests/sp11/sptest.adb, sptests/sp11/sptest.ads, sptests/sp12/config.h, sptests/sp12/sp12.adb, sptests/sp12/sptest.adb, sptests/sp12/sptest.ads, sptests/sp13/config.h, sptests/sp13/sp13.adb, sptests/sp13/sptest.adb, sptests/sp13/sptest.ads, sptests/sp14/config.h, sptests/sp14/sp14.adb, sptests/sp14/sptest.adb, sptests/sp14/sptest.ads, sptests/sp15/config.h, sptests/sp15/sp15.adb, sptests/sp15/sptest.adb, sptests/sp15/sptest.ads, sptests/sp16/config.h, sptests/sp16/sp16.adb, sptests/sp16/sptest.adb, sptests/sp16/sptest.ads, sptests/sp17/config.h, sptests/sp17/sp17.adb, sptests/sp17/sptest.adb, sptests/sp17/sptest.ads, sptests/sp19/config.h, sptests/sp19/sp19.adb, sptests/sp19/sptest.adp, sptests/sp19/sptest.ads, sptests/sp20/config.h, sptests/sp20/sp20.adb, sptests/sp20/sptest.adb, sptests/sp20/sptest.ads, sptests/sp21/config.h, sptests/sp21/sp21.adb, sptests/sp21/sptest.adb, sptests/sp21/sptest.ads, sptests/sp22/config.h, sptests/sp22/sp22.adb, sptests/sp22/sptest.adb, sptests/sp22/sptest.ads, sptests/sp23/config.h, sptests/sp23/sp23.adb, sptests/sp23/sptest.adb, sptests/sp23/sptest.ads, sptests/sp24/config.h, sptests/sp24/sp24.adb, sptests/sp24/sptest.adb, sptests/sp24/sptest.ads, sptests/sp25/config.h, sptests/sp25/sp25.adb, sptests/sp25/sptest.adb, sptests/sp25/sptest.ads, sptests/spsize/spsize.adb, sptests/spsize/sptest.adb, sptests/spsize/sptest.ads, support/address_io.adb, support/address_io.ads, support/float_io.ads, support/fp.inc, support/init.c, support/integer.inc, support/rtems_calling_overhead.ads, support/status_io.ads, support/test_support.adb, support/test_support.ads, support/time_test_support.adb, support/time_test_support.ads, support/timer_driver.adb, support/timer_driver.ads, support/unsigned32_io.ads, tmtests/tm01/config.h, tmtests/tm01/tm01.adb, tmtests/tm01/tmtest.adb, tmtests/tm01/tmtest.ads, tmtests/tm02/config.h, tmtests/tm02/tm02.adb, tmtests/tm02/tmtest.adb, tmtests/tm02/tmtest.ads, tmtests/tm03/config.h, tmtests/tm03/tm03.adb, tmtests/tm03/tmtest.adb, tmtests/tm03/tmtest.ads, tmtests/tm04/config.h, tmtests/tm04/tm04.adb, tmtests/tm04/tmtest.adb, tmtests/tm04/tmtest.ads, tmtests/tm05/config.h, tmtests/tm05/tm05.adb, tmtests/tm05/tmtest.adb, tmtests/tm05/tmtest.ads, tmtests/tm06/config.h, tmtests/tm06/tm06.adb, tmtests/tm06/tmtest.adb, tmtests/tm06/tmtest.ads, tmtests/tm07/config.h, tmtests/tm07/tm07.adb, tmtests/tm07/tmtest.adb, tmtests/tm07/tmtest.ads, tmtests/tm08/config.h, tmtests/tm08/tm08.adb, tmtests/tm08/tmtest.adb, tmtests/tm08/tmtest.ads, tmtests/tm09/config.h, tmtests/tm09/tm09.adb, tmtests/tm09/tmtest.adb, tmtests/tm09/tmtest.ads, tmtests/tm10/config.h, tmtests/tm10/tm10.adb, tmtests/tm10/tmtest.adb, tmtests/tm10/tmtest.ads, tmtests/tm11/config.h, tmtests/tm11/tm11.adb, tmtests/tm11/tmtest.adb, tmtests/tm11/tmtest.ads, tmtests/tm12/config.h, tmtests/tm12/tm12.adb, tmtests/tm12/tmtest.adb, tmtests/tm12/tmtest.ads, tmtests/tm13/config.h, tmtests/tm13/tm13.adb, tmtests/tm13/tmtest.adb, tmtests/tm13/tmtest.ads, tmtests/tm14/config.h, tmtests/tm14/tm14.adb, tmtests/tm14/tmtest.adb, tmtests/tm14/tmtest.ads, tmtests/tm15/config.h, tmtests/tm15/tm15.adb, tmtests/tm15/tmtest.adb, tmtests/tm15/tmtest.ads, tmtests/tm16/config.h, tmtests/tm16/tm16.adb, tmtests/tm16/tmtest.adb, tmtests/tm16/tmtest.ads, tmtests/tm17/config.h, tmtests/tm17/tm17.adb, tmtests/tm17/tmtest.adb, tmtests/tm17/tmtest.ads, tmtests/tm18/config.h, tmtests/tm18/tm18.adb, tmtests/tm18/tmtest.adb, tmtests/tm18/tmtest.ads, tmtests/tm19/config.h, tmtests/tm19/tm19.adb, tmtests/tm19/tmtest.adb, tmtests/tm19/tmtest.ads, tmtests/tm20/config.h, tmtests/tm20/tm20.adb, tmtests/tm20/tmtest.adb, tmtests/tm20/tmtest.ads, tmtests/tm21/config.h, tmtests/tm21/tm21.adb, tmtests/tm21/tmtest.adb, tmtests/tm21/tmtest.ads, tmtests/tm22/config.h, tmtests/tm22/tm22.adb, tmtests/tm22/tmtest.adb, tmtests/tm22/tmtest.ads, tmtests/tm23/config.h, tmtests/tm23/tm23.adb, tmtests/tm23/tmtest.adb, tmtests/tm23/tmtest.ads, tmtests/tm24/config.h, tmtests/tm24/tm24.adb, tmtests/tm24/tmtest.adb, tmtests/tm24/tmtest.ads, tmtests/tm25/config.h, tmtests/tm25/tm25.adb, tmtests/tm25/tmtest.adb, tmtests/tm25/tmtest.ads, tmtests/tm28/config.h, tmtests/tm28/tm28.adb, tmtests/tm28/tmtest.adb, tmtests/tm28/tmtest.ads, tmtests/tm29/config.h, tmtests/tm29/tm29.adb, tmtests/tm29/tmtest.adb, tmtests/tm29/tmtest.ads, tmtests/tmck/config.h, tmtests/tmck/tmck.adb, tmtests/tmck/tmtest.adb, tmtests/tmck/tmtest.ads, tmtests/tmoverhd/config.h, tmtests/tmoverhd/dummy_rtems.adb, tmtests/tmoverhd/dummy_rtems.ads, tmtests/tmoverhd/tmoverhd.adb, tmtests/tmoverhd/tmtest.adb, tmtests/tmoverhd/tmtest.ads: Removed incorrect statement about copyright assignment.
  • Property mode set to 100644
File size: 3.7 KB
Line 
1--
2--  fp.inc
3--
4--  Macros to produce a large number of LOCAL floating point variables.  This
5--  preprocessing is necessary to insure that the variables are
6--  scoped properly and to avoid duplicating hundreds of lines
7--  of code.
8--
9--
10-- DEFICIENCIES: 
11--
12-- 1.  This currently does not address whether or not the CPU
13--     actually has hardware floating point.  It just does the work.
14--
15--  COPYRIGHT (c) 1989-1997.
16--  On-Line Applications Research Corporation (OAR).
17--
18--  The license and distribution terms for this file may in
19--  the file LICENSE in this distribution or at
20--  http://www.OARcorp.com/rtems/license.html.
21--
22--  $Id$
23
24--
25-- private definitions for macro use
26--
27
28-- macro usage EPSILON()
29define(`EPSILON',`0.0005')
30
31-- macro usage FP_CHECK_ONE( value, base, factor )
32define(`FP_CHECK_ONE',`
33  if ( $1 - ( $2 + $3 ) ) > EPSILON or else ( $1 - ( $2 + $3 ) ) < - EPSILON then
34     UNSIGNED32_IO.PUT( TASK_INDEX );
35     TEXT_IO.PUT( ": $1 wrong -- (" );
36     FLOAT_IO.PUT( $1 );
37     TEXT_IO.PUT( " not " );
38     FLOAT_IO.PUT( $2 + $3 );
39     TEXT_IO.PUT_LINE( ")" );
40  end if
41'
42)
43
44-- macro usage FP_DECLARE
45define(`FP_DECLARE', `
46  FP01 : FLOAT :=  1.0;
47  FP02 : FLOAT :=  2.0;
48  FP03 : FLOAT :=  3.0;
49  FP04 : FLOAT :=  4.0;
50  FP05 : FLOAT :=  5.0;
51  FP06 : FLOAT :=  6.0;
52  FP07 : FLOAT :=  7.0;
53  FP08 : FLOAT :=  8.0;
54  FP09 : FLOAT :=  9.0;
55  FP10 : FLOAT := 10.0;
56  FP11 : FLOAT := 11.0;
57  FP12 : FLOAT := 12.0;
58  FP13 : FLOAT := 13.0;
59  FP14 : FLOAT := 14.0;
60  FP15 : FLOAT := 15.0;
61  FP16 : FLOAT := 16.0;
62  FP17 : FLOAT := 17.0;
63  FP18 : FLOAT := 18.0;
64  FP19 : FLOAT := 19.0;
65  FP20 : FLOAT := 20.0;
66  FP21 : FLOAT := 21.0;
67  FP22 : FLOAT := 22.0;
68  FP23 : FLOAT := 23.0;
69  FP24 : FLOAT := 24.0;
70  FP25 : FLOAT := 25.0;
71  FP26 : FLOAT := 26.0;
72  FP27 : FLOAT := 27.0;
73  FP28 : FLOAT := 28.0;
74  FP29 : FLOAT := 29.0;
75  FP30 : FLOAT := 30.0;
76  FP31 : FLOAT := 31.0;
77  FP32 : FLOAT := 32.0
78'
79)
80
81
82-- macro usage FP_LOAD( factor )
83define(`FP_LOAD',`
84  FP01 := FP01 + $1;
85  FP02 := FP02 + $1;
86  FP03 := FP03 + $1;
87  FP04 := FP04 + $1;
88  FP05 := FP05 + $1;
89  FP06 := FP06 + $1;
90  FP07 := FP07 + $1;
91  FP08 := FP08 + $1;
92  FP09 := FP09 + $1;
93  FP10 := FP10 + $1;
94  FP11 := FP11 + $1;
95  FP12 := FP12 + $1;
96  FP13 := FP13 + $1;
97  FP14 := FP14 + $1;
98  FP15 := FP15 + $1;
99  FP16 := FP16 + $1;
100  FP17 := FP17 + $1;
101  FP18 := FP18 + $1;
102  FP19 := FP19 + $1;
103  FP20 := FP20 + $1;
104  FP21 := FP21 + $1;
105  FP22 := FP22 + $1;
106  FP23 := FP23 + $1;
107  FP24 := FP24 + $1;
108  FP25 := FP25 + $1;
109  FP26 := FP26 + $1;
110  FP27 := FP27 + $1;
111  FP28 := FP28 + $1;
112  FP29 := FP29 + $1;
113  FP30 := FP30 + $1;
114  FP31 := FP31 + $1;
115  FP32 := FP32 + $1
116')
117
118-- macro usage FP_CHECK( factor )
119define(`FP_CHECK',`
120  FP_CHECK_ONE( FP01,  1.0, $1 );
121  FP_CHECK_ONE( FP02,  2.0, $1 );
122  FP_CHECK_ONE( FP03,  3.0, $1 );
123  FP_CHECK_ONE( FP04,  4.0, $1 );
124  FP_CHECK_ONE( FP05,  5.0, $1 );
125  FP_CHECK_ONE( FP06,  6.0, $1 );
126  FP_CHECK_ONE( FP07,  7.0, $1 );
127  FP_CHECK_ONE( FP08,  8.0, $1 );
128  FP_CHECK_ONE( FP09,  9.0, $1 );
129  FP_CHECK_ONE( FP10, 10.0, $1 );
130  FP_CHECK_ONE( FP11, 11.0, $1 );
131  FP_CHECK_ONE( FP12, 12.0, $1 );
132  FP_CHECK_ONE( FP13, 13.0, $1 );
133  FP_CHECK_ONE( FP14, 14.0, $1 );
134  FP_CHECK_ONE( FP15, 15.0, $1 );
135  FP_CHECK_ONE( FP16, 16.0, $1 );
136  FP_CHECK_ONE( FP17, 17.0, $1 );
137  FP_CHECK_ONE( FP18, 18.0, $1 );
138  FP_CHECK_ONE( FP19, 19.0, $1 );
139  FP_CHECK_ONE( FP20, 20.0, $1 );
140  FP_CHECK_ONE( FP21, 21.0, $1 );
141  FP_CHECK_ONE( FP22, 22.0, $1 );
142  FP_CHECK_ONE( FP23, 23.0, $1 );
143  FP_CHECK_ONE( FP24, 24.0, $1 );
144  FP_CHECK_ONE( FP25, 25.0, $1 );
145  FP_CHECK_ONE( FP26, 26.0, $1 );
146  FP_CHECK_ONE( FP27, 27.0, $1 );
147  FP_CHECK_ONE( FP28, 28.0, $1 );
148  FP_CHECK_ONE( FP29, 29.0, $1 );
149  FP_CHECK_ONE( FP30, 30.0, $1 );
150  FP_CHECK_ONE( FP31, 31.0, $1 );
151  FP_CHECK_ONE( FP32, 32.0, $1 )
152'
153)
Note: See TracBrowser for help on using the repository browser.