1*a9fa9459Szrj@c Copyright (C) 2001-2016 Free Software Foundation, Inc. 2*a9fa9459Szrj@c This is part of the GAS manual. 3*a9fa9459Szrj@c For copying conditions, see the file as.texinfo. 4*a9fa9459Szrj@c man end 5*a9fa9459Szrj@ifset GENERIC 6*a9fa9459Szrj@page 7*a9fa9459Szrj@node PPC-Dependent 8*a9fa9459Szrj@chapter PowerPC Dependent Features 9*a9fa9459Szrj@end ifset 10*a9fa9459Szrj@ifclear GENERIC 11*a9fa9459Szrj@node Machine Dependencies 12*a9fa9459Szrj@chapter PowerPC Dependent Features 13*a9fa9459Szrj@end ifclear 14*a9fa9459Szrj 15*a9fa9459Szrj@cindex PowerPC support 16*a9fa9459Szrj@menu 17*a9fa9459Szrj* PowerPC-Opts:: Options 18*a9fa9459Szrj* PowerPC-Pseudo:: PowerPC Assembler Directives 19*a9fa9459Szrj* PowerPC-Syntax:: PowerPC Syntax 20*a9fa9459Szrj@end menu 21*a9fa9459Szrj 22*a9fa9459Szrj@node PowerPC-Opts 23*a9fa9459Szrj@section Options 24*a9fa9459Szrj 25*a9fa9459Szrj@cindex options for PowerPC 26*a9fa9459Szrj@cindex PowerPC options 27*a9fa9459Szrj@cindex architectures, PowerPC 28*a9fa9459Szrj@cindex PowerPC architectures 29*a9fa9459SzrjThe PowerPC chip family includes several successive levels, using the same 30*a9fa9459Szrjcore instruction set, but including a few additional instructions at 31*a9fa9459Szrjeach level. There are exceptions to this however. For details on what 32*a9fa9459Szrjinstructions each variant supports, please see the chip's architecture 33*a9fa9459Szrjreference manual. 34*a9fa9459Szrj 35*a9fa9459SzrjThe following table lists all available PowerPC options. 36*a9fa9459Szrj 37*a9fa9459Szrj@c man begin OPTIONS 38*a9fa9459Szrj@table @gcctabopt 39*a9fa9459Szrj@item -a32 40*a9fa9459SzrjGenerate ELF32 or XCOFF32. 41*a9fa9459Szrj 42*a9fa9459Szrj@item -a64 43*a9fa9459SzrjGenerate ELF64 or XCOFF64. 44*a9fa9459Szrj 45*a9fa9459Szrj@item -K PIC 46*a9fa9459SzrjSet EF_PPC_RELOCATABLE_LIB in ELF flags. 47*a9fa9459Szrj 48*a9fa9459Szrj@item -mpwrx | -mpwr2 49*a9fa9459SzrjGenerate code for POWER/2 (RIOS2). 50*a9fa9459Szrj 51*a9fa9459Szrj@item -mpwr 52*a9fa9459SzrjGenerate code for POWER (RIOS1) 53*a9fa9459Szrj 54*a9fa9459Szrj@item -m601 55*a9fa9459SzrjGenerate code for PowerPC 601. 56*a9fa9459Szrj 57*a9fa9459Szrj@item -mppc, -mppc32, -m603, -m604 58*a9fa9459SzrjGenerate code for PowerPC 603/604. 59*a9fa9459Szrj 60*a9fa9459Szrj@item -m403, -m405 61*a9fa9459SzrjGenerate code for PowerPC 403/405. 62*a9fa9459Szrj 63*a9fa9459Szrj@item -m440 64*a9fa9459SzrjGenerate code for PowerPC 440. BookE and some 405 instructions. 65*a9fa9459Szrj 66*a9fa9459Szrj@item -m464 67*a9fa9459SzrjGenerate code for PowerPC 464. 68*a9fa9459Szrj 69*a9fa9459Szrj@item -m476 70*a9fa9459SzrjGenerate code for PowerPC 476. 71*a9fa9459Szrj 72*a9fa9459Szrj@item -m7400, -m7410, -m7450, -m7455 73*a9fa9459SzrjGenerate code for PowerPC 7400/7410/7450/7455. 74*a9fa9459Szrj 75*a9fa9459Szrj@item -m750cl 76*a9fa9459SzrjGenerate code for PowerPC 750CL. 77*a9fa9459Szrj 78*a9fa9459Szrj@item -m821, -m850, -m860 79*a9fa9459SzrjGenerate code for PowerPC 821/850/860. 80*a9fa9459Szrj 81*a9fa9459Szrj@item -mppc64, -m620 82*a9fa9459SzrjGenerate code for PowerPC 620/625/630. 83*a9fa9459Szrj 84*a9fa9459Szrj@item -me500, -me500x2 85*a9fa9459SzrjGenerate code for Motorola e500 core complex. 86*a9fa9459Szrj 87*a9fa9459Szrj@item -me500mc 88*a9fa9459SzrjGenerate code for Freescale e500mc core complex. 89*a9fa9459Szrj 90*a9fa9459Szrj@item -me500mc64 91*a9fa9459SzrjGenerate code for Freescale e500mc64 core complex. 92*a9fa9459Szrj 93*a9fa9459Szrj@item -me5500 94*a9fa9459SzrjGenerate code for Freescale e5500 core complex. 95*a9fa9459Szrj 96*a9fa9459Szrj@item -me6500 97*a9fa9459SzrjGenerate code for Freescale e6500 core complex. 98*a9fa9459Szrj 99*a9fa9459Szrj@item -mspe 100*a9fa9459SzrjGenerate code for Motorola SPE instructions. 101*a9fa9459Szrj 102*a9fa9459Szrj@item -mtitan 103*a9fa9459SzrjGenerate code for AppliedMicro Titan core complex. 104*a9fa9459Szrj 105*a9fa9459Szrj@item -mppc64bridge 106*a9fa9459SzrjGenerate code for PowerPC 64, including bridge insns. 107*a9fa9459Szrj 108*a9fa9459Szrj@item -mbooke 109*a9fa9459SzrjGenerate code for 32-bit BookE. 110*a9fa9459Szrj 111*a9fa9459Szrj@item -ma2 112*a9fa9459SzrjGenerate code for A2 architecture. 113*a9fa9459Szrj 114*a9fa9459Szrj@item -me300 115*a9fa9459SzrjGenerate code for PowerPC e300 family. 116*a9fa9459Szrj 117*a9fa9459Szrj@item -maltivec 118*a9fa9459SzrjGenerate code for processors with AltiVec instructions. 119*a9fa9459Szrj 120*a9fa9459Szrj@item -mvle 121*a9fa9459SzrjGenerate code for Freescale PowerPC VLE instructions. 122*a9fa9459Szrj 123*a9fa9459Szrj@item -mvsx 124*a9fa9459SzrjGenerate code for processors with Vector-Scalar (VSX) instructions. 125*a9fa9459Szrj 126*a9fa9459Szrj@item -mhtm 127*a9fa9459SzrjGenerate code for processors with Hardware Transactional Memory instructions. 128*a9fa9459Szrj 129*a9fa9459Szrj@item -mpower4, -mpwr4 130*a9fa9459SzrjGenerate code for Power4 architecture. 131*a9fa9459Szrj 132*a9fa9459Szrj@item -mpower5, -mpwr5, -mpwr5x 133*a9fa9459SzrjGenerate code for Power5 architecture. 134*a9fa9459Szrj 135*a9fa9459Szrj@item -mpower6, -mpwr6 136*a9fa9459SzrjGenerate code for Power6 architecture. 137*a9fa9459Szrj 138*a9fa9459Szrj@item -mpower7, -mpwr7 139*a9fa9459SzrjGenerate code for Power7 architecture. 140*a9fa9459Szrj 141*a9fa9459Szrj@item -mpower8, -mpwr8 142*a9fa9459SzrjGenerate code for Power8 architecture. 143*a9fa9459Szrj 144*a9fa9459Szrj@item -mpower9, -mpwr9 145*a9fa9459SzrjGenerate code for Power9 architecture. 146*a9fa9459Szrj 147*a9fa9459Szrj@item -mcell 148*a9fa9459Szrj@item -mcell 149*a9fa9459SzrjGenerate code for Cell Broadband Engine architecture. 150*a9fa9459Szrj 151*a9fa9459Szrj@item -mcom 152*a9fa9459SzrjGenerate code Power/PowerPC common instructions. 153*a9fa9459Szrj 154*a9fa9459Szrj@item -many 155*a9fa9459SzrjGenerate code for any architecture (PWR/PWRX/PPC). 156*a9fa9459Szrj 157*a9fa9459Szrj@item -mregnames 158*a9fa9459SzrjAllow symbolic names for registers. 159*a9fa9459Szrj 160*a9fa9459Szrj@item -mno-regnames 161*a9fa9459SzrjDo not allow symbolic names for registers. 162*a9fa9459Szrj 163*a9fa9459Szrj@item -mrelocatable 164*a9fa9459SzrjSupport for GCC's -mrelocatable option. 165*a9fa9459Szrj 166*a9fa9459Szrj@item -mrelocatable-lib 167*a9fa9459SzrjSupport for GCC's -mrelocatable-lib option. 168*a9fa9459Szrj 169*a9fa9459Szrj@item -memb 170*a9fa9459SzrjSet PPC_EMB bit in ELF flags. 171*a9fa9459Szrj 172*a9fa9459Szrj@item -mlittle, -mlittle-endian, -le 173*a9fa9459SzrjGenerate code for a little endian machine. 174*a9fa9459Szrj 175*a9fa9459Szrj@item -mbig, -mbig-endian, -be 176*a9fa9459SzrjGenerate code for a big endian machine. 177*a9fa9459Szrj 178*a9fa9459Szrj@item -msolaris 179*a9fa9459SzrjGenerate code for Solaris. 180*a9fa9459Szrj 181*a9fa9459Szrj@item -mno-solaris 182*a9fa9459SzrjDo not generate code for Solaris. 183*a9fa9459Szrj 184*a9fa9459Szrj@item -nops=@var{count} 185*a9fa9459SzrjIf an alignment directive inserts more than @var{count} nops, put a 186*a9fa9459Szrjbranch at the beginning to skip execution of the nops. 187*a9fa9459Szrj@end table 188*a9fa9459Szrj@c man end 189*a9fa9459Szrj 190*a9fa9459Szrj 191*a9fa9459Szrj@node PowerPC-Pseudo 192*a9fa9459Szrj@section PowerPC Assembler Directives 193*a9fa9459Szrj 194*a9fa9459Szrj@cindex directives for PowerPC 195*a9fa9459Szrj@cindex PowerPC directives 196*a9fa9459SzrjA number of assembler directives are available for PowerPC. The 197*a9fa9459Szrjfollowing table is far from complete. 198*a9fa9459Szrj 199*a9fa9459Szrj@table @code 200*a9fa9459Szrj@item .machine "string" 201*a9fa9459SzrjThis directive allows you to change the machine for which code is 202*a9fa9459Szrjgenerated. @code{"string"} may be any of the -m cpu selection options 203*a9fa9459Szrj(without the -m) enclosed in double quotes, @code{"push"}, or 204*a9fa9459Szrj@code{"pop"}. @code{.machine "push"} saves the currently selected 205*a9fa9459Szrjcpu, which may be restored with @code{.machine "pop"}. 206*a9fa9459Szrj@end table 207*a9fa9459Szrj 208*a9fa9459Szrj@node PowerPC-Syntax 209*a9fa9459Szrj@section PowerPC Syntax 210*a9fa9459Szrj@menu 211*a9fa9459Szrj* PowerPC-Chars:: Special Characters 212*a9fa9459Szrj@end menu 213*a9fa9459Szrj 214*a9fa9459Szrj@node PowerPC-Chars 215*a9fa9459Szrj@subsection Special Characters 216*a9fa9459Szrj 217*a9fa9459Szrj@cindex line comment character, PowerPC 218*a9fa9459Szrj@cindex PowerPC line comment character 219*a9fa9459SzrjThe presence of a @samp{#} on a line indicates the start of a comment 220*a9fa9459Szrjthat extends to the end of the current line. 221*a9fa9459Szrj 222*a9fa9459SzrjIf a @samp{#} appears as the first character of a line then the whole 223*a9fa9459Szrjline is treated as a comment, but in this case the line could also be 224*a9fa9459Szrja logical line number directive (@pxref{Comments}) or a preprocessor 225*a9fa9459Szrjcontrol command (@pxref{Preprocessing}). 226*a9fa9459Szrj 227*a9fa9459SzrjIf the assembler has been configured for the ppc-*-solaris* target 228*a9fa9459Szrjthen the @samp{!} character also acts as a line comment character. 229*a9fa9459SzrjThis can be disabled via the @option{-mno-solaris} command line 230*a9fa9459Szrjoption. 231*a9fa9459Szrj 232*a9fa9459Szrj@cindex line separator, PowerPC 233*a9fa9459Szrj@cindex statement separator, PowerPC 234*a9fa9459Szrj@cindex PowerPC line separator 235*a9fa9459SzrjThe @samp{;} character can be used to separate statements on the same 236*a9fa9459Szrjline. 237