| <html lang="en"> | |
| <head> | |
| <title>TILEPro 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="TILEPro-Syntax.html#TILEPro-Syntax" title="TILEPro Syntax"> | |
| <link rel="prev" href="TILEPro-Registers.html#TILEPro-Registers" title="TILEPro 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, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
| 2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010, 2011 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="TILEPro-Modifiers"></a> | |
| <p> | |
| Previous: <a rel="previous" accesskey="p" href="TILEPro-Registers.html#TILEPro-Registers">TILEPro Registers</a>, | |
| Up: <a rel="up" accesskey="u" href="TILEPro-Syntax.html#TILEPro-Syntax">TILEPro Syntax</a> | |
| <hr> | |
| </div> | |
| <h5 class="subsubsection">9.43.2.3 Symbolic Operand Modifiers</h5> | |
| <p><a name="index-TILEPro-modifiers-2047"></a><a name="index-symbol-modifiers_002c-TILEPro-2048"></a> | |
| The assembler supports several modifiers when using symbol addresses | |
| in TILEPro instruction operands. The general syntax is the following: | |
| <pre class="smallexample"> modifier(symbol) | |
| </pre> | |
| <p>The following modifiers are supported: | |
| <dl> | |
| <dt><code>lo16</code><dd> | |
| This modifier is used to load the low 16 bits of the symbol's address, | |
| sign-extended to a 32-bit value (sign-extension allows it to be | |
| range-checked against signed 16 bit immediate operands without | |
| complaint). | |
| <br><dt><code>hi16</code><dd> | |
| This modifier is used to load the high 16 bits of the symbol's | |
| address, also sign-extended to a 32-bit value. | |
| <br><dt><code>ha16</code><dd> | |
| <code>ha16(N)</code> is identical to <code>hi16(N)</code>, except if | |
| <code>lo16(N)</code> is negative it adds one to the <code>hi16(N)</code> | |
| value. This way <code>lo16</code> and <code>ha16</code> can be added to create any | |
| 32-bit value using <code>auli</code>. For example, here is how you move an | |
| arbitrary 32-bit address into r3: | |
| <pre class="smallexample"> moveli r3, lo16(sym) | |
| auli r3, r3, ha16(sym) | |
| </pre> | |
| <br><dt><code>got</code><dd> | |
| This modifier is used to load the offset of the GOT entry | |
| corresponding to the symbol. | |
| <br><dt><code>got_lo16</code><dd> | |
| This modifier is used to load the sign-extended low 16 bits of the | |
| offset of the GOT entry corresponding to the symbol. | |
| <br><dt><code>got_hi16</code><dd> | |
| This modifier is used to load the sign-extended high 16 bits of the | |
| offset of the GOT entry corresponding to the symbol. | |
| <br><dt><code>got_ha16</code><dd> | |
| This modifier is like <code>got_hi16</code>, but it adds one if | |
| <code>got_lo16</code> of the input value is negative. | |
| <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>tls_gd</code><dd> | |
| This modifier is used to load the offset of the GOT entry of the | |
| symbol's TLS descriptor, to be used for general-dynamic TLS accesses. | |
| <br><dt><code>tls_gd_lo16</code><dd> | |
| This modifier is used to load the sign-extended low 16 bits of the | |
| offset of the GOT entry of the symbol's TLS descriptor, to be used for | |
| general dynamic TLS accesses. | |
| <br><dt><code>tls_gd_hi16</code><dd> | |
| This modifier is used to load the sign-extended high 16 bits of the | |
| offset of the GOT entry of the symbol's TLS descriptor, to be used for | |
| general dynamic TLS accesses. | |
| <br><dt><code>tls_gd_ha16</code><dd> | |
| This modifier is like <code>tls_gd_hi16</code>, but it adds one to the value | |
| if <code>tls_gd_lo16</code> of the input value is negative. | |
| <br><dt><code>tls_ie</code><dd> | |
| This modifier is used to load 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>tls_ie_lo16</code><dd> | |
| This modifier is used to load the low 16 bits 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>tls_ie_hi16</code><dd> | |
| This modifier is used to load the high 16 bits 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>tls_ie_ha16</code><dd> | |
| This modifier is like <code>tls_ie_hi16</code>, but it adds one to the value | |
| if <code>tls_ie_lo16</code> of the input value is negative. | |
| <br><dt><code>tls_le</code><dd> | |
| This modifier is used to load the offset of the symbol's address from | |
| the TCB, to be used for local-exec TLS accesses. | |
| <br><dt><code>tls_le_lo16</code><dd> | |
| This modifier is used to load the low 16 bits of the offset of the | |
| symbol's address from the TCB, to be used for local-exec TLS accesses. | |
| <br><dt><code>tls_le_hi16</code><dd> | |
| This modifier is used to load the high 16 bits of the offset of the | |
| symbol's address from the TCB, to be used for local-exec TLS accesses. | |
| <br><dt><code>tls_le_ha16</code><dd> | |
| This modifier is like <code>tls_le_hi16</code>, but it adds one to the value | |
| if <code>tls_le_lo16</code> of the input value is negative. | |
| <br><dt><code>tls_gd_call</code><dd> | |
| This modifier is used to tag an instrution 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> | |