1*a9fa9459Szrj@c Copyright (C) 2002-2016 Free Software Foundation, Inc.
2*a9fa9459Szrj@c This is part of the GAS manual.
3*a9fa9459Szrj@c For copying conditions, see the file as.texinfo.
4*a9fa9459Szrj@c man end
5*a9fa9459Szrj
6*a9fa9459Szrj@ifset GENERIC
7*a9fa9459Szrj@page
8*a9fa9459Szrj@node Alpha-Dependent
9*a9fa9459Szrj@chapter Alpha Dependent Features
10*a9fa9459Szrj@end ifset
11*a9fa9459Szrj
12*a9fa9459Szrj@ifclear GENERIC
13*a9fa9459Szrj@node Machine Dependencies
14*a9fa9459Szrj@chapter Alpha Dependent Features
15*a9fa9459Szrj@end ifclear
16*a9fa9459Szrj
17*a9fa9459Szrj@cindex Alpha support
18*a9fa9459Szrj@menu
19*a9fa9459Szrj* Alpha Notes::                Notes
20*a9fa9459Szrj* Alpha Options::              Options
21*a9fa9459Szrj* Alpha Syntax::               Syntax
22*a9fa9459Szrj* Alpha Floating Point::       Floating Point
23*a9fa9459Szrj* Alpha Directives::           Alpha Machine Directives
24*a9fa9459Szrj* Alpha Opcodes::              Opcodes
25*a9fa9459Szrj@end menu
26*a9fa9459Szrj
27*a9fa9459Szrj@node Alpha Notes
28*a9fa9459Szrj@section Notes
29*a9fa9459Szrj@cindex Alpha notes
30*a9fa9459Szrj@cindex notes for Alpha
31*a9fa9459Szrj
32*a9fa9459SzrjThe documentation here is primarily for the ELF object format.
33*a9fa9459Szrj@code{@value{AS}} also supports the ECOFF and EVAX formats, but
34*a9fa9459Szrjfeatures specific to these formats are not yet documented.
35*a9fa9459Szrj
36*a9fa9459Szrj@node Alpha Options
37*a9fa9459Szrj@section Options
38*a9fa9459Szrj@cindex Alpha options
39*a9fa9459Szrj@cindex options for Alpha
40*a9fa9459Szrj
41*a9fa9459Szrj@c man begin OPTIONS
42*a9fa9459Szrj@table @gcctabopt
43*a9fa9459Szrj@cindex @code{-m@var{cpu}} command line option, Alpha
44*a9fa9459Szrj@item -m@var{cpu}
45*a9fa9459SzrjThis option specifies the target processor.  If an attempt is made to
46*a9fa9459Szrjassemble an instruction which will not execute on the target processor,
47*a9fa9459Szrjthe assembler may either expand the instruction as a macro or issue an
48*a9fa9459Szrjerror message.  This option is equivalent to the @code{.arch} directive.
49*a9fa9459Szrj
50*a9fa9459SzrjThe following processor names are recognized:
51*a9fa9459Szrj@code{21064},
52*a9fa9459Szrj@code{21064a},
53*a9fa9459Szrj@code{21066},
54*a9fa9459Szrj@code{21068},
55*a9fa9459Szrj@code{21164},
56*a9fa9459Szrj@code{21164a},
57*a9fa9459Szrj@code{21164pc},
58*a9fa9459Szrj@code{21264},
59*a9fa9459Szrj@code{21264a},
60*a9fa9459Szrj@code{21264b},
61*a9fa9459Szrj@code{ev4},
62*a9fa9459Szrj@code{ev5},
63*a9fa9459Szrj@code{lca45},
64*a9fa9459Szrj@code{ev5},
65*a9fa9459Szrj@code{ev56},
66*a9fa9459Szrj@code{pca56},
67*a9fa9459Szrj@code{ev6},
68*a9fa9459Szrj@code{ev67},
69*a9fa9459Szrj@code{ev68}.
70*a9fa9459SzrjThe special name @code{all} may be used to allow the assembler to accept
71*a9fa9459Szrjinstructions valid for any Alpha processor.
72*a9fa9459Szrj
73*a9fa9459SzrjIn order to support existing practice in OSF/1 with respect to @code{.arch},
74*a9fa9459Szrjand existing practice within @command{MILO} (the Linux ARC bootloader), the
75*a9fa9459Szrjnumbered processor names (e.g.@: 21064) enable the processor-specific PALcode
76*a9fa9459Szrjinstructions, while the ``electro-vlasic'' names (e.g.@: @code{ev4}) do not.
77*a9fa9459Szrj
78*a9fa9459Szrj@cindex @code{-mdebug} command line option, Alpha
79*a9fa9459Szrj@cindex @code{-no-mdebug} command line option, Alpha
80*a9fa9459Szrj@item -mdebug
81*a9fa9459Szrj@itemx -no-mdebug
82*a9fa9459SzrjEnables or disables the generation of @code{.mdebug} encapsulation for
83*a9fa9459Szrjstabs directives and procedure descriptors.  The default is to automatically
84*a9fa9459Szrjenable @code{.mdebug} when the first stabs directive is seen.
85*a9fa9459Szrj
86*a9fa9459Szrj@cindex @code{-relax} command line option, Alpha
87*a9fa9459Szrj@item -relax
88*a9fa9459SzrjThis option forces all relocations to be put into the object file, instead
89*a9fa9459Szrjof saving space and resolving some relocations at assembly time.  Note that
90*a9fa9459Szrjthis option does not propagate all symbol arithmetic into the object file,
91*a9fa9459Szrjbecause not all symbol arithmetic can be represented.  However, the option
92*a9fa9459Szrjcan still be useful in specific applications.
93*a9fa9459Szrj
94*a9fa9459Szrj@cindex @code{-replace} command line option, Alpha
95*a9fa9459Szrj@cindex @code{-noreplace} command line option, Alpha
96*a9fa9459Szrj@item -replace
97*a9fa9459Szrj@itemx -noreplace
98*a9fa9459SzrjEnables or disables the optimization of procedure calls, both at assemblage
99*a9fa9459Szrjand at link time.  These options are only available for VMS targets and
100*a9fa9459Szrj@code{-replace} is the default.  See section 1.4.1 of the OpenVMS Linker
101*a9fa9459SzrjUtility Manual.
102*a9fa9459Szrj
103*a9fa9459Szrj@cindex @code{-g} command line option, Alpha
104*a9fa9459Szrj@item -g
105*a9fa9459SzrjThis option is used when the compiler generates debug information.  When
106*a9fa9459Szrj@command{gcc} is using @command{mips-tfile} to generate debug
107*a9fa9459Szrjinformation for ECOFF, local labels must be passed through to the object
108*a9fa9459Szrjfile.  Otherwise this option has no effect.
109*a9fa9459Szrj
110*a9fa9459Szrj@cindex @code{-G} command line option, Alpha
111*a9fa9459Szrj@item -G@var{size}
112*a9fa9459SzrjA local common symbol larger than @var{size} is placed in @code{.bss},
113*a9fa9459Szrjwhile smaller symbols are placed in @code{.sbss}.
114*a9fa9459Szrj
115*a9fa9459Szrj@cindex @code{-F} command line option, Alpha
116*a9fa9459Szrj@cindex @code{-32addr} command line option, Alpha
117*a9fa9459Szrj@item -F
118*a9fa9459Szrj@itemx -32addr
119*a9fa9459SzrjThese options are ignored for backward compatibility.
120*a9fa9459Szrj@end table
121*a9fa9459Szrj@c man end
122*a9fa9459Szrj
123*a9fa9459Szrj@cindex Alpha Syntax
124*a9fa9459Szrj@node Alpha Syntax
125*a9fa9459Szrj@section Syntax
126*a9fa9459SzrjThe assembler syntax closely follow the Alpha Reference Manual;
127*a9fa9459Szrjassembler directives and general syntax closely follow the OSF/1 and
128*a9fa9459SzrjOpenVMS syntax, with a few differences for ELF.
129*a9fa9459Szrj
130*a9fa9459Szrj@menu
131*a9fa9459Szrj* Alpha-Chars::                Special Characters
132*a9fa9459Szrj* Alpha-Regs::                 Register Names
133*a9fa9459Szrj* Alpha-Relocs::               Relocations
134*a9fa9459Szrj@end menu
135*a9fa9459Szrj
136*a9fa9459Szrj@node Alpha-Chars
137*a9fa9459Szrj@subsection Special Characters
138*a9fa9459Szrj
139*a9fa9459Szrj@cindex line comment character, Alpha
140*a9fa9459Szrj@cindex Alpha line comment character
141*a9fa9459Szrj@samp{#} is the line comment character.  Note that if @samp{#} is the
142*a9fa9459Szrjfirst character on a line then it can also be a logical line number
143*a9fa9459Szrjdirective (@pxref{Comments}) or a preprocessor control
144*a9fa9459Szrjcommand (@pxref{Preprocessing}).
145*a9fa9459Szrj
146*a9fa9459Szrj@cindex line separator, Alpha
147*a9fa9459Szrj@cindex statement separator, Alpha
148*a9fa9459Szrj@cindex Alpha line separator
149*a9fa9459Szrj@samp{;} can be used instead of a newline to separate statements.
150*a9fa9459Szrj
151*a9fa9459Szrj@node Alpha-Regs
152*a9fa9459Szrj@subsection Register Names
153*a9fa9459Szrj@cindex Alpha registers
154*a9fa9459Szrj@cindex register names, Alpha
155*a9fa9459Szrj
156*a9fa9459SzrjThe 32 integer registers are referred to as @samp{$@var{n}} or
157*a9fa9459Szrj@samp{$r@var{n}}.  In addition, registers 15, 28, 29, and 30 may
158*a9fa9459Szrjbe referred to by the symbols @samp{$fp}, @samp{$at}, @samp{$gp},
159*a9fa9459Szrjand @samp{$sp} respectively.
160*a9fa9459Szrj
161*a9fa9459SzrjThe 32 floating-point registers are referred to as @samp{$f@var{n}}.
162*a9fa9459Szrj
163*a9fa9459Szrj@node Alpha-Relocs
164*a9fa9459Szrj@subsection Relocations
165*a9fa9459Szrj@cindex Alpha relocations
166*a9fa9459Szrj@cindex relocations, Alpha
167*a9fa9459Szrj
168*a9fa9459SzrjSome of these relocations are available for ECOFF, but mostly
169*a9fa9459Szrjonly for ELF.  They are modeled after the relocation format
170*a9fa9459Szrjintroduced in Digital Unix 4.0, but there are additions.
171*a9fa9459Szrj
172*a9fa9459SzrjThe format is @samp{!@var{tag}} or @samp{!@var{tag}!@var{number}}
173*a9fa9459Szrjwhere @var{tag} is the name of the relocation.  In some cases
174*a9fa9459Szrj@var{number} is used to relate specific instructions.
175*a9fa9459Szrj
176*a9fa9459SzrjThe relocation is placed at the end of the instruction like so:
177*a9fa9459Szrj
178*a9fa9459Szrj@example
179*a9fa9459Szrjldah  $0,a($29)    !gprelhigh
180*a9fa9459Szrjlda   $0,a($0)     !gprellow
181*a9fa9459Szrjldq   $1,b($29)    !literal!100
182*a9fa9459Szrjldl   $2,0($1)     !lituse_base!100
183*a9fa9459Szrj@end example
184*a9fa9459Szrj
185*a9fa9459Szrj@table @code
186*a9fa9459Szrj@item !literal
187*a9fa9459Szrj@itemx !literal!@var{N}
188*a9fa9459SzrjUsed with an @code{ldq} instruction to load the address of a symbol
189*a9fa9459Szrjfrom the GOT.
190*a9fa9459Szrj
191*a9fa9459SzrjA sequence number @var{N} is optional, and if present is used to pair
192*a9fa9459Szrj@code{lituse} relocations with this @code{literal} relocation.  The
193*a9fa9459Szrj@code{lituse} relocations are used by the linker to optimize the code
194*a9fa9459Szrjbased on the final location of the symbol.
195*a9fa9459Szrj
196*a9fa9459SzrjNote that these optimizations are dependent on the data flow of the
197*a9fa9459Szrjprogram.  Therefore, if @emph{any} @code{lituse} is paired with a
198*a9fa9459Szrj@code{literal} relocation, then @emph{all} uses of the register set by
199*a9fa9459Szrjthe @code{literal} instruction must also be marked with @code{lituse}
200*a9fa9459Szrjrelocations.  This is because the original @code{literal} instruction
201*a9fa9459Szrjmay be deleted or transformed into another instruction.
202*a9fa9459Szrj
203*a9fa9459SzrjAlso note that there may be a one-to-many relationship between
204*a9fa9459Szrj@code{literal} and @code{lituse}, but not a many-to-one.  That is, if
205*a9fa9459Szrjthere are two code paths that load up the same address and feed the
206*a9fa9459Szrjvalue to a single use, then the use may not use a @code{lituse}
207*a9fa9459Szrjrelocation.
208*a9fa9459Szrj
209*a9fa9459Szrj@item !lituse_base!@var{N}
210*a9fa9459SzrjUsed with any memory format instruction (e.g.@: @code{ldl}) to indicate
211*a9fa9459Szrjthat the literal is used for an address load.  The offset field of the
212*a9fa9459Szrjinstruction must be zero.  During relaxation, the code may be altered
213*a9fa9459Szrjto use a gp-relative load.
214*a9fa9459Szrj
215*a9fa9459Szrj@item !lituse_jsr!@var{N}
216*a9fa9459SzrjUsed with a register branch format instruction (e.g.@: @code{jsr}) to
217*a9fa9459Szrjindicate that the literal is used for a call.  During relaxation, the
218*a9fa9459Szrjcode may be altered to use a direct branch (e.g.@: @code{bsr}).
219*a9fa9459Szrj
220*a9fa9459Szrj@item !lituse_jsrdirect!@var{N}
221*a9fa9459SzrjSimilar to @code{lituse_jsr}, but also that this call cannot be vectored
222*a9fa9459Szrjthrough a PLT entry.  This is useful for functions with special calling
223*a9fa9459Szrjconventions which do not allow the normal call-clobbered registers to be
224*a9fa9459Szrjclobbered.
225*a9fa9459Szrj
226*a9fa9459Szrj@item !lituse_bytoff!@var{N}
227*a9fa9459SzrjUsed with a byte mask instruction (e.g.@: @code{extbl}) to indicate
228*a9fa9459Szrjthat only the low 3 bits of the address are relevant.  During relaxation,
229*a9fa9459Szrjthe code may be altered to use an immediate instead of a register shift.
230*a9fa9459Szrj
231*a9fa9459Szrj@item !lituse_addr!@var{N}
232*a9fa9459SzrjUsed with any other instruction to indicate that the original address
233*a9fa9459Szrjis in fact used, and the original @code{ldq} instruction may not be
234*a9fa9459Szrjaltered or deleted.  This is useful in conjunction with @code{lituse_jsr}
235*a9fa9459Szrjto test whether a weak symbol is defined.
236*a9fa9459Szrj
237*a9fa9459Szrj@example
238*a9fa9459Szrjldq  $27,foo($29)   !literal!1
239*a9fa9459Szrjbeq  $27,is_undef   !lituse_addr!1
240*a9fa9459Szrjjsr  $26,($27),foo  !lituse_jsr!1
241*a9fa9459Szrj@end example
242*a9fa9459Szrj
243*a9fa9459Szrj@item !lituse_tlsgd!@var{N}
244*a9fa9459SzrjUsed with a register branch format instruction to indicate that the
245*a9fa9459Szrjliteral is the call to @code{__tls_get_addr} used to compute the
246*a9fa9459Szrjaddress of the thread-local storage variable whose descriptor was
247*a9fa9459Szrjloaded with @code{!tlsgd!@var{N}}.
248*a9fa9459Szrj
249*a9fa9459Szrj@item !lituse_tlsldm!@var{N}
250*a9fa9459SzrjUsed with a register branch format instruction to indicate that the
251*a9fa9459Szrjliteral is the call to @code{__tls_get_addr} used to compute the
252*a9fa9459Szrjaddress of the base of the thread-local storage block for the current
253*a9fa9459Szrjmodule.  The descriptor for the module must have been loaded with
254*a9fa9459Szrj@code{!tlsldm!@var{N}}.
255*a9fa9459Szrj
256*a9fa9459Szrj@item !gpdisp!@var{N}
257*a9fa9459SzrjUsed with @code{ldah} and @code{lda} to load the GP from the current
258*a9fa9459Szrjaddress, a-la the @code{ldgp} macro.  The source register for the
259*a9fa9459Szrj@code{ldah} instruction must contain the address of the @code{ldah}
260*a9fa9459Szrjinstruction.  There must be exactly one @code{lda} instruction paired
261*a9fa9459Szrjwith the @code{ldah} instruction, though it may appear anywhere in
262*a9fa9459Szrjthe instruction stream.  The immediate operands must be zero.
263*a9fa9459Szrj
264*a9fa9459Szrj@example
265*a9fa9459Szrjbsr  $26,foo
266*a9fa9459Szrjldah $29,0($26)     !gpdisp!1
267*a9fa9459Szrjlda  $29,0($29)     !gpdisp!1
268*a9fa9459Szrj@end example
269*a9fa9459Szrj
270*a9fa9459Szrj@item !gprelhigh
271*a9fa9459SzrjUsed with an @code{ldah} instruction to add the high 16 bits of a
272*a9fa9459Szrj32-bit displacement from the GP.
273*a9fa9459Szrj
274*a9fa9459Szrj@item !gprellow
275*a9fa9459SzrjUsed with any memory format instruction to add the low 16 bits of a
276*a9fa9459Szrj32-bit displacement from the GP.
277*a9fa9459Szrj
278*a9fa9459Szrj@item !gprel
279*a9fa9459SzrjUsed with any memory format instruction to add a 16-bit displacement
280*a9fa9459Szrjfrom the GP.
281*a9fa9459Szrj
282*a9fa9459Szrj@item !samegp
283*a9fa9459SzrjUsed with any branch format instruction to skip the GP load at the
284*a9fa9459Szrjtarget address.  The referenced symbol must have the same GP as the
285*a9fa9459Szrjsource object file, and it must be declared to either not use @code{$27}
286*a9fa9459Szrjor perform a standard GP load in the first two instructions via the
287*a9fa9459Szrj@code{.prologue} directive.
288*a9fa9459Szrj
289*a9fa9459Szrj@item !tlsgd
290*a9fa9459Szrj@itemx !tlsgd!@var{N}
291*a9fa9459SzrjUsed with an @code{lda} instruction to load the address of a TLS
292*a9fa9459Szrjdescriptor for a symbol in the GOT.
293*a9fa9459Szrj
294*a9fa9459SzrjThe sequence number @var{N} is optional, and if present it used to
295*a9fa9459Szrjpair the descriptor load with both the @code{literal} loading the
296*a9fa9459Szrjaddress of the @code{__tls_get_addr} function and the @code{lituse_tlsgd}
297*a9fa9459Szrjmarking the call to that function.
298*a9fa9459Szrj
299*a9fa9459SzrjFor proper relaxation, both the @code{tlsgd}, @code{literal} and
300*a9fa9459Szrj@code{lituse} relocations must be in the same extended basic block.
301*a9fa9459SzrjThat is, the relocation with the lowest address must be executed
302*a9fa9459Szrjfirst at runtime.
303*a9fa9459Szrj
304*a9fa9459Szrj@item !tlsldm
305*a9fa9459Szrj@itemx !tlsldm!@var{N}
306*a9fa9459SzrjUsed with an @code{lda} instruction to load the address of a TLS
307*a9fa9459Szrjdescriptor for the current module in the GOT.
308*a9fa9459Szrj
309*a9fa9459SzrjSimilar in other respects to @code{tlsgd}.
310*a9fa9459Szrj
311*a9fa9459Szrj@item !gotdtprel
312*a9fa9459SzrjUsed with an @code{ldq} instruction to load the offset of the TLS
313*a9fa9459Szrjsymbol within its module's thread-local storage block.  Also known
314*a9fa9459Szrjas the dynamic thread pointer offset or dtp-relative offset.
315*a9fa9459Szrj
316*a9fa9459Szrj@item !dtprelhi
317*a9fa9459Szrj@itemx !dtprello
318*a9fa9459Szrj@itemx !dtprel
319*a9fa9459SzrjLike @code{gprel} relocations except they compute dtp-relative offsets.
320*a9fa9459Szrj
321*a9fa9459Szrj@item !gottprel
322*a9fa9459SzrjUsed with an @code{ldq} instruction to load the offset of the TLS
323*a9fa9459Szrjsymbol from the thread pointer.  Also known as the tp-relative offset.
324*a9fa9459Szrj
325*a9fa9459Szrj@item !tprelhi
326*a9fa9459Szrj@itemx !tprello
327*a9fa9459Szrj@itemx !tprel
328*a9fa9459SzrjLike @code{gprel} relocations except they compute tp-relative offsets.
329*a9fa9459Szrj@end table
330*a9fa9459Szrj
331*a9fa9459Szrj@node Alpha Floating Point
332*a9fa9459Szrj@section Floating Point
333*a9fa9459Szrj@cindex floating point, Alpha (@sc{ieee})
334*a9fa9459Szrj@cindex Alpha floating point (@sc{ieee})
335*a9fa9459SzrjThe Alpha family uses both @sc{ieee} and VAX floating-point numbers.
336*a9fa9459Szrj
337*a9fa9459Szrj@node Alpha Directives
338*a9fa9459Szrj@section Alpha Assembler Directives
339*a9fa9459Szrj
340*a9fa9459Szrj@command{@value{AS}} for the Alpha supports many additional directives for
341*a9fa9459Szrjcompatibility with the native assembler.  This section describes them only
342*a9fa9459Szrjbriefly.
343*a9fa9459Szrj
344*a9fa9459Szrj@cindex Alpha-only directives
345*a9fa9459SzrjThese are the additional directives in @code{@value{AS}} for the Alpha:
346*a9fa9459Szrj
347*a9fa9459Szrj@table @code
348*a9fa9459Szrj@item .arch @var{cpu}
349*a9fa9459SzrjSpecifies the target processor.  This is equivalent to the
350*a9fa9459Szrj@option{-m@var{cpu}} command-line option.  @xref{Alpha Options, Options},
351*a9fa9459Szrjfor a list of values for @var{cpu}.
352*a9fa9459Szrj
353*a9fa9459Szrj@item .ent @var{function}[, @var{n}]
354*a9fa9459SzrjMark the beginning of @var{function}.  An optional number may follow for
355*a9fa9459Szrjcompatibility with the OSF/1 assembler, but is ignored.  When generating
356*a9fa9459Szrj@code{.mdebug} information, this will create a procedure descriptor for
357*a9fa9459Szrjthe function.  In ELF, it will mark the symbol as a function a-la the
358*a9fa9459Szrjgeneric @code{.type} directive.
359*a9fa9459Szrj
360*a9fa9459Szrj@item .end @var{function}
361*a9fa9459SzrjMark the end of @var{function}.  In ELF, it will set the size of the symbol
362*a9fa9459Szrja-la the generic @code{.size} directive.
363*a9fa9459Szrj
364*a9fa9459Szrj@item .mask @var{mask}, @var{offset}
365*a9fa9459SzrjIndicate which of the integer registers are saved in the current
366*a9fa9459Szrjfunction's stack frame.  @var{mask} is interpreted a bit mask in which
367*a9fa9459Szrjbit @var{n} set indicates that register @var{n} is saved.  The registers
368*a9fa9459Szrjare saved in a block located @var{offset} bytes from the @dfn{canonical
369*a9fa9459Szrjframe address} (CFA) which is the value of the stack pointer on entry to
370*a9fa9459Szrjthe function.  The registers are saved sequentially, except that the
371*a9fa9459Szrjreturn address register (normally @code{$26}) is saved first.
372*a9fa9459Szrj
373*a9fa9459SzrjThis and the other directives that describe the stack frame are
374*a9fa9459Szrjcurrently only used when generating @code{.mdebug} information.  They
375*a9fa9459Szrjmay in the future be used to generate DWARF2 @code{.debug_frame} unwind
376*a9fa9459Szrjinformation for hand written assembly.
377*a9fa9459Szrj
378*a9fa9459Szrj@item .fmask @var{mask}, @var{offset}
379*a9fa9459SzrjIndicate which of the floating-point registers are saved in the current
380*a9fa9459Szrjstack frame.  The @var{mask} and @var{offset} parameters are interpreted
381*a9fa9459Szrjas with @code{.mask}.
382*a9fa9459Szrj
383*a9fa9459Szrj@item .frame @var{framereg}, @var{frameoffset}, @var{retreg}[, @var{argoffset}]
384*a9fa9459SzrjDescribes the shape of the stack frame.  The frame pointer in use is
385*a9fa9459Szrj@var{framereg}; normally this is either @code{$fp} or @code{$sp}.  The
386*a9fa9459Szrjframe pointer is @var{frameoffset} bytes below the CFA.  The return
387*a9fa9459Szrjaddress is initially located in @var{retreg} until it is saved as
388*a9fa9459Szrjindicated in @code{.mask}.  For compatibility with OSF/1 an optional
389*a9fa9459Szrj@var{argoffset} parameter is accepted and ignored.  It is believed to
390*a9fa9459Szrjindicate the offset from the CFA to the saved argument registers.
391*a9fa9459Szrj
392*a9fa9459Szrj@item .prologue @var{n}
393*a9fa9459SzrjIndicate that the stack frame is set up and all registers have been
394*a9fa9459Szrjspilled.  The argument @var{n} indicates whether and how the function
395*a9fa9459Szrjuses the incoming @dfn{procedure vector} (the address of the called
396*a9fa9459Szrjfunction) in @code{$27}.  0 indicates that @code{$27} is not used; 1
397*a9fa9459Szrjindicates that the first two instructions of the function use @code{$27}
398*a9fa9459Szrjto perform a load of the GP register; 2 indicates that @code{$27} is
399*a9fa9459Szrjused in some non-standard way and so the linker cannot elide the load of
400*a9fa9459Szrjthe procedure vector during relaxation.
401*a9fa9459Szrj
402*a9fa9459Szrj@item .usepv @var{function}, @var{which}
403*a9fa9459SzrjUsed to indicate the use of the @code{$27} register, similar to
404*a9fa9459Szrj@code{.prologue}, but without the other semantics of needing to
405*a9fa9459Szrjbe inside an open @code{.ent}/@code{.end} block.
406*a9fa9459Szrj
407*a9fa9459SzrjThe @var{which} argument should be either @code{no}, indicating that
408*a9fa9459Szrj@code{$27} is not used, or @code{std}, indicating that the first two
409*a9fa9459Szrjinstructions of the function perform a GP load.
410*a9fa9459Szrj
411*a9fa9459SzrjOne might use this directive instead of @code{.prologue} if you are
412*a9fa9459Szrjalso using dwarf2 CFI directives.
413*a9fa9459Szrj
414*a9fa9459Szrj@item .gprel32 @var{expression}
415*a9fa9459SzrjComputes the difference between the address in @var{expression} and the
416*a9fa9459SzrjGP for the current object file, and stores it in 4 bytes.  In addition
417*a9fa9459Szrjto being smaller than a full 8 byte address, this also does not require
418*a9fa9459Szrja dynamic relocation when used in a shared library.
419*a9fa9459Szrj
420*a9fa9459Szrj@item .t_floating @var{expression}
421*a9fa9459SzrjStores @var{expression} as an @sc{ieee} double precision value.
422*a9fa9459Szrj
423*a9fa9459Szrj@item .s_floating @var{expression}
424*a9fa9459SzrjStores @var{expression} as an @sc{ieee} single precision value.
425*a9fa9459Szrj
426*a9fa9459Szrj@item .f_floating @var{expression}
427*a9fa9459SzrjStores @var{expression} as a VAX F format value.
428*a9fa9459Szrj
429*a9fa9459Szrj@item .g_floating @var{expression}
430*a9fa9459SzrjStores @var{expression} as a VAX G format value.
431*a9fa9459Szrj
432*a9fa9459Szrj@item .d_floating @var{expression}
433*a9fa9459SzrjStores @var{expression} as a VAX D format value.
434*a9fa9459Szrj
435*a9fa9459Szrj@item .set @var{feature}
436*a9fa9459SzrjEnables or disables various assembler features.  Using the positive
437*a9fa9459Szrjname of the feature enables while using @samp{no@var{feature}} disables.
438*a9fa9459Szrj
439*a9fa9459Szrj@table @code
440*a9fa9459Szrj@item at
441*a9fa9459SzrjIndicates that macro expansions may clobber the @dfn{assembler
442*a9fa9459Szrjtemporary} (@code{$at} or @code{$28}) register.  Some macros may not be
443*a9fa9459Szrjexpanded without this and will generate an error message if @code{noat}
444*a9fa9459Szrjis in effect.  When @code{at} is in effect, a warning will be generated
445*a9fa9459Szrjif @code{$at} is used by the programmer.
446*a9fa9459Szrj
447*a9fa9459Szrj@item macro
448*a9fa9459SzrjEnables the expansion of macro instructions.  Note that variants of real
449*a9fa9459Szrjinstructions, such as @code{br label} vs @code{br $31,label} are
450*a9fa9459Szrjconsidered alternate forms and not macros.
451*a9fa9459Szrj
452*a9fa9459Szrj@item move
453*a9fa9459Szrj@itemx reorder
454*a9fa9459Szrj@itemx volatile
455*a9fa9459SzrjThese control whether and how the assembler may re-order instructions.
456*a9fa9459SzrjAccepted for compatibility with the OSF/1 assembler, but @command{@value{AS}}
457*a9fa9459Szrjdoes not do instruction scheduling, so these features are ignored.
458*a9fa9459Szrj@end table
459*a9fa9459Szrj@end table
460*a9fa9459Szrj
461*a9fa9459SzrjThe following directives are recognized for compatibility with the OSF/1
462*a9fa9459Szrjassembler but are ignored.
463*a9fa9459Szrj
464*a9fa9459Szrj@example
465*a9fa9459Szrj.proc           .aproc
466*a9fa9459Szrj.reguse         .livereg
467*a9fa9459Szrj.option         .aent
468*a9fa9459Szrj.ugen           .eflag
469*a9fa9459Szrj.alias          .noalias
470*a9fa9459Szrj@end example
471*a9fa9459Szrj
472*a9fa9459Szrj@node Alpha Opcodes
473*a9fa9459Szrj@section Opcodes
474*a9fa9459SzrjFor detailed information on the Alpha machine instruction set, see the
475*a9fa9459Szrj@c Attempt to work around a very overfull hbox.
476*a9fa9459Szrj@iftex
477*a9fa9459SzrjAlpha Architecture Handbook located at
478*a9fa9459Szrj@smallfonts
479*a9fa9459Szrj@example
480*a9fa9459Szrjftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf
481*a9fa9459Szrj@end example
482*a9fa9459Szrj@textfonts
483*a9fa9459Szrj@end iftex
484*a9fa9459Szrj@ifnottex
485*a9fa9459Szrj@uref{ftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf,Alpha Architecture Handbook}.
486*a9fa9459Szrj@end ifnottex
487