* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[deliverable/binutils-gdb.git] / gas / doc / c-vax.texi
1 @c Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
2 @c This is part of the GAS manual.
3 @c For copying conditions, see the file as.texinfo.
4 @ifset GENERIC
5 @node Vax-Dependent
6 @chapter VAX Dependent Features
7 @cindex VAX support
8
9 @end ifset
10 @ifclear GENERIC
11 @node Machine Dependencies
12 @chapter VAX Dependent Features
13 @cindex VAX support
14
15 @end ifclear
16
17 @menu
18 * Vax-Opts:: VAX Command-Line Options
19 * VAX-float:: VAX Floating Point
20 * VAX-directives:: Vax Machine Directives
21 * VAX-opcodes:: VAX Opcodes
22 * VAX-branch:: VAX Branch Improvement
23 * VAX-operands:: VAX Operands
24 * VAX-no:: Not Supported on VAX
25 @end menu
26
27
28 @node Vax-Opts
29 @section VAX Command-Line Options
30
31 @cindex command-line options ignored, VAX
32 @cindex VAX command-line options ignored
33 The Vax version of @code{@value{AS}} accepts any of the following options,
34 gives a warning message that the option was ignored and proceeds.
35 These options are for compatibility with scripts designed for other
36 people's assemblers.
37
38 @table @code
39 @cindex @code{-D}, ignored on VAX
40 @cindex @code{-S}, ignored on VAX
41 @cindex @code{-T}, ignored on VAX
42 @item @code{-D} (Debug)
43 @itemx @code{-S} (Symbol Table)
44 @itemx @code{-T} (Token Trace)
45 These are obsolete options used to debug old assemblers.
46
47 @cindex @code{-d}, VAX option
48 @item @code{-d} (Displacement size for JUMPs)
49 This option expects a number following the @samp{-d}. Like options
50 that expect filenames, the number may immediately follow the
51 @samp{-d} (old standard) or constitute the whole of the command line
52 argument that follows @samp{-d} (@sc{gnu} standard).
53
54 @cindex @code{-V}, redundant on VAX
55 @item @code{-V} (Virtualize Interpass Temporary File)
56 Some other assemblers use a temporary file. This option
57 commanded them to keep the information in active memory rather
58 than in a disk file. @code{@value{AS}} always does this, so this
59 option is redundant.
60
61 @cindex @code{-J}, ignored on VAX
62 @item @code{-J} (JUMPify Longer Branches)
63 Many 32-bit computers permit a variety of branch instructions
64 to do the same job. Some of these instructions are short (and
65 fast) but have a limited range; others are long (and slow) but
66 can branch anywhere in virtual memory. Often there are 3
67 flavors of branch: short, medium and long. Some other
68 assemblers would emit short and medium branches, unless told by
69 this option to emit short and long branches.
70
71 @cindex @code{-t}, ignored on VAX
72 @item @code{-t} (Temporary File Directory)
73 Some other assemblers may use a temporary file, and this option
74 takes a filename being the directory to site the temporary
75 file. Since @code{@value{AS}} does not use a temporary disk file, this
76 option makes no difference. @samp{-t} needs exactly one
77 filename.
78 @end table
79
80 @cindex VMS (VAX) options
81 @cindex options for VAX/VMS
82 @cindex VAX/VMS options
83 @cindex @code{-h} option, VAX/VMS
84 @cindex @code{-+} option, VAX/VMS
85 @cindex Vax-11 C compatibility
86 @cindex symbols with lowercase, VAX/VMS
87 @c FIXME! look into "I think" below, correct if needed, delete.
88 The Vax version of the assembler accepts two options when
89 compiled for VMS. They are @samp{-h}, and @samp{-+}. The
90 @samp{-h} option prevents @code{@value{AS}} from modifying the
91 symbol-table entries for symbols that contain lowercase
92 characters (I think). The @samp{-+} option causes @code{@value{AS}} to
93 print warning messages if the FILENAME part of the object file,
94 or any symbol name is larger than 31 characters. The @samp{-+}
95 option also inserts some code following the @samp{_main}
96 symbol so that the object file is compatible with Vax-11
97 "C".
98
99 @node VAX-float
100 @section VAX Floating Point
101
102 @cindex VAX floating point
103 @cindex floating point, VAX
104 Conversion of flonums to floating point is correct, and
105 compatible with previous assemblers. Rounding is
106 towards zero if the remainder is exactly half the least significant bit.
107
108 @code{D}, @code{F}, @code{G} and @code{H} floating point formats
109 are understood.
110
111 Immediate floating literals (@emph{e.g.} @samp{S`$6.9})
112 are rendered correctly. Again, rounding is towards zero in the
113 boundary case.
114
115 @cindex @code{float} directive, VAX
116 @cindex @code{double} directive, VAX
117 The @code{.float} directive produces @code{f} format numbers.
118 The @code{.double} directive produces @code{d} format numbers.
119
120 @node VAX-directives
121 @section Vax Machine Directives
122
123 @cindex machine directives, VAX
124 @cindex VAX machine directives
125 The Vax version of the assembler supports four directives for
126 generating Vax floating point constants. They are described in the
127 table below.
128
129 @cindex wide floating point directives, VAX
130 @table @code
131 @cindex @code{dfloat} directive, VAX
132 @item .dfloat
133 This expects zero or more flonums, separated by commas, and
134 assembles Vax @code{d} format 64-bit floating point constants.
135
136 @cindex @code{ffloat} directive, VAX
137 @item .ffloat
138 This expects zero or more flonums, separated by commas, and
139 assembles Vax @code{f} format 32-bit floating point constants.
140
141 @cindex @code{gfloat} directive, VAX
142 @item .gfloat
143 This expects zero or more flonums, separated by commas, and
144 assembles Vax @code{g} format 64-bit floating point constants.
145
146 @cindex @code{hfloat} directive, VAX
147 @item .hfloat
148 This expects zero or more flonums, separated by commas, and
149 assembles Vax @code{h} format 128-bit floating point constants.
150
151 @end table
152
153 @node VAX-opcodes
154 @section VAX Opcodes
155
156 @cindex VAX opcode mnemonics
157 @cindex opcode mnemonics, VAX
158 @cindex mnemonics for opcodes, VAX
159 All DEC mnemonics are supported. Beware that @code{case@dots{}}
160 instructions have exactly 3 operands. The dispatch table that
161 follows the @code{case@dots{}} instruction should be made with
162 @code{.word} statements. This is compatible with all unix
163 assemblers we know of.
164
165 @node VAX-branch
166 @section VAX Branch Improvement
167
168 @cindex VAX branch improvement
169 @cindex branch improvement, VAX
170 @cindex pseudo-ops for branch, VAX
171 Certain pseudo opcodes are permitted. They are for branch
172 instructions. They expand to the shortest branch instruction that
173 reaches the target. Generally these mnemonics are made by
174 substituting @samp{j} for @samp{b} at the start of a DEC mnemonic.
175 This feature is included both for compatibility and to help
176 compilers. If you do not need this feature, avoid these
177 opcodes. Here are the mnemonics, and the code they can expand into.
178
179 @table @code
180 @item jbsb
181 @samp{Jsb} is already an instruction mnemonic, so we chose @samp{jbsb}.
182 @table @asis
183 @item (byte displacement)
184 @kbd{bsbb @dots{}}
185 @item (word displacement)
186 @kbd{bsbw @dots{}}
187 @item (long displacement)
188 @kbd{jsb @dots{}}
189 @end table
190 @item jbr
191 @itemx jr
192 Unconditional branch.
193 @table @asis
194 @item (byte displacement)
195 @kbd{brb @dots{}}
196 @item (word displacement)
197 @kbd{brw @dots{}}
198 @item (long displacement)
199 @kbd{jmp @dots{}}
200 @end table
201 @item j@var{COND}
202 @var{COND} may be any one of the conditional branches
203 @code{neq}, @code{nequ}, @code{eql}, @code{eqlu}, @code{gtr},
204 @code{geq}, @code{lss}, @code{gtru}, @code{lequ}, @code{vc}, @code{vs},
205 @code{gequ}, @code{cc}, @code{lssu}, @code{cs}.
206 @var{COND} may also be one of the bit tests
207 @code{bs}, @code{bc}, @code{bss}, @code{bcs}, @code{bsc}, @code{bcc},
208 @code{bssi}, @code{bcci}, @code{lbs}, @code{lbc}.
209 @var{NOTCOND} is the opposite condition to @var{COND}.
210 @table @asis
211 @item (byte displacement)
212 @kbd{b@var{COND} @dots{}}
213 @item (word displacement)
214 @kbd{b@var{NOTCOND} foo ; brw @dots{} ; foo:}
215 @item (long displacement)
216 @kbd{b@var{NOTCOND} foo ; jmp @dots{} ; foo:}
217 @end table
218 @item jacb@var{X}
219 @var{X} may be one of @code{b d f g h l w}.
220 @table @asis
221 @item (word displacement)
222 @kbd{@var{OPCODE} @dots{}}
223 @item (long displacement)
224 @example
225 @var{OPCODE} @dots{}, foo ;
226 brb bar ;
227 foo: jmp @dots{} ;
228 bar:
229 @end example
230 @end table
231 @item jaob@var{YYY}
232 @var{YYY} may be one of @code{lss leq}.
233 @item jsob@var{ZZZ}
234 @var{ZZZ} may be one of @code{geq gtr}.
235 @table @asis
236 @item (byte displacement)
237 @kbd{@var{OPCODE} @dots{}}
238 @item (word displacement)
239 @example
240 @var{OPCODE} @dots{}, foo ;
241 brb bar ;
242 foo: brw @var{destination} ;
243 bar:
244 @end example
245 @item (long displacement)
246 @example
247 @var{OPCODE} @dots{}, foo ;
248 brb bar ;
249 foo: jmp @var{destination} ;
250 bar:
251 @end example
252 @end table
253 @item aobleq
254 @itemx aoblss
255 @itemx sobgeq
256 @itemx sobgtr
257 @table @asis
258 @item (byte displacement)
259 @kbd{@var{OPCODE} @dots{}}
260 @item (word displacement)
261 @example
262 @var{OPCODE} @dots{}, foo ;
263 brb bar ;
264 foo: brw @var{destination} ;
265 bar:
266 @end example
267 @item (long displacement)
268 @example
269 @var{OPCODE} @dots{}, foo ;
270 brb bar ;
271 foo: jmp @var{destination} ;
272 bar:
273 @end example
274 @end table
275 @end table
276
277 @node VAX-operands
278 @section VAX Operands
279
280 @cindex VAX operand notation
281 @cindex operand notation, VAX
282 @cindex immediate character, VAX
283 @cindex VAX immediate character
284 The immediate character is @samp{$} for Unix compatibility, not
285 @samp{#} as DEC writes it.
286
287 @cindex indirect character, VAX
288 @cindex VAX indirect character
289 The indirect character is @samp{*} for Unix compatibility, not
290 @samp{@@} as DEC writes it.
291
292 @cindex displacement sizing character, VAX
293 @cindex VAX displacement sizing character
294 The displacement sizing character is @samp{`} (an accent grave) for
295 Unix compatibility, not @samp{^} as DEC writes it. The letter
296 preceding @samp{`} may have either case. @samp{G} is not
297 understood, but all other letters (@code{b i l s w}) are understood.
298
299 @cindex register names, VAX
300 @cindex VAX register names
301 Register names understood are @code{r0 r1 r2 @dots{} r15 ap fp sp
302 pc}. Upper and lower case letters are equivalent.
303
304 For instance
305 @smallexample
306 tstb *w`$4(r5)
307 @end smallexample
308
309 Any expression is permitted in an operand. Operands are comma
310 separated.
311
312 @c There is some bug to do with recognizing expressions
313 @c in operands, but I forget what it is. It is
314 @c a syntax clash because () is used as an address mode
315 @c and to encapsulate sub-expressions.
316
317 @node VAX-no
318 @section Not Supported on VAX
319
320 @cindex VAX bitfields not supported
321 @cindex bitfields, not supported on VAX
322 Vax bit fields can not be assembled with @code{@value{AS}}. Someone
323 can add the required code if they really need it.
This page took 0.038631 seconds and 4 git commands to generate.