1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- This file documents the GNU Assembler "as".
4
5Copyright (C) 1991-2021 Free Software Foundation, Inc.
6
7Permission is granted to copy, distribute and/or modify this document
8under the terms of the GNU Free Documentation License, Version 1.3
9or any later version published by the Free Software Foundation;
10with no Invariant Sections, with no Front-Cover Texts, and with no
11Back-Cover Texts.  A copy of the license is included in the
12section entitled "GNU Free Documentation License".
13 -->
14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
15<head>
16<title>Using as: Alpha Directives</title>
17
18<meta name="description" content="Using as: Alpha Directives">
19<meta name="keywords" content="Using as: Alpha Directives">
20<meta name="resource-type" content="document">
21<meta name="distribution" content="global">
22<meta name="Generator" content="makeinfo">
23<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24<link href="index.html#Top" rel="start" title="Top">
25<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
26<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
27<link href="Alpha_002dDependent.html#Alpha_002dDependent" rel="up" title="Alpha-Dependent">
28<link href="Alpha-Opcodes.html#Alpha-Opcodes" rel="next" title="Alpha Opcodes">
29<link href="Alpha-Floating-Point.html#Alpha-Floating-Point" rel="previous" title="Alpha Floating Point">
30<style type="text/css">
31<!--
32a.summary-letter {text-decoration: none}
33blockquote.smallquotation {font-size: smaller}
34div.display {margin-left: 3.2em}
35div.example {margin-left: 3.2em}
36div.indentedblock {margin-left: 3.2em}
37div.lisp {margin-left: 3.2em}
38div.smalldisplay {margin-left: 3.2em}
39div.smallexample {margin-left: 3.2em}
40div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
41div.smalllisp {margin-left: 3.2em}
42kbd {font-style:oblique}
43pre.display {font-family: inherit}
44pre.format {font-family: inherit}
45pre.menu-comment {font-family: serif}
46pre.menu-preformatted {font-family: serif}
47pre.smalldisplay {font-family: inherit; font-size: smaller}
48pre.smallexample {font-size: smaller}
49pre.smallformat {font-family: inherit; font-size: smaller}
50pre.smalllisp {font-size: smaller}
51span.nocodebreak {white-space:nowrap}
52span.nolinebreak {white-space:nowrap}
53span.roman {font-family:serif; font-weight:normal}
54span.sansserif {font-family:sans-serif; font-weight:normal}
55ul.no-bullet {list-style: none}
56-->
57</style>
58
59
60</head>
61
62<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
63<a name="Alpha-Directives"></a>
64<div class="header">
65<p>
66Next: <a href="Alpha-Opcodes.html#Alpha-Opcodes" accesskey="n" rel="next">Alpha Opcodes</a>, Previous: <a href="Alpha-Floating-Point.html#Alpha-Floating-Point" accesskey="p" rel="previous">Alpha Floating Point</a>, Up: <a href="Alpha_002dDependent.html#Alpha_002dDependent" accesskey="u" rel="up">Alpha-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
67</div>
68<hr>
69<a name="Alpha-Assembler-Directives"></a>
70<h4 class="subsection">9.2.5 Alpha Assembler Directives</h4>
71
72<p><code>as</code> for the Alpha supports many additional directives for
73compatibility with the native assembler.  This section describes them only
74briefly.
75</p>
76<a name="index-Alpha_002donly-directives"></a>
77<p>These are the additional directives in <code>as</code> for the Alpha:
78</p>
79<dl compact="compact">
80<dt><code>.arch <var>cpu</var></code></dt>
81<dd><p>Specifies the target processor.  This is equivalent to the
82<samp>-m<var>cpu</var></samp> command-line option.  See <a href="Alpha-Options.html#Alpha-Options">Options</a>,
83for a list of values for <var>cpu</var>.
84</p>
85</dd>
86<dt><code>.ent <var>function</var>[, <var>n</var>]</code></dt>
87<dd><p>Mark the beginning of <var>function</var>.  An optional number may follow for
88compatibility with the OSF/1 assembler, but is ignored.  When generating
89<code>.mdebug</code> information, this will create a procedure descriptor for
90the function.  In ELF, it will mark the symbol as a function a-la the
91generic <code>.type</code> directive.
92</p>
93</dd>
94<dt><code>.end <var>function</var></code></dt>
95<dd><p>Mark the end of <var>function</var>.  In ELF, it will set the size of the symbol
96a-la the generic <code>.size</code> directive.
97</p>
98</dd>
99<dt><code>.mask <var>mask</var>, <var>offset</var></code></dt>
100<dd><p>Indicate which of the integer registers are saved in the current
101function&rsquo;s stack frame.  <var>mask</var> is interpreted a bit mask in which
102bit <var>n</var> set indicates that register <var>n</var> is saved.  The registers
103are saved in a block located <var>offset</var> bytes from the <em>canonical
104frame address</em> (CFA) which is the value of the stack pointer on entry to
105the function.  The registers are saved sequentially, except that the
106return address register (normally <code>$26</code>) is saved first.
107</p>
108<p>This and the other directives that describe the stack frame are
109currently only used when generating <code>.mdebug</code> information.  They
110may in the future be used to generate DWARF2 <code>.debug_frame</code> unwind
111information for hand written assembly.
112</p>
113</dd>
114<dt><code>.fmask <var>mask</var>, <var>offset</var></code></dt>
115<dd><p>Indicate which of the floating-point registers are saved in the current
116stack frame.  The <var>mask</var> and <var>offset</var> parameters are interpreted
117as with <code>.mask</code>.
118</p>
119</dd>
120<dt><code>.frame <var>framereg</var>, <var>frameoffset</var>, <var>retreg</var>[, <var>argoffset</var>]</code></dt>
121<dd><p>Describes the shape of the stack frame.  The frame pointer in use is
122<var>framereg</var>; normally this is either <code>$fp</code> or <code>$sp</code>.  The
123frame pointer is <var>frameoffset</var> bytes below the CFA.  The return
124address is initially located in <var>retreg</var> until it is saved as
125indicated in <code>.mask</code>.  For compatibility with OSF/1 an optional
126<var>argoffset</var> parameter is accepted and ignored.  It is believed to
127indicate the offset from the CFA to the saved argument registers.
128</p>
129</dd>
130<dt><code>.prologue <var>n</var></code></dt>
131<dd><p>Indicate that the stack frame is set up and all registers have been
132spilled.  The argument <var>n</var> indicates whether and how the function
133uses the incoming <em>procedure vector</em> (the address of the called
134function) in <code>$27</code>.  0 indicates that <code>$27</code> is not used; 1
135indicates that the first two instructions of the function use <code>$27</code>
136to perform a load of the GP register; 2 indicates that <code>$27</code> is
137used in some non-standard way and so the linker cannot elide the load of
138the procedure vector during relaxation.
139</p>
140</dd>
141<dt><code>.usepv <var>function</var>, <var>which</var></code></dt>
142<dd><p>Used to indicate the use of the <code>$27</code> register, similar to
143<code>.prologue</code>, but without the other semantics of needing to
144be inside an open <code>.ent</code>/<code>.end</code> block.
145</p>
146<p>The <var>which</var> argument should be either <code>no</code>, indicating that
147<code>$27</code> is not used, or <code>std</code>, indicating that the first two
148instructions of the function perform a GP load.
149</p>
150<p>One might use this directive instead of <code>.prologue</code> if you are
151also using dwarf2 CFI directives.
152</p>
153</dd>
154<dt><code>.gprel32 <var>expression</var></code></dt>
155<dd><p>Computes the difference between the address in <var>expression</var> and the
156GP for the current object file, and stores it in 4 bytes.  In addition
157to being smaller than a full 8 byte address, this also does not require
158a dynamic relocation when used in a shared library.
159</p>
160</dd>
161<dt><code>.t_floating <var>expression</var></code></dt>
162<dd><p>Stores <var>expression</var> as an <small>IEEE</small> double precision value.
163</p>
164</dd>
165<dt><code>.s_floating <var>expression</var></code></dt>
166<dd><p>Stores <var>expression</var> as an <small>IEEE</small> single precision value.
167</p>
168</dd>
169<dt><code>.f_floating <var>expression</var></code></dt>
170<dd><p>Stores <var>expression</var> as a VAX F format value.
171</p>
172</dd>
173<dt><code>.g_floating <var>expression</var></code></dt>
174<dd><p>Stores <var>expression</var> as a VAX G format value.
175</p>
176</dd>
177<dt><code>.d_floating <var>expression</var></code></dt>
178<dd><p>Stores <var>expression</var> as a VAX D format value.
179</p>
180</dd>
181<dt><code>.set <var>feature</var></code></dt>
182<dd><p>Enables or disables various assembler features.  Using the positive
183name of the feature enables while using &lsquo;<samp>no<var>feature</var></samp>&rsquo; disables.
184</p>
185<dl compact="compact">
186<dt><code>at</code></dt>
187<dd><p>Indicates that macro expansions may clobber the <em>assembler
188temporary</em> (<code>$at</code> or <code>$28</code>) register.  Some macros may not be
189expanded without this and will generate an error message if <code>noat</code>
190is in effect.  When <code>at</code> is in effect, a warning will be generated
191if <code>$at</code> is used by the programmer.
192</p>
193</dd>
194<dt><code>macro</code></dt>
195<dd><p>Enables the expansion of macro instructions.  Note that variants of real
196instructions, such as <code>br label</code> vs <code>br $31,label</code> are
197considered alternate forms and not macros.
198</p>
199</dd>
200<dt><code>move</code></dt>
201<dt><code>reorder</code></dt>
202<dt><code>volatile</code></dt>
203<dd><p>These control whether and how the assembler may re-order instructions.
204Accepted for compatibility with the OSF/1 assembler, but <code>as</code>
205does not do instruction scheduling, so these features are ignored.
206</p></dd>
207</dl>
208</dd>
209</dl>
210
211<p>The following directives are recognized for compatibility with the OSF/1
212assembler but are ignored.
213</p>
214<div class="example">
215<pre class="example">.proc           .aproc
216.reguse         .livereg
217.option         .aent
218.ugen           .eflag
219.alias          .noalias
220</pre></div>
221
222<hr>
223<div class="header">
224<p>
225Next: <a href="Alpha-Opcodes.html#Alpha-Opcodes" accesskey="n" rel="next">Alpha Opcodes</a>, Previous: <a href="Alpha-Floating-Point.html#Alpha-Floating-Point" accesskey="p" rel="previous">Alpha Floating Point</a>, Up: <a href="Alpha_002dDependent.html#Alpha_002dDependent" accesskey="u" rel="up">Alpha-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
226</div>
227
228
229
230</body>
231</html>
232