Added documentation for new command line options and pseudo ops.
[deliverable/binutils-gdb.git] / gas / doc / c-vax.texi
CommitLineData
0e688642
VM
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
33The Vax version of @code{@value{AS}} accepts any of the following options,
34gives a warning message that the option was ignored and proceeds.
35These options are for compatibility with scripts designed for other
36people'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)
45These are obsolete options used to debug old assemblers.
46
47@cindex @code{-d}, VAX option
48@item @code{-d} (Displacement size for JUMPs)
49This option expects a number following the @samp{-d}. Like options
50that expect filenames, the number may immediately follow the
51@samp{-d} (old standard) or constitute the whole of the command line
52argument that follows @samp{-d} (@sc{gnu} standard).
53
54@cindex @code{-V}, redundant on VAX
55@item @code{-V} (Virtualize Interpass Temporary File)
56Some other assemblers use a temporary file. This option
57commanded them to keep the information in active memory rather
58than in a disk file. @code{@value{AS}} always does this, so this
59option is redundant.
60
61@cindex @code{-J}, ignored on VAX
62@item @code{-J} (JUMPify Longer Branches)
63Many 32-bit computers permit a variety of branch instructions
64to do the same job. Some of these instructions are short (and
65fast) but have a limited range; others are long (and slow) but
66can branch anywhere in virtual memory. Often there are 3
67flavors of branch: short, medium and long. Some other
68assemblers would emit short and medium branches, unless told by
69this option to emit short and long branches.
70
71@cindex @code{-t}, ignored on VAX
72@item @code{-t} (Temporary File Directory)
73Some other assemblers may use a temporary file, and this option
74takes a filename being the directory to site the temporary
75file. Since @code{@value{AS}} does not use a temporary disk file, this
76option makes no difference. @samp{-t} needs exactly one
77filename.
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.
88The Vax version of the assembler accepts two options when
89compiled for VMS. They are @samp{-h}, and @samp{-+}. The
90@samp{-h} option prevents @code{@value{AS}} from modifying the
91symbol-table entries for symbols that contain lowercase
92characters (I think). The @samp{-+} option causes @code{@value{AS}} to
93print warning messages if the FILENAME part of the object file,
94or any symbol name is larger than 31 characters. The @samp{-+}
95option also inserts some code following the @samp{_main}
96symbol 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
104Conversion of flonums to floating point is correct, and
105compatible with previous assemblers. Rounding is
106towards 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
109are understood.
110
111Immediate floating literals (@emph{e.g.} @samp{S`$6.9})
112are rendered correctly. Again, rounding is towards zero in the
113boundary case.
114
115@cindex @code{float} directive, VAX
116@cindex @code{double} directive, VAX
117The @code{.float} directive produces @code{f} format numbers.
118The @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
125The Vax version of the assembler supports four directives for
126generating Vax floating point constants. They are described in the
127table below.
128
129@cindex wide floating point directives, VAX
130@table @code
131@cindex @code{dfloat} directive, VAX
132@item .dfloat
133This expects zero or more flonums, separated by commas, and
134assembles Vax @code{d} format 64-bit floating point constants.
135
136@cindex @code{ffloat} directive, VAX
137@item .ffloat
138This expects zero or more flonums, separated by commas, and
139assembles Vax @code{f} format 32-bit floating point constants.
140
141@cindex @code{gfloat} directive, VAX
142@item .gfloat
143This expects zero or more flonums, separated by commas, and
144assembles Vax @code{g} format 64-bit floating point constants.
145
146@cindex @code{hfloat} directive, VAX
147@item .hfloat
148This expects zero or more flonums, separated by commas, and
149assembles 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
159All DEC mnemonics are supported. Beware that @code{case@dots{}}
160instructions have exactly 3 operands. The dispatch table that
161follows the @code{case@dots{}} instruction should be made with
162@code{.word} statements. This is compatible with all unix
163assemblers 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
171Certain pseudo opcodes are permitted. They are for branch
172instructions. They expand to the shortest branch instruction that
173reaches the target. Generally these mnemonics are made by
174substituting @samp{j} for @samp{b} at the start of a DEC mnemonic.
175This feature is included both for compatibility and to help
176compilers. If you do not need this feature, avoid these
177opcodes. 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
192Unconditional 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 ;
226brb bar ;
227foo: jmp @dots{} ;
228bar:
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 ;
241brb bar ;
242foo: brw @var{destination} ;
243bar:
244@end example
245@item (long displacement)
246@example
247@var{OPCODE} @dots{}, foo ;
248brb bar ;
249foo: jmp @var{destination} ;
250bar:
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 ;
263brb bar ;
264foo: brw @var{destination} ;
265bar:
266@end example
267@item (long displacement)
268@example
269@var{OPCODE} @dots{}, foo ;
270brb bar ;
271foo: jmp @var{destination} ;
272bar:
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
284The 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
289The 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
294The displacement sizing character is @samp{`} (an accent grave) for
295Unix compatibility, not @samp{^} as DEC writes it. The letter
296preceding @samp{`} may have either case. @samp{G} is not
297understood, but all other letters (@code{b i l s w}) are understood.
298
299@cindex register names, VAX
300@cindex VAX register names
301Register names understood are @code{r0 r1 r2 @dots{} r15 ap fp sp
302pc}. Upper and lower case letters are equivalent.
303
304For instance
305@smallexample
306tstb *w`$4(r5)
307@end smallexample
308
309Any expression is permitted in an operand. Operands are comma
310separated.
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
322Vax bit fields can not be assembled with @code{@value{AS}}. Someone
323can add the required code if they really need it.
This page took 0.082975 seconds and 4 git commands to generate.