]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/doc/c-ppc.texi
[gdb/testsuite] Fix regexp in gdb.threads/stepi-over-clone.exp
[thirdparty/binutils-gdb.git] / gas / doc / c-ppc.texi
CommitLineData
fd67aa11 1@c Copyright (C) 2001-2024 Free Software Foundation, Inc.
418c1742
MG
2@c This is part of the GAS manual.
3@c For copying conditions, see the file as.texinfo.
b8b738ac 4@c man end
418c1742
MG
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
29The PowerPC chip family includes several successive levels, using the same
30core instruction set, but including a few additional instructions at
31each level. There are exceptions to this however. For details on what
32instructions each variant supports, please see the chip's architecture
33reference manual.
34
35The following table lists all available PowerPC options.
36
b8b738ac
AM
37@c man begin OPTIONS
38@table @gcctabopt
39@item -a32
40Generate ELF32 or XCOFF32.
41
42@item -a64
43Generate ELF64 or XCOFF64.
44
45@item -K PIC
46Set EF_PPC_RELOCATABLE_LIB in ELF flags.
47
418c1742 48@item -mpwrx | -mpwr2
23e1d84c 49Generate code for POWER/2 (RIOS2).
418c1742
MG
50
51@item -mpwr
23e1d84c 52Generate code for POWER (RIOS1)
418c1742
MG
53
54@item -m601
23e1d84c 55Generate code for PowerPC 601.
418c1742
MG
56
57@item -mppc, -mppc32, -m603, -m604
23e1d84c 58Generate code for PowerPC 603/604.
418c1742
MG
59
60@item -m403, -m405
23e1d84c
AM
61Generate code for PowerPC 403/405.
62
3d8aea2f
AM
63@item -m440
64Generate code for PowerPC 440. BookE and some 405 instructions.
65
b8b738ac
AM
66@item -m464
67Generate code for PowerPC 464.
68
9fe54b1c
PB
69@item -m476
70Generate code for PowerPC 476.
71
23e1d84c
AM
72@item -m7400, -m7410, -m7450, -m7455
73Generate code for PowerPC 7400/7410/7450/7455.
418c1742 74
fa758a70
AC
75@item -m750cl, -mgekko, -mbroadway
76Generate code for PowerPC 750CL/Gekko/Broadway.
c3d65c1c 77
ef5a96d5
AM
78@item -m821, -m850, -m860
79Generate code for PowerPC 821/850/860.
80
418c1742 81@item -mppc64, -m620
23e1d84c 82Generate code for PowerPC 620/625/630.
418c1742 83
61a457e5
AM
84@item -me200z2, -me200z4
85Generate code for e200 variants, e200z2 with LSP, e200z4 with SPE.
86
87@item -me300
88Generate code for PowerPC e300 family.
89
7a467a28
AM
90@item -me500, -me500x2
91Generate code for Motorola e500 core complex.
92
b8b738ac
AM
93@item -me500mc
94Generate code for Freescale e500mc core complex.
95
96@item -me500mc64
97Generate code for Freescale e500mc64 core complex.
98
aea77599
AM
99@item -me5500
100Generate code for Freescale e5500 core complex.
101
102@item -me6500
103Generate code for Freescale e6500 core complex.
104
61a457e5
AM
105@item -mlsp
106Enable LSP instructions. (Disables SPE and SPE2.)
107
7a467a28 108@item -mspe
61a457e5 109Generate code for Motorola SPE instructions. (Disables LSP.)
7a467a28 110
74081948 111@item -mspe2
61a457e5 112Generate code for Freescale SPE2 instructions. (Disables LSP.)
74081948 113
ce3d2015
AM
114@item -mtitan
115Generate code for AppliedMicro Titan core complex.
116
418c1742
MG
117@item -mppc64bridge
118Generate code for PowerPC 64, including bridge insns.
119
2f3bb96a 120@item -mbooke
23e1d84c
AM
121Generate code for 32-bit BookE.
122
634b50f2 123@item -ma2
e0d602ec
BE
124Generate code for A2 architecture.
125
23e1d84c
AM
126@item -maltivec
127Generate code for processors with AltiVec instructions.
128
47527d7e
JL
129@item -mvle
130Generate code for Freescale PowerPC VLE instructions.
131
9b4e5766
PB
132@item -mvsx
133Generate code for processors with Vector-Scalar (VSX) instructions.
134
5817ffd1
PB
135@item -mhtm
136Generate code for processors with Hardware Transactional Memory instructions.
137
b8b738ac 138@item -mpower4, -mpwr4
23e1d84c 139Generate code for Power4 architecture.
418c1742 140
b8b738ac 141@item -mpower5, -mpwr5, -mpwr5x
b0648eec
AM
142Generate code for Power5 architecture.
143
b8b738ac 144@item -mpower6, -mpwr6
9622b051
AM
145Generate code for Power6 architecture.
146
b8b738ac 147@item -mpower7, -mpwr7
9b4e5766
PB
148Generate code for Power7 architecture.
149
5817ffd1
PB
150@item -mpower8, -mpwr8
151Generate code for Power8 architecture.
152
a680de9a
PB
153@item -mpower9, -mpwr9
154Generate code for Power9 architecture.
155
1424c35d
AM
156@item -mpower10, -mpwr10
157Generate code for Power10 architecture.
158
4199cf1e
PB
159@item -mpower11, -mpwr11
160Generate code for Power11 architecture.
161
29a6701e
PB
162@item -mfuture
163Generate code for 'future' architecture.
164
5817ffd1 165@item -mcell
ede602d7
AM
166@item -mcell
167Generate code for Cell Broadband Engine architecture.
168
418c1742
MG
169@item -mcom
170Generate code Power/PowerPC common instructions.
171
172@item -many
173Generate code for any architecture (PWR/PWRX/PPC).
174
175@item -mregnames
176Allow symbolic names for registers.
177
178@item -mno-regnames
179Do not allow symbolic names for registers.
180
181@item -mrelocatable
b45619c0 182Support for GCC's -mrelocatable option.
418c1742
MG
183
184@item -mrelocatable-lib
b45619c0 185Support for GCC's -mrelocatable-lib option.
418c1742
MG
186
187@item -memb
188Set PPC_EMB bit in ELF flags.
189
b8b738ac 190@item -mlittle, -mlittle-endian, -le
418c1742
MG
191Generate code for a little endian machine.
192
b8b738ac 193@item -mbig, -mbig-endian, -be
418c1742
MG
194Generate code for a big endian machine.
195
196@item -msolaris
197Generate code for Solaris.
198
199@item -mno-solaris
200Do not generate code for Solaris.
b8b738ac
AM
201
202@item -nops=@var{count}
c0e524fe
AM
203If an alignment directive inserts more than @var{count} nops, put a
204branch at the beginning to skip execution of the nops.
418c1742 205@end table
b8b738ac 206@c man end
f22b3caf
AM
207
208
209@node PowerPC-Pseudo
210@section PowerPC Assembler Directives
211
212@cindex directives for PowerPC
213@cindex PowerPC directives
214A number of assembler directives are available for PowerPC. The
215following table is far from complete.
216
217@table @code
218@item .machine "string"
219This directive allows you to change the machine for which code is
220generated. @code{"string"} may be any of the -m cpu selection options
221(without the -m) enclosed in double quotes, @code{"push"}, or
222@code{"pop"}. @code{.machine "push"} saves the currently selected
223cpu, which may be restored with @code{.machine "pop"}.
224@end table
7c31ae13
NC
225
226@node PowerPC-Syntax
227@section PowerPC Syntax
228@menu
229* PowerPC-Chars:: Special Characters
230@end menu
231
232@node PowerPC-Chars
233@subsection Special Characters
234
235@cindex line comment character, PowerPC
236@cindex PowerPC line comment character
237The presence of a @samp{#} on a line indicates the start of a comment
238that extends to the end of the current line.
239
240If a @samp{#} appears as the first character of a line then the whole
241line is treated as a comment, but in this case the line could also be
242a logical line number directive (@pxref{Comments}) or a preprocessor
243control command (@pxref{Preprocessing}).
244
245If the assembler has been configured for the ppc-*-solaris* target
246then the @samp{!} character also acts as a line comment character.
a05a5b64 247This can be disabled via the @option{-mno-solaris} command-line
7c31ae13
NC
248option.
249
250@cindex line separator, PowerPC
251@cindex statement separator, PowerPC
252@cindex PowerPC line separator
253The @samp{;} character can be used to separate statements on the same
254line.