include/opcode/
[deliverable/binutils-gdb.git] / gas / doc / c-ppc.texi
... / ...
CommitLineData
1@c Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
2@c 2012 Free Software Foundation, Inc.
3@c This is part of the GAS manual.
4@c For copying conditions, see the file as.texinfo.
5@c man end
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
19* PowerPC-Pseudo:: PowerPC Assembler Directives
20* PowerPC-Syntax:: PowerPC Syntax
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
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
49@item -mpwrx | -mpwr2
50Generate code for POWER/2 (RIOS2).
51
52@item -mpwr
53Generate code for POWER (RIOS1)
54
55@item -m601
56Generate code for PowerPC 601.
57
58@item -mppc, -mppc32, -m603, -m604
59Generate code for PowerPC 603/604.
60
61@item -m403, -m405
62Generate code for PowerPC 403/405.
63
64@item -m440
65Generate code for PowerPC 440. BookE and some 405 instructions.
66
67@item -m464
68Generate code for PowerPC 464.
69
70@item -m476
71Generate code for PowerPC 476.
72
73@item -m7400, -m7410, -m7450, -m7455
74Generate code for PowerPC 7400/7410/7450/7455.
75
76@item -m750cl
77Generate code for PowerPC 750CL.
78
79@item -mppc64, -m620
80Generate code for PowerPC 620/625/630.
81
82@item -me500, -me500x2
83Generate code for Motorola e500 core complex.
84
85@item -me500mc
86Generate code for Freescale e500mc core complex.
87
88@item -me500mc64
89Generate code for Freescale e500mc64 core complex.
90
91@item -me5500
92Generate code for Freescale e5500 core complex.
93
94@item -me6500
95Generate code for Freescale e6500 core complex.
96
97@item -mspe
98Generate code for Motorola SPE instructions.
99
100@item -mtitan
101Generate code for AppliedMicro Titan core complex.
102
103@item -mppc64bridge
104Generate code for PowerPC 64, including bridge insns.
105
106@item -mbooke
107Generate code for 32-bit BookE.
108
109@item -ma2
110Generate code for A2 architecture.
111
112@item -me300
113Generate code for PowerPC e300 family.
114
115@item -maltivec
116Generate code for processors with AltiVec instructions.
117
118@item -mvsx
119Generate code for processors with Vector-Scalar (VSX) instructions.
120
121@item -mpower4, -mpwr4
122Generate code for Power4 architecture.
123
124@item -mpower5, -mpwr5, -mpwr5x
125Generate code for Power5 architecture.
126
127@item -mpower6, -mpwr6
128Generate code for Power6 architecture.
129
130@item -mpower7, -mpwr7
131Generate code for Power7 architecture.
132
133@item -mcell
134Generate code for Cell Broadband Engine architecture.
135
136@item -mcom
137Generate code Power/PowerPC common instructions.
138
139@item -many
140Generate code for any architecture (PWR/PWRX/PPC).
141
142@item -mregnames
143Allow symbolic names for registers.
144
145@item -mno-regnames
146Do not allow symbolic names for registers.
147
148@item -mrelocatable
149Support for GCC's -mrelocatable option.
150
151@item -mrelocatable-lib
152Support for GCC's -mrelocatable-lib option.
153
154@item -memb
155Set PPC_EMB bit in ELF flags.
156
157@item -mlittle, -mlittle-endian, -le
158Generate code for a little endian machine.
159
160@item -mbig, -mbig-endian, -be
161Generate code for a big endian machine.
162
163@item -msolaris
164Generate code for Solaris.
165
166@item -mno-solaris
167Do not generate code for Solaris.
168
169@item -nops=@var{count}
170If an alignment directive inserts more than @var{count} nops, put a
171branch at the beginning to skip execution of the nops.
172@end table
173@c man end
174
175
176@node PowerPC-Pseudo
177@section PowerPC Assembler Directives
178
179@cindex directives for PowerPC
180@cindex PowerPC directives
181A number of assembler directives are available for PowerPC. The
182following table is far from complete.
183
184@table @code
185@item .machine "string"
186This directive allows you to change the machine for which code is
187generated. @code{"string"} may be any of the -m cpu selection options
188(without the -m) enclosed in double quotes, @code{"push"}, or
189@code{"pop"}. @code{.machine "push"} saves the currently selected
190cpu, which may be restored with @code{.machine "pop"}.
191@end table
192
193@node PowerPC-Syntax
194@section PowerPC Syntax
195@menu
196* PowerPC-Chars:: Special Characters
197@end menu
198
199@node PowerPC-Chars
200@subsection Special Characters
201
202@cindex line comment character, PowerPC
203@cindex PowerPC line comment character
204The presence of a @samp{#} on a line indicates the start of a comment
205that extends to the end of the current line.
206
207If a @samp{#} appears as the first character of a line then the whole
208line is treated as a comment, but in this case the line could also be
209a logical line number directive (@pxref{Comments}) or a preprocessor
210control command (@pxref{Preprocessing}).
211
212If the assembler has been configured for the ppc-*-solaris* target
213then the @samp{!} character also acts as a line comment character.
214This can be disabled via the @option{-mno-solaris} command line
215option.
216
217@cindex line separator, PowerPC
218@cindex statement separator, PowerPC
219@cindex PowerPC line separator
220The @samp{;} character can be used to separate statements on the same
221line.
This page took 0.031256 seconds and 4 git commands to generate.