1@c Copyright (C) 2001-2014 Free Software Foundation, Inc. 2@c This is part of the GAS manual. 3@c For copying conditions, see the file as.texinfo. 4@c man end 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 18* PowerPC-Pseudo:: PowerPC Assembler Directives 19* PowerPC-Syntax:: PowerPC Syntax 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 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 48@item -mpwrx | -mpwr2 49Generate code for POWER/2 (RIOS2). 50 51@item -mpwr 52Generate code for POWER (RIOS1) 53 54@item -m601 55Generate code for PowerPC 601. 56 57@item -mppc, -mppc32, -m603, -m604 58Generate code for PowerPC 603/604. 59 60@item -m403, -m405 61Generate code for PowerPC 403/405. 62 63@item -m440 64Generate code for PowerPC 440. BookE and some 405 instructions. 65 66@item -m464 67Generate code for PowerPC 464. 68 69@item -m476 70Generate code for PowerPC 476. 71 72@item -m7400, -m7410, -m7450, -m7455 73Generate code for PowerPC 7400/7410/7450/7455. 74 75@item -m750cl 76Generate code for PowerPC 750CL. 77 78@item -mppc64, -m620 79Generate code for PowerPC 620/625/630. 80 81@item -me500, -me500x2 82Generate code for Motorola e500 core complex. 83 84@item -me500mc 85Generate code for Freescale e500mc core complex. 86 87@item -me500mc64 88Generate code for Freescale e500mc64 core complex. 89 90@item -me5500 91Generate code for Freescale e5500 core complex. 92 93@item -me6500 94Generate code for Freescale e6500 core complex. 95 96@item -mspe 97Generate code for Motorola SPE instructions. 98 99@item -mtitan 100Generate code for AppliedMicro Titan core complex. 101 102@item -mppc64bridge 103Generate code for PowerPC 64, including bridge insns. 104 105@item -mbooke 106Generate code for 32-bit BookE. 107 108@item -ma2 109Generate code for A2 architecture. 110 111@item -me300 112Generate code for PowerPC e300 family. 113 114@item -maltivec 115Generate code for processors with AltiVec instructions. 116 117@item -mvle 118Generate code for Freescale PowerPC VLE instructions. 119 120@item -mvsx 121Generate code for processors with Vector-Scalar (VSX) instructions. 122 123@item -mhtm 124Generate code for processors with Hardware Transactional Memory instructions. 125 126@item -mpower4, -mpwr4 127Generate code for Power4 architecture. 128 129@item -mpower5, -mpwr5, -mpwr5x 130Generate code for Power5 architecture. 131 132@item -mpower6, -mpwr6 133Generate code for Power6 architecture. 134 135@item -mpower7, -mpwr7 136Generate code for Power7 architecture. 137 138@item -mpower8, -mpwr8 139Generate code for Power8 architecture. 140 141@item -mcell 142@item -mcell 143Generate code for Cell Broadband Engine architecture. 144 145@item -mcom 146Generate code Power/PowerPC common instructions. 147 148@item -many 149Generate code for any architecture (PWR/PWRX/PPC). 150 151@item -mregnames 152Allow symbolic names for registers. 153 154@item -mno-regnames 155Do not allow symbolic names for registers. 156 157@item -mrelocatable 158Support for GCC's -mrelocatable option. 159 160@item -mrelocatable-lib 161Support for GCC's -mrelocatable-lib option. 162 163@item -memb 164Set PPC_EMB bit in ELF flags. 165 166@item -mlittle, -mlittle-endian, -le 167Generate code for a little endian machine. 168 169@item -mbig, -mbig-endian, -be 170Generate code for a big endian machine. 171 172@item -msolaris 173Generate code for Solaris. 174 175@item -mno-solaris 176Do not generate code for Solaris. 177 178@item -nops=@var{count} 179If an alignment directive inserts more than @var{count} nops, put a 180branch at the beginning to skip execution of the nops. 181@end table 182@c man end 183 184 185@node PowerPC-Pseudo 186@section PowerPC Assembler Directives 187 188@cindex directives for PowerPC 189@cindex PowerPC directives 190A number of assembler directives are available for PowerPC. The 191following table is far from complete. 192 193@table @code 194@item .machine "string" 195This directive allows you to change the machine for which code is 196generated. @code{"string"} may be any of the -m cpu selection options 197(without the -m) enclosed in double quotes, @code{"push"}, or 198@code{"pop"}. @code{.machine "push"} saves the currently selected 199cpu, which may be restored with @code{.machine "pop"}. 200@end table 201 202@node PowerPC-Syntax 203@section PowerPC Syntax 204@menu 205* PowerPC-Chars:: Special Characters 206@end menu 207 208@node PowerPC-Chars 209@subsection Special Characters 210 211@cindex line comment character, PowerPC 212@cindex PowerPC line comment character 213The presence of a @samp{#} on a line indicates the start of a comment 214that extends to the end of the current line. 215 216If a @samp{#} appears as the first character of a line then the whole 217line is treated as a comment, but in this case the line could also be 218a logical line number directive (@pxref{Comments}) or a preprocessor 219control command (@pxref{Preprocessing}). 220 221If the assembler has been configured for the ppc-*-solaris* target 222then the @samp{!} character also acts as a line comment character. 223This can be disabled via the @option{-mno-solaris} command line 224option. 225 226@cindex line separator, PowerPC 227@cindex statement separator, PowerPC 228@cindex PowerPC line separator 229The @samp{;} character can be used to separate statements on the same 230line. 231