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