1218822Sdim@c Copyright 2002, 2003, 2005
2104834Sobrien@c Free Software Foundation, Inc.
3104834Sobrien@c   Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
4104834Sobrien@c This is part of the GAS manual.
5104834Sobrien@c For copying conditions, see the file as.texinfo.
6104834Sobrien
7104834Sobrien@ifset GENERIC
8104834Sobrien@page
9104834Sobrien@node IA-64-Dependent
10104834Sobrien@chapter IA-64 Dependent Features
11104834Sobrien@end ifset
12104834Sobrien
13104834Sobrien@ifclear GENERIC
14104834Sobrien@node Machine Dependencies
15104834Sobrien@chapter IA-64 Dependent Features
16104834Sobrien@end ifclear
17104834Sobrien
18104834Sobrien@cindex IA-64 support
19104834Sobrien@menu
20104834Sobrien* IA-64 Options::              Options
21104834Sobrien* IA-64 Syntax::               Syntax
22104834Sobrien@c * IA-64 Floating Point::       Floating Point		// to be written
23104834Sobrien@c * IA-64 Directives::           IA-64 Machine Directives	// to be written
24104834Sobrien* IA-64 Opcodes::              Opcodes
25104834Sobrien@end menu
26104834Sobrien
27104834Sobrien@node IA-64 Options
28104834Sobrien@section Options
29104834Sobrien@cindex IA-64 options
30104834Sobrien@cindex options for IA-64
31104834Sobrien
32104834Sobrien@table @option
33104834Sobrien@cindex @code{-mconstant-gp} command line option, IA-64
34104834Sobrien
35104834Sobrien@item -mconstant-gp
36104834SobrienThis option instructs the assembler to mark the resulting object file
37104834Sobrienas using the ``constant GP'' model.  With this model, it is assumed
38104834Sobrienthat the entire program uses a single global pointer (GP) value.  Note
39104834Sobrienthat this option does not in any fashion affect the machine code
40104834Sobrienemitted by the assembler.  All it does is turn on the EF_IA_64_CONS_GP
41104834Sobrienflag in the ELF file header.
42104834Sobrien
43104834Sobrien@item -mauto-pic
44104834SobrienThis option instructs the assembler to mark the resulting object file
45104834Sobrienas using the ``constant GP without function descriptor'' data model.
46104834SobrienThis model is like the ``constant GP'' model, except that it
47130561Sobrienadditionally does away with function descriptors.  What this means is
48104834Sobrienthat the address of a function refers directly to the function's code
49104834Sobrienentry-point.  Normally, such an address would refer to a function
50104834Sobriendescriptor, which contains both the code entry-point and the GP-value
51104834Sobrienneeded by the function.  Note that this option does not in any fashion
52104834Sobrienaffect the machine code emitted by the assembler.  All it does is
53104834Sobrienturn on the EF_IA_64_NOFUNCDESC_CONS_GP flag in the ELF file header.
54104834Sobrien
55104834Sobrien@item -milp32
56104834Sobrien@item -milp64
57104834Sobrien@item -mlp64
58104834Sobrien@item -mp64
59104834SobrienThese options select the data model.  The assembler defaults to @code{-mlp64}
60104834Sobrien(LP64 data model).
61104834Sobrien
62104834Sobrien@item -mle
63104834Sobrien@item -mbe
64104834SobrienThese options select the byte order.  The @code{-mle} option selects little-endian
65104834Sobrienbyte order (default) and @code{-mbe} selects big-endian byte order.  Note that
66104834SobrienIA-64 machine code always uses little-endian byte order.
67104834Sobrien
68218822Sdim@item -mtune=itanium1
69218822Sdim@item -mtune=itanium2
70218822SdimTune for a particular IA-64 CPU, @var{itanium1} or @var{itanium2}. The
71218822Sdimdefault is @var{itanium2}.
72218822Sdim
73218822Sdim@item -munwind-check=warning
74218822Sdim@item -munwind-check=error
75218822SdimThese options control what the assembler will do when performing
76218822Sdimconsistency checks on unwind directives.  @code{-munwind-check=warning}
77218822Sdimwill make the assembler issue a warning when an unwind directive check
78218822Sdimfails.  This is the default.  @code{-munwind-check=error} will make the
79218822Sdimassembler issue an error when an unwind directive check fails.
80218822Sdim
81218822Sdim@item -mhint.b=ok
82218822Sdim@item -mhint.b=warning
83218822Sdim@item -mhint.b=error
84218822SdimThese options control what the assembler will do when the @samp{hint.b}
85218822Sdiminstruction is used.  @code{-mhint.b=ok} will make the assembler accept
86218822Sdim@samp{hint.b}.  @code{-mint.b=warning} will make the assembler issue a
87218822Sdimwarning when @samp{hint.b} is used.  @code{-mhint.b=error} will make
88218822Sdimthe assembler treat @samp{hint.b} as an error, which is the default.
89218822Sdim
90104834Sobrien@item -x
91104834Sobrien@item -xexplicit
92218822SdimThese options turn on dependency violation checking.
93104834Sobrien
94104834Sobrien@item -xauto
95104834SobrienThis option instructs the assembler to automatically insert stop bits where necessary
96218822Sdimto remove dependency violations.  This is the default mode.
97104834Sobrien
98218822Sdim@item -xnone
99218822SdimThis option turns off dependency violation checking.
100218822Sdim
101104834Sobrien@item -xdebug
102104834SobrienThis turns on debug output intended to help tracking down bugs in the dependency
103104834Sobrienviolation checker.
104104834Sobrien
105218822Sdim@item -xdebugn
106218822SdimThis is a shortcut for -xnone -xdebug.
107218822Sdim
108218822Sdim@item -xdebugx
109218822SdimThis is a shortcut for -xexplicit -xdebug.
110218822Sdim
111104834Sobrien@end table
112104834Sobrien
113104834Sobrien@cindex IA-64 Syntax
114104834Sobrien@node IA-64 Syntax
115104834Sobrien@section Syntax
116104834SobrienThe assembler syntax closely follows the IA-64 Assembly Language
117104834SobrienReference Guide.
118104834Sobrien
119104834Sobrien@menu
120104834Sobrien* IA-64-Chars::                Special Characters
121104834Sobrien* IA-64-Regs::                 Register Names
122104834Sobrien* IA-64-Bits::                 Bit Names
123218822Sdim@c * IA-64-Relocs::               Relocations		// to be written
124104834Sobrien@end menu
125104834Sobrien
126104834Sobrien@node IA-64-Chars
127104834Sobrien@subsection Special Characters
128104834Sobrien
129104834Sobrien@cindex line comment character, IA-64
130104834Sobrien@cindex IA-64 line comment character
131104834Sobrien@samp{//} is the line comment token.
132104834Sobrien
133104834Sobrien@cindex line separator, IA-64
134104834Sobrien@cindex statement separator, IA-64
135104834Sobrien@cindex IA-64 line separator
136104834Sobrien@samp{;} can be used instead of a newline to separate statements.
137104834Sobrien
138104834Sobrien@node IA-64-Regs
139104834Sobrien@subsection Register Names
140104834Sobrien@cindex IA-64 registers
141104834Sobrien@cindex register names, IA-64
142104834Sobrien
143130561SobrienThe 128 integer registers are referred to as @samp{r@var{n}}.
144130561SobrienThe 128 floating-point registers are referred to as @samp{f@var{n}}.
145130561SobrienThe 128 application registers are referred to as @samp{ar@var{n}}.
146130561SobrienThe 128 control registers are referred to as @samp{cr@var{n}}.
147130561SobrienThe 64 one-bit predicate registers are referred to as @samp{p@var{n}}.
148130561SobrienThe 8 branch registers are referred to as @samp{b@var{n}}.
149104834SobrienIn addition, the assembler defines a number of aliases:
150104834Sobrien@samp{gp} (@samp{r1}), @samp{sp} (@samp{r12}), @samp{rp} (@samp{b0}),
151104834Sobrien@samp{ret0} (@samp{r8}), @samp{ret1} (@samp{r9}), @samp{ret2} (@samp{r10}),
152104834Sobrien@samp{ret3} (@samp{r9}), @samp{farg@var{n}} (@samp{f8+@var{n}}), and
153104834Sobrien@samp{fret@var{n}} (@samp{f8+@var{n}}).
154104834Sobrien
155104834SobrienFor convenience, the assembler also defines aliases for all named application
156104834Sobrienand control registers.  For example, @samp{ar.bsp} refers to the register
157104834Sobrienbacking store pointer (@samp{ar17}).  Similarly, @samp{cr.eoi} refers to
158104834Sobrienthe end-of-interrupt register (@samp{cr67}).
159104834Sobrien
160104834Sobrien@node IA-64-Bits
161104834Sobrien@subsection IA-64 Processor-Status-Register (PSR) Bit Names
162104834Sobrien@cindex IA-64 Processor-status-Register bit names
163104834Sobrien@cindex PSR bits
164104834Sobrien@cindex bit names, IA-64
165104834Sobrien
166104834SobrienThe assembler defines bit masks for each of the bits in the IA-64
167104834Sobrienprocessor status register.  For example, @samp{psr.ic} corresponds to
168104834Sobriena value of 0x2000.  These masks are primarily intended for use with
169218822Sdimthe @samp{ssm}/@samp{sum} and @samp{rsm}/@samp{rum}
170104834Sobrieninstructions, but they can be used anywhere else where an integer
171104834Sobrienconstant is expected.
172104834Sobrien
173104834Sobrien@node IA-64 Opcodes
174104834Sobrien@section Opcodes
175104834SobrienFor detailed information on the IA-64 machine instruction set, see the
176104834Sobrien@c Attempt to work around a very overfull hbox.
177104834Sobrien@iftex
178104834SobrienIA-64 Assembly Language Reference Guide available at
179104834Sobrien@smallfonts
180104834Sobrien@example
181104834Sobrienhttp://developer.intel.com/design/itanium/arch_spec.htm
182104834Sobrien@end example
183104834Sobrien@textfonts
184104834Sobrien@end iftex
185104834Sobrien@ifnottex
186104834Sobrien@uref{http://developer.intel.com/design/itanium/arch_spec.htm,IA-64 Architecture Handbook}.
187104834Sobrien@end ifnottex
188