hc
2023-11-06 15ade055295d13f95d49e3d99b09f3bbfb4a43e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1988-2016 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.20.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_insn *<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_insn *<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_insn *<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_insn *<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>