| 1 | @c Copyright 2002
|
|---|
| 2 | @c Free Software Foundation, Inc.
|
|---|
| 3 | @c This is part of the GAS manual.
|
|---|
| 4 | @c For copying conditions, see the file as.texinfo.
|
|---|
| 5 |
|
|---|
| 6 | @ifset GENERIC
|
|---|
| 7 | @page
|
|---|
| 8 | @node Alpha-Dependent
|
|---|
| 9 | @chapter Alpha Dependent Features
|
|---|
| 10 | @end ifset
|
|---|
| 11 |
|
|---|
| 12 | @ifclear GENERIC
|
|---|
| 13 | @node Machine Dependencies
|
|---|
| 14 | @chapter Alpha Dependent Features
|
|---|
| 15 | @end ifclear
|
|---|
| 16 |
|
|---|
| 17 | @cindex Alpha support
|
|---|
| 18 | @menu
|
|---|
| 19 | * Alpha Notes:: Notes
|
|---|
| 20 | * Alpha Options:: Options
|
|---|
| 21 | * Alpha Syntax:: Syntax
|
|---|
| 22 | * Alpha Floating Point:: Floating Point
|
|---|
| 23 | * Alpha Directives:: Alpha Machine Directives
|
|---|
| 24 | * Alpha Opcodes:: Opcodes
|
|---|
| 25 | @end menu
|
|---|
| 26 |
|
|---|
| 27 | @node Alpha Notes
|
|---|
| 28 | @section Notes
|
|---|
| 29 | @cindex Alpha notes
|
|---|
| 30 | @cindex notes for Alpha
|
|---|
| 31 |
|
|---|
| 32 | The documentation here is primarily for the ELF object format.
|
|---|
| 33 | @code{@value{AS}} also supports the ECOFF and EVAX formats, but
|
|---|
| 34 | features specific to these formats are not yet documented.
|
|---|
| 35 |
|
|---|
| 36 | @node Alpha Options
|
|---|
| 37 | @section Options
|
|---|
| 38 | @cindex Alpha options
|
|---|
| 39 | @cindex options for Alpha
|
|---|
| 40 |
|
|---|
| 41 | @table @option
|
|---|
| 42 | @cindex @code{-m@var{cpu}} command line option, Alpha
|
|---|
| 43 | @item -m@var{cpu}
|
|---|
| 44 | This option specifies the target processor. If an attempt is made to
|
|---|
| 45 | assemble an instruction which will not execute on the target processor,
|
|---|
| 46 | the assembler may either expand the instruction as a macro or issue an
|
|---|
| 47 | error message. This option is equivalent to the @code{.arch} directive.
|
|---|
| 48 |
|
|---|
| 49 | The following processor names are recognized:
|
|---|
| 50 | @code{21064},
|
|---|
| 51 | @code{21064a},
|
|---|
| 52 | @code{21066},
|
|---|
| 53 | @code{21068},
|
|---|
| 54 | @code{21164},
|
|---|
| 55 | @code{21164a},
|
|---|
| 56 | @code{21164pc},
|
|---|
| 57 | @code{21264},
|
|---|
| 58 | @code{21264a},
|
|---|
| 59 | @code{21264b},
|
|---|
| 60 | @code{ev4},
|
|---|
| 61 | @code{ev5},
|
|---|
| 62 | @code{lca45},
|
|---|
| 63 | @code{ev5},
|
|---|
| 64 | @code{ev56},
|
|---|
| 65 | @code{pca56},
|
|---|
| 66 | @code{ev6},
|
|---|
| 67 | @code{ev67},
|
|---|
| 68 | @code{ev68}.
|
|---|
| 69 | The special name @code{all} may be used to allow the assembler to accept
|
|---|
| 70 | instructions valid for any Alpha processor.
|
|---|
| 71 |
|
|---|
| 72 | In order to support existing practice in OSF/1 with respect to @code{.arch},
|
|---|
| 73 | and existing practice within @command{MILO} (the Linux ARC bootloader), the
|
|---|
| 74 | numbered processor names (e.g.@: 21064) enable the processor-specific PALcode
|
|---|
| 75 | instructions, while the ``electro-vlasic'' names (e.g.@: @code{ev4}) do not.
|
|---|
| 76 |
|
|---|
| 77 | @cindex @code{-mdebug} command line option, Alpha
|
|---|
| 78 | @cindex @code{-no-mdebug} command line option, Alpha
|
|---|
| 79 | @item -mdebug
|
|---|
| 80 | @itemx -no-mdebug
|
|---|
| 81 | Enables or disables the generation of @code{.mdebug} encapsulation for
|
|---|
| 82 | stabs directives and procedure descriptors. The default is to automatically
|
|---|
| 83 | enable @code{.mdebug} when the first stabs directive is seen.
|
|---|
| 84 |
|
|---|
| 85 | @cindex @code{-relax} command line option, Alpha
|
|---|
| 86 | @item -relax
|
|---|
| 87 | This option forces all relocations to be put into the object file, instead
|
|---|
| 88 | of saving space and resolving some relocations at assembly time. Note that
|
|---|
| 89 | this option does not propagate all symbol arithmetic into the object file,
|
|---|
| 90 | because not all symbol arithmetic can be represented. However, the option
|
|---|
| 91 | can still be useful in specific applications.
|
|---|
| 92 |
|
|---|
| 93 | @cindex @code{-g} command line option, Alpha
|
|---|
| 94 | @item -g
|
|---|
| 95 | This option is used when the compiler generates debug information. When
|
|---|
| 96 | @command{gcc} is using @command{mips-tfile} to generate debug
|
|---|
| 97 | information for ECOFF, local labels must be passed through to the object
|
|---|
| 98 | file. Otherwise this option has no effect.
|
|---|
| 99 |
|
|---|
| 100 | @cindex @code{-G} command line option, Alpha
|
|---|
| 101 | @item -G@var{size}
|
|---|
| 102 | A local common symbol larger than @var{size} is placed in @code{.bss},
|
|---|
| 103 | while smaller symbols are placed in @code{.sbss}.
|
|---|
| 104 |
|
|---|
| 105 | @cindex @code{-F} command line option, Alpha
|
|---|
| 106 | @cindex @code{-32addr} command line option, Alpha
|
|---|
| 107 | @item -F
|
|---|
| 108 | @itemx -32addr
|
|---|
| 109 | These options are ignored for backward compatibility.
|
|---|
| 110 | @end table
|
|---|
| 111 |
|
|---|
| 112 | @cindex Alpha Syntax
|
|---|
| 113 | @node Alpha Syntax
|
|---|
| 114 | @section Syntax
|
|---|
| 115 | The assembler syntax closely follow the Alpha Reference Manual;
|
|---|
| 116 | assembler directives and general syntax closely follow the OSF/1 and
|
|---|
| 117 | OpenVMS syntax, with a few differences for ELF.
|
|---|
| 118 |
|
|---|
| 119 | @menu
|
|---|
| 120 | * Alpha-Chars:: Special Characters
|
|---|
| 121 | * Alpha-Regs:: Register Names
|
|---|
| 122 | * Alpha-Relocs:: Relocations
|
|---|
| 123 | @end menu
|
|---|
| 124 |
|
|---|
| 125 | @node Alpha-Chars
|
|---|
| 126 | @subsection Special Characters
|
|---|
| 127 |
|
|---|
| 128 | @cindex line comment character, Alpha
|
|---|
| 129 | @cindex Alpha line comment character
|
|---|
| 130 | @samp{#} is the line comment character.
|
|---|
| 131 |
|
|---|
| 132 | @cindex line separator, Alpha
|
|---|
| 133 | @cindex statement separator, Alpha
|
|---|
| 134 | @cindex Alpha line separator
|
|---|
| 135 | @samp{;} can be used instead of a newline to separate statements.
|
|---|
| 136 |
|
|---|
| 137 | @node Alpha-Regs
|
|---|
| 138 | @subsection Register Names
|
|---|
| 139 | @cindex Alpha registers
|
|---|
| 140 | @cindex register names, Alpha
|
|---|
| 141 |
|
|---|
| 142 | The 32 integer registers are refered to as @samp{$@var{n}} or
|
|---|
| 143 | @samp{$r@var{n}}. In addition, registers 15, 28, 29, and 30 may
|
|---|
| 144 | be refered to by the symbols @samp{$fp}, @samp{$at}, @samp{$gp},
|
|---|
| 145 | and @samp{$sp} respectively.
|
|---|
| 146 |
|
|---|
| 147 | The 32 floating-point registers are refered to as @samp{$f@var{n}}.
|
|---|
| 148 |
|
|---|
| 149 | @node Alpha-Relocs
|
|---|
| 150 | @subsection Relocations
|
|---|
| 151 | @cindex Alpha relocations
|
|---|
| 152 | @cindex relocations, Alpha
|
|---|
| 153 |
|
|---|
| 154 | Some of these relocations are available for ECOFF, but mostly
|
|---|
| 155 | only for ELF. They are modeled after the relocation format
|
|---|
| 156 | introduced in Digial Unix 4.0, but there are additions.
|
|---|
| 157 |
|
|---|
| 158 | The format is @samp{!@var{tag}} or @samp{!@var{tag}!@var{number}}
|
|---|
| 159 | where @var{tag} is the name of the relocation. In some cases
|
|---|
| 160 | @var{number} is used to relate specific instructions.
|
|---|
| 161 |
|
|---|
| 162 | The relocation is placed at the end of the instruction like so:
|
|---|
| 163 |
|
|---|
| 164 | @example
|
|---|
| 165 | ldah $0,a($29) !gprelhigh
|
|---|
| 166 | lda $0,a($0) !gprellow
|
|---|
| 167 | ldq $1,b($29) !literal!100
|
|---|
| 168 | ldl $2,0($1) !lituse_base!100
|
|---|
| 169 | @end example
|
|---|
| 170 |
|
|---|
| 171 | @table @code
|
|---|
| 172 | @item !literal
|
|---|
| 173 | @itemx !literal!@var{N}
|
|---|
| 174 | Used with an @code{ldq} instruction to load the address of a symbol
|
|---|
| 175 | from the GOT.
|
|---|
|
|---|