2011-01-18 14:37:39 +01:00
|
|
|
@c Copyright 2002, 2003, 2005, 2009, 2011
|
2002-02-11 00:25:17 +01:00
|
|
|
@c Free Software Foundation, Inc.
|
|
|
|
@c This is part of the GAS manual.
|
|
|
|
@c For copying conditions, see the file as.texinfo.
|
2010-11-22 23:11:52 +01:00
|
|
|
@c man end
|
2002-02-11 00:25:17 +01:00
|
|
|
|
|
|
|
@ifset GENERIC
|
|
|
|
@page
|
|
|
|
@node Alpha-Dependent
|
|
|
|
@chapter Alpha Dependent Features
|
|
|
|
@end ifset
|
|
|
|
|
|
|
|
@ifclear GENERIC
|
|
|
|
@node Machine Dependencies
|
|
|
|
@chapter Alpha Dependent Features
|
|
|
|
@end ifclear
|
|
|
|
|
|
|
|
@cindex Alpha support
|
|
|
|
@menu
|
|
|
|
* Alpha Notes:: Notes
|
|
|
|
* Alpha Options:: Options
|
|
|
|
* Alpha Syntax:: Syntax
|
|
|
|
* Alpha Floating Point:: Floating Point
|
|
|
|
* Alpha Directives:: Alpha Machine Directives
|
|
|
|
* Alpha Opcodes:: Opcodes
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node Alpha Notes
|
|
|
|
@section Notes
|
|
|
|
@cindex Alpha notes
|
|
|
|
@cindex notes for Alpha
|
|
|
|
|
|
|
|
The documentation here is primarily for the ELF object format.
|
|
|
|
@code{@value{AS}} also supports the ECOFF and EVAX formats, but
|
|
|
|
features specific to these formats are not yet documented.
|
|
|
|
|
|
|
|
@node Alpha Options
|
|
|
|
@section Options
|
|
|
|
@cindex Alpha options
|
|
|
|
@cindex options for Alpha
|
|
|
|
|
2010-11-22 23:11:52 +01:00
|
|
|
@c man begin OPTIONS
|
|
|
|
@table @gcctabopt
|
2002-02-11 00:25:17 +01:00
|
|
|
@cindex @code{-m@var{cpu}} command line option, Alpha
|
|
|
|
@item -m@var{cpu}
|
|
|
|
This option specifies the target processor. If an attempt is made to
|
|
|
|
assemble an instruction which will not execute on the target processor,
|
|
|
|
the assembler may either expand the instruction as a macro or issue an
|
|
|
|
error message. This option is equivalent to the @code{.arch} directive.
|
|
|
|
|
|
|
|
The following processor names are recognized:
|
|
|
|
@code{21064},
|
|
|
|
@code{21064a},
|
|
|
|
@code{21066},
|
|
|
|
@code{21068},
|
|
|
|
@code{21164},
|
|
|
|
@code{21164a},
|
|
|
|
@code{21164pc},
|
|
|
|
@code{21264},
|
2002-08-07 00:06:08 +02:00
|
|
|
@code{21264a},
|
|
|
|
@code{21264b},
|
2002-02-11 00:25:17 +01:00
|
|
|
@code{ev4},
|
|
|
|
@code{ev5},
|
|
|
|
@code{lca45},
|
|
|
|
@code{ev5},
|
|
|
|
@code{ev56},
|
|
|
|
@code{pca56},
|
2002-08-07 00:06:08 +02:00
|
|
|
@code{ev6},
|
|
|
|
@code{ev67},
|
|
|
|
@code{ev68}.
|
2002-02-11 00:25:17 +01:00
|
|
|
The special name @code{all} may be used to allow the assembler to accept
|
|
|
|
instructions valid for any Alpha processor.
|
|
|
|
|
|
|
|
In order to support existing practice in OSF/1 with respect to @code{.arch},
|
|
|
|
and existing practice within @command{MILO} (the Linux ARC bootloader), the
|
|
|
|
numbered processor names (e.g.@: 21064) enable the processor-specific PALcode
|
|
|
|
instructions, while the ``electro-vlasic'' names (e.g.@: @code{ev4}) do not.
|
|
|
|
|
|
|
|
@cindex @code{-mdebug} command line option, Alpha
|
|
|
|
@cindex @code{-no-mdebug} command line option, Alpha
|
|
|
|
@item -mdebug
|
|
|
|
@itemx -no-mdebug
|
|
|
|
Enables or disables the generation of @code{.mdebug} encapsulation for
|
|
|
|
stabs directives and procedure descriptors. The default is to automatically
|
|
|
|
enable @code{.mdebug} when the first stabs directive is seen.
|
|
|
|
|
|
|
|
@cindex @code{-relax} command line option, Alpha
|
|
|
|
@item -relax
|
|
|
|
This option forces all relocations to be put into the object file, instead
|
|
|
|
of saving space and resolving some relocations at assembly time. Note that
|
|
|
|
this option does not propagate all symbol arithmetic into the object file,
|
|
|
|
because not all symbol arithmetic can be represented. However, the option
|
|
|
|
can still be useful in specific applications.
|
|
|
|
|
2009-03-03 Tristan Gingold <gingold@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
Douglas B Rupp <rupp@gnat.com>
* doc/as.texinfo (Overview): Mention -replace/-noreplace options
for Alpha.
* doc/c-alpha.texi (Alpha Options): Document -replace/-noreplace.
* config/tc-alpha.h (TC_VALIDATE_FIX_SUB): Define to 1 (evax).
(OBJ_SYMFIELD_TYPE): Remove.
(tc_canonicalize_symbol_name): Define to evax_shorten_name.
(TC_IMPLICIT_LCOMM_ALIGNMENT): For alignment to 3 on evax.
(tc_frob_file_before_fix): Do not defined on evax.
* config/tc-alpha.c: Always includes dwarf2dbg.h.
Include vms.h if OBJ_EVAX.
(struct alpha_fixup): Add xtrasym and procsym (evax only).
(enum alpha_macro_arg): Remove trailing comma.
(md_longopts): Add replace and noreplace arguments (evax only).
(alpha_evax_proc_hash): New variable.
(alpha_link_section): Make it global.
(alpha_ctors_section, alpha_dtors_section): Removed.
(alpha_ctors_symbol, alpha_dtors_symbol): Ditto.
(alpha_lit8_section): Ifndef'ed on evax.
(alpha_lit8_symbol): Ditto.
(alpha_prologue_label): New variable.
(alpha_linkage_symbol): New variable (evax only).
(alpha_flag_replace): Ditto.
(struct alpha_evax_procs): Add handler and handler_data field.
(alpha_evax_proc): Now of type pointer.
(alpha_linkage_fixup_root, alpha_linkage_fixup_tail): New variables.
(struct alpha_reloc_tag): Add sym and psym fields (evax only).
(get_alpha_reloc_tag): Initialize sym and psym fields (evax only).
(alpha_adjust_relocs): Ifndef'ed on evax.
(load_expression): Add opname argument.
Implement LDA/BSR optimization for evax.
(emit_lda): Adjust for new prototype of load_expression.
(emit_ir_load): Ditto. Do not nothing for GP if ..lk symbols.
(emit_loadstore): Likewise.
(emit_ldXu): Likewise.
(emit_stX): Likewise.
(emit_jsrjmp): Likewise. Implement LDA/BSR optimization for evax.
(emit_ldgp): Avoid warning in evax case.
(add_to_link_pool): Make it static. Return symbolic expression rather
than number expression for the offset.
(s_alpha_text): Create .text symbol for evax if not already created.
(s_alpha_comm): Do not create specific section for common symbol.
Fill common area with zeros for evax.
(s_alpha_prologue): Create alpha_prologue_label.
(s_alpha_section_name): New function (evax).
(s_alpha_section_word): Likewise.
(section_name): New static variabke moved out from ...
(s_alpha_section): ... here. Create new sections on demand.
(s_alpha_literals): New function (evax).
(s_alpha_ent): Create alpha_evax_proc instance and insert it in the
alpha_evax_proc_hash table.
(s_alpha_handler): New function (evax).
(s_alpha_frame): Adjust for new type of alpha_evax_proc.
(s_alpha_prologue): New function (evax).
(s_alpha_pdesc): Adjust for new type of alpha_evax_proc and new
handling of procedures with hash table.
Add support for condition handlers.
(s_alpha_linkage): Create linkage_fixup instance and chain it.
(s_alpha_fp_save): Adjust for new type of alpha_evax_proc.
(s_alpha_mask): Likewise.
(s_alpha_fmask): Likewise.
(s_alpha_end): Clear alpha_evax_proc.
(s_alpha_align): Increase max_alignment to 16.
(alpha_print_token): Call print_expr_1 instead of print_expr.
(md_pseudo_table): Add "section", "literals", "handler" and
"handler_data" (evax). Do not ignore "prologue" on evax.
Fix indentation.
(md_begin): Create hash table for alpha_evax_proc_hash.
(md_parse_option): Handle OPTION_REPLACE and OPTION_NOREPLACE.
(md_show_usage): Mention -replace/-noreplace for evax.
(md_apply_fix): Handle evax relocs (_NOP, _LDA, _BSR and _BOH).
(alpha_force_relocation): Likewise.
(alpha_fix_adjustable): Likewise. Add BFD_RELOC_16 case.
(tc_gen_reloc): Likewise. Add BFD_RELOC_ALPHA_LINKAGE for evax.
(emit_insn): New cases for evax specific relocs.
(assemble_insn): Fix indentation.
Take care of -MDISP in operand table.
* config/obj-evax.h (struct alpha_linkage_fixups): New struct.
(OBJ_SYMFIELD_TYPE): New macro.
(obj_symbol_new_hook): Define.
(obj_frob_symbol, obj_frob_file_before_adjust): Ditto.
(obj_frob_file_before_fix): Ditto.
(PDSC_S_M_HANDLER_VALID): New macro.
(PDSC_S_M_HANDLER_DATA_VALID): Ditto.
(TC_IMPLICIT_LCOMM_ALIGNMENT): Remove.
Add prototypes for functions declared in obj-evax.c
* config/obj-evax.c: Include subsegs.h, struc-symbol.h, safe-ctype.h.
(s_evax_weak): Convert to ansi-C.
(evax_symbol_new_hook): New function.
(evax_frob_symbol): Ditto.
(evax_frob_file_before_adjust): Ditto.
(evax_frob_file_before_fix): Ditto.
(evax_shorten_name): Ditto.
(crc32): Ditto.
(encode_32): Ditto.
(encode_16): Ditto.
(decode_16): Ditto.
(shorten_identifier): Ditto.
(is_truncated_identifier): Ditto.
* dwarf2dbg.c (out_debug_info): Do not append trailing slash on VMS.
* as.c (close_output_file): Remove #ifndef OBJ_VMS.
(main): Ditto.
2009-03-03 11:04:58 +01:00
|
|
|
@cindex @code{-replace} command line option, Alpha
|
|
|
|
@cindex @code{-noreplace} command line option, Alpha
|
|
|
|
@item -replace
|
2010-06-21 12:49:41 +02:00
|
|
|
@itemx -noreplace
|
2009-03-03 Tristan Gingold <gingold@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
Douglas B Rupp <rupp@gnat.com>
* doc/as.texinfo (Overview): Mention -replace/-noreplace options
for Alpha.
* doc/c-alpha.texi (Alpha Options): Document -replace/-noreplace.
* config/tc-alpha.h (TC_VALIDATE_FIX_SUB): Define to 1 (evax).
(OBJ_SYMFIELD_TYPE): Remove.
(tc_canonicalize_symbol_name): Define to evax_shorten_name.
(TC_IMPLICIT_LCOMM_ALIGNMENT): For alignment to 3 on evax.
(tc_frob_file_before_fix): Do not defined on evax.
* config/tc-alpha.c: Always includes dwarf2dbg.h.
Include vms.h if OBJ_EVAX.
(struct alpha_fixup): Add xtrasym and procsym (evax only).
(enum alpha_macro_arg): Remove trailing comma.
(md_longopts): Add replace and noreplace arguments (evax only).
(alpha_evax_proc_hash): New variable.
(alpha_link_section): Make it global.
(alpha_ctors_section, alpha_dtors_section): Removed.
(alpha_ctors_symbol, alpha_dtors_symbol): Ditto.
(alpha_lit8_section): Ifndef'ed on evax.
(alpha_lit8_symbol): Ditto.
(alpha_prologue_label): New variable.
(alpha_linkage_symbol): New variable (evax only).
(alpha_flag_replace): Ditto.
(struct alpha_evax_procs): Add handler and handler_data field.
(alpha_evax_proc): Now of type pointer.
(alpha_linkage_fixup_root, alpha_linkage_fixup_tail): New variables.
(struct alpha_reloc_tag): Add sym and psym fields (evax only).
(get_alpha_reloc_tag): Initialize sym and psym fields (evax only).
(alpha_adjust_relocs): Ifndef'ed on evax.
(load_expression): Add opname argument.
Implement LDA/BSR optimization for evax.
(emit_lda): Adjust for new prototype of load_expression.
(emit_ir_load): Ditto. Do not nothing for GP if ..lk symbols.
(emit_loadstore): Likewise.
(emit_ldXu): Likewise.
(emit_stX): Likewise.
(emit_jsrjmp): Likewise. Implement LDA/BSR optimization for evax.
(emit_ldgp): Avoid warning in evax case.
(add_to_link_pool): Make it static. Return symbolic expression rather
than number expression for the offset.
(s_alpha_text): Create .text symbol for evax if not already created.
(s_alpha_comm): Do not create specific section for common symbol.
Fill common area with zeros for evax.
(s_alpha_prologue): Create alpha_prologue_label.
(s_alpha_section_name): New function (evax).
(s_alpha_section_word): Likewise.
(section_name): New static variabke moved out from ...
(s_alpha_section): ... here. Create new sections on demand.
(s_alpha_literals): New function (evax).
(s_alpha_ent): Create alpha_evax_proc instance and insert it in the
alpha_evax_proc_hash table.
(s_alpha_handler): New function (evax).
(s_alpha_frame): Adjust for new type of alpha_evax_proc.
(s_alpha_prologue): New function (evax).
(s_alpha_pdesc): Adjust for new type of alpha_evax_proc and new
handling of procedures with hash table.
Add support for condition handlers.
(s_alpha_linkage): Create linkage_fixup instance and chain it.
(s_alpha_fp_save): Adjust for new type of alpha_evax_proc.
(s_alpha_mask): Likewise.
(s_alpha_fmask): Likewise.
(s_alpha_end): Clear alpha_evax_proc.
(s_alpha_align): Increase max_alignment to 16.
(alpha_print_token): Call print_expr_1 instead of print_expr.
(md_pseudo_table): Add "section", "literals", "handler" and
"handler_data" (evax). Do not ignore "prologue" on evax.
Fix indentation.
(md_begin): Create hash table for alpha_evax_proc_hash.
(md_parse_option): Handle OPTION_REPLACE and OPTION_NOREPLACE.
(md_show_usage): Mention -replace/-noreplace for evax.
(md_apply_fix): Handle evax relocs (_NOP, _LDA, _BSR and _BOH).
(alpha_force_relocation): Likewise.
(alpha_fix_adjustable): Likewise. Add BFD_RELOC_16 case.
(tc_gen_reloc): Likewise. Add BFD_RELOC_ALPHA_LINKAGE for evax.
(emit_insn): New cases for evax specific relocs.
(assemble_insn): Fix indentation.
Take care of -MDISP in operand table.
* config/obj-evax.h (struct alpha_linkage_fixups): New struct.
(OBJ_SYMFIELD_TYPE): New macro.
(obj_symbol_new_hook): Define.
(obj_frob_symbol, obj_frob_file_before_adjust): Ditto.
(obj_frob_file_before_fix): Ditto.
(PDSC_S_M_HANDLER_VALID): New macro.
(PDSC_S_M_HANDLER_DATA_VALID): Ditto.
(TC_IMPLICIT_LCOMM_ALIGNMENT): Remove.
Add prototypes for functions declared in obj-evax.c
* config/obj-evax.c: Include subsegs.h, struc-symbol.h, safe-ctype.h.
(s_evax_weak): Convert to ansi-C.
(evax_symbol_new_hook): New function.
(evax_frob_symbol): Ditto.
(evax_frob_file_before_adjust): Ditto.
(evax_frob_file_before_fix): Ditto.
(evax_shorten_name): Ditto.
(crc32): Ditto.
(encode_32): Ditto.
(encode_16): Ditto.
(decode_16): Ditto.
(shorten_identifier): Ditto.
(is_truncated_identifier): Ditto.
* dwarf2dbg.c (out_debug_info): Do not append trailing slash on VMS.
* as.c (close_output_file): Remove #ifndef OBJ_VMS.
(main): Ditto.
2009-03-03 11:04:58 +01:00
|
|
|
Enables or disables the optimization of procedure calls, both at assemblage
|
|
|
|
and at link time. These options are only available for VMS targets and
|
|
|
|
@code{-replace} is the default. See section 1.4.1 of the OpenVMS Linker
|
|
|
|
Utility Manual.
|
|
|
|
|
2002-02-11 00:25:17 +01:00
|
|
|
@cindex @code{-g} command line option, Alpha
|
|
|
|
@item -g
|
|
|
|
This option is used when the compiler generates debug information. When
|
|
|
|
@command{gcc} is using @command{mips-tfile} to generate debug
|
|
|
|
information for ECOFF, local labels must be passed through to the object
|
|
|
|
file. Otherwise this option has no effect.
|
|
|
|
|
|
|
|
@cindex @code{-G} command line option, Alpha
|
|
|
|
@item -G@var{size}
|
|
|
|
A local common symbol larger than @var{size} is placed in @code{.bss},
|
|
|
|
while smaller symbols are placed in @code{.sbss}.
|
|
|
|
|
|
|
|
@cindex @code{-F} command line option, Alpha
|
|
|
|
@cindex @code{-32addr} command line option, Alpha
|
|
|
|
@item -F
|
|
|
|
@itemx -32addr
|
|
|
|
These options are ignored for backward compatibility.
|
|
|
|
@end table
|
2010-11-22 23:11:52 +01:00
|
|
|
@c man end
|
2002-02-11 00:25:17 +01:00
|
|
|
|
|
|
|
@cindex Alpha Syntax
|
|
|
|
@node Alpha Syntax
|
|
|
|
@section Syntax
|
|
|
|
The assembler syntax closely follow the Alpha Reference Manual;
|
|
|
|
assembler directives and general syntax closely follow the OSF/1 and
|
|
|
|
OpenVMS syntax, with a few differences for ELF.
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Alpha-Chars:: Special Characters
|
|
|
|
* Alpha-Regs:: Register Names
|
|
|
|
* Alpha-Relocs:: Relocations
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node Alpha-Chars
|
|
|
|
@subsection Special Characters
|
|
|
|
|
|
|
|
@cindex line comment character, Alpha
|
|
|
|
@cindex Alpha line comment character
|
2011-01-18 14:37:39 +01:00
|
|
|
@samp{#} is the line comment character. Note that if @samp{#} is the
|
|
|
|
first character on a line then it can also be a logical line number
|
|
|
|
directive (@pxref{Comments}) or a preprocessor control
|
|
|
|
command (@pxref{Preprocessing}).
|
2002-02-11 00:25:17 +01:00
|
|
|
|
|
|
|
@cindex line separator, Alpha
|
|
|
|
@cindex statement separator, Alpha
|
|
|
|
@cindex Alpha line separator
|
|
|
|
@samp{;} can be used instead of a newline to separate statements.
|
|
|
|
|
|
|
|
@node Alpha-Regs
|
|
|
|
@subsection Register Names
|
|
|
|
@cindex Alpha registers
|
|
|
|
@cindex register names, Alpha
|
|
|
|
|
2003-10-26 19:12:03 +01:00
|
|
|
The 32 integer registers are referred to as @samp{$@var{n}} or
|
2002-02-11 00:25:17 +01:00
|
|
|
@samp{$r@var{n}}. In addition, registers 15, 28, 29, and 30 may
|
2003-10-26 19:12:03 +01:00
|
|
|
be referred to by the symbols @samp{$fp}, @samp{$at}, @samp{$gp},
|
2002-02-11 00:25:17 +01:00
|
|
|
and @samp{$sp} respectively.
|
|
|
|
|
2003-10-26 19:12:03 +01:00
|
|
|
The 32 floating-point registers are referred to as @samp{$f@var{n}}.
|
2002-02-11 00:25:17 +01:00
|
|
|
|
|
|
|
@node Alpha-Relocs
|
|
|
|
@subsection Relocations
|
|
|
|
@cindex Alpha relocations
|
|
|
|
@cindex relocations, Alpha
|
|
|
|
|
|
|
|
Some of these relocations are available for ECOFF, but mostly
|
|
|
|
only for ELF. They are modeled after the relocation format
|
2003-10-26 19:12:03 +01:00
|
|
|
introduced in Digital Unix 4.0, but there are additions.
|
2002-02-11 00:25:17 +01:00
|
|
|
|
|
|
|
The format is @samp{!@var{tag}} or @samp{!@var{tag}!@var{number}}
|
|
|
|
where @var{tag} is the name of the relocation. In some cases
|
|
|
|
@var{number} is used to relate specific instructions.
|
|
|
|
|
|
|
|
The relocation is placed at the end of the instruction like so:
|
|
|
|
|
|
|
|
@example
|
|
|
|
ldah $0,a($29) !gprelhigh
|
|
|
|
lda $0,a($0) !gprellow
|
|
|
|
ldq $1,b($29) !literal!100
|
|
|
|
ldl $2,0($1) !lituse_base!100
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
@item !literal
|
|
|
|
@itemx !literal!@var{N}
|
|
|
|
Used with an @code{ldq} instruction to load the address of a symbol
|
|
|
|
from the GOT.
|
|
|
|
|
|
|
|
A sequence number @var{N} is optional, and if present is used to pair
|
|
|
|
@code{lituse} relocations with this @code{literal} relocation. The
|
|
|
|
@code{lituse} relocations are used by the linker to optimize the code
|
|
|
|
based on the final location of the symbol.
|
|
|
|
|
|
|
|
Note that these optimizations are dependent on the data flow of the
|
|
|
|
program. Therefore, if @emph{any} @code{lituse} is paired with a
|
|
|
|
@code{literal} relocation, then @emph{all} uses of the register set by
|
|
|
|
the @code{literal} instruction must also be marked with @code{lituse}
|
|
|
|
relocations. This is because the original @code{literal} instruction
|
|
|
|
may be deleted or transformed into another instruction.
|
|
|
|
|
|
|
|
Also note that there may be a one-to-many relationship between
|
|
|
|
@code{literal} and @code{lituse}, but not a many-to-one. That is, if
|
|
|
|
there are two code paths that load up the same address and feed the
|
|
|
|
value to a single use, then the use may not use a @code{lituse}
|
|
|
|
relocation.
|
|
|
|
|
|
|
|
@item !lituse_base!@var{N}
|
|
|
|
Used with any memory format instruction (e.g.@: @code{ldl}) to indicate
|
|
|
|
that the literal is used for an address load. The offset field of the
|
|
|
|
instruction must be zero. During relaxation, the code may be altered
|
|
|
|
to use a gp-relative load.
|
|
|
|
|
|
|
|
@item !lituse_jsr!@var{N}
|
|
|
|
Used with a register branch format instruction (e.g.@: @code{jsr}) to
|
|
|
|
indicate that the literal is used for a call. During relaxation, the
|
|
|
|
code may be altered to use a direct branch (e.g.@: @code{bsr}).
|
|
|
|
|
2005-06-01 00:53:11 +02:00
|
|
|
@item !lituse_jsrdirect!@var{N}
|
|
|
|
Similar to @code{lituse_jsr}, but also that this call cannot be vectored
|
|
|
|
through a PLT entry. This is useful for functions with special calling
|
|
|
|
conventions which do not allow the normal call-clobbered registers to be
|
|
|
|
clobbered.
|
|
|
|
|
2002-02-11 00:25:17 +01:00
|
|
|
@item !lituse_bytoff!@var{N}
|
|
|
|
Used with a byte mask instruction (e.g.@: @code{extbl}) to indicate
|
|
|
|
that only the low 3 bits of the address are relevant. During relaxation,
|
|
|
|
the code may be altered to use an immediate instead of a register shift.
|
|
|
|
|
|
|
|
@item !lituse_addr!@var{N}
|
|
|
|
Used with any other instruction to indicate that the original address
|
|
|
|
is in fact used, and the original @code{ldq} instruction may not be
|
|
|
|
altered or deleted. This is useful in conjunction with @code{lituse_jsr}
|
|
|
|
to test whether a weak symbol is defined.
|
|
|
|
|
|
|
|
@example
|
|
|
|
ldq $27,foo($29) !literal!1
|
|
|
|
beq $27,is_undef !lituse_addr!1
|
|
|
|
jsr $26,($27),foo !lituse_jsr!1
|
|
|
|
@end example
|
|
|
|
|
2002-05-31 00:34:41 +02:00
|
|
|
@item !lituse_tlsgd!@var{N}
|
|
|
|
Used with a register branch format instruction to indicate that the
|
|
|
|
literal is the call to @code{__tls_get_addr} used to compute the
|
|
|
|
address of the thread-local storage variable whose descriptor was
|
|
|
|
loaded with @code{!tlsgd!@var{N}}.
|
|
|
|
|
|
|
|
@item !lituse_tlsldm!@var{N}
|
|
|
|
Used with a register branch format instruction to indicate that the
|
|
|
|
literal is the call to @code{__tls_get_addr} used to compute the
|
|
|
|
address of the base of the thread-local storage block for the current
|
|
|
|
module. The descriptor for the module must have been loaded with
|
|
|
|
@code{!tlsldm!@var{N}}.
|
|
|
|
|
2002-02-11 00:25:17 +01:00
|
|
|
@item !gpdisp!@var{N}
|
|
|
|
Used with @code{ldah} and @code{lda} to load the GP from the current
|
|
|
|
address, a-la the @code{ldgp} macro. The source register for the
|
|
|
|
@code{ldah} instruction must contain the address of the @code{ldah}
|
|
|
|
instruction. There must be exactly one @code{lda} instruction paired
|
|
|
|
with the @code{ldah} instruction, though it may appear anywhere in
|
|
|
|
the instruction stream. The immediate operands must be zero.
|
|
|
|
|
|
|
|
@example
|
|
|
|
bsr $26,foo
|
|
|
|
ldah $29,0($26) !gpdisp!1
|
|
|
|
lda $29,0($29) !gpdisp!1
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@item !gprelhigh
|
|
|
|
Used with an @code{ldah} instruction to add the high 16 bits of a
|
|
|
|
32-bit displacement from the GP.
|
|
|
|
|
|
|
|
@item !gprellow
|
|
|
|
Used with any memory format instruction to add the low 16 bits of a
|
|
|
|
32-bit displacement from the GP.
|
|
|
|
|
|
|
|
@item !gprel
|
|
|
|
Used with any memory format instruction to add a 16-bit displacement
|
|
|
|
from the GP.
|
|
|
|
|
|
|
|
@item !samegp
|
|
|
|
Used with any branch format instruction to skip the GP load at the
|
|
|
|
target address. The referenced symbol must have the same GP as the
|
|
|
|
source object file, and it must be declared to either not use @code{$27}
|
|
|
|
or perform a standard GP load in the first two instructions via the
|
|
|
|
@code{.prologue} directive.
|
2002-05-31 00:34:41 +02:00
|
|
|
|
|
|
|
@item !tlsgd
|
|
|
|
@itemx !tlsgd!@var{N}
|
|
|
|
Used with an @code{lda} instruction to load the address of a TLS
|
|
|
|
descriptor for a symbol in the GOT.
|
|
|
|
|
|
|
|
The sequence number @var{N} is optional, and if present it used to
|
|
|
|
pair the descriptor load with both the @code{literal} loading the
|
|
|
|
address of the @code{__tls_get_addr} function and the @code{lituse_tlsgd}
|
|
|
|
marking the call to that function.
|
|
|
|
|
|
|
|
For proper relaxation, both the @code{tlsgd}, @code{literal} and
|
|
|
|
@code{lituse} relocations must be in the same extended basic block.
|
|
|
|
That is, the relocation with the lowest address must be executed
|
|
|
|
first at runtime.
|
|
|
|
|
|
|
|
@item !tlsldm
|
|
|
|
@itemx !tlsldm!@var{N}
|
|
|
|
Used with an @code{lda} instruction to load the address of a TLS
|
|
|
|
descriptor for the current module in the GOT.
|
|
|
|
|
|
|
|
Similar in other respects to @code{tlsgd}.
|
|
|
|
|
|
|
|
@item !gotdtprel
|
|
|
|
Used with an @code{ldq} instruction to load the offset of the TLS
|
|
|
|
symbol within its module's thread-local storage block. Also known
|
|
|
|
as the dynamic thread pointer offset or dtp-relative offset.
|
|
|
|
|
|
|
|
@item !dtprelhi
|
|
|
|
@itemx !dtprello
|
|
|
|
@itemx !dtprel
|
|
|
|
Like @code{gprel} relocations except they compute dtp-relative offsets.
|
|
|
|
|
|
|
|
@item !gottprel
|
|
|
|
Used with an @code{ldq} instruction to load the offset of the TLS
|
|
|
|
symbol from the thread pointer. Also known as the tp-relative offset.
|
|
|
|
|
|
|
|
@item !tprelhi
|
|
|
|
@itemx !tprello
|
|
|
|
@itemx !tprel
|
|
|
|
Like @code{gprel} relocations except they compute tp-relative offsets.
|
2002-02-11 00:25:17 +01:00
|
|
|
@end table
|
|
|
|
|
|
|
|
@node Alpha Floating Point
|
|
|
|
@section Floating Point
|
|
|
|
@cindex floating point, Alpha (@sc{ieee})
|
|
|
|
@cindex Alpha floating point (@sc{ieee})
|
|
|
|
The Alpha family uses both @sc{ieee} and VAX floating-point numbers.
|
|
|
|
|
|
|
|
@node Alpha Directives
|
|
|
|
@section Alpha Assembler Directives
|
|
|
|
|
|
|
|
@command{@value{AS}} for the Alpha supports many additional directives for
|
|
|
|
compatibility with the native assembler. This section describes them only
|
|
|
|
briefly.
|
|
|
|
|
|
|
|
@cindex Alpha-only directives
|
|
|
|
These are the additional directives in @code{@value{AS}} for the Alpha:
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
@item .arch @var{cpu}
|
|
|
|
Specifies the target processor. This is equivalent to the
|
|
|
|
@option{-m@var{cpu}} command-line option. @xref{Alpha Options, Options},
|
|
|
|
for a list of values for @var{cpu}.
|
|
|
|
|
|
|
|
@item .ent @var{function}[, @var{n}]
|
|
|
|
Mark the beginning of @var{function}. An optional number may follow for
|
|
|
|
compatibility with the OSF/1 assembler, but is ignored. When generating
|
|
|
|
@code{.mdebug} information, this will create a procedure descriptor for
|
|
|
|
the function. In ELF, it will mark the symbol as a function a-la the
|
|
|
|
generic @code{.type} directive.
|
|
|
|
|
|
|
|
@item .end @var{function}
|
|
|
|
Mark the end of @var{function}. In ELF, it will set the size of the symbol
|
|
|
|
a-la the generic @code{.size} directive.
|
|
|
|
|
|
|
|
@item .mask @var{mask}, @var{offset}
|
|
|
|
Indicate which of the integer registers are saved in the current
|
|
|
|
function's stack frame. @var{mask} is interpreted a bit mask in which
|
|
|
|
bit @var{n} set indicates that register @var{n} is saved. The registers
|
|
|
|
are saved in a block located @var{offset} bytes from the @dfn{canonical
|
|
|
|
frame address} (CFA) which is the value of the stack pointer on entry to
|
|
|
|
the function. The registers are saved sequentially, except that the
|
|
|
|
return address register (normally @code{$26}) is saved first.
|
|
|
|
|
|
|
|
This and the other directives that describe the stack frame are
|
|
|
|
currently only used when generating @code{.mdebug} information. They
|
|
|
|
may in the future be used to generate DWARF2 @code{.debug_frame} unwind
|
|
|
|
information for hand written assembly.
|
|
|
|
|
|
|
|
@item .fmask @var{mask}, @var{offset}
|
|
|
|
Indicate which of the floating-point registers are saved in the current
|
|
|
|
stack frame. The @var{mask} and @var{offset} parameters are interpreted
|
|
|
|
as with @code{.mask}.
|
|
|
|
|
|
|
|
@item .frame @var{framereg}, @var{frameoffset}, @var{retreg}[, @var{argoffset}]
|
|
|
|
Describes the shape of the stack frame. The frame pointer in use is
|
|
|
|
@var{framereg}; normally this is either @code{$fp} or @code{$sp}. The
|
|
|
|
frame pointer is @var{frameoffset} bytes below the CFA. The return
|
|
|
|
address is initially located in @var{retreg} until it is saved as
|
|
|
|
indicated in @code{.mask}. For compatibility with OSF/1 an optional
|
|
|
|
@var{argoffset} parameter is accepted and ignored. It is believed to
|
|
|
|
indicate the offset from the CFA to the saved argument registers.
|
|
|
|
|
|
|
|
@item .prologue @var{n}
|
|
|
|
Indicate that the stack frame is set up and all registers have been
|
|
|
|
spilled. The argument @var{n} indicates whether and how the function
|
|
|
|
uses the incoming @dfn{procedure vector} (the address of the called
|
|
|
|
function) in @code{$27}. 0 indicates that @code{$27} is not used; 1
|
|
|
|
indicates that the first two instructions of the function use @code{$27}
|
|
|
|
to perform a load of the GP register; 2 indicates that @code{$27} is
|
|
|
|
used in some non-standard way and so the linker cannot elide the load of
|
|
|
|
the procedure vector during relaxation.
|
|
|
|
|
2003-06-05 05:27:03 +02:00
|
|
|
@item .usepv @var{function}, @var{which}
|
|
|
|
Used to indicate the use of the @code{$27} register, similar to
|
|
|
|
@code{.prologue}, but without the other semantics of needing to
|
|
|
|
be inside an open @code{.ent}/@code{.end} block.
|
|
|
|
|
|
|
|
The @var{which} argument should be either @code{no}, indicating that
|
|
|
|
@code{$27} is not used, or @code{std}, indicating that the first two
|
|
|
|
instructions of the function perform a GP load.
|
|
|
|
|
|
|
|
One might use this directive instead of @code{.prologue} if you are
|
|
|
|
also using dwarf2 CFI directives.
|
|
|
|
|
2002-02-11 00:25:17 +01:00
|
|
|
@item .gprel32 @var{expression}
|
|
|
|
Computes the difference between the address in @var{expression} and the
|
|
|
|
GP for the current object file, and stores it in 4 bytes. In addition
|
|
|
|
to being smaller than a full 8 byte address, this also does not require
|
|
|
|
a dynamic relocation when used in a shared library.
|
|
|
|
|
|
|
|
@item .t_floating @var{expression}
|
|
|
|
Stores @var{expression} as an @sc{ieee} double precision value.
|
|
|
|
|
|
|
|
@item .s_floating @var{expression}
|
|
|
|
Stores @var{expression} as an @sc{ieee} single precision value.
|
|
|
|
|
|
|
|
@item .f_floating @var{expression}
|
|
|
|
Stores @var{expression} as a VAX F format value.
|
|
|
|
|
|
|
|
@item .g_floating @var{expression}
|
|
|
|
Stores @var{expression} as a VAX G format value.
|
|
|
|
|
|
|
|
@item .d_floating @var{expression}
|
|
|
|
Stores @var{expression} as a VAX D format value.
|
|
|
|
|
|
|
|
@item .set @var{feature}
|
|
|
|
Enables or disables various assembler features. Using the positive
|
|
|
|
name of the feature enables while using @samp{no@var{feature}} disables.
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
@item at
|
|
|
|
Indicates that macro expansions may clobber the @dfn{assembler
|
|
|
|
temporary} (@code{$at} or @code{$28}) register. Some macros may not be
|
|
|
|
expanded without this and will generate an error message if @code{noat}
|
|
|
|
is in effect. When @code{at} is in effect, a warning will be generated
|
|
|
|
if @code{$at} is used by the programmer.
|
|
|
|
|
|
|
|
@item macro
|
2002-12-19 02:11:31 +01:00
|
|
|
Enables the expansion of macro instructions. Note that variants of real
|
2002-02-11 00:25:17 +01:00
|
|
|
instructions, such as @code{br label} vs @code{br $31,label} are
|
|
|
|
considered alternate forms and not macros.
|
|
|
|
|
|
|
|
@item move
|
|
|
|
@itemx reorder
|
|
|
|
@itemx volatile
|
|
|
|
These control whether and how the assembler may re-order instructions.
|
|
|
|
Accepted for compatibility with the OSF/1 assembler, but @command{@value{AS}}
|
|
|
|
does not do instruction scheduling, so these features are ignored.
|
|
|
|
@end table
|
|
|
|
@end table
|
|
|
|
|
|
|
|
The following directives are recognized for compatibility with the OSF/1
|
|
|
|
assembler but are ignored.
|
|
|
|
|
|
|
|
@example
|
|
|
|
.proc .aproc
|
|
|
|
.reguse .livereg
|
|
|
|
.option .aent
|
|
|
|
.ugen .eflag
|
|
|
|
.alias .noalias
|
|
|
|
@end example
|
|
|
|
|
|
|
|
@node Alpha Opcodes
|
|
|
|
@section Opcodes
|
|
|
|
For detailed information on the Alpha machine instruction set, see the
|
|
|
|
@c Attempt to work around a very overfull hbox.
|
|
|
|
@iftex
|
|
|
|
Alpha Architecture Handbook located at
|
|
|
|
@smallfonts
|
|
|
|
@example
|
|
|
|
ftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf
|
|
|
|
@end example
|
|
|
|
@textfonts
|
|
|
|
@end iftex
|
|
|
|
@ifnottex
|
|
|
|
@uref{ftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf,Alpha Architecture Handbook}.
|
|
|
|
@end ifnottex
|