2 |
7u83 |
1 |
MACHINE DEPENDENT SOURCE
|
|
|
2 |
========================
|
|
|
3 |
|
|
|
4 |
This directory contains the source for the machine dependent libraries
|
|
|
5 |
and support programs for the various supported platforms. It is
|
|
|
6 |
organised into subdirectories:
|
|
|
7 |
|
|
|
8 |
common/tokens
|
|
|
9 |
<os>/<cpu>/include
|
|
|
10 |
<os>/<cpu>/src
|
|
|
11 |
<os>/<cpu>/startup
|
|
|
12 |
<os>/<cpu>/tokens
|
|
|
13 |
|
|
|
14 |
for each operating system <os> and processor type <cpu>. The common
|
|
|
15 |
directory contains those components which are used by all machines,
|
|
|
16 |
and the machine directories contain the machine dependent components.
|
|
|
17 |
|
|
|
18 |
The src directory, if present, contains the source for any machine
|
|
|
19 |
dependent system libraries or object files which are required to be
|
|
|
20 |
linked with the compiled object files. Certain platforms also require
|
|
|
21 |
a program, dyninit, which patches together any dynamic initialisation
|
|
|
22 |
routines (i.e. those arising from the TDF initial_value construct).
|
|
|
23 |
The source for this program is also included in the src directory.
|
|
|
24 |
|
|
|
25 |
The tokens directory contains the source (as pl or tnc source files) for
|
|
|
26 |
the basic TDF tokens which are used to configure the system for a particular
|
|
|
27 |
platform. The simplest information, such as 'char is signed' or 'int
|
|
|
28 |
contains 32 bits', is contained in the files:
|
|
|
29 |
|
|
|
30 |
<os>/<cpu>/tokens/map_toks.pl
|
|
|
31 |
<os>/<cpu>/tokens/dep_toks.pl
|
|
|
32 |
|
|
|
33 |
The program:
|
|
|
34 |
|
|
|
35 |
common/tokens/gen_tokens.c
|
|
|
36 |
|
|
|
37 |
can be used to help generate these files on a new platform.
|
|
|
38 |
|
|
|
39 |
The system interface with the C and C++ producers is slightly more complex;
|
|
|
40 |
for example, it says 'int is represented by the variety token ~signed_int'.
|
|
|
41 |
These tokens are defined in terms of the more primitive tokens in the
|
|
|
42 |
file:
|
|
|
43 |
|
|
|
44 |
common/tokens/c_toks.pl
|
|
|
45 |
|
|
|
46 |
This file is linked with the primitive token definitions from map_toks.pl
|
|
|
47 |
and dep_toks.pl and 'preprocessed' by expanding all the token definitions
|
|
|
48 |
and evaluating any constant expressions. This gives a capsule sys.j which
|
|
|
49 |
defines the producer interface. This capsule is linked into the C producer
|
|
|
50 |
TDF library, c.tl.
|
|
|
51 |
|
|
|
52 |
The directory also contains the source for the target_tok.tl TDF library.
|
|
|
53 |
This consists of the basic tokens from:
|
|
|
54 |
|
|
|
55 |
<os>/<cpu>/tokens/map_toks.pl
|
|
|
56 |
<os>/<cpu>/tokens/dep_toks.pl
|
|
|
57 |
|
|
|
58 |
as described above, plus other machine dependent tokens defined in:
|
|
|
59 |
|
|
|
60 |
common/tokens/var_toks.pl
|
|
|
61 |
<os>/<cpu>/tokens/var_toks.pl
|
|
|
62 |
<os>/<cpu>/tokens/except_toks.pl
|
|
|
63 |
|
|
|
64 |
which describe how the target machine handles variable parameter lists
|
|
|
65 |
and overflow exceptions. These tokens require to be linked with the
|
|
|
66 |
POSIX API library, however to make the resultant library self-contained
|
|
|
67 |
the necessarily POSIX tokens are linked into the library and hidden
|
|
|
68 |
using the TDF linker options given by the tcc environments:
|
|
|
69 |
|
|
|
70 |
common/tokens/var_toks
|
|
|
71 |
common/tokens/except_toks
|