c-ppc.texi 5.6 KB

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