blob: 4e88cabe12c21e533b99e118f3a0bcefa50d61e4 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1988-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 the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
"GNU Free Documentation License".
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development. -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Compiler Collection (GCC) Internals: Alignment Output</title>
<meta name="description" content="GNU Compiler Collection (GCC) Internals: Alignment Output">
<meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Alignment Output">
<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="Option-Index.html#Option-Index" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Assembler-Format.html#Assembler-Format" rel="up" title="Assembler Format">
<link href="Debugging-Info.html#Debugging-Info" rel="next" title="Debugging Info">
<link href="Exception-Region-Output.html#Exception-Region-Output" rel="prev" title="Exception Region Output">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
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.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Alignment-Output"></a>
<div class="header">
<p>
Previous: <a href="Exception-Region-Output.html#Exception-Region-Output" accesskey="p" rel="prev">Exception Region Output</a>, Up: <a href="Assembler-Format.html#Assembler-Format" accesskey="u" rel="up">Assembler Format</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Assembler-Commands-for-Alignment"></a>
<h4 class="subsection">17.21.10 Assembler Commands for Alignment</h4>
<p>This describes commands for alignment.
</p>
<dl>
<dt><a name="index-JUMP_005fALIGN"></a>Macro: <strong>JUMP_ALIGN</strong> <em>(<var>label</var>)</em></dt>
<dd><p>The alignment (log base 2) to put in front of <var>label</var>, which is
a common destination of jumps and has no fallthru incoming edge.
</p>
<p>This macro need not be defined if you don&rsquo;t want any special alignment
to be done at such a time. Most machine descriptions do not currently
define the macro.
</p>
<p>Unless it&rsquo;s necessary to inspect the <var>label</var> parameter, it is better
to set the variable <var>align_jumps</var> in the target&rsquo;s
<code>TARGET_OPTION_OVERRIDE</code>. Otherwise, you should try to honor the user&rsquo;s
selection in <var>align_jumps</var> in a <code>JUMP_ALIGN</code> implementation.
</p></dd></dl>
<dl>
<dt><a name="index-TARGET_005fASM_005fJUMP_005fALIGN_005fMAX_005fSKIP"></a>Target Hook: <em>int</em> <strong>TARGET_ASM_JUMP_ALIGN_MAX_SKIP</strong> <em>(rtx <var>label</var>)</em></dt>
<dd><p>The maximum number of bytes to skip before <var>label</var> when applying
<code>JUMP_ALIGN</code>. This works only if
<code>ASM_OUTPUT_MAX_SKIP_ALIGN</code> is defined.
</p></dd></dl>
<dl>
<dt><a name="index-LABEL_005fALIGN_005fAFTER_005fBARRIER"></a>Macro: <strong>LABEL_ALIGN_AFTER_BARRIER</strong> <em>(<var>label</var>)</em></dt>
<dd><p>The alignment (log base 2) to put in front of <var>label</var>, which follows
a <code>BARRIER</code>.
</p>
<p>This macro need not be defined if you don&rsquo;t want any special alignment
to be done at such a time. Most machine descriptions do not currently
define the macro.
</p></dd></dl>
<dl>
<dt><a name="index-TARGET_005fASM_005fLABEL_005fALIGN_005fAFTER_005fBARRIER_005fMAX_005fSKIP"></a>Target Hook: <em>int</em> <strong>TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP</strong> <em>(rtx <var>label</var>)</em></dt>
<dd><p>The maximum number of bytes to skip before <var>label</var> when applying
<code>LABEL_ALIGN_AFTER_BARRIER</code>. This works only if
<code>ASM_OUTPUT_MAX_SKIP_ALIGN</code> is defined.
</p></dd></dl>
<dl>
<dt><a name="index-LOOP_005fALIGN"></a>Macro: <strong>LOOP_ALIGN</strong> <em>(<var>label</var>)</em></dt>
<dd><p>The alignment (log base 2) to put in front of <var>label</var> that heads
a frequently executed basic block (usually the header of a loop).
</p>
<p>This macro need not be defined if you don&rsquo;t want any special alignment
to be done at such a time. Most machine descriptions do not currently
define the macro.
</p>
<p>Unless it&rsquo;s necessary to inspect the <var>label</var> parameter, it is better
to set the variable <code>align_loops</code> in the target&rsquo;s
<code>TARGET_OPTION_OVERRIDE</code>. Otherwise, you should try to honor the user&rsquo;s
selection in <code>align_loops</code> in a <code>LOOP_ALIGN</code> implementation.
</p></dd></dl>
<dl>
<dt><a name="index-TARGET_005fASM_005fLOOP_005fALIGN_005fMAX_005fSKIP"></a>Target Hook: <em>int</em> <strong>TARGET_ASM_LOOP_ALIGN_MAX_SKIP</strong> <em>(rtx <var>label</var>)</em></dt>
<dd><p>The maximum number of bytes to skip when applying <code>LOOP_ALIGN</code> to
<var>label</var>. This works only if <code>ASM_OUTPUT_MAX_SKIP_ALIGN</code> is
defined.
</p></dd></dl>
<dl>
<dt><a name="index-LABEL_005fALIGN"></a>Macro: <strong>LABEL_ALIGN</strong> <em>(<var>label</var>)</em></dt>
<dd><p>The alignment (log base 2) to put in front of <var>label</var>.
If <code>LABEL_ALIGN_AFTER_BARRIER</code> / <code>LOOP_ALIGN</code> specify a different alignment,
the maximum of the specified values is used.
</p>
<p>Unless it&rsquo;s necessary to inspect the <var>label</var> parameter, it is better
to set the variable <code>align_labels</code> in the target&rsquo;s
<code>TARGET_OPTION_OVERRIDE</code>. Otherwise, you should try to honor the user&rsquo;s
selection in <code>align_labels</code> in a <code>LABEL_ALIGN</code> implementation.
</p></dd></dl>
<dl>
<dt><a name="index-TARGET_005fASM_005fLABEL_005fALIGN_005fMAX_005fSKIP"></a>Target Hook: <em>int</em> <strong>TARGET_ASM_LABEL_ALIGN_MAX_SKIP</strong> <em>(rtx <var>label</var>)</em></dt>
<dd><p>The maximum number of bytes to skip when applying <code>LABEL_ALIGN</code>
to <var>label</var>. This works only if <code>ASM_OUTPUT_MAX_SKIP_ALIGN</code>
is defined.
</p></dd></dl>
<dl>
<dt><a name="index-ASM_005fOUTPUT_005fSKIP"></a>Macro: <strong>ASM_OUTPUT_SKIP</strong> <em>(<var>stream</var>, <var>nbytes</var>)</em></dt>
<dd><p>A C statement to output to the stdio stream <var>stream</var> an assembler
instruction to advance the location counter by <var>nbytes</var> bytes.
Those bytes should be zero when loaded. <var>nbytes</var> will be a C
expression of type <code>unsigned HOST_WIDE_INT</code>.
</p></dd></dl>
<dl>
<dt><a name="index-ASM_005fNO_005fSKIP_005fIN_005fTEXT"></a>Macro: <strong>ASM_NO_SKIP_IN_TEXT</strong></dt>
<dd><p>Define this macro if <code>ASM_OUTPUT_SKIP</code> should not be used in the
text section because it fails to put zeros in the bytes that are skipped.
This is true on many Unix systems, where the pseudo&ndash;op to skip bytes
produces no-op instructions rather than zeros when used in the text
section.
</p></dd></dl>
<dl>
<dt><a name="index-ASM_005fOUTPUT_005fALIGN"></a>Macro: <strong>ASM_OUTPUT_ALIGN</strong> <em>(<var>stream</var>, <var>power</var>)</em></dt>
<dd><p>A C statement to output to the stdio stream <var>stream</var> an assembler
command to advance the location counter to a multiple of 2 to the
<var>power</var> bytes. <var>power</var> will be a C expression of type <code>int</code>.
</p></dd></dl>
<dl>
<dt><a name="index-ASM_005fOUTPUT_005fALIGN_005fWITH_005fNOP"></a>Macro: <strong>ASM_OUTPUT_ALIGN_WITH_NOP</strong> <em>(<var>stream</var>, <var>power</var>)</em></dt>
<dd><p>Like <code>ASM_OUTPUT_ALIGN</code>, except that the &ldquo;nop&rdquo; instruction is used
for padding, if necessary.
</p></dd></dl>
<dl>
<dt><a name="index-ASM_005fOUTPUT_005fMAX_005fSKIP_005fALIGN"></a>Macro: <strong>ASM_OUTPUT_MAX_SKIP_ALIGN</strong> <em>(<var>stream</var>, <var>power</var>, <var>max_skip</var>)</em></dt>
<dd><p>A C statement to output to the stdio stream <var>stream</var> an assembler
command to advance the location counter to a multiple of 2 to the
<var>power</var> bytes, but only if <var>max_skip</var> or fewer bytes are needed to
satisfy the alignment request. <var>power</var> and <var>max_skip</var> will be
a C expression of type <code>int</code>.
</p></dd></dl>
<hr>
<div class="header">
<p>
Previous: <a href="Exception-Region-Output.html#Exception-Region-Output" accesskey="p" rel="prev">Exception Region Output</a>, Up: <a href="Assembler-Format.html#Assembler-Format" accesskey="u" rel="up">Assembler Format</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>