c-ia64.texi revision 104834
1251881Speter@c Copyright 2002 2251881Speter@c Free Software Foundation, Inc. 3251881Speter@c Contributed by David Mosberger-Tang <davidm@hpl.hp.com> 4251881Speter@c This is part of the GAS manual. 5251881Speter@c For copying conditions, see the file as.texinfo. 6251881Speter 7251881Speter@ifset GENERIC 8251881Speter@page 9251881Speter@node IA-64-Dependent 10251881Speter@chapter IA-64 Dependent Features 11251881Speter@end ifset 12251881Speter 13251881Speter@ifclear GENERIC 14251881Speter@node Machine Dependencies 15251881Speter@chapter IA-64 Dependent Features 16251881Speter@end ifclear 17251881Speter 18251881Speter@cindex IA-64 support 19251881Speter@menu 20251881Speter* IA-64 Options:: Options 21251881Speter* IA-64 Syntax:: Syntax 22251881Speter@c * IA-64 Floating Point:: Floating Point // to be written 23251881Speter@c * IA-64 Directives:: IA-64 Machine Directives // to be written 24251881Speter* IA-64 Opcodes:: Opcodes 25251881Speter@end menu 26251881Speter 27251881Speter@node IA-64 Options 28251881Speter@section Options 29251881Speter@cindex IA-64 options 30251881Speter@cindex options for IA-64 31251881Speter 32251881Speter@table @option 33251881Speter@cindex @code{-mconstant-gp} command line option, IA-64 34251881Speter 35251881Speter@item -mconstant-gp 36251881SpeterThis option instructs the assembler to mark the resulting object file 37251881Speteras using the ``constant GP'' model. With this model, it is assumed 38251881Speterthat the entire program uses a single global pointer (GP) value. Note 39251881Speterthat this option does not in any fashion affect the machine code 40251881Speteremitted by the assembler. All it does is turn on the EF_IA_64_CONS_GP 41251881Speterflag in the ELF file header. 42251881Speter 43251881Speter@item -mauto-pic 44251881SpeterThis option instructs the assembler to mark the resulting object file 45251881Speteras using the ``constant GP without function descriptor'' data model. 46251881SpeterThis model is like the ``constant GP'' model, except that it 47251881Speteradditionaly does away with function descriptors. What this means is 48251881Speterthat the address of a function refers directly to the function's code 49251881Speterentry-point. Normally, such an address would refer to a function 50251881Speterdescriptor, which contains both the code entry-point and the GP-value 51251881Speterneeded by the function. Note that this option does not in any fashion 52251881Speteraffect the machine code emitted by the assembler. All it does is 53251881Speterturn on the EF_IA_64_NOFUNCDESC_CONS_GP flag in the ELF file header. 54251881Speter 55251881Speter@item -milp32 56251881Speter@item -milp64 57251881Speter@item -mlp64 58251881Speter@item -mp64 59251881SpeterThese options select the data model. The assembler defaults to @code{-mlp64} 60251881Speter(LP64 data model). 61251881Speter 62251881Speter@item -mle 63251881Speter@item -mbe 64251881SpeterThese options select the byte order. The @code{-mle} option selects little-endian 65251881Speterbyte order (default) and @code{-mbe} selects big-endian byte order. Note that 66251881SpeterIA-64 machine code always uses little-endian byte order. 67251881Speter 68251881Speter@item -x 69251881Speter@item -xexplicit 70251881SpeterThese options turn on dependency violation checking. This checking is turned on by 71251881Speterdefault. 72251881Speter 73251881Speter@item -xauto 74251881SpeterThis option instructs the assembler to automatically insert stop bits where necessary 75251881Speterto remove dependency violations. 76251881Speter 77251881Speter@item -xdebug 78251881SpeterThis turns on debug output intended to help tracking down bugs in the dependency 79251881Speterviolation checker. 80251881Speter 81251881Speter@end table 82251881Speter 83251881Speter@cindex IA-64 Syntax 84251881Speter@node IA-64 Syntax 85251881Speter@section Syntax 86251881SpeterThe assembler syntax closely follows the IA-64 Assembly Language 87251881SpeterReference Guide. 88251881Speter 89251881Speter@menu 90251881Speter* IA-64-Chars:: Special Characters 91251881Speter* IA-64-Regs:: Register Names 92251881Speter* IA-64-Bits:: Bit Names 93251881Speter* IA-64-Relocs:: Relocations 94251881Speter@end menu 95251881Speter 96251881Speter@node IA-64-Chars 97251881Speter@subsection Special Characters 98251881Speter 99251881Speter@cindex line comment character, IA-64 100251881Speter@cindex IA-64 line comment character 101251881Speter@samp{//} is the line comment token. 102251881Speter 103251881Speter@cindex line separator, IA-64 104251881Speter@cindex statement separator, IA-64 105251881Speter@cindex IA-64 line separator 106251881Speter@samp{;} can be used instead of a newline to separate statements. 107251881Speter 108251881Speter@node IA-64-Regs 109251881Speter@subsection Register Names 110251881Speter@cindex IA-64 registers 111251881Speter@cindex register names, IA-64 112251881Speter 113251881SpeterThe 128 integer registers are refered to as @samp{r@var{n}}. 114251881SpeterThe 128 floating-point registers are refered to as @samp{f@var{n}}. 115251881SpeterThe 128 application registers are refered to as @samp{ar@var{n}}. 116251881SpeterThe 128 control registers are refered to as @samp{cr@var{n}}. 117251881SpeterThe 64 one-bit predicate registers are refered to as @samp{p@var{n}}. 118251881SpeterThe 8 branch registers are refered to as @samp{b@var{n}}. 119251881SpeterIn addition, the assembler defines a number of aliases: 120251881Speter@samp{gp} (@samp{r1}), @samp{sp} (@samp{r12}), @samp{rp} (@samp{b0}), 121251881Speter@samp{ret0} (@samp{r8}), @samp{ret1} (@samp{r9}), @samp{ret2} (@samp{r10}), 122251881Speter@samp{ret3} (@samp{r9}), @samp{farg@var{n}} (@samp{f8+@var{n}}), and 123251881Speter@samp{fret@var{n}} (@samp{f8+@var{n}}). 124251881Speter 125251881SpeterFor convenience, the assembler also defines aliases for all named application 126251881Speterand control registers. For example, @samp{ar.bsp} refers to the register 127251881Speterbacking store pointer (@samp{ar17}). Similarly, @samp{cr.eoi} refers to 128251881Speterthe end-of-interrupt register (@samp{cr67}). 129251881Speter 130251881Speter@node IA-64-Bits 131251881Speter@subsection IA-64 Processor-Status-Register (PSR) Bit Names 132251881Speter@cindex IA-64 Processor-status-Register bit names 133251881Speter@cindex PSR bits 134251881Speter@cindex bit names, IA-64 135251881Speter 136251881SpeterThe assembler defines bit masks for each of the bits in the IA-64 137251881Speterprocessor status register. For example, @samp{psr.ic} corresponds to 138251881Spetera value of 0x2000. These masks are primarily intended for use with 139251881Speterthe @sample{ssm}/@sample{sum} and @sample{rsm}/@sample{rum} 140251881Speterinstructions, but they can be used anywhere else where an integer 141251881Speterconstant is expected. 142251881Speter 143251881Speter@node IA-64 Opcodes 144251881Speter@section Opcodes 145251881SpeterFor detailed information on the IA-64 machine instruction set, see the 146251881Speter@c Attempt to work around a very overfull hbox. 147251881Speter@iftex 148251881SpeterIA-64 Assembly Language Reference Guide available at 149251881Speter@smallfonts 150251881Speter@example 151251881Speterhttp://developer.intel.com/design/itanium/arch_spec.htm 152251881Speter@end example 153251881Speter@textfonts 154251881Speter@end iftex 155251881Speter@ifnottex 156251881Speter@uref{http://developer.intel.com/design/itanium/arch_spec.htm,IA-64 Architecture Handbook}. 157@end ifnottex 158