c-ia64.texi 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. @c Copyright (C) 2002-2015 Free Software Foundation, Inc.
  2. @c Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
  3. @c This is part of the GAS manual.
  4. @c For copying conditions, see the file as.texinfo.
  5. @ifset GENERIC
  6. @page
  7. @node IA-64-Dependent
  8. @chapter IA-64 Dependent Features
  9. @end ifset
  10. @ifclear GENERIC
  11. @node Machine Dependencies
  12. @chapter IA-64 Dependent Features
  13. @end ifclear
  14. @cindex IA-64 support
  15. @menu
  16. * IA-64 Options:: Options
  17. * IA-64 Syntax:: Syntax
  18. @c * IA-64 Floating Point:: Floating Point // to be written
  19. @c * IA-64 Directives:: IA-64 Machine Directives // to be written
  20. * IA-64 Opcodes:: Opcodes
  21. @end menu
  22. @node IA-64 Options
  23. @section Options
  24. @cindex IA-64 options
  25. @cindex options for IA-64
  26. @table @option
  27. @cindex @code{-mconstant-gp} command line option, IA-64
  28. @item -mconstant-gp
  29. This option instructs the assembler to mark the resulting object file
  30. as using the ``constant GP'' model. With this model, it is assumed
  31. that the entire program uses a single global pointer (GP) value. Note
  32. that this option does not in any fashion affect the machine code
  33. emitted by the assembler. All it does is turn on the EF_IA_64_CONS_GP
  34. flag in the ELF file header.
  35. @item -mauto-pic
  36. This option instructs the assembler to mark the resulting object file
  37. as using the ``constant GP without function descriptor'' data model.
  38. This model is like the ``constant GP'' model, except that it
  39. additionally does away with function descriptors. What this means is
  40. that the address of a function refers directly to the function's code
  41. entry-point. Normally, such an address would refer to a function
  42. descriptor, which contains both the code entry-point and the GP-value
  43. needed by the function. Note that this option does not in any fashion
  44. affect the machine code emitted by the assembler. All it does is
  45. turn on the EF_IA_64_NOFUNCDESC_CONS_GP flag in the ELF file header.
  46. @item -milp32
  47. @itemx -milp64
  48. @itemx -mlp64
  49. @itemx -mp64
  50. These options select the data model. The assembler defaults to @code{-mlp64}
  51. (LP64 data model).
  52. @item -mle
  53. @itemx -mbe
  54. These options select the byte order. The @code{-mle} option selects little-endian
  55. byte order (default) and @code{-mbe} selects big-endian byte order. Note that
  56. IA-64 machine code always uses little-endian byte order.
  57. @item -mtune=itanium1
  58. @itemx -mtune=itanium2
  59. Tune for a particular IA-64 CPU, @var{itanium1} or @var{itanium2}. The
  60. default is @var{itanium2}.
  61. @item -munwind-check=warning
  62. @itemx -munwind-check=error
  63. These options control what the assembler will do when performing
  64. consistency checks on unwind directives. @code{-munwind-check=warning}
  65. will make the assembler issue a warning when an unwind directive check
  66. fails. This is the default. @code{-munwind-check=error} will make the
  67. assembler issue an error when an unwind directive check fails.
  68. @item -mhint.b=ok
  69. @itemx -mhint.b=warning
  70. @itemx -mhint.b=error
  71. These options control what the assembler will do when the @samp{hint.b}
  72. instruction is used. @code{-mhint.b=ok} will make the assembler accept
  73. @samp{hint.b}. @code{-mint.b=warning} will make the assembler issue a
  74. warning when @samp{hint.b} is used. @code{-mhint.b=error} will make
  75. the assembler treat @samp{hint.b} as an error, which is the default.
  76. @item -x
  77. @itemx -xexplicit
  78. These options turn on dependency violation checking.
  79. @item -xauto
  80. This option instructs the assembler to automatically insert stop bits where necessary
  81. to remove dependency violations. This is the default mode.
  82. @item -xnone
  83. This option turns off dependency violation checking.
  84. @item -xdebug
  85. This turns on debug output intended to help tracking down bugs in the dependency
  86. violation checker.
  87. @item -xdebugn
  88. This is a shortcut for -xnone -xdebug.
  89. @item -xdebugx
  90. This is a shortcut for -xexplicit -xdebug.
  91. @end table
  92. @cindex IA-64 Syntax
  93. @node IA-64 Syntax
  94. @section Syntax
  95. The assembler syntax closely follows the IA-64 Assembly Language
  96. Reference Guide.
  97. @menu
  98. * IA-64-Chars:: Special Characters
  99. * IA-64-Regs:: Register Names
  100. * IA-64-Bits:: Bit Names
  101. * IA-64-Relocs:: Relocations
  102. @end menu
  103. @node IA-64-Chars
  104. @subsection Special Characters
  105. @cindex line comment character, IA-64
  106. @cindex IA-64 line comment character
  107. @samp{//} is the line comment token.
  108. @cindex line separator, IA-64
  109. @cindex statement separator, IA-64
  110. @cindex IA-64 line separator
  111. @samp{;} can be used instead of a newline to separate statements.
  112. @node IA-64-Regs
  113. @subsection Register Names
  114. @cindex IA-64 registers
  115. @cindex register names, IA-64
  116. The 128 integer registers are referred to as @samp{r@var{n}}.
  117. The 128 floating-point registers are referred to as @samp{f@var{n}}.
  118. The 128 application registers are referred to as @samp{ar@var{n}}.
  119. The 128 control registers are referred to as @samp{cr@var{n}}.
  120. The 64 one-bit predicate registers are referred to as @samp{p@var{n}}.
  121. The 8 branch registers are referred to as @samp{b@var{n}}.
  122. In addition, the assembler defines a number of aliases:
  123. @samp{gp} (@samp{r1}), @samp{sp} (@samp{r12}), @samp{rp} (@samp{b0}),
  124. @samp{ret0} (@samp{r8}), @samp{ret1} (@samp{r9}), @samp{ret2} (@samp{r10}),
  125. @samp{ret3} (@samp{r9}), @samp{farg@var{n}} (@samp{f8+@var{n}}), and
  126. @samp{fret@var{n}} (@samp{f8+@var{n}}).
  127. For convenience, the assembler also defines aliases for all named application
  128. and control registers. For example, @samp{ar.bsp} refers to the register
  129. backing store pointer (@samp{ar17}). Similarly, @samp{cr.eoi} refers to
  130. the end-of-interrupt register (@samp{cr67}).
  131. @node IA-64-Bits
  132. @subsection IA-64 Processor-Status-Register (PSR) Bit Names
  133. @cindex IA-64 Processor-status-Register bit names
  134. @cindex PSR bits
  135. @cindex bit names, IA-64
  136. The assembler defines bit masks for each of the bits in the IA-64
  137. processor status register. For example, @samp{psr.ic} corresponds to
  138. a value of 0x2000. These masks are primarily intended for use with
  139. the @samp{ssm}/@samp{sum} and @samp{rsm}/@samp{rum}
  140. instructions, but they can be used anywhere else where an integer
  141. constant is expected.
  142. @node IA-64-Relocs
  143. @subsection Relocations
  144. @cindex IA-64 relocations
  145. In addition to the standard IA-64 relocations, the following relocations are
  146. implemented by @code{@value{AS}}:
  147. @table @code
  148. @item @@slotcount(@var{V})
  149. Convert the address offset @var{V} into a slot count. This pseudo
  150. function is available only on VMS. The expression @var{V} must be
  151. known at assembly time: it can't reference undefined symbols or symbols in
  152. different sections.
  153. @end table
  154. @node IA-64 Opcodes
  155. @section Opcodes
  156. For detailed information on the IA-64 machine instruction set, see the
  157. @c Attempt to work around a very overfull hbox.
  158. @iftex
  159. IA-64 Assembly Language Reference Guide available at
  160. @smallfonts
  161. @example
  162. http://developer.intel.com/design/itanium/arch_spec.htm
  163. @end example
  164. @textfonts
  165. @end iftex
  166. @ifnottex
  167. @uref{http://developer.intel.com/design/itanium/arch_spec.htm,IA-64 Architecture Handbook}.
  168. @end ifnottex