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: AArch64 Directives</title>
17
18<meta name="description" content="Using as: AArch64 Directives">
19<meta name="keywords" content="Using as: AArch64 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="AArch64_002dDependent.html#AArch64_002dDependent" rel="up" title="AArch64-Dependent">
28<link href="AArch64-Opcodes.html#AArch64-Opcodes" rel="next" title="AArch64 Opcodes">
29<link href="AArch64-Floating-Point.html#AArch64-Floating-Point" rel="previous" title="AArch64 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="AArch64-Directives"></a>
64<div class="header">
65<p>
66Next: <a href="AArch64-Opcodes.html#AArch64-Opcodes" accesskey="n" rel="next">AArch64 Opcodes</a>, Previous: <a href="AArch64-Floating-Point.html#AArch64-Floating-Point" accesskey="p" rel="previous">AArch64 Floating Point</a>, Up: <a href="AArch64_002dDependent.html#AArch64_002dDependent" accesskey="u" rel="up">AArch64-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="AArch64-Machine-Directives"></a>
70<h4 class="subsection">9.1.5 AArch64 Machine Directives</h4>
71
72<a name="index-machine-directives_002c-AArch64"></a>
73<a name="index-AArch64-machine-directives"></a>
74<dl compact="compact">
75<dd>
76
77<a name="index-_002earch-directive_002c-AArch64"></a>
78</dd>
79<dt><code>.arch <var>name</var></code></dt>
80<dd><p>Select the target architecture.  Valid values for <var>name</var> are the same as
81for the <samp>-march</samp> command-line option.
82</p>
83<p>Specifying <code>.arch</code> clears any previously selected architecture
84extensions.
85</p>
86<a name="index-_002earch_005fextension-directive_002c-AArch64"></a>
87</dd>
88<dt><code>.arch_extension <var>name</var></code></dt>
89<dd><p>Add or remove an architecture extension to the target architecture.  Valid
90values for <var>name</var> are the same as those accepted as architectural
91extensions by the <samp>-mcpu</samp> command-line option.
92</p>
93<p><code>.arch_extension</code> may be used multiple times to add or remove extensions
94incrementally to the architecture being compiled for.
95</p>
96
97<a name="index-_002ebss-directive_002c-AArch64"></a>
98</dd>
99<dt><code>.bss</code></dt>
100<dd><p>This directive switches to the <code>.bss</code> section.
101</p>
102
103<a name="index-_002ecpu-directive_002c-AArch64"></a>
104</dd>
105<dt><code>.cpu <var>name</var></code></dt>
106<dd><p>Set the target processor.  Valid values for <var>name</var> are the same as
107those accepted by the <samp>-mcpu=</samp> command-line option.
108</p>
109
110<a name="index-_002edword-directive_002c-AArch64"></a>
111</dd>
112<dt><code>.dword <var>expressions</var></code></dt>
113<dd><p>The <code>.dword</code> directive produces 64 bit values.
114</p>
115
116<a name="index-_002eeven-directive_002c-AArch64"></a>
117</dd>
118<dt><code>.even</code></dt>
119<dd><p>The <code>.even</code> directive aligns the output on the next even byte
120boundary.
121</p>
122
123<a name="index-_002efloat16-directive_002c-AArch64"></a>
124</dd>
125<dt><code>.float16 <var>value [,...,value_n]</var></code></dt>
126<dd><p>Place the half precision floating point representation of one or more
127floating-point values into the current section.
128The format used to encode the floating point values is always the
129IEEE 754-2008 half precision floating point format.
130</p>
131
132<a name="index-_002einst-directive_002c-AArch64"></a>
133</dd>
134<dt><code>.inst <var>expressions</var></code></dt>
135<dd><p>Inserts the expressions into the output as if they were instructions,
136rather than data.
137</p>
138
139<a name="index-_002eltorg-directive_002c-AArch64"></a>
140</dd>
141<dt><code>.ltorg</code></dt>
142<dd><p>This directive causes the current contents of the literal pool to be
143dumped into the current section (which is assumed to be the .text
144section) at the current location (aligned to a word boundary).
145GAS maintains a separate literal pool for each section and each
146sub-section.  The <code>.ltorg</code> directive will only affect the literal
147pool of the current section and sub-section.  At the end of assembly
148all remaining, un-empty literal pools will automatically be dumped.
149</p>
150<p>Note - older versions of GAS would dump the current literal
151pool any time a section change occurred.  This is no longer done, since
152it prevents accurate control of the placement of literal pools.
153</p>
154
155
156
157<a name="index-_002epool-directive_002c-AArch64"></a>
158</dd>
159<dt><code>.pool</code></dt>
160<dd><p>This is a synonym for .ltorg.
161</p>
162
163<a name="index-_002ereq-directive_002c-AArch64"></a>
164</dd>
165<dt><code><var>name</var> .req <var>register name</var></code></dt>
166<dd><p>This creates an alias for <var>register name</var> called <var>name</var>.  For
167example:
168</p>
169<div class="smallexample">
170<pre class="smallexample">        foo .req w0
171</pre></div>
172
173<p>ip0, ip1, lr and fp are automatically defined to
174alias to X16, X17, X30 and X29 respectively.
175</p>
176
177
178<a name="index-_002etlsdescadd-directive_002c-AArch64"></a>
179</dd>
180<dt><code><code>.tlsdescadd</code></code></dt>
181<dd><p>Emits a TLSDESC_ADD reloc on the next instruction.
182</p>
183<a name="index-_002etlsdesccall-directive_002c-AArch64"></a>
184</dd>
185<dt><code><code>.tlsdesccall</code></code></dt>
186<dd><p>Emits a TLSDESC_CALL reloc on the next instruction.
187</p>
188<a name="index-_002etlsdescldr-directive_002c-AArch64"></a>
189</dd>
190<dt><code><code>.tlsdescldr</code></code></dt>
191<dd><p>Emits a TLSDESC_LDR reloc on the next instruction.
192</p>
193
194<a name="index-_002eunreq-directive_002c-AArch64"></a>
195</dd>
196<dt><code>.unreq <var>alias-name</var></code></dt>
197<dd><p>This undefines a register alias which was previously defined using the
198<code>req</code> directive.  For example:
199</p>
200<div class="smallexample">
201<pre class="smallexample">        foo .req w0
202        .unreq foo
203</pre></div>
204
205<p>An error occurs if the name is undefined.  Note - this pseudo op can
206be used to delete builtin in register name aliases (eg &rsquo;w0&rsquo;).  This
207should only be done if it is really necessary.
208</p>
209
210<a name="index-_002evariant_005fpcs-directive_002c-AArch64"></a>
211</dd>
212<dt><code>.variant_pcs <var>symbol</var></code></dt>
213<dd><p>This directive marks <var>symbol</var> referencing a function that may
214follow a variant procedure call standard with different register
215usage convention from the base procedure call standard.
216</p>
217
218<a name="index-_002exword-directive_002c-AArch64"></a>
219</dd>
220<dt><code>.xword <var>expressions</var></code></dt>
221<dd><p>The <code>.xword</code> directive produces 64 bit values.  This is the same
222as the <code>.dword</code> directive.
223</p>
224
225<a name="index-_002ecfi_005fb_005fkey_005fframe-directive_002c-AArch64"></a>
226</dd>
227<dt><code><code>.cfi_b_key_frame</code></code></dt>
228<dd><p>The <code>.cfi_b_key_frame</code> directive inserts a &rsquo;B&rsquo; character into the CIE
229corresponding to the current frame&rsquo;s FDE, meaning that its return address has
230been signed with the B-key.  If two frames are signed with differing keys then
231they will not share the same CIE.  This information is intended to be used by
232the stack unwinder in order to properly authenticate return addresses.
233</p>
234</dd>
235</dl>
236
237<hr>
238<div class="header">
239<p>
240Next: <a href="AArch64-Opcodes.html#AArch64-Opcodes" accesskey="n" rel="next">AArch64 Opcodes</a>, Previous: <a href="AArch64-Floating-Point.html#AArch64-Floating-Point" accesskey="p" rel="previous">AArch64 Floating Point</a>, Up: <a href="AArch64_002dDependent.html#AArch64_002dDependent" accesskey="u" rel="up">AArch64-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>
241</div>
242
243
244
245</body>
246</html>
247