| <html lang="en"> |
| <head> |
| <title>Xtensa 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="Xtensa_002dDependent.html#Xtensa_002dDependent" title="Xtensa-Dependent"> |
| <link rel="prev" href="Xtensa-Relaxation.html#Xtensa-Relaxation" title="Xtensa Relaxation"> |
| <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="Xtensa-Directives"></a> |
| <p> |
| Previous: <a rel="previous" accesskey="p" href="Xtensa-Relaxation.html#Xtensa-Relaxation">Xtensa Relaxation</a>, |
| Up: <a rel="up" accesskey="u" href="Xtensa_002dDependent.html#Xtensa_002dDependent">Xtensa-Dependent</a> |
| <hr> |
| </div> |
| |
| <h4 class="subsection">9.55.5 Directives</h4> |
| |
| <p><a name="index-Xtensa-directives-2654"></a><a name="index-directives_002c-Xtensa-2655"></a> |
| The Xtensa assembler supports a region-based directive syntax: |
| |
| <pre class="smallexample"> .begin <var>directive</var> [<var>options</var>] |
| ... |
| .end <var>directive</var> |
| </pre> |
| <p>All the Xtensa-specific directives that apply to a region of code use |
| this syntax. |
| |
| <p>The directive applies to code between the <code>.begin</code> and the |
| <code>.end</code>. The state of the option after the <code>.end</code> reverts to |
| what it was before the <code>.begin</code>. |
| A nested <code>.begin</code>/<code>.end</code> region can further |
| change the state of the directive without having to be aware of its |
| outer state. For example, consider: |
| |
| <pre class="smallexample"> .begin no-transform |
| L: add a0, a1, a2 |
| .begin transform |
| M: add a0, a1, a2 |
| .end transform |
| N: add a0, a1, a2 |
| .end no-transform |
| </pre> |
| <p>The <code>ADD</code> opcodes at <code>L</code> and <code>N</code> in the outer |
| <code>no-transform</code> region both result in <code>ADD</code> machine instructions, |
| but the assembler selects an <code>ADD.N</code> instruction for the |
| <code>ADD</code> at <code>M</code> in the inner <code>transform</code> region. |
| |
| <p>The advantage of this style is that it works well inside macros which can |
| preserve the context of their callers. |
| |
| <p>The following directives are available: |
| |
| <ul class="menu"> |
| <li><a accesskey="1" href="Schedule-Directive.html#Schedule-Directive">Schedule Directive</a>: Enable instruction scheduling. |
| <li><a accesskey="2" href="Longcalls-Directive.html#Longcalls-Directive">Longcalls Directive</a>: Use Indirect Calls for Greater Range. |
| <li><a accesskey="3" href="Transform-Directive.html#Transform-Directive">Transform Directive</a>: Disable All Assembler Transformations. |
| <li><a accesskey="4" href="Literal-Directive.html#Literal-Directive">Literal Directive</a>: Intermix Literals with Instructions. |
| <li><a accesskey="5" href="Literal-Position-Directive.html#Literal-Position-Directive">Literal Position Directive</a>: Specify Inline Literal Pool Locations. |
| <li><a accesskey="6" href="Literal-Prefix-Directive.html#Literal-Prefix-Directive">Literal Prefix Directive</a>: Specify Literal Section Name Prefix. |
| <li><a accesskey="7" href="Absolute-Literals-Directive.html#Absolute-Literals-Directive">Absolute Literals Directive</a>: Control PC-Relative vs. Absolute Literals. |
| </ul> |
| |
| </body></html> |
| |