• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/gcc/
1<html lang="en">
2<head>
3<title>Modifiers - Using the GNU Compiler Collection (GCC)</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="Using the GNU Compiler Collection (GCC)">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="up" href="Constraints.html#Constraints" title="Constraints">
9<link rel="prev" href="Multi_002dAlternative.html#Multi_002dAlternative" title="Multi-Alternative">
10<link rel="next" href="Machine-Constraints.html#Machine-Constraints" title="Machine Constraints">
11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
12<!--
13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
152010 Free Software Foundation, Inc.
16
17Permission is granted to copy, distribute and/or modify this document
18under the terms of the GNU Free Documentation License, Version 1.3 or
19any later version published by the Free Software Foundation; with the
20Invariant Sections being ``Funding Free Software'', the Front-Cover
21Texts being (a) (see below), and with the Back-Cover Texts being (b)
22(see below).  A copy of the license is included in the section entitled
23``GNU Free Documentation License''.
24
25(a) The FSF's Front-Cover Text is:
26
27     A GNU Manual
28
29(b) The FSF's Back-Cover Text is:
30
31     You have freedom to copy and modify this GNU Manual, like GNU
32     software.  Copies published by the Free Software Foundation raise
33     funds for GNU development.-->
34<meta http-equiv="Content-Style-Type" content="text/css">
35<style type="text/css"><!--
36  pre.display { font-family:inherit }
37  pre.format  { font-family:inherit }
38  pre.smalldisplay { font-family:inherit; font-size:smaller }
39  pre.smallformat  { font-family:inherit; font-size:smaller }
40  pre.smallexample { font-size:smaller }
41  pre.smalllisp    { font-size:smaller }
42  span.sc    { font-variant:small-caps }
43  span.roman { font-family:serif; font-weight:normal; } 
44  span.sansserif { font-family:sans-serif; font-weight:normal; } 
45--></style>
46<link rel="stylesheet" type="text/css" href="../cs.css">
47</head>
48<body>
49<div class="node">
50<a name="Modifiers"></a>
51<p>
52Next:&nbsp;<a rel="next" accesskey="n" href="Machine-Constraints.html#Machine-Constraints">Machine Constraints</a>,
53Previous:&nbsp;<a rel="previous" accesskey="p" href="Multi_002dAlternative.html#Multi_002dAlternative">Multi-Alternative</a>,
54Up:&nbsp;<a rel="up" accesskey="u" href="Constraints.html#Constraints">Constraints</a>
55<hr>
56</div>
57
58<h4 class="subsection">6.42.3 Constraint Modifier Characters</h4>
59
60<p><a name="index-modifiers-in-constraints-2666"></a><a name="index-constraint-modifier-characters-2667"></a>
61<!-- prevent bad page break with this line -->
62Here are constraint modifier characters.
63
64     
65<a name="index-g_t_0040samp_007b_003d_007d-in-constraint-2668"></a>
66<dl><dt>&lsquo;<samp><span class="samp">=</span></samp>&rsquo;<dd>Means that this operand is write-only for this instruction: the previous
67value is discarded and replaced by output data.
68
69     <p><a name="index-g_t_0040samp_007b_002b_007d-in-constraint-2669"></a><br><dt>&lsquo;<samp><span class="samp">+</span></samp>&rsquo;<dd>Means that this operand is both read and written by the instruction.
70
71     <p>When the compiler fixes up the operands to satisfy the constraints,
72it needs to know which operands are inputs to the instruction and
73which are outputs from it.  &lsquo;<samp><span class="samp">=</span></samp>&rsquo; identifies an output; &lsquo;<samp><span class="samp">+</span></samp>&rsquo;
74identifies an operand that is both input and output; all other operands
75are assumed to be input only.
76
77     <p>If you specify &lsquo;<samp><span class="samp">=</span></samp>&rsquo; or &lsquo;<samp><span class="samp">+</span></samp>&rsquo; in a constraint, you put it in the
78first character of the constraint string.
79
80     <p><a name="index-g_t_0040samp_007b_0026_007d-in-constraint-2670"></a><a name="index-earlyclobber-operand-2671"></a><br><dt>&lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo;<dd>Means (in a particular alternative) that this operand is an
81<dfn>earlyclobber</dfn> operand, which is modified before the instruction is
82finished using the input operands.  Therefore, this operand may not lie
83in a register that is used as an input operand or as part of any memory
84address.
85
86     <p>&lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; applies only to the alternative in which it is written.  In
87constraints with multiple alternatives, sometimes one alternative
88requires &lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; while others do not.  See, for example, the
89&lsquo;<samp><span class="samp">movdf</span></samp>&rsquo; insn of the 68000.
90
91     <p>An input operand can be tied to an earlyclobber operand if its only
92use as an input occurs before the early result is written.  Adding
93alternatives of this form often allows GCC to produce better code
94when only some of the inputs can be affected by the earlyclobber. 
95See, for example, the &lsquo;<samp><span class="samp">mulsi3</span></samp>&rsquo; insn of the ARM.
96
97     <p>&lsquo;<samp><span class="samp">&amp;</span></samp>&rsquo; does not obviate the need to write &lsquo;<samp><span class="samp">=</span></samp>&rsquo;.
98
99     <p><a name="index-g_t_0040samp_007b_0025_007d-in-constraint-2672"></a><br><dt>&lsquo;<samp><span class="samp">%</span></samp>&rsquo;<dd>Declares the instruction to be commutative for this operand and the
100following operand.  This means that the compiler may interchange the
101two operands if that is the cheapest way to make all operands fit the
102constraints. 
103GCC can only handle one commutative pair in an asm; if you use more,
104the compiler may fail.  Note that you need not use the modifier if
105the two alternatives are strictly identical; this would only waste
106time in the reload pass.  The modifier is not operational after
107register allocation, so the result of <code>define_peephole2</code>
108and <code>define_split</code>s performed after reload cannot rely on
109&lsquo;<samp><span class="samp">%</span></samp>&rsquo; to make the intended insn match.
110
111     <p><a name="index-g_t_0040samp_007b_0023_007d-in-constraint-2673"></a><br><dt>&lsquo;<samp><span class="samp">#</span></samp>&rsquo;<dd>Says that all following characters, up to the next comma, are to be
112ignored as a constraint.  They are significant only for choosing
113register preferences.
114
115     <p><a name="index-g_t_0040samp_007b_002a_007d-in-constraint-2674"></a><br><dt>&lsquo;<samp><span class="samp">*</span></samp>&rsquo;<dd>Says that the following character should be ignored when choosing
116register preferences.  &lsquo;<samp><span class="samp">*</span></samp>&rsquo; has no effect on the meaning of the
117constraint as a constraint, and no effect on reloading.
118
119 </dl>
120
121 </body></html>
122
123