Introduced m4 parametrization rather than comments and ignore/end ignore

to configure manual for particular platforms.
See m4 macro definitions in *.m4.
(Requires GNU or SysV m4; Berkeley won't do).
This commit is contained in:
Roland Pesch 1991-03-15 22:08:02 +00:00
parent c81e78d17f
commit 09352a5d3d

View file

@ -2,7 +2,30 @@
@c @tex @c @tex
@c \special{twoside} @c \special{twoside}
@c @end tex @c @end tex
@setfilename as _if__(_ALL_ARCH__)
@setfilename as.info
_fi__(_ALL_ARCH__)
_if__(_M680X0__ && !_ALL_ARCH__)
@setfilename as-m680x0.info
_fi__(_M680X0__ && !_ALL_ARCH__)
_if__(_AMD29K__ && !_ALL_ARCH__)
@setfilename as-29k.info
_fi__(_AMD29K__ && !_ALL_ARCH__)
@c
@c NOTE: this manual is marked up for preprocessing with a collection
@c of m4 macros called "pretex.m4". If you see <_if__> and <_fi__>
@c scattered around the source, you have the full source before
@c preprocessing; if you don't, you have the source configured for some
@c particular architecture (and you can of course get the full source,
@c with all configurations, from wherever you got this). The full
@c source needs to be run through m4 before either tex- or info-
@c formatting: for example,
@c m4 pretex.m4 none.m4 m680x0.m4 as.texinfo >as-680x0.texinfo
@c will produce (assuming your path finds either GNU or SysV m4;
@c Berkeley won't do) a file suitable for formatting.
@c See the text in "pretex.m4" for a fuller explanation (and the macro
@c definitions).
@c
@synindex ky cp @synindex ky cp
@ifinfo @ifinfo
This file documents the GNU Assembler "as". This file documents the GNU Assembler "as".
@ -38,21 +61,21 @@ original English.
@end tex @end tex
@smallbook @smallbook
@setchapternewpage odd @setchapternewpage odd
@c if m680x0 _if__(_M680X0__)
@c @settitle Using GNU as (680x0) @settitle Using GNU as (680x0)
@c fi m680x0 _fi__(_M680X0__)
@c if am29k _if__(_AMD29K__)
@settitle Using GNU as (AMD 29K) @settitle Using GNU as (AMD 29K)
@c fi am29k _fi__(_AMD29K__)
@titlepage @titlepage
@title{Using GNU as} @title{Using GNU as}
@subtitle{The GNU Assembler} @subtitle{The GNU Assembler}
@c if m680x0 _if__(_M680X0__)
@c @subtitle{for Motorola 680x0} @subtitle{for Motorola 680x0}
@c fi m680x0 _fi__(_M680X0__)
@c if am29k _if__(_AMD29K__)
@subtitle{for the AMD 29K family} @subtitle{for the AMD 29K family}
@c fi am29k _fi__(_AMD29K__)
@sp 1 @sp 1
@subtitle February 1991 @subtitle February 1991
@sp 13 @sp 13
@ -239,9 +262,7 @@ Assembler Directives
* Single:: @code{.single @var{flonums}} * Single:: @code{.single @var{flonums}}
* Stab:: Store debugging information * Stab:: Store debugging information
* Text:: Change to the text segment * Text:: Change to the text segment
@c if am29k or sparc
* Word:: Fill memory with 32-bit integers * Word:: Fill memory with 32-bit integers
@c else (not am29k or sparc)
* Deprecated:: Deprecated Directives * Deprecated:: Deprecated Directives
* Machine Options:: Options * Machine Options:: Options
* Machine Syntax:: Syntax * Machine Syntax:: Syntax
@ -265,16 +286,14 @@ Machine Directives
@chapter Overview @chapter Overview
This manual is a user guide to the GNU assembler @code{as}. This manual is a user guide to the GNU assembler @code{as}.
@c pesch@cygnus.com: _if__(_M680X0__)
@c The following should be conditional on machine config This version of the manual describes @code{as} configured to generate
@c if 680x0 code for Motorola 680x0 architectures.
@c This version of the manual describes @code{as} configured to generate _fi__(_M680X0__)
@c code for Motorola 680x0 architectures. _if__(_AMD29K__)
@c fi 680x0
@c if am29k
This version of the manual describes @code{as} configured to generate This version of the manual describes @code{as} configured to generate
code for Advanced Micro Devices' 29K architectures. code for Advanced Micro Devices' 29K architectures.
@c fi am29k _fi__(_AMD29K__)
@menu @menu
* Invoking:: Invoking @code{as} * Invoking:: Invoking @code{as}
@ -297,12 +316,12 @@ Here is a brief summary of how to invoke GNU @code{as}. For details,
@c to be limited to one line for the header. @c to be limited to one line for the header.
@example @example
as [ -D ] [ -f ] [ -I @var{path} ] [ -k ] [ -L ] [ -o @var{objfile} ] [ -R ] [ -v ] [ -w ] as [ -D ] [ -f ] [ -I @var{path} ] [ -k ] [ -L ] [ -o @var{objfile} ] [ -R ] [ -v ] [ -w ]
@c if 680x0 _if__(_M680X0__)
@c [ -l ] [ -mc68000 | -mc68010 | -mc68020 ] [ -l ] [ -mc68000 | -mc68010 | -mc68020 ]
@c fi 680x0 _fi__(_M680X0__)
@c if am29k _if__(_AMD29K__)
@c@c am29k has no machine-dependent assembler options @c am29k has no machine-dependent assembler options
@c fi am29k _fi__(_AMD29K__)
[ -- | @var{files} @dots{} ] [ -- | @var{files} @dots{} ]
@end example @end example
@ -319,12 +338,12 @@ other assemblers; it has no effect on GNU @code{as}.
Add @var{path} to the search list for @code{.include} directives Add @var{path} to the search list for @code{.include} directives
@item -k @item -k
@c if am29k _if__(_AMD29K__)
This option is accepted but has no effect on the 29K family. This option is accepted but has no effect on the 29K family.
@c fi am29k _fi__(_AMD29K__)
@c if not am29k _if__(!_AMD29K__)
@c Issue warnings when difference tables altered for long displacements Issue warnings when difference tables altered for long displacements
@c fi not am29k _fi__(!_AMD29K__)
@item -L @item -L
Keep (in symbol table) local symbols, starting with @samp{L} Keep (in symbol table) local symbols, starting with @samp{L}
@ -338,13 +357,13 @@ Fold data segment into text segment
@item -W @item -W
Suppress warning messages Suppress warning messages
@c if 680x0 _if__(_M680X0__)
@c @item -l @item -l
@c Shorten references to undefined symbols, to one word instead of two Shorten references to undefined symbols, to one word instead of two
@c
@c @item -mc68000 | -mc68010 | -mc68020 @item -mc68000 | -mc68010 | -mc68020
@c Specify what processor in the 68000 family is the target (default 68020) Specify what processor in the 68000 family is the target (default 68020)
@c fi 680x0 _fi__(_M680X0__)
@item -- | @var{files} @dots{} @item -- | @var{files} @dots{}
Source files to assemble, or standard input Source files to assemble, or standard input
@ -357,22 +376,24 @@ This document is intended to describe what you need to know to use GNU
notation for symbols, constants, and expressions; the directives that notation for symbols, constants, and expressions; the directives that
@code{as} understands; and of course how to invoke @code{as}. @code{as} understands; and of course how to invoke @code{as}.
@c if 680x0 _if__(_M680X0__ && !_ALL_ARCH__)
@c We also cover special features in the 68000 configuration of @code{as}, We also cover special features in the 68000 configuration of @code{as},
@c including pseudo-operations. including pseudo-operations.
@c fi 680x0 _fi__(_M680X0__ && !_ALL_ARCH__)
@c if am29k _if__(_AMD29K__ && !_ALL_ARCH__)
We also cover special features in the AMD 29K configuration of @code{as}, We also cover special features in the AMD 29K configuration of @code{as},
including assembler directives. including assembler directives.
@c fi am29k _fi__(_AMD29K__ && !_ALL_ARCH__)
@ignore _if__(_ALL_ARCH__)
This document also describes some of the This document also describes some of the machine-dependent features of
machine-dependent features of various flavors of the assembler. various flavors of the assembler.
_fi__(_ALL_ARCH__)
_if__(_INTERNALS__)
This document also describes how the assembler works internally, and This document also describes how the assembler works internally, and
provides some information that may be useful to people attempting to provides some information that may be useful to people attempting to
port the assembler to another machine. port the assembler to another machine.
@end ignore _fi__(_INTERNALS__)
On the other hand, this manual is @emph{not} intended as an introduction On the other hand, this manual is @emph{not} intended as an introduction
to programming in assembly language---let alone programming in general! to programming in assembly language---let alone programming in general!
@ -395,10 +416,7 @@ qualification.
@code{as} is part of a team of programs that turn a high-level @code{as} is part of a team of programs that turn a high-level
human-readable series of instructions into a low-level human-readable series of instructions into a low-level
computer-readable series of instructions. Different versions of computer-readable series of instructions. Different versions of
@code{as} are used for different kinds of computer. In particular, @code{as} are used for different kinds of computer.
at the moment, @code{as} only works for the DEC Vax, the Motorola
680x0, the Intel 80386, the Sparc, and the National Semiconductor
32032/32532.
@end ignore @end ignore
@c There used to be a section "Terminology" here, which defined @c There used to be a section "Terminology" here, which defined
@ -416,11 +434,9 @@ at the moment, @code{as} only works for the DEC Vax, the Motorola
compiler @code{gcc} for use by the linker @code{ld}. Nevertheless, compiler @code{gcc} for use by the linker @code{ld}. Nevertheless,
we've tried to make @code{as} assemble correctly everything that the native we've tried to make @code{as} assemble correctly everything that the native
assembler would. assembler would.
@c if not am29k _if__(_VAX__)
@ignore
Any exceptions are documented explicitly (@pxref{Machine Dependent}). Any exceptions are documented explicitly (@pxref{Machine Dependent}).
@end ignore _fi__(_VAX__)
@c fi not am29k
This doesn't mean @code{as} always uses the same syntax as another This doesn't mean @code{as} always uses the same syntax as another
assembler for the same architecture; for example, we know of several assembler for the same architecture; for example, we know of several
incompatible versions of 680x0 assembly language syntax. incompatible versions of 680x0 assembly language syntax.
@ -551,12 +567,12 @@ file_name:@b{NNN}:Warning Message Text
been given (@pxref{App-File}) it is used for the filename, otherwise the been given (@pxref{App-File}) it is used for the filename, otherwise the
name of the current input file is used. If a logical line number was name of the current input file is used. If a logical line number was
given given
@c if not am29k _if__(!_AMD29K__)
@c (@pxref{Line}) (@pxref{Line})
@c fi not am29k _fi__(!_AMD29K__)
@c if am29k _if__(_AMD29K__)
(@pxref{Ln}) (@pxref{Ln})
@c fi am29k _fi__(_AMD29K__)
then it is used to calculate the number printed, then it is used to calculate the number printed,
otherwise the actual line in the current source file is printed. The otherwise the actual line in the current source file is printed. The
message text is intended to be self explanatory (in the grand Unix message text is intended to be self explanatory (in the grand Unix
@ -599,23 +615,21 @@ in the same order as they were specified (left to right) on the command
line. line.
@subsection Warn if difference tables altered: @code{-k} @subsection Warn if difference tables altered: @code{-k}
@c if am29k _if__(_AMD29K__)
On the AMD 29K family, this option is allowed, but has no effect. It is On the AMD 29K family, this option is allowed, but has no effect. It is
permitted for compatibility with GNU @code{as} on other platforms, permitted for compatibility with GNU @code{as} on other platforms,
where it can be used to warn when @code{as} alters the machine code where it can be used to warn when @code{as} alters the machine code
generated for @samp{.word} directives in difference tables. The AMD 29K generated for @samp{.word} directives in difference tables. The AMD 29K
family does not have the addressing limitations that sometimes lead to this family does not have the addressing limitations that sometimes lead to this
alteration on other platforms. alteration on other platforms.
@c fi am29k _fi__(_AMD29K__)
@c if not am29k _if__(!_AMD29K__)
@ignore
@code{as} sometimes alters the code emitted for directives of the form @code{as} sometimes alters the code emitted for directives of the form
@samp{.word @var{sym1}-@var{sym2}}; @pxref{Word}. @samp{.word @var{sym1}-@var{sym2}}; @pxref{Word}.
You can use the @samp{-k} option if you want a warning issued when this You can use the @samp{-k} option if you want a warning issued when this
is done. is done.
@end ignore _fi__(!_AMD29K__)
@c fi not am29k
@subsection Include Local Labels: @code{-L} @subsection Include Local Labels: @code{-L}
Labels beginning with @samp{L} (upper case only) are called @dfn{local Labels beginning with @samp{L} (upper case only) are called @dfn{local
@ -665,13 +679,12 @@ still reported.
This chapter describes the machine-independent syntax allowed in a This chapter describes the machine-independent syntax allowed in a
source file. @code{as} syntax is similar to what many other assemblers source file. @code{as} syntax is similar to what many other assemblers
use; it is inspired in BSD 4.2 use; it is inspired in BSD 4.2
@c if not vax _if__(!_VAX__)
assembler. @refill assembler. @refill
@c fi not vax _fi__(!_VAX__)
@c if vax _if__(_VAX__)
@c assembler, except that @code{as} does not assembler, except that @code{as} does not assemble Vax bit-fields.
@c assemble Vax bit-fields. _fi__(_VAX__)
@c fi vax
@menu @menu
* Pre-processing:: Pre-processing * Pre-processing:: Pre-processing
@ -739,22 +752,22 @@ This means you may not nest these comments.
Anything from the @dfn{line comment} character to the next newline Anything from the @dfn{line comment} character to the next newline
is considered a comment and is ignored. The line comment character is is considered a comment and is ignored. The line comment character is
@c if vax _if__(_VAX__)
@c @samp{#} on the Vax. @xref{Machine Dependent}. @refill @samp{#} on the Vax;
@c @fi vax _fi__(_VAX__)
@c if 680x0 _if__(_M680X0__)
@c @samp{|} on the 680x0. @xref{Machine Dependent}. @refill @samp{|} on the 680x0;
@c fi 680x0 _fi__(_M680X0__)
@c if am29k _if__(_AMD29K__)
@samp{;} for the AMD 29K family. @xref{Machine Dependent}. @refill @samp{;} for the AMD 29K family;
@c fi am29k _fi__(_AMD29K__)
@ignore @pxref{Machine Dependent}. @refill
@if all-arch
_if__(_ALL_ARCH__)
On some machines there are two different line comment characters. One On some machines there are two different line comment characters. One
will only begin a comment if it is the first non-whitespace character on will only begin a comment if it is the first non-whitespace character on
a line, while the other will always begin a comment. a line, while the other will always begin a comment.
@fi all-arch _fi__(_ALL_ARCH__)
@end ignore
To be compatible with past assemblers a special interpretation is To be compatible with past assemblers a special interpretation is
given to lines that begin with @samp{#}. Following the @samp{#} an given to lines that begin with @samp{#}. Following the @samp{#} an
@ -786,20 +799,20 @@ not a possible symbol delimiter). @xref{Symbols}.
@node Statements, Constants, Symbol Intro, Syntax @node Statements, Constants, Symbol Intro, Syntax
@section Statements @section Statements
A @dfn{statement} ends at a newline character (@samp{\n}) A @dfn{statement} ends at a newline character (@samp{\n})
@c @if m680x0 (or is this if !am29k?) _if__(!_AMD29K__)
@c or at a semicolon (@samp{;}). The newline or semicolon or at a semicolon (@samp{;}). The newline or semicolon
@c fi m680x0 (or !am29k) _fi__(!_AMD29K__)
@c if am29k _if__(_AMD29K__)
or an ``at'' sign (@samp{@@}). The newline or at sign or an ``at'' sign (@samp{@@}). The newline or at sign
@c fi am29k _fi__(_AMD29K__)
is considered part is considered part
of the preceding statement. Newlines of the preceding statement. Newlines
@c if m680x0 (or !am29k) _if__(!_AMD29K__)
@c and semicolons and semicolons
@c fi m680x0 (or !am29k) _fi__(!_AMD29K__)
@c if am29k _if__(_AMD29K__)
and at signs and at signs
@c fi am29k _fi__(_AMD29K__)
within within
character constants are an exception: they don't end statements. character constants are an exception: they don't end statements.
It is an error to end any statement with end-of-file: the last It is an error to end any statement with end-of-file: the last
@ -940,12 +953,12 @@ to strings. So if you want to write the character backslash, you
must write @kbd{'\\} where the first @code{\} escapes the second must write @kbd{'\\} where the first @code{\} escapes the second
@code{\}. As you can see, the quote is an acute accent, not a @code{\}. As you can see, the quote is an acute accent, not a
grave accent. A newline grave accent. A newline
@c if 680x0 (or !am29k) _if__(!_AMD29K__)
@c (or semicolon @samp{;}) (or semicolon @samp{;})
@c fi 680x0 (or !am29k) _fi__(!_AMD29K__)
@c if am29k _if__(_AMD29K__)
(or at sign @samp{@@}) (or at sign @samp{@@})
@c fi am29k _fi__(_AMD29K__)
immediately immediately
following an acute accent is taken as a literal character and does following an acute accent is taken as a literal character and does
not count as the end of a statement. The value of a character not count as the end of a statement. The value of a character
@ -997,18 +1010,16 @@ A flonum is written by writing (in order)
@item @item
The digit @samp{0}. The digit @samp{0}.
@item @item
@c if am29k _if__(_AMD29K__)
One of the letters @samp{DFPRSX} (in upper or lower case), to tell One of the letters @samp{DFPRSX} (in upper or lower case), to tell
@code{as} the rest of the number is a flonum. @code{as} the rest of the number is a flonum.
@c fi am29k _fi__(_AMD29K__)
@c if not am29k _if__(!_AMD29K__)
@ignore
A letter, to tell @code{as} the rest of the number is a flonum. @kbd{e} A letter, to tell @code{as} the rest of the number is a flonum. @kbd{e}
is recommended. Case is not important. (Any otherwise illegal letter is recommended. Case is not important. (Any otherwise illegal letter
will work here, but that might be changed. Vax BSD 4.2 assembler seems will work here, but that might be changed. Vax BSD 4.2 assembler seems
to allow any of @samp{defghDEFGH}.) to allow any of @samp{defghDEFGH}.)
@end ignore _fi__(!_AMD29K__)
@c fi not am29k
@item @item
An optional sign: either @samp{+} or @samp{-}. An optional sign: either @samp{+} or @samp{-}.
@item @item
@ -1020,15 +1031,13 @@ or more decimal digits.
An optional exponent, consisting of: An optional exponent, consisting of:
@itemize @bullet @itemize @bullet
@item @item
@c if am29k _if__(_AMD29K__)
An @samp{E} or @samp{e}. An @samp{E} or @samp{e}.
@c if not am29k _if__(!_AMD29K__)
@ignore
A letter; the exact significance varies according to A letter; the exact significance varies according to
the computer that executes the program. @code{as} the computer that executes the program. @code{as}
accepts any letter for now. Case is not important. accepts any letter for now. Case is not important.
@end ignore _fi__(!_AMD29K__)
@c fi not am29k
@item @item
Optional sign: either @samp{+} or @samp{-}. Optional sign: either @samp{+} or @samp{-}.
@item @item
@ -1303,15 +1312,15 @@ output.
Subsegments are optional. If you don't use subsegments, everything Subsegments are optional. If you don't use subsegments, everything
will be stored in subsegment number zero. will be stored in subsegment number zero.
@c @if not am29k _if__(!_AMD29K__)
@c Each subsegment is zero-padded up to a multiple of four bytes. Each subsegment is zero-padded up to a multiple of four bytes.
@c (Subsegments may be padded a different amount on different flavors (Subsegments may be padded a different amount on different flavors
@c of @code{as}.) of @code{as}.)
@c fi not am29k _fi__(!_AMD29K__)
@c if am29k _if__(_AMD29K__)
On the AMD 29K family, no particular padding is added to segment sizes; On the AMD 29K family, no particular padding is added to segment sizes;
GNU as forces no alignment on this platform. GNU as forces no alignment on this platform.
@c fi am29k _fi__(_AMD29K__)
Subsegments appear in your object file in numeric order, lowest numbered Subsegments appear in your object file in numeric order, lowest numbered
to highest. (All this to be compatible with other people's assemblers.) to highest. (All this to be compatible with other people's assemblers.)
The object file contains no representation of subsegments; @code{ld} and The object file contains no representation of subsegments; @code{ld} and
@ -1402,10 +1411,10 @@ character may be followed by any string of digits, letters,
underscores and dollar signs. Case of letters is significant: underscores and dollar signs. Case of letters is significant:
@code{foo} is a different symbol name than @code{Foo}. @code{foo} is a different symbol name than @code{Foo}.
@c if am29k _if__(_AMD29K__)
For the AMD 29K family, @samp{?} is also allowed in the For the AMD 29K family, @samp{?} is also allowed in the
body of a symbol name, though not at its beginning. body of a symbol name, though not at its beginning.
@c fi am29k _fi__(_AMD29K__)
Each symbol has exactly one name. Each name in an assembly language Each symbol has exactly one name. Each name in an assembly language
program refers to exactly one symbol. You may use that symbol name any program refers to exactly one symbol. You may use that symbol name any
@ -1478,19 +1487,19 @@ The special symbol @samp{.} refers to the current address that
.long .} will cause @code{melvin} to contain its own address. .long .} will cause @code{melvin} to contain its own address.
Assigning a value to @code{.} is treated the same as a @code{.org} Assigning a value to @code{.} is treated the same as a @code{.org}
directive. Thus, the expression @samp{.=.+4} is the same as saying directive. Thus, the expression @samp{.=.+4} is the same as saying
@c if not am29k _if__(!_AMD29K__)
@c @samp{.space 4}. @samp{.space 4}.
@c fi not am29k _fi__(!_AMD29K__)
@c if am29k _if__(_AMD29K__)
@samp{.block 4}. @samp{.block 4}.
@c fi am29k _fi__(_AMD29K__)
@node Symbol Attributes, , Dot, Symbols @node Symbol Attributes, , Dot, Symbols
@section Symbol Attributes @section Symbol Attributes
Every symbol has these attributes: Value, Type, Descriptor, and ``Other''. Every symbol has these attributes: Value, Type, Descriptor, and ``Other''.
@c if internals _if__(_INTERNALS__)
@c The detailed definitions are in <a.out.h>. The detailed definitions are in _0__<a.out.h>_1__.
@c fi internals _fi__(_INTERNALS__)
If you use a symbol without defining it, @code{as} assumes zero for If you use a symbol without defining it, @code{as} assumes zero for
all these attributes, and probably won't warn you. This makes the all these attributes, and probably won't warn you. This makes the
@ -1675,12 +1684,12 @@ Highest Precedence
@dfn{Division}. Truncation is the same as the C operator @samp{/} @dfn{Division}. Truncation is the same as the C operator @samp{/}
@item % @item %
@dfn{Remainder}. @dfn{Remainder}.
@item < @item _0__<_1__
@itemx << @itemx _0__<<_1__
@dfn{Shift Left}. Same as the C operator @samp{<<} @dfn{Shift Left}. Same as the C operator @samp{_0__<<_1__}
@item > @item _0__>_1__
@itemx >> @itemx _0__>>_1__
@dfn{Shift Right}. Same as the C operator @samp{>>} @dfn{Shift Right}. Same as the C operator @samp{_0__>>_1__}
@end table @end table
@item @item
@ -1761,9 +1770,7 @@ Similarly, you can't subtract quantities from two different segments.
* Single:: @code{.single @var{flonums}} * Single:: @code{.single @var{flonums}}
* Stab:: Store debugging information * Stab:: Store debugging information
* Text:: Change to the text segment * Text:: Change to the text segment
@c if am29k or sparc
* Word:: Fill memory with 32-bit integers * Word:: Fill memory with 32-bit integers
@c else (not am29k or sparc)
* Deprecated:: Deprecated Directives * Deprecated:: Deprecated Directives
* Machine Options:: Options * Machine Options:: Options
* Machine Syntax:: Syntax * Machine Syntax:: Syntax
@ -1852,14 +1859,13 @@ to the low 16 bits of an absolute expression.
@section @code{.double @var{flonums}} @section @code{.double @var{flonums}}
@code{.double} expects zero or more flonums, separated by commas. It assembles @code{.double} expects zero or more flonums, separated by commas. It assembles
floating point numbers. floating point numbers.
@c if all-arch _if__(_ALL_ARCH__)
@c The exact kind of floating point numbers The exact kind of floating point numbers emitted depends on how
@c emitted depends on how @code{as} is configured. @xref{Machine @code{as} is configured. @xref{Machine Dependent}.
@c Dependent}. _fi__(_ALL_ARCH__)
@c fi all-arch _if__(_AMD29K__)
@c if am29k
On the AMD 29K family the floating point format used is IEEE. On the AMD 29K family the floating point format used is IEEE.
@c fi am29k _fi__(_AMD29K__)
@node Else, End, Double, Pseudo Ops @node Else, End, Double, Pseudo Ops
@section @code{.else} @section @code{.else}
@ -1916,14 +1922,14 @@ assumed zero. If the first comma and following tokens are absent,
@section @code{.float @var{flonums}} @section @code{.float @var{flonums}}
This directive assembles zero or more flonums, separated by commas. It This directive assembles zero or more flonums, separated by commas. It
has the same effect as @code{.single}. has the same effect as @code{.single}.
@c if all-arch _if__(_ALL_ARCH__)
@c The exact kind of floating point numbers emitted depends on how The exact kind of floating point numbers emitted depends on how
@c @code{as} is configured. @code{as} is configured.
@c @xref{Machine Dependent}. @xref{Machine Dependent}.
@c fi all-arch _fi__(_ALL_ARCH__)
@c if am29k _if__(_AMD29K__)
The floating point format used for the AMD 29K family is IEEE. The floating point format used for the AMD 29K family is IEEE.
@c fi am29k _fi__(_AMD29K__)
@node Global, Ident, Float, Pseudo Ops @node Global, Ident, Float, Pseudo Ops
@section @code{.global @var{symbol}}, @code{.globl @var{symbol}} @section @code{.global @var{symbol}}, @code{.globl @var{symbol}}
@ -2002,28 +2008,26 @@ bss segment, so at run-time the bytes will start off zeroed.
@var{Symbol} is not declared global (@pxref{Global}), so is normally @var{Symbol} is not declared global (@pxref{Global}), so is normally
not visible to @code{ld}. not visible to @code{ld}.
@c if not am29k _if__(!_AMD29K__)
@ignore
@node Line, Ln, Lcomm, Pseudo Ops @node Line, Ln, Lcomm, Pseudo Ops
@section @code{.line @var{line-number}}, @code{.ln @var{line-number}} @section @code{.line @var{line-number}}, @code{.ln @var{line-number}}
@code{.line}, and its alternate spelling @code{.ln}, tell @code{.line}, and its alternate spelling @code{.ln}, tell
@end ignore _fi__(!_AMD29K__)
@c fi not am29k _if__(_AMD29K__)
@c if am29k
@node Ln, List, Line, Pseudo Ops @node Ln, List, Line, Pseudo Ops
@section @code{.ln @var{line-number}} @section @code{.ln @var{line-number}}
Tell Tell
@c fi am29k _fi__(_AMD29K__)
@code{as} to change the logical line number. @var{line-number} must be @code{as} to change the logical line number. @var{line-number} must be
an absolute expression. The next line will have that logical line an absolute expression. The next line will have that logical line
number. So any other statements on the current line (after a statement number. So any other statements on the current line (after a statement
separator character separator character
@c if am29k _if__(_AMD29K__)
@samp{@@}) @samp{@@})
@c fi am29k _fi__(_AMD29K__)
@c if not am29k _if__(!_AMD29K__)
@c @code{;}) @code{;})
@c fi not am29k _fi__(!_AMD29K__)
will be reported as on logical line number will be reported as on logical line number
@var{logical line number} @minus{} 1. @var{logical line number} @minus{} 1.
One day this directive will be unsupported: it is used only One day this directive will be unsupported: it is used only
@ -2121,38 +2125,36 @@ file is the last value stored into it.
@node Short, Single, Set, Pseudo Ops @node Short, Single, Set, Pseudo Ops
@section @code{.short @var{expressions}} @section @code{.short @var{expressions}}
@c if not (sparc or amd29k) _if__(! (_SPARC__ || _AMD29K__) )
@c @code{.short} is the same as @samp{.word}. @xref{Word}. @code{.short} is the same as @samp{.word}. @xref{Word}.
@c fi not (sparc or amd29k) _fi__(! (_SPARC__ || _AMD29K__) )
@c if (sparc or amd29k) _if__(_SPARC__ || _AMD29K__)
This expects zero or more @var{expressions}, and emits This expects zero or more @var{expressions}, and emits
a 16 bit number for each. a 16 bit number for each.
@c fi (sparc or amd29k) _fi__(_SPARC__ || _AMD29K__)
@node Single, Space, Short, Pseudo Ops @node Single, Space, Short, Pseudo Ops
@section @code{.single @var{flonums}} @section @code{.single @var{flonums}}
This directive assembles zero or more flonums, separated by commas. It This directive assembles zero or more flonums, separated by commas. It
has the same effect as @code{.float}. has the same effect as @code{.float}.
@c if all-arch _if__(_ALL_ARCH__)
@c The exact kind of floating point numbers emitted depends on how The exact kind of floating point numbers emitted depends on how
@c @code{as} is configured. @xref{Machine Dependent}. @code{as} is configured. @xref{Machine Dependent}.
@c fi all-arch _fi__(_ALL_ARCH__)
@c if am29k _if__(_AMD29K__)
The floating point format used for the AMD 29K family is IEEE. The floating point format used for the AMD 29K family is IEEE.
@c fi am29k _fi__(_AMD29K__)
@node Space, Space, Single, Pseudo Ops @node Space, Space, Single, Pseudo Ops
@c if not am29k _if__(!_AMD29K__)
@ignore
@section @code{.space @var{size} , @var{fill}} @section @code{.space @var{size} , @var{fill}}
This directive emits @var{size} bytes, each of value @var{fill}. Both This directive emits @var{size} bytes, each of value @var{fill}. Both
@var{size} and @var{fill} are absolute expressions. If the comma @var{size} and @var{fill} are absolute expressions. If the comma
and @var{fill} are omitted, @var{fill} is assumed to be zero. and @var{fill} are omitted, @var{fill} is assumed to be zero.
@end ignore _fi__(!_AMD29K__)
@c fi not am29k
@c if am29k _if__(_AMD29K__)
@section @code{.space} @section @code{.space}
This directive is ignored; it is accepted for compatibility with other This directive is ignored; it is accepted for compatibility with other
AMD 29K assemblers. AMD 29K assemblers.
@ -2161,7 +2163,7 @@ AMD 29K assemblers.
@emph{Warning:} In other versions of GNU @code{as}, the directive @emph{Warning:} In other versions of GNU @code{as}, the directive
@code{.space} has the effect of @code{.block} @xref{Machine Directives}. @code{.space} has the effect of @code{.block} @xref{Machine Directives}.
@end quotation @end quotation
@c fi am29k _fi__(_AMD29K__)
@node Stab, Text, Space, Pseudo Ops @node Stab, Text, Space, Pseudo Ops
@section @code{.stabd, .stabn, .stabs} @section @code{.stabd, .stabn, .stabs}
@ -2228,24 +2230,21 @@ is used.
@section @code{.word @var{expressions}} @section @code{.word @var{expressions}}
This directive expects zero or more @var{expressions}, of any segment, This directive expects zero or more @var{expressions}, of any segment,
separated by commas. separated by commas.
@c if sparc or amd29k _if__(_SPARC__ || _AMD29K__)
For each expression, @code{as} emits a 32-bit number. For each expression, @code{as} emits a 32-bit number.
@c fi sparc or amd29k _fi__(_SPARC__ || _AMD29K__)
@c if not (sparc or amd29k) _if__(! (_SPARC__ || _AMD29K__) )
@c For each expression, @code{as} emits a 16-bit number. For each expression, @code{as} emits a 16-bit number.
@c fi not (sparc or amd29k) _fi__(! (_SPARC__ || _AMD29K__) )
@ignore
@c if all-arch
The byte order
of the expression depends on what kind of computer will run the
program.
@c fi all-arch
@end ignore
@ignore _if__(_ALL_ARCH__)
@c on the 29k this doesn't happen---32-bit addressability, period; no The byte order of the expression depends on what kind of computer will
@c long/short jumps. run the program.
@c if not am29k _fi__(_ALL_ARCH__)
@c on the 29k the "special treatment to support compilers" doesn't
@c happen---32-bit addressability, period; no long/short jumps.
_if__(!_AMD29K__)
@subsection Special Treatment to support Compilers @subsection Special Treatment to support Compilers
In order to assemble compiler output into something that will work, In order to assemble compiler output into something that will work,
@ -2269,15 +2268,13 @@ long-jump to @code{sym4} will be included in the secondary jump table,
and the @code{.word} directives will be adjusted to contain @code{sym3} and the @code{.word} directives will be adjusted to contain @code{sym3}
minus the address of the long-jump to @code{sym4}; and so on, for as many minus the address of the long-jump to @code{sym4}; and so on, for as many
entries in the original jump table as necessary. entries in the original jump table as necessary.
@end ignore
@ignore _if__(_INTERNALS__)
@c if internals
@emph{This feature may be disabled by compiling @code{as} with the @emph{This feature may be disabled by compiling @code{as} with the
@samp{-DWORKING_DOT_WORD} option.} This feature is likely to confuse @samp{-DWORKING_DOT_WORD} option.} This feature is likely to confuse
assembly language programmers. assembly language programmers.
@c fi internals _fi__(_INTERNALS__)
@end ignore _fi__(!_AMD29K__)
@node Deprecated, Machine Dependent, Word, Pseudo Ops @node Deprecated, Machine Dependent, Word, Pseudo Ops
@section Deprecated Directives @section Deprecated Directives
@ -2290,24 +2287,17 @@ They are included for compatibility with older assemblers.
@end table @end table
@node Machine Dependent, Machine Dependent, Pseudo Ops, Top @node Machine Dependent, Machine Dependent, Pseudo Ops, Top
@c if all-arch _if__(_ALL_ARCH__)
@c chapter Machine Dependent Features @chapter Machine Dependent Features
@c fi all-arch _fi__(_ALL_ARCH__)
@c if 680x0
@c chapter Machine Dependent Features: Motorola 680x0 _if__(_VAX__ && !_ALL_ARCH__)
@c fi 680x0 @chapter Machine Dependent Features: VAX
@c if amd29k _fi__(_VAX__ && !_ALL_ARCH__)
@chapter Machine Dependent Features: AMD 29K _if__(_ALL_ARCH__)
@c fi amd29k
@c pesch@cygnus.com: This version of the manual is specifically hacked
@c for gas on a particular machine.
@c We should have a config method of
@c automating this; in the meantime, use ignore
@c for the other architectures (or for their stubs)
@ignore
@c if all-arch
@section Vax @section Vax
@c fi all-arch _fi__(_ALL_ARCH__)
_if__(_VAX__)
@subsection Options @subsection Options
The Vax version of @code{as} accepts any of the following options, The Vax version of @code{as} accepts any of the following options,
@ -2516,9 +2506,12 @@ separated.
@subsection Not Supported @subsection Not Supported
Vax bit fields can not be assembled with @code{as}. Someone Vax bit fields can not be assembled with @code{as}. Someone
can add the required code if they really need it. can add the required code if they really need it.
@end ignore _fi__(_VAX__)
@c if am29k _if__(_AMD29K__ && !_ALL_ARCH__)
@chapter Machine Dependent Features: AMD 29K
_fi__(_AMD29K__ && !_ALL_ARCH__)
_if__(_AMD29K__)
@node Machine Options, Machine Syntax, Machine Dependent, Machine Dependent @node Machine Options, Machine Syntax, Machine Dependent, Machine Dependent
@section Options @section Options
GNU @code{as} has no additional command-line options for the AMD GNU @code{as} has no additional command-line options for the AMD
@ -2652,9 +2645,11 @@ For information on the 29K machine instruction set, see @cite{Am29000
User's Manual}, Advanced Micro Devices, Inc. User's Manual}, Advanced Micro Devices, Inc.
@c fi am29k _fi__(_AMD29K__)
@ignore _if__(_M680X0__ && !_ALL_ARCH__)
@c if 680x0 @chapter Machine Dependent Features: Motorola 680x0
_fi__(_M680X0__ && !_ALL_ARCH__)
_if__(_M680X0__)
@section Options @section Options
The 680x0 version of @code{as} has two machine dependent options. The 680x0 version of @code{as} has two machine dependent options.
One shortens undefined references from 32 to 16 bits, while the One shortens undefined references from 32 to 16 bits, while the
@ -2687,12 +2682,10 @@ Size modifiers are appended directly to the end of the opcode without an
intervening period. For example, write @samp{movl} rather than intervening period. For example, write @samp{movl} rather than
@samp{move.l}. @samp{move.l}.
@c pesch@cygnus.com: Vintage Release c1.37 isn't compiled with _if__(_INTERNALS__)
@c SUN_ASM_SYNTAX.
@c ignore
If @code{as} is compiled with SUN_ASM_SYNTAX defined, it will also allow If @code{as} is compiled with SUN_ASM_SYNTAX defined, it will also allow
Sun-style local labels of the form @samp{1$} through @samp{$9}. Sun-style local labels of the form @samp{1$} through @samp{$9}.
@c end ignore _fi__(_INTERNALS__)
In the following table @dfn{apc} stands for any of the address In the following table @dfn{apc} stands for any of the address
registers (@samp{a0} through @samp{a7}), nothing, (@samp{}), the registers (@samp{a0} through @samp{a7}), nothing, (@samp{}), the
@ -2739,12 +2732,12 @@ or @samp{@var{apc}@@(@var{register}:@var{size}:@var{scale})@@(@var{digits})}
@item Absolute @item Absolute
@samp{@var{symbol}}, or @samp{@var{digits}} @samp{@var{symbol}}, or @samp{@var{digits}}
@c ignore @ignore
@c pesch@cygnus.com: gnu, rich concur the following needs careful @c pesch@cygnus.com: gnu, rich concur the following needs careful
@c research before documenting. @c research before documenting.
, or either of the above followed , or either of the above followed
by @samp{:b}, @samp{:w}, or @samp{:l}. by @samp{:b}, @samp{:w}, or @samp{:l}.
@c end ignore @end ignore
@end table @end table
@section Floating Point @section Floating Point
@ -2787,11 +2780,11 @@ This directive is identical to a @code{.space} directive.
@c pesch@cygnus.com: I don't see any point in the following @c pesch@cygnus.com: I don't see any point in the following
@c paragraph. Bugs are bugs; how does saying this @c paragraph. Bugs are bugs; how does saying this
@c help anyone? @c help anyone?
@c ignore @ignore
Danger: Several bugs have been found in the opcode table (and Danger: Several bugs have been found in the opcode table (and
fixed). More bugs may exist. Be careful when using obscure fixed). More bugs may exist. Be careful when using obscure
instructions. instructions.
@c end ignore @end ignore
@subsection Branch Improvement @subsection Branch Improvement
@ -2892,10 +2885,9 @@ The immediate character is @samp{#} for Sun compatibility. The
line-comment character is @samp{|}. If a @samp{#} appears at the line-comment character is @samp{|}. If a @samp{#} appears at the
beginning of a line, it is treated as a comment unless it looks like beginning of a line, it is treated as a comment unless it looks like
@samp{# line file}, in which case it is treated normally. @samp{# line file}, in which case it is treated normally.
@c fi 680x0 _fi__(_M680X0__)
@end ignore
@c pesch@cygnus.com: see remarks at ignore for vax. @c pesch@cygnus.com: conditionalize, rather than ignore, when filled in.
@ignore @ignore
@section 32x32 @section 32x32
@section Options @section Options
@ -2917,7 +2909,13 @@ understands extended precision numbers.
@subsection Machine Directives @subsection Machine Directives
The 32x32 has no machine dependent directives. The 32x32 has no machine dependent directives.
@end ignore
@c pesch@cygnus.com: stop ignoring this when "syntax" section filled in
@ignore
_if__(_SPARC__ && !_ALL_ARCH__)
@chapter Machine Dependent Features: SPARC
_fi__(_SPARC__ && !_ALL_ARCH__)
@section Sparc @section Sparc
@subsection Options @subsection Options
The sparc has no machine dependent options. The sparc has no machine dependent options.
@ -2967,7 +2965,12 @@ On the Sparc, the .word directive produces 32 bit values,
instead of the 16 bit values it produces on every other machine. instead of the 16 bit values it produces on every other machine.
@end table @end table
@end ignore
_if__(_I80386__ && !_ALL_ARCH__)
@chapter Machine Dependent Features: SPARC
_fi__(_I80386__ && !_ALL_ARCH__)
_if__(_I80386__)
@section Intel 80386 @section Intel 80386
@subsection Options @subsection Options
The 80386 has no machine dependent options. The 80386 has no machine dependent options.
@ -3273,10 +3276,11 @@ is an immediate mode expression and the second operand is a register.
This is just a shorthand, so that, multiplying @samp{%eax} by 69, for This is just a shorthand, so that, multiplying @samp{%eax} by 69, for
example, can be done with @samp{imul $69, %eax} rather than @samp{imul example, can be done with @samp{imul $69, %eax} rather than @samp{imul
$69, %eax, %eax}. $69, %eax, %eax}.
@end ignore _fi__(_I80386__)
@c pesch@cygnus.com: we also ignore the following chapters, but for
@c a different reason---internals are changing
@c rapidly. These may need to be moved to another @c pesch@cygnus.com: we ignore the following chapters, since internals are
@c changing rapidly. These may need to be moved to another
@c book anyhow, if we adopt the model of user/modifier @c book anyhow, if we adopt the model of user/modifier
@c books. @c books.
@ignore @ignore
@ -3633,8 +3637,8 @@ inside the object file. Perhaps we should use the one in
@file{/usr/include}? @file{/usr/include}?
@item as.h @item as.h
This defines all the globally useful things, and pulls in <stdio.h> This defines all the globally useful things, and pulls in _0__<stdio.h>_1__
and <assert.h>. and _0__<assert.h>_1__.
@item bignum.h @item bignum.h
This defines macros useful for dealing with bignums. This defines macros useful for dealing with bignums.
@ -4028,7 +4032,7 @@ This function stores a relocation fixup to be acted on later.
@var{size} is the size of the relocation, and is usually 1 (a single byte), @var{size} is the size of the relocation, and is usually 1 (a single byte),
2 (sixteen bits), or 4 (a longword). 2 (sixteen bits), or 4 (a longword).
The value @var{add_symbol} @minus{} @var{sub_symbol} + @var{offset}, is added to the byte(s) The value @var{add_symbol} @minus{} @var{sub_symbol} + @var{offset}, is added to the byte(s)
at @var{frag->literal[where]}. If @var{pcrel} is non-zero, the address of the at _0__@var{frag->literal[where]}_1__. If @var{pcrel} is non-zero, the address of the
location is subtracted from the result. A relocation entry is also added location is subtracted from the result. A relocation entry is also added
to the @file{a.out} file. @var{add_symbol}, @var{sub_symbol}, and/or to the @file{a.out} file. @var{add_symbol}, @var{sub_symbol}, and/or
@var{offset} may be NULL.@refill @var{offset} may be NULL.@refill