PR gas/12390
[binutils.git] / gas / doc / c-ppc.texi
blobf0bcbd5df4211c67d143179eb68c0629f9d16679
1 @c Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
2 @c Free Software Foundation, Inc.
3 @c This is part of the GAS manual.
4 @c For copying conditions, see the file as.texinfo.
5 @ifset GENERIC
6 @page
7 @node PPC-Dependent
8 @chapter PowerPC Dependent Features
9 @end ifset
10 @ifclear GENERIC
11 @node Machine Dependencies
12 @chapter PowerPC Dependent Features
13 @end ifclear
15 @cindex PowerPC support
16 @menu
17 * PowerPC-Opts::                Options
18 * PowerPC-Pseudo::              PowerPC Assembler Directives
19 * PowerPC-Syntax::              PowerPC Syntax
20 @end menu
22 @node PowerPC-Opts
23 @section Options
25 @cindex options for PowerPC
26 @cindex PowerPC options
27 @cindex architectures, PowerPC
28 @cindex PowerPC architectures
29 The PowerPC chip family includes several successive levels, using the same
30 core instruction set, but including a few additional instructions at
31 each level.  There are exceptions to this however.  For details on what
32 instructions each variant supports, please see the chip's architecture
33 reference manual.
35 The following table lists all available PowerPC options.
37 @table @code
38 @item -mpwrx | -mpwr2
39 Generate code for POWER/2 (RIOS2).
41 @item -mpwr
42 Generate code for POWER (RIOS1)
44 @item -m601
45 Generate code for PowerPC 601.
47 @item -mppc, -mppc32, -m603, -m604
48 Generate code for PowerPC 603/604.
50 @item -m403, -m405
51 Generate code for PowerPC 403/405.
53 @item -m440
54 Generate code for PowerPC 440.  BookE and some 405 instructions.
56 @item -m476
57 Generate code for PowerPC 476.
59 @item -m7400, -m7410, -m7450, -m7455
60 Generate code for PowerPC 7400/7410/7450/7455.
62 @item -m750cl
63 Generate code for PowerPC 750CL.
65 @item -mppc64, -m620
66 Generate code for PowerPC 620/625/630.
68 @item -me500, -me500x2
69 Generate code for Motorola e500 core complex.
71 @item -mspe
72 Generate code for Motorola SPE instructions.
74 @item -mtitan
75 Generate code for AppliedMicro Titan core complex.
77 @item -mppc64bridge
78 Generate code for PowerPC 64, including bridge insns.
80 @item -mbooke
81 Generate code for 32-bit BookE.
83 @item -ma2
84 Generate code for A2 architecture.
86 @item -me300
87 Generate code for PowerPC e300 family.
89 @item -maltivec
90 Generate code for processors with AltiVec instructions.
92 @item -mvsx
93 Generate code for processors with Vector-Scalar (VSX) instructions.
95 @item -mpower4
96 Generate code for Power4 architecture.
98 @item -mpower5
99 Generate code for Power5 architecture.
101 @item -mpower6
102 Generate code for Power6 architecture.
104 @item -mpower7
105 Generate code for Power7 architecture.
107 @item -mcell
108 Generate code for Cell Broadband Engine architecture.
110 @item -mcom
111 Generate code Power/PowerPC common instructions.
113 @item -many
114 Generate code for any architecture (PWR/PWRX/PPC).
116 @item -mregnames
117 Allow symbolic names for registers.
119 @item -mno-regnames
120 Do not allow symbolic names for registers.
122 @item -mrelocatable
123 Support for GCC's -mrelocatable option.
125 @item -mrelocatable-lib
126 Support for GCC's -mrelocatable-lib option.
128 @item -memb
129 Set PPC_EMB bit in ELF flags.
131 @item -mlittle, -mlittle-endian
132 Generate code for a little endian machine.
134 @item -mbig, -mbig-endian
135 Generate code for a big endian machine.
137 @item -msolaris
138 Generate code for Solaris.
140 @item -mno-solaris
141 Do not generate code for Solaris.
142 @end table
145 @node PowerPC-Pseudo
146 @section PowerPC Assembler Directives
148 @cindex directives for PowerPC
149 @cindex PowerPC directives
150 A number of assembler directives are available for PowerPC.  The
151 following table is far from complete.
153 @table @code
154 @item .machine "string"
155 This directive allows you to change the machine for which code is
156 generated.  @code{"string"} may be any of the -m cpu selection options
157 (without the -m) enclosed in double quotes, @code{"push"}, or
158 @code{"pop"}.  @code{.machine "push"} saves the currently selected
159 cpu, which may be restored with @code{.machine "pop"}.
160 @end table
162 @node PowerPC-Syntax
163 @section PowerPC Syntax
164 @menu
165 * PowerPC-Chars::                Special Characters
166 @end menu
168 @node PowerPC-Chars
169 @subsection Special Characters
171 @cindex line comment character, PowerPC
172 @cindex PowerPC line comment character
173 The presence of a @samp{#} on a line indicates the start of a comment
174 that extends to the end of the current line.
176 If a @samp{#} appears as the first character of a line then the whole
177 line is treated as a comment, but in this case the line could also be
178 a logical line number directive (@pxref{Comments}) or a preprocessor
179 control command (@pxref{Preprocessing}).
181 If the assembler has been configured for the ppc-*-solaris* target
182 then the @samp{!} character also acts as a line comment character.
183 This can be disabled via the @option{-mno-solaris} command line
184 option.
186 @cindex line separator, PowerPC
187 @cindex statement separator, PowerPC
188 @cindex PowerPC line separator
189 The @samp{;} character can be used to separate statements on the same
190 line.