From 24b1493d189c3f1213f03692d1118c6bd0ff86c1 Mon Sep 17 00:00:00 2001 From: Roland Pesch Date: Wed, 27 Nov 1991 21:32:15 +0000 Subject: [PATCH] Hitachi h8/300 config of GAS manual (first draft), and a few config spinoffs in the direction of feature-based config rather than entirely machine-dep. --- gas/doc/Makefile | 3 + gas/doc/a29k-coff.m4 | 4 + gas/doc/a29k.m4 | 4 + gas/doc/as.texinfo | 1256 +++++++++++++++++++++++++++--------------- gas/doc/i80386.m4 | 2 + gas/doc/i960.m4 | 4 + gas/doc/m680x0.m4 | 2 + gas/doc/none.m4 | 9 +- gas/doc/sparc.m4 | 3 + gas/doc/vax.m4 | 2 + 10 files changed, 847 insertions(+), 442 deletions(-) diff --git a/gas/doc/Makefile b/gas/doc/Makefile index d2f0a6fa6c4..c928fffd982 100755 --- a/gas/doc/Makefile +++ b/gas/doc/Makefile @@ -69,6 +69,9 @@ as-a29k-coff.texinfo: as.texinfo pretex.m4 none.m4 a29k-coff.m4 as-gen.texinfo: as.texinfo pretex.m4 none.m4 gen.m4 ${M4} pretex.m4 none.m4 gen.m4 as.texinfo >as-gen.texinfo +as-h8.texinfo: as.texinfo pretex.m4 none.m4 h8.m4 + ${M4} pretex.m4 none.m4 h8.m4 as.texinfo >as-h8.texinfo + as-i80386.texinfo: as.texinfo pretex.m4 none.m4 i80386.m4 ${M4} pretex.m4 none.m4 i80386.m4 as.texinfo >as-i80386.texinfo diff --git a/gas/doc/a29k-coff.m4 b/gas/doc/a29k-coff.m4 index 6d9173629ef..9dfcc274db6 100644 --- a/gas/doc/a29k-coff.m4 +++ b/gas/doc/a29k-coff.m4 @@ -7,4 +7,8 @@ _define__(<_AOUT__>,<0>) _define__(<_BOUT__>,<0>) _define__(<_COFF__>,<1>) _define__(<_ELF__>,<0>) +_define__(<_DIFFTABKLUG__>,0) NO difference-table kluge +_define__(<_IEEEFLOAT__>,1) IEEE floating point +_define__(<_W32__>,1) 32-bit words +_define__(<_W16__>,0) _divert__<> \ No newline at end of file diff --git a/gas/doc/a29k.m4 b/gas/doc/a29k.m4 index 6210f44510e..17819daa7e6 100644 --- a/gas/doc/a29k.m4 +++ b/gas/doc/a29k.m4 @@ -2,4 +2,8 @@ _divert__(-1) _define__(<_A29K__>,<1>) _define__(<_HOST__>,) _define__(<_MACH_DEP__>,) +_define__(<_DIFFTABKLUG__>,0) NO difference-table kluge +_define__(<_IEEEFLOAT__>,1) IEEE floating point +_define__(<_W32__>,1) 32-bit words +_define__(<_W16__>,0) _divert__<> \ No newline at end of file diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index eabc0295253..b3086d27743 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -6,6 +6,9 @@ _fi__(_GENERIC__) _if__(_A29K__ && !_GENERIC__) @setfilename as-29k.info _fi__(_A29K__ && !_GENERIC__) +_if__(_H8__ && !_GENERIC__) +@setfilename h8-300.info +_fi__(_H8__ && !_GENERIC__) _if__(_I960__ && !_GENERIC__) @setfilename as-960.info _fi__(_I960__ && !_GENERIC__) @@ -137,12 +140,12 @@ _fi__(!_GENERIC__) * Overview:: Overview * Invoking:: Command-Line Options * Syntax:: Syntax -* Segments:: Segments and Relocation +* Sections:: Sections and Relocation * Symbols:: Symbols * Expressions:: Expressions * Pseudo Ops:: Assembler Directives * Machine Dependent:: Machine Dependent Features -* License:: GNU GENERAL PUBLIC LICENSE +* Copying:: GNU GENERAL PUBLIC LICENSE @end menu @node Overview, Invoking, Top, Top @@ -168,6 +171,9 @@ Here is a brief summary of how to invoke @code{_AS__}. For details, _if__(_A29K__) @c am29k has no machine-dependent assembler options _fi__(_A29K__) +_if__(_H8__) +@c h8/300 has no machine-dependent assembler options +_fi__(_H8__) _if__(_I960__) @c see md_parse_option in i960.c [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ] @@ -192,9 +198,9 @@ other assemblers; it has no effect on @code{_AS__}. Add @var{path} to the search list for @code{.include} directives @item -k -_if__((!_GENERIC__) && (_A29K__ || _I960__)) +_if__((!_GENERIC__) && _DIFFTABKLUG__) This option is accepted but has no effect on the _HOST__ family. -_fi__((!_GENERIC__) && (_A29K__ || _I960__)) +_fi__((!_GENERIC__) && _DIFFTABKLUG__) _if__(_GENERIC__) Issue warnings when difference tables altered for long displacements. _fi__(_GENERIC__) @@ -206,7 +212,7 @@ Keep (in symbol table) local symbols, starting with @samp{L} Name the object-file output from @code{_AS__} @item -R -Fold data segment into text segment +Fold data section into text section @item -v Announce @code{as} version @@ -347,10 +353,20 @@ write assembly language programs; but directives for debugging symbols are typically different in different file formats. @xref{Symbol Attributes,,Symbol Attributes}. _if__(!_GENERIC__) -_if__(!_I960__) +_if__(!(_I960__||_A29K__)) +_if__(_AOUT__ && (!_COFF__) && (!_ELF__)) On the _HOST__, @code{_AS__} is configured to produce @code{a.out} format object files.@refill -_fi__(!_I960__) +_fi__(_AOUT__ && (!_COFF__) && (!_ELF__)) +_if__((!_AOUT__) && _COFF__ && (!_ELF__)) +On the _HOST__, @code{_AS__} is configured to produce COFF format object +files.@refill +_fi__((!_AOUT__) && _COFF__ && (!_ELF__)) +_fi__(!(_I960__||_A29K__)) +_if__(_A29K__) +On the _HOST__, @code{_AS__} can be configured to produce either +@code{a.out} or COFF format object files. +_fi__(_A29K__) _if__(_I960__) On the _HOST__, @code{_AS__} can be configured to produce either @code{b.out} or COFF format object files. @@ -525,21 +541,21 @@ searches any @samp{-I} directories in the same order as they were specified (left to right) on the command line. @subsection Difference Tables: @code{-k} -_if__((!_GENERIC__) && (_A29K__ || _I960__)) +_if__((!_GENERIC__) && (!_DIFFTABKLUG__)) On the _HOST__ family, this option is allowed, but has no effect. It is permitted for compatibility with the GNU assembler on other platforms, where it can be used to warn when the assembler alters the machine code generated for @samp{.word} directives in difference tables. The _HOST__ family does not have the addressing limitations that sometimes lead to this alteration on other platforms. -_fi__((!_GENERIC__) && (_A29K__ || _I960__)) +_fi__((!_GENERIC__) && (!_DIFFTABKLUG__)) -_if__(_GENERIC__ || (! _A29K__ || _I960__ )) +_if__(_GENERIC__ || _DIFFTABKLUG__ ) @code{_AS__} sometimes alters the code emitted for directives of the form @samp{.word @var{sym1}-@var{sym2}}; @pxref{Word,,@code{.word}}. You can use the @samp{-k} option if you want a warning issued when this is done. -_fi__(_GENERIC__ || (! _A29K__ || _I960__ )) +_fi__(_GENERIC__ || _DIFFTABKLUG__ ) @subsection Include Local Labels: @code{-L} Labels beginning with @samp{L} (upper case only) are called @dfn{local @@ -561,17 +577,21 @@ takes exactly one filename) to give the object file a different name. Whatever the object file is called, @code{_AS__} will overwrite any existing file of the same name. -@subsection Join Data and Text Segments: @code{-R} +@subsection Join Data and Text Sections: @code{-R} +_if__(_COFF__) +This option is only useful if you use sections named @samp{.text} and +@samp{.data}. +_fi__(_COFF__) @code{-R} tells @code{_AS__} to write the object file as if all -data-segment data lives in the text segment. This is only done at +data-section data lives in the text section. This is only done at the very last moment: your binary data are the same, but data -segment parts are relocated differently. The data segment part of +section parts are relocated differently. The data section part of your object file is zero bytes long because all it bytes are -appended to the text segment. (@xref{Segments,,Segments and Relocation}.) +appended to the text section. (@xref{Sections,,Sections and Relocation}.) When you specify @code{-R} it would be possible to generate shorter address displacements (because we don't have to cross between text and -data segment). We refrain from doing this simply for compatibility with +data section). We refrain from doing this simply for compatibility with older versions of @code{_AS__}. In future, @code{-R} may work this way. @subsection Announce Version: @code{-v} @@ -589,7 +609,7 @@ affects the warning messages: it does not change any particular of how @code{_AS__} assembles your file. Errors, which stop the assembly, are still reported. -@node Syntax, Segments, Invoking, Top +@node Syntax, Sections, Invoking, Top @chapter Syntax This chapter describes the machine-independent syntax allowed in a source file. @code{_AS__} syntax is similar to what many other assemblers @@ -679,6 +699,9 @@ _fi__(_M680X0__) _if__(_A29K__) @samp{;} for the AMD 29K family; _fi__(_A29K__) +_if__(_H8__) +@samp{;} for the _HOST__ family; +_fi__(_H8__) @pxref{_MACH_DEP__}. @refill @c FIXME: fill in SPARC line comment char @@ -708,8 +731,18 @@ of @code{_AS__}. @node Symbol Intro, Statements, Comments, Syntax @section Symbols A @dfn{symbol} is one or more characters chosen from the set of all -letters (both upper and lower case), digits and the three characters -@samp{_.$}. No symbol may begin with a digit. Case is significant. +letters (both upper and lower case), digits and +_if__(!_H8__) +the three characters @samp{_.$} +_fi__(!_H8__) +_if__(_H8__) +the two characters @samp{_.} +_if__(_GENERIC__) +On most machines, you can also use @code{$} in symbol names; exceptions +are noted in @ref{_MACH_DEP__}. +_fi__(_GENERIC__) +_fi__(_H8__) +No symbol may begin with a digit. Case is significant. There is no length limit: all characters are significant. Symbols are delimited by characters not in that set, or by the beginning of a file (since the source program must end with a newline, the end of a file is @@ -717,18 +750,34 @@ not a possible symbol delimiter). @xref{Symbols}. @node Statements, Constants, Symbol Intro, Syntax @section Statements -_if__(!_A29K__) +_if__(!_GENERIC__) +_if__(!(_A29K__||_H8__)) A @dfn{statement} ends at a newline character (@samp{\n}) or at a semicolon (@samp{;}). The newline or semicolon is considered part of the preceding statement. Newlines and semicolons within character constants are an exception: they don't end statements. -_fi__(!_A29K__) +_fi__(!(_A29K__||_H8__)) _if__(_A29K__) A @dfn{statement} ends at a newline character (@samp{\n}) or an ``at'' sign (@samp{@@}). The newline or at sign is considered part of the preceding statement. Newlines and at signs within character constants are an exception: they don't end statements. _fi__(_A29K__) +_if__(_H8__) +A @dfn{statement} ends at a newline character (@samp{\n}) or a dollar +sign (@samp{$}). The newline or dollar sign is considered part of the +preceding statement. Newlines and dollar signs within character constants +are an exception: they don't end statements. +_fi__(_H8__) +_fi__(!_GENERIC__) +_if__(_GENERIC__) +A @dfn{statement} ends at a newline character (@samp{\n}) or line +separator character. (The line separator is usually @samp{;}, unless +this conflicts with the comment character; @pxref{_MACH_DEP__}.) The +newline or separator character is considered part of the preceding +statement. Newlines and separators within character constants are an +exception: they don't end statements. +_fi__(_GENERIC__) It is an error to end any statement with end-of-file: the last character of any input file should be a newline.@refill @@ -765,7 +814,7 @@ have whitespace between a label's symbol and its colon. @xref{Labels}. @smallexample label: .directive followed by something -another$label: # This is an empty statement. +another_label: # This is an empty statement. instruction operand_1, operand_2, @dots{} @end smallexample @@ -871,12 +920,17 @@ to strings. So if you want to write the character backslash, you must write @kbd{'\\} where the first @code{\} escapes the second @code{\}. As you can see, the quote is an acute accent, not a grave accent. A newline -_if__(!_A29K__) +_if__(!_GENERIC__) +_if__(!(_A29K__||_H8__)) (or semicolon @samp{;}) -_fi__(!_A29K__) +_fi__(!(_A29K__||_H8__)) _if__(_A29K__) (or at sign @samp{@@}) _fi__(_A29K__) +_if__(_H8__) +(or dollar sign @samp{$}) +_fi__(_H8__) +_fi__(!_GENERIC__) immediately 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 constant in a numeric expression is the machine's byte-wide code for @@ -955,13 +1009,13 @@ will work here, but that might be changed. Vax BSD 4.2 assembler seems to allow any of @samp{defghDEFGH}.) @end ignore _fi__(_GENERIC__) -_if__(_A29K__) +_if__(_A29K__||_H8__) _if__(_GENERIC__) -On the AMD 29K architecture, the letter must be: +On the AMD 29K and H8/300 architectures, the letter must be: _fi__(_GENERIC__) One of the letters @samp{DFPRSX} (in upper or lower case), to tell @code{_AS__} the rest of the number is a flonum. -_fi__(_A29K__) +_fi__(_A29K__||_H8__) _if__(_I960__) _if__(_GENERIC__) On the Intel 960 architecture, the letter must be: @@ -1027,22 +1081,24 @@ The directives @code{.byte}, @code{.hword}, @code{.int}, @code{.long}, @code{.short}, and @code{.word} accept bit-field arguments. _fi__(_I960__&&!_GENERIC__) -@node Segments, Symbols, Syntax, Top -@chapter Segments and Relocation +@node Sections, Symbols, Syntax, Top +@chapter Sections and Relocation @menu -* Segs Background:: Background -* _LD__ Segments:: _LD__ Segments -* _AS__ Segments:: _AS__ Internal Segments -* Sub-Segments:: Sub-Segments -* bss:: bss Segment +* Secs Background:: Background +* _LD__ Sections:: _LD__ Sections +* _AS__ Sections:: _AS__ Internal Sections +_if__(!_H8__) +* Sub-Sections:: Sub-Sections +_fi__(!_H8__) +* bss:: bss Section @end menu -@node Segs Background, _LD__ Segments, Segments, Segments +@node Secs Background, _LD__ Sections, Sections, Sections @section Background -Roughly, a segment is a range of addresses, with no gaps; all data +Roughly, a section is a range of addresses, with no gaps; all data ``in'' those addresses is treated the same for some particular purpose. -For example there may be a ``read only'' segment. +For example there may be a ``read only'' section. The linker @code{_LD__} reads many object files (partial programs) and combines their contents to form a runnable program. When @code{_AS__} @@ -1050,33 +1106,34 @@ emits an object file, the partial program is assumed to start at address 0. @code{_LD__} will assign the final addresses the partial program occupies, so that different partial programs don't overlap. This is actually an over-simplification, but it will suffice to explain how -@code{_AS__} uses segments. +@code{_AS__} uses sections. @code{_LD__} moves blocks of bytes of your program to their run-time addresses. These blocks slide to their run-time addresses as rigid units; their length does not change and neither does the order of bytes -within them. Such a rigid unit is called a @emph{segment}. Assigning -run-time addresses to segments is called @dfn{relocation}. It includes +within them. Such a rigid unit is called a @emph{section}. Assigning +run-time addresses to sections is called @dfn{relocation}. It includes the task of adjusting mentions of object-file addresses so they refer to the proper run-time addresses. -An object file written by @code{_AS__} has three segments, any of which may -be empty. These are named @dfn{text}, @dfn{data} and @dfn{bss} -segments. -_if__(_COFF__) +An object file written by @code{_AS__} has at least three sections, any +of which may be empty. These are named @dfn{text}, @dfn{data} and +@dfn{bss} sections. -@c Thanks, Rich! -@quotation -@emph{Warning:} @code{_AS__} can only assign output to one of these -three segments, even when configured for COFF output; the -@code{.section} directive is not supported. -@end quotation +_if__(_COFF__) +_if__(_GENERIC__) +When it generates COFF output, +_fi__(_GENERIC__) +@code{_AS__} can also generate whatever other named sections you specify +using the @samp{.section} directive (@pxref{Section,,@code{.section}}). +If you don't use any directives that place output in the @samp{.text} +or @samp{.data} sections, these sections will still exist, but will be empty. _fi__(_COFF__) -Within the object file, the text segment starts at address @code{0}, the -data segment follows, and the bss segment follows the data segment. +Within the object file, the text section starts at address @code{0}, the +data section follows, and the bss section follows the data section. -To let @code{_LD__} know which data will change when the segments are +To let @code{_LD__} know which data will change when the sections are relocated, and how to change that data, @code{_AS__} also writes to the object file details of the relocation needed. To perform relocation @code{_LD__} must know, each time an address in the object @@ -1088,9 +1145,9 @@ an address? @item How long (in bytes) is this reference? @item -Which segment does the address refer to? What is the numeric value of +Which section does the address refer to? What is the numeric value of @display -(@var{address}) @minus{} (@var{start-address of segment})? +(@var{address}) @minus{} (@var{start-address of section})? @end display @item Is the reference to an address ``Program-Counter relative''? @@ -1098,84 +1155,96 @@ Is the reference to an address ``Program-Counter relative''? In fact, every address @code{_AS__} ever uses is expressed as @display -(@var{segment}) + (@var{offset into segment}) +(@var{section}) + (@var{offset into section}) @end display @noindent -Further, every expression @code{_AS__} computes is of this segmented -nature. @dfn{Absolute expression} means an expression with segment -``absolute'' (@pxref{_LD__ Segments}). A @dfn{pass1 expression} means -an expression with segment ``pass1'' (@pxref{_AS__ Segments,,_AS__ -Internal Segments}). In this manual we use the notation @{@var{segname} -@var{N}@} to mean ``offset @var{N} into segment @var{segname}''. - -Apart from text, data and bss segments you need to know about the -@dfn{absolute} segment. When @code{_LD__} mixes partial programs, -addresses in the absolute segment remain unchanged. That is, address +Further, every expression @code{_AS__} computes is of this section-relative +nature. @dfn{Absolute expression} means an expression with section +``absolute'' (@pxref{_LD__ Sections}). A @dfn{pass1 expression} means +an expression with section ``pass1'' (@pxref{_AS__ Sections,,_AS__ +Internal Sections}). In this manual we use the notation @{@var{secname} +@var{N}@} to mean ``offset @var{N} into section @var{secname}''. + +Apart from text, data and bss sections you need to know about the +@dfn{absolute} section. When @code{_LD__} mixes partial programs, +addresses in the absolute section remain unchanged. That is, address @code{@{absolute 0@}} is ``relocated'' to run-time address 0 by @code{_LD__}. -Although two partial programs' data segments will not overlap addresses -after linking, @emph{by definition} their absolute segments will overlap. +Although two partial programs' data sections will not overlap addresses +after linking, @emph{by definition} their absolute sections will overlap. Address @code{@{absolute@ 239@}} in one partial program will always be the same address when the program is running as address @code{@{absolute@ 239@}} in any other partial program. -The idea of segments is extended to the @dfn{undefined} segment. Any -address whose segment is unknown at assembly time is by definition +The idea of sections is extended to the @dfn{undefined} section. Any +address whose section is unknown at assembly time is by definition rendered @{undefined @var{U}@}---where @var{U} will be filled in later. Since numbers are always defined, the only way to generate an undefined address is to mention an undefined symbol. A reference to a named common block would be such a symbol: its value is unknown at assembly -time so it has segment @emph{undefined}. +time so it has section @emph{undefined}. -By analogy the word @emph{segment} is used to describe groups of segments in +By analogy the word @emph{section} is used to describe groups of sections in the linked program. @code{_LD__} puts all partial programs' text -segments in contiguous addresses in the linked program. It is -customary to refer to the @emph{text segment} of a program, meaning all -the addresses of all partial program's text segments. Likewise for -data and bss segments. +sections in contiguous addresses in the linked program. It is +customary to refer to the @emph{text section} of a program, meaning all +the addresses of all partial program's text sections. Likewise for +data and bss sections. -Some segments are manipulated by @code{_LD__}; others are invented for +Some sections are manipulated by @code{_LD__}; others are invented for use of @code{_AS__} and have no meaning except during assembly. -@node _LD__ Segments, _AS__ Segments, Segs Background, Segments -@section _LD__ Segments -@code{_LD__} deals with just five kinds of segments, summarized below. +@node _LD__ Sections, _AS__ Sections, Secs Background, Sections +@section _LD__ Sections +@code{_LD__} deals with just four kinds of sections, summarized below. @table @strong -@item text segment -@itemx data segment -These segments hold your program. @code{_AS__} and @code{_LD__} treat them as -separate but equal segments. Anything you can say of one segment is -true of the other. When the program is running, however, it is -customary for the text segment to be unalterable. The -text segment is often shared among processes: it will contain -instructions, constants and the like. The data segment of a running +_if__(_GENERIC__||_COFF__) +@item named sections +_fi__(_GENERIC__||_COFF__) +_if__(_AOUT__||_BOUT__) +@item text section +@itemx data section +_fi__(_AOUT__||_BOUT__) +These sections hold your program. @code{_AS__} and @code{_LD__} treat them as +separate but equal sections. Anything you can say of one section is +true another. +_if__(_AOUT__||_BOUT__) +When the program is running, however, it is +customary for the text section to be unalterable. The +text section is often shared among processes: it will contain +instructions, constants and the like. The data section of a running program is usually alterable: for example, C variables would be stored -in the data segment. +in the data section. +_fi__(_AOUT__||_BOUT__) -@item bss segment -This segment contains zeroed bytes when your program begins running. It +@item bss section +This section contains zeroed bytes when your program begins running. It is used to hold unitialized variables or common storage. The length of -each partial program's bss segment is important, but because it starts +each partial program's bss section is important, but because it starts out containing zeroed bytes there is no need to store explicit zero -bytes in the object file. The bss segment was invented to eliminate +bytes in the object file. The bss section was invented to eliminate those explicit zeros from object files. -@item absolute segment -Address 0 of this segment is always ``relocated'' to runtime address 0. +@item absolute section +Address 0 of this section is always ``relocated'' to runtime address 0. This is useful if you want to refer to an address that @code{_LD__} must not change when relocating. In this sense we speak of absolute addresses being ``unrelocatable'': they don't change during relocation. -@item undefined segment -This ``segment'' is a catch-all for address references to objects not in -the preceding segments. +@item undefined section +This ``section'' is a catch-all for address references to objects not in +the preceding sections. @c FIXME: ref to some other doc on obj-file formats could go here. @end table -An idealized example of the three relocatable segments follows. Memory -addresses are on the horizontal axis. +An idealized example of three relocatable sections follows. +_if__(_COFF__) +The example uses the traditional names @samp{.text} and @samp{.data} for +two named sections. +_fi__(_COFF__) +Memory addresses are on the horizontal axis. @c TEXI2ROFF-KILL @ifinfo @@ -1200,6 +1269,7 @@ linked program: | |TTT|ttttt| |dddd|DDD|00000| @end smallexample @c TEXI2ROFF-KILL @end ifinfo +@c FIXME make sure no page breaks inside figure!! @tex {\it Partial program \#1: } @@ -1226,38 +1296,44 @@ DDDD}\boxit{2cm}{\tt 00000}\ \dots\hfil} @end tex @c END TEXI2ROFF-KILL -@node _AS__ Segments, Sub-Segments, _LD__ Segments, Segments -@section _AS__ Internal Segments -These segments are invented for the internal use of @code{_AS__}. They -have no meaning at run-time. You don't need to know about these -segments except that they might be mentioned in the @code{_AS__} warning -messages. These segments are invented to permit the value of every -expression in your assembly language program to be a segmented -address. +_if__(!_H8__) +@node _AS__ Sections, Sub-Sections, _LD__ Sections, Sections +_fi__(!_H8__) +_if__(_H8__) +@node _AS__ Sections, bss, _LD__ Sections, Sections +_fi__(_H8__) +@section _AS__ Internal Sections +These sections are meant only for the internal use of @code{_AS__}. They +have no meaning at run-time. You don't really need to know about these +sections for most purposes; but they can be mentioned in @code{_AS__} +warning messages, so it might be helpful to have an idea of their +meanings to @code{_AS__}. These sections are used to permit the +value of every expression in your assembly language program to be a +section-relative address. @table @b -@item absent segment -An expression was expected and none was -found. - -@item goof segment -An internal assembler logic error has been -found. This means there is a bug in the assembler. - -@item grand segment -A @dfn{grand number} is a bignum or a flonum, but not an integer. If a -number can't be written as a C @code{int} constant, it is a grand -number. @code{_AS__} has to remember that a flonum or a bignum does not -fit into 32 bits, and cannot be an argument (@pxref{Arguments}) in an -expression: this is done by making a flonum or bignum be in segment -grand. This is purely for internal @code{_AS__} convenience; grand -segment behaves similarly to absolute segment. - -@item pass1 segment +@item absent +An expression was expected and none was found. + +@item ASSEMBLER-INTERNAL-LOGIC-ERROR! +An internal assembler logic error has been found. This means there is a +bug in the assembler. + +@item bignum/flonum +If a number can't be written as a C @code{int} constant (a bignum or a +flonum, but not an integer), it is recorded as belonging to this +``section''. @code{_AS__} has to remember that a flonum or a bignum +does not fit into 32 bits, and cannot be an argument (@pxref{Arguments}) +in an expression: this is done by making a flonum or bignum be in a +separate internal section. This is purely for internal @code{_AS__} +convenience; bignum/flonum section behaves similarly to absolute +section. + +@item pass1 section The expression was impossible to evaluate in the first pass. The assembler will attempt a second pass (second reading of the source) to evaluate the expression. Your expression mentioned an undefined symbol -in a way that defies the one-pass (segment + offset in segment) assembly +in a way that defies the one-pass (section + offset in section) assembly process. No compiler need emit such an expression. @quotation @@ -1265,49 +1341,57 @@ process. No compiler need emit such an expression. will abort with an error message if one is required. @end quotation -@item difference segment +@item difference section As an assist to the C compiler, expressions of the forms @display (@var{undefined symbol}) @minus{} (@var{expression}) @var{something} @minus{} (@var{undefined symbol}) (@var{undefined symbol}) @minus{} (@var{undefined symbol}) @end display -are permitted, and belong to the difference segment. @code{_AS__} +are permitted, and belong to the difference section. @code{_AS__} re-evaluates such expressions after the source file has been read and the symbol table built. If by that time there are no undefined symbols -in the expression then the expression assumes a new segment. The +in the expression then the expression assumes a new section. The intention is to permit statements like @samp{.word label - base_of_table} to be assembled in one pass where both @code{label} and @code{base_of_table} are undefined. This is useful for compiling C and Algol switch statements, Pascal case statements, FORTRAN computed goto statements and the like. +@c FIXME item debug +@c FIXME item transfer[t] vector preload +@c FIXME item transfer[t] vector postload +@c FIXME item register @end table -@node Sub-Segments, bss, _AS__ Segments, Segments -@section Sub-Segments -Assembled bytes fall into two segments: text and data. -Because you may have groups of text or data that you want to end up near -to each other in the object file, @code{_AS__} allows you to use -@dfn{subsegments}. Within each segment, there can be numbered -subsegments with values from 0 to 8192. Objects assembled into the same -subsegment will be grouped with other objects in the same subsegment -when they are all put into the object file. For example, a compiler -might want to store constants in the text segment, but might not want to -have them interspersed with the program being assembled. In this case, -the compiler could issue a @code{text 0} before each section of code -being output, and a @code{text 1} before each group of constants being -output. - -Subsegments are optional. If you don't use subsegments, everything -will be stored in subsegment number zero. +@node Sub-Sections, bss, _AS__ Sections, Sections +@section Sub-Sections +Assembled bytes +_if__(_COFF__) +conventionally +_fi__(_COFF__) +fall into two sections: text and data. Because you may have groups of +text or data that you want to end up near to each other in the object +file, @code{_AS__} allows you to use @dfn{subsections} of these two +sections. Within each section, there can be numbered subsections with +values from 0 to 8192. Objects assembled into the same subsection will +be grouped with other objects in the same subsection when they are all +put into the object file. For example, a compiler might want to store +constants in the text section, but might not want to have them +interspersed with the program being assembled. In this case, the +compiler could issue a @samp{.text 0} before each section of code being +output, and a @samp{.text 1} before each group of constants being output. + +Subsections are optional. If you don't use subsections, everything +will be stored in subsection number zero. _if__(_GENERIC__) -Each subsegment is zero-padded up to a multiple of four bytes. -(Subsegments may be padded a different amount on different flavors +Each subsection is zero-padded up to a multiple of four bytes. +(Subsections may be padded a different amount on different flavors of @code{_AS__}.) _fi__(_GENERIC__) _if__(_I960__) +@c FIXME section padding (alignment)? @c Rich Pixley says padding here depends on target obj code format; that @c doesn't seem particularly useful to say without further elaboration, @c so for now I say nothing about it. If this is a generic BFD issue, @@ -1315,17 +1399,17 @@ _if__(_I960__) @c discussed in BFD chapter of binutils (or some such). _fi__(_I960__) _if__(_A29K__) -On the AMD 29K family, no particular padding is added to segment sizes; +On the AMD 29K family, no particular padding is added to section sizes; _AS__ forces no alignment on this platform. _fi__(_A29K__) -Subsegments appear in your object file in numeric order, lowest numbered +Subsections appear in your object file in numeric order, lowest numbered 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 subsections; @code{_LD__} and other programs that manipulate object files will see no trace of them. -They just see all your text subsegments as a text segment, and all your -data subsegments as a data segment. +They just see all your text subsections as a text section, and all your +data subsections as a data section. -To specify which subsegment you want subsequent statements assembled +To specify which subsection you want subsequent statements assembled into, use a @samp{.text @var{expression}} or a @samp{.data @var{expression}} statement. @var{Expression} should be an absolute expression. (@xref{Expressions}.) If you just say @samp{.text} @@ -1333,41 +1417,46 @@ then @samp{.text 0} is assumed. Likewise @samp{.data} means @samp{.data 0}. Assembly begins in @code{text 0}. For instance: @smallexample -.text 0 # The default subsegment is text 0 anyway. -.ascii "This lives in the first text subsegment. *" +.text 0 # The default subsection is text 0 anyway. +.ascii "This lives in the first text subsection. *" .text 1 -.ascii "But this lives in the second text subsegment." +.ascii "But this lives in the second text subsection." .data 0 -.ascii "This lives in the data segment," -.ascii "in the first data subsegment." +.ascii "This lives in the data section," +.ascii "in the first data subsection." .text 0 -.ascii "This lives in the first text segment," +.ascii "This lives in the first text section," .ascii "immediately following the asterisk (*)." @end smallexample -Each segment has a @dfn{location counter} incremented by one for every -byte assembled into that segment. Because subsegments are merely a -convenience restricted to @code{_AS__} there is no concept of a subsegment +Each section has a @dfn{location counter} incremented by one for every +byte assembled into that section. Because subsections are merely a +convenience restricted to @code{_AS__} there is no concept of a subsection location counter. There is no way to directly manipulate a location counter---but the @code{.align} directive will change it, and any label definition will capture its current value. The location counter of the -segment that statements are being assembled into is said to be the +section that statements are being assembled into is said to be the @dfn{active} location counter. -@node bss, , Sub-Segments, Segments -@section bss Segment -The bss segment is used for local common variable storage. -You may allocate address space in the bss segment, but you may +_if__(!_H8__) +@node bss, , Sub-Sections, Sections +_fi__(!_H8__) +_if__(_H8__) +@node bss, , _AS__ Sections, Sections +_fi__(_H8__) +@section bss Section +The bss section is used for local common variable storage. +You may allocate address space in the bss section, but you may not dictate data to load into it before your program executes. When your program starts running, all the contents of the bss -segment are zeroed bytes. +section are zeroed bytes. -Addresses in the bss segment are allocated with special directives; you -may not assemble anything directly into the bss segment. Hence there -are no bss subsegments. @xref{Comm,,@code{.comm}}, +Addresses in the bss section are allocated with special directives; you +may not assemble anything directly into the bss section. Hence there +are no bss subsections. @xref{Comm,,@code{.comm}}, @pxref{Lcomm,,@code{.lcomm}}. -@node Symbols, Expressions, Segments, Top +@node Symbols, Expressions, Sections, Top @chapter Symbols Symbols are a central concept: the programmer uses symbols to name things, the linker uses symbols to link, and the debugger uses symbols @@ -1404,9 +1493,28 @@ directive. @xref{Set,,@code{.set}}. @node Symbol Names, Dot, Setting Symbols, Symbols @section Symbol Names -Symbol names begin with a letter or with one of @samp{$._}. That -character may be followed by any string of digits, letters, -underscores and dollar signs. Case of letters is significant: +Symbol names begin with a letter or with one of +_if__(!_H8__) +@samp{_.$} +_fi__(!_H8__) +_if__(_H8__) +@samp{_.} +_if__(_GENERIC__) +(On most machines, you can also use @code{$} in symbol names; exceptions +are noted in @ref{_MACH_DEP__}.) +_fi__(_GENERIC__) +_fi__(_H8__) +That character may be followed by any string of digits, letters, +_if__(!_H8__) +underscores and dollar signs. +_fi__(!_H8__) +_if__(_H8__) +_if__(_GENERIC__) +dollar signs (unless otherwise noted in @ref{_MACH_DEP}), +_fi__(_GENERIC__) +and underscores. +_fi__(_H8__) +Case of letters is significant: @code{foo} is a different symbol name than @code{Foo}. _if__(_A29K__) @@ -1516,13 +1624,13 @@ _fi__(_COFF__) @node Symbol Value, Symbol Type, Symbol Attributes, Symbol Attributes @subsection Value -The value of a symbol is (usually) 32 bits, the size of one GNU C -@code{int}. For a symbol which labels a location in the text, data, bss -or absolute segments the value is the number of addresses from the start -of that segment to the label. Naturally for text, data and bss segments -the value of a symbol changes as @code{_LD__} changes segment base -addresses during linking. Absolute symbols' values do not change during -linking: that is why they are called absolute. +The value of a symbol is (usually) 32 bits. For a symbol which labels a +location in the text, data, bss or absolute sections the value is the +number of addresses from the start of that section to the label. +Naturally for text, data and bss sections the value of a symbol changes +as @code{_LD__} changes section base addresses during linking. Absolute +symbols' values do not change during linking: that is why they are +called absolute. The value of an undefined symbol is treated in a special way. If it is 0 then the symbol is not defined in this assembler source program, and @@ -1535,7 +1643,7 @@ allocated storage. @node Symbol Type, a.out Symbols, Symbol Value, Symbol Attributes @subsection Type -The type attribute of a symbol contains relocation (segment) +The type attribute of a symbol contains relocation (section) information, any flag settings indicating that a symbol is external, and (optionally), other information for linkers and debuggers. The exact format depends on the object-code output format in use. @@ -1634,8 +1742,8 @@ the machine language, we use the term ``argument'' to refer to parts of expressions only, reserving the word ``operand'' to refer only to machine instruction operands. -Symbols are evaluated to yield @{@var{segment} @var{NNN}@} where -@var{segment} is one of text, data, bss, absolute, +Symbols are evaluated to yield @{@var{section} @var{NNN}@} where +@var{section} is one of text, data, bss, absolute, or undefined. @var{NNN} is a signed, 2's complement 32 bit integer. @@ -1726,25 +1834,25 @@ Lowest Precedence @table @code @item + @dfn{Addition}. If either argument is absolute, the result -has the segment of the other argument. +has the section of the other argument. If either argument is pass1 or undefined, the result is pass1. Otherwise @code{+} is illegal. @item - @dfn{Subtraction}. If the right argument is absolute, the -result has the segment of the left argument. +result has the section of the left argument. If either argument is pass1 the result is pass1. -If either argument is undefined the result is difference segment. -If both arguments are in the same segment, the result is absolute---provided -that segment is one of text, data or bss. +If either argument is undefined the result is difference section. +If both arguments are in the same section, the result is absolute---provided +that section is one of text, data or bss. Otherwise subtraction is illegal. @end table @end enumerate The sense of the rule for addition is that it's only meaningful to add -the @emph{offsets} in an address; you can only have a defined segment in +the @emph{offsets} in an address; you can only have a defined section in one of the two arguments. -Similarly, you can't subtract quantities from two different segments. +Similarly, you can't subtract quantities from two different sections. @node Pseudo Ops, _MACH_DEP__, Expressions, Top @chapter Assembler Directives @@ -1770,7 +1878,7 @@ _fi__(_BOUT__&&!_COFF__) * Asciz:: @code{.asciz "@var{string}"}@dots{} * Byte:: @code{.byte @var{expressions}} * Comm:: @code{.comm @var{symbol} , @var{length} } -* Data:: @code{.data @var{subsegment}} +* Data:: @code{.data @var{subsection}} _if__(_COFF__||_BOUT__) * Def:: @code{.def @var{name}} _fi__(_COFF__||_BOUT__) @@ -1787,7 +1895,7 @@ _fi__(_COFF__||_BOUT__) * Equ:: @code{.equ @var{symbol}, @var{expression}} * Extern:: @code{.extern} _if__(_GENERIC__||!_A29K__) -* File:: @code{.app-file @var{string}} +* File:: @code{.file @var{string}} _fi__(_GENERIC__||!_A29K__) * Fill:: @code{.fill @var{repeat} , @var{size} , @var{value}} * Float:: @code{.float @var{flonums}} @@ -1811,6 +1919,9 @@ _fi__(_GENERIC__||!_A29K__) _if__(_COFF__||_BOUT__) * Scl:: @code{.scl @var{class}} _fi__(_COFF__||_BOUT__) +_if__(_COFF__) +* Section:: @code{.section @var{name}} +_fi__(_COFF__) * Set:: @code{.set @var{symbol}, @var{expression}} * Short:: @code{.short @var{expressions}} * Single:: @code{.single @var{flonums}} @@ -1818,11 +1929,13 @@ _if__(_COFF__||_BOUT__) * Size:: @code{.size} _fi__(_COFF__||_BOUT__) * Space:: @code{.space @var{size} , @var{fill}} +_if__(_GENERIC__||!_H8__) * Stab:: @code{.stabd, .stabn, .stabs} +_fi__(_GENERIC__||!_H8__) _if__(_COFF__||_BOUT__) * Tag:: @code{.tag @var{structname}} _fi__(_COFF__||_BOUT__) -* Text:: @code{.text @var{subsegment}} +* Text:: @code{.text @var{subsection}} _if__(_COFF__||_BOUT__) * Type:: @code{.type @var{int}} * Val:: @code{.val @var{addr}} @@ -1874,7 +1987,7 @@ _if__( _BOUT__ && (! _COFF__)) @node Align, App-File, bout-ABORT, Pseudo Ops _fi__( _BOUT__ && (! _COFF__)) @section @code{.align @var{abs-expr} , @var{abs-expr}} -Pad the location counter (in the current subsegment) to a particular +Pad the location counter (in the current subsection) to a particular storage boundary. The first expression (which must be absolute) is the number of low-order zero bits the location counter will have after advancement. For example @samp{.align 3} will advance the location @@ -1918,7 +2031,7 @@ Each expression is assembled into the next byte. @node Comm, Data, Byte, Pseudo Ops @section @code{.comm @var{symbol} , @var{length} } -@code{.comm} declares a named common area in the bss segment. Normally +@code{.comm} declares a named common area in the bss section. Normally @code{_LD__} reserves memory addresses for it during linking, so no partial program defines the location of the symbol. Use @code{.comm} to tell @code{_LD__} that it must be at least @var{length} bytes long. @code{_LD__} @@ -1936,10 +2049,10 @@ _if__(! (_COFF__ || _BOUT__ || _AOUT__) ) @c Well, this *might* happen... @node Data, Double, Comm, Pseudo Ops _fi__(! (_COFF__ || _BOUT__ || _AOUT__) ) -@section @code{.data @var{subsegment}} +@section @code{.data @var{subsection}} @code{.data} tells @code{_AS__} to assemble the following statements onto the -end of the data subsegment numbered @var{subsegment} (which is an -absolute expression). If @var{subsegment} is omitted, it defaults +end of the data subsection numbered @var{subsection} (which is an +absolute expression). If @var{subsection} is omitted, it defaults to zero. _if__(_COFF__ || _BOUT__) @@ -2011,10 +2124,10 @@ _if__(_GENERIC__) The exact kind of floating point numbers emitted depends on how @code{_AS__} is configured. @xref{_MACH_DEP__}. _fi__(_GENERIC__) -_if__((!_GENERIC__) && (_A29K__ || _I960__)) +_if__((!_GENERIC__) && _IEEEFLOAT__) On the _HOST__ family @samp{.double} emits 64-bit floating-point numbers in IEEE format. -_fi__((!_GENERIC__) && (_A29K__ || _I960__)) +_fi__((!_GENERIC__) && _IEEEFLOAT__) _if__(_COFF__||_BOUT__) @node Else, Endef, Double, Pseudo Ops @@ -2126,10 +2239,10 @@ The exact kind of floating point numbers emitted depends on how @code{_AS__} is configured. @xref{_MACH_DEP__}. _fi__(_GENERIC__) -_if__((!_GENERIC__) && (_A29K__ || _I960__)) +_if__((!_GENERIC__) && _IEEEFLOAT__) On the _HOST__ family, @code{.float} emits 32-bit floating point numbers in IEEE format. -_fi__((!_GENERIC__) && (_A29K__ || _I960__)) +_fi__((!_GENERIC__) && _IEEEFLOAT__) @node Global, hword, Float, Pseudo Ops @section @code{.global @var{symbol}}, @code{.globl @var{symbol}} @@ -2162,9 +2275,12 @@ _if__(_GENERIC__) This directive is a synonym for @samp{.short}; depending on the target architecture, it may also be a synonym for @samp{.word}. _fi__(_GENERIC__) -_if__( (_A29K__ || _I960__) && !_GENERIC__ ) +_if__( _W32__ && !_GENERIC__ ) This directive is a synonym for @samp{.short}. -_fi__( (_A29K__ || _I960__) && !_GENERIC__ ) +_fi__( _W32__ && !_GENERIC__ ) +_if__(_W16__ && !_GENERIC__ ) +This directive is a synonym for both @samp{.short} and @samp{.word}. +_fi__(_W16__ && !_GENERIC__ ) _if__(_AOUT__||_BOUT__||_COFF__) @node Ident, If, hword, Pseudo Ops @@ -2223,8 +2339,15 @@ around @var{file}. @node Int, Lcomm, Include, Pseudo Ops @section @code{.int @var{expressions}} -Expect zero or more @var{expressions}, of any segment, separated by -commas. For each expression, emit a 32-bit number that will, at run +Expect zero or more @var{expressions}, of any section, separated by +commas. For each expression, emit a +_if__(!_H8__) +32-bit +_fi__(!_H8__) +_if__(_H8__) +16-bit +_fi__(_H8__) +number that will, at run time, be the value of that expression. The byte order of the expression depends on what kind of computer will run the program. @@ -2236,9 +2359,9 @@ _if__((!_GENERIC__)&& _A29K__) _fi__((!_GENERIC__)&& _A29K__) @section @code{.lcomm @var{symbol} , @var{length}} Reserve @var{length} (an absolute expression) bytes for a local common -denoted by @var{symbol}. The segment and value of @var{symbol} are +denoted by @var{symbol}. The section and value of @var{symbol} are those of the new local common. The addresses are allocated in the bss -segment, so at run-time the bytes will start off zeroed. @var{Symbol} +section, so at run-time the bytes will start off zeroed. @var{Symbol} is not declared global (@pxref{Global,,@code{.global}}), so is normally not visible to @code{_LD__}. @@ -2254,13 +2377,21 @@ _if__(_AOUT__||_BOUT__) Tell @code{_AS__} to change the logical line number. @var{line-number} must be an absolute expression. The next line will have that logical line number. So any other statements on the current line (after a statement -separator character -_if__(_A29K__&&(!_GENERIC__)) -@samp{@@}) -_fi__(_A29K__&&(!_GENERIC__)) -_if__(_GENERIC__ || (!_A29K__)) -@code{;}) -_fi__(_GENERIC__ || (!_A29K__)) +separator +_if__(_GENERIC__) +character) +_fi__(_GENERIC__) +_if__(!_GENERIC__) +_if__(! (_A29K__||_H8__) ) +character @code{;}) +_fi__(! (_A29K__||_H8__) ) +_if__(_A29K__) +character @samp{@@}) +_fi__(_A29K__) +_if__(_H8__) +character @samp{$}) +_fi__(_H8__) +_fi__(!_GENERIC__) will be reported as on logical line number @var{line-number} @minus{} 1. One day this directive will be unsupported: it is used only @@ -2269,8 +2400,7 @@ for compatibility with existing assembler programs. @refill _if__(_GENERIC__ && _A29K__) @emph{Warning:} In the AMD29K configuration of _AS__, this command is only available with the name @code{.ln}, rather than as either -@code{.line} or @code{.ln}. (Also, in that configuration the line -separator character is @samp{@@}). +@code{.line} or @code{.ln}. _fi__(_GENERIC__ && _A29K__) _fi__(_AOUT__||_BOUT__) _if__(_COFF__) @@ -2324,7 +2454,7 @@ rest of the assembly. This sets the attributes of the symbol to be the same as the expression value: @smallexample @var{other} = @var{descriptor} = 0 -@var{type} = @r{(segment of @var{expression})} +@var{type} = @r{(section of @var{expression})} @var{value} = @var{expression} @end smallexample @noindent @@ -2342,14 +2472,14 @@ hence @emph{octa}-word for 16 bytes. @node Org, Quad, Octa, Pseudo Ops @section @code{.org @var{new-lc} , @var{fill}} -@code{.org} will advance the location counter of the current segment to +@code{.org} will advance the location counter of the current section to @var{new-lc}. @var{new-lc} is either an absolute expression or an -expression with the same segment as the current subsegment. That is, -you can't use @code{.org} to cross segments: if @var{new-lc} has the -wrong segment, the @code{.org} directive is ignored. To be compatible -with former assemblers, if the segment of @var{new-lc} is absolute, -@code{_AS__} will issue a warning, then pretend the segment of @var{new-lc} -is the same as the current subsegment. +expression with the same section as the current subsection. That is, +you can't use @code{.org} to cross sections: if @var{new-lc} has the +wrong section, the @code{.org} directive is ignored. To be compatible +with former assemblers, if the section of @var{new-lc} is absolute, +@code{_AS__} will issue a warning, then pretend the section of @var{new-lc} +is the same as the current subsection. @code{.org} may only increase the location counter, or leave it unchanged; you cannot use @code{.org} to move the location counter @@ -2357,16 +2487,16 @@ backwards. @c double negative used below "not undefined" because this is a specific @c reference to "undefined" (as SEG_UNKNOWN is called in this manual) -@c segment. pesch@cygnus.com 18feb91 +@c section. pesch@cygnus.com 18feb91 Because @code{_AS__} tries to assemble programs in one pass @var{new-lc} may not be undefined. If you really detest this restriction we eagerly await a chance to share your improved assembler. -Beware that the origin is relative to the start of the segment, not -to the start of the subsegment. This is compatible with other +Beware that the origin is relative to the start of the section, not +to the start of the subsection. This is compatible with other people's assemblers. -When the location counter (of the current subsegment) is advanced, the +When the location counter (of the current subsection) is advanced, the intervening bytes are filled with @var{fill} which should be an absolute expression. If the comma and @var{fill} are omitted, @var{fill} defaults to zero. @@ -2395,7 +2525,12 @@ bignum.@refill _fi__(_I960__&&(!_GENERIC__)) _if__(_COFF__||_BOUT__) +_if__(!_COFF__) @node Scl, Set, Quad, Pseudo Ops +_fi__(!_COFF__) +_if__(_COFF__) +@node Scl, Section, Quad, Pseudo Ops +_fi__(_COFF__) @section @code{.scl @var{class}} Set the storage-class value for a symbol. This directive may only be used inside a @code{.def}/@code{.endef} pair. Storage class may flag @@ -2409,10 +2544,18 @@ accept this directive but ignore it. _fi__(_BOUT__) _fi__(_COFF__||_BOUT__) +_if__(_COFF__) +@node Section, Set, Scl, Pseudo Ops +@section @code{.section} @var{name} +Assemble the following code into the COFF section @var{name}. +@samp{.section .text} is equivalent to the @code{.text} directive; +@samp{.section .data} is equivalent to the @code{.data} directive. -_if__(_COFF__||_BOUT__) +@node Set, Short, Section, Pseudo Ops +_fi__(_COFF__) +_if__(_BOUT__) @node Set, Short, Scl, Pseudo Ops -_fi__(_COFF__||_BOUT__) +_fi__(_BOUT__) _if__(!(_COFF__||_BOUT__)) @node Set, Short, Quad, Pseudo Ops _fi__(!(_COFF__||_BOUT__)) @@ -2424,7 +2567,7 @@ will change @var{symbol}'s value and type to conform to flagged. (@xref{Symbol Attributes}.) You may @code{.set} a symbol many times in the same assembly. -If the expression's segment is unknowable during pass 1, a second +If the expression's section is unknowable during pass 1, a second pass over the source program will be forced. The second pass is currently not implemented. @code{_AS__} will abort with an error message if one is required. @@ -2434,17 +2577,17 @@ file is the last value stored into it. @node Short, Single, Set, Pseudo Ops @section @code{.short @var{expressions}} -_if__(_GENERIC__ || !(_SPARC__ || _A29K__ || _I960__)) +_if__(_GENERIC__ || _W16__) @code{.short} is the same as @samp{.word}. @xref{Word,,@code{.word}}. -_if__(_SPARC__ || _A29K__ || _I960__) +_if__(_W32__) In some configurations, however, @code{.short} and @code{.word} generate numbers of different lengths; @pxref{_MACH_DEP__}. -_fi__(_SPARC__ || _A29K__ || _I960__) -_fi__(_GENERIC__|| !(_SPARC__ || _A29K__ || _I960__)) -_if__((!_GENERIC__) && (_SPARC__ || _A29K__ || _I960__)) +_fi__(_W32__) +_fi__(_GENERIC__|| _W16__) +_if__((!_GENERIC__) && _W32__) This expects zero or more @var{expressions}, and emits a 16 bit number for each. -_fi__((!_GENERIC__) && (_SPARC__ || _A29K__ || _I960__)) +_fi__((!_GENERIC__) && _W32__) _if__(_COFF__||_BOUT__) @node Single, Size, Short, Pseudo Ops _fi__(_COFF__||_BOUT__) @@ -2458,10 +2601,10 @@ _if__(_GENERIC__) The exact kind of floating point numbers emitted depends on how @code{_AS__} is configured. @xref{_MACH_DEP__}. _fi__(_GENERIC__) -_if__((!_GENERIC__) && (_A29K__ || _I960__ || _SPARC__)) +_if__((!_GENERIC__) && _IEEEFLOAT__) On the _HOST__ family, @code{.single} emits 32-bit floating point numbers in IEEE format. -_fi__((!_GENERIC__) && (_A29K__ || _I960__ || _SPARC__)) +_fi__((!_GENERIC__) && _IEEEFLOAT__) _if__(_COFF__||_BOUT__) @node Size, Space, Single, Pseudo Ops @@ -2477,12 +2620,17 @@ ignores it. _fi__(_BOUT__) _fi__(_COFF__||_BOUT__) +_if__(_H8__) +@node Space, Tag, Size, Pseudo Ops +_fi__(_H8__) +_if__(!_H8__) _if__(_COFF__||_BOUT__) @node Space, Stab, Size, Pseudo Ops _fi__(_COFF__||_BOUT__) _if__(!(_COFF__||_BOUT__)) @node Space, Stab, Single, Pseudo Ops _fi__(!(_COFF__||_BOUT__)) +_fi__(!_H8__) _if__(_GENERIC__ || !_A29K__) @section @code{.space @var{size} , @var{fill}} This directive emits @var{size} bytes, each of value @var{fill}. Both @@ -2491,6 +2639,7 @@ and @var{fill} are omitted, @var{fill} is assumed to be zero. _fi__(_GENERIC__ || !_A29K__) _if__(_A29K__) +@section @code{.space} On the AMD 29K, this directive is ignored; it is accepted for compatibility with other AMD 29K assemblers. @@ -2500,6 +2649,7 @@ compatibility with other AMD 29K assemblers. @end quotation _fi__(_A29K__) +_if__(_GENERIC__||!_H8__) _if__(_AOUT__||_BOUT__||_COFF__) _if__(_COFF__||_BOUT__) @node Stab, Tag, Space, Pseudo Ops @@ -2560,9 +2710,15 @@ The name of the symbol is set to the empty string @code{""}. All five fields are specified. @end table _fi__(_AOUT__||_BOUT__||_COFF__) +_fi__(_GENERIC__||!_H8__) _if__(_COFF__||_BOUT__) +_if__(!_H8__) @node Tag, Text, Stab, Pseudo Ops +_fi__(!_H8__) +_if__(_H8__) +@node Tag, Text, Space, Pseudo Ops +_fi__(_H8__) @section @code{.tag @var{structname}} This directive is generated by compilers to include auxiliary debugging information in the symbol table. It is only permitted inside @@ -2582,10 +2738,10 @@ _fi__(_COFF__||_BOUT__) _if__(!(_COFF__||_BOUT__)) @node Text, Word, Stab, Pseudo Ops _fi__(!(_COFF__||_BOUT__)) -@section @code{.text @var{subsegment}} +@section @code{.text @var{subsection}} Tells @code{_AS__} to assemble the following statements onto the end of -the text subsegment numbered @var{subsegment}, which is an absolute -expression. If @var{subsegment} is omitted, subsegment number zero +the text subsection numbered @var{subsection}, which is an absolute +expression. If @var{subsection} is omitted, subsection number zero is used. _if__(_COFF__||_BOUT__) @@ -2621,14 +2777,14 @@ _if__(!(_COFF__||_BOUT__)) @node Word, Deprecated, Text, Pseudo Ops _fi__(!(_COFF__||_BOUT__)) @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 section, separated by commas. -_if__((!_GENERIC__) && (_SPARC__ || _A29K__ || _I960__)) +_if__((!_GENERIC__) && _W32__) For each expression, @code{_AS__} emits a 32-bit number. -_fi__((!_GENERIC__) && (_SPARC__ || _A29K__ || _I960__)) -_if__((!_GENERIC__) && (! (_SPARC__ || _A29K__ || _I960__) )) +_fi__((!_GENERIC__) && _W32__) +_if__((!_GENERIC__) && _W16__) For each expression, @code{_AS__} emits a 16-bit number. -_fi__((!_GENERIC__) && (! (_SPARC__ || _A29K__ || _I960__) )) +_fi__((!_GENERIC__) && _W16__) _if__(_GENERIC__) The size of the number emitted, and its byte order, @@ -2637,15 +2793,16 @@ _fi__(_GENERIC__) @c on amd29k, i960, sparc the "special treatment to support compilers" doesn't @c happen---32-bit addressability, period; no long/short jumps. -_if__(_GENERIC__ || (! (_A29K__ || _I960__) )) +_if__(_GENERIC__ || _DIFFTABKLUG__) @quotation @emph{Warning: Special Treatment to support Compilers} @end quotation _if__(_GENERIC__) -Machines that do less than 32-bit addressing require the following -special treatment. If the machine of interest to you does 32-bit -addressing (@pxref{_MACH_DEP__}), you can ignore this issue. +Machines with a 32-bit address space, but that do less than 32-bit +addressing, require the following special treatment. If the machine of +interest to you does 32-bit addressing (or doesn't require it; +@pxref{_MACH_DEP__}), you can ignore this issue. _fi__(_GENERIC__) In order to assemble compiler output into something that will work, @@ -2655,7 +2812,7 @@ compilers as part of jump tables. Therefore, when @code{_AS__} assembles a directive of the form @samp{.word sym1-sym2}, and the difference between @code{sym1} and @code{sym2} does not fit in 16 bits, @code{_AS__} will create a @dfn{secondary jump table}, immediately before the next label. -This @var{secondary jump table} will be preceded by a short-jump to the +This secondary jump table will be preceded by a short-jump to the first byte after the secondary table. This short-jump prevents the flow of control from accidentally falling into the new table. Inside the table will be a long-jump to @code{sym2}. The original @samp{.word} @@ -2675,7 +2832,7 @@ _if__(_INTERNALS__) @samp{-DWORKING_DOT_WORD} option.} This feature is likely to confuse assembly language programmers. _fi__(_INTERNALS__) -_fi__(_GENERIC__ || (! (_A29K__ || _I960__) )) +_fi__(_GENERIC__ || _DIFFTABKLUG__) @node Deprecated, , Word, Pseudo Ops @section Deprecated Directives @@ -2687,7 +2844,7 @@ They are included for compatibility with older assemblers. @item .line @end table -@node _MACH_DEP__, License, Pseudo Ops, Top +@node _MACH_DEP__, Copying, Pseudo Ops, Top _if__(_GENERIC__) @chapter Machine Dependent Features @menu @@ -2697,6 +2854,9 @@ _fi__(_VAX__) _if__(_A29K__) * AMD29K-Dependent:: AMD 29K Dependent Features _fi__(_A29K__) +_if__(_H8__) +* H8-300-Dependent:: AMD 29K Dependent Features +_fi__(_H8__) _if__(_I960__) * i960-Dependent:: Intel 80960 Dependent Features _fi__(_I960__) @@ -2972,7 +3132,7 @@ can add the required code if they really need it. _fi__(_VAX__) _if__(_A29K__) _if__(_GENERIC__) -@node AMD29K-Dependent, i960-Dependent, Vax-Dependent, Machine Dependent +@node AMD29K-Dependent, H8-300-Dependent, Vax-Dependent, Machine Dependent _fi__(_GENERIC__) _CHAPSEC__(0+_GENERIC__) AMD 29K Dependent Features @menu @@ -3085,12 +3245,12 @@ AMD 29K assemblers. This directive is ignored; it is accepted for compatibility with other AMD 29K assemblers. -@item .use @var{segment name} -Establishes the segment and subsegment for the following code; -@var{segment name} may be one of @code{.text}, @code{.data}, -@code{.data1}, or @code{.lit}. With one of the first three @var{segment +@item .use @var{section name} +Establishes the section and subsection for the following code; +@var{section name} may be one of @code{.text}, @code{.data}, +@code{.data1}, or @code{.lit}. With one of the first three @var{section name} options, @samp{.use} is equivalent to the machine directive -@var{segment name}; the remaining case, @samp{.use .lit}, is the same as +@var{section name}; the remaining case, @samp{.use .lit}, is the same as @samp{.data 200}. @end table @@ -3103,9 +3263,128 @@ For information on the 29K machine instruction set, see @cite{Am29000 User's Manual}, Advanced Micro Devices, Inc. _fi__(_A29K__) +_if__(_H8__) +_if__(_GENERIC__) +@node H8-300-Dependent, i960-Dependent, H8-300-Dependent, Machine Dependent +_fi__(_GENERIC__) +_CHAPSEC__(0+_GENERIC__) H8/300 Dependent Features +@menu +* H8-300 Options:: Options +* H8-300 Syntax:: Syntax +* H8-300 Floating Point:: Floating Point +* H8-300 Directives:: H8/300 Machine Directives +* H8-300 Opcodes:: Opcodes +@end menu + +@node H8-300 Options, H8-300 Syntax, H8-300-Dependent, H8-300-Dependent +_CHAPSEC__(1+_GENERIC__) Options +@code{_AS__} has no additional command-line options for the Hitachi +H8/300 family. + +@node H8-300 Syntax, H8-300 Floating Point, H8-300 Options, H8-300-Dependent +_CHAPSEC__(1+_GENERIC__) Syntax +@menu +* H8-300-Chars:: Special Characters +* H8-300-Regs:: Register Names +* H8-300-Addressing:: Addressing Modes +@end menu + +@node H8-300-Chars, H8-300-Regs, H8-300 Syntax, H8-300 Syntax +_CHAPSEC__(2+_GENERIC__) Special Characters +@samp{;} is the line comment character. + +@samp{$} can be used instead of a newline to separate statements. +Therefore @emph{you may not use @samp{$} in symbol names} on the H8/300. + +@node H8-300-Regs, H8-300-Addressing, H8-300-Chars, H8-300 Syntax +_CHAPSEC__(2+_GENERIC__) Register Names +You can use predefined symbols of the form @samp{r@var{n}h} and +@samp{r@var{n}l} to refer to the H8/300 registers as sixteen 8-bit +general-purpose registers. @var{n} is a digit from @samp{0} to +@samp{7}); for instance, both @samp{r0h} and @samp{r7l} are valid +register names. + +You can also use the eight predefined symbols @samp{r@var{n}} to refer +to the H8/300 registers as 16-bit registers (you must use this form for +addressing). + +The two control registers are called @code{pc} (program counter; a +16-bit register) and @code{ccr} (condition code register; an 8-bit +register). @code{r7} is used as the stack pointer, and can also be +called @code{sp}. + +@node H8-300-Addressing, , H8-300-Regs, H8-300 Syntax +_AS__ understands the following addressing modes for the H8/300: +@table @code +@c FIXME! verify metavars, descriptions in H8/300 addressing table + +@item r@var{n} +Register direct + +@item @@r@var{n} +@c MISSING METAVAR ABOVE?? +Register indirect + +@item @@(@var{d}:16, r@var{n}) +Register indirect: 16-bit displacement @var{d} from register @var{n}. +@code{_AS__} understands this notation but does not require it; if you don't +specify the displacement size, @code{_AS__} supplies it from context. + +@item @@r@var{n}+ +@c MISSING METAVAR ABOVE?? +Register indirect with post-increment + +@item @@-r@var{n} +@c MISSING METAVAR ABOVE?? +Register indirect with pre-decrement + +@item @code{@@}@var{aa} +@itemx @code{@@}@var{aa}:8 +@itemx @code{@@}@var{aa}:16 +Absolute address @code{aa}. @code{_AS__} understands the @samp{:8} or +@samp{:16} notation (specifying 8-bit or 16-bit addresses) but does not +require it; if you don't specify the address size, @code{_AS__} +supplies it from context. + +@item #@var{xx} +@itemx #@var{xx}:8 +@itemx #@var{xx}:16 +Immediate data @var{xx}. @code{_AS__} understands the @samp{:8} or +@samp{:16} notation (specifying 8-bit or 16-bit data) but does not +require it; if you don't specify the data size, @code{_AS__} +supplies it from context. + +@item @code{@@}@code{@@}@var{aa} +@itemx @code{@@}@code{@@}@var{aa}:8 +Memory indirect. + +@c FIXME are these just examples of an H8/300 addressing language? +@c ...what about: +@c @(d:8,Rn) 8-bit reg indirect? +@c @(d:16, PC) 16-bit pc-rel? +@c @#xx:8 immediate indirect? +@end table + +@node H8-300 Floating Point, H8-300 Directives, H8-300 Syntax, H8-300-Dependent +_CHAPSEC__(1+_GENERIC__) Floating Point +The H8/300 family uses IEEE floating-point numbers. + +@node H8-300 Directives, H8-300 Opcodes, H8-300 Floating Point, H8-300-Dependent +_CHAPSEC__(1+_GENERIC__) H8/300 Machine Directives +@code{_AS__} has no machine-dependent directives for the H8/300. + +@node H8-300 Opcodes, , H8-300 Directives, H8-300-Dependent +_CHAPSEC__(1+_GENERIC__) Opcodes +@code{_AS__} implements all the standard H8/300 opcodes. No +additional pseudo-instructions are needed on this family. + +For information on the H8/300 machine instruction set, see @cite{H8/300 +Series Programming Manual} (Hitachi ADE--602--025). + +_fi__(_H8__) _if__(_I960__) _if__(_GENERIC__) -@node i960-Dependent, M68K-Dependent, AMD29K-Dependent, Machine Dependent +@node i960-Dependent, M68K-Dependent, H8-300-Dependent, Machine Dependent _fi__(_GENERIC__) _CHAPSEC__(0+_GENERIC__) Intel 80960 Dependent Features @menu @@ -3221,7 +3500,7 @@ _CHAPSEC__(1+_GENERIC__) i960 Machine Directives @table @code @item .bss @var{symbol}, @var{length}, @var{align} -Reserve @var{length} bytes in the bss segment for a local @var{symbol}, +Reserve @var{length} bytes in the bss section for a local @var{symbol}, aligned to the power of two specified by @var{align}. @var{length} and @var{align} must be positive absolute expressions. This directive differs from @samp{.lcomm} only in that it permits you to specify @@ -3808,16 +4087,16 @@ ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T syntax. @item Immediate form long jumps and calls are -@samp{lcall/ljmp $@var{segment}, $@var{offset}} in AT&T syntax; the +@samp{lcall/ljmp $@var{section}, $@var{offset}} in AT&T syntax; the Intel syntax is -@samp{call/jmp far @var{segment}:@var{offset}}. Also, the far return +@samp{call/jmp far @var{section}:@var{offset}}. Also, the far return instruction is @samp{lret $@var{stack-adjust}} in AT&T syntax; Intel syntax is @samp{ret far @var{stack-adjust}}. @item -The AT&T assembler does not provide support for multiple segment -programs. Unix style systems expect all programs to be single segments. +The AT&T assembler does not provide support for multiple section +programs. Unix style systems expect all programs to be single sections. @end itemize @node i386-Opcodes, i386-Regs, i386-Syntax, i386-Dependent @@ -3886,8 +4165,8 @@ are the high-bytes and low-bytes of @samp{%ax}, @samp{%bx}, @samp{%cx}, and @samp{%dx}) @item -the 6 segment registers @samp{%cs} (code segment), @samp{%ds} -(data segment), @samp{%ss} (stack segment), @samp{%es}, @samp{%fs}, +the 6 section registers @samp{%cs} (code section), @samp{%ds} +(data section), @samp{%ss} (stack section), @samp{%es}, @samp{%fs}, and @samp{%gs}. @item @@ -3910,7 +4189,7 @@ the 8 floating point register stack @samp{%st} or equivalently @node i386-prefixes, i386-Memory, i386-Regs, i386-Dependent _CHAPSEC__(1+_GENERIC__) Opcode Prefixes Opcode prefixes are used to modify the following opcode. They are used -to repeat string instructions, to provide segment overrides, to perform +to repeat string instructions, to provide section overrides, to perform bus lock operations, and to give operand and address size (16-bit operands are specified in an instruction by prefixing what would normally be 32-bit operands with a ``operand size'' opcode prefix). @@ -3925,9 +4204,9 @@ example, the @samp{scas} (scan string) instruction is repeated with: Here is a list of opcode prefixes: @itemize @bullet @item -Segment override prefixes @samp{cs}, @samp{ds}, @samp{ss}, @samp{es}, +Section override prefixes @samp{cs}, @samp{ds}, @samp{ss}, @samp{es}, @samp{fs}, @samp{gs}. These are automatically added by specifying -using the @var{segment}:@var{memory-operand} form for memory references. +using the @var{section}:@var{memory-operand} form for memory references. @item Operand/Address size prefixes @samp{data16} and @samp{addr16} @@ -3954,37 +4233,37 @@ to string instructions to make them repeat @samp{%ecx} times. _CHAPSEC__(1+_GENERIC__) Memory References An Intel syntax indirect memory reference of the form @smallexample -@var{segment}:[@var{base} + @var{index}*@var{scale} + @var{disp}] +@var{section}:[@var{base} + @var{index}*@var{scale} + @var{disp}] @end smallexample is translated into the AT&T syntax @smallexample -@var{segment}:@var{disp}(@var{base}, @var{index}, @var{scale}) +@var{section}:@var{disp}(@var{base}, @var{index}, @var{scale}) @end smallexample where @var{base} and @var{index} are the optional 32-bit base and index registers, @var{disp} is the optional displacement, and @var{scale}, taking the values 1, 2, 4, and 8, multiplies @var{index} to calculate the address of the operand. If no @var{scale} is -specified, @var{scale} is taken to be 1. @var{segment} specifies the -optional segment register for the memory operand, and may override the -default segment register (see a 80386 manual for segment register -defaults). Note that segment overrides in AT&T syntax @emph{must} have -be preceded by a @samp{%}. If you specify a segment override which -coincides with the default segment register, @code{_AS__} will @emph{not} -output any segment register override prefixes to assemble the given -instruction. Thus, segment overrides can be specified to emphasize which -segment register is used for a given memory operand. +specified, @var{scale} is taken to be 1. @var{section} specifies the +optional section register for the memory operand, and may override the +default section register (see a 80386 manual for section register +defaults). Note that section overrides in AT&T syntax @emph{must} have +be preceded by a @samp{%}. If you specify a section override which +coincides with the default section register, @code{_AS__} will @emph{not} +output any section register override prefixes to assemble the given +instruction. Thus, section overrides can be specified to emphasize which +section register is used for a given memory operand. Here are some examples of Intel and AT&T style memory references: @table @asis @item AT&T: @samp{-4(%ebp)}, Intel: @samp{[ebp - 4]} -@var{base} is @samp{%ebp}; @var{disp} is @samp{-4}. @var{segment} is -missing, and the default segment is used (@samp{%ss} for addressing with +@var{base} is @samp{%ebp}; @var{disp} is @samp{-4}. @var{section} is +missing, and the default section is used (@samp{%ss} for addressing with @samp{%ebp} as the base register). @var{index}, @var{scale} are both missing. @item AT&T: @samp{foo(,%eax,4)}, Intel: @samp{[foo + eax*4]} @var{index} is @samp{%eax} (scaled by a @var{scale} 4); @var{disp} is -@samp{foo}. All other fields are missing. The segment register here +@samp{foo}. All other fields are missing. The section register here defaults to @samp{%ds}. @item AT&T: @samp{foo(,1)}; Intel @samp{[foo]} @@ -3993,8 +4272,8 @@ Note that @var{base} and @var{index} are both missing, but there is only @emph{one} @samp{,}. This is a syntactic exception. @item AT&T: @samp{%gs:foo}; Intel @samp{gs:foo} -This selects the contents of the variable @samp{foo} with segment -register @var{segment} being @samp{%gs}. +This selects the contents of the variable @samp{foo} with section +register @var{section} being @samp{%gs}. @end table @@ -4170,7 +4449,7 @@ It might be a good idea to not support these features in a future release: @item Why support the logical line & file concept any more? @item -Subsegments are a good candidate for flushing. +Subsections are a good candidate for flushing. Depends on which compilers need them I guess. @end itemize @@ -4216,11 +4495,11 @@ Implement pass 2. Whenever a @code{.text} or @code{.data} statement is seen, we close of the current frag with an imaginary @code{.fill 0}. This is because we only have one obstack for frags, and we can't grow new -frags for a new subsegment, then go back to the old subsegment and +frags for a new subsection, then go back to the old subsection and append bytes to the old frag. All this nonsense goes away if we -give each subsegment its own obstack. It makes code simpler in +give each subsection its own obstack. It makes code simpler in about 10 places, but nobody has bothered to do it because C compiler -output rarely changes subsegments (compared to ending frags with +output rarely changes subsections (compared to ending frags with relaxable addresses, which is common). @end itemize @@ -4313,7 +4592,7 @@ This is a C library function that isn't in most C libraries yet. See @file{append.c} above. @item subsegs.c -This implements subsegments. +This implements subsections. @item symbols.c This implements symbols. @@ -4483,14 +4762,14 @@ Structure definition and macros for dealing with the _AS__ internal form of a symbol. @item subsegs.h -structure definition for dealing with the numbered subsegments -of the text and data segments. +structure definition for dealing with the numbered subsections +of the text and data sections. @item symbols.h Macros and function headers for dealing with symbols. @item write.h -Structure for doing segment fixups. +Structure for doing section fixups. @end table @comment ~subsection Test Directory @@ -4551,7 +4830,7 @@ Structure for doing segment fixups. @comment the regression test, and you can use ~@code{find (1)} to find any @comment files named ~file{status}, ~file {output} or ~file{stdouterr}. @comment -@node Retargeting, License, Maintenance, Top +@node Retargeting, Copying, Maintenance, Top @chapter Teaching the Assembler about a New Machine This chapter describes the steps required in order to make the @@ -4814,7 +5093,7 @@ assembler is punting, and is only looking for additional syntax errors. (Or something like that.) @item extern segT now_seg; -This variable holds the value of the segment the assembler is +This variable holds the value of the section the assembler is currently assembling into. @end table @@ -4868,7 +5147,7 @@ again. @item segT expression(expressionS *retval) (@var{segT} is defined in @file{as.h}; @var{expressionS} is defined in @file{expr.h}) This function parses the string pointed to by the external char -pointer @var{input_line_pointer}, and returns the segment-type +pointer @var{input_line_pointer}, and returns the section-type of the expression. It also stores the results in the @var{expressionS} pointed to by @var{retval}. @var{input_line_pointer} is advanced to point past the end of @@ -5004,12 +5283,12 @@ usually only needed by the machine-independent part of @end table _fi__(0) -@node License, , Machine Dependent, Top +@node Copying, , Machine Dependent, Top @unnumbered GNU GENERAL PUBLIC LICENSE -@center Version 1, February 1989 +@center Version 2, June 1991 @display -Copyright @copyright{} 1989 Free Software Foundation, Inc. +Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies @@ -5018,30 +5297,33 @@ of this license document, but changing it is not allowed. @unnumberedsec Preamble - The license agreements of most software companies try to keep users -at the mercy of those companies. By contrast, our General Public + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free -software---to make sure the software is free for all its users. The -General Public License applies to the Free Software Foundation's -software and to any other program whose authors commit to using it. -You can use it for your programs, too. +software---to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. When we speak of free software, we are referring to freedom, not -price. Specifically, the General Public License is designed to make -sure that you have the freedom to give away or sell copies of free -software, that you receive source code or can get it if you want it, -that you can change the software or use pieces of it in new free -programs; and that you know you can do these things. +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. - For example, if you distribute copies of a such a program, whether + For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the -source code. And you must tell them their rights. +source code. And you must show them these terms so they know their +rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, @@ -5054,128 +5336,216 @@ want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + The precise terms and conditions for copying, distribution and modification follow. @iftex -@unnumberedsec TERMS AND CONDITIONS +@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @end iftex @ifinfo -@center TERMS AND CONDITIONS +@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @end ifinfo @enumerate @item -This License Agreement applies to any program or other work which -contains a notice placed by the copyright holder saying it may be -distributed under the terms of this General Public License. The -``Program'', below, refers to any such program or work, and a ``work based -on the Program'' means either the Program or any work containing the -Program or a portion of it, either verbatim or with modifications. Each -licensee is addressed as ``you''. +This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The ``Program'', below, +refers to any such program or work, and a ``work based on the Program'' +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term ``modification''.) Each licensee is addressed as ``you''. + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. @item -You may copy and distribute verbatim copies of the Program's source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this -General Public License and to the absence of any warranty; and give any -other recipients of the Program a copy of this General Public License -along with the Program. You may charge a fee for the physical act of -transferring a copy. +You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. -@item -You may modify your copy or copies of the Program or any portion of -it, and copy and distribute such modifications under the terms of Paragraph -1 above, provided that you also do the following: +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. -@itemize @bullet @item -cause the modified files to carry prominent notices stating that -you changed the files and the date of any change; and +You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: +@alphaenumerate @item -cause the whole of any work that you distribute or publish, that -in whole or in part contains the Program or any part thereof, either -with or without modifications, to be licensed at no charge to all -third parties under the terms of this General Public License (except -that you may choose to grant warranty protection to some or all -third parties, at your option). +You must cause the modified files to carry prominent notices +stating that you changed the files and the date of any change. @item -If the modified program normally reads commands interactively when -run, you must cause it, when started running for such interactive use -in the simplest and most usual way, to print or display an -announcement including an appropriate copyright notice and a notice -that there is no warranty (or else, saying that you provide a -warranty) and that users may redistribute the program under these -conditions, and telling the user how to view a copy of this General -Public License. +You must cause any work that you distribute or publish, that in +whole or in part contains or is derived from the Program or any +part thereof, to be licensed as a whole at no charge to all third +parties under the terms of this License. @item -You may charge a fee for the physical act of transferring a -copy, and you may at your option offer warranty protection in -exchange for a fee. -@end itemize - -Mere aggregation of another independent work with the Program (or its -derivative) on a volume of a storage or distribution medium does not bring -the other work under the scope of these terms. +If the modified program normally reads commands interactively +when run, you must cause it, when started running for such +interactive use in the most ordinary way, to print or display an +announcement including an appropriate copyright notice and a +notice that there is no warranty (or else, saying that you provide +a warranty) and that users may redistribute the program under +these conditions, and telling the user how to view a copy of this +License. (Exception: if the Program itself is interactive but +does not normally print such an announcement, your work based on +the Program is not required to print an announcement.) +@end alphaenumerate + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. @item -You may copy and distribute the Program (or a portion or derivative of -it, under Paragraph 2) in object code or executable form under the terms of -Paragraphs 1 and 2 above provided that you also do one of the following: +You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: -@itemize @bullet +@alphaenumerate @item -accompany it with the complete corresponding machine-readable -source code, which must be distributed under the terms of -Paragraphs 1 and 2 above; or, +Accompany it with the complete corresponding machine-readable +source code, which must be distributed under the terms of Sections +1 and 2 above on a medium customarily used for software interchange; or, @item -accompany it with a written offer, valid for at least three -years, to give any third party free (except for a nominal charge -for the cost of distribution) a complete machine-readable copy of the -corresponding source code, to be distributed under the terms of -Paragraphs 1 and 2 above; or, +Accompany it with a written offer, valid for at least three +years, to give any third party, for a charge no more than your +cost of physically performing source distribution, a complete +machine-readable copy of the corresponding source code, to be +distributed under the terms of Sections 1 and 2 above on a medium +customarily used for software interchange; or, @item -accompany it with the information you received as to where the -corresponding source code may be obtained. (This alternative is +Accompany it with the information you received as to the offer +to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you -received the program in object code or executable form alone.) -@end itemize - -Source code for a work means the preferred form of the work for making -modifications to it. For an executable file, complete source code means -all the source code for all modules it contains; but, as a special -exception, it need not include source code for modules which are standard -libraries that accompany the operating system on which the executable -file runs, or for standard header files or definitions files that -accompany that operating system. +received the program in object code or executable form with such +an offer, in accord with Subsection b above.) +@end alphaenumerate + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. @item -You may not copy, modify, sublicense, distribute or transfer the -Program except as expressly provided under this General Public License. -Any attempt otherwise to copy, modify, sublicense, distribute or transfer -the Program is void, and will automatically terminate your rights to use -the Program under this License. However, parties who have received -copies, or rights to use copies, from you under this General Public -License will not have their licenses terminated so long as such parties -remain in full compliance. +You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. @item -By copying, distributing or modifying the Program (or any work based -on the Program) you indicate your acceptance of this license to do so, -and all its terms and conditions. +You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. @item Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the original -licensor to copy, distribute or modify the Program subject to these -terms and conditions. You may not impose any further restrictions on the -recipients' exercise of the rights granted herein. +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +@item +If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +@item +If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. @item The Free Software Foundation may publish revised and/or new versions @@ -5184,11 +5554,11 @@ be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program -specifies a version number of the license which applies to it and ``any +specifies a version number of this License which applies to it and ``any later version'', you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of -the license, you may choose any version ever published by the Free Software +this License, you may choose any version ever published by the Free Software Foundation. @item @@ -5219,15 +5589,15 @@ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. @item -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT -LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES -SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE -WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. @end enumerate @iftex @@ -5241,23 +5611,22 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. @unnumberedsec Applying These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest -possible use to humanity, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. - To do so, attach the following notices to the program. It is safest to -attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the -``copyright'' line and a pointer to where the full notice is found. + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the ``copyright'' line and a pointer to where the full notice is found. @smallexample -@var{one line to give the program's name and a brief idea of what it does.} +@var{one line to give the program's name and an idea of what it does.} Copyright (C) 19@var{yy} @var{name of author} -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) -any later version. +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -5265,8 +5634,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +along with this program; if not, write to the +Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. @end smallexample Also add information on how to contact you by electronic and paper mail. @@ -5276,32 +5646,36 @@ when it starts in an interactive mode: @smallexample Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author} -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `show c' for details. +Gnomovision comes with ABSOLUTELY NO WARRANTY; for details +type `show w'. This is free software, and you are welcome +to redistribute it under certain conditions; type `show c' +for details. @end smallexample -The hypothetical commands `show w' and `show c' should show the -appropriate parts of the General Public License. Of course, the -commands you use may be called something other than `show w' and `show -c'; they could even be mouse-clicks or menu items---whatever suits your -program. +The hypothetical commands @samp{show w} and @samp{show c} should show +the appropriate parts of the General Public License. Of course, the +commands you use may be called something other than @samp{show w} and +@samp{show c}; they could even be mouse-clicks or menu items---whatever +suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a ``copyright disclaimer'' for the program, if necessary. Here is a sample; alter the names: @smallexample -Yoyodyne, Inc., hereby disclaims all copyright interest in the -program `Gnomovision' (a program to direct compilers to make passes -at assemblers) written by James Hacker. +Yoyodyne, Inc., hereby disclaims all copyright interest in +the program `Gnomovision' (which makes passes at compilers) +written by James Hacker. @var{signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice @end smallexample -That's all there is to it! - +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. @summarycontents @contents diff --git a/gas/doc/i80386.m4 b/gas/doc/i80386.m4 index f578887e24a..3aee180baf8 100644 --- a/gas/doc/i80386.m4 +++ b/gas/doc/i80386.m4 @@ -2,4 +2,6 @@ _divert__(-1) _define__(<_I80386__>,<1>) _define__(<_HOST__>,) _define__(<_MACH_DEP__>, +_define__(<_W32__>,0) +_define__(<_W16__>,1) 16-bit words _divert__<> \ No newline at end of file diff --git a/gas/doc/i960.m4 b/gas/doc/i960.m4 index f94060e46ff..8059f0670b3 100644 --- a/gas/doc/i960.m4 +++ b/gas/doc/i960.m4 @@ -9,4 +9,8 @@ _define__(<_LD__>,) _define__(<_GDB__>,) _define__(<_HOST__>,) _define__(<_MACH_DEP__>,) +_define__(<_DIFFTABKLUG__>,0) NO difference-table kluge +_define__(<_IEEEFLOAT__>,1) IEEE floating point +_define__(<_W32__>,1) 32-bit words +_define__(<_W16__>,0) _divert__<> \ No newline at end of file diff --git a/gas/doc/m680x0.m4 b/gas/doc/m680x0.m4 index 752d5b69108..1a5dbaac984 100644 --- a/gas/doc/m680x0.m4 +++ b/gas/doc/m680x0.m4 @@ -2,4 +2,6 @@ _divert__(-1) _define__(<_M680X0__>,<1>) _define__(<_HOST__>,) _define__(<_MACH_DEP__>,) +_define__(<_W32__>,0) +_define__(<_W16__>,1) 16-bit words _divert__<> \ No newline at end of file diff --git a/gas/doc/none.m4 b/gas/doc/none.m4 index a389fc89d1d..c15964662aa 100644 --- a/gas/doc/none.m4 +++ b/gas/doc/none.m4 @@ -16,8 +16,15 @@ _define__(<_BOUT__>,<0>) _define__(<_COFF__>,<0>) _define__(<_ELF__>,<0>) + Properties of the assembler +_define__(<_DIFFTABKLUG__>,1) Do we use the difference-table kluge? +_define__(<_IEEEFLOAT__>,0) IEEE floating-point? +_define__(<_W32__>,0) word is 32 bits +_define__(<_W16__>,1) word is 16 bits + _define__(<_A29K__>,<0>) Specific architectures. Note none -_define__(<_I80386__>,<0>) starts out on. +_define__(<_H8__>,<0>) starts out on. +_define__(<_I80386__>,<0>) _define__(<_I960__>,<0>) _define__(<_M680X0__>,<0>) _define__(<_SPARC__>,<0>) diff --git a/gas/doc/sparc.m4 b/gas/doc/sparc.m4 index 9b47db4f0d8..9fd94505f38 100644 --- a/gas/doc/sparc.m4 +++ b/gas/doc/sparc.m4 @@ -2,4 +2,7 @@ _divert__(-1) _define__(<_SPARC__>,<1>) _define__(<_HOST__>,) _define__(<_MACH_DEP__>,) +_define__(<_IEEEFLOAT__>,1) IEEE floating point +_define__(<_W32__>,1) 32-bit words +_define__(<_W16__>,0) _divert__<> \ No newline at end of file diff --git a/gas/doc/vax.m4 b/gas/doc/vax.m4 index 76cb443cdb7..aad85f317e9 100644 --- a/gas/doc/vax.m4 +++ b/gas/doc/vax.m4 @@ -2,4 +2,6 @@ _divert__(-1) _define__(<_VAX__>,<1>) _define__(<_HOST__>,) _define__(<_MACH_DEP__>,) +_define__(<_W32__>,0) +_define__(<_W16__>,1) 16-bit words _divert__<> \ No newline at end of file -- 2.30.2