You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
4.3 KiB
HTML

<html lang="en">
<head>
<title>ARC Directives - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="ARC_002dDependent.html#ARC_002dDependent" title="ARC-Dependent">
<link rel="prev" href="ARC-Syntax.html#ARC-Syntax" title="ARC Syntax">
<link rel="next" href="ARC-Modifiers.html#ARC-Modifiers" title="ARC Modifiers">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2015 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="ARC-Directives"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="ARC-Modifiers.html#ARC-Modifiers">ARC Modifiers</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="ARC-Syntax.html#ARC-Syntax">ARC Syntax</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="ARC_002dDependent.html#ARC_002dDependent">ARC-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.3.3 ARC Machine Directives</h4>
<p><a name="index-machine-directives_002c-ARC-672"></a><a name="index-ARC-machine-directives-673"></a>The ARC version of <code>as</code> supports the following additional
machine directives:
<a name="index-g_t_0040code_007blcomm_007d-directive-674"></a>
<dl><dt><code>.lcomm </code><var>symbol</var><code> , </code><var>length</var><code>[, </code><var>alignment</var><code>]</code><dd>Reserve <var>length</var> (an absolute expression) bytes for a local common
denoted by <var>symbol</var>. The section and value of <var>symbol</var> are
those of the new local common. The addresses are allocated in the bss
section, so that at run-time the bytes start off zeroed. Since
<var>symbol</var> is not declared global, it is normally not visible to
<code>ld</code>. The optional third parameter, <var>alignment</var>,
specifies the desired alignment of the symbol in the bss section,
specified as a byte boundary (for example, an alignment of 16 means
that the least significant 4 bits of the address should be zero). The
alignment must be an absolute expression, and it must be a power of
two. If no alignment is specified, as will set the alignment to the
largest power of two less than or equal to the size of the symbol, up
to a maximum of 16.
<p><a name="index-g_t_0040code_007blcommon_007d-directive-675"></a><br><dt><code>.lcommon </code><var>symbol</var><code> , </code><var>length</var><code>[, </code><var>alignment</var><code>]</code><dd>The same as <code>lcomm</code> directive.
<p><a name="index-g_t_0040code_007bcpu_007d-directive_002c-ARC-676"></a><a name="index-g_t_0040code_007bcpu_007d-directive_002c-ARC-677"></a>The <code>.cpu</code> directive must be followed by the desired core
version. Permitted values for CPU are:
<dl>
<dt><code>ARC600</code><dd>Assemble for the ARC600 instruction set.
<br><dt><code>ARC700</code><dd>Assemble for the ARC700 instruction set.
<br><dt><code>EM</code><dd>Assemble for the ARC EM instruction set.
<br><dt><code>HS</code><dd>Assemble for the ARC HS instruction set.
</dl>
<p>Note: the <code>.cpu</code> directive overrides the command line option
<code>-mcpu=</code><var>cpu</var>; a warning is emitted when the version is not
consistent between the two.
</dl>
</body></html>