1 @c Copyright 2002, 2003, 2005
2 @c Free Software Foundation, Inc.
3 @c Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
4 @c This is part of the GAS manual.
5 @c For copying conditions, see the file as.texinfo.
10 @chapter IA-64 Dependent Features
14 @node Machine Dependencies
15 @chapter IA-64 Dependent Features
20 * IA-64 Options:: Options
21 * IA-64 Syntax:: Syntax
22 @c * IA-64 Floating Point:: Floating Point // to be written
23 @c * IA-64 Directives:: IA-64 Machine Directives // to be written
24 * IA-64 Opcodes:: Opcodes
30 @cindex options for IA-64
33 @cindex @code{-mconstant-gp} command line option, IA-64
36 This option instructs the assembler to mark the resulting object file
37 as using the ``constant GP'' model. With this model, it is assumed
38 that the entire program uses a single global pointer (GP) value. Note
39 that this option does not in any fashion affect the machine code
40 emitted by the assembler. All it does is turn on the EF_IA_64_CONS_GP
41 flag in the ELF file header.
44 This option instructs the assembler to mark the resulting object file
45 as using the ``constant GP without function descriptor'' data model.
46 This model is like the ``constant GP'' model, except that it
47 additionally does away with function descriptors. What this means is
48 that the address of a function refers directly to the function's code
49 entry-point. Normally, such an address would refer to a function
50 descriptor, which contains both the code entry-point and the GP-value
51 needed by the function. Note that this option does not in any fashion
52 affect the machine code emitted by the assembler. All it does is
53 turn on the EF_IA_64_NOFUNCDESC_CONS_GP flag in the ELF file header.
59 These options select the data model. The assembler defaults to @code{-mlp64}
64 These options select the byte order. The @code{-mle} option selects little-endian
65 byte order (default) and @code{-mbe} selects big-endian byte order. Note that
66 IA-64 machine code always uses little-endian byte order.
69 @itemx -mtune=itanium2
70 Tune for a particular IA-64 CPU, @var{itanium1} or @var{itanium2}. The
71 default is @var{itanium2}.
73 @item -munwind-check=warning
74 @itemx -munwind-check=error
75 These options control what the assembler will do when performing
76 consistency checks on unwind directives. @code{-munwind-check=warning}
77 will make the assembler issue a warning when an unwind directive check
78 fails. This is the default. @code{-munwind-check=error} will make the
79 assembler issue an error when an unwind directive check fails.
82 @itemx -mhint.b=warning
84 These options control what the assembler will do when the @samp{hint.b}
85 instruction is used. @code{-mhint.b=ok} will make the assembler accept
86 @samp{hint.b}. @code{-mint.b=warning} will make the assembler issue a
87 warning when @samp{hint.b} is used. @code{-mhint.b=error} will make
88 the assembler treat @samp{hint.b} as an error, which is the default.
92 These options turn on dependency violation checking.
95 This option instructs the assembler to automatically insert stop bits where necessary
96 to remove dependency violations. This is the default mode.
99 This option turns off dependency violation checking.
102 This turns on debug output intended to help tracking down bugs in the dependency
106 This is a shortcut for -xnone -xdebug.
109 This is a shortcut for -xexplicit -xdebug.
116 The assembler syntax closely follows the IA-64 Assembly Language
120 * IA-64-Chars:: Special Characters
121 * IA-64-Regs:: Register Names
122 * IA-64-Bits:: Bit Names
123 * IA-64-Relocs:: Relocations
127 @subsection Special Characters
129 @cindex line comment character, IA-64
130 @cindex IA-64 line comment character
131 @samp{//} is the line comment token.
133 @cindex line separator, IA-64
134 @cindex statement separator, IA-64
135 @cindex IA-64 line separator
136 @samp{;} can be used instead of a newline to separate statements.
139 @subsection Register Names
140 @cindex IA-64 registers
141 @cindex register names, IA-64
143 The 128 integer registers are referred to as @samp{r@var{n}}.
144 The 128 floating-point registers are referred to as @samp{f@var{n}}.
145 The 128 application registers are referred to as @samp{ar@var{n}}.
146 The 128 control registers are referred to as @samp{cr@var{n}}.
147 The 64 one-bit predicate registers are referred to as @samp{p@var{n}}.
148 The 8 branch registers are referred to as @samp{b@var{n}}.
149 In addition, the assembler defines a number of aliases:
150 @samp{gp} (@samp{r1}), @samp{sp} (@samp{r12}), @samp{rp} (@samp{b0}),
151 @samp{ret0} (@samp{r8}), @samp{ret1} (@samp{r9}), @samp{ret2} (@samp{r10}),
152 @samp{ret3} (@samp{r9}), @samp{farg@var{n}} (@samp{f8+@var{n}}), and
153 @samp{fret@var{n}} (@samp{f8+@var{n}}).
155 For convenience, the assembler also defines aliases for all named application
156 and control registers. For example, @samp{ar.bsp} refers to the register
157 backing store pointer (@samp{ar17}). Similarly, @samp{cr.eoi} refers to
158 the end-of-interrupt register (@samp{cr67}).
161 @subsection IA-64 Processor-Status-Register (PSR) Bit Names
162 @cindex IA-64 Processor-status-Register bit names
164 @cindex bit names, IA-64
166 The assembler defines bit masks for each of the bits in the IA-64
167 processor status register. For example, @samp{psr.ic} corresponds to
168 a value of 0x2000. These masks are primarily intended for use with
169 the @samp{ssm}/@samp{sum} and @samp{rsm}/@samp{rum}
170 instructions, but they can be used anywhere else where an integer
171 constant is expected.
174 @subsection Relocations
175 @cindex IA-64 relocations
177 In addition to the standard IA-64 relocations, the following relocations are
178 implemented by @code{@value{AS}}:
181 @item @@slotcount(@var{V})
182 Convert the address offset @var{V} into a slot count. This pseudo
183 function is available only on VMS. The expression @var{V} must be
184 known at assembly time: it can't reference undefined symbols or symbols in
190 For detailed information on the IA-64 machine instruction set, see the
191 @c Attempt to work around a very overfull hbox.
193 IA-64 Assembly Language Reference Guide available at
196 http://developer.intel.com/design/itanium/arch_spec.htm
201 @uref{http://developer.intel.com/design/itanium/arch_spec.htm,IA-64 Architecture Handbook}.