Fix whitespace.
[deliverable/binutils-gdb.git] / gas / doc / c-ppc.texi
CommitLineData
7c31ae13 1@c Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
418c1742
MG
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.
b8b738ac 5@c man end
418c1742
MG
6@ifset GENERIC
7@page
8@node PPC-Dependent
9@chapter PowerPC Dependent Features
10@end ifset
11@ifclear GENERIC
12@node Machine Dependencies
13@chapter PowerPC Dependent Features
14@end ifclear
15
16@cindex PowerPC support
17@menu
18* PowerPC-Opts:: Options
f22b3caf 19* PowerPC-Pseudo:: PowerPC Assembler Directives
7c31ae13 20* PowerPC-Syntax:: PowerPC Syntax
418c1742
MG
21@end menu
22
23@node PowerPC-Opts
24@section Options
25
26@cindex options for PowerPC
27@cindex PowerPC options
28@cindex architectures, PowerPC
29@cindex PowerPC architectures
30The PowerPC chip family includes several successive levels, using the same
31core instruction set, but including a few additional instructions at
32each level. There are exceptions to this however. For details on what
33instructions each variant supports, please see the chip's architecture
34reference manual.
35
36The following table lists all available PowerPC options.
37
b8b738ac
AM
38@c man begin OPTIONS
39@table @gcctabopt
40@item -a32
41Generate ELF32 or XCOFF32.
42
43@item -a64
44Generate ELF64 or XCOFF64.
45
46@item -K PIC
47Set EF_PPC_RELOCATABLE_LIB in ELF flags.
48
418c1742 49@item -mpwrx | -mpwr2
23e1d84c 50Generate code for POWER/2 (RIOS2).
418c1742
MG
51
52@item -mpwr
23e1d84c 53Generate code for POWER (RIOS1)
418c1742
MG
54
55@item -m601
23e1d84c 56Generate code for PowerPC 601.
418c1742
MG
57
58@item -mppc, -mppc32, -m603, -m604
23e1d84c 59Generate code for PowerPC 603/604.
418c1742
MG
60
61@item -m403, -m405
23e1d84c
AM
62Generate code for PowerPC 403/405.
63
3d8aea2f
AM
64@item -m440
65Generate code for PowerPC 440. BookE and some 405 instructions.
66
b8b738ac
AM
67@item -m464
68Generate code for PowerPC 464.
69
9fe54b1c
PB
70@item -m476
71Generate code for PowerPC 476.
72
23e1d84c
AM
73@item -m7400, -m7410, -m7450, -m7455
74Generate code for PowerPC 7400/7410/7450/7455.
418c1742 75
c3d65c1c
BE
76@item -m750cl
77Generate code for PowerPC 750CL.
78
418c1742 79@item -mppc64, -m620
23e1d84c 80Generate code for PowerPC 620/625/630.
418c1742 81
7a467a28
AM
82@item -me500, -me500x2
83Generate code for Motorola e500 core complex.
84
b8b738ac
AM
85@item -me500mc
86Generate code for Freescale e500mc core complex.
87
88@item -me500mc64
89Generate code for Freescale e500mc64 core complex.
90
7a467a28
AM
91@item -mspe
92Generate code for Motorola SPE instructions.
93
ce3d2015
AM
94@item -mtitan
95Generate code for AppliedMicro Titan core complex.
96
418c1742
MG
97@item -mppc64bridge
98Generate code for PowerPC 64, including bridge insns.
99
2f3bb96a 100@item -mbooke
23e1d84c
AM
101Generate code for 32-bit BookE.
102
634b50f2 103@item -ma2
e0d602ec
BE
104Generate code for A2 architecture.
105
36ae0db3
DJ
106@item -me300
107Generate code for PowerPC e300 family.
108
23e1d84c
AM
109@item -maltivec
110Generate code for processors with AltiVec instructions.
111
9b4e5766
PB
112@item -mvsx
113Generate code for processors with Vector-Scalar (VSX) instructions.
114
b8b738ac 115@item -mpower4, -mpwr4
23e1d84c 116Generate code for Power4 architecture.
418c1742 117
b8b738ac 118@item -mpower5, -mpwr5, -mpwr5x
b0648eec
AM
119Generate code for Power5 architecture.
120
b8b738ac 121@item -mpower6, -mpwr6
9622b051
AM
122Generate code for Power6 architecture.
123
b8b738ac 124@item -mpower7, -mpwr7
9b4e5766
PB
125Generate code for Power7 architecture.
126
ede602d7
AM
127@item -mcell
128Generate code for Cell Broadband Engine architecture.
129
418c1742
MG
130@item -mcom
131Generate code Power/PowerPC common instructions.
132
133@item -many
134Generate code for any architecture (PWR/PWRX/PPC).
135
136@item -mregnames
137Allow symbolic names for registers.
138
139@item -mno-regnames
140Do not allow symbolic names for registers.
141
142@item -mrelocatable
b45619c0 143Support for GCC's -mrelocatable option.
418c1742
MG
144
145@item -mrelocatable-lib
b45619c0 146Support for GCC's -mrelocatable-lib option.
418c1742
MG
147
148@item -memb
149Set PPC_EMB bit in ELF flags.
150
b8b738ac 151@item -mlittle, -mlittle-endian, -le
418c1742
MG
152Generate code for a little endian machine.
153
b8b738ac 154@item -mbig, -mbig-endian, -be
418c1742
MG
155Generate code for a big endian machine.
156
157@item -msolaris
158Generate code for Solaris.
159
160@item -mno-solaris
161Do not generate code for Solaris.
b8b738ac
AM
162
163@item -nops=@var{count}
164When aligning, more than @var{count} nops uses a branch.
418c1742 165@end table
b8b738ac 166@c man end
f22b3caf
AM
167
168
169@node PowerPC-Pseudo
170@section PowerPC Assembler Directives
171
172@cindex directives for PowerPC
173@cindex PowerPC directives
174A number of assembler directives are available for PowerPC. The
175following table is far from complete.
176
177@table @code
178@item .machine "string"
179This directive allows you to change the machine for which code is
180generated. @code{"string"} may be any of the -m cpu selection options
181(without the -m) enclosed in double quotes, @code{"push"}, or
182@code{"pop"}. @code{.machine "push"} saves the currently selected
183cpu, which may be restored with @code{.machine "pop"}.
184@end table
7c31ae13
NC
185
186@node PowerPC-Syntax
187@section PowerPC Syntax
188@menu
189* PowerPC-Chars:: Special Characters
190@end menu
191
192@node PowerPC-Chars
193@subsection Special Characters
194
195@cindex line comment character, PowerPC
196@cindex PowerPC line comment character
197The presence of a @samp{#} on a line indicates the start of a comment
198that extends to the end of the current line.
199
200If a @samp{#} appears as the first character of a line then the whole
201line is treated as a comment, but in this case the line could also be
202a logical line number directive (@pxref{Comments}) or a preprocessor
203control command (@pxref{Preprocessing}).
204
205If the assembler has been configured for the ppc-*-solaris* target
206then the @samp{!} character also acts as a line comment character.
207This can be disabled via the @option{-mno-solaris} command line
208option.
209
210@cindex line separator, PowerPC
211@cindex statement separator, PowerPC
212@cindex PowerPC line separator
213The @samp{;} character can be used to separate statements on the same
214line.
This page took 0.396394 seconds and 4 git commands to generate.