Add support for AVR6 family
[deliverable/binutils-gdb.git] / gas / doc / as.texinfo
index 13512003f497f0ba85353a371daf83737ef343b3..18e2417f4da58e33ce1242694d871fb9831da39e 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c                               -*-Texinfo-*-
 @c  Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c  2001, 2002, 2003, 2004, 2005
+@c  2001, 2002, 2003, 2004, 2005, 2006
 @c  Free Software Foundation, Inc.
 @c UPDATE!!  On future updates--
 @c   (1)   check for new machine-dep cmdline options in
@@ -100,7 +100,7 @@ END-INFO-DIR-ENTRY
 This file documents the GNU Assembler "@value{AS}".
 
 @c man begin COPYRIGHT
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1
@@ -153,7 +153,7 @@ done.
 @end tex
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
 
       Permission is granted to copy, distribute and/or modify this document
       under the terms of the GNU Free Documentation License, Version 1.1
@@ -191,7 +191,7 @@ section entitled ``GNU Free Documentation License''.
 * Reporting Bugs::              Reporting Bugs
 * Acknowledgements::            Who Did What
 * GNU Free Documentation License::  GNU Free Documentation License
-* Index::                       Index
+* AS Index::                    AS Index
 @end menu
 @end ifnottex
 
@@ -231,8 +231,9 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
  [@b{--listing-cont-lines}=@var{NUM}] [@b{--keep-locals}] [@b{-o}
  @var{objfile}] [@b{-R}] [@b{--reduce-memory-overheads}] [@b{--statistics}]
  [@b{-v}] [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}]
- [@b{--fatal-warnings}] [@b{-w}] [@b{-x}] [@b{-Z}] [@b{--target-help}]
- [@var{target-options}] [@b{--}|@var{files} @dots{}]
+ [@b{--fatal-warnings}] [@b{-w}] [@b{-x}] [@b{-Z}] [@b{@@@var{FILE}}]
+ [@b{--target-help}] [@var{target-options}]
+ [@b{--}|@var{files} @dots{}]
 @c
 @c Target dependent options are listed below.  Keep the list sorted.
 @c Add an empty line for separation. 
@@ -366,6 +367,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
    [@b{-trap}] [@b{-no-break}] [@b{-break}] [@b{-no-trap}]
    [@b{-mfix7000}] [@b{-mno-fix7000}]
    [@b{-mips16}] [@b{-no-mips16}]
+   [@b{-msmartmips}] [@b{-mno-smartmips}]
    [@b{-mips3d}] [@b{-no-mips3d}]
    [@b{-mdmx}] [@b{-no-mdmx}]
    [@b{-mdsp}] [@b{-mno-dsp}]
@@ -420,6 +422,19 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
  [@b{-mcpu=54[123589]}|@b{-mcpu=54[56]lp}] [@b{-mfar-mode}|@b{-mf}] 
  [@b{-merrors-to-file} @var{<filename>}|@b{-me} @var{<filename>}]
 @end ifset
+
+@ifset Z80
+
+@emph{Target Z80 options:}
+  [@b{-z80}] [@b{-r800}]
+  [@b{ -ignore-undocumented-instructions}] [@b{-Wnud}]
+  [@b{ -ignore-unportable-instructions}] [@b{-Wnup}]
+  [@b{ -warn-undocumented-instructions}] [@b{-Wud}]
+  [@b{ -warn-unportable-instructions}] [@b{-Wup}]
+  [@b{ -forbid-undocumented-instructions}] [@b{-Fud}]
+  [@b{ -forbid-unportable-instructions}] [@b{-Fup}]
+@end ifset
+
 @ifset Z8000
 @c Z8000 has no machine-dependent assembler options
 @end ifset
@@ -437,6 +452,8 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
 @c man begin OPTIONS
 
 @table @gcctabopt
+@include at-file.texi
+
 @item -a[cdhlmns]
 Turn on listings, in any of a variety of ways:
 
@@ -990,6 +1007,12 @@ Generate code for the MIPS 16 processor.  This is equivalent to putting
 @code{.set mips16} at the start of the assembly file.  @samp{-no-mips16}
 turns off this option.
 
+@item -msmartmips
+@itemx -mno-smartmips
+Enables the SmartMIPS extension to the MIPS32 instruction set. This is
+equivalent to putting @code{.set smartmips} at the start of the assembly file.
+@samp{-mno-smartmips} turns off this option.
+
 @item -mips3d
 @itemx -no-mips3d
 Generate code for the MIPS-3D Application Specific Extension.
@@ -1138,6 +1161,35 @@ instructions must be exactly as specified in the assembly source.
 @end table
 @end ifset
 
+@ifset Z80
+The following options are available when @value{AS} is configured for
+a Z80 family processor.
+@table @gcctabopt
+@item -z80
+Assemble for Z80 processor.
+@item -r800
+Assemble for R800 processor.
+@item  -ignore-undocumented-instructions 
+@itemx -Wnud
+Assemble undocumented Z80 instructions that also work on R800 without warning.
+@item  -ignore-unportable-instructions 
+@itemx -Wnup
+Assemble all undocumented Z80 instructions without warning.
+@item  -warn-undocumented-instructions 
+@itemx -Wud
+Issue a warning for undocumented Z80 instructions that also work on R800.
+@item  -warn-unportable-instructions 
+@itemx -Wup
+Issue a warning for undocumented Z80 instructions that do notwork on R800.  
+@item  -forbid-undocumented-instructions 
+@itemx -Fud
+Treat all undocumented instructions as errors.
+@item  -forbid-unportable-instructions 
+@itemx -Fup
+Treat undocumented Z80 intructions that do notwork on R800 as errors.
+@end table
+@end ifset
+
 @c man end
 
 @menu
@@ -2130,6 +2182,9 @@ is considered a comment and is ignored.  The line comment character is
 @ifset VAX
 @samp{#} on the Vax;
 @end ifset
+@ifset Z80
+@samp{;} for the Z80;
+@end ifset
 @ifset Z8000
 @samp{!} for the Z8000;
 @end ifset
@@ -3681,7 +3736,7 @@ Some machine configurations provide additional directives.
 @menu
 * Abort::                       @code{.abort}
 @ifset COFF
-* ABORT::                       @code{.ABORT}
+* ABORT (COFF)::                       @code{.ABORT}
 @end ifset
 
 * Align::                       @code{.align @var{abs-expr} , @var{abs-expr}}
@@ -3842,6 +3897,7 @@ Some machine configurations provide additional directives.
 
 * Warning::                    @code{.warning @var{string}}
 * Weak::                        @code{.weak @var{names}}
+* Weakref::                     @code{.weakref @var{alias}, @var{symbol}}
 * Word::                        @code{.word @var{expressions}}
 * Deprecated::                  Deprecated Directives
 @end menu
@@ -3858,8 +3914,8 @@ of the source quit, it could use this directive tells @command{@value{AS}} to
 quit also.  One day @code{.abort} will not be supported.
 
 @ifset COFF
-@node ABORT
-@section @code{.ABORT}
+@node ABORT (COFF)
+@section @code{.ABORT} (COFF)
 
 @cindex @code{ABORT} directive
 When producing COFF output, @command{@value{AS}} accepts this directive as a
@@ -4053,6 +4109,9 @@ using the known displacement of the CFA register from the CFA.
 This is often easier to use, because the number will match the
 code it's annotating.
 
+@section @code{.cfi_signal_frame}
+Mark current function as signal trampoline.
+
 @section @code{.cfi_window_save}
 SPARC register window has been saved.
 
@@ -4106,6 +4165,8 @@ either 0 or 1.
 This directive will set the @code{isa} register in the @code{.debug_line}
 state machine to @var{value}, which must be an unsigned integer.
 
+@end table
+
 @section @code{.loc_mark_blocks @var{enable}}
 @cindex @code{loc_mark_blocks} directive
 The @code{.loc_mark_blocks} directive makes the assembler emit an entry
@@ -4114,8 +4175,6 @@ register in the state machine set whenever a code label is seen.
 The @var{enable} argument should be either 1 or 0, to enable or disable
 this function respectively.
 
-@end table
-
 @node Data
 @section @code{.data @var{subsection}}
 
@@ -4271,6 +4330,14 @@ The syntax for @code{equ} on the HPPA is
 @samp{@var{symbol} .equ @var{expression}}.
 @end ifset
 
+@ifset Z80
+The syntax for @code{equ} on the Z80 is 
+@samp{@var{symbol} equ @var{expression}}. 
+On the Z80 it is an eror if @var{symbol} is already defined,
+but the symbol is not protected from later redefinition, 
+compare @xref{Equiv}.
+@end ifset
+
 @node Equiv
 @section @code{.equiv @var{symbol}, @var{expression}}
 @cindex @code{equiv} directive
@@ -4301,7 +4368,7 @@ value is taken.
 @cindex @code{err} directive
 If @command{@value{AS}} assembles a @code{.err} directive, it will print an error
 message and, unless the @option{-Z} option was used, it will not generate an
-object file.  This can be used to signal error an conditionally compiled code.
+object file.  This can be used to signal an error in conditionally compiled code.
 
 @node Error
 @section @code{.error "@var{string}"}
@@ -4470,10 +4537,14 @@ This directive is a synonym for both @samp{.short} and @samp{.word}.
 @section @code{.ident}
 
 @cindex @code{ident} directive
-This directive is used by some assemblers to place tags in object files.
-@command{@value{AS}} simply accepts the directive for source-file
-compatibility with such assemblers, but does not actually emit anything
-for it.
+
+This directive is used by some assemblers to place tags in object files.  The
+behavior of this directive varies depending on the target.  When using the
+a.out object file format, @command{@value{AS}} simply accepts the directive for
+source-file compatibility with existing assemblers, but does not emit anything
+for it.  When using COFF, comments are emitted to the @code{.comment} or
+@code{.rdata} section, depending on the target.  When using ELF, comments are
+emitted to the @code{.comment} section.
 
 @node If
 @section @code{.if @var{absolute expression}}
@@ -5511,6 +5582,11 @@ The syntax for @code{set} on the HPPA is
 @samp{@var{symbol} .set @var{expression}}.
 @end ifset
 
+@ifset Z80
+On Z80 @code{set} is a real instruction, use
+@samp{@var{symbol} defl @var{expression}} instead.
+@end ifset
+
 @node Short
 @section @code{.short @var{expressions}}
 
@@ -5895,9 +5971,21 @@ For ELF targets, the @code{.type} directive is used like this:
 This sets the type of symbol @var{name} to be either a
 function symbol or an object symbol.  There are five different syntaxes
 supported for the @var{type description} field, in order to provide
-compatibility with various other assemblers.  The syntaxes supported are:
+compatibility with various other assemblers.
+
+Because some of the characters used in these syntaxes (such as @samp{@@} and
+@samp{#}) are comment characters for some architectures, some of the syntaxes
+below do not work on all architectures.  The first variant will be accepted by
+the GNU assembler on all architectures so that variant should be used for
+maximum portability, if you do not need to assemble your code with other
+assemblers.
+
+The syntaxes supported are:
 
 @smallexample
+  .type <name> STT_FUNCTION
+  .type <name> STT_OBJECT
+
   .type <name>,#function
   .type <name>,#object
 
@@ -5909,9 +5997,6 @@ compatibility with various other assemblers.  The syntaxes supported are:
   
   .type <name>,"function"
   .type <name>,"object"
-  
-  .type <name> STT_FUNCTION
-  .type <name> STT_OBJECT
 @end smallexample
 @end ifset
 @end ifset
@@ -5989,6 +6074,25 @@ On the PE target, weak symbols are supported natively as weak aliases.
 When a weak symbol is created that is not an alias, GAS creates an 
 alternate symbol to hold the default value.
 
+@node Weakref
+@section @code{.weakref @var{alias}, @var{target}}
+
+@cindex @code{weakref} directive
+This directive creates an alias to the target symbol that enables the symbol to
+be referenced with weak-symbol semantics, but without actually making it weak.
+If direct references or definitions of the symbol are present, then the symbol
+will not be weak, but if all references to it are through weak references, the
+symbol will be marked as weak in the symbol table.
+
+The effect is equivalent to moving all references to the alias to a separate
+assembly source file, renaming the alias to the symbol in it, declaring the
+symbol as weak there, and running a reloadable link to merge the object files
+resulting from the assembly of the new source file and the old source file that
+had the references to the alias removed.
+
+The alias itself never makes to the symbol table, and is entirely handled
+within the assembler.
+
 @node Word
 @section @code{.word @var{expressions}}
 
@@ -6176,6 +6280,9 @@ subject, see the hardware manufacturer's manual.
 @ifset XTENSA
 * Xtensa-Dependent::            Xtensa Dependent Features
 @end ifset
+@ifset Z80
+* Z80-Dependent::               Z80 Dependent Features
+@end ifset
 @ifset Z8000
 * Z8000-Dependent::             Z8000 Dependent Features
 @end ifset
@@ -6330,6 +6437,10 @@ family.
 @include c-tic54x.texi
 @end ifset
 
+@ifset Z80
+@include c-z80.texi
+@end ifset
+
 @ifset Z8000
 @include c-z8k.texi
 @end ifset
@@ -6653,8 +6764,8 @@ intentionally leaving anyone out.
 
 @include fdl.texi
 
-@node Index
-@unnumbered Index
+@node AS Index
+@unnumbered AS Index
 
 @printindex cp
 
This page took 0.029678 seconds and 4 git commands to generate.