]>
Commit | Line | Data |
---|---|---|
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. | |
5 | @ifset GENERIC | |
6 | @page | |
7 | @node PPC-Dependent | |
8 | @chapter PowerPC Dependent Features | |
9 | @end ifset | |
10 | @ifclear GENERIC | |
11 | @node Machine Dependencies | |
12 | @chapter PowerPC Dependent Features | |
13 | @end ifclear | |
14 | ||
15 | @cindex PowerPC support | |
16 | @menu | |
17 | * PowerPC-Opts:: Options | |
f22b3caf | 18 | * PowerPC-Pseudo:: PowerPC Assembler Directives |
7c31ae13 | 19 | * PowerPC-Syntax:: PowerPC Syntax |
418c1742 MG |
20 | @end menu |
21 | ||
22 | @node PowerPC-Opts | |
23 | @section Options | |
24 | ||
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 | |
33 | reference manual. | |
34 | ||
35 | The following table lists all available PowerPC options. | |
36 | ||
37 | @table @code | |
38 | @item -mpwrx | -mpwr2 | |
23e1d84c | 39 | Generate code for POWER/2 (RIOS2). |
418c1742 MG |
40 | |
41 | @item -mpwr | |
23e1d84c | 42 | Generate code for POWER (RIOS1) |
418c1742 MG |
43 | |
44 | @item -m601 | |
23e1d84c | 45 | Generate code for PowerPC 601. |
418c1742 MG |
46 | |
47 | @item -mppc, -mppc32, -m603, -m604 | |
23e1d84c | 48 | Generate code for PowerPC 603/604. |
418c1742 MG |
49 | |
50 | @item -m403, -m405 | |
23e1d84c AM |
51 | Generate code for PowerPC 403/405. |
52 | ||
3d8aea2f AM |
53 | @item -m440 |
54 | Generate code for PowerPC 440. BookE and some 405 instructions. | |
55 | ||
9fe54b1c PB |
56 | @item -m476 |
57 | Generate code for PowerPC 476. | |
58 | ||
23e1d84c AM |
59 | @item -m7400, -m7410, -m7450, -m7455 |
60 | Generate code for PowerPC 7400/7410/7450/7455. | |
418c1742 | 61 | |
c3d65c1c BE |
62 | @item -m750cl |
63 | Generate code for PowerPC 750CL. | |
64 | ||
418c1742 | 65 | @item -mppc64, -m620 |
23e1d84c | 66 | Generate code for PowerPC 620/625/630. |
418c1742 | 67 | |
7a467a28 AM |
68 | @item -me500, -me500x2 |
69 | Generate code for Motorola e500 core complex. | |
70 | ||
71 | @item -mspe | |
72 | Generate code for Motorola SPE instructions. | |
73 | ||
ce3d2015 AM |
74 | @item -mtitan |
75 | Generate code for AppliedMicro Titan core complex. | |
76 | ||
418c1742 MG |
77 | @item -mppc64bridge |
78 | Generate code for PowerPC 64, including bridge insns. | |
79 | ||
2f3bb96a | 80 | @item -mbooke |
23e1d84c AM |
81 | Generate code for 32-bit BookE. |
82 | ||
634b50f2 | 83 | @item -ma2 |
e0d602ec BE |
84 | Generate code for A2 architecture. |
85 | ||
36ae0db3 DJ |
86 | @item -me300 |
87 | Generate code for PowerPC e300 family. | |
88 | ||
23e1d84c AM |
89 | @item -maltivec |
90 | Generate code for processors with AltiVec instructions. | |
91 | ||
9b4e5766 PB |
92 | @item -mvsx |
93 | Generate code for processors with Vector-Scalar (VSX) instructions. | |
94 | ||
23e1d84c AM |
95 | @item -mpower4 |
96 | Generate code for Power4 architecture. | |
418c1742 | 97 | |
b0648eec AM |
98 | @item -mpower5 |
99 | Generate code for Power5 architecture. | |
100 | ||
9622b051 AM |
101 | @item -mpower6 |
102 | Generate code for Power6 architecture. | |
103 | ||
9b4e5766 PB |
104 | @item -mpower7 |
105 | Generate code for Power7 architecture. | |
106 | ||
ede602d7 AM |
107 | @item -mcell |
108 | Generate code for Cell Broadband Engine architecture. | |
109 | ||
418c1742 MG |
110 | @item -mcom |
111 | Generate code Power/PowerPC common instructions. | |
112 | ||
113 | @item -many | |
114 | Generate code for any architecture (PWR/PWRX/PPC). | |
115 | ||
116 | @item -mregnames | |
117 | Allow symbolic names for registers. | |
118 | ||
119 | @item -mno-regnames | |
120 | Do not allow symbolic names for registers. | |
121 | ||
122 | @item -mrelocatable | |
b45619c0 | 123 | Support for GCC's -mrelocatable option. |
418c1742 MG |
124 | |
125 | @item -mrelocatable-lib | |
b45619c0 | 126 | Support for GCC's -mrelocatable-lib option. |
418c1742 MG |
127 | |
128 | @item -memb | |
129 | Set PPC_EMB bit in ELF flags. | |
130 | ||
131 | @item -mlittle, -mlittle-endian | |
132 | Generate code for a little endian machine. | |
133 | ||
134 | @item -mbig, -mbig-endian | |
135 | Generate code for a big endian machine. | |
136 | ||
137 | @item -msolaris | |
138 | Generate code for Solaris. | |
139 | ||
140 | @item -mno-solaris | |
141 | Do not generate code for Solaris. | |
142 | @end table | |
f22b3caf AM |
143 | |
144 | ||
145 | @node PowerPC-Pseudo | |
146 | @section PowerPC Assembler Directives | |
147 | ||
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. | |
152 | ||
153 | @table @code | |
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"}. | |
160 | @end table | |
7c31ae13 NC |
161 | |
162 | @node PowerPC-Syntax | |
163 | @section PowerPC Syntax | |
164 | @menu | |
165 | * PowerPC-Chars:: Special Characters | |
166 | @end menu | |
167 | ||
168 | @node PowerPC-Chars | |
169 | @subsection Special Characters | |
170 | ||
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. | |
175 | ||
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}). | |
180 | ||
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 | |
184 | option. | |
185 | ||
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 | |
190 | line. |