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.
8 @chapter PowerPC Dependent Features
11 @node Machine Dependencies
12 @chapter PowerPC Dependent Features
15 @cindex PowerPC support
17 * PowerPC-Opts:: Options
18 * PowerPC-Pseudo:: PowerPC Assembler Directives
19 * PowerPC-Syntax:: PowerPC Syntax
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
35 The following table lists all available PowerPC options.
39 Generate code for POWER/2 (RIOS2).
42 Generate code for POWER (RIOS1)
45 Generate code for PowerPC 601.
47 @item -mppc, -mppc32, -m603, -m604
48 Generate code for PowerPC 603/604.
51 Generate code for PowerPC 403/405.
54 Generate code for PowerPC 440. BookE and some 405 instructions.
57 Generate code for PowerPC 476.
59 @item -m7400, -m7410, -m7450, -m7455
60 Generate code for PowerPC 7400/7410/7450/7455.
63 Generate code for PowerPC 750CL.
66 Generate code for PowerPC 620/625/630.
68 @item -me500, -me500x2
69 Generate code for Motorola e500 core complex.
72 Generate code for Motorola SPE instructions.
75 Generate code for AppliedMicro Titan core complex.
78 Generate code for PowerPC 64, including bridge insns.
81 Generate code for 32-bit BookE.
84 Generate code for A2 architecture.
87 Generate code for PowerPC e300 family.
90 Generate code for processors with AltiVec instructions.
93 Generate code for processors with Vector-Scalar (VSX) instructions.
96 Generate code for Power4 architecture.
99 Generate code for Power5 architecture.
102 Generate code for Power6 architecture.
105 Generate code for Power7 architecture.
108 Generate code for Cell Broadband Engine architecture.
111 Generate code Power/PowerPC common instructions.
114 Generate code for any architecture (PWR/PWRX/PPC).
117 Allow symbolic names for registers.
120 Do not allow symbolic names for registers.
123 Support for GCC's -mrelocatable option.
125 @item -mrelocatable-lib
126 Support for GCC's -mrelocatable-lib option.
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.
138 Generate code for Solaris.
141 Do not generate code for Solaris.
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.
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"}.
163 @section PowerPC Syntax
165 * PowerPC-Chars:: Special Characters
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
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