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.
9
@chapter PowerPC Dependent Features
12
@node Machine Dependencies
13
@chapter PowerPC Dependent Features
16
@cindex PowerPC support
18
* PowerPC-Opts:: Options
19
* PowerPC-Pseudo:: PowerPC Assembler Directives
20
* PowerPC-Syntax:: PowerPC Syntax
26
@cindex options for PowerPC
27
@cindex PowerPC options
28
@cindex architectures, PowerPC
29
@cindex PowerPC architectures
30
The PowerPC chip family includes several successive levels, using the same
31
core instruction set, but including a few additional instructions at
32
each level. There are exceptions to this however. For details on what
33
instructions each variant supports, please see the chip's architecture
36
The following table lists all available PowerPC options.
41
Generate ELF32 or XCOFF32.
44
Generate ELF64 or XCOFF64.
47
Set EF_PPC_RELOCATABLE_LIB in ELF flags.
50
Generate code for POWER/2 (RIOS2).
53
Generate code for POWER (RIOS1)
56
Generate code for PowerPC 601.
58
@item -mppc, -mppc32, -m603, -m604
59
Generate code for PowerPC 603/604.
62
Generate code for PowerPC 403/405.
65
Generate code for PowerPC 440. BookE and some 405 instructions.
68
Generate code for PowerPC 464.
71
Generate code for PowerPC 476.
73
@item -m7400, -m7410, -m7450, -m7455
74
Generate code for PowerPC 7400/7410/7450/7455.
77
Generate code for PowerPC 750CL.
80
Generate code for PowerPC 620/625/630.
82
@item -me500, -me500x2
83
Generate code for Motorola e500 core complex.
86
Generate code for Freescale e500mc core complex.
89
Generate code for Freescale e500mc64 core complex.
92
Generate code for Freescale e5500 core complex.
95
Generate code for Freescale e6500 core complex.
98
Generate code for Motorola SPE instructions.
101
Generate code for AppliedMicro Titan core complex.
104
Generate code for PowerPC 64, including bridge insns.
107
Generate code for 32-bit BookE.
110
Generate code for A2 architecture.
113
Generate code for PowerPC e300 family.
116
Generate code for processors with AltiVec instructions.
119
Generate code for Freescale PowerPC VLE instructions.
122
Generate code for processors with Vector-Scalar (VSX) instructions.
125
Generate code for processors with Hardware Transactional Memory instructions.
127
@item -mpower4, -mpwr4
128
Generate code for Power4 architecture.
130
@item -mpower5, -mpwr5, -mpwr5x
131
Generate code for Power5 architecture.
133
@item -mpower6, -mpwr6
134
Generate code for Power6 architecture.
136
@item -mpower7, -mpwr7
137
Generate code for Power7 architecture.
139
@item -mpower8, -mpwr8
140
Generate code for Power8 architecture.
144
Generate code for Cell Broadband Engine architecture.
147
Generate code Power/PowerPC common instructions.
150
Generate code for any architecture (PWR/PWRX/PPC).
153
Allow symbolic names for registers.
156
Do not allow symbolic names for registers.
159
Support for GCC's -mrelocatable option.
161
@item -mrelocatable-lib
162
Support for GCC's -mrelocatable-lib option.
165
Set PPC_EMB bit in ELF flags.
167
@item -mlittle, -mlittle-endian, -le
168
Generate code for a little endian machine.
170
@item -mbig, -mbig-endian, -be
171
Generate code for a big endian machine.
174
Generate code for Solaris.
177
Do not generate code for Solaris.
179
@item -nops=@var{count}
180
If an alignment directive inserts more than @var{count} nops, put a
181
branch at the beginning to skip execution of the nops.
187
@section PowerPC Assembler Directives
189
@cindex directives for PowerPC
190
@cindex PowerPC directives
191
A number of assembler directives are available for PowerPC. The
192
following table is far from complete.
195
@item .machine "string"
196
This directive allows you to change the machine for which code is
197
generated. @code{"string"} may be any of the -m cpu selection options
198
(without the -m) enclosed in double quotes, @code{"push"}, or
199
@code{"pop"}. @code{.machine "push"} saves the currently selected
200
cpu, which may be restored with @code{.machine "pop"}.
204
@section PowerPC Syntax
206
* PowerPC-Chars:: Special Characters
210
@subsection Special Characters
212
@cindex line comment character, PowerPC
213
@cindex PowerPC line comment character
214
The presence of a @samp{#} on a line indicates the start of a comment
215
that extends to the end of the current line.
217
If a @samp{#} appears as the first character of a line then the whole
218
line is treated as a comment, but in this case the line could also be
219
a logical line number directive (@pxref{Comments}) or a preprocessor
220
control command (@pxref{Preprocessing}).
222
If the assembler has been configured for the ppc-*-solaris* target
223
then the @samp{!} character also acts as a line comment character.
224
This can be disabled via the @option{-mno-solaris} command line
227
@cindex line separator, PowerPC
228
@cindex statement separator, PowerPC
229
@cindex PowerPC line separator
230
The @samp{;} character can be used to separate statements on the same