Commit | Line | Data |
---|---|---|
7c31ae13 | 1 | @c Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
aea77599 | 2 | @c 2012 Free Software Foundation, Inc. |
418c1742 MG |
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 | |
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 | |
34 | reference manual. | |
35 | ||
36 | The following table lists all available PowerPC options. | |
37 | ||
b8b738ac AM |
38 | @c man begin OPTIONS |
39 | @table @gcctabopt | |
40 | @item -a32 | |
41 | Generate ELF32 or XCOFF32. | |
42 | ||
43 | @item -a64 | |
44 | Generate ELF64 or XCOFF64. | |
45 | ||
46 | @item -K PIC | |
47 | Set EF_PPC_RELOCATABLE_LIB in ELF flags. | |
48 | ||
418c1742 | 49 | @item -mpwrx | -mpwr2 |
23e1d84c | 50 | Generate code for POWER/2 (RIOS2). |
418c1742 MG |
51 | |
52 | @item -mpwr | |
23e1d84c | 53 | Generate code for POWER (RIOS1) |
418c1742 MG |
54 | |
55 | @item -m601 | |
23e1d84c | 56 | Generate code for PowerPC 601. |
418c1742 MG |
57 | |
58 | @item -mppc, -mppc32, -m603, -m604 | |
23e1d84c | 59 | Generate code for PowerPC 603/604. |
418c1742 MG |
60 | |
61 | @item -m403, -m405 | |
23e1d84c AM |
62 | Generate code for PowerPC 403/405. |
63 | ||
3d8aea2f AM |
64 | @item -m440 |
65 | Generate code for PowerPC 440. BookE and some 405 instructions. | |
66 | ||
b8b738ac AM |
67 | @item -m464 |
68 | Generate code for PowerPC 464. | |
69 | ||
9fe54b1c PB |
70 | @item -m476 |
71 | Generate code for PowerPC 476. | |
72 | ||
23e1d84c AM |
73 | @item -m7400, -m7410, -m7450, -m7455 |
74 | Generate code for PowerPC 7400/7410/7450/7455. | |
418c1742 | 75 | |
c3d65c1c BE |
76 | @item -m750cl |
77 | Generate code for PowerPC 750CL. | |
78 | ||
418c1742 | 79 | @item -mppc64, -m620 |
23e1d84c | 80 | Generate code for PowerPC 620/625/630. |
418c1742 | 81 | |
7a467a28 AM |
82 | @item -me500, -me500x2 |
83 | Generate code for Motorola e500 core complex. | |
84 | ||
b8b738ac AM |
85 | @item -me500mc |
86 | Generate code for Freescale e500mc core complex. | |
87 | ||
88 | @item -me500mc64 | |
89 | Generate code for Freescale e500mc64 core complex. | |
90 | ||
aea77599 AM |
91 | @item -me5500 |
92 | Generate code for Freescale e5500 core complex. | |
93 | ||
94 | @item -me6500 | |
95 | Generate code for Freescale e6500 core complex. | |
96 | ||
7a467a28 AM |
97 | @item -mspe |
98 | Generate code for Motorola SPE instructions. | |
99 | ||
ce3d2015 AM |
100 | @item -mtitan |
101 | Generate code for AppliedMicro Titan core complex. | |
102 | ||
418c1742 MG |
103 | @item -mppc64bridge |
104 | Generate code for PowerPC 64, including bridge insns. | |
105 | ||
2f3bb96a | 106 | @item -mbooke |
23e1d84c AM |
107 | Generate code for 32-bit BookE. |
108 | ||
634b50f2 | 109 | @item -ma2 |
e0d602ec BE |
110 | Generate code for A2 architecture. |
111 | ||
36ae0db3 DJ |
112 | @item -me300 |
113 | Generate code for PowerPC e300 family. | |
114 | ||
23e1d84c AM |
115 | @item -maltivec |
116 | Generate code for processors with AltiVec instructions. | |
117 | ||
47527d7e JL |
118 | @item -mvle |
119 | Generate code for Freescale PowerPC VLE instructions. | |
120 | ||
9b4e5766 PB |
121 | @item -mvsx |
122 | Generate code for processors with Vector-Scalar (VSX) instructions. | |
123 | ||
5817ffd1 PB |
124 | @item -mhtm |
125 | Generate code for processors with Hardware Transactional Memory instructions. | |
126 | ||
b8b738ac | 127 | @item -mpower4, -mpwr4 |
23e1d84c | 128 | Generate code for Power4 architecture. |
418c1742 | 129 | |
b8b738ac | 130 | @item -mpower5, -mpwr5, -mpwr5x |
b0648eec AM |
131 | Generate code for Power5 architecture. |
132 | ||
b8b738ac | 133 | @item -mpower6, -mpwr6 |
9622b051 AM |
134 | Generate code for Power6 architecture. |
135 | ||
b8b738ac | 136 | @item -mpower7, -mpwr7 |
9b4e5766 PB |
137 | Generate code for Power7 architecture. |
138 | ||
5817ffd1 PB |
139 | @item -mpower8, -mpwr8 |
140 | Generate code for Power8 architecture. | |
141 | ||
142 | @item -mcell | |
ede602d7 AM |
143 | @item -mcell |
144 | Generate code for Cell Broadband Engine architecture. | |
145 | ||
418c1742 MG |
146 | @item -mcom |
147 | Generate code Power/PowerPC common instructions. | |
148 | ||
149 | @item -many | |
150 | Generate code for any architecture (PWR/PWRX/PPC). | |
151 | ||
152 | @item -mregnames | |
153 | Allow symbolic names for registers. | |
154 | ||
155 | @item -mno-regnames | |
156 | Do not allow symbolic names for registers. | |
157 | ||
158 | @item -mrelocatable | |
b45619c0 | 159 | Support for GCC's -mrelocatable option. |
418c1742 MG |
160 | |
161 | @item -mrelocatable-lib | |
b45619c0 | 162 | Support for GCC's -mrelocatable-lib option. |
418c1742 MG |
163 | |
164 | @item -memb | |
165 | Set PPC_EMB bit in ELF flags. | |
166 | ||
b8b738ac | 167 | @item -mlittle, -mlittle-endian, -le |
418c1742 MG |
168 | Generate code for a little endian machine. |
169 | ||
b8b738ac | 170 | @item -mbig, -mbig-endian, -be |
418c1742 MG |
171 | Generate code for a big endian machine. |
172 | ||
173 | @item -msolaris | |
174 | Generate code for Solaris. | |
175 | ||
176 | @item -mno-solaris | |
177 | Do not generate code for Solaris. | |
b8b738ac AM |
178 | |
179 | @item -nops=@var{count} | |
c0e524fe AM |
180 | If an alignment directive inserts more than @var{count} nops, put a |
181 | branch at the beginning to skip execution of the nops. | |
418c1742 | 182 | @end table |
b8b738ac | 183 | @c man end |
f22b3caf AM |
184 | |
185 | ||
186 | @node PowerPC-Pseudo | |
187 | @section PowerPC Assembler Directives | |
188 | ||
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. | |
193 | ||
194 | @table @code | |
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"}. | |
201 | @end table | |
7c31ae13 NC |
202 | |
203 | @node PowerPC-Syntax | |
204 | @section PowerPC Syntax | |
205 | @menu | |
206 | * PowerPC-Chars:: Special Characters | |
207 | @end menu | |
208 | ||
209 | @node PowerPC-Chars | |
210 | @subsection Special Characters | |
211 | ||
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. | |
216 | ||
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}). | |
221 | ||
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 | |
225 | option. | |
226 | ||
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 | |
231 | line. |