6 |
7u83 |
1 |
.\" Crown Copyright (c) 1997
|
|
|
2 |
.\"
|
|
|
3 |
.\" This TenDRA(r) Manual Page is subject to Copyright
|
|
|
4 |
.\" owned by the United Kingdom Secretary of State for Defence
|
|
|
5 |
.\" acting through the Defence Evaluation and Research Agency
|
|
|
6 |
.\" (DERA). It is made available to Recipients with a
|
|
|
7 |
.\" royalty-free licence for its use, reproduction, transfer
|
|
|
8 |
.\" to other parties and amendment for any purpose not excluding
|
|
|
9 |
.\" product development provided that any such use et cetera
|
|
|
10 |
.\" shall be deemed to be acceptance of the following conditions:-
|
|
|
11 |
.\"
|
|
|
12 |
.\" (1) Its Recipients shall ensure that this Notice is
|
|
|
13 |
.\" reproduced upon any copies or amended versions of it;
|
|
|
14 |
.\"
|
|
|
15 |
.\" (2) Any amended version of it shall be clearly marked to
|
|
|
16 |
.\" show both the nature of and the organisation responsible
|
|
|
17 |
.\" for the relevant amendment or amendments;
|
|
|
18 |
.\"
|
|
|
19 |
.\" (3) Its onward transfer from a recipient to another
|
|
|
20 |
.\" party shall be deemed to be that party's acceptance of
|
|
|
21 |
.\" these conditions;
|
|
|
22 |
.\"
|
|
|
23 |
.\" (4) DERA gives no warranty or assurance as to its
|
|
|
24 |
.\" quality or suitability for any purpose and DERA accepts
|
|
|
25 |
.\" no liability whatsoever in relation to any use to which
|
|
|
26 |
.\" it may be put.
|
|
|
27 |
.\"
|
|
|
28 |
.TH trans386 1
|
|
|
29 |
.SH NAME
|
|
|
30 |
trans386 \- Translator for 80386, 80486 and Pentium
|
|
|
31 |
.SH SYNOPSIS
|
|
|
32 |
\fBtrans386\fR [ \fIoptions\fR ] \fIinput-file\fR \fIoutput-file\fR
|
|
|
33 |
.\" ----------------------------------------------------------------------
|
|
|
34 |
.SH DESCRIPTION
|
|
|
35 |
The code production portion of the TDF compiler is under the control of
|
|
|
36 |
a TDF translator, which translates a TDF capsule into an assembly source
|
|
|
37 |
file. There are separate TDF translators for each target architecture.
|
|
|
38 |
This manual page describes the installer for the 80x86 architecture.
|
|
|
39 |
.PP
|
|
|
40 |
The basic action of the TDF translator, \fBtrans386\fR, is to
|
|
|
41 |
translate a TDF capsule, \fIinput-file\fR, into an assembly source
|
|
|
42 |
file, \fIoutput-file\fR.
|
|
|
43 |
.PP
|
|
|
44 |
It is recommended that \fBtrans386\fR should not be invoked directly, but via the
|
|
|
45 |
user interface \fItcc\fR(1). The option \fB-\fIopt\fR can be passed
|
|
|
46 |
to \fBtrans386\fR by passing the option \fB-Wt, -\fIopt\fR to \fItcc\fR(1).
|
|
|
47 |
.\" ----------------------------------------------------------------------
|
|
|
48 |
.SH OPTIONS
|
|
|
49 |
The options denoted by a capital letter are common to the TDF installers
|
|
|
50 |
for all the architectures. The options denoted by a lower case letter are
|
|
|
51 |
specific to the 80x86. \fIswitch\fR stands for either \fB0\fR, to switch
|
|
|
52 |
an option off, or \fB1\fR, to switch it on. The default states described
|
|
|
53 |
here may be different on other translators.
|
|
|
54 |
.\" ----------------------------------------------------------------------
|
|
|
55 |
.IP \fB-A\fIswitch\fR
|
|
|
56 |
This option determines whether \fBtrans386\fR should inline calls to
|
|
|
57 |
\fIalloca\fR. This is done by default.
|
|
|
58 |
.\" ----------------------------------------------------------------------
|
|
|
59 |
.IP \fB-B\fIswitch\fR
|
|
|
60 |
This option determines whether \fBtrans386\fR should report floating point
|
|
|
61 |
constants which exceed their range. This is always done by default.
|
|
|
62 |
If this option is switched off such constants are replaced by infinity.
|
|
|
63 |
.\" ----------------------------------------------------------------------
|
|
|
64 |
.IP \fB-C\fIswitch\fR
|
|
|
65 |
This option determines whether \fBtrans386\fR should apply the "constants
|
|
|
66 |
out of loops" optimisation. This optimisation is performed by default.
|
|
|
67 |
.\" ----------------------------------------------------------------------
|
|
|
68 |
.IP \fB-D\fIswitch\fR
|
|
|
69 |
This option determines whether \fBtrans386\fR should produce Position
|
|
|
70 |
Independent Code (PIC). This is not done by default. This option is not
|
|
|
71 |
supported on the SCO or FreeBSD platforms, and on the Linux platform it is
|
|
|
72 |
supported only for ELF binary format.
|
|
|
73 |
.\" ----------------------------------------------------------------------
|
|
|
74 |
.IP \fB-E\fR
|
|
|
75 |
This option disables \fBtrans386\fR's constant overflow checks.
|
|
|
76 |
.\" ----------------------------------------------------------------------
|
|
|
77 |
.IP \fB-F\fIswitch\fR
|
|
|
78 |
This option determines whether \fBtrans386\fR should apply the "strength
|
|
|
79 |
reduction" optimisation. This optimisation is performed by default.
|
|
|
80 |
.\" ----------------------------------------------------------------------
|
|
|
81 |
.IP \fB-H\fR
|
|
|
82 |
This option causes \fBtrans386\fR to output debugging information in its
|
|
|
83 |
output file. This will only work if the input TDF capsule contains
|
|
|
84 |
debugging information. On the SCO platform the format used by \fBdbxtra\fR
|
|
|
85 |
and \fBcodeview\fR is supported. On the SVR4.2 platform Dwarf 1 is supported,
|
|
|
86 |
which is used by \fBdebug\fR. On the Solaris, FreeBSD, and Linux platforms,
|
|
|
87 |
\fBstabs\fR is supported. The GNU debugger \fBgdb\fR may be used on all
|
|
|
88 |
platforms.
|
|
|
89 |
.\" ----------------------------------------------------------------------
|
|
|
90 |
.IP \fB-I\fIswitch\fR
|
|
|
91 |
This option determines whether \fBtrans386\fR should apply the "inlining"
|
|
|
92 |
optimisation. This optimisation is performed by default.
|
|
|
93 |
.\" ----------------------------------------------------------------------
|
|
|
94 |
.IP \fB-K\fIstr\fR
|
|
|
95 |
Causes \fBtrans386\fR to optimise its code for a particular processor
|
|
|
96 |
model, determined by \fIstr\fR. The available values of \fIstr\fR are
|
|
|
97 |
3 for the 80386, 4 for the 80486 and 5 for the Pentium (the default).
|
|
|
98 |
So \fB-K3\fR means optimise for the 80386 etc.
|
|
|
99 |
.\" ----------------------------------------------------------------------
|
|
|
100 |
.IP \fB-M\fIswitch\fR
|
|
|
101 |
If this option is on, \fBtrans386\fR preserves division by a
|
|
|
102 |
floating point number rather than replacing it by multiplication by
|
|
|
103 |
the reciprocal of the number. While the latter produces faster code,
|
|
|
104 |
it may lead to rounding errors. By default, division by constants is
|
|
|
105 |
preserved.
|
|
|
106 |
.\" ----------------------------------------------------------------------
|
|
|
107 |
.IP \fB-P\fR
|
|
|
108 |
This option causes \fBtrans386\fR to output profiling information suitable
|
|
|
109 |
for use with \fIprof\fR(1) or a similar tool (see individual manual
|
|
|
110 |
pages for details). This option is currently not supported on the Solaris platform.
|
|
|
111 |
.\" ----------------------------------------------------------------------
|
|
|
112 |
.IP \fB-Q\fR
|
|
|
113 |
This option causes \fBtrans386\fR to quit before processing its input
|
|
|
114 |
files. This is particularly useful in conjunction with \fB-V\fR.
|
|
|
115 |
.\" ----------------------------------------------------------------------
|
|
|
116 |
.IP \fB-R\fIswitch\fR
|
|
|
117 |
This option determines whether \fBtrans386\fR should immediately round every
|
|
|
118 |
floating point operation to its appropriate range. This produces slower
|
|
|
119 |
code, but is necessary for strict IEEE conformance. The default is not
|
|
|
120 |
to round after every operation.
|
|
|
121 |
.\" ----------------------------------------------------------------------
|
|
|
122 |
.IP \fB-U\fIswitch\fR
|
|
|
123 |
This option determines whether \fBtrans386\fR should apply the "loop
|
|
|
124 |
unrolling" optimisation. This optimisation is performed by default.
|
|
|
125 |
.\" ----------------------------------------------------------------------
|
|
|
126 |
.IP \fB-V\fR
|
|
|
127 |
This option causes \fBtrans386\fR to print its version number and the
|
|
|
128 |
version of the TDF specification it supports.
|
|
|
129 |
.\" ----------------------------------------------------------------------
|
|
|
130 |
.IP \fB-W\fIswitch\fR
|
|
|
131 |
This option determines whether \fBtrans386\fR should make string literals
|
|
|
132 |
writable. At present the C producer does not make use of this
|
|
|
133 |
facility, so strings are writable.
|
|
|
134 |
.\" ----------------------------------------------------------------------
|
|
|
135 |
.IP \fB-X\fR
|
|
|
136 |
This option disables all optimisations. All \fBtrans386\fR's optimisations
|
|
|
137 |
are believed to be valid, so that any error in optimisation is a genuine
|
|
|
138 |
bug.
|
|
|
139 |
.\" ----------------------------------------------------------------------
|
|
|
140 |
.IP \fB-Z\fR
|
|
|
141 |
This option causes \fBtrans386\fR to print the version number of all the
|
|
|
142 |
TDF capsules it decodes.
|
|
|
143 |
.\" ----------------------------------------------------------------------
|
|
|
144 |
.IP \fB-a\fR
|
|
|
145 |
Always use a frame pointer. The default is to avoid using a frame pointer
|
|
|
146 |
whenever possible. The default results in better performance, but
|
|
|
147 |
in special cases where the stack is to be processed it may be necessary to
|
|
|
148 |
enforce the use of a frame pointer.
|
|
|
149 |
.\" ----------------------------------------------------------------------
|
|
|
150 |
.IP \fB-h\fR
|
|
|
151 |
Do not use the .bss segment, always put data into the .data segment even
|
|
|
152 |
if it is zero. This should very rarely be needed. The default is to use
|
|
|
153 |
the .bss segment.
|
|
|
154 |
.\" ----------------------------------------------------------------------
|
|
|
155 |
.IP \fB-k\fIswitch\fR
|
|
|
156 |
This option is applicable to Linux platforms only. If this option is on,
|
|
|
157 |
\fBtrans386\fR will produce output for an ELF binary format assembler, otherwise
|
|
|
158 |
a.out binary format is assumed. By default this option is on, as appropriate for
|
|
|
159 |
later versions of Linux.
|
|
|
160 |
.\" ----------------------------------------------------------------------
|
|
|
161 |
.SH SEE ALSO
|
|
|
162 |
\fIas\fR(1),\fIprof\fR(1), \fItcc\fR(1).
|
|
|
163 |
.\" ----------------------------------------------------------------------
|