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.
200 lines
9.0 KiB
HTML
200 lines
9.0 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- This file documents the GNU Assembler "as".
|
|
|
|
Copyright (C) 1991-2019 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".
|
|
-->
|
|
<!-- Created by GNU Texinfo 6.4, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>Sparc-Constants (Using as)</title>
|
|
|
|
<meta name="description" content="Sparc-Constants (Using as)">
|
|
<meta name="keywords" content="Sparc-Constants (Using as)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="Sparc_002dSyntax.html#Sparc_002dSyntax" rel="up" title="Sparc-Syntax">
|
|
<link href="Sparc_002dRelocs.html#Sparc_002dRelocs" rel="next" title="Sparc-Relocs">
|
|
<link href="Sparc_002dRegs.html#Sparc_002dRegs" rel="prev" title="Sparc-Regs">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="Sparc_002dConstants"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Sparc_002dRelocs.html#Sparc_002dRelocs" accesskey="n" rel="next">Sparc-Relocs</a>, Previous: <a href="Sparc_002dRegs.html#Sparc_002dRegs" accesskey="p" rel="prev">Sparc-Regs</a>, Up: <a href="Sparc_002dSyntax.html#Sparc_002dSyntax" accesskey="u" rel="up">Sparc-Syntax</a> [<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>
|
|
</div>
|
|
<hr>
|
|
<a name="Constants-2"></a>
|
|
<h4 class="subsubsection">9.43.3.3 Constants</h4>
|
|
<a name="index-Sparc-constants"></a>
|
|
<a name="index-constants_002c-Sparc"></a>
|
|
|
|
<p>Several Sparc instructions take an immediate operand field for
|
|
which mnemonic names exist. Two such examples are ‘<samp>membar</samp>’
|
|
and ‘<samp>prefetch</samp>’. Another example are the set of V9
|
|
memory access instruction that allow specification of an
|
|
address space identifier.
|
|
</p>
|
|
<p>The ‘<samp>membar</samp>’ instruction specifies a memory barrier that is
|
|
the defined by the operand which is a bitmask. The supported
|
|
mask mnemonics are:
|
|
</p>
|
|
<ul>
|
|
<li> ‘<samp>#Sync</samp>’ requests that all operations (including nonmemory
|
|
reference operations) appearing prior to the <code>membar</code> must have
|
|
been performed and the effects of any exceptions become visible before
|
|
any instructions after the <code>membar</code> may be initiated. This
|
|
corresponds to <code>membar</code> cmask field bit 2.
|
|
|
|
</li><li> ‘<samp>#MemIssue</samp>’ requests that all memory reference operations
|
|
appearing prior to the <code>membar</code> must have been performed before
|
|
any memory operation after the <code>membar</code> may be initiated. This
|
|
corresponds to <code>membar</code> cmask field bit 1.
|
|
|
|
</li><li> ‘<samp>#Lookaside</samp>’ requests that a store appearing prior to the
|
|
<code>membar</code> must complete before any load following the
|
|
<code>membar</code> referencing the same address can be initiated. This
|
|
corresponds to <code>membar</code> cmask field bit 0.
|
|
|
|
</li><li> ‘<samp>#StoreStore</samp>’ defines that the effects of all stores appearing
|
|
prior to the <code>membar</code> instruction must be visible to all
|
|
processors before the effect of any stores following the
|
|
<code>membar</code>. Equivalent to the deprecated <code>stbar</code> instruction.
|
|
This corresponds to <code>membar</code> mmask field bit 3.
|
|
|
|
</li><li> ‘<samp>#LoadStore</samp>’ defines all loads appearing prior to the
|
|
<code>membar</code> instruction must have been performed before the effect
|
|
of any stores following the <code>membar</code> is visible to any other
|
|
processor. This corresponds to <code>membar</code> mmask field bit 2.
|
|
|
|
</li><li> ‘<samp>#StoreLoad</samp>’ defines that the effects of all stores appearing
|
|
prior to the <code>membar</code> instruction must be visible to all
|
|
processors before loads following the <code>membar</code> may be performed.
|
|
This corresponds to <code>membar</code> mmask field bit 1.
|
|
|
|
</li><li> ‘<samp>#LoadLoad</samp>’ defines that all loads appearing prior to the
|
|
<code>membar</code> instruction must have been performed before any loads
|
|
following the <code>membar</code> may be performed. This corresponds to
|
|
<code>membar</code> mmask field bit 0.
|
|
|
|
</li></ul>
|
|
|
|
<p>These values can be ored together, for example:
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example">membar #Sync
|
|
membar #StoreLoad | #LoadLoad
|
|
membar #StoreLoad | #StoreStore
|
|
</pre></div>
|
|
|
|
<p>The <code>prefetch</code> and <code>prefetcha</code> instructions take a prefetch
|
|
function code. The following prefetch function code constant
|
|
mnemonics are available:
|
|
</p>
|
|
<ul>
|
|
<li> ‘<samp>#n_reads</samp>’ requests a prefetch for several reads, and corresponds
|
|
to a prefetch function code of 0.
|
|
|
|
<p>‘<samp>#one_read</samp>’ requests a prefetch for one read, and corresponds
|
|
to a prefetch function code of 1.
|
|
</p>
|
|
<p>‘<samp>#n_writes</samp>’ requests a prefetch for several writes (and possibly
|
|
reads), and corresponds to a prefetch function code of 2.
|
|
</p>
|
|
<p>‘<samp>#one_write</samp>’ requests a prefetch for one write, and corresponds
|
|
to a prefetch function code of 3.
|
|
</p>
|
|
<p>‘<samp>#page</samp>’ requests a prefetch page, and corresponds to a prefetch
|
|
function code of 4.
|
|
</p>
|
|
<p>‘<samp>#invalidate</samp>’ requests a prefetch invalidate, and corresponds to
|
|
a prefetch function code of 16.
|
|
</p>
|
|
<p>‘<samp>#unified</samp>’ requests a prefetch to the nearest unified cache, and
|
|
corresponds to a prefetch function code of 17.
|
|
</p>
|
|
<p>‘<samp>#n_reads_strong</samp>’ requests a strong prefetch for several reads,
|
|
and corresponds to a prefetch function code of 20.
|
|
</p>
|
|
<p>‘<samp>#one_read_strong</samp>’ requests a strong prefetch for one read,
|
|
and corresponds to a prefetch function code of 21.
|
|
</p>
|
|
<p>‘<samp>#n_writes_strong</samp>’ requests a strong prefetch for several writes,
|
|
and corresponds to a prefetch function code of 22.
|
|
</p>
|
|
<p>‘<samp>#one_write_strong</samp>’ requests a strong prefetch for one write,
|
|
and corresponds to a prefetch function code of 23.
|
|
</p>
|
|
<p>Onle one prefetch code may be specified. Here are some examples:
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example">prefetch [%l0 + %l2], #one_read
|
|
prefetch [%g2 + 8], #n_writes
|
|
prefetcha [%g1] 0x8, #unified
|
|
prefetcha [%o0 + 0x10] %asi, #n_reads
|
|
</pre></div>
|
|
|
|
<p>The actual behavior of a given prefetch function code is processor
|
|
specific. If a processor does not implement a given prefetch
|
|
function code, it will treat the prefetch instruction as a nop.
|
|
</p>
|
|
<p>For instructions that accept an immediate address space identifier,
|
|
<code>as</code> provides many mnemonics corresponding to
|
|
V9 defined as well as UltraSPARC and Niagara extended values.
|
|
For example, ‘<samp>#ASI_P</samp>’ and ‘<samp>#ASI_BLK_INIT_QUAD_LDD_AIUS</samp>’.
|
|
See the V9 and processor specific manuals for details.
|
|
</p>
|
|
</li></ul>
|
|
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Sparc_002dRelocs.html#Sparc_002dRelocs" accesskey="n" rel="next">Sparc-Relocs</a>, Previous: <a href="Sparc_002dRegs.html#Sparc_002dRegs" accesskey="p" rel="prev">Sparc-Regs</a>, Up: <a href="Sparc_002dSyntax.html#Sparc_002dSyntax" accesskey="u" rel="up">Sparc-Syntax</a> [<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>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|