187 lines
7.4 KiB
HTML
187 lines
7.4 KiB
HTML
|
<html lang="en">
|
||
|
<head>
|
||
|
<title>TILE-Gx Modifiers - 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="TILE_002dGx-Syntax.html#TILE_002dGx-Syntax" title="TILE-Gx Syntax">
|
||
|
<link rel="prev" href="TILE_002dGx-Registers.html#TILE_002dGx-Registers" title="TILE-Gx Registers">
|
||
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
||
|
<!--
|
||
|
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''.
|
||
|
|
||
|
-->
|
||
|
<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="TILE-Gx-Modifiers"></a>
|
||
|
<a name="TILE_002dGx-Modifiers"></a>
|
||
|
<p>
|
||
|
Previous: <a rel="previous" accesskey="p" href="TILE_002dGx-Registers.html#TILE_002dGx-Registers">TILE-Gx Registers</a>,
|
||
|
Up: <a rel="up" accesskey="u" href="TILE_002dGx-Syntax.html#TILE_002dGx-Syntax">TILE-Gx Syntax</a>
|
||
|
<hr>
|
||
|
</div>
|
||
|
|
||
|
<h5 class="subsubsection">9.47.2.3 Symbolic Operand Modifiers</h5>
|
||
|
|
||
|
<p><a name="index-TILE_002dGx-modifiers-2385"></a><a name="index-symbol-modifiers_002c-TILE_002dGx-2386"></a>
|
||
|
The assembler supports several modifiers when using symbol addresses
|
||
|
in TILE-Gx instruction operands. The general syntax is the following:
|
||
|
|
||
|
<pre class="smallexample"> modifier(symbol)
|
||
|
</pre>
|
||
|
<p>The following modifiers are supported:
|
||
|
|
||
|
<dl>
|
||
|
<dt><code>hw0</code><dd>
|
||
|
This modifier is used to load bits 0-15 of the symbol's address.
|
||
|
|
||
|
<br><dt><code>hw1</code><dd>
|
||
|
This modifier is used to load bits 16-31 of the symbol's address.
|
||
|
|
||
|
<br><dt><code>hw2</code><dd>
|
||
|
This modifier is used to load bits 32-47 of the symbol's address.
|
||
|
|
||
|
<br><dt><code>hw3</code><dd>
|
||
|
This modifier is used to load bits 48-63 of the symbol's address.
|
||
|
|
||
|
<br><dt><code>hw0_last</code><dd>
|
||
|
This modifier yields the same value as <code>hw0</code>, but it also checks
|
||
|
that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw1_last</code><dd>
|
||
|
This modifier yields the same value as <code>hw1</code>, but it also checks
|
||
|
that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw2_last</code><dd>
|
||
|
This modifier yields the same value as <code>hw2</code>, but it also checks
|
||
|
that the value does not overflow.
|
||
|
|
||
|
<p>A 48-bit symbolic value is constructed by using the following idiom:
|
||
|
|
||
|
<pre class="smallexample"> moveli r0, hw2_last(sym)
|
||
|
shl16insli r0, r0, hw1(sym)
|
||
|
shl16insli r0, r0, hw0(sym)
|
||
|
</pre>
|
||
|
<br><dt><code>hw0_got</code><dd>
|
||
|
This modifier is used to load bits 0-15 of the symbol's offset in the
|
||
|
GOT entry corresponding to the symbol.
|
||
|
|
||
|
<br><dt><code>hw0_last_got</code><dd>
|
||
|
This modifier yields the same value as <code>hw0_got</code>, but it also
|
||
|
checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw1_last_got</code><dd>
|
||
|
This modifier is used to load bits 16-31 of the symbol's offset in the
|
||
|
GOT entry corresponding to the symbol, and it also checks that the
|
||
|
value does not overflow.
|
||
|
|
||
|
<br><dt><code>plt</code><dd>
|
||
|
This modifier is used for function symbols. It causes a
|
||
|
<em>procedure linkage table</em>, an array of code stubs, to be created
|
||
|
at the time the shared object is created or linked against, together
|
||
|
with a global offset table entry. The value is a pc-relative offset
|
||
|
to the corresponding stub code in the procedure linkage table. This
|
||
|
arrangement causes the run-time symbol resolver to be called to look
|
||
|
up and set the value of the symbol the first time the function is
|
||
|
called (at latest; depending environment variables). It is only safe
|
||
|
to leave the symbol unresolved this way if all references are function
|
||
|
calls.
|
||
|
|
||
|
<br><dt><code>hw0_plt</code><dd>
|
||
|
This modifier is used to load bits 0-15 of the pc-relative address of
|
||
|
a plt entry.
|
||
|
|
||
|
<br><dt><code>hw1_plt</code><dd>
|
||
|
This modifier is used to load bits 16-31 of the pc-relative address of
|
||
|
a plt entry.
|
||
|
|
||
|
<br><dt><code>hw1_last_plt</code><dd>
|
||
|
This modifier yields the same value as <code>hw1_plt</code>, but it also
|
||
|
checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw2_last_plt</code><dd>
|
||
|
This modifier is used to load bits 32-47 of the pc-relative address of
|
||
|
a plt entry, and it also checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw0_tls_gd</code><dd>
|
||
|
This modifier is used to load bits 0-15 of the offset of the GOT entry
|
||
|
of the symbol's TLS descriptor, to be used for general-dynamic TLS
|
||
|
accesses.
|
||
|
|
||
|
<br><dt><code>hw0_last_tls_gd</code><dd>
|
||
|
This modifier yields the same value as <code>hw0_tls_gd</code>, but it also
|
||
|
checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw1_last_tls_gd</code><dd>
|
||
|
This modifier is used to load bits 16-31 of the offset of the GOT
|
||
|
entry of the symbol's TLS descriptor, to be used for general-dynamic
|
||
|
TLS accesses. It also checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw0_tls_ie</code><dd>
|
||
|
This modifier is used to load bits 0-15 of the offset of the GOT entry
|
||
|
containing the offset of the symbol's address from the TCB, to be used
|
||
|
for initial-exec TLS accesses.
|
||
|
|
||
|
<br><dt><code>hw0_last_tls_ie</code><dd>
|
||
|
This modifier yields the same value as <code>hw0_tls_ie</code>, but it also
|
||
|
checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw1_last_tls_ie</code><dd>
|
||
|
This modifier is used to load bits 16-31 of the offset of the GOT
|
||
|
entry containing the offset of the symbol's address from the TCB, to
|
||
|
be used for initial-exec TLS accesses. It also checks that the value
|
||
|
does not overflow.
|
||
|
|
||
|
<br><dt><code>hw0_tls_le</code><dd>
|
||
|
This modifier is used to load bits 0-15 of the offset of the symbol's
|
||
|
address from the TCB, to be used for local-exec TLS accesses.
|
||
|
|
||
|
<br><dt><code>hw0_last_tls_le</code><dd>
|
||
|
This modifier yields the same value as <code>hw0_tls_le</code>, but it also
|
||
|
checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>hw1_last_tls_le</code><dd>
|
||
|
This modifier is used to load bits 16-31 of the offset of the symbol's
|
||
|
address from the TCB, to be used for local-exec TLS accesses. It
|
||
|
also checks that the value does not overflow.
|
||
|
|
||
|
<br><dt><code>tls_gd_call</code><dd>
|
||
|
This modifier is used to tag an instruction as the “call” part of a
|
||
|
calling sequence for a TLS GD reference of its operand.
|
||
|
|
||
|
<br><dt><code>tls_gd_add</code><dd>
|
||
|
This modifier is used to tag an instruction as the “add” part of a
|
||
|
calling sequence for a TLS GD reference of its operand.
|
||
|
|
||
|
<br><dt><code>tls_ie_load</code><dd>
|
||
|
This modifier is used to tag an instruction as the “load” part of a
|
||
|
calling sequence for a TLS IE reference of its operand.
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
</body></html>
|
||
|
|