4.104.115
Line | |
---|
1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | This is a "problem" test in Ada versus the C equivalent. In C, |
---|
6 | we used macros to : |
---|
7 | |
---|
8 | + declare a LOT of local integer and floating point variables |
---|
9 | + load them with values |
---|
10 | + check them at certain times |
---|
11 | + to avoid floating point operations on CPUs w/o hardware support |
---|
12 | |
---|
13 | The macros are not equivalent to subprograms doing the same thing. |
---|
14 | We are trying to insure that the register set is fully utilized and |
---|
15 | checking that it survives context switches. If the routines are |
---|
16 | subprograms, then calling conventions and scoping rules apply. Thus |
---|
17 | the variables do not exist throughout the entire life of the task |
---|
18 | as in the C test. |
---|
19 | |
---|
20 | It seems to point out that although the conditional compilation |
---|
21 | and macro capabilities of C are often abused, they do provide |
---|
22 | capabilities which are difficult if not impossible to mimic entirely |
---|
23 | with subprograms. |
---|
Note: See
TracBrowser
for help on using the repository browser.