1 This is ../../../src/gas/doc/as.info, produced by makeinfo version 4.2
2 from ../../../src/gas/doc/as.texinfo.
5 * As: (as). The GNU assembler.
6 * Gas: (as). The GNU assembler.
9 This file documents the GNU Assembler "as".
11 Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002
12 Free Software Foundation, Inc.
14 Permission is granted to copy, distribute and/or modify this document
15 under the terms of the GNU Free Documentation License, Version 1.1 or
16 any later version published by the Free Software Foundation; with no
17 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
18 Texts. A copy of the license is included in the section entitled "GNU
19 Free Documentation License".
22 File: as.info, Node: Top, Next: Overview, Up: (dir)
27 This file is a user guide to the GNU assembler `as' version 2.16.91.
29 This document is distributed under the terms of the GNU Free
30 Documentation License. A copy of the license is included in the
31 section entitled "GNU Free Documentation License".
36 * Invoking:: Command-Line Options
38 * Sections:: Sections and Relocation
40 * Expressions:: Expressions
41 * Pseudo Ops:: Assembler Directives
42 * Machine Dependencies:: Machine Dependent Features
43 * Reporting Bugs:: Reporting Bugs
44 * Acknowledgements:: Who Did What
45 * GNU Free Documentation License:: GNU Free Documentation License
49 File: as.info, Node: Overview, Next: Invoking, Prev: Top, Up: Top
54 Here is a brief summary of how to invoke `as'. For details, *note
55 Command-Line Options: Invoking..
57 as [-a[cdhlns][=FILE]] [-alternate] [-D]
58 [-defsym SYM=VAL] [-f] [-g] [-gstabs]
59 [-gstabs+] [-gdwarf-2] [-help] [-I DIR] [-J]
60 [-K] [-L] [-listing-lhs-width=NUM]
61 [-listing-lhs-width2=NUM] [-listing-rhs-width=NUM]
62 [-listing-cont-lines=NUM] [-keep-locals] [-o
63 OBJFILE] [-R] [-reduce-memory-overheads] [-statistics]
64 [-v] [-version] [-version] [-W] [-warn]
65 [-fatal-warnings] [-w] [-x] [-Z] [@FILE]
66 [-target-help] [TARGET-OPTIONS]
69 _Target Alpha options:_
71 [-mdebug | -no-mdebug]
72 [-relax] [-g] [-GSIZE]
80 [-mcpu=PROCESSOR[+EXTENSION...]]
81 [-march=ARCHITECTURE[+EXTENSION...]]
82 [-mfpu=FLOATING-POINT-FORMAT]
87 [-mapcs-32|-mapcs-26|-mapcs-float|
89 [-mthumb-interwork] [-k]
91 _Target CRIS options:_
92 [-underscore | -no-underscore]
94 [-emulation=criself | -emulation=crisaout]
95 [-march=v0_v10 | -march=v10 | -march=v32 | -march=common_v10_v32]
97 _Target D10V options:_
100 _Target D30V options:_
103 _Target i386 options:_
106 _Target i960 options:_
107 [-ACA|-ACA_A|-ACB|-ACC|-AKA|-AKB|
111 _Target IA-64 options:_
112 [-mconstant-gp|-mauto-pic]
113 [-milp32|-milp64|-mlp64|-mp64]
115 [-mtune=itanium1|-mtune=itanium2]
116 [-munwind-check=warning|-munwind-check=error]
117 [-mhint.b=ok|-mhint.b=warning|-mhint.b=error]
118 [-x|-xexplicit] [-xauto] [-xdebug]
120 _Target IP2K options:_
121 [-mip2022|-mip2022ext]
123 _Target M32C options:_
126 _Target M32R options:_
127 [-m32rx|-[no-]warn-explicit-parallel-conflicts|
130 _Target M680X0 options:_
131 [-l] [-m68000|-m68010|-m68020|...]
133 _Target M68HC11 options:_
134 [-m68hc11|-m68hc12|-m68hcs12]
136 [-mshort-double|-mlong-double]
137 [-force-long-branchs] [-short-branchs]
138 [-strict-direct-mode] [-print-insn-syntax]
139 [-print-opcodes] [-generate-example]
141 _Target MCORE options:_
142 [-jsri2bsr] [-sifilter] [-relax]
145 _Target MIPS options:_
146 [-nocpp] [-EL] [-EB] [-O[OPTIMIZATION LEVEL]]
147 [-g[DEBUG LEVEL]] [-G NUM] [-KPIC] [-call_shared]
148 [-non_shared] [-xgot]
149 [-mabi=ABI] [-32] [-n32] [-64] [-mfp32] [-mgp32]
150 [-march=CPU] [-mtune=CPU] [-mips1] [-mips2]
151 [-mips3] [-mips4] [-mips5] [-mips32] [-mips32r2]
152 [-mips64] [-mips64r2]
153 [-construct-floats] [-no-construct-floats]
154 [-trap] [-no-break] [-break] [-no-trap]
155 [-mfix7000] [-mno-fix7000]
156 [-mips16] [-no-mips16]
157 [-mips3d] [-no-mips3d]
161 [-mdebug] [-no-mdebug]
164 _Target MMIX options:_
165 [-fixed-special-register-names] [-globalize-symbols]
166 [-gnu-syntax] [-relax] [-no-predefined-symbols]
167 [-no-expand] [-no-merge-gregs] [-x]
168 [-linker-allocated-gregs]
170 _Target PDP11 options:_
171 [-mpic|-mno-pic] [-mall] [-mno-extensions]
172 [-mEXTENSION|-mno-EXTENSION]
175 _Target picoJava options:_
178 _Target PowerPC options:_
179 [-mpwrx|-mpwr2|-mpwr|-m601|-mppc|-mppc32|-m603|-m604|
180 -m403|-m405|-mppc64|-m620|-mppc64bridge|-mbooke|
182 [-mcom|-many|-maltivec] [-memb]
183 [-mregnames|-mno-regnames]
184 [-mrelocatable|-mrelocatable-lib]
185 [-mlittle|-mlittle-endian|-mbig|-mbig-endian]
186 [-msolaris|-mno-solaris]
188 _Target SPARC options:_
189 [-Av6|-Av7|-Av8|-Asparclet|-Asparclite
190 -Av8plus|-Av8plusa|-Av9|-Av9a]
191 [-xarch=v8plus|-xarch=v8plusa] [-bump]
194 _Target TIC54X options:_
195 [-mcpu=54[123589]|-mcpu=54[56]lp] [-mfar-mode|-mf]
196 [-merrors-to-file <FILENAME>|-me <FILENAME>]
199 _Target Z80 options:_
201 [ -ignore-undocumented-instructions] [-Wnud]
202 [ -ignore-unportable-instructions] [-Wnup]
203 [ -warn-undocumented-instructions] [-Wud]
204 [ -warn-unportable-instructions] [-Wup]
205 [ -forbid-undocumented-instructions] [-Fud]
206 [ -forbid-unportable-instructions] [-Fup]
209 _Target Xtensa options:_
210 [-[no-]text-section-literals] [-[no-]absolute-literals]
211 [-[no-]target-align] [-[no-]longcalls]
213 [-rename-section OLDNAME=NEWNAME]
216 Read command-line options from FILE. The options read are
217 inserted in place of the original @FILE option. If FILE does not
218 exist, or cannot be read, then the option will be treated
219 literally, and not removed.
221 Options in FILE are separated by whitespace. A whitespace
222 character may be included in an option by surrounding the entire
223 option in either single or double quotes. Any character
224 (including a backslash) may be included by prefixing the character
225 to be included with a backslash. The FILE may itself contain
226 additional @FILE options; any such options will be processed
230 Turn on listings, in any of a variety of ways:
233 omit false conditionals
236 omit debugging directives
239 include high-level source
245 include macro expansions
248 omit forms processing
254 set the name of the listing file
256 You may combine these options; for example, use `-aln' for assembly
257 listing without forms processing. The `=file' option, if used,
258 must be the last one. By itself, `-a' defaults to `-ahls'.
261 Begin in alternate macro mode, see *Note `.altmacro': Altmacro.
264 Ignored. This option is accepted for script compatibility with
265 calls to other assemblers.
268 Define the symbol SYM to be VALUE before assembling the input file.
269 VALUE must be an integer constant. As in C, a leading `0x'
270 indicates a hexadecimal value, and a leading `0' indicates an
274 "fast"--skip whitespace and comment preprocessing (assume source is
279 Generate debugging information for each assembler source line
280 using whichever debug format is preferred by the target. This
281 currently means either STABS, ECOFF or DWARF2.
284 Generate stabs debugging information for each assembler line. This
285 may help debugging assembler code, if the debugger can handle it.
288 Generate stabs debugging information for each assembler line, with
289 GNU extensions that probably only gdb can handle, and that could
290 make other debuggers crash or refuse to read your program. This
291 may help debugging assembler code. Currently the only GNU
292 extension is the location of the current working directory at
296 Generate DWARF2 debugging information for each assembler line.
297 This may help debugging assembler code, if the debugger can handle
298 it. Note--this option is only supported by some targets, not all
302 Print a summary of the command line options and exit.
305 Print a summary of all target specific options and exit.
308 Add directory DIR to the search list for `.include' directives.
311 Don't warn about signed overflow.
314 Issue warnings when difference tables altered for long
319 Keep (in the symbol table) local symbols. On traditional a.out
320 systems these start with `L', but different systems have different
321 local label prefixes.
323 `--listing-lhs-width=NUMBER'
324 Set the maximum width, in words, of the output data column for an
325 assembler listing to NUMBER.
327 `--listing-lhs-width2=NUMBER'
328 Set the maximum width, in words, of the output data column for
329 continuation lines in an assembler listing to NUMBER.
331 `--listing-rhs-width=NUMBER'
332 Set the maximum width of an input source line, as displayed in a
333 listing, to NUMBER bytes.
335 `--listing-cont-lines=NUMBER'
336 Set the maximum number of lines printed in a listing for a single
337 line of input to NUMBER + 1.
340 Name the object-file output from `as' OBJFILE.
343 Fold the data section into the text section.
345 Set the default size of GAS's hash tables to a prime number close
346 to NUMBER. Increasing this value can reduce the length of time it
347 takes the assembler to perform its tasks, at the expense of
348 increasing the assembler's memory requirements. Similarly
349 reducing this value can reduce the memory requirements at the
352 `--reduce-memory-overheads'
353 This option reduces GAS's memory requirements, at the expense of
354 making the assembly processes slower. Currently this switch is a
355 synonym for `--hash-size=4051', but in the future it may have
356 other effects as well.
359 Print the maximum space (in bytes) and total time (in seconds)
362 `--strip-local-absolute'
363 Remove local absolute symbols from the outgoing symbol table.
367 Print the `as' version.
370 Print the `as' version and exit.
374 Suppress warning messages.
377 Treat warnings as errors.
380 Don't suppress warning messages or treat them as errors.
389 Generate an object file even after errors.
392 Standard input, or source files to assemble.
394 The following options are available when as is configured for an ARC
398 This option selects the core processor variant.
401 Select either big-endian (-EB) or little-endian (-EL) output.
403 The following options are available when as is configured for the ARM
406 `-mcpu=PROCESSOR[+EXTENSION...]'
407 Specify which ARM processor variant is the target.
409 `-march=ARCHITECTURE[+EXTENSION...]'
410 Specify which ARM architecture variant is used by the target.
412 `-mfpu=FLOATING-POINT-FORMAT'
413 Select which Floating Point architecture is the target.
416 Select which floating point ABI is in use.
419 Enable Thumb only instruction decoding.
421 `-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant'
422 Select which procedure calling convention is in use.
425 Select either big-endian (-EB) or little-endian (-EL) output.
428 Specify that the code has been generated with interworking between
429 Thumb and ARM code in mind.
432 Specify that PIC code has been generated.
434 See the info pages for documentation of the CRIS-specific options.
436 The following options are available when as is configured for a D10V
439 Optimize output by parallelizing instructions.
441 The following options are available when as is configured for a D30V
444 Optimize output by parallelizing instructions.
447 Warn when nops are generated.
450 Warn when a nop after a 32-bit multiply instruction is generated.
452 The following options are available when as is configured for the
453 Intel 80960 processor.
455 `-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC'
456 Specify which variant of the 960 architecture is the target.
459 Add code to collect statistics about branches taken.
462 Do not alter compare-and-branch instructions for long
463 displacements; error if necessary.
465 The following options are available when as is configured for the
469 Specifies that the extended IP2022 instructions are allowed.
472 Restores the default behaviour, which restricts the permitted
473 instructions to just the basic IP2022 ones.
475 The following options are available when as is configured for the
476 Renesas M32C and M16C processors.
479 Assemble M32C instructions.
482 Assemble M16C instructions (the default).
484 The following options are available when as is configured for the
485 Renesas M32R (formerly Mitsubishi M32R) series.
488 Specify which processor in the M32R family is the target. The
489 default is normally the M32R, but this option changes it to the
492 `--warn-explicit-parallel-conflicts or --Wp'
493 Produce warning messages when questionable parallel constructs are
496 `--no-warn-explicit-parallel-conflicts or --Wnp'
497 Do not produce warning messages when questionable parallel
498 constructs are encountered.
500 The following options are available when as is configured for the
501 Motorola 68000 series.
504 Shorten references to undefined symbols, to one word instead of
507 `-m68000 | -m68008 | -m68010 | -m68020 | -m68030'
508 `| -m68040 | -m68060 | -m68302 | -m68331 | -m68332'
509 `| -m68333 | -m68340 | -mcpu32 | -m5200'
510 Specify what processor in the 68000 family is the target. The
511 default is normally the 68020, but this can be changed at
514 `-m68881 | -m68882 | -mno-68881 | -mno-68882'
515 The target machine does (or does not) have a floating-point
516 coprocessor. The default is to assume a coprocessor for 68020,
517 68030, and cpu32. Although the basic 68000 is not compatible with
518 the 68881, a combination of the two can be specified, since it's
519 possible to do emulation of the coprocessor instructions with the
522 `-m68851 | -mno-68851'
523 The target machine does (or does not) have a memory-management
524 unit coprocessor. The default is to assume an MMU for 68020 and
527 For details about the PDP-11 machine dependent features options, see
528 *Note PDP-11-Options::.
531 Generate position-independent (or position-dependent) code. The
536 Enable all instruction set extensions. This is the default.
539 Disable all instruction set extensions.
541 `-mEXTENSION | -mno-EXTENSION'
542 Enable (or disable) a particular instruction set extension.
545 Enable the instruction set extensions supported by a particular
546 CPU, and disable all other extensions.
549 Enable the instruction set extensions supported by a particular
550 machine model, and disable all other extensions.
552 The following options are available when as is configured for a
556 Generate "big endian" format output.
559 Generate "little endian" format output.
561 The following options are available when as is configured for the
562 Motorola 68HC11 or 68HC12 series.
564 `-m68hc11 | -m68hc12 | -m68hcs12'
565 Specify what processor is the target. The default is defined by
566 the configuration option when building the assembler.
569 Specify to use the 16-bit integer ABI.
572 Specify to use the 32-bit integer ABI.
575 Specify to use the 32-bit double ABI.
578 Specify to use the 64-bit double ABI.
580 `--force-long-branchs'
581 Relative branches are turned into absolute ones. This concerns
582 conditional branches, unconditional branches and branches to a sub
585 `-S | --short-branchs'
586 Do not turn relative branchs into absolute ones when the offset is
589 `--strict-direct-mode'
590 Do not turn the direct addressing mode into extended addressing
591 mode when the instruction does not support direct addressing mode.
593 `--print-insn-syntax'
594 Print the syntax of instruction in case of error.
597 print the list of instructions with syntax and then exit.
600 print an example of instruction for each possible instruction and
601 then exit. This option is only useful for testing `as'.
603 The following options are available when `as' is configured for the
606 `-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite'
607 `-Av8plus | -Av8plusa | -Av9 | -Av9a'
608 Explicitly select a variant of the SPARC architecture.
610 `-Av8plus' and `-Av8plusa' select a 32 bit environment. `-Av9'
611 and `-Av9a' select a 64 bit environment.
613 `-Av8plusa' and `-Av9a' enable the SPARC V9 instruction set with
614 UltraSPARC extensions.
616 `-xarch=v8plus | -xarch=v8plusa'
617 For compatibility with the Solaris v9 assembler. These options are
618 equivalent to -Av8plus and -Av8plusa, respectively.
621 Warn when the assembler switches to another architecture.
623 The following options are available when as is configured for the
627 Enable extended addressing mode. All addresses and relocations
628 will assume extended addressing (usually 23 bits).
631 Sets the CPU version being compiled for.
633 `-merrors-to-file FILENAME'
634 Redirect error output to a file, for broken systems which don't
635 support such behaviour in the shell.
637 The following options are available when as is configured for a MIPS
641 This option sets the largest size of an object that can be
642 referenced implicitly with the `gp' register. It is only accepted
643 for targets that use ECOFF format, such as a DECstation running
644 Ultrix. The default value is 8.
647 Generate "big endian" format output.
650 Generate "little endian" format output.
661 Generate code for a particular MIPS Instruction Set Architecture
662 level. `-mips1' is an alias for `-march=r3000', `-mips2' is an
663 alias for `-march=r6000', `-mips3' is an alias for `-march=r4000'
664 and `-mips4' is an alias for `-march=r8000'. `-mips5', `-mips32',
665 `-mips32r2', `-mips64', and `-mips64r2' correspond to generic
666 `MIPS V', `MIPS32', `MIPS32 Release 2', `MIPS64', and `MIPS64
667 Release 2' ISA processors, respectively.
670 Generate code for a particular MIPS cpu.
673 Schedule and tune for a particular MIPS cpu.
677 Cause nops to be inserted if the read of the destination register
678 of an mfhi or mflo instruction occurs in the following two
683 Cause stabs-style debugging output to go into an ECOFF-style
684 .mdebug section instead of the standard ELF .stabs sections.
688 Control generation of `.pdr' sections.
692 The register sizes are normally inferred from the ISA and ABI, but
693 these flags force a certain group of registers to be treated as 32
694 bits wide at all times. `-mgp32' controls the size of
695 general-purpose registers and `-mfp32' controls the size of
696 floating-point registers.
700 Generate code for the MIPS 16 processor. This is equivalent to
701 putting `.set mips16' at the start of the assembly file.
702 `-no-mips16' turns off this option.
706 Generate code for the MIPS-3D Application Specific Extension.
707 This tells the assembler to accept MIPS-3D instructions.
708 `-no-mips3d' turns off this option.
712 Generate code for the MDMX Application Specific Extension. This
713 tells the assembler to accept MDMX instructions. `-no-mdmx' turns
718 Generate code for the DSP Application Specific Extension. This
719 tells the assembler to accept DSP instructions. `-mno-dsp' turns
724 Generate code for the MT Application Specific Extension. This
725 tells the assembler to accept MT instructions. `-mno-mt' turns
729 `--no-construct-floats'
730 The `--no-construct-floats' option disables the construction of
731 double width floating point constants by loading the two halves of
732 the value into the two single width floating point registers that
733 make up the double width register. By default
734 `--construct-floats' is selected, allowing construction of these
735 floating point constants.
738 This option causes `as' to emulate `as' configured for some other
739 target, in all respects, including output format (choosing between
740 ELF and ECOFF only), handling of pseudo-opcodes which may generate
741 debugging information or store symbol table information, and
742 default endianness. The available configuration names are:
743 `mipsecoff', `mipself', `mipslecoff', `mipsbecoff', `mipslelf',
744 `mipsbelf'. The first two do not alter the default endianness
745 from that of the primary target for which the assembler was
746 configured; the others change the default to little- or big-endian
747 as indicated by the `b' or `l' in the name. Using `-EB' or `-EL'
748 will override the endianness selection in any case.
750 This option is currently supported only when the primary target
751 `as' is configured for is a MIPS ELF or ECOFF target.
752 Furthermore, the primary target or others specified with
753 `--enable-targets=...' at configuration time must include support
754 for the other format, if both are to be available. For example,
755 the Irix 5 configuration includes support for both.
757 Eventually, this option will support more configurations, with more
758 fine-grained control over the assembler's behavior, and will be
759 supported for more processors.
762 `as' ignores this option. It is accepted for compatibility with
769 Control how to deal with multiplication overflow and division by
770 zero. `--trap' or `--no-break' (which are synonyms) take a trap
771 exception (and only work for Instruction Set Architecture level 2
772 and higher); `--break' or `--no-trap' (also synonyms, and the
773 default) take a break exception.
776 When this option is used, `as' will issue a warning every time it
777 generates a nop instruction from a macro.
779 The following options are available when as is configured for an
784 Enable or disable the JSRI to BSR transformation. By default this
785 is enabled. The command line option `-nojsri2bsr' can be used to
790 Enable or disable the silicon filter behaviour. By default this
791 is disabled. The default can be overridden by the `-sifilter'
795 Alter jump instructions for long displacements.
798 Select the cpu type on the target hardware. This controls which
799 instructions can be assembled.
802 Assemble for a big endian target.
805 Assemble for a little endian target.
807 See the info pages for documentation of the MMIX-specific options.
809 The following options are available when as is configured for an
812 `--text-section-literals | --no-text-section-literals'
813 With `--text-section-literals', literal pools are interspersed in
814 the text section. The default is `--no-text-section-literals',
815 which places literals in a separate section in the output file.
816 These options only affect literals referenced via PC-relative
817 `L32R' instructions; literals for absolute mode `L32R'
818 instructions are handled separately.
820 `--absolute-literals | --no-absolute-literals'
821 Indicate to the assembler whether `L32R' instructions use absolute
822 or PC-relative addressing. The default is to assume absolute
823 addressing if the Xtensa processor includes the absolute `L32R'
824 addressing option. Otherwise, only the PC-relative `L32R' mode
827 `--target-align | --no-target-align'
828 Enable or disable automatic alignment to reduce branch penalties
829 at the expense of some code density. The default is
832 `--longcalls | --no-longcalls'
833 Enable or disable transformation of call instructions to allow
834 calls across a greater range of addresses. The default is
837 `--transform | --no-transform'
838 Enable or disable all assembler transformations of Xtensa
839 instructions. The default is `--transform'; `--no-transform'
840 should be used only in the rare cases when the instructions must
841 be exactly as specified in the assembly source.
843 The following options are available when as is configured for a Z80
846 Assemble for Z80 processor.
849 Assemble for R800 processor.
851 `-ignore-undocumented-instructions'
853 Assemble undocumented Z80 instructions that also work on R800
856 `-ignore-unportable-instructions'
858 Assemble all undocumented Z80 instructions without warning.
860 `-warn-undocumented-instructions'
862 Issue a warning for undocumented Z80 instructions that also work
865 `-warn-unportable-instructions'
867 Issue a warning for undocumented Z80 instructions that do notwork
870 `-forbid-undocumented-instructions'
872 Treat all undocumented instructions as errors.
874 `-forbid-unportable-instructions'
876 Treat undocumented Z80 intructions that do notwork on R800 as
881 * Manual:: Structure of this Manual
882 * GNU Assembler:: The GNU Assembler
883 * Object Formats:: Object File Formats
884 * Command Line:: Command Line
885 * Input Files:: Input Files
886 * Object:: Output (Object) File
887 * Errors:: Error and Warning Messages
890 File: as.info, Node: Manual, Next: GNU Assembler, Up: Overview
892 Structure of this Manual
893 ========================
895 This manual is intended to describe what you need to know to use GNU
896 `as'. We cover the syntax expected in source files, including notation
897 for symbols, constants, and expressions; the directives that `as'
898 understands; and of course how to invoke `as'.
900 This manual also describes some of the machine-dependent features of
901 various flavors of the assembler.
903 On the other hand, this manual is _not_ intended as an introduction
904 to programming in assembly language--let alone programming in general!
905 In a similar vein, we make no attempt to introduce the machine
906 architecture; we do _not_ describe the instruction set, standard
907 mnemonics, registers or addressing modes that are standard to a
908 particular architecture. You may want to consult the manufacturer's
909 machine architecture manual for this information.
912 File: as.info, Node: GNU Assembler, Next: Object Formats, Prev: Manual, Up: Overview
917 GNU `as' is really a family of assemblers. If you use (or have
918 used) the GNU assembler on one architecture, you should find a fairly
919 similar environment when you use it on another architecture. Each
920 version has much in common with the others, including object file
921 formats, most assembler directives (often called "pseudo-ops") and
924 `as' is primarily intended to assemble the output of the GNU C
925 compiler `gcc' for use by the linker `ld'. Nevertheless, we've tried
926 to make `as' assemble correctly everything that other assemblers for
927 the same machine would assemble. Any exceptions are documented
928 explicitly (*note Machine Dependencies::). This doesn't mean `as'
929 always uses the same syntax as another assembler for the same
930 architecture; for example, we know of several incompatible versions of
931 680x0 assembly language syntax.
933 Unlike older assemblers, `as' is designed to assemble a source
934 program in one pass of the source file. This has a subtle impact on the
935 `.org' directive (*note `.org': Org.).
938 File: as.info, Node: Object Formats, Next: Command Line, Prev: GNU Assembler, Up: Overview
943 The GNU assembler can be configured to produce several alternative
944 object file formats. For the most part, this does not affect how you
945 write assembly language programs; but directives for debugging symbols
946 are typically different in different file formats. *Note Symbol
947 Attributes: Symbol Attributes.
950 File: as.info, Node: Command Line, Next: Input Files, Prev: Object Formats, Up: Overview
955 After the program name `as', the command line may contain options
956 and file names. Options may appear in any order, and may be before,
957 after, or between file names. The order of file names is significant.
959 `--' (two hyphens) by itself names the standard input file
960 explicitly, as one of the files for `as' to assemble.
962 Except for `--' any command line argument that begins with a hyphen
963 (`-') is an option. Each option changes the behavior of `as'. No
964 option changes the way another option works. An option is a `-'
965 followed by one or more letters; the case of the letter is important.
966 All options are optional.
968 Some options expect exactly one file name to follow them. The file
969 name may either immediately follow the option's letter (compatible with
970 older assemblers) or it may be the next command argument (GNU
971 standard). These two command lines are equivalent:
973 as -o my-object-file.o mumble.s
974 as -omy-object-file.o mumble.s
977 File: as.info, Node: Input Files, Next: Object, Prev: Command Line, Up: Overview
982 We use the phrase "source program", abbreviated "source", to
983 describe the program input to one run of `as'. The program may be in
984 one or more files; how the source is partitioned into files doesn't
985 change the meaning of the source.
987 The source program is a concatenation of the text in all the files,
988 in the order specified.
990 Each time you run `as' it assembles exactly one source program. The
991 source program is made up of one or more files. (The standard input is
994 You give `as' a command line that has zero or more input file names.
995 The input files are read (from left file name to right). A command
996 line argument (in any position) that has no special meaning is taken to
997 be an input file name.
999 If you give `as' no file names it attempts to read one input file
1000 from the `as' standard input, which is normally your terminal. You may
1001 have to type <ctl-D> to tell `as' there is no more program to assemble.
1003 Use `--' if you need to explicitly name the standard input file in
1006 If the source is empty, `as' produces a small, empty object file.
1008 Filenames and Line-numbers
1009 --------------------------
1011 There are two ways of locating a line in the input file (or files)
1012 and either may be used in reporting error messages. One way refers to
1013 a line number in a physical file; the other refers to a line number in a
1014 "logical" file. *Note Error and Warning Messages: Errors.
1016 "Physical files" are those files named in the command line given to
1019 "Logical files" are simply names declared explicitly by assembler
1020 directives; they bear no relation to physical files. Logical file
1021 names help error messages reflect the original source file, when `as'
1022 source is itself synthesized from other files. `as' understands the
1023 `#' directives emitted by the `gcc' preprocessor. See also *Note
1027 File: as.info, Node: Object, Next: Errors, Prev: Input Files, Up: Overview
1029 Output (Object) File
1030 ====================
1032 Every time you run `as' it produces an output file, which is your
1033 assembly language program translated into numbers. This file is the
1034 object file. Its default name is `a.out'. You can give it another
1035 name by using the `-o' option. Conventionally, object file names end
1036 with `.o'. The default name is used for historical reasons: older
1037 assemblers were capable of assembling self-contained programs directly
1038 into a runnable program. (For some formats, this isn't currently
1039 possible, but it can be done for the `a.out' format.)
1041 The object file is meant for input to the linker `ld'. It contains
1042 assembled program code, information to help `ld' integrate the
1043 assembled program into a runnable file, and (optionally) symbolic
1044 information for the debugger.
1047 File: as.info, Node: Errors, Prev: Object, Up: Overview
1049 Error and Warning Messages
1050 ==========================
1052 `as' may write warnings and error messages to the standard error
1053 file (usually your terminal). This should not happen when a compiler
1054 runs `as' automatically. Warnings report an assumption made so that
1055 `as' could keep assembling a flawed program; errors report a grave
1056 problem that stops the assembly.
1058 Warning messages have the format
1060 file_name:NNN:Warning Message Text
1062 (where NNN is a line number). If a logical file name has been given
1063 (*note `.file': File.) it is used for the filename, otherwise the name
1064 of the current input file is used. If a logical line number was given
1065 (*note `.line': Line.) then it is used to calculate the number printed,
1066 otherwise the actual line in the current source file is printed. The
1067 message text is intended to be self explanatory (in the grand Unix
1070 Error messages have the format
1071 file_name:NNN:FATAL:Error Message Text
1072 The file name and line number are derived as for warning messages.
1073 The actual message text may be rather less explanatory because many of
1074 them aren't supposed to happen.
1077 File: as.info, Node: Invoking, Next: Syntax, Prev: Overview, Up: Top
1079 Command-Line Options
1080 ********************
1082 This chapter describes command-line options available in _all_
1083 versions of the GNU assembler; *note Machine Dependencies::, for
1084 options specific to particular machine architectures.
1086 If you are invoking `as' via the GNU C compiler, you can use the
1087 `-Wa' option to pass arguments through to the assembler. The assembler
1088 arguments must be separated from each other (and the `-Wa') by commas.
1091 gcc -c -g -O -Wa,-alh,-L file.c
1093 This passes two options to the assembler: `-alh' (emit a listing to
1094 standard output with high-level and assembly source) and `-L' (retain
1095 local symbols in the symbol table).
1097 Usually you do not need to use this `-Wa' mechanism, since many
1098 compiler command-line options are automatically passed to the assembler
1099 by the compiler. (You can call the GNU compiler driver with the `-v'
1100 option to see precisely what options it passes to each compilation
1101 pass, including the assembler.)
1105 * a:: -a[cdhlns] enable listings
1106 * alternate:: --alternate enable alternate macro syntax
1107 * D:: -D for compatibility
1108 * f:: -f to work faster
1109 * I:: -I for .include search path
1111 * K:: -K for difference tables
1113 * L:: -L to retain local labels
1114 * listing:: --listing-XXX to configure listing output
1115 * M:: -M or --mri to assemble in MRI compatibility mode
1116 * MD:: --MD for dependency tracking
1117 * o:: -o to name the object file
1118 * R:: -R to join data and text sections
1119 * statistics:: --statistics to see statistics about assembly
1120 * traditional-format:: --traditional-format for compatible output
1121 * v:: -v to announce version
1122 * W:: -W, --no-warn, --warn, --fatal-warnings to control warnings
1123 * Z:: -Z to make object file even after errors
1126 File: as.info, Node: a, Next: alternate, Up: Invoking
1128 Enable Listings: `-a[cdhlns]'
1129 =============================
1131 These options enable listing output from the assembler. By itself,
1132 `-a' requests high-level, assembly, and symbols listing. You can use
1133 other letters to select specific options for the list: `-ah' requests a
1134 high-level language listing, `-al' requests an output-program assembly
1135 listing, and `-as' requests a symbol table listing. High-level
1136 listings require that a compiler debugging option like `-g' be used,
1137 and that assembly listings (`-al') be requested also.
1139 Use the `-ac' option to omit false conditionals from a listing. Any
1140 lines which are not assembled because of a false `.if' (or `.ifdef', or
1141 any other conditional), or a true `.if' followed by an `.else', will be
1142 omitted from the listing.
1144 Use the `-ad' option to omit debugging directives from the listing.
1146 Once you have specified one of these options, you can further control
1147 listing output and its appearance using the directives `.list',
1148 `.nolist', `.psize', `.eject', `.title', and `.sbttl'. The `-an'
1149 option turns off all forms processing. If you do not request listing
1150 output with one of the `-a' options, the listing-control directives
1153 The letters after `-a' may be combined into one option, _e.g._,
1156 Note if the assembler source is coming from the standard input (eg
1157 because it is being created by `gcc' and the `-pipe' command line switch
1158 is being used) then the listing will not contain any comments or
1159 preprocessor directives. This is because the listing code buffers
1160 input source lines from stdin only after they have been preprocessed by
1161 the assembler. This reduces memory usage and makes the code more
1165 File: as.info, Node: alternate, Next: D, Prev: a, Up: Invoking
1170 Begin in alternate macro mode, see *Note `.altmacro': Altmacro.
1173 File: as.info, Node: D, Next: f, Prev: alternate, Up: Invoking
1178 This option has no effect whatsoever, but it is accepted to make it
1179 more likely that scripts written for other assemblers also work with
1183 File: as.info, Node: f, Next: I, Prev: D, Up: Invoking
1188 `-f' should only be used when assembling programs written by a
1189 (trusted) compiler. `-f' stops the assembler from doing whitespace and
1190 comment preprocessing on the input file(s) before assembling them.
1191 *Note Preprocessing: Preprocessing.
1193 _Warning:_ if you use `-f' when the files actually need to be
1194 preprocessed (if they contain comments, for example), `as' does
1198 File: as.info, Node: I, Next: K, Prev: f, Up: Invoking
1200 `.include' Search Path: `-I' PATH
1201 =================================
1203 Use this option to add a PATH to the list of directories `as'
1204 searches for files specified in `.include' directives (*note
1205 `.include': Include.). You may use `-I' as many times as necessary to
1206 include a variety of paths. The current working directory is always
1207 searched first; after that, `as' searches any `-I' directories in the
1208 same order as they were specified (left to right) on the command line.
1211 File: as.info, Node: K, Next: L, Prev: I, Up: Invoking
1213 Difference Tables: `-K'
1214 =======================
1216 `as' sometimes alters the code emitted for directives of the form
1217 `.word SYM1-SYM2'; *note `.word': Word.. You can use the `-K' option
1218 if you want a warning issued when this is done.
1221 File: as.info, Node: L, Next: listing, Prev: K, Up: Invoking
1223 Include Local Labels: `-L'
1224 ==========================
1226 Labels beginning with `L' (upper case only) are called "local
1227 labels". *Note Symbol Names::. Normally you do not see such labels when
1228 debugging, because they are intended for the use of programs (like
1229 compilers) that compose assembler programs, not for your notice.
1230 Normally both `as' and `ld' discard such labels, so you do not normally
1233 This option tells `as' to retain those `L...' symbols in the object
1234 file. Usually if you do this you also tell the linker `ld' to preserve
1235 symbols whose names begin with `L'.
1237 By default, a local label is any label beginning with `L', but each
1238 target is allowed to redefine the local label prefix. On the HPPA
1239 local labels begin with `L$'.
1242 File: as.info, Node: listing, Next: M, Prev: L, Up: Invoking
1244 Configuring listing output: `--listing'
1245 =======================================
1247 The listing feature of the assembler can be enabled via the command
1248 line switch `-a' (*note a::). This feature combines the input source
1249 file(s) with a hex dump of the corresponding locations in the output
1250 object file, and displays them as a listing file. The format of this
1251 listing can be controlled by pseudo ops inside the assembler source
1252 (*note List:: *note Title:: *note Sbttl:: *note Psize:: *note Eject::)
1253 and also by the following switches:
1255 `--listing-lhs-width=`number''
1256 Sets the maximum width, in words, of the first line of the hex
1257 byte dump. This dump appears on the left hand side of the listing
1260 `--listing-lhs-width2=`number''
1261 Sets the maximum width, in words, of any further lines of the hex
1262 byte dump for a given input source line. If this value is not
1263 specified, it defaults to being the same as the value specified
1264 for `--listing-lhs-width'. If neither switch is used the default
1267 `--listing-rhs-width=`number''
1268 Sets the maximum width, in characters, of the source line that is
1269 displayed alongside the hex dump. The default value for this
1270 parameter is 100. The source line is displayed on the right hand
1271 side of the listing output.
1273 `--listing-cont-lines=`number''
1274 Sets the maximum number of continuation lines of hex dump that
1275 will be displayed for a given single line of source input. The
1279 File: as.info, Node: M, Next: MD, Prev: listing, Up: Invoking
1281 Assemble in MRI Compatibility Mode: `-M'
1282 ========================================
1284 The `-M' or `--mri' option selects MRI compatibility mode. This
1285 changes the syntax and pseudo-op handling of `as' to make it compatible
1286 with the `ASM68K' or the `ASM960' (depending upon the configured
1287 target) assembler from Microtec Research. The exact nature of the MRI
1288 syntax will not be documented here; see the MRI manuals for more
1289 information. Note in particular that the handling of macros and macro
1290 arguments is somewhat different. The purpose of this option is to
1291 permit assembling existing MRI assembler code using `as'.
1293 The MRI compatibility is not complete. Certain operations of the
1294 MRI assembler depend upon its object file format, and can not be
1295 supported using other object file formats. Supporting these would
1296 require enhancing each object file format individually. These are:
1298 * global symbols in common section
1300 The m68k MRI assembler supports common sections which are merged
1301 by the linker. Other object file formats do not support this.
1302 `as' handles common sections by treating them as a single common
1303 symbol. It permits local symbols to be defined within a common
1304 section, but it can not support global symbols, since it has no
1305 way to describe them.
1307 * complex relocations
1309 The MRI assemblers support relocations against a negated section
1310 address, and relocations which combine the start addresses of two
1311 or more sections. These are not support by other object file
1314 * `END' pseudo-op specifying start address
1316 The MRI `END' pseudo-op permits the specification of a start
1317 address. This is not supported by other object file formats. The
1318 start address may instead be specified using the `-e' option to
1319 the linker, or in a linker script.
1321 * `IDNT', `.ident' and `NAME' pseudo-ops
1323 The MRI `IDNT', `.ident' and `NAME' pseudo-ops assign a module
1324 name to the output file. This is not supported by other object
1329 The m68k MRI `ORG' pseudo-op begins an absolute section at a given
1330 address. This differs from the usual `as' `.org' pseudo-op, which
1331 changes the location within the current section. Absolute
1332 sections are not supported by other object file formats. The
1333 address of a section may be assigned within a linker script.
1335 There are some other features of the MRI assembler which are not
1336 supported by `as', typically either because they are difficult or
1337 because they seem of little consequence. Some of these may be
1338 supported in future releases.
1342 EBCDIC strings are not supported.
1344 * packed binary coded decimal
1346 Packed binary coded decimal is not supported. This means that the
1347 `DC.P' and `DCB.P' pseudo-ops are not supported.
1351 The m68k `FEQU' pseudo-op is not supported.
1355 The m68k `NOOBJ' pseudo-op is not supported.
1357 * `OPT' branch control options
1359 The m68k `OPT' branch control options--`B', `BRS', `BRB', `BRL',
1360 and `BRW'--are ignored. `as' automatically relaxes all branches,
1361 whether forward or backward, to an appropriate size, so these
1362 options serve no purpose.
1364 * `OPT' list control options
1366 The following m68k `OPT' list control options are ignored: `C',
1367 `CEX', `CL', `CRE', `E', `G', `I', `M', `MEX', `MC', `MD', `X'.
1369 * other `OPT' options
1371 The following m68k `OPT' options are ignored: `NEST', `O', `OLD',
1372 `OP', `P', `PCO', `PCR', `PCS', `R'.
1374 * `OPT' `D' option is default
1376 The m68k `OPT' `D' option is the default, unlike the MRI assembler.
1377 `OPT NOD' may be used to turn it off.
1381 The m68k `XREF' pseudo-op is ignored.
1383 * `.debug' pseudo-op
1385 The i960 `.debug' pseudo-op is not supported.
1387 * `.extended' pseudo-op
1389 The i960 `.extended' pseudo-op is not supported.
1391 * `.list' pseudo-op.
1393 The various options of the i960 `.list' pseudo-op are not
1396 * `.optimize' pseudo-op
1398 The i960 `.optimize' pseudo-op is not supported.
1400 * `.output' pseudo-op
1402 The i960 `.output' pseudo-op is not supported.
1404 * `.setreal' pseudo-op
1406 The i960 `.setreal' pseudo-op is not supported.
1410 File: as.info, Node: MD, Next: o, Prev: M, Up: Invoking
1412 Dependency Tracking: `--MD'
1413 ===========================
1415 `as' can generate a dependency file for the file it creates. This
1416 file consists of a single rule suitable for `make' describing the
1417 dependencies of the main source file.
1419 The rule is written to the file named in its argument.
1421 This feature is used in the automatic updating of makefiles.
1424 File: as.info, Node: o, Next: R, Prev: MD, Up: Invoking
1426 Name the Object File: `-o'
1427 ==========================
1429 There is always one object file output when you run `as'. By
1430 default it has the name `a.out' (or `b.out', for Intel 960 targets
1431 only). You use this option (which takes exactly one filename) to give
1432 the object file a different name.
1434 Whatever the object file is called, `as' overwrites any existing
1435 file of the same name.
1438 File: as.info, Node: R, Next: statistics, Prev: o, Up: Invoking
1440 Join Data and Text Sections: `-R'
1441 =================================
1443 `-R' tells `as' to write the object file as if all data-section data
1444 lives in the text section. This is only done at the very last moment:
1445 your binary data are the same, but data section parts are relocated
1446 differently. The data section part of your object file is zero bytes
1447 long because all its bytes are appended to the text section. (*Note
1448 Sections and Relocation: Sections.)
1450 When you specify `-R' it would be possible to generate shorter
1451 address displacements (because we do not have to cross between text and
1452 data section). We refrain from doing this simply for compatibility with
1453 older versions of `as'. In future, `-R' may work this way.
1455 When `as' is configured for COFF or ELF output, this option is only
1456 useful if you use sections named `.text' and `.data'.
1458 `-R' is not supported for any of the HPPA targets. Using `-R'
1459 generates a warning from `as'.
1462 File: as.info, Node: statistics, Next: traditional-format, Prev: R, Up: Invoking
1464 Display Assembly Statistics: `--statistics'
1465 ===========================================
1467 Use `--statistics' to display two statistics about the resources
1468 used by `as': the maximum amount of space allocated during the assembly
1469 (in bytes), and the total execution time taken for the assembly (in CPU
1473 File: as.info, Node: traditional-format, Next: v, Prev: statistics, Up: Invoking
1475 Compatible Output: `--traditional-format'
1476 =========================================
1478 For some targets, the output of `as' is different in some ways from
1479 the output of some existing assembler. This switch requests `as' to
1480 use the traditional format instead.
1482 For example, it disables the exception frame optimizations which
1483 `as' normally does by default on `gcc' output.
1486 File: as.info, Node: v, Next: W, Prev: traditional-format, Up: Invoking
1488 Announce Version: `-v'
1489 ======================
1491 You can find out what version of as is running by including the
1492 option `-v' (which you can also spell as `-version') on the command
1496 File: as.info, Node: W, Next: Z, Prev: v, Up: Invoking
1498 Control Warnings: `-W', `--warn', `--no-warn', `--fatal-warnings'
1499 =================================================================
1501 `as' should never give a warning or error message when assembling
1502 compiler output. But programs written by people often cause `as' to
1503 give a warning that a particular assumption was made. All such
1504 warnings are directed to the standard error file.
1506 If you use the `-W' and `--no-warn' options, no warnings are issued.
1507 This only affects the warning messages: it does not change any
1508 particular of how `as' assembles your file. Errors, which stop the
1509 assembly, are still reported.
1511 If you use the `--fatal-warnings' option, `as' considers files that
1512 generate warnings to be in error.
1514 You can switch these options off again by specifying `--warn', which
1515 causes warnings to be output as usual.
1518 File: as.info, Node: Z, Prev: W, Up: Invoking
1520 Generate Object File in Spite of Errors: `-Z'
1521 =============================================
1523 After an error message, `as' normally produces no output. If for
1524 some reason you are interested in object file output even after `as'
1525 gives an error message on your program, use the `-Z' option. If there
1526 are any errors, `as' continues anyways, and writes an object file after
1527 a final warning message of the form `N errors, M warnings, generating
1531 File: as.info, Node: Syntax, Next: Sections, Prev: Invoking, Up: Top
1536 This chapter describes the machine-independent syntax allowed in a
1537 source file. `as' syntax is similar to what many other assemblers use;
1538 it is inspired by the BSD 4.2 assembler, except that `as' does not
1539 assemble Vax bit-fields.
1543 * Preprocessing:: Preprocessing
1544 * Whitespace:: Whitespace
1545 * Comments:: Comments
1546 * Symbol Intro:: Symbols
1547 * Statements:: Statements
1548 * Constants:: Constants
1551 File: as.info, Node: Preprocessing, Next: Whitespace, Up: Syntax
1556 The `as' internal preprocessor:
1557 * adjusts and removes extra whitespace. It leaves one space or tab
1558 before the keywords on a line, and turns any other whitespace on
1559 the line into a single space.
1561 * removes all comments, replacing them with a single space, or an
1562 appropriate number of newlines.
1564 * converts character constants into the appropriate numeric values.
1566 It does not do macro processing, include file handling, or anything
1567 else you may get from your C compiler's preprocessor. You can do
1568 include file processing with the `.include' directive (*note
1569 `.include': Include.). You can use the GNU C compiler driver to get
1570 other "CPP" style preprocessing by giving the input file a `.S' suffix.
1571 *Note Options Controlling the Kind of Output: (gcc.info)Overall
1574 Excess whitespace, comments, and character constants cannot be used
1575 in the portions of the input text that are not preprocessed.
1577 If the first line of an input file is `#NO_APP' or if you use the
1578 `-f' option, whitespace and comments are not removed from the input
1579 file. Within an input file, you can ask for whitespace and comment
1580 removal in specific portions of the by putting a line that says `#APP'
1581 before the text that may contain whitespace or comments, and putting a
1582 line that says `#NO_APP' after this text. This feature is mainly
1583 intend to support `asm' statements in compilers whose output is
1584 otherwise free of comments and whitespace.
1587 File: as.info, Node: Whitespace, Next: Comments, Prev: Preprocessing, Up: Syntax
1592 "Whitespace" is one or more blanks or tabs, in any order.
1593 Whitespace is used to separate symbols, and to make programs neater for
1594 people to read. Unless within character constants (*note Character
1595 Constants: Characters.), any whitespace means the same as exactly one
1599 File: as.info, Node: Comments, Next: Symbol Intro, Prev: Whitespace, Up: Syntax
1604 There are two ways of rendering comments to `as'. In both cases the
1605 comment is equivalent to one space.
1607 Anything from `/*' through the next `*/' is a comment. This means
1608 you may not nest these comments.
1611 The only way to include a newline ('\n') in a comment
1612 is to use this sort of comment.
1615 /* This sort of comment does not nest. */
1617 Anything from the "line comment" character to the next newline is
1618 considered a comment and is ignored. The line comment character is `;'
1619 on the ARC; `@' on the ARM; `;' for the H8/300 family; `;' for the HPPA;
1620 `#' on the i386 and x86-64; `#' on the i960; `;' for the PDP-11; `;'
1621 for picoJava; `#' for Motorola PowerPC; `!' for the Renesas / SuperH SH;
1622 `!' on the SPARC; `#' on the ip2k; `#' on the m32c; `#' on the m32r;
1623 `|' on the 680x0; `#' on the 68HC11 and 68HC12; `#' on the Vax; `;' for
1624 the Z80; `!' for the Z8000; `#' on the V850; `#' for Xtensa systems;
1625 see *Note Machine Dependencies::.
1627 On some machines there are two different line comment characters.
1628 One character only begins a comment if it is the first non-whitespace
1629 character on a line, while the other always begins a comment.
1631 The V850 assembler also supports a double dash as starting a comment
1632 that extends to the end of the line.
1636 To be compatible with past assemblers, lines that begin with `#'
1637 have a special interpretation. Following the `#' should be an absolute
1638 expression (*note Expressions::): the logical line number of the _next_
1639 line. Then a string (*note Strings: Strings.) is allowed: if present
1640 it is a new logical file name. The rest of the line, if any, should be
1643 If the first non-whitespace characters on the line are not numeric,
1644 the line is ignored. (Just like a comment.)
1646 # This is an ordinary comment.
1647 # 42-6 "new_file_name" # New logical file name
1648 # This is logical line # 36.
1649 This feature is deprecated, and may disappear from future versions
1653 File: as.info, Node: Symbol Intro, Next: Statements, Prev: Comments, Up: Syntax
1658 A "symbol" is one or more characters chosen from the set of all
1659 letters (both upper and lower case), digits and the three characters
1660 `_.$'. On most machines, you can also use `$' in symbol names;
1661 exceptions are noted in *Note Machine Dependencies::. No symbol may
1662 begin with a digit. Case is significant. There is no length limit:
1663 all characters are significant. Symbols are delimited by characters
1664 not in that set, or by the beginning of a file (since the source
1665 program must end with a newline, the end of a file is not a possible
1666 symbol delimiter). *Note Symbols::.
1669 File: as.info, Node: Statements, Next: Constants, Prev: Symbol Intro, Up: Syntax
1674 A "statement" ends at a newline character (`\n') or line separator
1675 character. (The line separator is usually `;', unless this conflicts
1676 with the comment character; *note Machine Dependencies::.) The newline
1677 or separator character is considered part of the preceding statement.
1678 Newlines and separators within character constants are an exception:
1679 they do not end statements.
1681 It is an error to end any statement with end-of-file: the last
1682 character of any input file should be a newline.
1684 An empty statement is allowed, and may include whitespace. It is
1687 A statement begins with zero or more labels, optionally followed by a
1688 key symbol which determines what kind of statement it is. The key
1689 symbol determines the syntax of the rest of the statement. If the
1690 symbol begins with a dot `.' then the statement is an assembler
1691 directive: typically valid for any computer. If the symbol begins with
1692 a letter the statement is an assembly language "instruction": it
1693 assembles into a machine language instruction. Different versions of
1694 `as' for different computers recognize different instructions. In
1695 fact, the same symbol may represent a different instruction in a
1696 different computer's assembly language.
1698 A label is a symbol immediately followed by a colon (`:').
1699 Whitespace before a label or after a colon is permitted, but you may not
1700 have whitespace between a label's symbol and its colon. *Note Labels::.
1702 For HPPA targets, labels need not be immediately followed by a
1703 colon, but the definition of a label must begin in column zero. This
1704 also implies that only one label may be defined on each line.
1706 label: .directive followed by something
1707 another_label: # This is an empty statement.
1708 instruction operand_1, operand_2, ...
1711 File: as.info, Node: Constants, Prev: Statements, Up: Syntax
1716 A constant is a number, written so that its value is known by
1717 inspection, without knowing any context. Like this:
1718 .byte 74, 0112, 092, 0x4A, 0X4a, 'J, '\J # All the same value.
1719 .ascii "Ring the bell\7" # A string constant.
1720 .octa 0x123456789abcdef0123456789ABCDEF0 # A bignum.
1721 .float 0f-314159265358979323846264338327\
1722 95028841971.693993751E-40 # - pi, a flonum.
1726 * Characters:: Character Constants
1727 * Numbers:: Number Constants
1730 File: as.info, Node: Characters, Next: Numbers, Up: Constants
1735 There are two kinds of character constants. A "character" stands
1736 for one character in one byte and its value may be used in numeric
1737 expressions. String constants (properly called string _literals_) are
1738 potentially many bytes and their values may not be used in arithmetic
1744 * Chars:: Characters
1747 File: as.info, Node: Strings, Next: Chars, Up: Characters
1752 A "string" is written between double-quotes. It may contain
1753 double-quotes or null characters. The way to get special characters
1754 into a string is to "escape" these characters: precede them with a
1755 backslash `\' character. For example `\\' represents one backslash:
1756 the first `\' is an escape which tells `as' to interpret the second
1757 character literally as a backslash (which prevents `as' from
1758 recognizing the second `\' as an escape character). The complete list
1762 Mnemonic for backspace; for ASCII this is octal code 010.
1765 Mnemonic for FormFeed; for ASCII this is octal code 014.
1768 Mnemonic for newline; for ASCII this is octal code 012.
1771 Mnemonic for carriage-Return; for ASCII this is octal code 015.
1774 Mnemonic for horizontal Tab; for ASCII this is octal code 011.
1776 `\ DIGIT DIGIT DIGIT'
1777 An octal character code. The numeric code is 3 octal digits. For
1778 compatibility with other Unix systems, 8 and 9 are accepted as
1779 digits: for example, `\008' has the value 010, and `\009' the
1782 `\`x' HEX-DIGITS...'
1783 A hex character code. All trailing hex digits are combined.
1784 Either upper or lower case `x' works.
1787 Represents one `\' character.
1790 Represents one `"' character. Needed in strings to represent this
1791 character, because an unescaped `"' would end the string.
1794 Any other character when escaped by `\' gives a warning, but
1795 assembles as if the `\' was not present. The idea is that if you
1796 used an escape sequence you clearly didn't want the literal
1797 interpretation of the following character. However `as' has no
1798 other interpretation, so `as' knows it is giving you the wrong
1799 code and warns you of the fact.
1801 Which characters are escapable, and what those escapes represent,
1802 varies widely among assemblers. The current set is what we think the
1803 BSD 4.2 assembler recognizes, and is a subset of what most C compilers
1804 recognize. If you are in doubt, do not use an escape sequence.
1807 File: as.info, Node: Chars, Prev: Strings, Up: Characters
1812 A single character may be written as a single quote immediately
1813 followed by that character. The same escapes apply to characters as to
1814 strings. So if you want to write the character backslash, you must
1815 write `'\\' where the first `\' escapes the second `\'. As you can
1816 see, the quote is an acute accent, not a grave accent. A newline
1817 immediately following an acute accent is taken as a literal character
1818 and does not count as the end of a statement. The value of a character
1819 constant in a numeric expression is the machine's byte-wide code for
1820 that character. `as' assumes your character code is ASCII: `'A' means
1821 65, `'B' means 66, and so on.
1824 File: as.info, Node: Numbers, Prev: Characters, Up: Constants
1829 `as' distinguishes three kinds of numbers according to how they are
1830 stored in the target machine. _Integers_ are numbers that would fit
1831 into an `int' in the C language. _Bignums_ are integers, but they are
1832 stored in more than 32 bits. _Flonums_ are floating point numbers,
1837 * Integers:: Integers
1842 File: as.info, Node: Integers, Next: Bignums, Up: Numbers
1847 A binary integer is `0b' or `0B' followed by zero or more of the
1850 An octal integer is `0' followed by zero or more of the octal digits
1853 A decimal integer starts with a non-zero digit followed by zero or
1854 more digits (`0123456789').
1856 A hexadecimal integer is `0x' or `0X' followed by one or more
1857 hexadecimal digits chosen from `0123456789abcdefABCDEF'.
1859 Integers have the usual values. To denote a negative integer, use
1860 the prefix operator `-' discussed under expressions (*note Prefix
1861 Operators: Prefix Ops.).
1864 File: as.info, Node: Bignums, Next: Flonums, Prev: Integers, Up: Numbers
1869 A "bignum" has the same syntax and semantics as an integer except
1870 that the number (or its negative) takes more than 32 bits to represent
1871 in binary. The distinction is made because in some places integers are
1872 permitted while bignums are not.
1875 File: as.info, Node: Flonums, Prev: Bignums, Up: Numbers
1880 A "flonum" represents a floating point number. The translation is
1881 indirect: a decimal floating point number from the text is converted by
1882 `as' to a generic binary floating point number of more than sufficient
1883 precision. This generic floating point number is converted to a
1884 particular computer's floating point format (or formats) by a portion
1885 of `as' specialized to that computer.
1887 A flonum is written by writing (in order)
1888 * The digit `0'. (`0' is optional on the HPPA.)
1890 * A letter, to tell `as' the rest of the number is a flonum. `e' is
1891 recommended. Case is not important.
1893 On the H8/300, Renesas / SuperH SH, and AMD 29K architectures, the
1894 letter must be one of the letters `DFPRSX' (in upper or lower
1897 On the ARC, the letter must be one of the letters `DFRS' (in upper
1900 On the Intel 960 architecture, the letter must be one of the
1901 letters `DFT' (in upper or lower case).
1903 On the HPPA architecture, the letter must be `E' (upper case only).
1905 * An optional sign: either `+' or `-'.
1907 * An optional "integer part": zero or more decimal digits.
1909 * An optional "fractional part": `.' followed by zero or more
1912 * An optional exponent, consisting of:
1916 * Optional sign: either `+' or `-'.
1918 * One or more decimal digits.
1921 At least one of the integer part or the fractional part must be
1922 present. The floating point number has the usual base-10 value.
1924 `as' does all processing using integers. Flonums are computed
1925 independently of any floating point hardware in the computer running
1929 File: as.info, Node: Sections, Next: Symbols, Prev: Syntax, Up: Top
1931 Sections and Relocation
1932 ***********************
1936 * Secs Background:: Background
1937 * Ld Sections:: Linker Sections
1938 * As Sections:: Assembler Internal Sections
1939 * Sub-Sections:: Sub-Sections
1943 File: as.info, Node: Secs Background, Next: Ld Sections, Up: Sections
1948 Roughly, a section is a range of addresses, with no gaps; all data
1949 "in" those addresses is treated the same for some particular purpose.
1950 For example there may be a "read only" section.
1952 The linker `ld' reads many object files (partial programs) and
1953 combines their contents to form a runnable program. When `as' emits an
1954 object file, the partial program is assumed to start at address 0.
1955 `ld' assigns the final addresses for the partial program, so that
1956 different partial programs do not overlap. This is actually an
1957 oversimplification, but it suffices to explain how `as' uses sections.
1959 `ld' moves blocks of bytes of your program to their run-time
1960 addresses. These blocks slide to their run-time addresses as rigid
1961 units; their length does not change and neither does the order of bytes
1962 within them. Such a rigid unit is called a _section_. Assigning
1963 run-time addresses to sections is called "relocation". It includes the
1964 task of adjusting mentions of object-file addresses so they refer to
1965 the proper run-time addresses. For the H8/300, and for the Renesas /
1966 SuperH SH, `as' pads sections if needed to ensure they end on a word
1967 (sixteen bit) boundary.
1969 An object file written by `as' has at least three sections, any of
1970 which may be empty. These are named "text", "data" and "bss" sections.
1972 When it generates COFF or ELF output, `as' can also generate
1973 whatever other named sections you specify using the `.section'
1974 directive (*note `.section': Section.). If you do not use any
1975 directives that place output in the `.text' or `.data' sections, these
1976 sections still exist, but are empty.
1978 When `as' generates SOM or ELF output for the HPPA, `as' can also
1979 generate whatever other named sections you specify using the `.space'
1980 and `.subspace' directives. See `HP9000 Series 800 Assembly Language
1981 Reference Manual' (HP 92432-90001) for details on the `.space' and
1982 `.subspace' assembler directives.
1984 Additionally, `as' uses different names for the standard text, data,
1985 and bss sections when generating SOM output. Program text is placed
1986 into the `$CODE$' section, data into `$DATA$', and BSS into `$BSS$'.
1988 Within the object file, the text section starts at address `0', the
1989 data section follows, and the bss section follows the data section.
1991 When generating either SOM or ELF output files on the HPPA, the text
1992 section starts at address `0', the data section at address `0x4000000',
1993 and the bss section follows the data section.
1995 To let `ld' know which data changes when the sections are relocated,
1996 and how to change that data, `as' also writes to the object file
1997 details of the relocation needed. To perform relocation `ld' must
1998 know, each time an address in the object file is mentioned:
1999 * Where in the object file is the beginning of this reference to an
2002 * How long (in bytes) is this reference?
2004 * Which section does the address refer to? What is the numeric
2006 (ADDRESS) - (START-ADDRESS OF SECTION)?
2008 * Is the reference to an address "Program-Counter relative"?
2010 In fact, every address `as' ever uses is expressed as
2011 (SECTION) + (OFFSET INTO SECTION)
2013 Further, most expressions `as' computes have this section-relative
2014 nature. (For some object formats, such as SOM for the HPPA, some
2015 expressions are symbol-relative instead.)
2017 In this manual we use the notation {SECNAME N} to mean "offset N
2018 into section SECNAME."
2020 Apart from text, data and bss sections you need to know about the
2021 "absolute" section. When `ld' mixes partial programs, addresses in the
2022 absolute section remain unchanged. For example, address `{absolute 0}'
2023 is "relocated" to run-time address 0 by `ld'. Although the linker
2024 never arranges two partial programs' data sections with overlapping
2025 addresses after linking, _by definition_ their absolute sections must
2026 overlap. Address `{absolute 239}' in one part of a program is always
2027 the same address when the program is running as address `{absolute
2028 239}' in any other part of the program.
2030 The idea of sections is extended to the "undefined" section. Any
2031 address whose section is unknown at assembly time is by definition
2032 rendered {undefined U}--where U is filled in later. Since numbers are
2033 always defined, the only way to generate an undefined address is to
2034 mention an undefined symbol. A reference to a named common block would
2035 be such a symbol: its value is unknown at assembly time so it has
2036 section _undefined_.
2038 By analogy the word _section_ is used to describe groups of sections
2039 in the linked program. `ld' puts all partial programs' text sections
2040 in contiguous addresses in the linked program. It is customary to
2041 refer to the _text section_ of a program, meaning all the addresses of
2042 all partial programs' text sections. Likewise for data and bss
2045 Some sections are manipulated by `ld'; others are invented for use
2046 of `as' and have no meaning except during assembly.
2049 File: as.info, Node: Ld Sections, Next: As Sections, Prev: Secs Background, Up: Sections
2054 `ld' deals with just four kinds of sections, summarized below.
2059 These sections hold your program. `as' and `ld' treat them as
2060 separate but equal sections. Anything you can say of one section
2061 is true of another. When the program is running, however, it is
2062 customary for the text section to be unalterable. The text
2063 section is often shared among processes: it contains instructions,
2064 constants and the like. The data section of a running program is
2065 usually alterable: for example, C variables would be stored in the
2069 This section contains zeroed bytes when your program begins
2070 running. It is used to hold uninitialized variables or common
2071 storage. The length of each partial program's bss section is
2072 important, but because it starts out containing zeroed bytes there
2073 is no need to store explicit zero bytes in the object file. The
2074 bss section was invented to eliminate those explicit zeros from
2078 Address 0 of this section is always "relocated" to runtime address
2079 0. This is useful if you want to refer to an address that `ld'
2080 must not change when relocating. In this sense we speak of
2081 absolute addresses being "unrelocatable": they do not change
2085 This "section" is a catch-all for address references to objects
2086 not in the preceding sections.
2088 An idealized example of three relocatable sections follows. The
2089 example uses the traditional section names `.text' and `.data'. Memory
2090 addresses are on the horizontal axis.
2093 partial program # 1: |ttttt|dddd|00|
2100 partial program # 2: |TTT|DDD|000|
2103 +--+---+-----+--+----+---+-----+~~
2104 linked program: | |TTT|ttttt| |dddd|DDD|00000|
2105 +--+---+-----+--+----+---+-----+~~
2110 File: as.info, Node: As Sections, Next: Sub-Sections, Prev: Ld Sections, Up: Sections
2112 Assembler Internal Sections
2113 ===========================
2115 These sections are meant only for the internal use of `as'. They
2116 have no meaning at run-time. You do not really need to know about these
2117 sections for most purposes; but they can be mentioned in `as' warning
2118 messages, so it might be helpful to have an idea of their meanings to
2119 `as'. These sections are used to permit the value of every expression
2120 in your assembly language program to be a section-relative address.
2122 ASSEMBLER-INTERNAL-LOGIC-ERROR!
2123 An internal assembler logic error has been found. This means
2124 there is a bug in the assembler.
2127 The assembler stores complex expression internally as combinations
2128 of symbols. When it needs to represent an expression as a symbol,
2129 it puts it in the expr section.
2132 File: as.info, Node: Sub-Sections, Next: bss, Prev: As Sections, Up: Sections
2137 Assembled bytes conventionally fall into two sections: text and data.
2138 You may have separate groups of data in named sections that you want to
2139 end up near to each other in the object file, even though they are not
2140 contiguous in the assembler source. `as' allows you to use
2141 "subsections" for this purpose. Within each section, there can be
2142 numbered subsections with values from 0 to 8192. Objects assembled
2143 into the same subsection go into the object file together with other
2144 objects in the same subsection. For example, a compiler might want to
2145 store constants in the text section, but might not want to have them
2146 interspersed with the program being assembled. In this case, the
2147 compiler could issue a `.text 0' before each section of code being
2148 output, and a `.text 1' before each group of constants being output.
2150 Subsections are optional. If you do not use subsections, everything
2151 goes in subsection number zero.
2153 Each subsection is zero-padded up to a multiple of four bytes.
2154 (Subsections may be padded a different amount on different flavors of
2157 Subsections appear in your object file in numeric order, lowest
2158 numbered to highest. (All this to be compatible with other people's
2159 assemblers.) The object file contains no representation of
2160 subsections; `ld' and other programs that manipulate object files see
2161 no trace of them. They just see all your text subsections as a text
2162 section, and all your data subsections as a data section.
2164 To specify which subsection you want subsequent statements assembled
2165 into, use a numeric argument to specify it, in a `.text EXPRESSION' or
2166 a `.data EXPRESSION' statement. When generating COFF output, you can
2167 also use an extra subsection argument with arbitrary named sections:
2168 `.section NAME, EXPRESSION'. When generating ELF output, you can also
2169 use the `.subsection' directive (*note SubSection::) to specify a
2170 subsection: `.subsection EXPRESSION'. EXPRESSION should be an absolute
2171 expression. (*Note Expressions::.) If you just say `.text' then
2172 `.text 0' is assumed. Likewise `.data' means `.data 0'. Assembly
2173 begins in `text 0'. For instance:
2174 .text 0 # The default subsection is text 0 anyway.
2175 .ascii "This lives in the first text subsection. *"
2177 .ascii "But this lives in the second text subsection."
2179 .ascii "This lives in the data section,"
2180 .ascii "in the first data subsection."
2182 .ascii "This lives in the first text section,"
2183 .ascii "immediately following the asterisk (*)."
2185 Each section has a "location counter" incremented by one for every
2186 byte assembled into that section. Because subsections are merely a
2187 convenience restricted to `as' there is no concept of a subsection
2188 location counter. There is no way to directly manipulate a location
2189 counter--but the `.align' directive changes it, and any label
2190 definition captures its current value. The location counter of the
2191 section where statements are being assembled is said to be the "active"
2195 File: as.info, Node: bss, Prev: Sub-Sections, Up: Sections
2200 The bss section is used for local common variable storage. You may
2201 allocate address space in the bss section, but you may not dictate data
2202 to load into it before your program executes. When your program starts
2203 running, all the contents of the bss section are zeroed bytes.
2205 The `.lcomm' pseudo-op defines a symbol in the bss section; see
2206 *Note `.lcomm': Lcomm.
2208 The `.comm' pseudo-op may be used to declare a common symbol, which
2209 is another form of uninitialized symbol; see *Note `.comm': Comm.
2211 When assembling for a target which supports multiple sections, such
2212 as ELF or COFF, you may switch into the `.bss' section and define
2213 symbols as usual; see *Note `.section': Section. You may only assemble
2214 zero values into the section. Typically the section will only contain
2215 symbol definitions and `.skip' directives (*note `.skip': Skip.).
2218 File: as.info, Node: Symbols, Next: Expressions, Prev: Sections, Up: Top
2223 Symbols are a central concept: the programmer uses symbols to name
2224 things, the linker uses symbols to link, and the debugger uses symbols
2227 _Warning:_ `as' does not place symbols in the object file in the
2228 same order they were declared. This may break some debuggers.
2233 * Setting Symbols:: Giving Symbols Other Values
2234 * Symbol Names:: Symbol Names
2235 * Dot:: The Special Dot Symbol
2236 * Symbol Attributes:: Symbol Attributes
2239 File: as.info, Node: Labels, Next: Setting Symbols, Up: Symbols
2244 A "label" is written as a symbol immediately followed by a colon
2245 `:'. The symbol then represents the current value of the active
2246 location counter, and is, for example, a suitable instruction operand.
2247 You are warned if you use the same symbol to represent two different
2248 locations: the first definition overrides any other definitions.
2250 On the HPPA, the usual form for a label need not be immediately
2251 followed by a colon, but instead must start in column zero. Only one
2252 label may be defined on a single line. To work around this, the HPPA
2253 version of `as' also provides a special directive `.label' for defining
2254 labels more flexibly.
2257 File: as.info, Node: Setting Symbols, Next: Symbol Names, Prev: Labels, Up: Symbols
2259 Giving Symbols Other Values
2260 ===========================
2262 A symbol can be given an arbitrary value by writing a symbol,
2263 followed by an equals sign `=', followed by an expression (*note
2264 Expressions::). This is equivalent to using the `.set' directive.
2265 *Note `.set': Set. In the same way, using a double equals sign `='`='
2266 here represents an equivalent of the `.eqv' directive. *Note `.eqv':
2270 File: as.info, Node: Symbol Names, Next: Dot, Prev: Setting Symbols, Up: Symbols
2275 Symbol names begin with a letter or with one of `._'. On most
2276 machines, you can also use `$' in symbol names; exceptions are noted in
2277 *Note Machine Dependencies::. That character may be followed by any
2278 string of digits, letters, dollar signs (unless otherwise noted in
2279 *Note Machine Dependencies::), and underscores.
2281 Case of letters is significant: `foo' is a different symbol name
2284 Each symbol has exactly one name. Each name in an assembly language
2285 program refers to exactly one symbol. You may use that symbol name any
2286 number of times in a program.
2291 Local symbols help compilers and programmers use names temporarily.
2292 They create symbols which are guaranteed to be unique over the entire
2293 scope of the input source code and which can be referred to by a simple
2294 notation. To define a local symbol, write a label of the form `N:'
2295 (where N represents any positive integer). To refer to the most recent
2296 previous definition of that symbol write `Nb', using the same number as
2297 when you defined the label. To refer to the next definition of a local
2298 label, write `Nf'-- The `b' stands for"backwards" and the `f' stands
2301 There is no restriction on how you can use these labels, and you can
2302 reuse them too. So that it is possible to repeatedly define the same
2303 local label (using the same number `N'), although you can only refer to
2304 the most recently defined local label of that number (for a backwards
2305 reference) or the next definition of a specific local label for a
2306 forward reference. It is also worth noting that the first 10 local
2307 labels (`0:'...`9:') are implemented in a slightly more efficient
2308 manner than the others.
2317 Which is the equivalent of:
2319 label_1: branch label_3
2320 label_2: branch label_1
2321 label_3: branch label_4
2322 label_4: branch label_3
2324 Local symbol names are only a notational device. They are
2325 immediately transformed into more conventional symbol names before the
2326 assembler uses them. The symbol names stored in the symbol table,
2327 appearing in error messages and optionally emitted to the object file.
2328 The names are constructed using these parts:
2331 All local labels begin with `L'. Normally both `as' and `ld'
2332 forget symbols that start with `L'. These labels are used for
2333 symbols you are never intended to see. If you use the `-L' option
2334 then `as' retains these symbols in the object file. If you also
2335 instruct `ld' to retain these symbols, you may use them in
2339 This is the number that was used in the local label definition.
2340 So if the label is written `55:' then the number is `55'.
2343 This unusual character is included so you do not accidentally
2344 invent a symbol of the same name. The character has ASCII value
2345 of `\002' (control-B).
2348 This is a serial number to keep the labels distinct. The first
2349 definition of `0:' gets the number `1'. The 15th definition of
2350 `0:' gets the number `15', and so on. Likewise the first
2351 definition of `1:' gets the number `1' and its 15th defintion gets
2354 So for example, the first `1:' is named `L1C-B1', the 44th `3:' is
2360 `as' also supports an even more local form of local labels called
2361 dollar labels. These labels go out of scope (ie they become undefined)
2362 as soon as a non-local label is defined. Thus they remain valid for
2363 only a small region of the input source code. Normal local labels, by
2364 contrast, remain in scope for the entire file, or until they are
2365 redefined by another occurrence of the same local label.
2367 Dollar labels are defined in exactly the same way as ordinary local
2368 labels, except that instead of being terminated by a colon, they are
2369 terminated by a dollar sign. eg `55$'.
2371 They can also be distinguished from ordinary local labels by their
2372 transformed name which uses ASCII character `\001' (control-A) as the
2373 magic character to distinguish them from ordinary labels. Thus the 5th
2374 defintion of `6$' is named `L6C-A5'.
2377 File: as.info, Node: Dot, Next: Symbol Attributes, Prev: Symbol Names, Up: Symbols
2379 The Special Dot Symbol
2380 ======================
2382 The special symbol `.' refers to the current address that `as' is
2383 assembling into. Thus, the expression `melvin: .long .' defines
2384 `melvin' to contain its own address. Assigning a value to `.' is
2385 treated the same as a `.org' directive. Thus, the expression `.=.+4'
2386 is the same as saying `.space 4'.
2389 File: as.info, Node: Symbol Attributes, Prev: Dot, Up: Symbols
2394 Every symbol has, as well as its name, the attributes "Value" and
2395 "Type". Depending on output format, symbols can also have auxiliary
2398 If you use a symbol without defining it, `as' assumes zero for all
2399 these attributes, and probably won't warn you. This makes the symbol
2400 an externally defined symbol, which is generally what you would want.
2404 * Symbol Value:: Value
2405 * Symbol Type:: Type
2408 * a.out Symbols:: Symbol Attributes: `a.out'
2410 * COFF Symbols:: Symbol Attributes for COFF
2412 * SOM Symbols:: Symbol Attributes for SOM
2415 File: as.info, Node: Symbol Value, Next: Symbol Type, Up: Symbol Attributes
2420 The value of a symbol is (usually) 32 bits. For a symbol which
2421 labels a location in the text, data, bss or absolute sections the value
2422 is the number of addresses from the start of that section to the label.
2423 Naturally for text, data and bss sections the value of a symbol changes
2424 as `ld' changes section base addresses during linking. Absolute
2425 symbols' values do not change during linking: that is why they are
2428 The value of an undefined symbol is treated in a special way. If it
2429 is 0 then the symbol is not defined in this assembler source file, and
2430 `ld' tries to determine its value from other files linked into the same
2431 program. You make this kind of symbol simply by mentioning a symbol
2432 name without defining it. A non-zero value represents a `.comm' common
2433 declaration. The value is how much common storage to reserve, in bytes
2434 (addresses). The symbol refers to the first address of the allocated
2438 File: as.info, Node: Symbol Type, Next: a.out Symbols, Prev: Symbol Value, Up: Symbol Attributes
2443 The type attribute of a symbol contains relocation (section)
2444 information, any flag settings indicating that a symbol is external, and
2445 (optionally), other information for linkers and debuggers. The exact
2446 format depends on the object-code output format in use.
2449 File: as.info, Node: a.out Symbols, Next: COFF Symbols, Prev: Symbol Type, Up: Symbol Attributes
2451 Symbol Attributes: `a.out'
2452 --------------------------
2456 * Symbol Desc:: Descriptor
2457 * Symbol Other:: Other
2460 File: as.info, Node: Symbol Desc, Next: Symbol Other, Up: a.out Symbols
2465 This is an arbitrary 16-bit value. You may establish a symbol's
2466 descriptor value by using a `.desc' statement (*note `.desc': Desc.).
2467 A descriptor value means nothing to `as'.
2470 File: as.info, Node: Symbol Other, Prev: Symbol Desc, Up: a.out Symbols
2475 This is an arbitrary 8-bit value. It means nothing to `as'.
2478 File: as.info, Node: COFF Symbols, Next: SOM Symbols, Prev: a.out Symbols, Up: Symbol Attributes
2480 Symbol Attributes for COFF
2481 --------------------------
2483 The COFF format supports a multitude of auxiliary symbol attributes;
2484 like the primary symbol attributes, they are set between `.def' and
2485 `.endef' directives.
2490 The symbol name is set with `.def'; the value and type,
2491 respectively, with `.val' and `.type'.
2493 Auxiliary Attributes
2494 ....................
2496 The `as' directives `.dim', `.line', `.scl', `.size', `.tag', and
2497 `.weak' can generate auxiliary symbol table information for COFF.
2500 File: as.info, Node: SOM Symbols, Prev: COFF Symbols, Up: Symbol Attributes
2502 Symbol Attributes for SOM
2503 -------------------------
2505 The SOM format for the HPPA supports a multitude of symbol
2506 attributes set with the `.EXPORT' and `.IMPORT' directives.
2508 The attributes are described in `HP9000 Series 800 Assembly Language
2509 Reference Manual' (HP 92432-90001) under the `IMPORT' and `EXPORT'
2510 assembler directive documentation.
2513 File: as.info, Node: Expressions, Next: Pseudo Ops, Prev: Symbols, Up: Top
2518 An "expression" specifies an address or numeric value. Whitespace
2519 may precede and/or follow an expression.
2521 The result of an expression must be an absolute number, or else an
2522 offset into a particular section. If an expression is not absolute,
2523 and there is not enough information when `as' sees the expression to
2524 know its section, a second pass over the source program might be
2525 necessary to interpret the expression--but the second pass is currently
2526 not implemented. `as' aborts with an error message in this situation.
2530 * Empty Exprs:: Empty Expressions
2531 * Integer Exprs:: Integer Expressions
2534 File: as.info, Node: Empty Exprs, Next: Integer Exprs, Up: Expressions
2539 An empty expression has no value: it is just whitespace or null.
2540 Wherever an absolute expression is required, you may omit the
2541 expression, and `as' assumes a value of (absolute) 0. This is
2542 compatible with other assemblers.
2545 File: as.info, Node: Integer Exprs, Prev: Empty Exprs, Up: Expressions
2550 An "integer expression" is one or more _arguments_ delimited by
2555 * Arguments:: Arguments
2556 * Operators:: Operators
2557 * Prefix Ops:: Prefix Operators
2558 * Infix Ops:: Infix Operators
2561 File: as.info, Node: Arguments, Next: Operators, Up: Integer Exprs
2566 "Arguments" are symbols, numbers or subexpressions. In other
2567 contexts arguments are sometimes called "arithmetic operands". In this
2568 manual, to avoid confusing them with the "instruction operands" of the
2569 machine language, we use the term "argument" to refer to parts of
2570 expressions only, reserving the word "operand" to refer only to machine
2571 instruction operands.
2573 Symbols are evaluated to yield {SECTION NNN} where SECTION is one of
2574 text, data, bss, absolute, or undefined. NNN is a signed, 2's
2575 complement 32 bit integer.
2577 Numbers are usually integers.
2579 A number can be a flonum or bignum. In this case, you are warned
2580 that only the low order 32 bits are used, and `as' pretends these 32
2581 bits are an integer. You may write integer-manipulating instructions
2582 that act on exotic constants, compatible with other assemblers.
2584 Subexpressions are a left parenthesis `(' followed by an integer
2585 expression, followed by a right parenthesis `)'; or a prefix operator
2586 followed by an argument.
2589 File: as.info, Node: Operators, Next: Prefix Ops, Prev: Arguments, Up: Integer Exprs
2594 "Operators" are arithmetic functions, like `+' or `%'. Prefix
2595 operators are followed by an argument. Infix operators appear between
2596 their arguments. Operators may be preceded and/or followed by
2600 File: as.info, Node: Prefix Ops, Next: Infix Ops, Prev: Operators, Up: Integer Exprs
2605 `as' has the following "prefix operators". They each take one
2606 argument, which must be absolute.
2609 "Negation". Two's complement negation.
2612 "Complementation". Bitwise not.
2615 File: as.info, Node: Infix Ops, Prev: Prefix Ops, Up: Integer Exprs
2620 "Infix operators" take two arguments, one on either side. Operators
2621 have precedence, but operations with equal precedence are performed left
2622 to right. Apart from `+' or `-', both arguments must be absolute, and
2623 the result is absolute.
2625 1. Highest Precedence
2631 "Division". Truncation is the same as the C operator `/'
2637 "Shift Left". Same as the C operator `<<'.
2640 "Shift Right". Same as the C operator `>>'.
2642 2. Intermediate precedence
2645 "Bitwise Inclusive Or".
2651 "Bitwise Exclusive Or".
2659 "Addition". If either argument is absolute, the result has
2660 the section of the other argument. You may not add together
2661 arguments from different sections.
2664 "Subtraction". If the right argument is absolute, the result
2665 has the section of the left argument. If both arguments are
2666 in the same section, the result is absolute. You may not
2667 subtract arguments from different sections.
2683 "Is Greater Than Or Equal To"
2686 "Is Less Than Or Equal To"
2688 The comparison operators can be used as infix operators. A
2689 true results has a value of -1 whereas a false result has a
2690 value of 0. Note, these operators perform signed
2693 4. Lowest Precedence
2701 These two logical operations can be used to combine the
2702 results of sub expressions. Note, unlike the comparison
2703 operators a true result returns a value of 1 but a false
2704 results does still return 0. Also note that the logical or
2705 operator has a slightly lower precedence than logical and.
2708 In short, it's only meaningful to add or subtract the _offsets_ in an
2709 address; you can only have a defined section in one of the two
2713 File: as.info, Node: Pseudo Ops, Next: Machine Dependencies, Prev: Expressions, Up: Top
2715 Assembler Directives
2716 ********************
2718 All assembler directives have names that begin with a period (`.').
2719 The rest of the name is letters, usually in lower case.
2721 This chapter discusses directives that are available regardless of
2722 the target machine configuration for the GNU assembler. Some machine
2723 configurations provide additional directives. *Note Machine
2732 * Align:: `.align ABS-EXPR , ABS-EXPR'
2733 * Altmacro:: `.altmacro'
2734 * Ascii:: `.ascii "STRING"'...
2735 * Asciz:: `.asciz "STRING"'...
2736 * Balign:: `.balign ABS-EXPR , ABS-EXPR'
2737 * Byte:: `.byte EXPRESSIONS'
2738 * Comm:: `.comm SYMBOL , LENGTH '
2740 * CFI directives:: `.cfi_startproc', `.cfi_endproc', etc.
2742 * Data:: `.data SUBSECTION'
2746 * Desc:: `.desc SYMBOL, ABS-EXPRESSION'
2750 * Double:: `.double FLONUMS'
2753 * Elseif:: `.elseif'
2758 * Endfunc:: `.endfunc'
2760 * Equ:: `.equ SYMBOL, EXPRESSION'
2761 * Equiv:: `.equiv SYMBOL, EXPRESSION'
2762 * Eqv:: `.eqv SYMBOL, EXPRESSION'
2764 * Error:: `.error STRING'
2766 * Extern:: `.extern'
2769 * File:: `.file STRING'
2771 * Fill:: `.fill REPEAT , SIZE , VALUE'
2772 * Float:: `.float FLONUMS'
2774 * Global:: `.global SYMBOL', `.globl SYMBOL'
2776 * Hidden:: `.hidden NAMES'
2778 * hword:: `.hword EXPRESSIONS'
2780 * If:: `.if ABSOLUTE EXPRESSION'
2781 * Incbin:: `.incbin "FILE"[,SKIP[,COUNT]]'
2782 * Include:: `.include "FILE"'
2783 * Int:: `.int EXPRESSIONS'
2785 * Internal:: `.internal NAMES'
2787 * Irp:: `.irp SYMBOL,VALUES'...
2788 * Irpc:: `.irpc SYMBOL,VALUES'...
2789 * Lcomm:: `.lcomm SYMBOL , LENGTH'
2790 * Lflags:: `.lflags'
2792 * Line:: `.line LINE-NUMBER'
2794 * Linkonce:: `.linkonce [TYPE]'
2796 * Ln:: `.ln LINE-NUMBER'
2798 * LNS directives:: `.file', `.loc', etc.
2800 * Long:: `.long EXPRESSIONS'
2802 * Macro:: `.macro NAME ARGS'...
2804 * Noaltmacro:: `.noaltmacro'
2805 * Nolist:: `.nolist'
2806 * Octa:: `.octa BIGNUMS'
2807 * Org:: `.org NEW-LC , FILL'
2808 * P2align:: `.p2align ABS-EXPR , ABS-EXPR'
2810 * PopSection:: `.popsection'
2811 * Previous:: `.previous'
2813 * Print:: `.print STRING'
2815 * Protected:: `.protected NAMES'
2817 * Psize:: `.psize LINES, COLUMNS'
2818 * Purgem:: `.purgem NAME'
2820 * PushSection:: `.pushsection NAME'
2822 * Quad:: `.quad BIGNUMS'
2823 * Rept:: `.rept COUNT'
2824 * Sbttl:: `.sbttl "SUBHEADING"'
2826 * Scl:: `.scl CLASS'
2828 * Section:: `.section NAME'
2830 * Set:: `.set SYMBOL, EXPRESSION'
2831 * Short:: `.short EXPRESSIONS'
2832 * Single:: `.single FLONUMS'
2834 * Size:: `.size [NAME , EXPRESSION]'
2836 * Skip:: `.skip SIZE , FILL'
2837 * Sleb128:: `.sleb128 EXPRESSIONS'
2838 * Space:: `.space SIZE , FILL'
2840 * Stab:: `.stabd, .stabn, .stabs'
2842 * String:: `.string "STR"'
2843 * Struct:: `.struct EXPRESSION'
2845 * SubSection:: `.subsection'
2846 * Symver:: `.symver NAME,NAME2@NODENAME'
2849 * Tag:: `.tag STRUCTNAME'
2851 * Text:: `.text SUBSECTION'
2852 * Title:: `.title "HEADING"'
2854 * Type:: `.type <INT | NAME , TYPE DESCRIPTION>'
2856 * Uleb128:: `.uleb128 EXPRESSIONS'
2861 * Version:: `.version "STRING"'
2862 * VTableEntry:: `.vtable_entry TABLE, OFFSET'
2863 * VTableInherit:: `.vtable_inherit CHILD, PARENT'
2865 * Warning:: `.warning STRING'
2866 * Weak:: `.weak NAMES'
2867 * Weakref:: `.weakref ALIAS, SYMBOL'
2868 * Word:: `.word EXPRESSIONS'
2869 * Deprecated:: Deprecated Directives
2872 File: as.info, Node: Abort, Next: ABORT, Up: Pseudo Ops
2877 This directive stops the assembly immediately. It is for
2878 compatibility with other assemblers. The original idea was that the
2879 assembly language source would be piped into the assembler. If the
2880 sender of the source quit, it could use this directive tells `as' to
2881 quit also. One day `.abort' will not be supported.
2884 File: as.info, Node: ABORT, Next: Align, Prev: Abort, Up: Pseudo Ops
2889 When producing COFF output, `as' accepts this directive as a synonym
2893 File: as.info, Node: Align, Next: Altmacro, Prev: ABORT, Up: Pseudo Ops
2895 `.align ABS-EXPR, ABS-EXPR, ABS-EXPR'
2896 =====================================
2898 Pad the location counter (in the current subsection) to a particular
2899 storage boundary. The first expression (which must be absolute) is the
2900 alignment required, as described below.
2902 The second expression (also absolute) gives the fill value to be
2903 stored in the padding bytes. It (and the comma) may be omitted. If it
2904 is omitted, the padding bytes are normally zero. However, on some
2905 systems, if the section is marked as containing code and the fill value
2906 is omitted, the space is filled with no-op instructions.
2908 The third expression is also absolute, and is also optional. If it
2909 is present, it is the maximum number of bytes that should be skipped by
2910 this alignment directive. If doing the alignment would require
2911 skipping more bytes than the specified maximum, then the alignment is
2912 not done at all. You can omit the fill value (the second argument)
2913 entirely by simply using two commas after the required alignment; this
2914 can be useful if you want the alignment to be filled with no-op
2915 instructions when appropriate.
2917 The way the required alignment is specified varies from system to
2918 system. For the arc, hppa, i386 using ELF, i860, iq2000, m68k, or32,
2919 s390, sparc, tic4x, tic80 and xtensa, the first expression is the
2920 alignment request in bytes. For example `.align 8' advances the
2921 location counter until it is a multiple of 8. If the location counter
2922 is already a multiple of 8, no change is needed. For the tic54x, the
2923 first expression is the alignment request in words.
2925 For other systems, including the i386 using a.out format, and the
2926 arm and strongarm, it is the number of low-order zero bits the location
2927 counter must have after advancement. For example `.align 3' advances
2928 the location counter until it a multiple of 8. If the location counter
2929 is already a multiple of 8, no change is needed.
2931 This inconsistency is due to the different behaviors of the various
2932 native assemblers for these systems which GAS must emulate. GAS also
2933 provides `.balign' and `.p2align' directives, described later, which
2934 have a consistent behavior across all architectures (but are specific
2938 File: as.info, Node: Ascii, Next: Asciz, Prev: Altmacro, Up: Pseudo Ops
2940 `.ascii "STRING"'...
2941 ====================
2943 `.ascii' expects zero or more string literals (*note Strings::)
2944 separated by commas. It assembles each string (with no automatic
2945 trailing zero byte) into consecutive addresses.
2948 File: as.info, Node: Asciz, Next: Balign, Prev: Ascii, Up: Pseudo Ops
2950 `.asciz "STRING"'...
2951 ====================
2953 `.asciz' is just like `.ascii', but each string is followed by a
2954 zero byte. The "z" in `.asciz' stands for "zero".
2957 File: as.info, Node: Balign, Next: Byte, Prev: Asciz, Up: Pseudo Ops
2959 `.balign[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR'
2960 ==========================================
2962 Pad the location counter (in the current subsection) to a particular
2963 storage boundary. The first expression (which must be absolute) is the
2964 alignment request in bytes. For example `.balign 8' advances the
2965 location counter until it is a multiple of 8. If the location counter
2966 is already a multiple of 8, no change is needed.
2968 The second expression (also absolute) gives the fill value to be
2969 stored in the padding bytes. It (and the comma) may be omitted. If it
2970 is omitted, the padding bytes are normally zero. However, on some
2971 systems, if the section is marked as containing code and the fill value
2972 is omitted, the space is filled with no-op instructions.
2974 The third expression is also absolute, and is also optional. If it
2975 is present, it is the maximum number of bytes that should be skipped by
2976 this alignment directive. If doing the alignment would require
2977 skipping more bytes than the specified maximum, then the alignment is
2978 not done at all. You can omit the fill value (the second argument)
2979 entirely by simply using two commas after the required alignment; this
2980 can be useful if you want the alignment to be filled with no-op
2981 instructions when appropriate.
2983 The `.balignw' and `.balignl' directives are variants of the
2984 `.balign' directive. The `.balignw' directive treats the fill pattern
2985 as a two byte word value. The `.balignl' directives treats the fill
2986 pattern as a four byte longword value. For example, `.balignw
2987 4,0x368d' will align to a multiple of 4. If it skips two bytes, they
2988 will be filled in with the value 0x368d (the exact placement of the
2989 bytes depends upon the endianness of the processor). If it skips 1 or
2990 3 bytes, the fill value is undefined.
2993 File: as.info, Node: Byte, Next: Comm, Prev: Balign, Up: Pseudo Ops
2998 `.byte' expects zero or more expressions, separated by commas. Each
2999 expression is assembled into the next byte.
3002 File: as.info, Node: Comm, Next: CFI directives, Prev: Byte, Up: Pseudo Ops
3004 `.comm SYMBOL , LENGTH '
3005 ========================
3007 `.comm' declares a common symbol named SYMBOL. When linking, a
3008 common symbol in one object file may be merged with a defined or common
3009 symbol of the same name in another object file. If `ld' does not see a
3010 definition for the symbol-just one or more common symbols-then it will
3011 allocate LENGTH bytes of uninitialized memory. LENGTH must be an
3012 absolute expression. If `ld' sees multiple common symbols with the
3013 same name, and they do not all have the same size, it will allocate
3014 space using the largest size.
3016 When using ELF, the `.comm' directive takes an optional third
3017 argument. This is the desired alignment of the symbol, specified as a
3018 byte boundary (for example, an alignment of 16 means that the least
3019 significant 4 bits of the address should be zero). The alignment must
3020 be an absolute expression, and it must be a power of two. If `ld'
3021 allocates uninitialized memory for the common symbol, it will use the
3022 alignment when placing the symbol. If no alignment is specified, `as'
3023 will set the alignment to the largest power of two less than or equal
3024 to the size of the symbol, up to a maximum of 16.
3026 The syntax for `.comm' differs slightly on the HPPA. The syntax is
3027 `SYMBOL .comm, LENGTH'; SYMBOL is optional.
3030 File: as.info, Node: CFI directives, Next: Data, Prev: Comm, Up: Pseudo Ops
3035 `.cfi_startproc' is used at the beginning of each function that
3036 should have an entry in `.eh_frame'. It initializes some internal data
3037 structures and emits architecture dependent initial CFI instructions.
3038 Don't forget to close the function by `.cfi_endproc'.
3043 `.cfi_endproc' is used at the end of a function where it closes its
3044 unwind entry previously opened by `.cfi_startproc'. and emits it to
3047 `.cfi_def_cfa REGISTER, OFFSET'
3048 ===============================
3050 `.cfi_def_cfa' defines a rule for computing CFA as: take address
3051 from REGISTER and add OFFSET to it.
3053 `.cfi_def_cfa_register REGISTER'
3054 ================================
3056 `.cfi_def_cfa_register' modifies a rule for computing CFA. From now
3057 on REGISTER will be used instead of the old one. Offset remains the
3060 `.cfi_def_cfa_offset OFFSET'
3061 ============================
3063 `.cfi_def_cfa_offset' modifies a rule for computing CFA. Register
3064 remains the same, but OFFSET is new. Note that it is the absolute
3065 offset that will be added to a defined register to compute CFA address.
3067 `.cfi_adjust_cfa_offset OFFSET'
3068 ===============================
3070 Same as `.cfi_def_cfa_offset' but OFFSET is a relative value that is
3071 added/substracted from the previous offset.
3073 `.cfi_offset REGISTER, OFFSET'
3074 ==============================
3076 Previous value of REGISTER is saved at offset OFFSET from CFA.
3078 `.cfi_rel_offset REGISTER, OFFSET'
3079 ==================================
3081 Previous value of REGISTER is saved at offset OFFSET from the
3082 current CFA register. This is transformed to `.cfi_offset' using the
3083 known displacement of the CFA register from the CFA. This is often
3084 easier to use, because the number will match the code it's annotating.
3089 SPARC register window has been saved.
3091 `.cfi_escape' EXPRESSION[, ...]
3092 ===============================
3094 Allows the user to add arbitrary bytes to the unwind info. One
3095 might use this to add OS-specific CFI opcodes, or generic CFI opcodes
3096 that GAS does not yet support.
3099 File: as.info, Node: LNS directives, Next: Long, Prev: Ln, Up: Pseudo Ops
3101 `.file FILENO FILENAME'
3102 =======================
3104 When emitting dwarf2 line number information `.file' assigns
3105 filenames to the `.debug_line' file name table. The FILENO operand
3106 should be a unique positive integer to use as the index of the entry in
3107 the table. The FILENAME operand is a C string literal.
3109 The detail of filename indicies is exposed to the user because the
3110 filename table is shared with the `.debug_info' section of the dwarf2
3111 debugging information, and thus the user must know the exact indicies
3112 that table entries will have.
3114 `.loc FILENO LINENO [COLUMN] [OPTIONS]'
3115 =======================================
3117 The `.loc' directive will add row to the `.debug_line' line number
3118 matrix corresponding to the immediately following assembly instruction.
3119 The FILENO, LINENO, and optional COLUMN arguments will be applied to
3120 the `.debug_line' state machine before the row is added.
3122 The OPTIONS are a sequence of the following tokens in any order:
3125 This option will set the `basic_block' register in the
3126 `.debug_line' state machine to `true'.
3129 This option will set the `prologue_end' register in the
3130 `.debug_line' state machine to `true'.
3133 This option will set the `epilogue_begin' register in the
3134 `.debug_line' state machine to `true'.
3137 This option will set the `is_stmt' register in the `.debug_line'
3138 state machine to `value', which must be either 0 or 1.
3141 This directive will set the `isa' register in the `.debug_line'
3142 state machine to VALUE, which must be an unsigned integer.
3144 `.loc_mark_blocks ENABLE'
3145 =========================
3147 The `.loc_mark_blocks' directive makes the assembler emit an entry
3148 to the `.debug_line' line number matrix with the `basic_block' register
3149 in the state machine set whenever a code label is seen. The ENABLE
3150 argument should be either 1 or 0, to enable or disable this function
3154 File: as.info, Node: Data, Next: Def, Prev: CFI directives, Up: Pseudo Ops
3159 `.data' tells `as' to assemble the following statements onto the end
3160 of the data subsection numbered SUBSECTION (which is an absolute
3161 expression). If SUBSECTION is omitted, it defaults to zero.
3164 File: as.info, Node: Def, Next: Desc, Prev: Data, Up: Pseudo Ops
3169 Begin defining debugging information for a symbol NAME; the
3170 definition extends until the `.endef' directive is encountered.
3173 File: as.info, Node: Desc, Next: Dim, Prev: Def, Up: Pseudo Ops
3175 `.desc SYMBOL, ABS-EXPRESSION'
3176 ==============================
3178 This directive sets the descriptor of the symbol (*note Symbol
3179 Attributes::) to the low 16 bits of an absolute expression.
3181 The `.desc' directive is not available when `as' is configured for
3182 COFF output; it is only for `a.out' or `b.out' object format. For the
3183 sake of compatibility, `as' accepts it, but produces no output, when
3184 configured for COFF.
3187 File: as.info, Node: Dim, Next: Double, Prev: Desc, Up: Pseudo Ops
3192 This directive is generated by compilers to include auxiliary
3193 debugging information in the symbol table. It is only permitted inside
3194 `.def'/`.endef' pairs.
3197 File: as.info, Node: Double, Next: Eject, Prev: Dim, Up: Pseudo Ops
3202 `.double' expects zero or more flonums, separated by commas. It
3203 assembles floating point numbers. The exact kind of floating point
3204 numbers emitted depends on how `as' is configured. *Note Machine
3208 File: as.info, Node: Eject, Next: Else, Prev: Double, Up: Pseudo Ops
3213 Force a page break at this point, when generating assembly listings.
3216 File: as.info, Node: Else, Next: Elseif, Prev: Eject, Up: Pseudo Ops
3221 `.else' is part of the `as' support for conditional assembly; *note
3222 `.if': If.. It marks the beginning of a section of code to be
3223 assembled if the condition for the preceding `.if' was false.
3226 File: as.info, Node: Elseif, Next: End, Prev: Else, Up: Pseudo Ops
3231 `.elseif' is part of the `as' support for conditional assembly;
3232 *note `.if': If.. It is shorthand for beginning a new `.if' block that
3233 would otherwise fill the entire `.else' section.
3236 File: as.info, Node: End, Next: Endef, Prev: Elseif, Up: Pseudo Ops
3241 `.end' marks the end of the assembly file. `as' does not process
3242 anything in the file past the `.end' directive.
3245 File: as.info, Node: Endef, Next: Endfunc, Prev: End, Up: Pseudo Ops
3250 This directive flags the end of a symbol definition begun with
3254 File: as.info, Node: Endfunc, Next: Endif, Prev: Endef, Up: Pseudo Ops
3259 `.endfunc' marks the end of a function specified with `.func'.
3262 File: as.info, Node: Endif, Next: Equ, Prev: Endfunc, Up: Pseudo Ops
3267 `.endif' is part of the `as' support for conditional assembly; it
3268 marks the end of a block of code that is only assembled conditionally.
3272 File: as.info, Node: Equ, Next: Equiv, Prev: Endif, Up: Pseudo Ops
3274 `.equ SYMBOL, EXPRESSION'
3275 =========================
3277 This directive sets the value of SYMBOL to EXPRESSION. It is
3278 synonymous with `.set'; *note `.set': Set..
3280 The syntax for `equ' on the HPPA is `SYMBOL .equ EXPRESSION'.
3282 The syntax for `equ' on the Z80 is `SYMBOL equ EXPRESSION'. On the
3283 Z80 it is an eror if SYMBOL is already defined, but the symbol is not
3284 protected from later redefinition, compare *Note Equiv::.
3287 File: as.info, Node: Equiv, Next: Eqv, Prev: Equ, Up: Pseudo Ops
3289 `.equiv SYMBOL, EXPRESSION'
3290 ===========================
3292 The `.equiv' directive is like `.equ' and `.set', except that the
3293 assembler will signal an error if SYMBOL is already defined. Note a
3294 symbol which has been referenced but not actually defined is considered
3297 Except for the contents of the error message, this is roughly
3303 plus it protects the symbol from later redefinition.
3306 File: as.info, Node: Eqv, Next: Err, Prev: Equiv, Up: Pseudo Ops
3308 `.eqv SYMBOL, EXPRESSION'
3309 =========================
3311 The `.eqv' directive is like `.equiv', but no attempt is made to
3312 evaluate the expression or any part of it immediately. Instead each
3313 time the resulting symbol is used in an expression, a snapshot of its
3314 current value is taken.
3317 File: as.info, Node: Err, Next: Error, Prev: Eqv, Up: Pseudo Ops
3322 If `as' assembles a `.err' directive, it will print an error message
3323 and, unless the `-Z' option was used, it will not generate an object
3324 file. This can be used to signal an error in conditionally compiled
3328 File: as.info, Node: Error, Next: Exitm, Prev: Err, Up: Pseudo Ops
3333 Similarly to `.err', this directive emits an error, but you can
3334 specify a string that will be emitted as the error message. If you
3335 don't specify the message, it defaults to `".error directive invoked in
3336 source file"'. *Note Error and Warning Messages: Errors.
3338 .error "This code has not been assembled and tested."
3341 File: as.info, Node: Exitm, Next: Extern, Prev: Error, Up: Pseudo Ops
3346 Exit early from the current macro definition. *Note Macro::.
3349 File: as.info, Node: Extern, Next: Fail, Prev: Exitm, Up: Pseudo Ops
3354 `.extern' is accepted in the source program--for compatibility with
3355 other assemblers--but it is ignored. `as' treats all undefined symbols
3359 File: as.info, Node: Fail, Next: File, Prev: Extern, Up: Pseudo Ops
3364 Generates an error or a warning. If the value of the EXPRESSION is
3365 500 or more, `as' will print a warning message. If the value is less
3366 than 500, `as' will print an error message. The message will include
3367 the value of EXPRESSION. This can occasionally be useful inside
3368 complex nested macros or conditional assembly.
3371 File: as.info, Node: File, Next: Fill, Prev: Fail, Up: Pseudo Ops
3376 `.file' tells `as' that we are about to start a new logical file.
3377 STRING is the new file name. In general, the filename is recognized
3378 whether or not it is surrounded by quotes `"'; but if you wish to
3379 specify an empty file name, you must give the quotes-`""'. This
3380 statement may go away in future: it is only recognized to be compatible
3381 with old `as' programs.
3384 File: as.info, Node: Fill, Next: Float, Prev: File, Up: Pseudo Ops
3386 `.fill REPEAT , SIZE , VALUE'
3387 =============================
3389 REPEAT, SIZE and VALUE are absolute expressions. This emits REPEAT
3390 copies of SIZE bytes. REPEAT may be zero or more. SIZE may be zero or
3391 more, but if it is more than 8, then it is deemed to have the value 8,
3392 compatible with other people's assemblers. The contents of each REPEAT
3393 bytes is taken from an 8-byte number. The highest order 4 bytes are
3394 zero. The lowest order 4 bytes are VALUE rendered in the byte-order of
3395 an integer on the computer `as' is assembling for. Each SIZE bytes in
3396 a repetition is taken from the lowest order SIZE bytes of this number.
3397 Again, this bizarre behavior is compatible with other people's
3400 SIZE and VALUE are optional. If the second comma and VALUE are
3401 absent, VALUE is assumed zero. If the first comma and following tokens
3402 are absent, SIZE is assumed to be 1.
3405 File: as.info, Node: Float, Next: Func, Prev: Fill, Up: Pseudo Ops
3410 This directive assembles zero or more flonums, separated by commas.
3411 It has the same effect as `.single'. The exact kind of floating point
3412 numbers emitted depends on how `as' is configured. *Note Machine
3416 File: as.info, Node: Func, Next: Global, Prev: Float, Up: Pseudo Ops
3418 `.func NAME[,LABEL]'
3419 ====================
3421 `.func' emits debugging information to denote function NAME, and is
3422 ignored unless the file is assembled with debugging enabled. Only
3423 `--gstabs[+]' is currently supported. LABEL is the entry point of the
3424 function and if omitted NAME prepended with the `leading char' is used.
3425 `leading char' is usually `_' or nothing, depending on the target. All
3426 functions are currently defined to have `void' return type. The
3427 function must be terminated with `.endfunc'.
3430 File: as.info, Node: Global, Next: Hidden, Prev: Func, Up: Pseudo Ops
3432 `.global SYMBOL', `.globl SYMBOL'
3433 =================================
3435 `.global' makes the symbol visible to `ld'. If you define SYMBOL in
3436 your partial program, its value is made available to other partial
3437 programs that are linked with it. Otherwise, SYMBOL takes its
3438 attributes from a symbol of the same name from another file linked into
3441 Both spellings (`.globl' and `.global') are accepted, for
3442 compatibility with other assemblers.
3444 On the HPPA, `.global' is not always enough to make it accessible to
3445 other partial programs. You may need the HPPA-only `.EXPORT' directive
3446 as well. *Note HPPA Assembler Directives: HPPA Directives.
3449 File: as.info, Node: Hidden, Next: hword, Prev: Global, Up: Pseudo Ops
3454 This is one of the ELF visibility directives. The other two are
3455 `.internal' (*note `.internal': Internal.) and `.protected' (*note
3456 `.protected': Protected.).
3458 This directive overrides the named symbols default visibility (which
3459 is set by their binding: local, global or weak). The directive sets
3460 the visibility to `hidden' which means that the symbols are not visible
3461 to other components. Such symbols are always considered to be
3462 `protected' as well.
3465 File: as.info, Node: hword, Next: Ident, Prev: Hidden, Up: Pseudo Ops
3467 `.hword EXPRESSIONS'
3468 ====================
3470 This expects zero or more EXPRESSIONS, and emits a 16 bit number for
3473 This directive is a synonym for `.short'; depending on the target
3474 architecture, it may also be a synonym for `.word'.
3477 File: as.info, Node: Ident, Next: If, Prev: hword, Up: Pseudo Ops
3482 This directive is used by some assemblers to place tags in object
3483 files. `as' simply accepts the directive for source-file compatibility
3484 with such assemblers, but does not actually emit anything for it.
3487 File: as.info, Node: If, Next: Incbin, Prev: Ident, Up: Pseudo Ops
3489 `.if ABSOLUTE EXPRESSION'
3490 =========================
3492 `.if' marks the beginning of a section of code which is only
3493 considered part of the source program being assembled if the argument
3494 (which must be an ABSOLUTE EXPRESSION) is non-zero. The end of the
3495 conditional section of code must be marked by `.endif' (*note `.endif':
3496 Endif.); optionally, you may include code for the alternative
3497 condition, flagged by `.else' (*note `.else': Else.). If you have
3498 several conditions to check, `.elseif' may be used to avoid nesting
3499 blocks if/else within each subsequent `.else' block.
3501 The following variants of `.if' are also supported:
3503 Assembles the following section of code if the specified SYMBOL
3504 has been defined. Note a symbol which has been referenced but not
3505 yet defined is considered to be undefined.
3508 Assembles the following section of code if the operand is blank
3511 `.ifc STRING1,STRING2'
3512 Assembles the following section of code if the two strings are the
3513 same. The strings may be optionally quoted with single quotes.
3514 If they are not quoted, the first string stops at the first comma,
3515 and the second string stops at the end of the line. Strings which
3516 contain whitespace should be quoted. The string comparison is
3519 `.ifeq ABSOLUTE EXPRESSION'
3520 Assembles the following section of code if the argument is zero.
3522 `.ifeqs STRING1,STRING2'
3523 Another form of `.ifc'. The strings must be quoted using double
3526 `.ifge ABSOLUTE EXPRESSION'
3527 Assembles the following section of code if the argument is greater
3528 than or equal to zero.
3530 `.ifgt ABSOLUTE EXPRESSION'
3531 Assembles the following section of code if the argument is greater
3534 `.ifle ABSOLUTE EXPRESSION'
3535 Assembles the following section of code if the argument is less
3536 than or equal to zero.
3538 `.iflt ABSOLUTE EXPRESSION'
3539 Assembles the following section of code if the argument is less
3543 Like `.ifb', but the sense of the test is reversed: this assembles
3544 the following section of code if the operand is non-blank
3547 `.ifnc STRING1,STRING2.'
3548 Like `.ifc', but the sense of the test is reversed: this assembles
3549 the following section of code if the two strings are not the same.
3553 Assembles the following section of code if the specified SYMBOL
3554 has not been defined. Both spelling variants are equivalent.
3555 Note a symbol which has been referenced but not yet defined is
3556 considered to be undefined.
3558 `.ifne ABSOLUTE EXPRESSION'
3559 Assembles the following section of code if the argument is not
3560 equal to zero (in other words, this is equivalent to `.if').
3562 `.ifnes STRING1,STRING2'
3563 Like `.ifeqs', but the sense of the test is reversed: this
3564 assembles the following section of code if the two strings are not
3568 File: as.info, Node: Incbin, Next: Include, Prev: If, Up: Pseudo Ops
3570 `.incbin "FILE"[,SKIP[,COUNT]]'
3571 ===============================
3573 The `incbin' directive includes FILE verbatim at the current
3574 location. You can control the search paths used with the `-I'
3575 command-line option (*note Command-Line Options: Invoking.). Quotation
3576 marks are required around FILE.
3578 The SKIP argument skips a number of bytes from the start of the
3579 FILE. The COUNT argument indicates the maximum number of bytes to
3580 read. Note that the data is not aligned in any way, so it is the user's
3581 responsibility to make sure that proper alignment is provided both
3582 before and after the `incbin' directive.
3585 File: as.info, Node: Include, Next: Int, Prev: Incbin, Up: Pseudo Ops
3590 This directive provides a way to include supporting files at
3591 specified points in your source program. The code from FILE is
3592 assembled as if it followed the point of the `.include'; when the end
3593 of the included file is reached, assembly of the original file
3594 continues. You can control the search paths used with the `-I'
3595 command-line option (*note Command-Line Options: Invoking.). Quotation
3596 marks are required around FILE.
3599 File: as.info, Node: Int, Next: Internal, Prev: Include, Up: Pseudo Ops
3604 Expect zero or more EXPRESSIONS, of any section, separated by commas.
3605 For each expression, emit a number that, at run time, is the value of
3606 that expression. The byte order and bit size of the number depends on
3607 what kind of target the assembly is for.
3610 File: as.info, Node: Internal, Next: Irp, Prev: Int, Up: Pseudo Ops
3615 This is one of the ELF visibility directives. The other two are
3616 `.hidden' (*note `.hidden': Hidden.) and `.protected' (*note
3617 `.protected': Protected.).
3619 This directive overrides the named symbols default visibility (which
3620 is set by their binding: local, global or weak). The directive sets
3621 the visibility to `internal' which means that the symbols are
3622 considered to be `hidden' (i.e., not visible to other components), and
3623 that some extra, processor specific processing must also be performed
3624 upon the symbols as well.
3627 File: as.info, Node: Irp, Next: Irpc, Prev: Internal, Up: Pseudo Ops
3629 `.irp SYMBOL,VALUES'...
3630 =======================
3632 Evaluate a sequence of statements assigning different values to
3633 SYMBOL. The sequence of statements starts at the `.irp' directive, and
3634 is terminated by an `.endr' directive. For each VALUE, SYMBOL is set
3635 to VALUE, and the sequence of statements is assembled. If no VALUE is
3636 listed, the sequence of statements is assembled once, with SYMBOL set
3637 to the null string. To refer to SYMBOL within the sequence of
3638 statements, use \SYMBOL.
3640 For example, assembling
3646 is equivalent to assembling
3652 For some caveats with the spelling of SYMBOL, see also the discussion
3656 File: as.info, Node: Irpc, Next: Lcomm, Prev: Irp, Up: Pseudo Ops
3658 `.irpc SYMBOL,VALUES'...
3659 ========================
3661 Evaluate a sequence of statements assigning different values to
3662 SYMBOL. The sequence of statements starts at the `.irpc' directive,
3663 and is terminated by an `.endr' directive. For each character in VALUE,
3664 SYMBOL is set to the character, and the sequence of statements is
3665 assembled. If no VALUE is listed, the sequence of statements is
3666 assembled once, with SYMBOL set to the null string. To refer to SYMBOL
3667 within the sequence of statements, use \SYMBOL.
3669 For example, assembling
3675 is equivalent to assembling
3681 For some caveats with the spelling of SYMBOL, see also the discussion
3685 File: as.info, Node: Lcomm, Next: Lflags, Prev: Irpc, Up: Pseudo Ops
3687 `.lcomm SYMBOL , LENGTH'
3688 ========================
3690 Reserve LENGTH (an absolute expression) bytes for a local common
3691 denoted by SYMBOL. The section and value of SYMBOL are those of the
3692 new local common. The addresses are allocated in the bss section, so
3693 that at run-time the bytes start off zeroed. SYMBOL is not declared
3694 global (*note `.global': Global.), so is normally not visible to `ld'.
3696 Some targets permit a third argument to be used with `.lcomm'. This
3697 argument specifies the desired alignment of the symbol in the bss
3700 The syntax for `.lcomm' differs slightly on the HPPA. The syntax is
3701 `SYMBOL .lcomm, LENGTH'; SYMBOL is optional.
3704 File: as.info, Node: Lflags, Next: Line, Prev: Lcomm, Up: Pseudo Ops
3709 `as' accepts this directive, for compatibility with other
3710 assemblers, but ignores it.
3713 File: as.info, Node: Line, Next: Linkonce, Prev: Lflags, Up: Pseudo Ops
3718 Change the logical line number. LINE-NUMBER must be an absolute
3719 expression. The next line has that logical line number. Therefore any
3720 other statements on the current line (after a statement separator
3721 character) are reported as on logical line number LINE-NUMBER - 1. One
3722 day `as' will no longer support this directive: it is recognized only
3723 for compatibility with existing assembler programs.
3725 Even though this is a directive associated with the `a.out' or
3726 `b.out' object-code formats, `as' still recognizes it when producing
3727 COFF output, and treats `.line' as though it were the COFF `.ln' _if_
3728 it is found outside a `.def'/`.endef' pair.
3730 Inside a `.def', `.line' is, instead, one of the directives used by
3731 compilers to generate auxiliary symbol information for debugging.
3734 File: as.info, Node: Linkonce, Next: List, Prev: Line, Up: Pseudo Ops
3739 Mark the current section so that the linker only includes a single
3740 copy of it. This may be used to include the same section in several
3741 different object files, but ensure that the linker will only include it
3742 once in the final output file. The `.linkonce' pseudo-op must be used
3743 for each instance of the section. Duplicate sections are detected
3744 based on the section name, so it should be unique.
3746 This directive is only supported by a few object file formats; as of
3747 this writing, the only object file format which supports it is the
3748 Portable Executable format used on Windows NT.
3750 The TYPE argument is optional. If specified, it must be one of the
3751 following strings. For example:
3753 Not all types may be supported on all object file formats.
3756 Silently discard duplicate sections. This is the default.
3759 Warn if there are duplicate sections, but still keep only one copy.
3762 Warn if any of the duplicates have different sizes.
3765 Warn if any of the duplicates do not have exactly the same
3769 File: as.info, Node: Ln, Next: LNS directives, Prev: List, Up: Pseudo Ops
3774 `.ln' is a synonym for `.line'.
3777 File: as.info, Node: MRI, Next: Noaltmacro, Prev: Macro, Up: Pseudo Ops
3782 If VAL is non-zero, this tells `as' to enter MRI mode. If VAL is
3783 zero, this tells `as' to exit MRI mode. This change affects code
3784 assembled until the next `.mri' directive, or until the end of the
3785 file. *Note MRI mode: M.
3788 File: as.info, Node: List, Next: Ln, Prev: Linkonce, Up: Pseudo Ops
3793 Control (in conjunction with the `.nolist' directive) whether or not
3794 assembly listings are generated. These two directives maintain an
3795 internal counter (which is zero initially). `.list' increments the
3796 counter, and `.nolist' decrements it. Assembly listings are generated
3797 whenever the counter is greater than zero.
3799 By default, listings are disabled. When you enable them (with the
3800 `-a' command line option; *note Command-Line Options: Invoking.), the
3801 initial value of the listing counter is one.
3804 File: as.info, Node: Long, Next: Macro, Prev: LNS directives, Up: Pseudo Ops
3809 `.long' is the same as `.int', *note `.int': Int..
3812 File: as.info, Node: Macro, Next: MRI, Prev: Long, Up: Pseudo Ops
3817 The commands `.macro' and `.endm' allow you to define macros that
3818 generate assembly output. For example, this definition specifies a
3819 macro `sum' that puts a sequence of numbers into memory:
3821 .macro sum from=0, to=5
3828 With that definition, `SUM 0,5' is equivalent to this assembly input:
3838 `.macro MACNAME MACARGS ...'
3839 Begin the definition of a macro called MACNAME. If your macro
3840 definition requires arguments, specify their names after the macro
3841 name, separated by commas or spaces. You can qualify the macro
3842 argument to indicate whether all invocations must specify a
3843 non-blank value (through `:`req''), or whether it takes all of the
3844 remaining arguments (through `:`vararg''). You can supply a
3845 default value for any macro argument by following the name with
3846 `=DEFLT'. You cannot define two macros with the same MACNAME
3847 unless it has been subject to the `.purgem' directive (*Note
3848 Purgem::.) between the two definitions. For example, these are
3849 all valid `.macro' statements:
3852 Begin the definition of a macro called `comm', which takes no
3855 `.macro plus1 p, p1'
3857 Either statement begins the definition of a macro called
3858 `plus1', which takes two arguments; within the macro
3859 definition, write `\p' or `\p1' to evaluate the arguments.
3861 `.macro reserve_str p1=0 p2'
3862 Begin the definition of a macro called `reserve_str', with two
3863 arguments. The first argument has a default value, but not
3864 the second. After the definition is complete, you can call
3865 the macro either as `reserve_str A,B' (with `\p1' evaluating
3866 to A and `\p2' evaluating to B), or as `reserve_str ,B' (with
3867 `\p1' evaluating as the default, in this case `0', and `\p2'
3870 `.macro m p1:req, p2=0, p3:vararg'
3871 Begin the definition of a macro called `m', with at least three
3872 arguments. The first argument must always have a value specified,
3873 but not the second, which instead has a default value. The third
3874 formal will get assigned all remaining arguments specified at
3877 When you call a macro, you can specify the argument values either
3878 by position, or by keyword. For example, `sum 9,17' is equivalent
3879 to `sum to=17, from=9'.
3881 Note that since each of the MACARGS can be an identifier exactly
3882 as any other one permitted by the target architecture, there may be
3883 occasional problems if the target hand-crafts special meanings to
3884 certain characters when they occur in a special position. For
3885 example, if colon (`:') is generally permitted to be part of a
3886 symbol name, but the architecture specific code special-cases it
3887 when occuring as the final character of a symbol (to denote a
3888 label), then the macro parameter replacement code will have no way
3889 of knowing that and consider the whole construct (including the
3890 colon) an identifier, and check only this identifier for being the
3891 subject to parameter substitution. In this example, besides the
3892 potential of just separating identifier and colon by white space,
3893 using alternate macro syntax (*Note Altmacro::.) and ampersand
3894 (`&') as the character to separate literal text from macro
3895 parameters (or macro parameters from one another) would provide a
3896 way to achieve the same effect:
3903 This applies identically to the identifiers used in `.irp' (*Note
3904 Irp::.) and `.irpc' (*Note Irpc::.).
3907 Mark the end of a macro definition.
3910 Exit early from the current macro definition.
3913 `as' maintains a counter of how many macros it has executed in
3914 this pseudo-variable; you can copy that number to your output with
3915 `\@', but _only within a macro definition_.
3917 `LOCAL NAME [ , ... ]'
3918 _Warning: `LOCAL' is only available if you select "alternate macro
3919 syntax" with `--alternate' or `.altmacro'._ *Note `.altmacro':
3923 File: as.info, Node: Altmacro, Next: Ascii, Prev: Align, Up: Pseudo Ops
3928 Enable alternate macro mode, enabling:
3930 `LOCAL NAME [ , ... ]'
3931 One additional directive, `LOCAL', is available. It is used to
3932 generate a string replacement for each of the NAME arguments, and
3933 replace any instances of NAME in each macro expansion. The
3934 replacement string is unique in the assembly, and different for
3935 each separate macro expansion. `LOCAL' allows you to write macros
3936 that define symbols, without fear of conflict between separate
3940 You can write strings delimited in these other ways besides
3944 You can delimit strings with single-quote charaters.
3947 You can delimit strings with matching angle brackets.
3949 `single-character string escape'
3950 To include any single character literally in a string (even if the
3951 character would otherwise have some special meaning), you can
3952 prefix the character with `!' (an exclamation mark). For example,
3953 you can write `<4.3 !> 5.4!!>' to get the literal text `4.3 >
3956 `Expression results as strings'
3957 You can write `%EXPR' to evaluate the expression EXPR and use the
3961 File: as.info, Node: Noaltmacro, Next: Nolist, Prev: MRI, Up: Pseudo Ops
3966 Disable alternate macro mode. *Note Altmacro::
3969 File: as.info, Node: Nolist, Next: Octa, Prev: Noaltmacro, Up: Pseudo Ops
3974 Control (in conjunction with the `.list' directive) whether or not
3975 assembly listings are generated. These two directives maintain an
3976 internal counter (which is zero initially). `.list' increments the
3977 counter, and `.nolist' decrements it. Assembly listings are generated
3978 whenever the counter is greater than zero.
3981 File: as.info, Node: Octa, Next: Org, Prev: Nolist, Up: Pseudo Ops
3986 This directive expects zero or more bignums, separated by commas.
3987 For each bignum, it emits a 16-byte integer.
3989 The term "octa" comes from contexts in which a "word" is two bytes;
3990 hence _octa_-word for 16 bytes.
3993 File: as.info, Node: Org, Next: P2align, Prev: Octa, Up: Pseudo Ops
3995 `.org NEW-LC , FILL'
3996 ====================
3998 Advance the location counter of the current section to NEW-LC.
3999 NEW-LC is either an absolute expression or an expression with the same
4000 section as the current subsection. That is, you can't use `.org' to
4001 cross sections: if NEW-LC has the wrong section, the `.org' directive
4002 is ignored. To be compatible with former assemblers, if the section of
4003 NEW-LC is absolute, `as' issues a warning, then pretends the section of
4004 NEW-LC is the same as the current subsection.
4006 `.org' may only increase the location counter, or leave it
4007 unchanged; you cannot use `.org' to move the location counter backwards.
4009 Because `as' tries to assemble programs in one pass, NEW-LC may not
4010 be undefined. If you really detest this restriction we eagerly await a
4011 chance to share your improved assembler.
4013 Beware that the origin is relative to the start of the section, not
4014 to the start of the subsection. This is compatible with other people's
4017 When the location counter (of the current subsection) is advanced,
4018 the intervening bytes are filled with FILL which should be an absolute
4019 expression. If the comma and FILL are omitted, FILL defaults to zero.
4022 File: as.info, Node: P2align, Next: PopSection, Prev: Org, Up: Pseudo Ops
4024 `.p2align[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR'
4025 ===========================================
4027 Pad the location counter (in the current subsection) to a particular
4028 storage boundary. The first expression (which must be absolute) is the
4029 number of low-order zero bits the location counter must have after
4030 advancement. For example `.p2align 3' advances the location counter
4031 until it a multiple of 8. If the location counter is already a
4032 multiple of 8, no change is needed.
4034 The second expression (also absolute) gives the fill value to be
4035 stored in the padding bytes. It (and the comma) may be omitted. If it
4036 is omitted, the padding bytes are normally zero. However, on some
4037 systems, if the section is marked as containing code and the fill value
4038 is omitted, the space is filled with no-op instructions.
4040 The third expression is also absolute, and is also optional. If it
4041 is present, it is the maximum number of bytes that should be skipped by
4042 this alignment directive. If doing the alignment would require
4043 skipping more bytes than the specified maximum, then the alignment is
4044 not done at all. You can omit the fill value (the second argument)
4045 entirely by simply using two commas after the required alignment; this
4046 can be useful if you want the alignment to be filled with no-op
4047 instructions when appropriate.
4049 The `.p2alignw' and `.p2alignl' directives are variants of the
4050 `.p2align' directive. The `.p2alignw' directive treats the fill
4051 pattern as a two byte word value. The `.p2alignl' directives treats the
4052 fill pattern as a four byte longword value. For example, `.p2alignw
4053 2,0x368d' will align to a multiple of 4. If it skips two bytes, they
4054 will be filled in with the value 0x368d (the exact placement of the
4055 bytes depends upon the endianness of the processor). If it skips 1 or
4056 3 bytes, the fill value is undefined.
4059 File: as.info, Node: Previous, Next: Print, Prev: PopSection, Up: Pseudo Ops
4064 This is one of the ELF section stack manipulation directives. The
4065 others are `.section' (*note Section::), `.subsection' (*note
4066 SubSection::), `.pushsection' (*note PushSection::), and `.popsection'
4067 (*note PopSection::).
4069 This directive swaps the current section (and subsection) with most
4070 recently referenced section (and subsection) prior to this one.
4071 Multiple `.previous' directives in a row will flip between two sections
4072 (and their subsections).
4074 In terms of the section stack, this directive swaps the current
4075 section with the top section on the section stack.
4078 File: as.info, Node: PopSection, Next: Previous, Prev: P2align, Up: Pseudo Ops
4083 This is one of the ELF section stack manipulation directives. The
4084 others are `.section' (*note Section::), `.subsection' (*note
4085 SubSection::), `.pushsection' (*note PushSection::), and `.previous'
4088 This directive replaces the current section (and subsection) with
4089 the top section (and subsection) on the section stack. This section is
4090 popped off the stack.
4093 File: as.info, Node: Print, Next: Protected, Prev: Previous, Up: Pseudo Ops
4098 `as' will print STRING on the standard output during assembly. You
4099 must put STRING in double quotes.
4102 File: as.info, Node: Protected, Next: Psize, Prev: Print, Up: Pseudo Ops
4107 This is one of the ELF visibility directives. The other two are
4108 `.hidden' (*note Hidden::) and `.internal' (*note Internal::).
4110 This directive overrides the named symbols default visibility (which
4111 is set by their binding: local, global or weak). The directive sets
4112 the visibility to `protected' which means that any references to the
4113 symbols from within the components that defines them must be resolved
4114 to the definition in that component, even if a definition in another
4115 component would normally preempt this.
4118 File: as.info, Node: Psize, Next: Purgem, Prev: Protected, Up: Pseudo Ops
4120 `.psize LINES , COLUMNS'
4121 ========================
4123 Use this directive to declare the number of lines--and, optionally,
4124 the number of columns--to use for each page, when generating listings.
4126 If you do not use `.psize', listings use a default line-count of 60.
4127 You may omit the comma and COLUMNS specification; the default width is
4130 `as' generates formfeeds whenever the specified number of lines is
4131 exceeded (or whenever you explicitly request one, using `.eject').
4133 If you specify LINES as `0', no formfeeds are generated save those
4134 explicitly specified with `.eject'.
4137 File: as.info, Node: Purgem, Next: PushSection, Prev: Psize, Up: Pseudo Ops
4142 Undefine the macro NAME, so that later uses of the string will not be
4143 expanded. *Note Macro::.
4146 File: as.info, Node: PushSection, Next: Quad, Prev: Purgem, Up: Pseudo Ops
4148 `.pushsection NAME , SUBSECTION'
4149 ================================
4151 This is one of the ELF section stack manipulation directives. The
4152 others are `.section' (*note Section::), `.subsection' (*note
4153 SubSection::), `.popsection' (*note PopSection::), and `.previous'
4156 This directive pushes the current section (and subsection) onto the
4157 top of the section stack, and then replaces the current section and
4158 subsection with `name' and `subsection'.
4161 File: as.info, Node: Quad, Next: Rept, Prev: PushSection, Up: Pseudo Ops
4166 `.quad' expects zero or more bignums, separated by commas. For each
4167 bignum, it emits an 8-byte integer. If the bignum won't fit in 8
4168 bytes, it prints a warning message; and just takes the lowest order 8
4169 bytes of the bignum.
4171 The term "quad" comes from contexts in which a "word" is two bytes;
4172 hence _quad_-word for 8 bytes.
4175 File: as.info, Node: Rept, Next: Sbttl, Prev: Quad, Up: Pseudo Ops
4180 Repeat the sequence of lines between the `.rept' directive and the
4181 next `.endr' directive COUNT times.
4183 For example, assembling
4189 is equivalent to assembling
4196 File: as.info, Node: Sbttl, Next: Scl, Prev: Rept, Up: Pseudo Ops
4198 `.sbttl "SUBHEADING"'
4199 =====================
4201 Use SUBHEADING as the title (third line, immediately after the title
4202 line) when generating assembly listings.
4204 This directive affects subsequent pages, as well as the current page
4205 if it appears within ten lines of the top of a page.
4208 File: as.info, Node: Scl, Next: Section, Prev: Sbttl, Up: Pseudo Ops
4213 Set the storage-class value for a symbol. This directive may only be
4214 used inside a `.def'/`.endef' pair. Storage class may flag whether a
4215 symbol is static or external, or it may record further symbolic
4216 debugging information.
4219 File: as.info, Node: Section, Next: Set, Prev: Scl, Up: Pseudo Ops
4224 Use the `.section' directive to assemble the following code into a
4227 This directive is only supported for targets that actually support
4228 arbitrarily named sections; on `a.out' targets, for example, it is not
4229 accepted, even with a standard `a.out' section name.
4234 For COFF targets, the `.section' directive is used in one of the
4237 .section NAME[, "FLAGS"]
4238 .section NAME[, SUBSEGMENT]
4240 If the optional argument is quoted, it is taken as flags to use for
4241 the section. Each flag is a single character. The following flags are
4244 bss section (uninitialized data)
4247 section is not loaded
4262 shared section (meaningful for PE targets)
4265 ignored. (For compatibility with the ELF version)
4267 If no flags are specified, the default flags depend upon the section
4268 name. If the section name is not recognized, the default will be for
4269 the section to be loaded and writable. Note the `n' and `w' flags
4270 remove attributes from the section, rather than adding them, so if they
4271 are used on their own it will be as if no flags had been specified at
4274 If the optional argument to the `.section' directive is not quoted,
4275 it is taken as a subsegment number (*note Sub-Sections::).
4280 This is one of the ELF section stack manipulation directives. The
4281 others are `.subsection' (*note SubSection::), `.pushsection' (*note
4282 PushSection::), `.popsection' (*note PopSection::), and `.previous'
4285 For ELF targets, the `.section' directive is used like this:
4287 .section NAME [, "FLAGS"[, @TYPE[,FLAG_SPECIFIC_ARGUMENTS]]]
4289 The optional FLAGS argument is a quoted string which may contain any
4290 combination of the following characters:
4292 section is allocatable
4298 section is executable
4301 section is mergeable
4304 section contains zero terminated strings
4307 section is a member of a section group
4310 section is used for thread-local-storage
4312 The optional TYPE argument may contain one of the following
4315 section contains data
4318 section does not contain data (i.e., section only occupies space)
4321 section contains data which is used by things other than the
4325 section contains an array of pointers to init functions
4328 section contains an array of pointers to finish functions
4331 section contains an array of pointers to pre-init functions
4333 Many targets only support the first three section types.
4335 Note on targets where the `@' character is the start of a comment (eg
4336 ARM) then another character is used instead. For example the ARM port
4337 uses the `%' character.
4339 If FLAGS contains the `M' symbol then the TYPE argument must be
4340 specified as well as an extra argument - ENTSIZE - like this:
4342 .section NAME , "FLAGS"M, @TYPE, ENTSIZE
4344 Sections with the `M' flag but not `S' flag must contain fixed size
4345 constants, each ENTSIZE octets long. Sections with both `M' and `S'
4346 must contain zero terminated strings where each character is ENTSIZE
4347 bytes long. The linker may remove duplicates within sections with the
4348 same name, same entity size and same flags. ENTSIZE must be an
4349 absolute expression.
4351 If FLAGS contains the `G' symbol then the TYPE argument must be
4352 present along with an additional field like this:
4354 .section NAME , "FLAGS"G, @TYPE, GROUPNAME[, LINKAGE]
4356 The GROUPNAME field specifies the name of the section group to which
4357 this particular section belongs. The optional linkage field can
4360 indicates that only one copy of this section should be retained
4365 Note - if both the M and G flags are present then the fields for the
4366 Merge flag should come first, like this:
4368 .section NAME , "FLAGS"MG, @TYPE, ENTSIZE, GROUPNAME[, LINKAGE]
4370 If no flags are specified, the default flags depend upon the section
4371 name. If the section name is not recognized, the default will be for
4372 the section to have none of the above flags: it will not be allocated
4373 in memory, nor writable, nor executable. The section will contain data.
4375 For ELF targets, the assembler supports another type of `.section'
4376 directive for compatibility with the Solaris assembler:
4378 .section "NAME"[, FLAGS...]
4380 Note that the section name is quoted. There may be a sequence of
4381 comma separated flags:
4383 section is allocatable
4389 section is executable
4392 section is used for thread local storage
4394 This directive replaces the current section and subsection. See the
4395 contents of the gas testsuite directory `gas/testsuite/gas/elf' for
4396 some examples of how this directive and the other section stack
4400 File: as.info, Node: Set, Next: Short, Prev: Section, Up: Pseudo Ops
4402 `.set SYMBOL, EXPRESSION'
4403 =========================
4405 Set the value of SYMBOL to EXPRESSION. This changes SYMBOL's value
4406 and type to conform to EXPRESSION. If SYMBOL was flagged as external,
4407 it remains flagged (*note Symbol Attributes::).
4409 You may `.set' a symbol many times in the same assembly.
4411 If you `.set' a global symbol, the value stored in the object file
4412 is the last value stored into it.
4414 The syntax for `set' on the HPPA is `SYMBOL .set EXPRESSION'.
4416 On Z80 `set' is a real instruction, use `SYMBOL defl EXPRESSION'
4420 File: as.info, Node: Short, Next: Single, Prev: Set, Up: Pseudo Ops
4422 `.short EXPRESSIONS'
4423 ====================
4425 `.short' is normally the same as `.word'. *Note `.word': Word.
4427 In some configurations, however, `.short' and `.word' generate
4428 numbers of different lengths; *note Machine Dependencies::.
4431 File: as.info, Node: Single, Next: Size, Prev: Short, Up: Pseudo Ops
4436 This directive assembles zero or more flonums, separated by commas.
4437 It has the same effect as `.float'. The exact kind of floating point
4438 numbers emitted depends on how `as' is configured. *Note Machine
4442 File: as.info, Node: Size, Next: Skip, Prev: Single, Up: Pseudo Ops
4447 This directive is used to set the size associated with a symbol.
4452 For COFF targets, the `.size' directive is only permitted inside
4453 `.def'/`.endef' pairs. It is used like this:
4460 For ELF targets, the `.size' directive is used like this:
4462 .size NAME , EXPRESSION
4464 This directive sets the size associated with a symbol NAME. The
4465 size in bytes is computed from EXPRESSION which can make use of label
4466 arithmetic. This directive is typically used to set the size of
4470 File: as.info, Node: Sleb128, Next: Space, Prev: Skip, Up: Pseudo Ops
4472 `.sleb128 EXPRESSIONS'
4473 ======================
4475 SLEB128 stands for "signed little endian base 128." This is a
4476 compact, variable length representation of numbers used by the DWARF
4477 symbolic debugging format. *Note `.uleb128': Uleb128.
4480 File: as.info, Node: Skip, Next: Sleb128, Prev: Size, Up: Pseudo Ops
4485 This directive emits SIZE bytes, each of value FILL. Both SIZE and
4486 FILL are absolute expressions. If the comma and FILL are omitted, FILL
4487 is assumed to be zero. This is the same as `.space'.
4490 File: as.info, Node: Space, Next: Stab, Prev: Sleb128, Up: Pseudo Ops
4492 `.space SIZE , FILL'
4493 ====================
4495 This directive emits SIZE bytes, each of value FILL. Both SIZE and
4496 FILL are absolute expressions. If the comma and FILL are omitted, FILL
4497 is assumed to be zero. This is the same as `.skip'.
4499 _Warning:_ `.space' has a completely different meaning for HPPA
4500 targets; use `.block' as a substitute. See `HP9000 Series 800
4501 Assembly Language Reference Manual' (HP 92432-90001) for the
4502 meaning of the `.space' directive. *Note HPPA Assembler
4503 Directives: HPPA Directives, for a summary.
4506 File: as.info, Node: Stab, Next: String, Prev: Space, Up: Pseudo Ops
4508 `.stabd, .stabn, .stabs'
4509 ========================
4511 There are three directives that begin `.stab'. All emit symbols
4512 (*note Symbols::), for use by symbolic debuggers. The symbols are not
4513 entered in the `as' hash table: they cannot be referenced elsewhere in
4514 the source file. Up to five fields are required:
4517 This is the symbol's name. It may contain any character except
4518 `\000', so is more general than ordinary symbol names. Some
4519 debuggers used to code arbitrarily complex structures into symbol
4520 names using this field.
4523 An absolute expression. The symbol's type is set to the low 8
4524 bits of this expression. Any bit pattern is permitted, but `ld'
4525 and debuggers choke on silly bit patterns.
4528 An absolute expression. The symbol's "other" attribute is set to
4529 the low 8 bits of this expression.
4532 An absolute expression. The symbol's descriptor is set to the low
4533 16 bits of this expression.
4536 An absolute expression which becomes the symbol's value.
4538 If a warning is detected while reading a `.stabd', `.stabn', or
4539 `.stabs' statement, the symbol has probably already been created; you
4540 get a half-formed symbol in your object file. This is compatible with
4543 `.stabd TYPE , OTHER , DESC'
4544 The "name" of the symbol generated is not even an empty string.
4545 It is a null pointer, for compatibility. Older assemblers used a
4546 null pointer so they didn't waste space in object files with empty
4549 The symbol's value is set to the location counter, relocatably.
4550 When your program is linked, the value of this symbol is the
4551 address of the location counter when the `.stabd' was assembled.
4553 `.stabn TYPE , OTHER , DESC , VALUE'
4554 The name of the symbol is set to the empty string `""'.
4556 `.stabs STRING , TYPE , OTHER , DESC , VALUE'
4557 All five fields are specified.
4560 File: as.info, Node: String, Next: Struct, Prev: Stab, Up: Pseudo Ops
4565 Copy the characters in STR to the object file. You may specify more
4566 than one string to copy, separated by commas. Unless otherwise
4567 specified for a particular machine, the assembler marks the end of each
4568 string with a 0 byte. You can use any of the escape sequences
4569 described in *Note Strings: Strings.
4572 File: as.info, Node: Struct, Next: SubSection, Prev: String, Up: Pseudo Ops
4574 `.struct EXPRESSION'
4575 ====================
4577 Switch to the absolute section, and set the section offset to
4578 EXPRESSION, which must be an absolute expression. You might use this
4586 This would define the symbol `field1' to have the value 0, the symbol
4587 `field2' to have the value 4, and the symbol `field3' to have the value
4588 8. Assembly would be left in the absolute section, and you would need
4589 to use a `.section' directive of some sort to change to some other
4590 section before further assembly.
4593 File: as.info, Node: SubSection, Next: Symver, Prev: Struct, Up: Pseudo Ops
4598 This is one of the ELF section stack manipulation directives. The
4599 others are `.section' (*note Section::), `.pushsection' (*note
4600 PushSection::), `.popsection' (*note PopSection::), and `.previous'
4603 This directive replaces the current subsection with `name'. The
4604 current section is not changed. The replaced subsection is put onto
4605 the section stack in place of the then current top of stack subsection.
4608 File: as.info, Node: Symver, Next: Tag, Prev: SubSection, Up: Pseudo Ops
4613 Use the `.symver' directive to bind symbols to specific version nodes
4614 within a source file. This is only supported on ELF platforms, and is
4615 typically used when assembling files to be linked into a shared library.
4616 There are cases where it may make sense to use this in objects to be
4617 bound into an application itself so as to override a versioned symbol
4618 from a shared library.
4620 For ELF targets, the `.symver' directive can be used like this:
4621 .symver NAME, NAME2@NODENAME
4622 If the symbol NAME is defined within the file being assembled, the
4623 `.symver' directive effectively creates a symbol alias with the name
4624 NAME2@NODENAME, and in fact the main reason that we just don't try and
4625 create a regular alias is that the @ character isn't permitted in
4626 symbol names. The NAME2 part of the name is the actual name of the
4627 symbol by which it will be externally referenced. The name NAME itself
4628 is merely a name of convenience that is used so that it is possible to
4629 have definitions for multiple versions of a function within a single
4630 source file, and so that the compiler can unambiguously know which
4631 version of a function is being mentioned. The NODENAME portion of the
4632 alias should be the name of a node specified in the version script
4633 supplied to the linker when building a shared library. If you are
4634 attempting to override a versioned symbol from a shared library, then
4635 NODENAME should correspond to the nodename of the symbol you are trying
4638 If the symbol NAME is not defined within the file being assembled,
4639 all references to NAME will be changed to NAME2@NODENAME. If no
4640 reference to NAME is made, NAME2@NODENAME will be removed from the
4643 Another usage of the `.symver' directive is:
4644 .symver NAME, NAME2@@NODENAME
4645 In this case, the symbol NAME must exist and be defined within the
4646 file being assembled. It is similar to NAME2@NODENAME. The difference
4647 is NAME2@@NODENAME will also be used to resolve references to NAME2 by
4650 The third usage of the `.symver' directive is:
4651 .symver NAME, NAME2@@@NODENAME
4652 When NAME is not defined within the file being assembled, it is
4653 treated as NAME2@NODENAME. When NAME is defined within the file being
4654 assembled, the symbol name, NAME, will be changed to NAME2@@NODENAME.
4657 File: as.info, Node: Tag, Next: Text, Prev: Symver, Up: Pseudo Ops
4662 This directive is generated by compilers to include auxiliary
4663 debugging information in the symbol table. It is only permitted inside
4664 `.def'/`.endef' pairs. Tags are used to link structure definitions in
4665 the symbol table with instances of those structures.
4668 File: as.info, Node: Text, Next: Title, Prev: Tag, Up: Pseudo Ops
4673 Tells `as' to assemble the following statements onto the end of the
4674 text subsection numbered SUBSECTION, which is an absolute expression.
4675 If SUBSECTION is omitted, subsection number zero is used.
4678 File: as.info, Node: Title, Next: Type, Prev: Text, Up: Pseudo Ops
4683 Use HEADING as the title (second line, immediately after the source
4684 file name and pagenumber) when generating assembly listings.
4686 This directive affects subsequent pages, as well as the current page
4687 if it appears within ten lines of the top of a page.
4690 File: as.info, Node: Type, Next: Uleb128, Prev: Title, Up: Pseudo Ops
4695 This directive is used to set the type of a symbol.
4700 For COFF targets, this directive is permitted only within
4701 `.def'/`.endef' pairs. It is used like this:
4705 This records the integer INT as the type attribute of a symbol table
4711 For ELF targets, the `.type' directive is used like this:
4713 .type NAME , TYPE DESCRIPTION
4715 This sets the type of symbol NAME to be either a function symbol or
4716 an object symbol. There are five different syntaxes supported for the
4717 TYPE DESCRIPTION field, in order to provide compatibility with various
4718 other assemblers. The syntaxes supported are:
4720 .type <name>,#function
4721 .type <name>,#object
4723 .type <name>,@function
4724 .type <name>,@object
4726 .type <name>,%function
4727 .type <name>,%object
4729 .type <name>,"function"
4730 .type <name>,"object"
4732 .type <name> STT_FUNCTION
4733 .type <name> STT_OBJECT
4736 File: as.info, Node: Uleb128, Next: Val, Prev: Type, Up: Pseudo Ops
4738 `.uleb128 EXPRESSIONS'
4739 ======================
4741 ULEB128 stands for "unsigned little endian base 128." This is a
4742 compact, variable length representation of numbers used by the DWARF
4743 symbolic debugging format. *Note `.sleb128': Sleb128.
4746 File: as.info, Node: Val, Next: Version, Prev: Uleb128, Up: Pseudo Ops
4751 This directive, permitted only within `.def'/`.endef' pairs, records
4752 the address ADDR as the value attribute of a symbol table entry.
4755 File: as.info, Node: Version, Next: VTableEntry, Prev: Val, Up: Pseudo Ops
4760 This directive creates a `.note' section and places into it an ELF
4761 formatted note of type NT_VERSION. The note's name is set to `string'.
4764 File: as.info, Node: VTableEntry, Next: VTableInherit, Prev: Version, Up: Pseudo Ops
4766 `.vtable_entry TABLE, OFFSET'
4767 =============================
4769 This directive finds or creates a symbol `table' and creates a
4770 `VTABLE_ENTRY' relocation for it with an addend of `offset'.
4773 File: as.info, Node: VTableInherit, Next: Warning, Prev: VTableEntry, Up: Pseudo Ops
4775 `.vtable_inherit CHILD, PARENT'
4776 ===============================
4778 This directive finds the symbol `child' and finds or creates the
4779 symbol `parent' and then creates a `VTABLE_INHERIT' relocation for the
4780 parent whose addend is the value of the child symbol. As a special
4781 case the parent name of `0' is treated as refering the `*ABS*' section.
4784 File: as.info, Node: Warning, Next: Weak, Prev: VTableInherit, Up: Pseudo Ops
4789 Similar to the directive `.error' (*note `.error "STRING"': Error.),
4790 but just emits a warning.
4793 File: as.info, Node: Weak, Next: Weakref, Prev: Warning, Up: Pseudo Ops
4798 This directive sets the weak attribute on the comma separated list
4799 of symbol `names'. If the symbols do not already exist, they will be
4802 On COFF targets other than PE, weak symbols are a GNU extension.
4803 This directive sets the weak attribute on the comma separated list of
4804 symbol `names'. If the symbols do not already exist, they will be
4807 On the PE target, weak symbols are supported natively as weak
4808 aliases. When a weak symbol is created that is not an alias, GAS
4809 creates an alternate symbol to hold the default value.
4812 File: as.info, Node: Weakref, Next: Word, Prev: Weak, Up: Pseudo Ops
4814 `.weakref ALIAS, TARGET'
4815 ========================
4817 This directive creates an alias to the target symbol that enables
4818 the symbol to be referenced with weak-symbol semantics, but without
4819 actually making it weak. If direct references or definitions of the
4820 symbol are present, then the symbol will not be weak, but if all
4821 references to it are through weak references, the symbol will be marked
4822 as weak in the symbol table.
4824 The effect is equivalent to moving all references to the alias to a
4825 separate assembly source file, renaming the alias to the symbol in it,
4826 declaring the symbol as weak there, and running a reloadable link to
4827 merge the object files resulting from the assembly of the new source
4828 file and the old source file that had the references to the alias
4831 The alias itself never makes to the symbol table, and is entirely
4832 handled within the assembler.
4835 File: as.info, Node: Word, Next: Deprecated, Prev: Weakref, Up: Pseudo Ops
4840 This directive expects zero or more EXPRESSIONS, of any section,
4841 separated by commas.
4843 The size of the number emitted, and its byte order, depend on what
4844 target computer the assembly is for.
4846 _Warning: Special Treatment to support Compilers_
4848 Machines with a 32-bit address space, but that do less than 32-bit
4849 addressing, require the following special treatment. If the machine of
4850 interest to you does 32-bit addressing (or doesn't require it; *note
4851 Machine Dependencies::), you can ignore this issue.
4853 In order to assemble compiler output into something that works, `as'
4854 occasionally does strange things to `.word' directives. Directives of
4855 the form `.word sym1-sym2' are often emitted by compilers as part of
4856 jump tables. Therefore, when `as' assembles a directive of the form
4857 `.word sym1-sym2', and the difference between `sym1' and `sym2' does
4858 not fit in 16 bits, `as' creates a "secondary jump table", immediately
4859 before the next label. This secondary jump table is preceded by a
4860 short-jump to the first byte after the secondary table. This
4861 short-jump prevents the flow of control from accidentally falling into
4862 the new table. Inside the table is a long-jump to `sym2'. The
4863 original `.word' contains `sym1' minus the address of the long-jump to
4866 If there were several occurrences of `.word sym1-sym2' before the
4867 secondary jump table, all of them are adjusted. If there was a `.word
4868 sym3-sym4', that also did not fit in sixteen bits, a long-jump to
4869 `sym4' is included in the secondary jump table, and the `.word'
4870 directives are adjusted to contain `sym3' minus the address of the
4871 long-jump to `sym4'; and so on, for as many entries in the original
4872 jump table as necessary.
4875 File: as.info, Node: Deprecated, Prev: Word, Up: Pseudo Ops
4877 Deprecated Directives
4878 =====================
4880 One day these directives won't work. They are included for
4881 compatibility with older assemblers.
4886 File: as.info, Node: Machine Dependencies, Next: Reporting Bugs, Prev: Pseudo Ops, Up: Top
4888 Machine Dependent Features
4889 **************************
4891 The machine instruction sets are (almost by definition) different on
4892 each machine where `as' runs. Floating point representations vary as
4893 well, and `as' often supports a few additional directives or
4894 command-line options for compatibility with other assemblers on a
4895 particular platform. Finally, some versions of `as' support special
4896 pseudo-instructions for branch optimization.
4898 This chapter discusses most of these differences, though it does not
4899 include details on any machine's instruction set. For details on that
4900 subject, see the hardware manufacturer's manual.
4905 * Alpha-Dependent:: Alpha Dependent Features
4907 * ARC-Dependent:: ARC Dependent Features
4909 * ARM-Dependent:: ARM Dependent Features
4911 * BFIN-Dependent:: BFIN Dependent Features
4913 * CRIS-Dependent:: CRIS Dependent Features
4915 * D10V-Dependent:: D10V Dependent Features
4917 * D30V-Dependent:: D30V Dependent Features
4919 * H8/300-Dependent:: Renesas H8/300 Dependent Features
4921 * HPPA-Dependent:: HPPA Dependent Features
4923 * ESA/390-Dependent:: IBM ESA/390 Dependent Features
4925 * i386-Dependent:: Intel 80386 and AMD x86-64 Dependent Features
4927 * i860-Dependent:: Intel 80860 Dependent Features
4929 * i960-Dependent:: Intel 80960 Dependent Features
4931 * IA-64-Dependent:: Intel IA-64 Dependent Features
4933 * IP2K-Dependent:: IP2K Dependent Features
4935 * M32C-Dependent:: M32C Dependent Features
4937 * M32R-Dependent:: M32R Dependent Features
4939 * M68K-Dependent:: M680x0 Dependent Features
4941 * M68HC11-Dependent:: M68HC11 and 68HC12 Dependent Features
4943 * MIPS-Dependent:: MIPS Dependent Features
4945 * MMIX-Dependent:: MMIX Dependent Features
4947 * MSP430-Dependent:: MSP430 Dependent Features
4949 * SH-Dependent:: Renesas / SuperH SH Dependent Features
4950 * SH64-Dependent:: SuperH SH64 Dependent Features
4952 * PDP-11-Dependent:: PDP-11 Dependent Features
4954 * PJ-Dependent:: picoJava Dependent Features
4956 * PPC-Dependent:: PowerPC Dependent Features
4958 * Sparc-Dependent:: SPARC Dependent Features
4960 * TIC54X-Dependent:: TI TMS320C54x Dependent Features
4962 * V850-Dependent:: V850 Dependent Features
4964 * Xtensa-Dependent:: Xtensa Dependent Features
4966 * Z80-Dependent:: Z80 Dependent Features
4968 * Z8000-Dependent:: Z8000 Dependent Features
4970 * Vax-Dependent:: VAX Dependent Features
4973 File: as.info, Node: Alpha-Dependent, Next: ARC-Dependent, Up: Machine Dependencies
4975 Alpha Dependent Features
4976 ========================
4980 * Alpha Notes:: Notes
4981 * Alpha Options:: Options
4982 * Alpha Syntax:: Syntax
4983 * Alpha Floating Point:: Floating Point
4984 * Alpha Directives:: Alpha Machine Directives
4985 * Alpha Opcodes:: Opcodes
4988 File: as.info, Node: Alpha Notes, Next: Alpha Options, Up: Alpha-Dependent
4993 The documentation here is primarily for the ELF object format. `as'
4994 also supports the ECOFF and EVAX formats, but features specific to
4995 these formats are not yet documented.
4998 File: as.info, Node: Alpha Options, Next: Alpha Syntax, Prev: Alpha Notes, Up: Alpha-Dependent
5004 This option specifies the target processor. If an attempt is made
5005 to assemble an instruction which will not execute on the target
5006 processor, the assembler may either expand the instruction as a
5007 macro or issue an error message. This option is equivalent to the
5010 The following processor names are recognized: `21064', `21064a',
5011 `21066', `21068', `21164', `21164a', `21164pc', `21264', `21264a',
5012 `21264b', `ev4', `ev5', `lca45', `ev5', `ev56', `pca56', `ev6',
5013 `ev67', `ev68'. The special name `all' may be used to allow the
5014 assembler to accept instructions valid for any Alpha processor.
5016 In order to support existing practice in OSF/1 with respect to
5017 `.arch', and existing practice within `MILO' (the Linux ARC
5018 bootloader), the numbered processor names (e.g. 21064) enable the
5019 processor-specific PALcode instructions, while the
5020 "electro-vlasic" names (e.g. `ev4') do not.
5024 Enables or disables the generation of `.mdebug' encapsulation for
5025 stabs directives and procedure descriptors. The default is to
5026 automatically enable `.mdebug' when the first stabs directive is
5030 This option forces all relocations to be put into the object file,
5031 instead of saving space and resolving some relocations at assembly
5032 time. Note that this option does not propagate all symbol
5033 arithmetic into the object file, because not all symbol arithmetic
5034 can be represented. However, the option can still be useful in
5035 specific applications.
5038 This option is used when the compiler generates debug information.
5039 When `gcc' is using `mips-tfile' to generate debug information
5040 for ECOFF, local labels must be passed through to the object file.
5041 Otherwise this option has no effect.
5044 A local common symbol larger than SIZE is placed in `.bss', while
5045 smaller symbols are placed in `.sbss'.
5049 These options are ignored for backward compatibility.
5052 File: as.info, Node: Alpha Syntax, Next: Alpha Floating Point, Prev: Alpha Options, Up: Alpha-Dependent
5057 The assembler syntax closely follow the Alpha Reference Manual;
5058 assembler directives and general syntax closely follow the OSF/1 and
5059 OpenVMS syntax, with a few differences for ELF.
5063 * Alpha-Chars:: Special Characters
5064 * Alpha-Regs:: Register Names
5065 * Alpha-Relocs:: Relocations
5068 File: as.info, Node: Alpha-Chars, Next: Alpha-Regs, Up: Alpha Syntax
5073 `#' is the line comment character.
5075 `;' can be used instead of a newline to separate statements.
5078 File: as.info, Node: Alpha-Regs, Next: Alpha-Relocs, Prev: Alpha-Chars, Up: Alpha Syntax
5083 The 32 integer registers are referred to as `$N' or `$rN'. In
5084 addition, registers 15, 28, 29, and 30 may be referred to by the
5085 symbols `$fp', `$at', `$gp', and `$sp' respectively.
5087 The 32 floating-point registers are referred to as `$fN'.
5090 File: as.info, Node: Alpha-Relocs, Prev: Alpha-Regs, Up: Alpha Syntax
5095 Some of these relocations are available for ECOFF, but mostly only
5096 for ELF. They are modeled after the relocation format introduced in
5097 Digital Unix 4.0, but there are additions.
5099 The format is `!TAG' or `!TAG!NUMBER' where TAG is the name of the
5100 relocation. In some cases NUMBER is used to relate specific
5103 The relocation is placed at the end of the instruction like so:
5105 ldah $0,a($29) !gprelhigh
5106 lda $0,a($0) !gprellow
5107 ldq $1,b($29) !literal!100
5108 ldl $2,0($1) !lituse_base!100
5112 Used with an `ldq' instruction to load the address of a symbol
5115 A sequence number N is optional, and if present is used to pair
5116 `lituse' relocations with this `literal' relocation. The `lituse'
5117 relocations are used by the linker to optimize the code based on
5118 the final location of the symbol.
5120 Note that these optimizations are dependent on the data flow of the
5121 program. Therefore, if _any_ `lituse' is paired with a `literal'
5122 relocation, then _all_ uses of the register set by the `literal'
5123 instruction must also be marked with `lituse' relocations. This
5124 is because the original `literal' instruction may be deleted or
5125 transformed into another instruction.
5127 Also note that there may be a one-to-many relationship between
5128 `literal' and `lituse', but not a many-to-one. That is, if there
5129 are two code paths that load up the same address and feed the
5130 value to a single use, then the use may not use a `lituse'
5134 Used with any memory format instruction (e.g. `ldl') to indicate
5135 that the literal is used for an address load. The offset field of
5136 the instruction must be zero. During relaxation, the code may be
5137 altered to use a gp-relative load.
5140 Used with a register branch format instruction (e.g. `jsr') to
5141 indicate that the literal is used for a call. During relaxation,
5142 the code may be altered to use a direct branch (e.g. `bsr').
5144 `!lituse_jsrdirect!N'
5145 Similar to `lituse_jsr', but also that this call cannot be vectored
5146 through a PLT entry. This is useful for functions with special
5147 calling conventions which do not allow the normal call-clobbered
5148 registers to be clobbered.
5151 Used with a byte mask instruction (e.g. `extbl') to indicate that
5152 only the low 3 bits of the address are relevant. During
5153 relaxation, the code may be altered to use an immediate instead of
5157 Used with any other instruction to indicate that the original
5158 address is in fact used, and the original `ldq' instruction may
5159 not be altered or deleted. This is useful in conjunction with
5160 `lituse_jsr' to test whether a weak symbol is defined.
5162 ldq $27,foo($29) !literal!1
5163 beq $27,is_undef !lituse_addr!1
5164 jsr $26,($27),foo !lituse_jsr!1
5167 Used with a register branch format instruction to indicate that the
5168 literal is the call to `__tls_get_addr' used to compute the
5169 address of the thread-local storage variable whose descriptor was
5170 loaded with `!tlsgd!N'.
5173 Used with a register branch format instruction to indicate that the
5174 literal is the call to `__tls_get_addr' used to compute the
5175 address of the base of the thread-local storage block for the
5176 current module. The descriptor for the module must have been
5177 loaded with `!tlsldm!N'.
5180 Used with `ldah' and `lda' to load the GP from the current
5181 address, a-la the `ldgp' macro. The source register for the
5182 `ldah' instruction must contain the address of the `ldah'
5183 instruction. There must be exactly one `lda' instruction paired
5184 with the `ldah' instruction, though it may appear anywhere in the
5185 instruction stream. The immediate operands must be zero.
5188 ldah $29,0($26) !gpdisp!1
5189 lda $29,0($29) !gpdisp!1
5192 Used with an `ldah' instruction to add the high 16 bits of a
5193 32-bit displacement from the GP.
5196 Used with any memory format instruction to add the low 16 bits of a
5197 32-bit displacement from the GP.
5200 Used with any memory format instruction to add a 16-bit
5201 displacement from the GP.
5204 Used with any branch format instruction to skip the GP load at the
5205 target address. The referenced symbol must have the same GP as the
5206 source object file, and it must be declared to either not use `$27'
5207 or perform a standard GP load in the first two instructions via the
5208 `.prologue' directive.
5212 Used with an `lda' instruction to load the address of a TLS
5213 descriptor for a symbol in the GOT.
5215 The sequence number N is optional, and if present it used to pair
5216 the descriptor load with both the `literal' loading the address of
5217 the `__tls_get_addr' function and the `lituse_tlsgd' marking the
5218 call to that function.
5220 For proper relaxation, both the `tlsgd', `literal' and `lituse'
5221 relocations must be in the same extended basic block. That is,
5222 the relocation with the lowest address must be executed first at
5227 Used with an `lda' instruction to load the address of a TLS
5228 descriptor for the current module in the GOT.
5230 Similar in other respects to `tlsgd'.
5233 Used with an `ldq' instruction to load the offset of the TLS
5234 symbol within its module's thread-local storage block. Also known
5235 as the dynamic thread pointer offset or dtp-relative offset.
5240 Like `gprel' relocations except they compute dtp-relative offsets.
5243 Used with an `ldq' instruction to load the offset of the TLS
5244 symbol from the thread pointer. Also known as the tp-relative
5250 Like `gprel' relocations except they compute tp-relative offsets.
5253 File: as.info, Node: Alpha Floating Point, Next: Alpha Directives, Prev: Alpha Syntax, Up: Alpha-Dependent
5258 The Alpha family uses both IEEE and VAX floating-point numbers.
5261 File: as.info, Node: Alpha Directives, Next: Alpha Opcodes, Prev: Alpha Floating Point, Up: Alpha-Dependent
5263 Alpha Assembler Directives
5264 --------------------------
5266 `as' for the Alpha supports many additional directives for
5267 compatibility with the native assembler. This section describes them
5270 These are the additional directives in `as' for the Alpha:
5273 Specifies the target processor. This is equivalent to the `-mCPU'
5274 command-line option. *Note Options: Alpha Options, for a list of
5277 `.ent FUNCTION[, N]'
5278 Mark the beginning of FUNCTION. An optional number may follow for
5279 compatibility with the OSF/1 assembler, but is ignored. When
5280 generating `.mdebug' information, this will create a procedure
5281 descriptor for the function. In ELF, it will mark the symbol as a
5282 function a-la the generic `.type' directive.
5285 Mark the end of FUNCTION. In ELF, it will set the size of the
5286 symbol a-la the generic `.size' directive.
5288 `.mask MASK, OFFSET'
5289 Indicate which of the integer registers are saved in the current
5290 function's stack frame. MASK is interpreted a bit mask in which
5291 bit N set indicates that register N is saved. The registers are
5292 saved in a block located OFFSET bytes from the "canonical frame
5293 address" (CFA) which is the value of the stack pointer on entry to
5294 the function. The registers are saved sequentially, except that
5295 the return address register (normally `$26') is saved first.
5297 This and the other directives that describe the stack frame are
5298 currently only used when generating `.mdebug' information. They
5299 may in the future be used to generate DWARF2 `.debug_frame' unwind
5300 information for hand written assembly.
5302 `.fmask MASK, OFFSET'
5303 Indicate which of the floating-point registers are saved in the
5304 current stack frame. The MASK and OFFSET parameters are
5305 interpreted as with `.mask'.
5307 `.frame FRAMEREG, FRAMEOFFSET, RETREG[, ARGOFFSET]'
5308 Describes the shape of the stack frame. The frame pointer in use
5309 is FRAMEREG; normally this is either `$fp' or `$sp'. The frame
5310 pointer is FRAMEOFFSET bytes below the CFA. The return address is
5311 initially located in RETREG until it is saved as indicated in
5312 `.mask'. For compatibility with OSF/1 an optional ARGOFFSET
5313 parameter is accepted and ignored. It is believed to indicate the
5314 offset from the CFA to the saved argument registers.
5317 Indicate that the stack frame is set up and all registers have been
5318 spilled. The argument N indicates whether and how the function
5319 uses the incoming "procedure vector" (the address of the called
5320 function) in `$27'. 0 indicates that `$27' is not used; 1
5321 indicates that the first two instructions of the function use `$27'
5322 to perform a load of the GP register; 2 indicates that `$27' is
5323 used in some non-standard way and so the linker cannot elide the
5324 load of the procedure vector during relaxation.
5326 `.usepv FUNCTION, WHICH'
5327 Used to indicate the use of the `$27' register, similar to
5328 `.prologue', but without the other semantics of needing to be
5329 inside an open `.ent'/`.end' block.
5331 The WHICH argument should be either `no', indicating that `$27' is
5332 not used, or `std', indicating that the first two instructions of
5333 the function perform a GP load.
5335 One might use this directive instead of `.prologue' if you are
5336 also using dwarf2 CFI directives.
5338 `.gprel32 EXPRESSION'
5339 Computes the difference between the address in EXPRESSION and the
5340 GP for the current object file, and stores it in 4 bytes. In
5341 addition to being smaller than a full 8 byte address, this also
5342 does not require a dynamic relocation when used in a shared
5345 `.t_floating EXPRESSION'
5346 Stores EXPRESSION as an IEEE double precision value.
5348 `.s_floating EXPRESSION'
5349 Stores EXPRESSION as an IEEE single precision value.
5351 `.f_floating EXPRESSION'
5352 Stores EXPRESSION as a VAX F format value.
5354 `.g_floating EXPRESSION'
5355 Stores EXPRESSION as a VAX G format value.
5357 `.d_floating EXPRESSION'
5358 Stores EXPRESSION as a VAX D format value.
5361 Enables or disables various assembler features. Using the positive
5362 name of the feature enables while using `noFEATURE' disables.
5365 Indicates that macro expansions may clobber the "assembler
5366 temporary" (`$at' or `$28') register. Some macros may not be
5367 expanded without this and will generate an error message if
5368 `noat' is in effect. When `at' is in effect, a warning will
5369 be generated if `$at' is used by the programmer.
5372 Enables the expansion of macro instructions. Note that
5373 variants of real instructions, such as `br label' vs `br
5374 $31,label' are considered alternate forms and not macros.
5379 These control whether and how the assembler may re-order
5380 instructions. Accepted for compatibility with the OSF/1
5381 assembler, but `as' does not do instruction scheduling, so
5382 these features are ignored.
5384 The following directives are recognized for compatibility with the
5385 OSF/1 assembler but are ignored.
5394 File: as.info, Node: Alpha Opcodes, Prev: Alpha Directives, Up: Alpha-Dependent
5399 For detailed information on the Alpha machine instruction set, see
5400 the Alpha Architecture Handbook
5401 (ftp://ftp.digital.com/pub/Digital/info/semiconductor/literature/alphaahb.pdf).
5404 File: as.info, Node: ARC-Dependent, Next: ARM-Dependent, Prev: Alpha-Dependent, Up: Machine Dependencies
5406 ARC Dependent Features
5407 ======================
5411 * ARC Options:: Options
5412 * ARC Syntax:: Syntax
5413 * ARC Floating Point:: Floating Point
5414 * ARC Directives:: ARC Machine Directives
5415 * ARC Opcodes:: Opcodes
5418 File: as.info, Node: ARC Options, Next: ARC Syntax, Up: ARC-Dependent
5424 This option selects the core processor variant. Using `-marc' is
5425 the same as `-marc6', which is also the default.
5428 Base instruction set.
5431 Jump-and-link (jl) instruction. No requirement of an
5432 instruction between setting flags and conditional jump. For
5439 Break (brk) and sleep (sleep) instructions.
5442 Software interrupt (swi) instruction.
5444 Note: the `.option' directive can to be used to select a core
5445 variant from within assembly code.
5448 This option specifies that the output generated by the assembler
5449 should be marked as being encoded for a big-endian processor.
5452 This option specifies that the output generated by the assembler
5453 should be marked as being encoded for a little-endian processor -
5454 this is the default.
5457 File: as.info, Node: ARC Syntax, Next: ARC Floating Point, Prev: ARC Options, Up: ARC-Dependent
5464 * ARC-Chars:: Special Characters
5465 * ARC-Regs:: Register Names
5468 File: as.info, Node: ARC-Chars, Next: ARC-Regs, Up: ARC Syntax
5476 File: as.info, Node: ARC-Regs, Prev: ARC-Chars, Up: ARC Syntax
5484 File: as.info, Node: ARC Floating Point, Next: ARC Directives, Prev: ARC Syntax, Up: ARC-Dependent
5489 The ARC core does not currently have hardware floating point
5490 support. Software floating point support is provided by `GCC' and uses
5491 IEEE floating-point numbers.
5494 File: as.info, Node: ARC Directives, Next: ARC Opcodes, Prev: ARC Floating Point, Up: ARC-Dependent
5496 ARC Machine Directives
5497 ----------------------
5499 The ARC version of `as' supports the following additional machine
5502 `.2byte EXPRESSIONS'
5505 `.3byte EXPRESSIONS'
5508 `.4byte EXPRESSIONS'
5511 `.extAuxRegister NAME,ADDRESS,MODE'
5512 The ARCtangent A4 has extensible auxiliary register space. The
5513 auxiliary registers can be defined in the assembler source code by
5514 using this directive. The first parameter is the NAME of the new
5515 auxiallry register. The second parameter is the ADDRESS of the
5516 register in the auxiliary register memory map for the variant of
5517 the ARC. The third parameter specifies the MODE in which the
5518 register can be operated is and it can be one of:
5524 `r|w (read or write)'
5527 .extAuxRegister mulhi,0x12,w
5529 This specifies an extension auxiliary register called _mulhi_
5530 which is at address 0x12 in the memory space and which is only
5533 `.extCondCode SUFFIX,VALUE'
5534 The condition codes on the ARCtangent A4 are extensible and can be
5535 specified by means of this assembler directive. They are specified
5536 by the suffix and the value for the condition code. They can be
5537 used to specify extra condition codes with any values. For
5540 .extCondCode is_busy,0x14
5542 add.is_busy r1,r2,r3
5545 `.extCoreRegister NAME,REGNUM,MODE,SHORTCUT'
5546 Specifies an extension core register NAME for the application.
5547 This allows a register NAME with a valid REGNUM between 0 and 60,
5548 with the following as valid values for MODE
5554 `_r|w_ (read or write)'
5555 The other parameter gives a description of the register having a
5556 SHORTCUT in the pipeline. The valid values are:
5563 .extCoreRegister mlo,57,r,can_shortcut
5565 This defines an extension core register mlo with the value 57 which
5566 can shortcut the pipeline.
5568 `.extInstruction NAME,OPCODE,SUBOPCODE,SUFFIXCLASS,SYNTAXCLASS'
5569 The ARCtangent A4 allows the user to specify extension
5570 instructions. The extension instructions are not macros. The
5571 assembler creates encodings for use of these instructions
5572 according to the specification by the user. The parameters are:
5575 Name of the extension instruction
5578 Opcode to be used. (Bits 27:31 in the encoding). Valid values
5582 Subopcode to be used. Valid values are from 0x09-0x3f.
5583 However the correct value also depends on SYNTAXCLASS
5586 Determines the kinds of suffixes to be allowed. Valid values
5587 are `SUFFIX_NONE', `SUFFIX_COND', `SUFFIX_FLAG' which
5588 indicates the absence or presence of conditional suffixes and
5589 flag setting by the extension instruction. It is also
5590 possible to specify that an instruction sets the flags and is
5591 conditional by using `SUFFIX_CODE' | `SUFFIX_FLAG'.
5594 Determines the syntax class for the instruction. It can have
5595 the following values:
5598 2 Operand Instruction
5601 3 Operand Instruction
5603 In addition there could be modifiers for the syntax class as
5606 Syntax Class Modifiers are:
5608 - `OP1_MUST_BE_IMM': Modifies syntax class SYNTAX_3OP,
5609 specifying that the first operand of a three-operand
5610 instruction must be an immediate (i.e. the result is
5611 discarded). OP1_MUST_BE_IMM is used by bitwise ORing it
5612 with SYNTAX_3OP as given in the example below. This
5613 could usually be used to set the flags using specific
5614 instructions and not retain results.
5616 - `OP1_IMM_IMPLIED': Modifies syntax class SYNTAX_20P, it
5617 specifies that there is an implied immediate destination
5618 operand which does not appear in the syntax. For
5619 example, if the source code contains an instruction like:
5623 it really means that the first argument is an implied
5624 immediate (that is, the result is discarded). This is
5625 the same as though the source code were: inst 0,r1,r2.
5626 You use OP1_IMM_IMPLIED by bitwise ORing it with
5630 For example, defining 64-bit multiplier with immediate operands:
5632 .extInstruction mp64,0x14,0x0,SUFFIX_COND | SUFFIX_FLAG ,
5633 SYNTAX_3OP|OP1_MUST_BE_IMM
5635 The above specifies an extension instruction called mp64 which has
5636 3 operands, sets the flags, can be used with a condition code, for
5637 which the first operand is an immediate. (Equivalent to
5638 discarding the result of the operation).
5640 .extInstruction mul64,0x14,0x00,SUFFIX_COND, SYNTAX_2OP|OP1_IMM_IMPLIED
5642 This describes a 2 operand instruction with an implicit first
5643 immediate operand. The result of this operation would be
5652 `.option ARC|ARC5|ARC6|ARC7|ARC8'
5653 The `.option' directive must be followed by the desired core
5654 version. Again `arc' is an alias for `arc6'.
5656 Note: the `.option' directive overrides the command line option
5657 `-marc'; a warning is emitted when the version is not consistent
5658 between the two - even for the implicit default core version
5661 `.short EXPRESSIONS'
5668 File: as.info, Node: ARC Opcodes, Prev: ARC Directives, Up: ARC-Dependent
5673 For information on the ARC instruction set, see `ARC Programmers
5674 Reference Manual', ARC International (www.arc.com)
5677 File: as.info, Node: ARM-Dependent, Next: BFIN-Dependent, Prev: ARC-Dependent, Up: Machine Dependencies
5679 ARM Dependent Features
5680 ======================
5684 * ARM Options:: Options
5685 * ARM Syntax:: Syntax
5686 * ARM Floating Point:: Floating Point
5687 * ARM Directives:: ARM Machine Directives
5688 * ARM Opcodes:: Opcodes
5689 * ARM Mapping Symbols:: Mapping Symbols
5692 File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent
5697 `-mcpu=PROCESSOR[+EXTENSION...]'
5698 This option specifies the target processor. The assembler will
5699 issue an error message if an attempt is made to assemble an
5700 instruction which will not execute on the target processor. The
5701 following processor names are recognized: `arm1', `arm2', `arm250',
5702 `arm3', `arm6', `arm60', `arm600', `arm610', `arm620', `arm7',
5703 `arm7m', `arm7d', `arm7dm', `arm7di', `arm7dmi', `arm70', `arm700',
5704 `arm700i', `arm710', `arm710t', `arm720', `arm720t', `arm740t',
5705 `arm710c', `arm7100', `arm7500', `arm7500fe', `arm7t', `arm7tdmi',
5706 `arm7tdmi-s', `arm8', `arm810', `strongarm', `strongarm1',
5707 `strongarm110', `strongarm1100', `strongarm1110', `arm9', `arm920',
5708 `arm920t', `arm922t', `arm940t', `arm9tdmi', `arm9e', `arm926e',
5709 `arm926ej-s', `arm946e-r0', `arm946e', `arm946e-s', `arm966e-r0',
5710 `arm966e', `arm966e-s', `arm968e-s', `arm10t', `arm10tdmi',
5711 `arm10e', `arm1020', `arm1020t', `arm1020e', `arm1022e',
5712 `arm1026ej-s', `arm1136j-s', `arm1136jf-s', `arm1156t2-s',
5713 `arm1156t2f-s', `arm1176jz-s', `arm1176jzf-s', `mpcore',
5714 `mpcorenovfp', `ep9312' (ARM920 with Cirrus Maverick coprocessor),
5715 `i80200' (Intel XScale processor) `iwmmxt' (Intel(r) XScale
5716 processor with Wireless MMX(tm) technology coprocessor) and
5717 `xscale'. The special name `all' may be used to allow the
5718 assembler to accept instructions valid for any ARM processor.
5720 In addition to the basic instruction set, the assembler can be
5721 told to accept various extension mnemonics that extend the
5722 processor using the co-processor instruction space. For example,
5723 `-mcpu=arm920+maverick' is equivalent to specifying
5724 `-mcpu=ep9312'. The following extensions are currently supported:
5725 `+maverick' `+iwmmxt' and `+xscale'.
5727 `-march=ARCHITECTURE[+EXTENSION...]'
5728 This option specifies the target architecture. The assembler will
5729 issue an error message if an attempt is made to assemble an
5730 instruction which will not execute on the target architecture.
5731 The following architecture names are recognized: `armv1', `armv2',
5732 `armv2a', `armv2s', `armv3', `armv3m', `armv4', `armv4xm',
5733 `armv4t', `armv4txm', `armv5', `armv5t', `armv5txm', `armv5te',
5734 `armv5texp', `armv6', `armv6j', `armv6k', `armv6z', `armv6zk',
5735 `iwmmxt' and `xscale'. If both `-mcpu' and `-march' are
5736 specified, the assembler will use the setting for `-mcpu'.
5738 The architecture option can be extended with the same instruction
5739 set extension options as the `-mcpu' option.
5741 `-mfpu=FLOATING-POINT-FORMAT'
5742 This option specifies the floating point format to assemble for.
5743 The assembler will issue an error message if an attempt is made to
5744 assemble an instruction which will not execute on the target
5745 floating point unit. The following format options are recognized:
5746 `softfpa', `fpe', `fpe2', `fpe3', `fpa', `fpa10', `fpa11',
5747 `arm7500fe', `softvfp', `softvfp+vfp', `vfp', `vfp10', `vfp10-r0',
5748 `vfp9', `vfpxd', `arm1020t', `arm1020e', `arm1136jf-s' and
5751 In addition to determining which instructions are assembled, this
5752 option also affects the way in which the `.double' assembler
5753 directive behaves when assembling little-endian code.
5755 The default is dependent on the processor selected. For
5756 Architecture 5 or later, the default is to assembler for VFP
5757 instructions; for earlier architectures the default is to assemble
5758 for FPA instructions.
5761 This option specifies that the assembler should start assembling
5762 Thumb instructions; that is, it should behave as though the file
5763 starts with a `.code 16' directive.
5766 This option specifies that the output generated by the assembler
5767 should be marked as supporting interworking.
5770 This option specifies that the output generated by the assembler
5771 should be marked as supporting the indicated version of the Arm
5772 Procedure. Calling Standard.
5775 This option specifies that the output generated by the assembler
5776 should be marked as supporting the Arm/Thumb Procedure Calling
5777 Standard. If enabled this option will cause the assembler to
5778 create an empty debugging section in the object file called
5779 .arm.atpcs. Debuggers can use this to determine the ABI being
5783 This indicates the floating point variant of the APCS should be
5784 used. In this variant floating point arguments are passed in FP
5785 registers rather than integer registers.
5788 This indicates that the reentrant variant of the APCS should be
5789 used. This variant supports position independent code.
5792 This option specifies that the output generated by the assembler
5793 should be marked as using specified floating point ABI. The
5794 following values are recognized: `soft', `softfp' and `hard'.
5797 This option specifies which EABI version the produced object files
5798 should conform to. The following values are recognised: `gnu' and
5802 This option specifies that the output generated by the assembler
5803 should be marked as being encoded for a big-endian processor.
5806 This option specifies that the output generated by the assembler
5807 should be marked as being encoded for a little-endian processor.
5810 This option specifies that the output of the assembler should be
5811 marked as position-independent code (PIC).
5814 File: as.info, Node: ARM Syntax, Next: ARM Floating Point, Prev: ARM Options, Up: ARM-Dependent
5821 * ARM-Chars:: Special Characters
5822 * ARM-Regs:: Register Names
5825 File: as.info, Node: ARM-Chars, Next: ARM-Regs, Up: ARM Syntax
5830 The presence of a `@' on a line indicates the start of a comment
5831 that extends to the end of the current line. If a `#' appears as the
5832 first character of a line, the whole line is treated as a comment.
5834 The `;' character can be used instead of a newline to separate
5837 Either `#' or `$' can be used to indicate immediate operands.
5839 *TODO* Explain about /data modifier on symbols.
5842 File: as.info, Node: ARM-Regs, Prev: ARM-Chars, Up: ARM Syntax
5847 *TODO* Explain about ARM register naming, and the predefined names.
5850 File: as.info, Node: ARM Floating Point, Next: ARM Directives, Prev: ARM Syntax, Up: ARM-Dependent
5855 The ARM family uses IEEE floating-point numbers.
5858 File: as.info, Node: ARM Directives, Next: ARM Opcodes, Prev: ARM Floating Point, Up: ARM-Dependent
5860 ARM Machine Directives
5861 ----------------------
5863 `.align EXPRESSION [, EXPRESSION]'
5864 This is the generic .ALIGN directive. For the ARM however if the
5865 first argument is zero (ie no alignment is needed) the assembler
5866 will behave as if the argument had been 2 (ie pad to the next four
5867 byte boundary). This is for compatibility with ARM's own
5870 `NAME .req REGISTER NAME'
5871 This creates an alias for REGISTER NAME called NAME. For example:
5876 This undefines a register alias which was previously defined using
5877 the `req' directive. For example:
5882 An error occurs if the name is undefined. Note - this pseudo op
5883 can be used to delete builtin in register name aliases (eg 'r0').
5884 This should only be done if it is really necessary.
5887 This directive selects the instruction set being generated. The
5888 value 16 selects Thumb, with the value 32 selecting ARM.
5891 This performs the same action as .CODE 16.
5894 This performs the same action as .CODE 32.
5897 This directive forces the selection of Thumb instructions, even if
5898 the target processor does not support those instructions
5901 This directive specifies that the following symbol is the name of a
5902 Thumb encoded function. This information is necessary in order to
5903 allow the assembler and linker to generate correct code for
5904 interworking between Arm and Thumb instructions and should be used
5905 even if interworking is not going to be performed. The presence
5906 of this directive also implies `.thumb'
5909 This performs the equivalent of a `.set' directive in that it
5910 creates a symbol which is an alias for another symbol (possibly
5911 not yet defined). This directive also has the added property in
5912 that it marks the aliased symbol as being a thumb function entry
5913 point, in the same way that the `.thumb_func' directive does.
5916 This directive causes the current contents of the literal pool to
5917 be dumped into the current section (which is assumed to be the
5918 .text section) at the current location (aligned to a word
5919 boundary). `GAS' maintains a separate literal pool for each
5920 section and each sub-section. The `.ltorg' directive will only
5921 affect the literal pool of the current section and sub-section.
5922 At the end of assembly all remaining, un-empty literal pools will
5923 automatically be dumped.
5925 Note - older versions of `GAS' would dump the current literal pool
5926 any time a section change occurred. This is no longer done, since
5927 it prevents accurate control of the placement of literal pools.
5930 This is a synonym for .ltorg.
5933 Marks the start of a function with an unwind table entry.
5936 Marks the end of a function with an unwind table entry. The
5937 unwind index table entry is created when this directive is
5940 If no personality routine has been specified then standard
5941 personality routine 0 or 1 will be used, depending on the number
5942 of unwind opcodes required.
5945 Prevents unwinding through the current function. No personality
5946 routine or exception table data is required or permitted.
5949 Sets the personality routine for the current function to NAME.
5951 `.personalityindex INDEX'
5952 Sets the personality routine for the current function to the EABI
5953 standard routine number INDEX
5956 Marks the end of the current function, and the start of the
5957 exception table entry for that function. Anything between this
5958 directive and the `.fnend' directive will be added to the
5959 exception table entry.
5961 Must be preceded by a `.personality' or `.personalityindex'
5965 Generate unwinder annotations to restore the registers in REGLIST.
5966 The format of REGLIST is the same as the corresponding
5967 store-multiple instruction.
5970 .save {r4, r5, r6, lr}
5971 stmfd sp!, {r4, r5, r6, lr}
5977 fstmdf sp!, {d8, d9, d10}
5980 wstrd wr11, [sp, #-8]!
5981 wstrd wr10, [sp, #-8]!
5984 wstrd wr11, [sp, #-8]!
5986 wstrd wr10, [sp, #-8]!
5989 Generate unwinder annotations for a stack adjustment of COUNT
5990 bytes. A positive value indicates the function prologue allocated
5991 stack space by decrementing the stack pointer.
5994 Tell the unwinder that REG contains the current stack pointer.
5996 `.setfp FPREG, SPREG [, #OFFSET]'
5997 Make all unwinder annotations relaive to a frame pointer. Without
5998 this the unwinder will use offsets from the stack pointer.
6000 The syntax of this directive is the same as the `sub' or `mov'
6001 instruction used to set the frame pointer. SPREG must be either
6002 `sp' or mentioned in a previous `.movsp' directive.
6010 `.raw OFFSET, BYTE1, ...'
6011 Insert one of more arbitary unwind opcode bytes, which are known
6012 to adjust the stack pointer by OFFSET bytes.
6014 For example `.unwind_raw 4, 0xb1, 0x01' is equivalent to `.save
6018 Select the target processor. Valid values for NAME are the same as
6019 for the `-mcpu' commandline option.
6022 Select the target architecture. Valid values for NAME are the
6023 same as for the `-march' commandline option.
6026 Select the floating point unit to assemble for. Valid values for
6027 NAME are the same as for the `-mfpu' commandline option.
6029 `.eabi_attribute TAG, VALUE'
6030 Set the EABI object attribute number TAG to VALUE. The value is
6031 either a `number', `"string"', or `number, "string"' depending on
6035 File: as.info, Node: ARM Opcodes, Next: ARM Mapping Symbols, Prev: ARM Directives, Up: ARM-Dependent
6040 `as' implements all the standard ARM opcodes. It also implements
6041 several pseudo opcodes, including several synthetic load instructions.
6046 This pseudo op will always evaluate to a legal ARM instruction
6047 that does nothing. Currently it will evaluate to MOV r0, r0.
6050 ldr <register> , = <expression>
6052 If expression evaluates to a numeric constant then a MOV or MVN
6053 instruction will be used in place of the LDR instruction, if the
6054 constant can be generated by either of these instructions.
6055 Otherwise the constant will be placed into the nearest literal
6056 pool (if it not already there) and a PC relative LDR instruction
6060 adr <register> <label>
6062 This instruction will load the address of LABEL into the indicated
6063 register. The instruction will evaluate to a PC relative ADD or
6064 SUB instruction depending upon where the label is located. If the
6065 label is out of range, or if it is not defined in the same file
6066 (and section) as the ADR instruction, then an error will be
6067 generated. This instruction will not make use of the literal pool.
6070 adrl <register> <label>
6072 This instruction will load the address of LABEL into the indicated
6073 register. The instruction will evaluate to one or two PC relative
6074 ADD or SUB instructions depending upon where the label is located.
6075 If a second instruction is not needed a NOP instruction will be
6076 generated in its place, so that this instruction is always 8 bytes
6079 If the label is out of range, or if it is not defined in the same
6080 file (and section) as the ADRL instruction, then an error will be
6081 generated. This instruction will not make use of the literal pool.
6083 For information on the ARM or Thumb instruction sets, see `ARM
6084 Software Development Toolkit Reference Manual', Advanced RISC Machines
6088 File: as.info, Node: ARM Mapping Symbols, Prev: ARM Opcodes, Up: ARM-Dependent
6093 The ARM ELF specification requires that special symbols be inserted
6094 into object files to mark certain features:
6097 At the start of a region of code containing ARM instructions.
6100 At the start of a region of code containing THUMB instructions.
6103 At the start of a region of data.
6105 The assembler will automatically insert these symbols for you - there
6106 is no need to code them yourself. Support for tagging symbols ($b, $f,
6107 $p and $m) which is also mentioned in the current ARM ELF specification
6108 is not implemented. This is because they have been dropped from the
6109 new EABI and so tools cannot rely upon their presence.
6112 File: as.info, Node: BFIN-Dependent, Next: CRIS-Dependent, Prev: ARM-Dependent, Up: Machine Dependencies
6114 Blackfin Dependent Features
6115 ===========================
6119 * BFIN Syntax:: BFIN Syntax
6120 * BFIN Directives:: BFIN Directives
6123 File: as.info, Node: BFIN Syntax, Next: BFIN Directives, Up: BFIN-Dependent
6128 `Special Characters'
6129 Assembler input is free format and may appear anywhere on the line.
6130 One instruction may extend across multiple lines or more than one
6131 instruction may appear on the same line. White space (space, tab,
6132 comments or newline) may appear anywhere between tokens. A token
6133 must not have embedded spaces. Tokens include numbers, register
6134 names, keywords, user identifiers, and also some multicharacter
6135 special symbols like "+=", "/*" or "||".
6137 `Instruction Delimiting'
6138 A semicolon must terminate every instruction. Sometimes a complete
6139 instruction will consist of more than one operation. There are two
6140 cases where this occurs. The first is when two general operations
6141 are combined. Normally a comma separates the different parts, as
6144 a0= r3.h * r2.l, a1 = r3.l * r2.h ;
6146 The second case occurs when a general instruction is combined with
6147 one or two memory references for joint issue. The latter portions
6148 are set off by a "||" token.
6150 a0 = r3.h * r2.l || r1 = [p3++] || r4 = [i2++];
6153 The assembler treats register names and instruction keywords in a
6154 case insensitive manner. User identifiers are case sensitive.
6155 Thus, R3.l, R3.L, r3.l and r3.L are all equivalent input to the
6158 Register names are reserved and may not be used as program
6161 Some operations (such as "Move Register") require a register pair.
6162 Register pairs are always data registers and are denoted using a
6163 colon, eg., R3:2. The larger number must be written firsts. Note
6164 that the hardware only supports odd-even pairs, eg., R7:6, R5:4,
6167 Some instructions (such as -SP (Push Multiple)) require a group of
6168 adjacent registers. Adjacent registers are denoted in the syntax
6169 by the range enclosed in parentheses and separated by a colon,
6170 eg., (R7:3). Again, the larger number appears first.
6172 Portions of a particular register may be individually specified.
6173 This is written with a dot (".") following the register name and
6174 then a letter denoting the desired portion. For 32-bit registers,
6175 ".H" denotes the most significant ("High") portion. ".L" denotes
6176 the least-significant portion. The subdivisions of the 40-bit
6177 registers are described later.
6180 The set of 40-bit registers A1 and A0 that normally contain data
6181 that is being manipulated. Each accumulator can be accessed in
6184 `one 40-bit register'
6185 The register will be referred to as A1 or A0.
6187 `one 32-bit register'
6188 The registers are designated as A1.W or A0.W.
6190 `two 16-bit registers'
6191 The registers are designated as A1.H, A1.L, A0.H or A0.L.
6193 `one 8-bit register'
6194 The registers are designated as A1.X or A0.X for the bits that
6195 extend beyond bit 31.
6198 The set of 32-bit registers (R0, R1, R2, R3, R4, R5, R6 and R7)
6199 that normally contain data for manipulation. These are
6200 abbreviated as D-register or Dreg. Data registers can be accessed
6201 as 32-bit registers or as two independent 16-bit registers. The
6202 least significant 16 bits of each register is called the "low"
6203 half and is desginated with ".L" following the register name. The
6204 most significant 16 bits are called the "high" half and is
6205 designated with ".H". following the name.
6207 R7.L, r2.h, r4.L, R0.H
6210 The set of 32-bit registers (P0, P1, P2, P3, P4, P5, SP and FP)
6211 that normally contain byte addresses of data structures. These are
6212 abbreviated as P-register or Preg.
6217 The stack pointer contains the 32-bit address of the last occupied
6218 byte location in the stack. The stack grows by decrementing the
6222 The frame pointer contains the 32-bit address of the previous frame
6223 pointer in the stack. It is located at the top of a frame.
6226 LT0 and LT1. These registers contain the 32-bit address of the
6227 top of a zero overhead loop.
6230 LC0 and LC1. These registers contain the 32-bit counter of the
6231 zero overhead loop executions.
6234 LB0 and LB1. These registers contain the 32-bit address of the
6235 bottom of a zero overhead loop.
6238 The set of 32-bit registers (I0, I1, I2, I3) that normally contain
6239 byte addresses of data structures. Abbreviated I-register or Ireg.
6242 The set of 32-bit registers (M0, M1, M2, M3) that normally contain
6243 offset values that are added and subracted to one of the index
6244 registers. Abbreviated as Mreg.
6247 The set of 32-bit registers (L0, L1, L2, L3) that normally contain
6248 the length in bytes of the circular buffer. Abbreviated as Lreg.
6249 Clear the Lreg to disable circular addressing for the
6253 The set of 32-bit registers (B0, B1, B2, B3) that normally contain
6254 the base address in bytes of the circular buffer. Abbreviated as
6258 The Blackfin family has no hardware floating point but the .float
6259 directive generates ieee floating point numbers for use with
6260 software floating point libraries.
6263 For detailed information on the Blackfin machine instruction set,
6264 see the Blackfin(r) Processor Instruction Set Reference.
6267 File: as.info, Node: BFIN Directives, Prev: BFIN Syntax, Up: BFIN-Dependent
6272 The following directives are provided for compatibility with the
6276 Initializes a four byte data object.
6279 Initializes a two byte data object.
6291 Define and initialize a 32 bit data object.
6294 File: as.info, Node: CRIS-Dependent, Next: D10V-Dependent, Prev: BFIN-Dependent, Up: Machine Dependencies
6296 CRIS Dependent Features
6297 =======================
6301 * CRIS-Opts:: Command-line Options
6302 * CRIS-Expand:: Instruction expansion
6303 * CRIS-Symbols:: Symbols
6304 * CRIS-Syntax:: Syntax
6307 File: as.info, Node: CRIS-Opts, Next: CRIS-Expand, Up: CRIS-Dependent
6309 Command-line Options
6310 --------------------
6312 The CRIS version of `as' has these machine-dependent command-line
6315 The format of the generated object files can be either ELF or a.out,
6316 specified by the command-line options `--emulation=crisaout' and
6317 `--emulation=criself'. The default is ELF (criself), unless `as' has
6318 been configured specifically for a.out by using the configuration name
6321 There are two different link-incompatible ELF object file variants
6322 for CRIS, for use in environments where symbols are expected to be
6323 prefixed by a leading `_' character and for environments without such a
6324 symbol prefix. The variant used for GNU/Linux port has no symbol
6325 prefix. Which variant to produce is specified by either of the options
6326 `--underscore' and `--no-underscore'. The default is `--underscore'.
6327 Since symbols in CRIS a.out objects are expected to have a `_' prefix,
6328 specifying `--no-underscore' when generating a.out objects is an error.
6329 Besides the object format difference, the effect of this option is to
6330 parse register names differently (*note crisnous::). The
6331 `--no-underscore' option makes a `$' register prefix mandatory.
6333 The option `--pic' must be passed to `as' in order to recognize the
6334 symbol syntax used for ELF (SVR4 PIC) position-independent-code (*note
6335 crispic::). This will also affect expansion of instructions. The
6336 expansion with `--pic' will use PC-relative rather than (slightly
6337 faster) absolute addresses in those expansions.
6339 The option `--march=ARCHITECTURE' specifies the recognized
6340 instruction set and recognized register names. It also controls the
6341 architecture type of the object file. Valid values for ARCHITECTURE
6344 All instructions and register names for any architecture variant
6345 in the set v0...v10 are recognized. This is the default if the
6346 target is configured as cris-*.
6349 Only instructions and register names for CRIS v10 (as found in
6350 ETRAX 100 LX) are recognized. This is the default if the target
6351 is configured as crisv10-*.
6354 Only instructions and register names for CRIS v32 (code name
6355 Guinness) are recognized. This is the default if the target is
6356 configured as crisv32-*. This value implies `--no-mul-bug-abort'.
6357 (A subsequent `--mul-bug-abort' will turn it back on.)
6360 Only instructions with register names and addressing modes with
6361 opcodes common to the v10 and v32 are recognized.
6363 When `-N' is specified, `as' will emit a warning when a 16-bit
6364 branch instruction is expanded into a 32-bit multiple-instruction
6365 construct (*note CRIS-Expand::).
6367 Some versions of the CRIS v10, for example in the Etrax 100 LX,
6368 contain a bug that causes destabilizing memory accesses when a multiply
6369 instruction is executed with certain values in the first operand just
6370 before a cache-miss. When the `--mul-bug-abort' command line option is
6371 active (the default value), `as' will refuse to assemble a file
6372 containing a multiply instruction at a dangerous offset, one that could
6373 be the last on a cache-line, or is in a section with insufficient
6374 alignment. This placement checking does not catch any case where the
6375 multiply instruction is dangerously placed because it is located in a
6376 delay-slot. The `--mul-bug-abort' command line option turns off the
6380 File: as.info, Node: CRIS-Expand, Next: CRIS-Symbols, Prev: CRIS-Opts, Up: CRIS-Dependent
6382 Instruction expansion
6383 ---------------------
6385 `as' will silently choose an instruction that fits the operand size
6386 for `[register+constant]' operands. For example, the offset `127' in
6387 `move.d [r3+127],r4' fits in an instruction using a signed-byte offset.
6388 Similarly, `move.d [r2+32767],r1' will generate an instruction using a
6389 16-bit offset. For symbolic expressions and constants that do not fit
6390 in 16 bits including the sign bit, a 32-bit offset is generated.
6392 For branches, `as' will expand from a 16-bit branch instruction into
6393 a sequence of instructions that can reach a full 32-bit address. Since
6394 this does not correspond to a single instruction, such expansions can
6395 optionally be warned about. *Note CRIS-Opts::.
6397 If the operand is found to fit the range, a `lapc' mnemonic will
6398 translate to a `lapcq' instruction. Use `lapc.d' to force the 32-bit
6401 Similarly, the `addo' mnemonic will translate to the shortest
6402 fitting instruction of `addoq', `addo.w' and `addo.d', when used with a
6403 operand that is a constant known at assembly time.
6406 File: as.info, Node: CRIS-Symbols, Next: CRIS-Syntax, Prev: CRIS-Expand, Up: CRIS-Dependent
6411 Some symbols are defined by the assembler. They're intended to be
6412 used in conditional assembly, for example:
6413 .if ..asm.arch.cris.v32
6415 .elseif ..asm.arch.cris.common_v10_v32
6416 CODE COMMON TO CRIS V32 AND CRIS V10
6417 .elseif ..asm.arch.cris.v10 | ..asm.arch.cris.any_v0_v10
6420 .error "Code needs to be added here."
6423 These symbols are defined in the assembler, reflecting command-line
6424 options, either when specified or the default. They are always
6426 `..asm.arch.cris.any_v0_v10'
6427 This symbol is non-zero when `--march=v0_v10' is specified or the
6430 `..asm.arch.cris.common_v10_v32'
6431 Set according to the option `--march=common_v10_v32'.
6433 `..asm.arch.cris.v10'
6434 Reflects the option `--march=v10'.
6436 `..asm.arch.cris.v32'
6437 Corresponds to `--march=v10'.
6439 Speaking of symbols, when a symbol is used in code, it can have a
6440 suffix modifying its value for use in position-independent code. *Note
6444 File: as.info, Node: CRIS-Syntax, Prev: CRIS-Symbols, Up: CRIS-Dependent
6449 There are different aspects of the CRIS assembly syntax.
6453 * CRIS-Chars:: Special Characters
6454 * CRIS-Pic:: Position-Independent Code Symbols
6455 * CRIS-Regs:: Register Names
6456 * CRIS-Pseudos:: Assembler Directives
6459 File: as.info, Node: CRIS-Chars, Next: CRIS-Pic, Up: CRIS-Syntax
6464 The character `#' is a line comment character. It starts a comment
6465 if and only if it is placed at the beginning of a line.
6467 A `;' character starts a comment anywhere on the line, causing all
6468 characters up to the end of the line to be ignored.
6470 A `@' character is handled as a line separator equivalent to a
6471 logical new-line character (except in a comment), so separate
6472 instructions can be specified on a single line.
6475 File: as.info, Node: CRIS-Pic, Next: CRIS-Regs, Prev: CRIS-Chars, Up: CRIS-Syntax
6477 Symbols in position-independent code
6478 ....................................
6480 When generating position-independent code (SVR4 PIC) for use in
6481 cris-axis-linux-gnu or crisv32-axis-linux-gnu shared libraries, symbol
6482 suffixes are used to specify what kind of run-time symbol lookup will
6483 be used, expressed in the object as different _relocation types_.
6484 Usually, all absolute symbol values must be located in a table, the
6485 _global offset table_, leaving the code position-independent;
6486 independent of values of global symbols and independent of the address
6487 of the code. The suffix modifies the value of the symbol, into for
6488 example an index into the global offset table where the real symbol
6489 value is entered, or a PC-relative value, or a value relative to the
6490 start of the global offset table. All symbol suffixes start with the
6491 character `:' (omitted in the list below). Every symbol use in code or
6492 a read-only section must therefore have a PIC suffix to enable a useful
6493 shared library to be created. Usually, these constructs must not be
6494 used with an additive constant offset as is usually allowed, i.e. no 4
6495 as in `symbol + 4' is allowed. This restriction is checked at
6496 link-time, not at assembly-time.
6499 Attaching this suffix to a symbol in an instruction causes the
6500 symbol to be entered into the global offset table. The value is a
6501 32-bit index for that symbol into the global offset table. The
6502 name of the corresponding relocation is `R_CRIS_32_GOT'. Example:
6503 `move.d [$r0+extsym:GOT],$r9'
6506 Same as for `GOT', but the value is a 16-bit index into the global
6507 offset table. The corresponding relocation is `R_CRIS_16_GOT'.
6508 Example: `move.d [$r0+asymbol:GOT16],$r10'
6511 This suffix is used for function symbols. It causes a _procedure
6512 linkage table_, an array of code stubs, to be created at the time
6513 the shared object is created or linked against, together with a
6514 global offset table entry. The value is a pc-relative offset to
6515 the corresponding stub code in the procedure linkage table. This
6516 arrangement causes the run-time symbol resolver to be called to
6517 look up and set the value of the symbol the first time the
6518 function is called (at latest; depending environment variables).
6519 It is only safe to leave the symbol unresolved this way if all
6520 references are function calls. The name of the relocation is
6521 `R_CRIS_32_PLT_PCREL'. Example: `add.d fnname:PLT,$pc'
6524 Like PLT, but the value is relative to the beginning of the global
6525 offset table. The relocation is `R_CRIS_32_PLT_GOTREL'. Example:
6526 `move.d fnname:PLTG,$r3'
6529 Similar to `PLT', but the value of the symbol is a 32-bit index
6530 into the global offset table. This is somewhat of a mix between
6531 the effect of the `GOT' and the `PLT' suffix; the difference to
6532 `GOT' is that there will be a procedure linkage table entry
6533 created, and that the symbol is assumed to be a function entry and
6534 will be resolved by the run-time resolver as with `PLT'. The
6535 relocation is `R_CRIS_32_GOTPLT'. Example: `jsr
6536 [$r0+fnname:GOTPLT]'
6539 A variant of `GOTPLT' giving a 16-bit value. Its relocation name
6540 is `R_CRIS_16_GOTPLT'. Example: `jsr [$r0+fnname:GOTPLT16]'
6543 This suffix must only be attached to a local symbol, but may be
6544 used in an expression adding an offset. The value is the address
6545 of the symbol relative to the start of the global offset table.
6546 The relocation name is `R_CRIS_32_GOTREL'. Example: `move.d
6547 [$r0+localsym:GOTOFF],r3'
6550 File: as.info, Node: CRIS-Regs, Next: CRIS-Pseudos, Prev: CRIS-Pic, Up: CRIS-Syntax
6555 A `$' character may always prefix a general or special register name
6556 in an instruction operand but is mandatory when the option
6557 `--no-underscore' is specified or when the `.syntax register_prefix'
6558 directive is in effect (*note crisnous::). Register names are
6562 File: as.info, Node: CRIS-Pseudos, Prev: CRIS-Regs, Up: CRIS-Syntax
6564 Assembler Directives
6565 ....................
6567 There are a few CRIS-specific pseudo-directives in addition to the
6568 generic ones. *Note Pseudo Ops::. Constants emitted by
6569 pseudo-directives are in little-endian order for CRIS. There is no
6570 support for floating-point-specific directives for CRIS.
6572 `.dword EXPRESSIONS'
6573 The `.dword' directive is a synonym for `.int', expecting zero or
6574 more EXPRESSIONS, separated by commas. For each expression, a
6575 32-bit little-endian constant is emitted.
6578 The `.syntax' directive takes as ARGUMENT one of the following
6579 case-sensitive choices.
6581 `no_register_prefix'
6582 The `.syntax no_register_prefix' directive makes a `$'
6583 character prefix on all registers optional. It overrides a
6584 previous setting, including the corresponding effect of the
6585 option `--no-underscore'. If this directive is used when
6586 ordinary symbols do not have a `_' character prefix, care
6587 must be taken to avoid ambiguities whether an operand is a
6588 register or a symbol; using symbols with names the same as
6589 general or special registers then invoke undefined behavior.
6592 This directive makes a `$' character prefix on all registers
6593 mandatory. It overrides a previous setting, including the
6594 corresponding effect of the option `--underscore'.
6596 `leading_underscore'
6597 This is an assertion directive, emitting an error if the
6598 `--no-underscore' option is in effect.
6600 `no_leading_underscore'
6601 This is the opposite of the `.syntax leading_underscore'
6602 directive and emits an error if the option `--underscore' is
6606 This is an assertion directive, giving an error if the specified
6607 ARGUMENT is not the same as the specified or default value for the
6608 `--march=ARCHITECTURE' option (*note march-option::).
6611 File: as.info, Node: D10V-Dependent, Next: D30V-Dependent, Prev: CRIS-Dependent, Up: Machine Dependencies
6613 D10V Dependent Features
6614 =======================
6618 * D10V-Opts:: D10V Options
6619 * D10V-Syntax:: Syntax
6620 * D10V-Float:: Floating Point
6621 * D10V-Opcodes:: Opcodes
6624 File: as.info, Node: D10V-Opts, Next: D10V-Syntax, Up: D10V-Dependent
6629 The Mitsubishi D10V version of `as' has a few machine dependent
6633 The D10V can often execute two sub-instructions in parallel. When
6634 this option is used, `as' will attempt to optimize its output by
6635 detecting when instructions can be executed in parallel.
6638 To optimize execution performance, `as' will sometimes swap the
6639 order of instructions. Normally this generates a warning. When
6640 this option is used, no warning will be generated when
6641 instructions are swapped.
6645 `--no-gstabs-packing'
6646 `as' packs adjacent short instructions into a single packed
6647 instruction. `--no-gstabs-packing' turns instruction packing off if
6648 `--gstabs' is specified as well; `--gstabs-packing' (the default)
6649 turns instruction packing on even when `--gstabs' is specified.
6652 File: as.info, Node: D10V-Syntax, Next: D10V-Float, Prev: D10V-Opts, Up: D10V-Dependent
6657 The D10V syntax is based on the syntax in Mitsubishi's D10V
6658 architecture manual. The differences are detailed below.
6662 * D10V-Size:: Size Modifiers
6663 * D10V-Subs:: Sub-Instructions
6664 * D10V-Chars:: Special Characters
6665 * D10V-Regs:: Register Names
6666 * D10V-Addressing:: Addressing Modes
6667 * D10V-Word:: @WORD Modifier
6670 File: as.info, Node: D10V-Size, Next: D10V-Subs, Up: D10V-Syntax
6675 The D10V version of `as' uses the instruction names in the D10V
6676 Architecture Manual. However, the names in the manual are sometimes
6677 ambiguous. There are instruction names that can assemble to a short or
6678 long form opcode. How does the assembler pick the correct form? `as'
6679 will always pick the smallest form if it can. When dealing with a
6680 symbol that is not defined yet when a line is being assembled, it will
6681 always use the long form. If you need to force the assembler to use
6682 either the short or long form of the instruction, you can append either
6683 `.s' (short) or `.l' (long) to it. For example, if you are writing an
6684 assembly program and you want to do a branch to a symbol that is
6685 defined later in your program, you can write `bra.s foo'. Objdump
6686 and GDB will always append `.s' or `.l' to instructions which have both
6687 short and long forms.
6690 File: as.info, Node: D10V-Subs, Next: D10V-Chars, Prev: D10V-Size, Up: D10V-Syntax
6695 The D10V assembler takes as input a series of instructions, either
6696 one-per-line, or in the special two-per-line format described in the
6697 next section. Some of these instructions will be short-form or
6698 sub-instructions. These sub-instructions can be packed into a single
6699 instruction. The assembler will do this automatically. It will also
6700 detect when it should not pack instructions. For example, when a label
6701 is defined, the next instruction will never be packaged with the
6702 previous one. Whenever a branch and link instruction is called, it
6703 will not be packaged with the next instruction so the return address
6704 will be valid. Nops are automatically inserted when necessary.
6706 If you do not want the assembler automatically making these
6707 decisions, you can control the packaging and execution type (parallel
6708 or sequential) with the special execution symbols described in the next
6712 File: as.info, Node: D10V-Chars, Next: D10V-Regs, Prev: D10V-Subs, Up: D10V-Syntax
6717 `;' and `#' are the line comment characters. Sub-instructions may
6718 be executed in order, in reverse-order, or in parallel. Instructions
6719 listed in the standard one-per-line format will be executed
6720 sequentially. To specify the executing order, use the following
6723 Sequential with instruction on the left first.
6726 Sequential with instruction on the right first.
6729 Parallel The D10V syntax allows either one instruction per line,
6730 one instruction per line with the execution symbol, or two instructions
6731 per line. For example
6733 Execute these sequentially. The instruction on the right is in
6734 the right container and is executed second.
6737 Execute these reverse-sequentially. The instruction on the right
6738 is in the right container, and is executed first.
6740 `ld2w r2,@r8+ || mac a0,r0,r7'
6741 Execute these in parallel.
6745 Two-line format. Execute these in parallel.
6749 Two-line format. Execute these sequentially. Assembler will put
6750 them in the proper containers.
6754 Two-line format. Execute these sequentially. Same as above but
6755 second instruction will always go into right container. Since `$'
6756 has no special meaning, you may use it in symbol names.
6759 File: as.info, Node: D10V-Regs, Next: D10V-Addressing, Prev: D10V-Chars, Up: D10V-Syntax
6764 You can use the predefined symbols `r0' through `r15' to refer to
6765 the D10V registers. You can also use `sp' as an alias for `r15'. The
6766 accumulators are `a0' and `a1'. There are special register-pair names
6767 that may optionally be used in opcodes that require even-numbered
6768 registers. Register names are not case sensitive.
6786 The D10V also has predefined symbols for these control registers and
6789 Processor Status Word
6792 Backup Processor Status Word
6798 Backup Program Counter
6804 Repeat Start address
6810 Modulo Start address
6816 Instruction Break Address
6828 File: as.info, Node: D10V-Addressing, Next: D10V-Word, Prev: D10V-Regs, Up: D10V-Syntax
6833 `as' understands the following addressing modes for the D10V. `RN'
6834 in the following refers to any of the numbered registers, but _not_ the
6843 Register indirect with post-increment
6846 Register indirect with post-decrement
6849 Register indirect with pre-decrement
6852 Register indirect with displacement
6855 PC relative address (for branch or rep).
6858 Immediate data (the `#' is optional and ignored)
6861 File: as.info, Node: D10V-Word, Prev: D10V-Addressing, Up: D10V-Syntax
6866 Any symbol followed by `@word' will be replaced by the symbol's value
6867 shifted right by 2. This is used in situations such as loading a
6868 register with the address of a function (or any other code fragment).
6869 For example, if you want to load a register with the location of the
6870 function `main' then jump to that function, you could do it as follows:
6875 File: as.info, Node: D10V-Float, Next: D10V-Opcodes, Prev: D10V-Syntax, Up: D10V-Dependent
6880 The D10V has no hardware floating point, but the `.float' and
6881 `.double' directives generates IEEE floating-point numbers for
6882 compatibility with other development tools.
6885 File: as.info, Node: D10V-Opcodes, Prev: D10V-Float, Up: D10V-Dependent
6890 For detailed information on the D10V machine instruction set, see
6891 `D10V Architecture: A VLIW Microprocessor for Multimedia Applications'
6892 (Mitsubishi Electric Corp.). `as' implements all the standard D10V
6893 opcodes. The only changes are those described in the section on size
6897 File: as.info, Node: D30V-Dependent, Next: H8/300-Dependent, Prev: D10V-Dependent, Up: Machine Dependencies
6899 D30V Dependent Features
6900 =======================
6904 * D30V-Opts:: D30V Options
6905 * D30V-Syntax:: Syntax
6906 * D30V-Float:: Floating Point
6907 * D30V-Opcodes:: Opcodes
6910 File: as.info, Node: D30V-Opts, Next: D30V-Syntax, Up: D30V-Dependent
6915 The Mitsubishi D30V version of `as' has a few machine dependent
6919 The D30V can often execute two sub-instructions in parallel. When
6920 this option is used, `as' will attempt to optimize its output by
6921 detecting when instructions can be executed in parallel.
6924 When this option is used, `as' will issue a warning every time it
6925 adds a nop instruction.
6928 When this option is used, `as' will issue a warning if it needs to
6929 insert a nop after a 32-bit multiply before a load or 16-bit
6930 multiply instruction.
6933 File: as.info, Node: D30V-Syntax, Next: D30V-Float, Prev: D30V-Opts, Up: D30V-Dependent
6938 The D30V syntax is based on the syntax in Mitsubishi's D30V
6939 architecture manual. The differences are detailed below.
6943 * D30V-Size:: Size Modifiers
6944 * D30V-Subs:: Sub-Instructions
6945 * D30V-Chars:: Special Characters
6946 * D30V-Guarded:: Guarded Execution
6947 * D30V-Regs:: Register Names
6948 * D30V-Addressing:: Addressing Modes
6951 File: as.info, Node: D30V-Size, Next: D30V-Subs, Up: D30V-Syntax
6956 The D30V version of `as' uses the instruction names in the D30V
6957 Architecture Manual. However, the names in the manual are sometimes
6958 ambiguous. There are instruction names that can assemble to a short or
6959 long form opcode. How does the assembler pick the correct form? `as'
6960 will always pick the smallest form if it can. When dealing with a
6961 symbol that is not defined yet when a line is being assembled, it will
6962 always use the long form. If you need to force the assembler to use
6963 either the short or long form of the instruction, you can append either
6964 `.s' (short) or `.l' (long) to it. For example, if you are writing an
6965 assembly program and you want to do a branch to a symbol that is
6966 defined later in your program, you can write `bra.s foo'. Objdump and
6967 GDB will always append `.s' or `.l' to instructions which have both
6968 short and long forms.
6971 File: as.info, Node: D30V-Subs, Next: D30V-Chars, Prev: D30V-Size, Up: D30V-Syntax
6976 The D30V assembler takes as input a series of instructions, either
6977 one-per-line, or in the special two-per-line format described in the
6978 next section. Some of these instructions will be short-form or
6979 sub-instructions. These sub-instructions can be packed into a single
6980 instruction. The assembler will do this automatically. It will also
6981 detect when it should not pack instructions. For example, when a label
6982 is defined, the next instruction will never be packaged with the
6983 previous one. Whenever a branch and link instruction is called, it
6984 will not be packaged with the next instruction so the return address
6985 will be valid. Nops are automatically inserted when necessary.
6987 If you do not want the assembler automatically making these
6988 decisions, you can control the packaging and execution type (parallel
6989 or sequential) with the special execution symbols described in the next
6993 File: as.info, Node: D30V-Chars, Next: D30V-Guarded, Prev: D30V-Subs, Up: D30V-Syntax
6998 `;' and `#' are the line comment characters. Sub-instructions may
6999 be executed in order, in reverse-order, or in parallel. Instructions
7000 listed in the standard one-per-line format will be executed
7001 sequentially unless you use the `-O' option.
7003 To specify the executing order, use the following symbols:
7005 Sequential with instruction on the left first.
7008 Sequential with instruction on the right first.
7013 The D30V syntax allows either one instruction per line, one
7014 instruction per line with the execution symbol, or two instructions per
7016 `abs r2,r3 -> abs r4,r5'
7017 Execute these sequentially. The instruction on the right is in
7018 the right container and is executed second.
7020 `abs r2,r3 <- abs r4,r5'
7021 Execute these reverse-sequentially. The instruction on the right
7022 is in the right container, and is executed first.
7024 `abs r2,r3 || abs r4,r5'
7025 Execute these in parallel.
7027 `ldw r2,@(r3,r4) ||'
7029 Two-line format. Execute these in parallel.
7033 Two-line format. Execute these sequentially unless `-O' option is
7034 used. If the `-O' option is used, the assembler will determine if
7035 the instructions could be done in parallel (the above two
7036 instructions can be done in parallel), and if so, emit them as
7037 parallel instructions. The assembler will put them in the proper
7038 containers. In the above example, the assembler will put the
7039 `stw' instruction in left container and the `mulx' instruction in
7040 the right container.
7042 `stw r2,@(r3,r4) ->'
7044 Two-line format. Execute the `stw' instruction followed by the
7045 `mulx' instruction sequentially. The first instruction goes in the
7046 left container and the second instruction goes into right
7047 container. The assembler will give an error if the machine
7048 ordering constraints are violated.
7050 `stw r2,@(r3,r4) <-'
7052 Same as previous example, except that the `mulx' instruction is
7053 executed before the `stw' instruction.
7055 Since `$' has no special meaning, you may use it in symbol names.
7058 File: as.info, Node: D30V-Guarded, Next: D30V-Regs, Prev: D30V-Chars, Up: D30V-Syntax
7063 `as' supports the full range of guarded execution directives for
7064 each instruction. Just append the directive after the instruction
7065 proper. The directives are:
7068 Execute the instruction if flag f0 is true.
7071 Execute the instruction if flag f0 is false.
7074 Execute the instruction if flag f1 is true.
7077 Execute the instruction if flag f1 is false.
7080 Execute the instruction if both flags f0 and f1 are true.
7083 Execute the instruction if flag f0 is true and flag f1 is false.
7086 File: as.info, Node: D30V-Regs, Next: D30V-Addressing, Prev: D30V-Guarded, Up: D30V-Syntax
7091 You can use the predefined symbols `r0' through `r63' to refer to
7092 the D30V registers. You can also use `sp' as an alias for `r63' and
7093 `link' as an alias for `r62'. The accumulators are `a0' and `a1'.
7095 The D30V also has predefined symbols for these control registers and
7098 Processor Status Word
7101 Backup Processor Status Word
7107 Backup Program Counter
7113 Repeat Start address
7119 Modulo Start address
7125 Instruction Break Address
7152 Same as flag 4 (saturation flag)
7155 Same as flag 5 (overflow flag)
7158 Same as flag 6 (sticky overflow flag)
7161 Same as flag 7 (carry/borrow flag)
7164 Same as flag 7 (carry/borrow flag)
7167 File: as.info, Node: D30V-Addressing, Prev: D30V-Regs, Up: D30V-Syntax
7172 `as' understands the following addressing modes for the D30V. `RN'
7173 in the following refers to any of the numbered registers, but _not_ the
7182 Register indirect with post-increment
7185 Register indirect with post-decrement
7188 Register indirect with pre-decrement
7191 Register indirect with displacement
7194 PC relative address (for branch or rep).
7197 Immediate data (the `#' is optional and ignored)
7200 File: as.info, Node: D30V-Float, Next: D30V-Opcodes, Prev: D30V-Syntax, Up: D30V-Dependent
7205 The D30V has no hardware floating point, but the `.float' and
7206 `.double' directives generates IEEE floating-point numbers for
7207 compatibility with other development tools.
7210 File: as.info, Node: D30V-Opcodes, Prev: D30V-Float, Up: D30V-Dependent
7215 For detailed information on the D30V machine instruction set, see
7216 `D30V Architecture: A VLIW Microprocessor for Multimedia Applications'
7217 (Mitsubishi Electric Corp.). `as' implements all the standard D30V
7218 opcodes. The only changes are those described in the section on size
7222 File: as.info, Node: H8/300-Dependent, Next: HPPA-Dependent, Prev: D30V-Dependent, Up: Machine Dependencies
7224 H8/300 Dependent Features
7225 =========================
7229 * H8/300 Options:: Options
7230 * H8/300 Syntax:: Syntax
7231 * H8/300 Floating Point:: Floating Point
7232 * H8/300 Directives:: H8/300 Machine Directives
7233 * H8/300 Opcodes:: Opcodes
7236 File: as.info, Node: H8/300 Options, Next: H8/300 Syntax, Up: H8/300-Dependent
7241 `as' has no additional command-line options for the Renesas
7242 (formerly Hitachi) H8/300 family.
7245 File: as.info, Node: H8/300 Syntax, Next: H8/300 Floating Point, Prev: H8/300 Options, Up: H8/300-Dependent
7252 * H8/300-Chars:: Special Characters
7253 * H8/300-Regs:: Register Names
7254 * H8/300-Addressing:: Addressing Modes
7257 File: as.info, Node: H8/300-Chars, Next: H8/300-Regs, Up: H8/300 Syntax
7262 `;' is the line comment character.
7264 `$' can be used instead of a newline to separate statements.
7265 Therefore _you may not use `$' in symbol names_ on the H8/300.
7268 File: as.info, Node: H8/300-Regs, Next: H8/300-Addressing, Prev: H8/300-Chars, Up: H8/300 Syntax
7273 You can use predefined symbols of the form `rNh' and `rNl' to refer
7274 to the H8/300 registers as sixteen 8-bit general-purpose registers. N
7275 is a digit from `0' to `7'); for instance, both `r0h' and `r7l' are
7276 valid register names.
7278 You can also use the eight predefined symbols `rN' to refer to the
7279 H8/300 registers as 16-bit registers (you must use this form for
7282 On the H8/300H, you can also use the eight predefined symbols `erN'
7283 (`er0' ... `er7') to refer to the 32-bit general purpose registers.
7285 The two control registers are called `pc' (program counter; a 16-bit
7286 register, except on the H8/300H where it is 24 bits) and `ccr'
7287 (condition code register; an 8-bit register). `r7' is used as the
7288 stack pointer, and can also be called `sp'.
7291 File: as.info, Node: H8/300-Addressing, Prev: H8/300-Regs, Up: H8/300 Syntax
7296 as understands the following addressing modes for the H8/300:
7306 Register indirect: 16-bit or 24-bit displacement D from register
7307 N. (24-bit displacements are only meaningful on the H8/300H.)
7310 Register indirect with post-increment
7313 Register indirect with pre-decrement
7319 Absolute address `aa'. (The address size `:24' only makes sense
7326 Immediate data XX. You may specify the `:8', `:16', or `:32' for
7327 clarity, if you wish; but `as' neither requires this nor uses
7328 it--the data size required is taken from context.
7332 Memory indirect. You may specify the `:8' for clarity, if you
7333 wish; but `as' neither requires this nor uses it.
7336 File: as.info, Node: H8/300 Floating Point, Next: H8/300 Directives, Prev: H8/300 Syntax, Up: H8/300-Dependent
7341 The H8/300 family has no hardware floating point, but the `.float'
7342 directive generates IEEE floating-point numbers for compatibility with
7343 other development tools.
7346 File: as.info, Node: H8/300 Directives, Next: H8/300 Opcodes, Prev: H8/300 Floating Point, Up: H8/300-Dependent
7348 H8/300 Machine Directives
7349 -------------------------
7351 `as' has the following machine-dependent directives for the H8/300:
7354 Recognize and emit additional instructions for the H8/300H
7355 variant, and also make `.int' emit 32-bit numbers rather than the
7356 usual (16-bit) for the H8/300 family.
7359 Recognize and emit additional instructions for the H8S variant, and
7360 also make `.int' emit 32-bit numbers rather than the usual (16-bit)
7361 for the H8/300 family.
7364 Recognize and emit additional instructions for the H8/300H variant
7365 in normal mode, and also make `.int' emit 32-bit numbers rather
7366 than the usual (16-bit) for the H8/300 family.
7369 Recognize and emit additional instructions for the H8S variant in
7370 normal mode, and also make `.int' emit 32-bit numbers rather than
7371 the usual (16-bit) for the H8/300 family.
7373 On the H8/300 family (including the H8/300H) `.word' directives
7374 generate 16-bit numbers.
7377 File: as.info, Node: H8/300 Opcodes, Prev: H8/300 Directives, Up: H8/300-Dependent
7382 For detailed information on the H8/300 machine instruction set, see
7383 `H8/300 Series Programming Manual'. For information specific to the
7384 H8/300H, see `H8/300H Series Programming Manual' (Renesas).
7386 `as' implements all the standard H8/300 opcodes. No additional
7387 pseudo-instructions are needed on this family.
7389 The following table summarizes the H8/300 opcodes, and their
7390 arguments. Entries marked `*' are opcodes used only on the H8/300H.
7394 Rd destination register
7395 abs absolute address
7397 disp:N N-bit displacement from a register
7398 pcrel:N N-bit displacement relative to program counter
7400 add.b #imm,rd * andc #imm,ccr
7401 add.b rs,rd band #imm,rd
7402 add.w rs,rd band #imm,@rd
7403 * add.w #imm,rd band #imm,@abs:8
7404 * add.l rs,rd bra pcrel:8
7405 * add.l #imm,rd * bra pcrel:16
7406 adds #imm,rd bt pcrel:8
7407 addx #imm,rd * bt pcrel:16
7408 addx rs,rd brn pcrel:8
7409 and.b #imm,rd * brn pcrel:16
7410 and.b rs,rd bf pcrel:8
7411 * and.w rs,rd * bf pcrel:16
7412 * and.w #imm,rd bhi pcrel:8
7413 * and.l #imm,rd * bhi pcrel:16
7414 * and.l rs,rd bls pcrel:8
7416 * bls pcrel:16 bld #imm,rd
7417 bcc pcrel:8 bld #imm,@rd
7418 * bcc pcrel:16 bld #imm,@abs:8
7419 bhs pcrel:8 bnot #imm,rd
7420 * bhs pcrel:16 bnot #imm,@rd
7421 bcs pcrel:8 bnot #imm,@abs:8
7422 * bcs pcrel:16 bnot rs,rd
7423 blo pcrel:8 bnot rs,@rd
7424 * blo pcrel:16 bnot rs,@abs:8
7425 bne pcrel:8 bor #imm,rd
7426 * bne pcrel:16 bor #imm,@rd
7427 beq pcrel:8 bor #imm,@abs:8
7428 * beq pcrel:16 bset #imm,rd
7429 bvc pcrel:8 bset #imm,@rd
7430 * bvc pcrel:16 bset #imm,@abs:8
7431 bvs pcrel:8 bset rs,rd
7432 * bvs pcrel:16 bset rs,@rd
7433 bpl pcrel:8 bset rs,@abs:8
7434 * bpl pcrel:16 bsr pcrel:8
7435 bmi pcrel:8 bsr pcrel:16
7436 * bmi pcrel:16 bst #imm,rd
7437 bge pcrel:8 bst #imm,@rd
7438 * bge pcrel:16 bst #imm,@abs:8
7439 blt pcrel:8 btst #imm,rd
7440 * blt pcrel:16 btst #imm,@rd
7441 bgt pcrel:8 btst #imm,@abs:8
7442 * bgt pcrel:16 btst rs,rd
7443 ble pcrel:8 btst rs,@rd
7444 * ble pcrel:16 btst rs,@abs:8
7445 bclr #imm,rd bxor #imm,rd
7446 bclr #imm,@rd bxor #imm,@rd
7447 bclr #imm,@abs:8 bxor #imm,@abs:8
7448 bclr rs,rd cmp.b #imm,rd
7449 bclr rs,@rd cmp.b rs,rd
7450 bclr rs,@abs:8 cmp.w rs,rd
7451 biand #imm,rd cmp.w rs,rd
7452 biand #imm,@rd * cmp.w #imm,rd
7453 biand #imm,@abs:8 * cmp.l #imm,rd
7454 bild #imm,rd * cmp.l rs,rd
7455 bild #imm,@rd daa rs
7456 bild #imm,@abs:8 das rs
7457 bior #imm,rd dec.b rs
7458 bior #imm,@rd * dec.w #imm,rd
7459 bior #imm,@abs:8 * dec.l #imm,rd
7460 bist #imm,rd divxu.b rs,rd
7461 bist #imm,@rd * divxu.w rs,rd
7462 bist #imm,@abs:8 * divxs.b rs,rd
7463 bixor #imm,rd * divxs.w rs,rd
7464 bixor #imm,@rd eepmov
7465 bixor #imm,@abs:8 * eepmovw
7467 * exts.w rd mov.w rs,@abs:16
7468 * exts.l rd * mov.l #imm,rd
7469 * extu.w rd * mov.l rs,rd
7470 * extu.l rd * mov.l @rs,rd
7471 inc rs * mov.l @(disp:16,rs),rd
7472 * inc.w #imm,rd * mov.l @(disp:24,rs),rd
7473 * inc.l #imm,rd * mov.l @rs+,rd
7474 jmp @rs * mov.l @abs:16,rd
7475 jmp abs * mov.l @abs:24,rd
7476 jmp @@abs:8 * mov.l rs,@rd
7477 jsr @rs * mov.l rs,@(disp:16,rd)
7478 jsr abs * mov.l rs,@(disp:24,rd)
7479 jsr @@abs:8 * mov.l rs,@-rd
7480 ldc #imm,ccr * mov.l rs,@abs:16
7481 ldc rs,ccr * mov.l rs,@abs:24
7482 * ldc @abs:16,ccr movfpe @abs:16,rd
7483 * ldc @abs:24,ccr movtpe rs,@abs:16
7484 * ldc @(disp:16,rs),ccr mulxu.b rs,rd
7485 * ldc @(disp:24,rs),ccr * mulxu.w rs,rd
7486 * ldc @rs+,ccr * mulxs.b rs,rd
7487 * ldc @rs,ccr * mulxs.w rs,rd
7488 * mov.b @(disp:24,rs),rd neg.b rs
7489 * mov.b rs,@(disp:24,rd) * neg.w rs
7490 mov.b @abs:16,rd * neg.l rs
7492 mov.b @abs:8,rd not.b rs
7493 mov.b rs,@abs:8 * not.w rs
7494 mov.b rs,rd * not.l rs
7495 mov.b #imm,rd or.b #imm,rd
7496 mov.b @rs,rd or.b rs,rd
7497 mov.b @(disp:16,rs),rd * or.w #imm,rd
7498 mov.b @rs+,rd * or.w rs,rd
7499 mov.b @abs:8,rd * or.l #imm,rd
7500 mov.b rs,@rd * or.l rs,rd
7501 mov.b rs,@(disp:16,rd) orc #imm,ccr
7502 mov.b rs,@-rd pop.w rs
7503 mov.b rs,@abs:8 * pop.l rs
7504 mov.w rs,@rd push.w rs
7505 * mov.w @(disp:24,rs),rd * push.l rs
7506 * mov.w rs,@(disp:24,rd) rotl.b rs
7507 * mov.w @abs:24,rd * rotl.w rs
7508 * mov.w rs,@abs:24 * rotl.l rs
7509 mov.w rs,rd rotr.b rs
7510 mov.w #imm,rd * rotr.w rs
7511 mov.w @rs,rd * rotr.l rs
7512 mov.w @(disp:16,rs),rd rotxl.b rs
7513 mov.w @rs+,rd * rotxl.w rs
7514 mov.w @abs:16,rd * rotxl.l rs
7515 mov.w rs,@(disp:16,rd) rotxr.b rs
7516 mov.w rs,@-rd * rotxr.w rs
7518 * rotxr.l rs * stc ccr,@(disp:24,rd)
7520 rte * stc ccr,@abs:16
7521 rts * stc ccr,@abs:24
7522 shal.b rs sub.b rs,rd
7523 * shal.w rs sub.w rs,rd
7524 * shal.l rs * sub.w #imm,rd
7525 shar.b rs * sub.l rs,rd
7526 * shar.w rs * sub.l #imm,rd
7527 * shar.l rs subs #imm,rd
7528 shll.b rs subx #imm,rd
7529 * shll.w rs subx rs,rd
7530 * shll.l rs * trapa #imm
7531 shlr.b rs xor #imm,rd
7532 * shlr.w rs xor rs,rd
7533 * shlr.l rs * xor.w #imm,rd
7535 stc ccr,rd * xor.l #imm,rd
7536 * stc ccr,@rs * xor.l rs,rd
7537 * stc ccr,@(disp:16,rd) xorc #imm,ccr
7539 Four H8/300 instructions (`add', `cmp', `mov', `sub') are defined
7540 with variants using the suffixes `.b', `.w', and `.l' to specify the
7541 size of a memory operand. `as' supports these suffixes, but does not
7542 require them; since one of the operands is always a register, `as' can
7543 deduce the correct size.
7545 For example, since `r0' refers to a 16-bit register,
7550 If you use the size suffixes, `as' issues a warning when the suffix
7551 and the register size do not match.
7554 File: as.info, Node: HPPA-Dependent, Next: ESA/390-Dependent, Prev: H8/300-Dependent, Up: Machine Dependencies
7556 HPPA Dependent Features
7557 =======================
7561 * HPPA Notes:: Notes
7562 * HPPA Options:: Options
7563 * HPPA Syntax:: Syntax
7564 * HPPA Floating Point:: Floating Point
7565 * HPPA Directives:: HPPA Machine Directives
7566 * HPPA Opcodes:: Opcodes
7569 File: as.info, Node: HPPA Notes, Next: HPPA Options, Up: HPPA-Dependent
7574 As a back end for GNU CC `as' has been throughly tested and should
7575 work extremely well. We have tested it only minimally on hand written
7576 assembly code and no one has tested it much on the assembly output from
7579 The format of the debugging sections has changed since the original
7580 `as' port (version 1.3X) was released; therefore, you must rebuild all
7581 HPPA objects and libraries with the new assembler so that you can debug
7582 the final executable.
7584 The HPPA `as' port generates a small subset of the relocations
7585 available in the SOM and ELF object file formats. Additional relocation
7586 support will be added as it becomes necessary.
7589 File: as.info, Node: HPPA Options, Next: HPPA Syntax, Prev: HPPA Notes, Up: HPPA-Dependent
7594 `as' has no machine-dependent command-line options for the HPPA.
7597 File: as.info, Node: HPPA Syntax, Next: HPPA Floating Point, Prev: HPPA Options, Up: HPPA-Dependent
7602 The assembler syntax closely follows the HPPA instruction set
7603 reference manual; assembler directives and general syntax closely
7604 follow the HPPA assembly language reference manual, with a few
7605 noteworthy differences.
7607 First, a colon may immediately follow a label definition. This is
7608 simply for compatibility with how most assembly language programmers
7611 Some obscure expression parsing problems may affect hand written
7612 code which uses the `spop' instructions, or code which makes significant
7613 use of the `!' line separator.
7615 `as' is much less forgiving about missing arguments and other
7616 similar oversights than the HP assembler. `as' notifies you of missing
7617 arguments as syntax errors; this is regarded as a feature, not a bug.
7619 Finally, `as' allows you to use an external symbol without
7620 explicitly importing the symbol. _Warning:_ in the future this will be
7621 an error for HPPA targets.
7623 Special characters for HPPA targets include:
7625 `;' is the line comment character.
7627 `!' can be used instead of a newline to separate statements.
7629 Since `$' has no special meaning, you may use it in symbol names.
7632 File: as.info, Node: HPPA Floating Point, Next: HPPA Directives, Prev: HPPA Syntax, Up: HPPA-Dependent
7637 The HPPA family uses IEEE floating-point numbers.
7640 File: as.info, Node: HPPA Directives, Next: HPPA Opcodes, Prev: HPPA Floating Point, Up: HPPA-Dependent
7642 HPPA Assembler Directives
7643 -------------------------
7645 `as' for the HPPA supports many additional directives for
7646 compatibility with the native assembler. This section describes them
7647 only briefly. For detailed information on HPPA-specific assembler
7648 directives, see `HP9000 Series 800 Assembly Language Reference Manual'
7651 `as' does _not_ support the following assembler directives described
7659 Beyond those implemented for compatibility, `as' supports one
7660 additional assembler directive for the HPPA: `.param'. It conveys
7661 register argument locations for static functions. Its syntax closely
7662 follows the `.export' directive.
7664 These are the additional directives in `as' for the HPPA:
7668 Reserve N bytes of storage, and initialize them to zero.
7671 Mark the beginning of a procedure call. Only the special case
7672 with _no arguments_ is allowed.
7674 `.callinfo [ PARAM=VALUE, ... ] [ FLAG, ... ]'
7675 Specify a number of parameters and flags that define the
7676 environment for a procedure.
7678 PARAM may be any of `frame' (frame size), `entry_gr' (end of
7679 general register range), `entry_fr' (end of float register range),
7680 `entry_sr' (end of space register range).
7682 The values for FLAG are `calls' or `caller' (proc has
7683 subroutines), `no_calls' (proc does not call subroutines),
7684 `save_rp' (preserve return pointer), `save_sp' (proc preserves
7685 stack pointer), `no_unwind' (do not unwind this proc), `hpux_int'
7686 (proc is interrupt routine).
7689 Assemble into the standard section called `$TEXT$', subsection
7692 `.copyright "STRING"'
7693 In the SOM object format, insert STRING into the object code,
7694 marked as a copyright string.
7696 `.copyright "STRING"'
7697 In the ELF object format, insert STRING into the object code,
7698 marked as a version string.
7701 Not yet supported; the assembler rejects programs containing this
7705 Mark the beginning of a procedure.
7708 Mark the end of a procedure.
7710 `.export NAME [ ,TYP ] [ ,PARAM=R ]'
7711 Make a procedure NAME available to callers. TYP, if present, must
7712 be one of `absolute', `code' (ELF only, not SOM), `data', `entry',
7713 `data', `entry', `millicode', `plabel', `pri_prog', or `sec_prog'.
7715 PARAM, if present, provides either relocation information for the
7716 procedure arguments and result, or a privilege level. PARAM may be
7717 `argwN' (where N ranges from `0' to `3', and indicates one of four
7718 one-word arguments); `rtnval' (the procedure's result); or
7719 `priv_lev' (privilege level). For arguments or the result, R
7720 specifies how to relocate, and must be one of `no' (not
7721 relocatable), `gr' (argument is in general register), `fr' (in
7722 floating point register), or `fu' (upper half of float register).
7723 For `priv_lev', R is an integer.
7726 Define a two-byte integer constant N; synonym for the portable
7727 `as' directive `.short'.
7729 `.import NAME [ ,TYP ]'
7730 Converse of `.export'; make a procedure available to call. The
7731 arguments use the same conventions as the first two arguments for
7735 Define NAME as a label for the current assembly location.
7738 Not yet supported; the assembler rejects programs containing this
7742 Advance location counter to LC. Synonym for the `as' portable
7745 `.param NAME [ ,TYP ] [ ,PARAM=R ]'
7746 Similar to `.export', but used for static procedures.
7749 Use preceding the first statement of a procedure.
7752 Use following the last statement of a procedure.
7755 Synonym for `.equ'; define LABEL with the absolute expression EXPR
7758 `.space SECNAME [ ,PARAMS ]'
7759 Switch to section SECNAME, creating a new section by that name if
7760 necessary. You may only use PARAMS when creating a new section,
7761 not when switching to an existing one. SECNAME may identify a
7762 section by number rather than by name.
7764 If specified, the list PARAMS declares attributes of the section,
7765 identified by keywords. The keywords recognized are `spnum=EXP'
7766 (identify this section by the number EXP, an absolute expression),
7767 `sort=EXP' (order sections according to this sort key when linking;
7768 EXP is an absolute expression), `unloadable' (section contains no
7769 loadable data), `notdefined' (this section defined elsewhere), and
7770 `private' (data in this section not available to other programs).
7773 Allocate four bytes of storage, and initialize them with the
7774 section number of the section named SECNAM. (You can define the
7775 section number with the HPPA `.space' directive.)
7778 Copy the characters in the string STR to the object file. *Note
7779 Strings: Strings, for information on escape sequences you can use
7782 _Warning!_ The HPPA version of `.string' differs from the usual
7783 `as' definition: it does _not_ write a zero byte after copying STR.
7786 Like `.string', but appends a zero byte after copying STR to object
7789 `.subspa NAME [ ,PARAMS ]'
7790 `.nsubspa NAME [ ,PARAMS ]'
7791 Similar to `.space', but selects a subsection NAME within the
7792 current section. You may only specify PARAMS when you create a
7793 subsection (in the first instance of `.subspa' for this NAME).
7795 If specified, the list PARAMS declares attributes of the
7796 subsection, identified by keywords. The keywords recognized are
7797 `quad=EXPR' ("quadrant" for this subsection), `align=EXPR'
7798 (alignment for beginning of this subsection; a power of two),
7799 `access=EXPR' (value for "access rights" field), `sort=EXPR'
7800 (sorting order for this subspace in link), `code_only' (subsection
7801 contains only code), `unloadable' (subsection cannot be loaded
7802 into memory), `comdat' (subsection is comdat), `common'
7803 (subsection is common block), `dup_comm' (subsection may have
7804 duplicate names), or `zero' (subsection is all zeros, do not write
7807 `.nsubspa' always creates a new subspace with the given name, even
7808 if one with the same name already exists.
7810 `comdat', `common' and `dup_comm' can be used to implement various
7811 flavors of one-only support when using the SOM linker. The SOM
7812 linker only supports specific combinations of these flags. The
7813 details are not documented. A brief description is provided here.
7815 `comdat' provides a form of linkonce support. It is useful for
7816 both code and data subspaces. A `comdat' subspace has a key symbol
7817 marked by the `is_comdat' flag or `ST_COMDAT'. Only the first
7818 subspace for any given key is selected. The key symbol becomes
7819 universal in shared links. This is similar to the behavior of
7820 `secondary_def' symbols.
7822 `common' provides Fortran named common support. It is only useful
7823 for data subspaces. Symbols with the flag `is_common' retain this
7824 flag in shared links. Referencing a `is_common' symbol in a shared
7825 library from outside the library doesn't work. Thus, `is_common'
7826 symbols must be output whenever they are needed.
7828 `common' and `dup_comm' together provide Cobol common support.
7829 The subspaces in this case must all be the same length.
7830 Otherwise, this support is similar to the Fortran common support.
7832 `dup_comm' by itself provides a type of one-only support for code.
7833 Only the first `dup_comm' subspace is selected. There is a rather
7834 complex algorithm to compare subspaces. Code symbols marked with
7835 the `dup_common' flag are hidden. This support was intended for
7836 "C++ duplicate inlines".
7838 A simplified technique is used to mark the flags of symbols based
7839 on the flags of their subspace. A symbol with the scope
7840 SS_UNIVERSAL and type ST_ENTRY, ST_CODE or ST_DATA is marked with
7841 the corresponding settings of `comdat', `common' and `dup_comm'
7842 from the subspace, respectively. This avoids having to introduce
7843 additional directives to mark these symbols. The HP assembler
7844 sets `is_common' from `common'. However, it doesn't set the
7845 `dup_common' from `dup_comm'. It doesn't have `comdat' support.
7848 Write STR as version identifier in object code.
7851 File: as.info, Node: HPPA Opcodes, Prev: HPPA Directives, Up: HPPA-Dependent
7856 For detailed information on the HPPA machine instruction set, see
7857 `PA-RISC Architecture and Instruction Set Reference Manual' (HP
7861 File: as.info, Node: ESA/390-Dependent, Next: i386-Dependent, Prev: HPPA-Dependent, Up: Machine Dependencies
7863 ESA/390 Dependent Features
7864 ==========================
7868 * ESA/390 Notes:: Notes
7869 * ESA/390 Options:: Options
7870 * ESA/390 Syntax:: Syntax
7871 * ESA/390 Floating Point:: Floating Point
7872 * ESA/390 Directives:: ESA/390 Machine Directives
7873 * ESA/390 Opcodes:: Opcodes
7876 File: as.info, Node: ESA/390 Notes, Next: ESA/390 Options, Up: ESA/390-Dependent
7881 The ESA/390 `as' port is currently intended to be a back-end for the
7882 GNU CC compiler. It is not HLASM compatible, although it does support
7883 a subset of some of the HLASM directives. The only supported binary
7884 file format is ELF; none of the usual MVS/VM/OE/USS object file
7885 formats, such as ESD or XSD, are supported.
7887 When used with the GNU CC compiler, the ESA/390 `as' will produce
7888 correct, fully relocated, functional binaries, and has been used to
7889 compile and execute large projects. However, many aspects should still
7890 be considered experimental; these include shared library support,
7891 dynamically loadable objects, and any relocation other than the 31-bit
7895 File: as.info, Node: ESA/390 Options, Next: ESA/390 Syntax, Prev: ESA/390 Notes, Up: ESA/390-Dependent
7900 `as' has no machine-dependent command-line options for the ESA/390.
7903 File: as.info, Node: ESA/390 Syntax, Next: ESA/390 Floating Point, Prev: ESA/390 Options, Up: ESA/390-Dependent
7908 The opcode/operand syntax follows the ESA/390 Principles of Operation
7909 manual; assembler directives and general syntax are loosely based on the
7910 prevailing AT&T/SVR4/ELF/Solaris style notation. HLASM-style directives
7911 are _not_ supported for the most part, with the exception of those
7914 A leading dot in front of directives is optional, and the case of
7915 directives is ignored; thus for example, .using and USING have the same
7918 A colon may immediately follow a label definition. This is simply
7919 for compatibility with how most assembly language programmers write
7922 `#' is the line comment character.
7924 `;' can be used instead of a newline to separate statements.
7926 Since `$' has no special meaning, you may use it in symbol names.
7928 Registers can be given the symbolic names r0..r15, fp0, fp2, fp4,
7929 fp6. By using thesse symbolic names, `as' can detect simple syntax
7930 errors. The name rarg or r.arg is a synonym for r11, rtca or r.tca for
7931 r12, sp, r.sp, dsa r.dsa for r13, lr or r.lr for r14, rbase or r.base
7932 for r3 and rpgt or r.pgt for r4.
7934 `*' is the current location counter. Unlike `.' it is always
7935 relative to the last USING directive. Note that this means that
7936 expressions cannot use multiplication, as any occurrence of `*' will be
7937 interpreted as a location counter.
7939 All labels are relative to the last USING. Thus, branches to a label
7940 always imply the use of base+displacement.
7942 Many of the usual forms of address constants / address literals are
7945 L r15,=A(some_routine)
7946 LM r6,r7,=V(some_longlong_extern)
7950 MD r6,=D'3.14159265358979'
7953 should all behave as expected: that is, an entry in the literal pool
7954 will be created (or reused if it already exists), and the instruction
7955 operands will be the displacement into the literal pool using the
7956 current base register (as last declared with the `.using' directive).
7959 File: as.info, Node: ESA/390 Floating Point, Next: ESA/390 Directives, Prev: ESA/390 Syntax, Up: ESA/390-Dependent
7964 The assembler generates only IEEE floating-point numbers. The older
7965 floating point formats are not supported.
7968 File: as.info, Node: ESA/390 Directives, Next: ESA/390 Opcodes, Prev: ESA/390 Floating Point, Up: ESA/390-Dependent
7970 ESA/390 Assembler Directives
7971 ----------------------------
7973 `as' for the ESA/390 supports all of the standard ELF/SVR4 assembler
7974 directives that are documented in the main part of this documentation.
7975 Several additional directives are supported in order to implement the
7976 ESA/390 addressing model. The most important of these are `.using' and
7979 These are the additional directives in `as' for the ESA/390:
7982 A small subset of the usual DC directive is supported.
7985 Stop using REGNO as the base register. The REGNO must have been
7986 previously declared with a `.using' directive in the same section
7987 as the current section.
7990 Emit the EBCDIC equivalent of the indicated string. The emitted
7991 string will be null terminated. Note that the directives
7992 `.string' etc. emit ascii strings by default.
7995 The standard HLASM-style EQU directive is not supported; however,
7996 the standard `as' directive .equ can be used to the same effect.
7999 Dump the literal pool accumulated so far; begin a new literal pool.
8000 The literal pool will be written in the current section; in order
8001 to generate correct assembly, a `.using' must have been previously
8002 specified in the same section.
8005 Use REGNO as the base register for all subsequent RX, RS, and SS
8006 form instructions. The EXPR will be evaluated to obtain the base
8007 address; usually, EXPR will merely be `*'.
8009 This assembler allows two `.using' directives to be simultaneously
8010 outstanding, one in the `.text' section, and one in another section
8011 (typically, the `.data' section). This feature allows dynamically
8012 loaded objects to be implemented in a relatively straightforward
8013 way. A `.using' directive must always be specified in the `.text'
8014 section; this will specify the base register that will be used for
8015 branches in the `.text' section. A second `.using' may be
8016 specified in another section; this will specify the base register
8017 that is used for non-label address literals. When a second
8018 `.using' is specified, then the subsequent `.ltorg' must be put in
8019 the same section; otherwise an error will result.
8021 Thus, for example, the following code uses `r3' to address branch
8022 targets and `r4' to address the literal pool, which has been
8023 written to the `.data' section. The is, the constants
8024 `=A(some_routine)', `=H'42'' and `=E'3.1416'' will all appear in
8025 the `.data' section.
8036 L r15,=A(some_routine)
8046 Note that this dual-`.using' directive semantics extends and is
8047 not compatible with HLASM semantics. Note that this assembler
8048 directive does not support the full range of HLASM semantics.
8051 File: as.info, Node: ESA/390 Opcodes, Prev: ESA/390 Directives, Up: ESA/390-Dependent
8056 For detailed information on the ESA/390 machine instruction set, see
8057 `ESA/390 Principles of Operation' (IBM Publication Number DZ9AR004).
8060 File: as.info, Node: i386-Dependent, Next: i860-Dependent, Prev: ESA/390-Dependent, Up: Machine Dependencies
8062 80386 Dependent Features
8063 ========================
8065 The i386 version `as' supports both the original Intel 386
8066 architecture in both 16 and 32-bit mode as well as AMD x86-64
8067 architecture extending the Intel architecture to 64-bits.
8071 * i386-Options:: Options
8072 * i386-Syntax:: AT&T Syntax versus Intel Syntax
8073 * i386-Mnemonics:: Instruction Naming
8074 * i386-Regs:: Register Naming
8075 * i386-Prefixes:: Instruction Prefixes
8076 * i386-Memory:: Memory References
8077 * i386-Jumps:: Handling of Jump Instructions
8078 * i386-Float:: Floating Point
8079 * i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations
8080 * i386-16bit:: Writing 16-bit Code
8081 * i386-Arch:: Specifying an x86 CPU architecture
8082 * i386-Bugs:: AT&T Syntax bugs
8083 * i386-Notes:: Notes
8086 File: as.info, Node: i386-Options, Next: i386-Syntax, Up: i386-Dependent
8091 The i386 version of `as' has a few machine dependent options:
8094 Select the word size, either 32 bits or 64 bits. Selecting 32-bit
8095 implies Intel i386 architecture, while 64-bit implies AMD x86-64
8098 These options are only available with the ELF object file format,
8099 and require that the necessary BFD support has been included (on a
8100 32-bit platform you have to add -enable-64-bit-bfd to configure
8101 enable 64-bit usage and use x86-64 as target platform).
8104 By default, x86 GAS replaces multiple nop instructions used for
8105 alignment within code sections with multi-byte nop instructions
8106 such as leal 0(%esi,1),%esi. This switch disables the
8110 On SVR4-derived platforms, the character `/' is treated as a
8111 comment character, which means that it cannot be used in
8112 expressions. The `--divide' option turns `/' into a normal
8113 character. This does not disable `/' at the beginning of a line
8114 starting a comment, or affect using `#' for starting a comment.
8117 File: as.info, Node: i386-Syntax, Next: i386-Mnemonics, Prev: i386-Options, Up: i386-Dependent
8119 AT&T Syntax versus Intel Syntax
8120 -------------------------------
8122 `as' now supports assembly using Intel assembler syntax.
8123 `.intel_syntax' selects Intel mode, and `.att_syntax' switches back to
8124 the usual AT&T mode for compatibility with the output of `gcc'. Either
8125 of these directives may have an optional argument, `prefix', or
8126 `noprefix' specifying whether registers require a `%' prefix. AT&T
8127 System V/386 assembler syntax is quite different from Intel syntax. We
8128 mention these differences because almost all 80386 documents use Intel
8129 syntax. Notable differences between the two syntaxes are:
8131 * AT&T immediate operands are preceded by `$'; Intel immediate
8132 operands are undelimited (Intel `push 4' is AT&T `pushl $4').
8133 AT&T register operands are preceded by `%'; Intel register operands
8134 are undelimited. AT&T absolute (as opposed to PC relative)
8135 jump/call operands are prefixed by `*'; they are undelimited in
8138 * AT&T and Intel syntax use the opposite order for source and
8139 destination operands. Intel `add eax, 4' is `addl $4, %eax'. The
8140 `source, dest' convention is maintained for compatibility with
8141 previous Unix assemblers. Note that instructions with more than
8142 one source operand, such as the `enter' instruction, do _not_ have
8143 reversed order. *Note i386-Bugs::.
8145 * In AT&T syntax the size of memory operands is determined from the
8146 last character of the instruction mnemonic. Mnemonic suffixes of
8147 `b', `w', `l' and `q' specify byte (8-bit), word (16-bit), long
8148 (32-bit) and quadruple word (64-bit) memory references. Intel
8149 syntax accomplishes this by prefixing memory operands (_not_ the
8150 instruction mnemonics) with `byte ptr', `word ptr', `dword ptr'
8151 and `qword ptr'. Thus, Intel `mov al, byte ptr FOO' is `movb FOO,
8152 %al' in AT&T syntax.
8154 * Immediate form long jumps and calls are `lcall/ljmp $SECTION,
8155 $OFFSET' in AT&T syntax; the Intel syntax is `call/jmp far
8156 SECTION:OFFSET'. Also, the far return instruction is `lret
8157 $STACK-ADJUST' in AT&T syntax; Intel syntax is `ret far
8160 * The AT&T assembler does not provide support for multiple section
8161 programs. Unix style systems expect all programs to be single
8165 File: as.info, Node: i386-Mnemonics, Next: i386-Regs, Prev: i386-Syntax, Up: i386-Dependent
8170 Instruction mnemonics are suffixed with one character modifiers which
8171 specify the size of operands. The letters `b', `w', `l' and `q'
8172 specify byte, word, long and quadruple word operands. If no suffix is
8173 specified by an instruction then `as' tries to fill in the missing
8174 suffix based on the destination register operand (the last one by
8175 convention). Thus, `mov %ax, %bx' is equivalent to `movw %ax, %bx';
8176 also, `mov $1, %bx' is equivalent to `movw $1, bx'. Note that this is
8177 incompatible with the AT&T Unix assembler which assumes that a missing
8178 mnemonic suffix implies long operand size. (This incompatibility does
8179 not affect compiler output since compilers always explicitly specify
8180 the mnemonic suffix.)
8182 Almost all instructions have the same names in AT&T and Intel format.
8183 There are a few exceptions. The sign extend and zero extend
8184 instructions need two sizes to specify them. They need a size to
8185 sign/zero extend _from_ and a size to zero extend _to_. This is
8186 accomplished by using two instruction mnemonic suffixes in AT&T syntax.
8187 Base names for sign extend and zero extend are `movs...' and `movz...'
8188 in AT&T syntax (`movsx' and `movzx' in Intel syntax). The instruction
8189 mnemonic suffixes are tacked on to this base name, the _from_ suffix
8190 before the _to_ suffix. Thus, `movsbl %al, %edx' is AT&T syntax for
8191 "move sign extend _from_ %al _to_ %edx." Possible suffixes, thus, are
8192 `bl' (from byte to long), `bw' (from byte to word), `wl' (from word to
8193 long), `bq' (from byte to quadruple word), `wq' (from word to quadruple
8194 word), and `lq' (from long to quadruple word).
8196 The Intel-syntax conversion instructions
8198 * `cbw' -- sign-extend byte in `%al' to word in `%ax',
8200 * `cwde' -- sign-extend word in `%ax' to long in `%eax',
8202 * `cwd' -- sign-extend word in `%ax' to long in `%dx:%ax',
8204 * `cdq' -- sign-extend dword in `%eax' to quad in `%edx:%eax',
8206 * `cdqe' -- sign-extend dword in `%eax' to quad in `%rax' (x86-64
8209 * `cqo' -- sign-extend quad in `%rax' to octuple in `%rdx:%rax'
8212 are called `cbtw', `cwtl', `cwtd', `cltd', `cltq', and `cqto' in AT&T
8213 naming. `as' accepts either naming for these instructions.
8215 Far call/jump instructions are `lcall' and `ljmp' in AT&T syntax,
8216 but are `call far' and `jump far' in Intel convention.
8219 File: as.info, Node: i386-Regs, Next: i386-Prefixes, Prev: i386-Mnemonics, Up: i386-Dependent
8224 Register operands are always prefixed with `%'. The 80386 registers
8227 * the 8 32-bit registers `%eax' (the accumulator), `%ebx', `%ecx',
8228 `%edx', `%edi', `%esi', `%ebp' (the frame pointer), and `%esp'
8229 (the stack pointer).
8231 * the 8 16-bit low-ends of these: `%ax', `%bx', `%cx', `%dx', `%di',
8232 `%si', `%bp', and `%sp'.
8234 * the 8 8-bit registers: `%ah', `%al', `%bh', `%bl', `%ch', `%cl',
8235 `%dh', and `%dl' (These are the high-bytes and low-bytes of `%ax',
8236 `%bx', `%cx', and `%dx')
8238 * the 6 section registers `%cs' (code section), `%ds' (data
8239 section), `%ss' (stack section), `%es', `%fs', and `%gs'.
8241 * the 3 processor control registers `%cr0', `%cr2', and `%cr3'.
8243 * the 6 debug registers `%db0', `%db1', `%db2', `%db3', `%db6', and
8246 * the 2 test registers `%tr6' and `%tr7'.
8248 * the 8 floating point register stack `%st' or equivalently
8249 `%st(0)', `%st(1)', `%st(2)', `%st(3)', `%st(4)', `%st(5)',
8250 `%st(6)', and `%st(7)'. These registers are overloaded by 8 MMX
8251 registers `%mm0', `%mm1', `%mm2', `%mm3', `%mm4', `%mm5', `%mm6'
8254 * the 8 SSE registers registers `%xmm0', `%xmm1', `%xmm2', `%xmm3',
8255 `%xmm4', `%xmm5', `%xmm6' and `%xmm7'.
8257 The AMD x86-64 architecture extends the register set by:
8259 * enhancing the 8 32-bit registers to 64-bit: `%rax' (the
8260 accumulator), `%rbx', `%rcx', `%rdx', `%rdi', `%rsi', `%rbp' (the
8261 frame pointer), `%rsp' (the stack pointer)
8263 * the 8 extended registers `%r8'-`%r15'.
8265 * the 8 32-bit low ends of the extended registers: `%r8d'-`%r15d'
8267 * the 8 16-bit low ends of the extended registers: `%r8w'-`%r15w'
8269 * the 8 8-bit low ends of the extended registers: `%r8b'-`%r15b'
8271 * the 4 8-bit registers: `%sil', `%dil', `%bpl', `%spl'.
8273 * the 8 debug registers: `%db8'-`%db15'.
8275 * the 8 SSE registers: `%xmm8'-`%xmm15'.
8278 File: as.info, Node: i386-Prefixes, Next: i386-Memory, Prev: i386-Regs, Up: i386-Dependent
8280 Instruction Prefixes
8281 --------------------
8283 Instruction prefixes are used to modify the following instruction.
8284 They are used to repeat string instructions, to provide section
8285 overrides, to perform bus lock operations, and to change operand and
8286 address sizes. (Most instructions that normally operate on 32-bit
8287 operands will use 16-bit operands if the instruction has an "operand
8288 size" prefix.) Instruction prefixes are best written on the same line
8289 as the instruction they act upon. For example, the `scas' (scan string)
8290 instruction is repeated with:
8292 repne scas %es:(%edi),%al
8294 You may also place prefixes on the lines immediately preceding the
8295 instruction, but this circumvents checks that `as' does with prefixes,
8296 and will not work with all prefixes.
8298 Here is a list of instruction prefixes:
8300 * Section override prefixes `cs', `ds', `ss', `es', `fs', `gs'.
8301 These are automatically added by specifying using the
8302 SECTION:MEMORY-OPERAND form for memory references.
8304 * Operand/Address size prefixes `data16' and `addr16' change 32-bit
8305 operands/addresses into 16-bit operands/addresses, while `data32'
8306 and `addr32' change 16-bit ones (in a `.code16' section) into
8307 32-bit operands/addresses. These prefixes _must_ appear on the
8308 same line of code as the instruction they modify. For example, in
8309 a 16-bit `.code16' section, you might write:
8313 * The bus lock prefix `lock' inhibits interrupts during execution of
8314 the instruction it precedes. (This is only valid with certain
8315 instructions; see a 80386 manual for details).
8317 * The wait for coprocessor prefix `wait' waits for the coprocessor to
8318 complete the current instruction. This should never be needed for
8319 the 80386/80387 combination.
8321 * The `rep', `repe', and `repne' prefixes are added to string
8322 instructions to make them repeat `%ecx' times (`%cx' times if the
8323 current address size is 16-bits).
8325 * The `rex' family of prefixes is used by x86-64 to encode
8326 extensions to i386 instruction set. The `rex' prefix has four
8327 bits -- an operand size overwrite (`64') used to change operand
8328 size from 32-bit to 64-bit and X, Y and Z extensions bits used to
8329 extend the register set.
8331 You may write the `rex' prefixes directly. The `rex64xyz'
8332 instruction emits `rex' prefix with all the bits set. By omitting
8333 the `64', `x', `y' or `z' you may write other prefixes as well.
8334 Normally, there is no need to write the prefixes explicitly, since
8335 gas will automatically generate them based on the instruction
8339 File: as.info, Node: i386-Memory, Next: i386-Jumps, Prev: i386-Prefixes, Up: i386-Dependent
8344 An Intel syntax indirect memory reference of the form
8346 SECTION:[BASE + INDEX*SCALE + DISP]
8348 is translated into the AT&T syntax
8350 SECTION:DISP(BASE, INDEX, SCALE)
8352 where BASE and INDEX are the optional 32-bit base and index registers,
8353 DISP is the optional displacement, and SCALE, taking the values 1, 2,
8354 4, and 8, multiplies INDEX to calculate the address of the operand. If
8355 no SCALE is specified, SCALE is taken to be 1. SECTION specifies the
8356 optional section register for the memory operand, and may override the
8357 default section register (see a 80386 manual for section register
8358 defaults). Note that section overrides in AT&T syntax _must_ be
8359 preceded by a `%'. If you specify a section override which coincides
8360 with the default section register, `as' does _not_ output any section
8361 register override prefixes to assemble the given instruction. Thus,
8362 section overrides can be specified to emphasize which section register
8363 is used for a given memory operand.
8365 Here are some examples of Intel and AT&T style memory references:
8367 AT&T: `-4(%ebp)', Intel: `[ebp - 4]'
8368 BASE is `%ebp'; DISP is `-4'. SECTION is missing, and the default
8369 section is used (`%ss' for addressing with `%ebp' as the base
8370 register). INDEX, SCALE are both missing.
8372 AT&T: `foo(,%eax,4)', Intel: `[foo + eax*4]'
8373 INDEX is `%eax' (scaled by a SCALE 4); DISP is `foo'. All other
8374 fields are missing. The section register here defaults to `%ds'.
8376 AT&T: `foo(,1)'; Intel `[foo]'
8377 This uses the value pointed to by `foo' as a memory operand. Note
8378 that BASE and INDEX are both missing, but there is only _one_ `,'.
8379 This is a syntactic exception.
8381 AT&T: `%gs:foo'; Intel `gs:foo'
8382 This selects the contents of the variable `foo' with section
8383 register SECTION being `%gs'.
8385 Absolute (as opposed to PC relative) call and jump operands must be
8386 prefixed with `*'. If no `*' is specified, `as' always chooses PC
8387 relative addressing for jump/call labels.
8389 Any instruction that has a memory operand, but no register operand,
8390 _must_ specify its size (byte, word, long, or quadruple) with an
8391 instruction mnemonic suffix (`b', `w', `l' or `q', respectively).
8393 The x86-64 architecture adds an RIP (instruction pointer relative)
8394 addressing. This addressing mode is specified by using `rip' as a base
8395 register. Only constant offsets are valid. For example:
8397 AT&T: `1234(%rip)', Intel: `[rip + 1234]'
8398 Points to the address 1234 bytes past the end of the current
8401 AT&T: `symbol(%rip)', Intel: `[rip + symbol]'
8402 Points to the `symbol' in RIP relative way, this is shorter than
8403 the default absolute addressing.
8405 Other addressing modes remain unchanged in x86-64 architecture,
8406 except registers used are 64-bit instead of 32-bit.
8409 File: as.info, Node: i386-Jumps, Next: i386-Float, Prev: i386-Memory, Up: i386-Dependent
8411 Handling of Jump Instructions
8412 -----------------------------
8414 Jump instructions are always optimized to use the smallest possible
8415 displacements. This is accomplished by using byte (8-bit) displacement
8416 jumps whenever the target is sufficiently close. If a byte displacement
8417 is insufficient a long displacement is used. We do not support word
8418 (16-bit) displacement jumps in 32-bit mode (i.e. prefixing the jump
8419 instruction with the `data16' instruction prefix), since the 80386
8420 insists upon masking `%eip' to 16 bits after the word displacement is
8421 added. (See also *note i386-Arch::)
8423 Note that the `jcxz', `jecxz', `loop', `loopz', `loope', `loopnz'
8424 and `loopne' instructions only come in byte displacements, so that if
8425 you use these instructions (`gcc' does not use them) you may get an
8426 error message (and incorrect code). The AT&T 80386 assembler tries to
8427 get around this problem by expanding `jcxz foo' to
8435 File: as.info, Node: i386-Float, Next: i386-SIMD, Prev: i386-Jumps, Up: i386-Dependent
8440 All 80387 floating point types except packed BCD are supported.
8441 (BCD support may be added without much difficulty). These data types
8442 are 16-, 32-, and 64- bit integers, and single (32-bit), double
8443 (64-bit), and extended (80-bit) precision floating point. Each
8444 supported type has an instruction mnemonic suffix and a constructor
8445 associated with it. Instruction mnemonic suffixes specify the operand's
8446 data type. Constructors build these data types into memory.
8448 * Floating point constructors are `.float' or `.single', `.double',
8449 and `.tfloat' for 32-, 64-, and 80-bit formats. These correspond
8450 to instruction mnemonic suffixes `s', `l', and `t'. `t' stands for
8451 80-bit (ten byte) real. The 80387 only supports this format via
8452 the `fldt' (load 80-bit real to stack top) and `fstpt' (store
8453 80-bit real and pop stack) instructions.
8455 * Integer constructors are `.word', `.long' or `.int', and `.quad'
8456 for the 16-, 32-, and 64-bit integer formats. The corresponding
8457 instruction mnemonic suffixes are `s' (single), `l' (long), and
8458 `q' (quad). As with the 80-bit real format, the 64-bit `q' format
8459 is only present in the `fildq' (load quad integer to stack top)
8460 and `fistpq' (store quad integer and pop stack) instructions.
8462 Register to register operations should not use instruction mnemonic
8463 suffixes. `fstl %st, %st(1)' will give a warning, and be assembled as
8464 if you wrote `fst %st, %st(1)', since all register to register
8465 operations use 80-bit floating point operands. (Contrast this with
8466 `fstl %st, mem', which converts `%st' from 80-bit to 64-bit floating
8467 point format, then stores the result in the 4 byte location `mem')
8470 File: as.info, Node: i386-SIMD, Next: i386-16bit, Prev: i386-Float, Up: i386-Dependent
8472 Intel's MMX and AMD's 3DNow! SIMD Operations
8473 --------------------------------------------
8475 `as' supports Intel's MMX instruction set (SIMD instructions for
8476 integer data), available on Intel's Pentium MMX processors and Pentium
8477 II processors, AMD's K6 and K6-2 processors, Cyrix' M2 processor, and
8478 probably others. It also supports AMD's 3DNow! instruction set (SIMD
8479 instructions for 32-bit floating point data) available on AMD's K6-2
8480 processor and possibly others in the future.
8482 Currently, `as' does not support Intel's floating point SIMD, Katmai
8485 The eight 64-bit MMX operands, also used by 3DNow!, are called
8486 `%mm0', `%mm1', ... `%mm7'. They contain eight 8-bit integers, four
8487 16-bit integers, two 32-bit integers, one 64-bit integer, or two 32-bit
8488 floating point values. The MMX registers cannot be used at the same
8489 time as the floating point stack.
8491 See Intel and AMD documentation, keeping in mind that the operand
8492 order in instructions is reversed from the Intel syntax.
8495 File: as.info, Node: i386-16bit, Next: i386-Arch, Prev: i386-SIMD, Up: i386-Dependent
8500 While `as' normally writes only "pure" 32-bit i386 code or 64-bit
8501 x86-64 code depending on the default configuration, it also supports
8502 writing code to run in real mode or in 16-bit protected mode code
8503 segments. To do this, put a `.code16' or `.code16gcc' directive before
8504 the assembly language instructions to be run in 16-bit mode. You can
8505 switch `as' back to writing normal 32-bit code with the `.code32'
8508 `.code16gcc' provides experimental support for generating 16-bit
8509 code from gcc, and differs from `.code16' in that `call', `ret',
8510 `enter', `leave', `push', `pop', `pusha', `popa', `pushf', and `popf'
8511 instructions default to 32-bit size. This is so that the stack pointer
8512 is manipulated in the same way over function calls, allowing access to
8513 function parameters at the same stack offsets as in 32-bit mode.
8514 `.code16gcc' also automatically adds address size prefixes where
8515 necessary to use the 32-bit addressing modes that gcc generates.
8517 The code which `as' generates in 16-bit mode will not necessarily
8518 run on a 16-bit pre-80386 processor. To write code that runs on such a
8519 processor, you must refrain from using _any_ 32-bit constructs which
8520 require `as' to output address or operand size prefixes.
8522 Note that writing 16-bit code instructions by explicitly specifying a
8523 prefix or an instruction mnemonic suffix within a 32-bit code section
8524 generates different machine instructions than those generated for a
8525 16-bit code segment. In a 32-bit code section, the following code
8526 generates the machine opcode bytes `66 6a 04', which pushes the value
8527 `4' onto the stack, decrementing `%esp' by 2.
8531 The same code in a 16-bit code section would generate the machine
8532 opcode bytes `6a 04' (ie. without the operand size prefix), which is
8533 correct since the processor default operand size is assumed to be 16
8534 bits in a 16-bit code section.
8537 File: as.info, Node: i386-Bugs, Next: i386-Notes, Prev: i386-Arch, Up: i386-Dependent
8542 The UnixWare assembler, and probably other AT&T derived ix86 Unix
8543 assemblers, generate floating point instructions with reversed source
8544 and destination registers in certain cases. Unfortunately, gcc and
8545 possibly many other programs use this reversed syntax, so we're stuck
8552 results in `%st(3)' being updated to `%st - %st(3)' rather than the
8553 expected `%st(3) - %st'. This happens with all the non-commutative
8554 arithmetic floating point operations with two register operands where
8555 the source register is `%st' and the destination register is `%st(i)'.
8558 File: as.info, Node: i386-Arch, Next: i386-Bugs, Prev: i386-16bit, Up: i386-Dependent
8560 Specifying CPU Architecture
8561 ---------------------------
8563 `as' may be told to assemble for a particular CPU (sub-)architecture
8564 with the `.arch CPU_TYPE' directive. This directive enables a warning
8565 when gas detects an instruction that is not supported on the CPU
8566 specified. The choices for CPU_TYPE are:
8568 `i8086' `i186' `i286' `i386'
8569 `i486' `i586' `i686' `pentium'
8570 `pentiumpro' `pentiumii' `pentiumiii' `pentium4'
8578 Apart from the warning, there are only two other effects on `as'
8579 operation; Firstly, if you specify a CPU other than `i486', then shift
8580 by one instructions such as `sarl $1, %eax' will automatically use a
8581 two byte opcode sequence. The larger three byte opcode sequence is
8582 used on the 486 (and when no architecture is specified) because it
8583 executes faster on the 486. Note that you can explicitly request the
8584 two byte opcode by writing `sarl %eax'. Secondly, if you specify
8585 `i8086', `i186', or `i286', _and_ `.code16' or `.code16gcc' then byte
8586 offset conditional jumps will be promoted when necessary to a two
8587 instruction sequence consisting of a conditional jump of the opposite
8588 sense around an unconditional jump to the target.
8590 Following the CPU architecture (but not a sub-architecture, which
8591 are those starting with a dot), you may specify `jumps' or `nojumps' to
8592 control automatic promotion of conditional jumps. `jumps' is the
8593 default, and enables jump promotion; All external jumps will be of the
8594 long variety, and file-local jumps will be promoted as necessary.
8595 (*note i386-Jumps::) `nojumps' leaves external conditional jumps as
8596 byte offset jumps, and warns about file-local conditional jumps that
8597 `as' promotes. Unconditional jumps are treated as for `jumps'.
8604 File: as.info, Node: i386-Notes, Prev: i386-Bugs, Up: i386-Dependent
8609 There is some trickery concerning the `mul' and `imul' instructions
8610 that deserves mention. The 16-, 32-, 64- and 128-bit expanding
8611 multiplies (base opcode `0xf6'; extension 4 for `mul' and 5 for `imul')
8612 can be output only in the one operand form. Thus, `imul %ebx, %eax'
8613 does _not_ select the expanding multiply; the expanding multiply would
8614 clobber the `%edx' register, and this would confuse `gcc' output. Use
8615 `imul %ebx' to get the 64-bit product in `%edx:%eax'.
8617 We have added a two operand form of `imul' when the first operand is
8618 an immediate mode expression and the second operand is a register.
8619 This is just a shorthand, so that, multiplying `%eax' by 69, for
8620 example, can be done with `imul $69, %eax' rather than `imul $69, %eax,
8624 File: as.info, Node: i860-Dependent, Next: i960-Dependent, Prev: i386-Dependent, Up: Machine Dependencies
8626 Intel i860 Dependent Features
8627 =============================
8631 * Notes-i860:: i860 Notes
8632 * Options-i860:: i860 Command-line Options
8633 * Directives-i860:: i860 Machine Directives
8634 * Opcodes for i860:: i860 Opcodes
8637 File: as.info, Node: Notes-i860, Next: Options-i860, Up: i860-Dependent
8642 This is a fairly complete i860 assembler which is compatible with the
8643 UNIX System V/860 Release 4 assembler. However, it does not currently
8644 support SVR4 PIC (i.e., `@GOT, @GOTOFF, @PLT').
8646 Like the SVR4/860 assembler, the output object format is ELF32.
8647 Currently, this is the only supported object format. If there is
8648 sufficient interest, other formats such as COFF may be implemented.
8650 Both the Intel and AT&T/SVR4 syntaxes are supported, with the latter
8651 being the default. One difference is that AT&T syntax requires the '%'
8652 prefix on register names while Intel syntax does not. Another
8653 difference is in the specification of relocatable expressions. The
8654 Intel syntax is `ha%expression' whereas the SVR4 syntax is
8655 `[expression]@ha' (and similarly for the "l" and "h" selectors).
8658 File: as.info, Node: Options-i860, Next: Directives-i860, Prev: Notes-i860, Up: i860-Dependent
8660 i860 Command-line Options
8661 -------------------------
8663 SVR4 compatibility options
8664 ..........................
8667 Print assembler version.
8679 Select little endian output (this is the default).
8682 Select big endian output. Note that the i860 always reads
8683 instructions as little endian data, so this option only effects
8684 data and not instructions.
8687 Emit a warning message if any pseudo-instruction expansions
8688 occurred. For example, a `or' instruction with an immediate
8689 larger than 16-bits will be expanded into two instructions. This
8690 is a very undesirable feature to rely on, so this flag can help
8691 detect any code where it happens. One use of it, for instance, has
8692 been to find and eliminate any place where `gcc' may emit these
8693 pseudo-instructions.
8696 Enable support for the i860XP instructions and control registers.
8697 By default, this option is disabled so that only the base
8698 instruction set (i.e., i860XR) is supported.
8701 The i860 assembler defaults to AT&T/SVR4 syntax. This option
8702 enables the Intel syntax.
8705 File: as.info, Node: Directives-i860, Next: Opcodes for i860, Prev: Options-i860, Up: i860-Dependent
8707 i860 Machine Directives
8708 -----------------------
8711 Enter dual instruction mode. While this directive is supported, the
8712 preferred way to use dual instruction mode is to explicitly code
8713 the dual bit with the `d.' prefix.
8716 Exit dual instruction mode. While this directive is supported, the
8717 preferred way to use dual instruction mode is to explicitly code
8718 the dual bit with the `d.' prefix.
8721 Change the temporary register used when expanding pseudo
8722 operations. The default register is `r31'.
8724 The `.dual', `.enddual', and `.atmp' directives are available only
8725 in the Intel syntax mode.
8727 Both syntaxes allow for the standard `.align' directive. However,
8728 the Intel syntax additionally allows keywords for the alignment
8729 parameter: "`.align type'", where `type' is one of `.short', `.long',
8730 `.quad', `.single', `.double' representing alignments of 2, 4, 16, 4,
8731 and 8, respectively.
8734 File: as.info, Node: Opcodes for i860, Prev: Directives-i860, Up: i860-Dependent
8739 All of the Intel i860XR and i860XP machine instructions are
8740 supported. Please see either _i860 Microprocessor Programmer's
8741 Reference Manual_ or _i860 Microprocessor Architecture_ for more
8744 Other instruction support (pseudo-instructions)
8745 ...............................................
8747 For compatibility with some other i860 assemblers, a number of
8748 pseudo-instructions are supported. While these are supported, they are
8749 a very undesirable feature that should be avoided - in particular, when
8750 they result in an expansion to multiple actual i860 instructions. Below
8751 are the pseudo-instructions that result in expansions.
8752 * Load large immediate into general register:
8754 The pseudo-instruction `mov imm,%rn' (where the immediate does not
8755 fit within a signed 16-bit field) will be expanded into:
8756 orh large_imm@h,%r0,%rn
8757 or large_imm@l,%rn,%rn
8759 * Load/store with relocatable address expression:
8761 For example, the pseudo-instruction `ld.b addr_exp(%rx),%rn' will
8763 orh addr_exp@ha,%rx,%r31
8764 ld.l addr_exp@l(%r31),%rn
8766 The analogous expansions apply to `ld.x, st.x, fld.x, pfld.x,
8767 fst.x', and `pst.x' as well.
8769 * Signed large immediate with add/subtract:
8771 If any of the arithmetic operations `adds, addu, subs, subu' are
8772 used with an immediate larger than 16-bits (signed), then they
8773 will be expanded. For instance, the pseudo-instruction `adds
8774 large_imm,%rx,%rn' expands to:
8775 orh large_imm@h,%r0,%r31
8776 or large_imm@l,%r31,%r31
8779 * Unsigned large immediate with logical operations:
8781 Logical operations (`or, andnot, or, xor') also result in
8782 expansions. The pseudo-instruction `or large_imm,%rx,%rn' results
8784 orh large_imm@h,%rx,%r31
8785 or large_imm@l,%r31,%rn
8787 Similarly for the others, except for `and' which expands to:
8788 andnot (-1 - large_imm)@h,%rx,%r31
8789 andnot (-1 - large_imm)@l,%r31,%rn
8792 File: as.info, Node: i960-Dependent, Next: IA-64-Dependent, Prev: i860-Dependent, Up: Machine Dependencies
8794 Intel 80960 Dependent Features
8795 ==============================
8799 * Options-i960:: i960 Command-line Options
8800 * Floating Point-i960:: Floating Point
8801 * Directives-i960:: i960 Machine Directives
8802 * Opcodes for i960:: i960 Opcodes
8805 File: as.info, Node: Options-i960, Next: Floating Point-i960, Up: i960-Dependent
8807 i960 Command-line Options
8808 -------------------------
8810 `-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC'
8811 Select the 80960 architecture. Instructions or features not
8812 supported by the selected architecture cause fatal errors.
8814 `-ACA' is equivalent to `-ACA_A'; `-AKC' is equivalent to `-AMC'.
8815 Synonyms are provided for compatibility with other tools.
8817 If you do not specify any of these options, `as' generates code
8818 for any instruction or feature that is supported by _some_ version
8819 of the 960 (even if this means mixing architectures!). In
8820 principle, `as' attempts to deduce the minimal sufficient
8821 processor type if none is specified; depending on the object code
8822 format, the processor type may be recorded in the object file. If
8823 it is critical that the `as' output match a specific architecture,
8824 specify that architecture explicitly.
8827 Add code to collect information about conditional branches taken,
8828 for later optimization using branch prediction bits. (The
8829 conditional branch instructions have branch prediction bits in the
8830 CA, CB, and CC architectures.) If BR represents a conditional
8831 branch instruction, the following represents the code generated by
8832 the assembler when `-b' is specified:
8834 call INCREMENT ROUTINE
8835 .word 0 # pre-counter
8837 call INCREMENT ROUTINE
8838 .word 0 # post-counter
8840 The counter following a branch records the number of times that
8841 branch was _not_ taken; the differenc between the two counters is
8842 the number of times the branch _was_ taken.
8844 A table of every such `Label' is also generated, so that the
8845 external postprocessor `gbr960' (supplied by Intel) can locate all
8846 the counters. This table is always labeled `__BRANCH_TABLE__';
8847 this is a local symbol to permit collecting statistics for many
8848 separate object files. The table is word aligned, and begins with
8849 a two-word header. The first word, initialized to 0, is used in
8850 maintaining linked lists of branch tables. The second word is a
8851 count of the number of entries in the table, which follow
8852 immediately: each is a word, pointing to one of the labels
8855 +------------+------------+------------+ ... +------------+
8857 | *NEXT | COUNT: N | *BRLAB 1 | | *BRLAB N |
8859 +------------+------------+------------+ ... +------------+
8861 __BRANCH_TABLE__ layout
8863 The first word of the header is used to locate multiple branch
8864 tables, since each object file may contain one. Normally the links
8865 are maintained with a call to an initialization routine, placed at
8866 the beginning of each function in the file. The GNU C compiler
8867 generates these calls automatically when you give it a `-b' option.
8868 For further details, see the documentation of `gbr960'.
8871 Normally, Compare-and-Branch instructions with targets that require
8872 displacements greater than 13 bits (or that have external targets)
8873 are replaced with the corresponding compare (or `chkbit') and
8874 branch instructions. You can use the `-no-relax' option to
8875 specify that `as' should generate errors instead, if the target
8876 displacement is larger than 13 bits.
8878 This option does not affect the Compare-and-Jump instructions; the
8879 code emitted for them is _always_ adjusted when necessary
8880 (depending on displacement size), regardless of whether you use
8884 File: as.info, Node: Floating Point-i960, Next: Directives-i960, Prev: Options-i960, Up: i960-Dependent
8889 `as' generates IEEE floating-point numbers for the directives
8890 `.float', `.double', `.extended', and `.single'.
8893 File: as.info, Node: Directives-i960, Next: Opcodes for i960, Prev: Floating Point-i960, Up: i960-Dependent
8895 i960 Machine Directives
8896 -----------------------
8898 `.bss SYMBOL, LENGTH, ALIGN'
8899 Reserve LENGTH bytes in the bss section for a local SYMBOL,
8900 aligned to the power of two specified by ALIGN. LENGTH and ALIGN
8901 must be positive absolute expressions. This directive differs
8902 from `.lcomm' only in that it permits you to specify an alignment.
8903 *Note `.lcomm': Lcomm.
8906 `.extended' expects zero or more flonums, separated by commas; for
8907 each flonum, `.extended' emits an IEEE extended-format (80-bit)
8908 floating-point number.
8910 `.leafproc CALL-LAB, BAL-LAB'
8911 You can use the `.leafproc' directive in conjunction with the
8912 optimized `callj' instruction to enable faster calls of leaf
8913 procedures. If a procedure is known to call no other procedures,
8914 you may define an entry point that skips procedure prolog code
8915 (and that does not depend on system-supplied saved context), and
8916 declare it as the BAL-LAB using `.leafproc'. If the procedure
8917 also has an entry point that goes through the normal prolog, you
8918 can specify that entry point as CALL-LAB.
8920 A `.leafproc' declaration is meant for use in conjunction with the
8921 optimized call instruction `callj'; the directive records the data
8922 needed later to choose between converting the `callj' into a `bal'
8925 CALL-LAB is optional; if only one argument is present, or if the
8926 two arguments are identical, the single argument is assumed to be
8927 the `bal' entry point.
8929 `.sysproc NAME, INDEX'
8930 The `.sysproc' directive defines a name for a system procedure.
8931 After you define it using `.sysproc', you can use NAME to refer to
8932 the system procedure identified by INDEX when calling procedures
8933 with the optimized call instruction `callj'.
8935 Both arguments are required; INDEX must be between 0 and 31
8939 File: as.info, Node: Opcodes for i960, Prev: Directives-i960, Up: i960-Dependent
8944 All Intel 960 machine instructions are supported; *note i960
8945 Command-line Options: Options-i960. for a discussion of selecting the
8946 instruction subset for a particular 960 architecture.
8948 Some opcodes are processed beyond simply emitting a single
8949 corresponding instruction: `callj', and Compare-and-Branch or
8950 Compare-and-Jump instructions with target displacements larger than 13
8955 * callj-i960:: `callj'
8956 * Compare-and-branch-i960:: Compare-and-Branch
8959 File: as.info, Node: callj-i960, Next: Compare-and-branch-i960, Up: Opcodes for i960
8964 You can write `callj' to have the assembler or the linker determine
8965 the most appropriate form of subroutine call: `call', `bal', or
8966 `calls'. If the assembly source contains enough information--a
8967 `.leafproc' or `.sysproc' directive defining the operand--then `as'
8968 translates the `callj'; if not, it simply emits the `callj', leaving it
8969 for the linker to resolve.
8972 File: as.info, Node: Compare-and-branch-i960, Prev: callj-i960, Up: Opcodes for i960
8977 The 960 architectures provide combined Compare-and-Branch
8978 instructions that permit you to store the branch target in the lower 13
8979 bits of the instruction word itself. However, if you specify a branch
8980 target far enough away that its address won't fit in 13 bits, the
8981 assembler can either issue an error, or convert your Compare-and-Branch
8982 instruction into separate instructions to do the compare and the branch.
8984 Whether `as' gives an error or expands the instruction depends on
8985 two choices you can make: whether you use the `-no-relax' option, and
8986 whether you use a "Compare and Branch" instruction or a "Compare and
8987 Jump" instruction. The "Jump" instructions are _always_ expanded if
8988 necessary; the "Branch" instructions are expanded when necessary
8989 _unless_ you specify `-no-relax'--in which case `as' gives an error
8992 These are the Compare-and-Branch instructions, their "Jump" variants,
8993 and the instruction pairs they may expand into:
8996 Branch Jump Expanded to
8997 ------ ------ ------------
9000 cmpibe cmpije cmpi; be
9001 cmpibg cmpijg cmpi; bg
9002 cmpibge cmpijge cmpi; bge
9003 cmpibl cmpijl cmpi; bl
9004 cmpible cmpijle cmpi; ble
9005 cmpibno cmpijno cmpi; bno
9006 cmpibne cmpijne cmpi; bne
9007 cmpibo cmpijo cmpi; bo
9008 cmpobe cmpoje cmpo; be
9009 cmpobg cmpojg cmpo; bg
9010 cmpobge cmpojge cmpo; bge
9011 cmpobl cmpojl cmpo; bl
9012 cmpoble cmpojle cmpo; ble
9013 cmpobne cmpojne cmpo; bne
9016 File: as.info, Node: IA-64-Dependent, Next: IP2K-Dependent, Prev: i960-Dependent, Up: Machine Dependencies
9018 IA-64 Dependent Features
9019 ========================
9023 * IA-64 Options:: Options
9024 * IA-64 Syntax:: Syntax
9025 * IA-64 Opcodes:: Opcodes
9028 File: as.info, Node: IA-64 Options, Next: IA-64 Syntax, Up: IA-64-Dependent
9034 This option instructs the assembler to mark the resulting object
9035 file as using the "constant GP" model. With this model, it is
9036 assumed that the entire program uses a single global pointer (GP)
9037 value. Note that this option does not in any fashion affect the
9038 machine code emitted by the assembler. All it does is turn on the
9039 EF_IA_64_CONS_GP flag in the ELF file header.
9042 This option instructs the assembler to mark the resulting object
9043 file as using the "constant GP without function descriptor" data
9044 model. This model is like the "constant GP" model, except that it
9045 additionally does away with function descriptors. What this means
9046 is that the address of a function refers directly to the
9047 function's code entry-point. Normally, such an address would
9048 refer to a function descriptor, which contains both the code
9049 entry-point and the GP-value needed by the function. Note that
9050 this option does not in any fashion affect the machine code
9051 emitted by the assembler. All it does is turn on the
9052 EF_IA_64_NOFUNCDESC_CONS_GP flag in the ELF file header.
9061 These options select the data model. The assembler defaults to
9062 `-mlp64' (LP64 data model).
9067 These options select the byte order. The `-mle' option selects
9068 little-endian byte order (default) and `-mbe' selects big-endian
9069 byte order. Note that IA-64 machine code always uses
9070 little-endian byte order.
9075 Tune for a particular IA-64 CPU, ITANIUM1 or ITANIUM2. The default
9078 `-munwind-check=warning'
9080 `-munwind-check=error'
9081 These options control what the assembler will do when performing
9082 consistency checks on unwind directives. `-munwind-check=warning'
9083 will make the assembler issue a warning when an unwind directive
9084 check fails. This is the default. `-munwind-check=error' will
9085 make the assembler issue an error when an unwind directive check
9093 These options control what the assembler will do when the `hint.b'
9094 instruction is used. `-mhint.b=ok' will make the assembler accept
9095 `hint.b'. `-mint.b=warning' will make the assembler issue a
9096 warning when `hint.b' is used. `-mhint.b=error' will make the
9097 assembler treat `hint.b' as an error, which is the default.
9102 These options turn on dependency violation checking.
9105 This option instructs the assembler to automatically insert stop
9106 bits where necessary to remove dependency violations. This is the
9110 This option turns off dependency violation checking.
9113 This turns on debug output intended to help tracking down bugs in
9114 the dependency violation checker.
9117 This is a shortcut for -xnone -xdebug.
9120 This is a shortcut for -xexplicit -xdebug.
9123 File: as.info, Node: IA-64 Syntax, Next: IA-64 Opcodes, Prev: IA-64 Options, Up: IA-64-Dependent
9128 The assembler syntax closely follows the IA-64 Assembly Language
9133 * IA-64-Chars:: Special Characters
9134 * IA-64-Regs:: Register Names
9135 * IA-64-Bits:: Bit Names
9138 File: as.info, Node: IA-64-Chars, Next: IA-64-Regs, Up: IA-64 Syntax
9143 `//' is the line comment token.
9145 `;' can be used instead of a newline to separate statements.
9148 File: as.info, Node: IA-64-Regs, Next: IA-64-Bits, Prev: IA-64-Chars, Up: IA-64 Syntax
9153 The 128 integer registers are referred to as `rN'. The 128
9154 floating-point registers are referred to as `fN'. The 128 application
9155 registers are referred to as `arN'. The 128 control registers are
9156 referred to as `crN'. The 64 one-bit predicate registers are referred
9157 to as `pN'. The 8 branch registers are referred to as `bN'. In
9158 addition, the assembler defines a number of aliases: `gp' (`r1'), `sp'
9159 (`r12'), `rp' (`b0'), `ret0' (`r8'), `ret1' (`r9'), `ret2' (`r10'),
9160 `ret3' (`r9'), `fargN' (`f8+N'), and `fretN' (`f8+N').
9162 For convenience, the assembler also defines aliases for all named
9163 application and control registers. For example, `ar.bsp' refers to the
9164 register backing store pointer (`ar17'). Similarly, `cr.eoi' refers to
9165 the end-of-interrupt register (`cr67').
9168 File: as.info, Node: IA-64-Bits, Prev: IA-64-Regs, Up: IA-64 Syntax
9170 IA-64 Processor-Status-Register (PSR) Bit Names
9171 ...............................................
9173 The assembler defines bit masks for each of the bits in the IA-64
9174 processor status register. For example, `psr.ic' corresponds to a
9175 value of 0x2000. These masks are primarily intended for use with the
9176 `ssm'/`sum' and `rsm'/`rum' instructions, but they can be used anywhere
9177 else where an integer constant is expected.
9180 File: as.info, Node: IA-64 Opcodes, Prev: IA-64 Syntax, Up: IA-64-Dependent
9185 For detailed information on the IA-64 machine instruction set, see
9186 the IA-64 Architecture Handbook
9187 (http://developer.intel.com/design/itanium/arch_spec.htm).
9190 File: as.info, Node: IP2K-Dependent, Next: M32C-Dependent, Prev: IA-64-Dependent, Up: Machine Dependencies
9192 IP2K Dependent Features
9193 =======================
9197 * IP2K-Opts:: IP2K Options
9200 File: as.info, Node: IP2K-Opts, Up: IP2K-Dependent
9205 The Ubicom IP2K version of `as' has a few machine dependent options:
9208 `as' can assemble the extended IP2022 instructions, but it will
9209 only do so if this is specifically allowed via this command line
9213 This option restores the assembler's default behaviour of not
9214 permitting the extended IP2022 instructions to be assembled.
9217 File: as.info, Node: M32C-Dependent, Next: M32R-Dependent, Prev: IP2K-Dependent, Up: Machine Dependencies
9219 M32C Dependent Features
9220 =======================
9222 `as' can assemble code for several different members of the Renesas
9223 M32C family. Normally the default is to assemble code for the M16C
9224 microprocessor. The `-m32c' option may be used to change the default
9225 to the M32C microprocessor.
9229 * M32C-Opts:: M32C Options
9230 * M32C-Modifiers:: Symbolic Operand Modifiers
9233 File: as.info, Node: M32C-Opts, Next: M32C-Modifiers, Up: M32C-Dependent
9238 The Renesas M32C version of `as' has two machine-dependent options:
9241 Assemble M32C instructions.
9244 Assemble M16C instructions (default).
9247 File: as.info, Node: M32C-Modifiers, Prev: M32C-Opts, Up: M32C-Dependent
9249 Symbolic Operand Modifiers
9250 --------------------------
9252 The assembler supports several modifiers when using symbol addresses
9253 in M32C instruction operands. The general syntax is the following:
9259 These modifiers override the assembler's assumptions about how big
9260 a symbol's address is. Normally, when it sees an operand like
9261 `sym[a0]' it assumes `sym' may require the widest displacement
9262 field (16 bits for `-m16c', 24 bits for `-m32c'). These modifiers
9263 tell it to assume the address will fit in an 8 or 16 bit
9264 (respectively) unsigned displacement. Note that, of course, if it
9265 doesn't actually fit you will get linker errors. Example:
9267 mov.w %dsp8(sym)[a0],r1
9268 mov.b #0,%dsp8(sym)[a0]
9271 This modifier allows you to load bits 16 through 23 of a 24 bit
9272 address into an 8 bit register. This is useful with, for example,
9273 the M16C `smovf' instruction, which expects a 20 bit address in
9274 `r1h' and `a0'. Example:
9276 mov.b #%hi8(sym),r1h
9277 mov.w #%lo16(sym),a0
9281 Likewise, this modifier allows you to load bits 0 through 15 of a
9282 24 bit address into a 16 bit register.
9285 This modifier allows you to load bits 16 through 31 of a 32 bit
9286 address into a 16 bit register. While the M32C family only has 24
9287 bits of address space, it does support addresses in pairs of 16 bit
9288 registers (like `a1a0' for the `lde' instruction). This modifier
9289 is for loading the upper half in such cases. Example:
9291 mov.w #%hi16(sym),a1
9292 mov.w #%lo16(sym),a0
9297 File: as.info, Node: M32R-Dependent, Next: M68K-Dependent, Prev: M32C-Dependent, Up: Machine Dependencies
9299 M32R Dependent Features
9300 =======================
9304 * M32R-Opts:: M32R Options
9305 * M32R-Directives:: M32R Directives
9306 * M32R-Warnings:: M32R Warnings
9309 File: as.info, Node: M32R-Opts, Next: M32R-Directives, Up: M32R-Dependent
9314 The Renease M32R version of `as' has a few machine dependent options:
9317 `as' can assemble code for several different members of the
9318 Renesas M32R family. Normally the default is to assemble code for
9319 the M32R microprocessor. This option may be used to change the
9320 default to the M32RX microprocessor, which adds some more
9321 instructions to the basic M32R instruction set, and some
9322 additional parameters to some of the original instructions.
9325 This option changes the target processor to the the M32R2
9329 This option can be used to restore the assembler's default
9330 behaviour of assembling for the M32R microprocessor. This can be
9331 useful if the default has been changed by a previous command line
9335 This option tells the assembler to produce little-endian code and
9336 data. The default is dependent upon how the toolchain was
9340 This is a synonum for _-little_.
9343 This option tells the assembler to produce big-endian code and
9347 This is a synonum for _-big_.
9350 This option specifies that the output of the assembler should be
9351 marked as position-independent code (PIC).
9354 This option tells the assembler to attempts to combine two
9355 sequential instructions into a single, parallel instruction, where
9356 it is legal to do so.
9359 This option disables a previously enabled _-parallel_ option.
9362 This option disables the support for the extended bit-field
9363 instructions provided by the M32R2. If this support needs to be
9364 re-enabled the _-bitinst_ switch can be used to restore it.
9367 This option tells the assembler to attempt to optimize the
9368 instructions that it produces. This includes filling delay slots
9369 and converting sequential instructions into parallel ones. This
9370 option implies _-parallel_.
9372 `-warn-explicit-parallel-conflicts'
9373 Instructs `as' to produce warning messages when questionable
9374 parallel instructions are encountered. This option is enabled by
9375 default, but `gcc' disables it when it invokes `as' directly.
9376 Questionable instructions are those whoes behaviour would be
9377 different if they were executed sequentially. For example the
9378 code fragment `mv r1, r2 || mv r3, r1' produces a different result
9379 from `mv r1, r2 \n mv r3, r1' since the former moves r1 into r3
9380 and then r2 into r1, whereas the later moves r2 into r1 and r3.
9383 This is a shorter synonym for the
9384 _-warn-explicit-parallel-conflicts_ option.
9386 `-no-warn-explicit-parallel-conflicts'
9387 Instructs `as' not to produce warning messages when questionable
9388 parallel instructions are encountered.
9391 This is a shorter synonym for the
9392 _-no-warn-explicit-parallel-conflicts_ option.
9394 `-ignore-parallel-conflicts'
9395 This option tells the assembler's to stop checking parallel
9396 instructions for contraint violations. This ability is provided
9397 for hardware vendors testing chip designs and should not be used
9398 under normal circumstances.
9400 `-no-ignore-parallel-conflicts'
9401 This option restores the assembler's default behaviour of checking
9402 parallel instructions to detect constraint violations.
9405 This is a shorter synonym for the _-ignore-parallel-conflicts_
9409 This is a shorter synonym for the _-no-ignore-parallel-conflicts_
9412 `-warn-unmatched-high'
9413 This option tells the assembler to produce a warning message if a
9414 `.high' pseudo op is encountered without a mathcing `.low' pseudo
9415 op. The presence of such an unmatches pseudo op usually indicates
9416 a programming error.
9418 `-no-warn-unmatched-high'
9419 Disables a previously enabled _-warn-unmatched-high_ option.
9422 This is a shorter synonym for the _-warn-unmatched-high_ option.
9425 This is a shorter synonym for the _-no-warn-unmatched-high_ option.
9428 File: as.info, Node: M32R-Directives, Next: M32R-Warnings, Prev: M32R-Opts, Up: M32R-Dependent
9433 The Renease M32R version of `as' has a few architecture specific
9437 The `low' directive computes the value of its expression and
9438 places the lower 16-bits of the result into the immediate-field of
9439 the instruction. For example:
9441 or3 r0, r0, #low(0x12345678) ; compute r0 = r0 | 0x5678
9442 add3, r0, r0, #low(fred) ; compute r0 = r0 + low 16-bits of address of fred
9445 The `high' directive computes the value of its expression and
9446 places the upper 16-bits of the result into the immediate-field of
9447 the instruction. For example:
9449 seth r0, #high(0x12345678) ; compute r0 = 0x12340000
9450 seth, r0, #high(fred) ; compute r0 = upper 16-bits of address of fred
9453 The `shigh' directive is very similar to the `high' directive. It
9454 also computes the value of its expression and places the upper
9455 16-bits of the result into the immediate-field of the instruction.
9456 The difference is that `shigh' also checks to see if the lower
9457 16-bits could be interpreted as a signed number, and if so it
9458 assumes that a borrow will occur from the upper-16 bits. To
9459 compensate for this the `shigh' directive pre-biases the upper 16
9460 bit value by adding one to it. For example:
9464 seth r0, #shigh(0x12345678) ; compute r0 = 0x12340000
9465 seth r0, #shigh(0x00008000) ; compute r0 = 0x00010000
9467 In the second example the lower 16-bits are 0x8000. If these are
9468 treated as a signed value and sign extended to 32-bits then the
9469 value becomes 0xffff8000. If this value is then added to
9470 0x00010000 then the result is 0x00008000.
9472 This behaviour is to allow for the different semantics of the
9473 `or3' and `add3' instructions. The `or3' instruction treats its
9474 16-bit immediate argument as unsigned whereas the `add3' treats
9475 its 16-bit immediate as a signed value. So for example:
9477 seth r0, #shigh(0x00008000)
9478 add3 r0, r0, #low(0x00008000)
9480 Produces the correct result in r0, whereas:
9482 seth r0, #shigh(0x00008000)
9483 or3 r0, r0, #low(0x00008000)
9485 Stores 0xffff8000 into r0.
9487 Note - the `shigh' directive does not know where in the assembly
9488 source code the lower 16-bits of the value are going set, so it
9489 cannot check to make sure that an `or3' instruction is being used
9490 rather than an `add3' instruction. It is up to the programmer to
9491 make sure that correct directives are used.
9494 The directive performs a similar thing as the _-m32r_ command line
9495 option. It tells the assembler to only accept M32R instructions
9496 from now on. An instructions from later M32R architectures are
9500 The directive performs a similar thing as the _-m32rx_ command
9501 line option. It tells the assembler to start accepting the extra
9502 instructions in the M32RX ISA as well as the ordinary M32R ISA.
9505 The directive performs a similar thing as the _-m32r2_ command
9506 line option. It tells the assembler to start accepting the extra
9507 instructions in the M32R2 ISA as well as the ordinary M32R ISA.
9510 The directive performs a similar thing as the _-little_ command
9511 line option. It tells the assembler to start producing
9512 little-endian code and data. This option should be used with care
9513 as producing mixed-endian binary files is frought with danger.
9516 The directive performs a similar thing as the _-big_ command line
9517 option. It tells the assembler to start producing big-endian code
9518 and data. This option should be used with care as producing
9519 mixed-endian binary files is frought with danger.
9522 File: as.info, Node: M32R-Warnings, Prev: M32R-Directives, Up: M32R-Dependent
9527 There are several warning and error messages that can be produced by
9528 `as' which are specific to the M32R:
9530 `output of 1st instruction is the same as an input to 2nd instruction - is this intentional ?'
9531 This message is only produced if warnings for explicit parallel
9532 conflicts have been enabled. It indicates that the assembler has
9533 encountered a parallel instruction in which the destination
9534 register of the left hand instruction is used as an input register
9535 in the right hand instruction. For example in this code fragment
9536 `mv r1, r2 || neg r3, r1' register r1 is the destination of the
9537 move instruction and the input to the neg instruction.
9539 `output of 2nd instruction is the same as an input to 1st instruction - is this intentional ?'
9540 This message is only produced if warnings for explicit parallel
9541 conflicts have been enabled. It indicates that the assembler has
9542 encountered a parallel instruction in which the destination
9543 register of the right hand instruction is used as an input
9544 register in the left hand instruction. For example in this code
9545 fragment `mv r1, r2 || neg r2, r3' register r2 is the destination
9546 of the neg instruction and the input to the move instruction.
9548 `instruction `...' is for the M32RX only'
9549 This message is produced when the assembler encounters an
9550 instruction which is only supported by the M32Rx processor, and
9551 the `-m32rx' command line flag has not been specified to allow
9552 assembly of such instructions.
9554 `unknown instruction `...''
9555 This message is produced when the assembler encounters an
9556 instruction which it does not recognise.
9558 `only the NOP instruction can be issued in parallel on the m32r'
9559 This message is produced when the assembler encounters a parallel
9560 instruction which does not involve a NOP instruction and the
9561 `-m32rx' command line flag has not been specified. Only the M32Rx
9562 processor is able to execute two instructions in parallel.
9564 `instruction `...' cannot be executed in parallel.'
9565 This message is produced when the assembler encounters a parallel
9566 instruction which is made up of one or two instructions which
9567 cannot be executed in parallel.
9569 `Instructions share the same execution pipeline'
9570 This message is produced when the assembler encounters a parallel
9571 instruction whoes components both use the same execution pipeline.
9573 `Instructions write to the same destination register.'
9574 This message is produced when the assembler encounters a parallel
9575 instruction where both components attempt to modify the same
9576 register. For example these code fragments will produce this
9577 message: `mv r1, r2 || neg r1, r3' `jl r0 || mv r14, r1' `st r2,
9578 @-r1 || mv r1, r3' `mv r1, r2 || ld r0, @r1+' `cmp r1, r2 || addx
9579 r3, r4' (Both write to the condition bit)
9582 File: as.info, Node: M68K-Dependent, Next: M68HC11-Dependent, Prev: M32R-Dependent, Up: Machine Dependencies
9584 M680x0 Dependent Features
9585 =========================
9589 * M68K-Opts:: M680x0 Options
9590 * M68K-Syntax:: Syntax
9591 * M68K-Moto-Syntax:: Motorola Syntax
9592 * M68K-Float:: Floating Point
9593 * M68K-Directives:: 680x0 Machine Directives
9594 * M68K-opcodes:: Opcodes
9597 File: as.info, Node: M68K-Opts, Next: M68K-Syntax, Up: M68K-Dependent
9602 The Motorola 680x0 version of `as' has a few machine dependent
9606 You can use the `-l' option to shorten the size of references to
9607 undefined symbols. If you do not use the `-l' option, references
9608 to undefined symbols are wide enough for a full `long' (32 bits).
9609 (Since `as' cannot know where these symbols end up, `as' can only
9610 allocate space for the linker to fill in later. Since `as' does
9611 not know how far away these symbols are, it allocates as much
9612 space as it can.) If you use this option, the references are only
9613 one word wide (16 bits). This may be useful if you want the
9614 object file to be as small as possible, and you know that the
9615 relevant symbols are always less than 17 bits away.
9617 `--register-prefix-optional'
9618 For some configurations, especially those where the compiler
9619 normally does not prepend an underscore to the names of user
9620 variables, the assembler requires a `%' before any use of a
9621 register name. This is intended to let the assembler distinguish
9622 between C variables and functions named `a0' through `a7', and so
9623 on. The `%' is always accepted, but is not required for certain
9624 configurations, notably `sun3'. The `--register-prefix-optional'
9625 option may be used to permit omitting the `%' even for
9626 configurations for which it is normally required. If this is
9627 done, it will generally be impossible to refer to C variables and
9628 functions with the same names as register names.
9631 Normally the character `|' is treated as a comment character, which
9632 means that it can not be used in expressions. The `--bitwise-or'
9633 option turns `|' into a normal character. In this mode, you must
9634 either use C style comments, or start comments with a `#' character
9635 at the beginning of a line.
9637 `--base-size-default-16 --base-size-default-32'
9638 If you use an addressing mode with a base register without
9639 specifying the size, `as' will normally use the full 32 bit value.
9640 For example, the addressing mode `%a0@(%d0)' is equivalent to
9641 `%a0@(%d0:l)'. You may use the `--base-size-default-16' option to
9642 tell `as' to default to using the 16 bit value. In this case,
9643 `%a0@(%d0)' is equivalent to `%a0@(%d0:w)'. You may use the
9644 `--base-size-default-32' option to restore the default behaviour.
9646 `--disp-size-default-16 --disp-size-default-32'
9647 If you use an addressing mode with a displacement, and the value
9648 of the displacement is not known, `as' will normally assume that
9649 the value is 32 bits. For example, if the symbol `disp' has not
9650 been defined, `as' will assemble the addressing mode
9651 `%a0@(disp,%d0)' as though `disp' is a 32 bit value. You may use
9652 the `--disp-size-default-16' option to tell `as' to instead assume
9653 that the displacement is 16 bits. In this case, `as' will
9654 assemble `%a0@(disp,%d0)' as though `disp' is a 16 bit value. You
9655 may use the `--disp-size-default-32' option to restore the default
9659 Always keep branches PC-relative. In the M680x0 architecture all
9660 branches are defined as PC-relative. However, on some processors
9661 they are limited to word displacements maximum. When `as' needs a
9662 long branch that is not available, it normally emits an absolute
9663 jump instead. This option disables this substitution. When this
9664 option is given and no long branches are available, only word
9665 branches will be emitted. An error message will be generated if a
9666 word branch cannot reach its target. This option has no effect on
9667 68020 and other processors that have long branches. *note Branch
9668 Improvement: M68K-Branch..
9671 `as' can assemble code for several different members of the
9672 Motorola 680x0 family. The default depends upon how `as' was
9673 configured when it was built; normally, the default is to assemble
9674 code for the 68020 microprocessor. The following options may be
9675 used to change the default. These options control which
9676 instructions and addressing modes are permitted. The members of
9677 the 680x0 family are very similar. For detailed information about
9678 the differences, see the Motorola manuals.
9690 Assemble for the 68000. `-m68008', `-m68302', and so on are
9691 synonyms for `-m68000', since the chips are the same from the
9692 point of view of the assembler.
9695 Assemble for the 68010.
9699 Assemble for the 68020. This is normally the default.
9703 Assemble for the 68030.
9707 Assemble for the 68040.
9711 Assemble for the 68060.
9724 Assemble for the CPU32 family of chips.
9753 Assemble for the ColdFire family of chips.
9757 Assemble 68881 floating point instructions. This is the
9758 default for the 68020, 68030, and the CPU32. The 68040 and
9759 68060 always support floating point instructions.
9762 Do not assemble 68881 floating point instructions. This is
9763 the default for 68000 and the 68010. The 68040 and 68060
9764 always support floating point instructions, even if this
9768 Assemble 68851 MMU instructions. This is the default for the
9769 68020, 68030, and 68060. The 68040 accepts a somewhat
9770 different set of MMU instructions; `-m68851' and `-m68040'
9771 should not be used together.
9774 Do not assemble 68851 MMU instructions. This is the default
9775 for the 68000, 68010, and the CPU32. The 68040 accepts a
9776 somewhat different set of MMU instructions.
9779 File: as.info, Node: M68K-Syntax, Next: M68K-Moto-Syntax, Prev: M68K-Opts, Up: M68K-Dependent
9784 This syntax for the Motorola 680x0 was developed at MIT.
9786 The 680x0 version of `as' uses instructions names and syntax
9787 compatible with the Sun assembler. Intervening periods are ignored;
9788 for example, `movl' is equivalent to `mov.l'.
9790 In the following table APC stands for any of the address registers
9791 (`%a0' through `%a7'), the program counter (`%pc'), the zero-address
9792 relative to the program counter (`%zpc'), a suppressed address register
9793 (`%za0' through `%za7'), or it may be omitted entirely. The use of
9794 SIZE means one of `w' or `l', and it may be omitted, along with the
9795 leading colon, unless a scale is also specified. The use of SCALE
9796 means one of `1', `2', `4', or `8', and it may always be omitted along
9797 with the leading colon.
9799 The following addressing modes are understood:
9808 `%a7' is also known as `%sp', i.e. the Stack Pointer. `%a6' is
9809 also known as `%fp', the Frame Pointer.
9811 "Address Register Indirect"
9812 `%a0@' through `%a7@'
9814 "Address Register Postincrement"
9815 `%a0@+' through `%a7@+'
9817 "Address Register Predecrement"
9818 `%a0@-' through `%a7@-'
9820 "Indirect Plus Offset"
9824 `APC@(NUMBER,REGISTER:SIZE:SCALE)'
9826 The NUMBER may be omitted.
9829 `APC@(NUMBER)@(ONUMBER,REGISTER:SIZE:SCALE)'
9831 The ONUMBER or the REGISTER, but not both, may be omitted.
9834 `APC@(NUMBER,REGISTER:SIZE:SCALE)@(ONUMBER)'
9836 The NUMBER may be omitted. Omitting the REGISTER produces the
9837 Postindex addressing mode.
9840 `SYMBOL', or `DIGITS', optionally followed by `:b', `:w', or `:l'.
9843 File: as.info, Node: M68K-Moto-Syntax, Next: M68K-Float, Prev: M68K-Syntax, Up: M68K-Dependent
9848 The standard Motorola syntax for this chip differs from the syntax
9849 already discussed (*note Syntax: M68K-Syntax.). `as' can accept
9850 Motorola syntax for operands, even if MIT syntax is used for other
9851 operands in the same instruction. The two kinds of syntax are fully
9854 In the following table APC stands for any of the address registers
9855 (`%a0' through `%a7'), the program counter (`%pc'), the zero-address
9856 relative to the program counter (`%zpc'), or a suppressed address
9857 register (`%za0' through `%za7'). The use of SIZE means one of `w' or
9858 `l', and it may always be omitted along with the leading dot. The use
9859 of SCALE means one of `1', `2', `4', or `8', and it may always be
9860 omitted along with the leading asterisk.
9862 The following additional addressing modes are understood:
9864 "Address Register Indirect"
9865 `(%a0)' through `(%a7)'
9866 `%a7' is also known as `%sp', i.e. the Stack Pointer. `%a6' is
9867 also known as `%fp', the Frame Pointer.
9869 "Address Register Postincrement"
9870 `(%a0)+' through `(%a7)+'
9872 "Address Register Predecrement"
9873 `-(%a0)' through `-(%a7)'
9875 "Indirect Plus Offset"
9876 `NUMBER(%A0)' through `NUMBER(%A7)', or `NUMBER(%PC)'.
9878 The NUMBER may also appear within the parentheses, as in
9879 `(NUMBER,%A0)'. When used with the PC, the NUMBER may be omitted
9880 (with an address register, omitting the NUMBER produces Address
9881 Register Indirect mode).
9884 `NUMBER(APC,REGISTER.SIZE*SCALE)'
9886 The NUMBER may be omitted, or it may appear within the
9887 parentheses. The APC may be omitted. The REGISTER and the APC
9888 may appear in either order. If both APC and REGISTER are address
9889 registers, and the SIZE and SCALE are omitted, then the first
9890 register is taken as the base register, and the second as the
9894 `([NUMBER,APC],REGISTER.SIZE*SCALE,ONUMBER)'
9896 The ONUMBER, or the REGISTER, or both, may be omitted. Either the
9897 NUMBER or the APC may be omitted, but not both.
9900 `([NUMBER,APC,REGISTER.SIZE*SCALE],ONUMBER)'
9902 The NUMBER, or the APC, or the REGISTER, or any two of them, may
9903 be omitted. The ONUMBER may be omitted. The REGISTER and the APC
9904 may appear in either order. If both APC and REGISTER are address
9905 registers, and the SIZE and SCALE are omitted, then the first
9906 register is taken as the base register, and the second as the
9910 File: as.info, Node: M68K-Float, Next: M68K-Directives, Prev: M68K-Moto-Syntax, Up: M68K-Dependent
9915 Packed decimal (P) format floating literals are not supported. Feel
9916 free to add the code!
9918 The floating point formats generated by directives are these.
9921 `Single' precision floating point constants.
9924 `Double' precision floating point constants.
9928 `Extended' precision (`long double') floating point constants.
9931 File: as.info, Node: M68K-Directives, Next: M68K-opcodes, Prev: M68K-Float, Up: M68K-Dependent
9933 680x0 Machine Directives
9934 ------------------------
9936 In order to be compatible with the Sun assembler the 680x0 assembler
9937 understands the following directives.
9940 This directive is identical to a `.data 1' directive.
9943 This directive is identical to a `.data 2' directive.
9946 This directive is a special case of the `.align' directive; it
9947 aligns the output to an even byte boundary.
9950 This directive is identical to a `.space' directive.
9953 File: as.info, Node: M68K-opcodes, Prev: M68K-Directives, Up: M68K-Dependent
9960 * M68K-Branch:: Branch Improvement
9961 * M68K-Chars:: Special Characters
9964 File: as.info, Node: M68K-Branch, Next: M68K-Chars, Up: M68K-opcodes
9969 Certain pseudo opcodes are permitted for branch instructions. They
9970 expand to the shortest branch instruction that reach the target.
9971 Generally these mnemonics are made by substituting `j' for `b' at the
9972 start of a Motorola mnemonic.
9974 The following table summarizes the pseudo-operations. A `*' flags
9975 cases that are more fully described after the table:
9978 +------------------------------------------------------------
9979 | 68020 68000/10, not PC-relative OK
9980 Pseudo-Op |BYTE WORD LONG ABSOLUTE LONG JUMP **
9981 +------------------------------------------------------------
9982 jbsr |bsrs bsrw bsrl jsr
9983 jra |bras braw bral jmp
9984 * jXX |bXXs bXXw bXXl bNXs;jmp
9985 * dbXX | N/A dbXXw dbXX;bras;bral dbXX;bras;jmp
9986 fjXX | N/A fbXXw fbXXl N/A
9989 NX: negative of condition XX
9990 `*'--see full description below
9991 `**'--this expansion mode is disallowed by `--pcrel'
9994 These are the simplest jump pseudo-operations; they always map to
9995 one particular machine instruction, depending on the displacement
9996 to the branch target. This instruction will be a byte or word
9997 branch is that is sufficient. Otherwise, a long branch will be
9998 emitted if available. If no long branches are available and the
9999 `--pcrel' option is not given, an absolute long jump will be
10000 emitted instead. If no long branches are available, the `--pcrel'
10001 option is given, and a word branch cannot reach the target, an
10002 error message is generated.
10004 In addition to standard branch operands, `as' allows these
10005 pseudo-operations to have all operands that are allowed for jsr
10006 and jmp, substituting these instructions if the operand given is
10007 not valid for a branch instruction.
10010 Here, `jXX' stands for an entire family of pseudo-operations,
10011 where XX is a conditional branch or condition-code test. The full
10012 list of pseudo-ops in this family is:
10013 jhi jls jcc jcs jne jeq jvc
10014 jvs jpl jmi jge jlt jgt jle
10016 Usually, each of these pseudo-operations expands to a single branch
10017 instruction. However, if a word branch is not sufficient, no long
10018 branches are available, and the `--pcrel' option is not given, `as'
10019 issues a longer code fragment in terms of NX, the opposite
10020 condition to XX. For example, under these conditions:
10028 The full family of pseudo-operations covered here is
10029 dbhi dbls dbcc dbcs dbne dbeq dbvc
10030 dbvs dbpl dbmi dbge dblt dbgt dble
10033 Motorola `dbXX' instructions allow word displacements only. When
10034 a word displacement is sufficient, each of these pseudo-operations
10035 expands to the corresponding Motorola instruction. When a word
10036 displacement is not sufficient and long branches are available,
10037 when the source reads `dbXX foo', `as' emits
10043 If, however, long branches are not available and the `--pcrel'
10044 option is not given, `as' emits
10051 This family includes
10052 fjne fjeq fjge fjlt fjgt fjle fjf
10053 fjt fjgl fjgle fjnge fjngl fjngle fjngt
10054 fjnle fjnlt fjoge fjogl fjogt fjole fjolt
10055 fjor fjseq fjsf fjsne fjst fjueq fjuge
10056 fjugt fjule fjult fjun
10058 Each of these pseudo-operations always expands to a single Motorola
10059 coprocessor branch instruction, word or long. All Motorola
10060 coprocessor branch instructions allow both word and long
10064 File: as.info, Node: M68K-Chars, Prev: M68K-Branch, Up: M68K-opcodes
10069 The immediate character is `#' for Sun compatibility. The line-comment
10070 character is `|' (unless the `--bitwise-or' option is used). If a `#'
10071 appears at the beginning of a line, it is treated as a comment unless
10072 it looks like `# line file', in which case it is treated normally.
10075 File: as.info, Node: M68HC11-Dependent, Next: MIPS-Dependent, Prev: M68K-Dependent, Up: Machine Dependencies
10077 M68HC11 and M68HC12 Dependent Features
10078 ======================================
10082 * M68HC11-Opts:: M68HC11 and M68HC12 Options
10083 * M68HC11-Syntax:: Syntax
10084 * M68HC11-Modifiers:: Symbolic Operand Modifiers
10085 * M68HC11-Directives:: Assembler Directives
10086 * M68HC11-Float:: Floating Point
10087 * M68HC11-opcodes:: Opcodes
10090 File: as.info, Node: M68HC11-Opts, Next: M68HC11-Syntax, Up: M68HC11-Dependent
10092 M68HC11 and M68HC12 Options
10093 ---------------------------
10095 The Motorola 68HC11 and 68HC12 version of `as' have a few machine
10099 This option switches the assembler in the M68HC11 mode. In this
10100 mode, the assembler only accepts 68HC11 operands and mnemonics. It
10101 produces code for the 68HC11.
10104 This option switches the assembler in the M68HC12 mode. In this
10105 mode, the assembler also accepts 68HC12 operands and mnemonics. It
10106 produces code for the 68HC12. A few 68HC11 instructions are
10107 replaced by some 68HC12 instructions as recommended by Motorola
10111 This option switches the assembler in the M68HCS12 mode. This
10112 mode is similar to `-m68hc12' but specifies to assemble for the
10113 68HCS12 series. The only difference is on the assembling of the
10114 `movb' and `movw' instruction when a PC-relative operand is used.
10117 This option controls the ABI and indicates to use a 16-bit integer
10118 ABI. It has no effect on the assembled instructions. This is the
10122 This option controls the ABI and indicates to use a 32-bit integer
10126 This option controls the ABI and indicates to use a 32-bit float
10127 ABI. This is the default.
10130 This option controls the ABI and indicates to use a 64-bit float
10133 `--strict-direct-mode'
10134 You can use the `--strict-direct-mode' option to disable the
10135 automatic translation of direct page mode addressing into extended
10136 mode when the instruction does not support direct mode. For
10137 example, the `clr' instruction does not support direct page mode
10138 addressing. When it is used with the direct page mode, `as' will
10139 ignore it and generate an absolute addressing. This option
10140 prevents `as' from doing this, and the wrong usage of the direct
10141 page mode will raise an error.
10144 The `--short-branchs' option turns off the translation of relative
10145 branches into absolute branches when the branch offset is out of
10146 range. By default `as' transforms the relative branch (`bsr',
10147 `bgt', `bge', `beq', `bne', `ble', `blt', `bhi', `bcc', `bls',
10148 `bcs', `bmi', `bvs', `bvs', `bra') into an absolute branch when
10149 the offset is out of the -128 .. 127 range. In that case, the
10150 `bsr' instruction is translated into a `jsr', the `bra'
10151 instruction is translated into a `jmp' and the conditional branchs
10152 instructions are inverted and followed by a `jmp'. This option
10153 disables these translations and `as' will generate an error if a
10154 relative branch is out of range. This option does not affect the
10155 optimization associated to the `jbra', `jbsr' and `jbXX' pseudo
10158 `--force-long-branchs'
10159 The `--force-long-branchs' option forces the translation of
10160 relative branches into absolute branches. This option does not
10161 affect the optimization associated to the `jbra', `jbsr' and
10162 `jbXX' pseudo opcodes.
10164 `--print-insn-syntax'
10165 You can use the `--print-insn-syntax' option to obtain the syntax
10166 description of the instruction when an error is detected.
10169 The `--print-opcodes' option prints the list of all the
10170 instructions with their syntax. The first item of each line
10171 represents the instruction name and the rest of the line indicates
10172 the possible operands for that instruction. The list is printed in
10173 alphabetical order. Once the list is printed `as' exits.
10175 `--generate-example'
10176 The `--generate-example' option is similar to `--print-opcodes'
10177 but it generates an example for each instruction instead.
10180 File: as.info, Node: M68HC11-Syntax, Next: M68HC11-Modifiers, Prev: M68HC11-Opts, Up: M68HC11-Dependent
10185 In the M68HC11 syntax, the instruction name comes first and it may
10186 be followed by one or several operands (up to three). Operands are
10187 separated by comma (`,'). In the normal mode, `as' will complain if too
10188 many operands are specified for a given instruction. In the MRI mode
10189 (turned on with `-M' option), it will treat them as comments. Example:
10196 The following addressing modes are understood for 68HC11 and 68HC12:
10201 `NUMBER,X', `NUMBER,Y'
10203 The NUMBER may be omitted in which case 0 is assumed.
10205 "Direct Addressing mode"
10206 `*SYMBOL', or `*DIGITS'
10209 `SYMBOL', or `DIGITS'
10211 The M68HC12 has other more complex addressing modes. All of them are
10212 supported and they are represented below:
10214 "Constant Offset Indexed Addressing Mode"
10217 The NUMBER may be omitted in which case 0 is assumed. The
10218 register can be either `X', `Y', `SP' or `PC'. The assembler will
10219 use the smaller post-byte definition according to the constant
10220 value (5-bit constant offset, 9-bit constant offset or 16-bit
10221 constant offset). If the constant is not known by the assembler
10222 it will use the 16-bit constant offset post-byte and the value
10223 will be resolved at link time.
10225 "Offset Indexed Indirect"
10228 The register can be either `X', `Y', `SP' or `PC'.
10230 "Auto Pre-Increment/Pre-Decrement/Post-Increment/Post-Decrement"
10231 `NUMBER,-REG' `NUMBER,+REG' `NUMBER,REG-' `NUMBER,REG+'
10233 The number must be in the range `-8'..`+8' and must not be 0. The
10234 register can be either `X', `Y', `SP' or `PC'.
10236 "Accumulator Offset"
10239 The accumulator register can be either `A', `B' or `D'. The
10240 register can be either `X', `Y', `SP' or `PC'.
10242 "Accumulator D offset indexed-indirect"
10245 The register can be either `X', `Y', `SP' or `PC'.
10257 File: as.info, Node: M68HC11-Modifiers, Next: M68HC11-Directives, Prev: M68HC11-Syntax, Up: M68HC11-Dependent
10259 Symbolic Operand Modifiers
10260 --------------------------
10262 The assembler supports several modifiers when using symbol addresses
10263 in 68HC11 and 68HC12 instruction operands. The general syntax is the
10269 This modifier indicates to the assembler and linker to use the
10270 16-bit physical address corresponding to the symbol. This is
10271 intended to be used on memory window systems to map a symbol in
10272 the memory bank window. If the symbol is in a memory expansion
10273 part, the physical address corresponds to the symbol address
10274 within the memory bank window. If the symbol is not in a memory
10275 expansion part, this is the symbol address (using or not using the
10276 %addr modifier has no effect in that case).
10279 This modifier indicates to use the memory page number corresponding
10280 to the symbol. If the symbol is in a memory expansion part, its
10281 page number is computed by the linker as a number used to map the
10282 page containing the symbol in the memory bank window. If the
10283 symbol is not in a memory expansion part, the page number is 0.
10286 This modifier indicates to use the 8-bit high part of the physical
10287 address of the symbol.
10290 This modifier indicates to use the 8-bit low part of the physical
10291 address of the symbol.
10293 For example a 68HC12 call to a function `foo_example' stored in
10294 memory expansion part could be written as follows:
10296 call %addr(foo_example),%page(foo_example)
10298 and this is equivalent to
10302 And for 68HC11 it could be written as follows:
10304 ldab #%page(foo_example)
10306 jsr %addr(foo_example)
10309 File: as.info, Node: M68HC11-Directives, Next: M68HC11-Float, Prev: M68HC11-Modifiers, Up: M68HC11-Dependent
10311 Assembler Directives
10312 --------------------
10314 The 68HC11 and 68HC12 version of `as' have the following specific
10315 assembler directives:
10318 The relax directive is used by the `GNU Compiler' to emit a
10319 specific relocation to mark a group of instructions for linker
10320 relaxation. The sequence of instructions within the group must be
10321 known to the linker so that relaxation can be performed.
10323 `.mode [mshort|mlong|mshort-double|mlong-double]'
10324 This directive specifies the ABI. It overrides the `-mshort',
10325 `-mlong', `-mshort-double' and `-mlong-double' options.
10328 This directive marks the symbol as a `far' symbol meaning that it
10329 uses a `call/rtc' calling convention as opposed to `jsr/rts'.
10330 During a final link, the linker will identify references to the
10331 `far' symbol and will verify the proper calling convention.
10333 `.interrupt SYMBOL'
10334 This directive marks the symbol as an interrupt entry point. This
10335 information is then used by the debugger to correctly unwind the
10336 frame across interrupts.
10339 This directive is defined for compatibility with the
10340 `Specification for Motorola 8 and 16-Bit Assembly Language Input
10341 Standard' and is ignored.
10344 File: as.info, Node: M68HC11-Float, Next: M68HC11-opcodes, Prev: M68HC11-Directives, Up: M68HC11-Dependent
10349 Packed decimal (P) format floating literals are not supported. Feel
10350 free to add the code!
10352 The floating point formats generated by directives are these.
10355 `Single' precision floating point constants.
10358 `Double' precision floating point constants.
10362 `Extended' precision (`long double') floating point constants.
10365 File: as.info, Node: M68HC11-opcodes, Prev: M68HC11-Float, Up: M68HC11-Dependent
10372 * M68HC11-Branch:: Branch Improvement
10375 File: as.info, Node: M68HC11-Branch, Up: M68HC11-opcodes
10380 Certain pseudo opcodes are permitted for branch instructions. They
10381 expand to the shortest branch instruction that reach the target.
10382 Generally these mnemonics are made by prepending `j' to the start of
10383 Motorola mnemonic. These pseudo opcodes are not affected by the
10384 `--short-branchs' or `--force-long-branchs' options.
10386 The following table summarizes the pseudo-operations.
10389 +-------------------------------------------------------------+
10391 | --short-branchs --force-long-branchs |
10392 +--------------------------+----------------------------------+
10393 Op |BYTE WORD | BYTE WORD |
10394 +--------------------------+----------------------------------+
10395 bsr | bsr <pc-rel> <error> | jsr <abs> |
10396 bra | bra <pc-rel> <error> | jmp <abs> |
10397 jbsr | bsr <pc-rel> jsr <abs> | bsr <pc-rel> jsr <abs> |
10398 jbra | bra <pc-rel> jmp <abs> | bra <pc-rel> jmp <abs> |
10399 bXX | bXX <pc-rel> <error> | bNX +3; jmp <abs> |
10400 jbXX | bXX <pc-rel> bNX +3; | bXX <pc-rel> bNX +3; jmp <abs> |
10402 +--------------------------+----------------------------------+
10404 NX: negative of condition XX
10408 These are the simplest jump pseudo-operations; they always map to
10409 one particular machine instruction, depending on the displacement
10410 to the branch target.
10413 Here, `jbXX' stands for an entire family of pseudo-operations,
10414 where XX is a conditional branch or condition-code test. The full
10415 list of pseudo-ops in this family is:
10416 jbcc jbeq jbge jbgt jbhi jbvs jbpl jblo
10417 jbcs jbne jblt jble jbls jbvc jbmi
10419 For the cases of non-PC relative displacements and long
10420 displacements, `as' issues a longer code fragment in terms of NX,
10421 the opposite condition to XX. For example, for the non-PC
10430 File: as.info, Node: MIPS-Dependent, Next: MMIX-Dependent, Prev: M68HC11-Dependent, Up: Machine Dependencies
10432 MIPS Dependent Features
10433 =======================
10435 GNU `as' for MIPS architectures supports several different MIPS
10436 processors, and MIPS ISA levels I through V, MIPS32, and MIPS64. For
10437 information about the MIPS instruction set, see `MIPS RISC
10438 Architecture', by Kane and Heindrich (Prentice-Hall). For an overview
10439 of MIPS assembly conventions, see "Appendix D: Assembly Language
10440 Programming" in the same work.
10444 * MIPS Opts:: Assembler options
10445 * MIPS Object:: ECOFF object code
10446 * MIPS Stabs:: Directives for debugging information
10447 * MIPS ISA:: Directives to override the ISA level
10448 * MIPS symbol sizes:: Directives to override the size of symbols
10449 * MIPS autoextend:: Directives for extending MIPS 16 bit instructions
10450 * MIPS insn:: Directive to mark data as an instruction
10451 * MIPS option stack:: Directives to save and restore options
10452 * MIPS ASE instruction generation overrides:: Directives to control
10453 generation of MIPS ASE instructions
10456 File: as.info, Node: MIPS Opts, Next: MIPS Object, Up: MIPS-Dependent
10461 The MIPS configurations of GNU `as' support these special options:
10464 This option sets the largest size of an object that can be
10465 referenced implicitly with the `gp' register. It is only accepted
10466 for targets that use ECOFF format. The default value is 8.
10470 Any MIPS configuration of `as' can select big-endian or
10471 little-endian output at run time (unlike the other GNU development
10472 tools, which must be configured for one or the other). Use `-EB'
10473 to select big-endian output, and `-EL' for little-endian.
10484 Generate code for a particular MIPS Instruction Set Architecture
10485 level. `-mips1' corresponds to the R2000 and R3000 processors,
10486 `-mips2' to the R6000 processor, `-mips3' to the R4000 processor,
10487 and `-mips4' to the R8000 and R10000 processors. `-mips5',
10488 `-mips32', `-mips32r2', `-mips64', and `-mips64r2' correspond to
10489 generic MIPS V, MIPS32, MIPS32 RELEASE 2, MIPS64, and MIPS64
10490 RELEASE 2 ISA processors, respectively. You can also switch
10491 instruction sets during the assembly; see *Note Directives to
10492 override the ISA level: MIPS ISA.
10496 Some macros have different expansions for 32-bit and 64-bit
10497 registers. The register sizes are normally inferred from the ISA
10498 and ABI, but these flags force a certain group of registers to be
10499 treated as 32 bits wide at all times. `-mgp32' controls the size
10500 of general-purpose registers and `-mfp32' controls the size of
10501 floating-point registers.
10503 On some MIPS variants there is a 32-bit mode flag; when this flag
10504 is set, 64-bit instructions generate a trap. Also, some 32-bit
10505 OSes only save the 32-bit registers on a context switch, so it is
10506 essential never to use the 64-bit registers.
10509 Assume that 64-bit general purpose registers are available. This
10510 is provided in the interests of symmetry with -gp32.
10514 Generate code for the MIPS 16 processor. This is equivalent to
10515 putting `.set mips16' at the start of the assembly file.
10516 `-no-mips16' turns off this option.
10520 Generate code for the MIPS-3D Application Specific Extension.
10521 This tells the assembler to accept MIPS-3D instructions.
10522 `-no-mips3d' turns off this option.
10526 Generate code for the MDMX Application Specific Extension. This
10527 tells the assembler to accept MDMX instructions. `-no-mdmx' turns
10532 Generate code for the DSP Application Specific Extension. This
10533 tells the assembler to accept DSP instructions. `-mno-dsp' turns
10538 Generate code for the MT Application Specific Extension. This
10539 tells the assembler to accept MT instructions. `-mno-mt' turns
10544 Cause nops to be inserted if the read of the destination register
10545 of an mfhi or mflo instruction occurs in the following two
10550 Insert nops to work around certain VR4120 errata. This option is
10551 intended to be used on GCC-generated code: it is not designed to
10552 catch all problems in hand-written assembler code.
10556 Insert nops to work around the VR4130 `mflo'/`mfhi' errata.
10560 Generate code for the LSI R4010 chip. This tells the assembler to
10561 accept the R4010 specific instructions (`addciu', `ffc', etc.),
10562 and to not schedule `nop' instructions around accesses to the `HI'
10563 and `LO' registers. `-no-m4010' turns off this option.
10567 Generate code for the MIPS R4650 chip. This tells the assembler
10568 to accept the `mad' and `madu' instruction, and to not schedule
10569 `nop' instructions around accesses to the `HI' and `LO' registers.
10570 `-no-m4650' turns off this option.
10576 For each option `-mNNNN', generate code for the MIPS RNNNN chip.
10577 This tells the assembler to accept instructions specific to that
10578 chip, and to schedule for that chip's hazards.
10581 Generate code for a particular MIPS cpu. It is exactly equivalent
10582 to `-mCPU', except that there are more value of CPU understood.
10583 Valid CPU value are:
10585 2000, 3000, 3900, 4000, 4010, 4100, 4111, vr4120, vr4130,
10586 vr4181, 4300, 4400, 4600, 4650, 5000, rm5200, rm5230, rm5231,
10587 rm5261, rm5721, vr5400, vr5500, 6000, rm7000, 8000, rm9000,
10588 10000, 12000, mips32-4k, sb1
10591 Schedule and tune for a particular MIPS cpu. Valid CPU values are
10592 identical to `-march=CPU'.
10595 Record which ABI the source code uses. The recognized arguments
10596 are: `32', `n32', `o64', `64' and `eabi'.
10600 Equivalent to adding `.set sym32' or `.set nosym32' to the
10601 beginning of the assembler input. *Note MIPS symbol sizes::.
10604 This option is ignored. It is accepted for command-line
10605 compatibility with other assemblers, which use it to turn off C
10606 style preprocessing. With GNU `as', there is no need for
10607 `-nocpp', because the GNU assembler itself never runs the C
10610 `--construct-floats'
10611 `--no-construct-floats'
10612 The `--no-construct-floats' option disables the construction of
10613 double width floating point constants by loading the two halves of
10614 the value into the two single width floating point registers that
10615 make up the double width register. This feature is useful if the
10616 processor support the FR bit in its status register, and this bit
10617 is known (by the programmer) to be set. This bit prevents the
10618 aliasing of the double width register by the single width
10621 By default `--construct-floats' is selected, allowing construction
10622 of these floating point constants.
10626 `as' automatically macro expands certain division and
10627 multiplication instructions to check for overflow and division by
10628 zero. This option causes `as' to generate code to take a trap
10629 exception rather than a break exception when an error is detected.
10630 The trap instructions are only supported at Instruction Set
10631 Architecture level 2 and higher.
10635 Generate code to take a break exception rather than a trap
10636 exception when an error is detected. This is the default.
10640 Control generation of `.pdr' sections. Off by default on IRIX, on
10645 When generating code using the Unix calling conventions (selected
10646 by `-KPIC' or `-mcall_shared'), gas will normally generate code
10647 which can go into a shared library. The `-mno-shared' option
10648 tells gas to generate code which uses the calling convention, but
10649 can not go into a shared library. The resulting code is slightly
10650 more efficient. This option only affects the handling of the
10651 `.cpload' and `.cpsetup' pseudo-ops.
10654 File: as.info, Node: MIPS Object, Next: MIPS Stabs, Prev: MIPS Opts, Up: MIPS-Dependent
10656 MIPS ECOFF object code
10657 ----------------------
10659 Assembling for a MIPS ECOFF target supports some additional sections
10660 besides the usual `.text', `.data' and `.bss'. The additional sections
10661 are `.rdata', used for read-only data, `.sdata', used for small data,
10662 and `.sbss', used for small common objects.
10664 When assembling for ECOFF, the assembler uses the `$gp' (`$28')
10665 register to form the address of a "small object". Any object in the
10666 `.sdata' or `.sbss' sections is considered "small" in this sense. For
10667 external objects, or for objects in the `.bss' section, you can use the
10668 `gcc' `-G' option to control the size of objects addressed via `$gp';
10669 the default value is 8, meaning that a reference to any object eight
10670 bytes or smaller uses `$gp'. Passing `-G 0' to `as' prevents it from
10671 using the `$gp' register on the basis of object size (but the assembler
10672 uses `$gp' for objects in `.sdata' or `sbss' in any case). The size of
10673 an object in the `.bss' section is set by the `.comm' or `.lcomm'
10674 directive that defines it. The size of an external object may be set
10675 with the `.extern' directive. For example, `.extern sym,4' declares
10676 that the object at `sym' is 4 bytes in length, whie leaving `sym'
10677 otherwise undefined.
10679 Using small ECOFF objects requires linker support, and assumes that
10680 the `$gp' register is correctly initialized (normally done
10681 automatically by the startup code). MIPS ECOFF assembly code must not
10682 modify the `$gp' register.
10685 File: as.info, Node: MIPS Stabs, Next: MIPS ISA, Prev: MIPS Object, Up: MIPS-Dependent
10687 Directives for debugging information
10688 ------------------------------------
10690 MIPS ECOFF `as' supports several directives used for generating
10691 debugging information which are not support by traditional MIPS
10692 assemblers. These are `.def', `.endef', `.dim', `.file', `.scl',
10693 `.size', `.tag', `.type', `.val', `.stabd', `.stabn', and `.stabs'.
10694 The debugging information generated by the three `.stab' directives can
10695 only be read by GDB, not by traditional MIPS debuggers (this
10696 enhancement is required to fully support C++ debugging). These
10697 directives are primarily used by compilers, not assembly language
10701 File: as.info, Node: MIPS symbol sizes, Next: MIPS autoextend, Prev: MIPS ISA, Up: MIPS-Dependent
10703 Directives to override the size of symbols
10704 ------------------------------------------
10706 The n64 ABI allows symbols to have any 64-bit value. Although this
10707 provides a great deal of flexibility, it means that some macros have
10708 much longer expansions than their 32-bit counterparts. For example,
10709 the non-PIC expansion of `dla $4,sym' is usually:
10711 lui $4,%highest(sym)
10713 daddiu $4,$4,%higher(sym)
10714 daddiu $1,$1,%lo(sym)
10718 whereas the 32-bit expansion is simply:
10721 daddiu $4,$4,%lo(sym)
10723 n64 code is sometimes constructed in such a way that all symbolic
10724 constants are known to have 32-bit values, and in such cases, it's
10725 preferable to use the 32-bit expansion instead of the 64-bit expansion.
10727 You can use the `.set sym32' directive to tell the assembler that,
10728 from this point on, all expressions of the form `SYMBOL' or `SYMBOL +
10729 OFFSET' have 32-bit values. For example:
10734 sw $4,sym+0x8000($4)
10736 will cause the assembler to treat `sym', `sym+16' and `sym+0x8000'
10737 as 32-bit values. The handling of non-symbolic addresses is not
10740 The directive `.set nosym32' ends a `.set sym32' block and reverts
10741 to the normal behavior. It is also possible to change the symbol size
10742 using the command-line options `-msym32' and `-mno-sym32'.
10744 These options and directives are always accepted, but at present,
10745 they have no effect for anything other than n64.
10748 File: as.info, Node: MIPS ISA, Next: MIPS symbol sizes, Prev: MIPS Stabs, Up: MIPS-Dependent
10750 Directives to override the ISA level
10751 ------------------------------------
10753 GNU `as' supports an additional directive to change the MIPS
10754 Instruction Set Architecture level on the fly: `.set mipsN'. N should
10755 be a number from 0 to 5, or 32, 32r2, 64 or 64r2. The values other
10756 than 0 make the assembler accept instructions for the corresponding ISA
10757 level, from that point on in the assembly. `.set mipsN' affects not
10758 only which instructions are permitted, but also how certain macros are
10759 expanded. `.set mips0' restores the ISA level to its original level:
10760 either the level you selected with command line options, or the default
10761 for your configuration. You can use this feature to permit specific
10762 R4000 instructions while assembling in 32 bit mode. Use this directive
10765 The directive `.set mips16' puts the assembler into MIPS 16 mode, in
10766 which it will assemble instructions for the MIPS 16 processor. Use
10767 `.set nomips16' to return to normal 32 bit mode.
10769 Traditional MIPS assemblers do not support this directive.
10772 File: as.info, Node: MIPS autoextend, Next: MIPS insn, Prev: MIPS symbol sizes, Up: MIPS-Dependent
10774 Directives for extending MIPS 16 bit instructions
10775 -------------------------------------------------
10777 By default, MIPS 16 instructions are automatically extended to 32
10778 bits when necessary. The directive `.set noautoextend' will turn this
10779 off. When `.set noautoextend' is in effect, any 32 bit instruction
10780 must be explicitly extended with the `.e' modifier (e.g., `li.e
10781 $4,1000'). The directive `.set autoextend' may be used to once again
10782 automatically extend instructions when necessary.
10784 This directive is only meaningful when in MIPS 16 mode. Traditional
10785 MIPS assemblers do not support this directive.
10788 File: as.info, Node: MIPS insn, Next: MIPS option stack, Prev: MIPS autoextend, Up: MIPS-Dependent
10790 Directive to mark data as an instruction
10791 ----------------------------------------
10793 The `.insn' directive tells `as' that the following data is actually
10794 instructions. This makes a difference in MIPS 16 mode: when loading
10795 the address of a label which precedes instructions, `as' automatically
10796 adds 1 to the value, so that jumping to the loaded address will do the
10800 File: as.info, Node: MIPS option stack, Next: MIPS ASE instruction generation overrides, Prev: MIPS insn, Up: MIPS-Dependent
10802 Directives to save and restore options
10803 --------------------------------------
10805 The directives `.set push' and `.set pop' may be used to save and
10806 restore the current settings for all the options which are controlled
10807 by `.set'. The `.set push' directive saves the current settings on a
10808 stack. The `.set pop' directive pops the stack and restores the
10811 These directives can be useful inside an macro which must change an
10812 option such as the ISA level or instruction reordering but does not want
10813 to change the state of the code which invoked the macro.
10815 Traditional MIPS assemblers do not support these directives.
10818 File: as.info, Node: MIPS ASE instruction generation overrides, Prev: MIPS option stack, Up: MIPS-Dependent
10820 Directives to control generation of MIPS ASE instructions
10821 ---------------------------------------------------------
10823 The directive `.set mips3d' makes the assembler accept instructions
10824 from the MIPS-3D Application Specific Extension from that point on in
10825 the assembly. The `.set nomips3d' directive prevents MIPS-3D
10826 instructions from being accepted.
10828 The directive `.set mdmx' makes the assembler accept instructions
10829 from the MDMX Application Specific Extension from that point on in the
10830 assembly. The `.set nomdmx' directive prevents MDMX instructions from
10833 The directive `.set dsp' makes the assembler accept instructions
10834 from the DSP Application Specific Extension from that point on in the
10835 assembly. The `.set nodsp' directive prevents DSP instructions from
10838 The directive `.set mt' makes the assembler accept instructions from
10839 the MT Application Specific Extension from that point on in the
10840 assembly. The `.set nomt' directive prevents MT instructions from
10843 Traditional MIPS assemblers do not support these directives.
10846 File: as.info, Node: MMIX-Dependent, Next: MSP430-Dependent, Prev: MIPS-Dependent, Up: Machine Dependencies
10848 MMIX Dependent Features
10849 =======================
10853 * MMIX-Opts:: Command-line Options
10854 * MMIX-Expand:: Instruction expansion
10855 * MMIX-Syntax:: Syntax
10856 * MMIX-mmixal:: Differences to `mmixal' syntax and semantics
10859 File: as.info, Node: MMIX-Opts, Next: MMIX-Expand, Up: MMIX-Dependent
10861 Command-line Options
10862 --------------------
10864 The MMIX version of `as' has some machine-dependent options.
10866 When `--fixed-special-register-names' is specified, only the register
10867 names specified in *Note MMIX-Regs:: are recognized in the instructions
10870 You can use the `--globalize-symbols' to make all symbols global.
10871 This option is useful when splitting up a `mmixal' program into several
10874 The `--gnu-syntax' turns off most syntax compatibility with
10875 `mmixal'. Its usability is currently doubtful.
10877 The `--relax' option is not fully supported, but will eventually make
10878 the object file prepared for linker relaxation.
10880 If you want to avoid inadvertently calling a predefined symbol and
10881 would rather get an error, for example when using `as' with a compiler
10882 or other machine-generated code, specify `--no-predefined-syms'. This
10883 turns off built-in predefined definitions of all such symbols,
10884 including rounding-mode symbols, segment symbols, `BIT' symbols, and
10885 `TRAP' symbols used in `mmix' "system calls". It also turns off
10886 predefined special-register names, except when used in `PUT' and `GET'
10889 By default, some instructions are expanded to fit the size of the
10890 operand or an external symbol (*note MMIX-Expand::). By passing
10891 `--no-expand', no such expansion will be done, instead causing errors
10892 at link time if the operand does not fit.
10894 The `mmixal' documentation (*note mmixsite::) specifies that global
10895 registers allocated with the `GREG' directive (*note MMIX-greg::) and
10896 initialized to the same non-zero value, will refer to the same global
10897 register. This isn't strictly enforceable in `as' since the final
10898 addresses aren't known until link-time, but it will do an effort unless
10899 the `--no-merge-gregs' option is specified. (Register merging isn't
10900 yet implemented in `ld'.)
10902 `as' will warn every time it expands an instruction to fit an
10903 operand unless the option `-x' is specified. It is believed that this
10904 behaviour is more useful than just mimicking `mmixal''s behaviour, in
10905 which instructions are only expanded if the `-x' option is specified,
10906 and assembly fails otherwise, when an instruction needs to be expanded.
10907 It needs to be kept in mind that `mmixal' is both an assembler and
10908 linker, while `as' will expand instructions that at link stage can be
10909 contracted. (Though linker relaxation isn't yet implemented in `ld'.)
10910 The option `-x' also imples `--linker-allocated-gregs'.
10912 If instruction expansion is enabled, `as' can expand a `PUSHJ'
10913 instruction into a series of instructions. The shortest expansion is
10914 to not expand it, but just mark the call as redirectable to a stub,
10915 which `ld' creates at link-time, but only if the original `PUSHJ'
10916 instruction is found not to reach the target. The stub consists of the
10917 necessary instructions to form a jump to the target. This happens if
10918 `as' can assert that the `PUSHJ' instruction can reach such a stub.
10919 The option `--no-pushj-stubs' disables this shorter expansion, and the
10920 longer series of instructions is then created at assembly-time. The
10921 option `--no-stubs' is a synonym, intended for compatibility with
10922 future releases, where generation of stubs for other instructions may
10925 Usually a two-operand-expression (*note GREG-base::) without a
10926 matching `GREG' directive is treated as an error by `as'. When the
10927 option `--linker-allocated-gregs' is in effect, they are instead passed
10928 through to the linker, which will allocate as many global registers as
10932 File: as.info, Node: MMIX-Expand, Next: MMIX-Syntax, Prev: MMIX-Opts, Up: MMIX-Dependent
10934 Instruction expansion
10935 ---------------------
10937 When `as' encounters an instruction with an operand that is either
10938 not known or does not fit the operand size of the instruction, `as'
10939 (and `ld') will expand the instruction into a sequence of instructions
10940 semantically equivalent to the operand fitting the instruction.
10941 Expansion will take place for the following instructions:
10944 Expands to a sequence of four instructions: `SETL', `INCML',
10945 `INCMH' and `INCH'. The operand must be a multiple of four.
10947 Conditional branches
10948 A branch instruction is turned into a branch with the complemented
10949 condition and prediction bit over five instructions; four
10950 instructions setting `$255' to the operand value, which like with
10951 `GETA' must be a multiple of four, and a final `GO $255,$255,0'.
10954 Similar to expansion for conditional branches; four instructions
10955 set `$255' to the operand value, followed by a `PUSHGO
10959 Similar to conditional branches and `PUSHJ'. The final instruction
10960 is `GO $255,$255,0'.
10962 The linker `ld' is expected to shrink these expansions for code
10963 assembled with `--relax' (though not currently implemented).
10966 File: as.info, Node: MMIX-Syntax, Next: MMIX-mmixal, Prev: MMIX-Expand, Up: MMIX-Dependent
10971 The assembly syntax is supposed to be upward compatible with that
10972 described in Sections 1.3 and 1.4 of `The Art of Computer Programming,
10973 Volume 1'. Draft versions of those chapters as well as other MMIX
10974 information is located at
10975 <http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html>. Most code
10976 examples from the mmixal package located there should work unmodified
10977 when assembled and linked as single files, with a few noteworthy
10978 exceptions (*note MMIX-mmixal::).
10980 Before an instruction is emitted, the current location is aligned to
10981 the next four-byte boundary. If a label is defined at the beginning of
10982 the line, its value will be the aligned value.
10984 In addition to the traditional hex-prefix `0x', a hexadecimal number
10985 can also be specified by the prefix character `#'.
10987 After all operands to an MMIX instruction or directive have been
10988 specified, the rest of the line is ignored, treated as a comment.
10992 * MMIX-Chars:: Special Characters
10993 * MMIX-Symbols:: Symbols
10994 * MMIX-Regs:: Register Names
10995 * MMIX-Pseudos:: Assembler Directives
10998 File: as.info, Node: MMIX-Chars, Next: MMIX-Symbols, Up: MMIX-Syntax
11003 The characters `*' and `#' are line comment characters; each start a
11004 comment at the beginning of a line, but only at the beginning of a
11005 line. A `#' prefixes a hexadecimal number if found elsewhere on a line.
11007 Two other characters, `%' and `!', each start a comment anywhere on
11008 the line. Thus you can't use the `modulus' and `not' operators in
11009 expressions normally associated with these two characters.
11011 A `;' is a line separator, treated as a new-line, so separate
11012 instructions can be specified on a single line.
11015 File: as.info, Node: MMIX-Symbols, Next: MMIX-Regs, Prev: MMIX-Chars, Up: MMIX-Syntax
11020 The character `:' is permitted in identifiers. There are two
11021 exceptions to it being treated as any other symbol character: if a
11022 symbol begins with `:', it means that the symbol is in the global
11023 namespace and that the current prefix should not be prepended to that
11024 symbol (*note MMIX-prefix::). The `:' is then not considered part of
11025 the symbol. For a symbol in the label position (first on a line), a `:'
11026 at the end of a symbol is silently stripped off. A label is permitted,
11027 but not required, to be followed by a `:', as with many other assembly
11030 The character `@' in an expression, is a synonym for `.', the
11033 In addition to the common forward and backward local symbol formats
11034 (*note Symbol Names::), they can be specified with upper-case `B' and
11035 `F', as in `8B' and `9F'. A local label defined for the current
11036 position is written with a `H' appended to the number:
11038 This and traditional local-label formats cannot be mixed: a label
11039 must be defined and referred to using the same format.
11041 There's a minor caveat: just as for the ordinary local symbols, the
11042 local symbols are translated into ordinary symbols using control
11043 characters are to hide the ordinal number of the symbol.
11044 Unfortunately, these symbols are not translated back in error messages.
11045 Thus you may see confusing error messages when local symbols are used.
11046 Control characters `\003' (control-C) and `\004' (control-D) are used
11047 for the MMIX-specific local-symbol syntax.
11049 The symbol `Main' is handled specially; it is always global.
11051 By defining the symbols `__.MMIX.start..text' and
11052 `__.MMIX.start..data', the address of respectively the `.text' and
11053 `.data' segments of the final program can be defined, though when
11054 linking more than one object file, the code or data in the object file
11055 containing the symbol is not guaranteed to be start at that position;
11056 just the final executable. *Note MMIX-loc::.
11059 File: as.info, Node: MMIX-Regs, Next: MMIX-Pseudos, Prev: MMIX-Symbols, Up: MMIX-Syntax
11064 Local and global registers are specified as `$0' to `$255'. The
11065 recognized special register names are `rJ', `rA', `rB', `rC', `rD',
11066 `rE', `rF', `rG', `rH', `rI', `rK', `rL', `rM', `rN', `rO', `rP', `rQ',
11067 `rR', `rS', `rT', `rU', `rV', `rW', `rX', `rY', `rZ', `rBB', `rTT',
11068 `rWW', `rXX', `rYY' and `rZZ'. A leading `:' is optional for special
11071 Local and global symbols can be equated to register names and used in
11072 place of ordinary registers.
11074 Similarly for special registers, local and global symbols can be
11075 used. Also, symbols equated from numbers and constant expressions are
11076 allowed in place of a special register, except when either of the
11077 options `--no-predefined-syms' and `--fixed-special-register-names' are
11078 specified. Then only the special register names above are allowed for
11079 the instructions having a special register operand; `GET' and `PUT'.
11082 File: as.info, Node: MMIX-Pseudos, Prev: MMIX-Regs, Up: MMIX-Syntax
11084 Assembler Directives
11085 ....................
11088 The `LOC' directive sets the current location to the value of the
11089 operand field, which may include changing sections. If the
11090 operand is a constant, the section is set to either `.data' if the
11091 value is `0x2000000000000000' or larger, else it is set to `.text'.
11092 Within a section, the current location may only be changed to
11093 monotonically higher addresses. A LOC expression must be a
11094 previously defined symbol or a "pure" constant.
11096 An example, which sets the label PREV to the current location, and
11097 updates the current location to eight bytes forward:
11100 When a LOC has a constant as its operand, a symbol
11101 `__.MMIX.start..text' or `__.MMIX.start..data' is defined
11102 depending on the address as mentioned above. Each such symbol is
11103 interpreted as special by the linker, locating the section at that
11104 address. Note that if multiple files are linked, the first object
11105 file with that section will be mapped to that address (not
11106 necessarily the file with the LOC definition).
11110 LOCAL external_symbol
11114 This directive-operation generates a link-time assertion that the
11115 operand does not correspond to a global register. The operand is
11116 an expression that at link-time resolves to a register symbol or a
11117 number. A number is treated as the register having that number.
11118 There is one restriction on the use of this directive: the
11119 pseudo-directive must be placed in a section with contents, code
11123 The `IS' directive:
11124 asymbol IS an_expression
11125 sets the symbol `asymbol' to `an_expression'. A symbol may not be
11126 set more than once using this directive. Local labels may be set
11127 using this directive, for example:
11131 This directive reserves a global register, gives it an initial
11132 value and optionally gives it a symbolic name. Some examples:
11135 breg GREG data_value
11137 .greg creg, another_data_value
11139 The symbolic register name can be used in place of a (non-special)
11140 register. If a value isn't provided, it defaults to zero. Unless
11141 the option `--no-merge-gregs' is specified, non-zero registers
11142 allocated with this directive may be eliminated by `as'; another
11143 register with the same value used in its place. Any of the
11144 instructions `CSWAP', `GO', `LDA', `LDBU', `LDB', `LDHT', `LDOU',
11145 `LDO', `LDSF', `LDTU', `LDT', `LDUNC', `LDVTS', `LDWU', `LDW',
11146 `PREGO', `PRELD', `PREST', `PUSHGO', `STBU', `STB', `STCO', `STHT',
11147 `STOU', `STSF', `STTU', `STT', `STUNC', `SYNCD', `SYNCID', can
11148 have a value nearby an initial value in place of its second and
11149 third operands. Here, "nearby" is defined as within the range
11150 0...255 from the initial value of such an allocated register.
11152 buffer1 BYTE 0,0,0,0,0
11153 buffer2 BYTE 0,0,0,0,0
11157 In the example above, the `Y' field of the `LDOUI' instruction
11158 (LDOU with a constant Z) will be replaced with the global register
11159 allocated for `buffer1', and the `Z' field will have the value 5,
11160 the offset from `buffer1' to `buffer2'. The result is equivalent
11162 buffer1 BYTE 0,0,0,0,0
11163 buffer2 BYTE 0,0,0,0,0
11165 tmpreg GREG buffer1
11166 LDOU $42,tmpreg,(buffer2-buffer1)
11168 Global registers allocated with this directive are allocated in
11169 order higher-to-lower within a file. Other than that, the exact
11170 order of register allocation and elimination is undefined. For
11171 example, the order is undefined when more than one file with such
11172 directives are linked together. With the options `-x' and
11173 `--linker-allocated-gregs', `GREG' directives for two-operand
11174 cases like the one mentioned above can be omitted. Sufficient
11175 global registers will then be allocated by the linker.
11178 The `BYTE' directive takes a series of operands separated by a
11179 comma. If an operand is a string (*note Strings::), each
11180 character of that string is emitted as a byte. Other operands
11181 must be constant expressions without forward references, in the
11182 range 0...255. If you need operands having expressions with
11183 forward references, use `.byte' (*note Byte::). An operand can be
11184 omitted, defaulting to a zero value.
11189 The directives `WYDE', `TETRA' and `OCTA' emit constants of two,
11190 four and eight bytes size respectively. Before anything else
11191 happens for the directive, the current location is aligned to the
11192 respective constant-size boundary. If a label is defined at the
11193 beginning of the line, its value will be that after the alignment.
11194 A single operand can be omitted, defaulting to a zero value
11195 emitted for the directive. Operands can be expressed as strings
11196 (*note Strings::), in which case each character in the string is
11197 emitted as a separate constant of the size indicated by the
11201 The `PREFIX' directive sets a symbol name prefix to be prepended to
11202 all symbols (except local symbols, *note MMIX-Symbols::), that are
11203 not prefixed with `:', until the next `PREFIX' directive. Such
11204 prefixes accumulate. For example,
11208 defines a symbol `abc' with the value 0.
11212 A pair of `BSPEC' and `ESPEC' directives delimit a section of
11213 special contents (without specified semantics). Example:
11217 The single operand to `BSPEC' must be number in the range 0...255.
11218 The `BSPEC' number 80 is used by the GNU binutils implementation.
11221 File: as.info, Node: MMIX-mmixal, Prev: MMIX-Syntax, Up: MMIX-Dependent
11223 Differences to `mmixal'
11224 -----------------------
11226 The binutils `as' and `ld' combination has a few differences in
11227 function compared to `mmixal' (*note mmixsite::).
11229 The replacement of a symbol with a GREG-allocated register (*note
11230 GREG-base::) is not handled the exactly same way in `as' as in
11231 `mmixal'. This is apparent in the `mmixal' example file `inout.mms',
11232 where different registers with different offsets, eventually yielding
11233 the same address, are used in the first instruction. This type of
11234 difference should however not affect the function of any program unless
11235 it has specific assumptions about the allocated register number.
11237 Line numbers (in the `mmo' object format) are currently not
11240 Expression operator precedence is not that of mmixal: operator
11241 precedence is that of the C programming language. It's recommended to
11242 use parentheses to explicitly specify wanted operator precedence
11243 whenever more than one type of operators are used.
11245 The serialize unary operator `&', the fractional division operator
11246 `//', the logical not operator `!' and the modulus operator `%' are not
11249 Symbols are not global by default, unless the option
11250 `--globalize-symbols' is passed. Use the `.global' directive to
11251 globalize symbols (*note Global::).
11253 Operand syntax is a bit stricter with `as' than `mmixal'. For
11254 example, you can't say `addu 1,2,3', instead you must write `addu
11257 You can't LOC to a lower address than those already visited (i.e.
11260 A LOC directive must come before any emitted code.
11262 Predefined symbols are visible as file-local symbols after use. (In
11263 the ELF file, that is--the linked mmo file has no notion of a file-local
11266 Some mapping of constant expressions to sections in LOC expressions
11267 is attempted, but that functionality is easily confused and should be
11268 avoided unless compatibility with `mmixal' is required. A LOC
11269 expression to `0x2000000000000000' or higher, maps to the `.data'
11270 section and lower addresses map to the `.text' section (*note
11273 The code and data areas are each contiguous. Sparse programs with
11274 far-away LOC directives will take up the same amount of space as a
11275 contiguous program with zeros filled in the gaps between the LOC
11276 directives. If you need sparse programs, you might try and get the
11277 wanted effect with a linker script and splitting up the code parts into
11278 sections (*note Section::). Assembly code for this, to be compatible
11279 with `mmixal', would look something like:
11281 LOC away_expression
11285 `as' will not execute the LOC directive and `mmixal' ignores the
11286 lines with `.'. This construct can be used generally to help
11289 Symbols can't be defined twice-not even to the same value.
11291 Instruction mnemonics are recognized case-insensitive, though the
11292 `IS' and `GREG' pseudo-operations must be specified in upper-case
11295 There's no unicode support.
11297 The following is a list of programs in `mmix.tar.gz', available at
11298 <http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html>, last
11299 checked with the version dated 2001-08-25 (md5sum
11300 c393470cfc86fac040487d22d2bf0172) that assemble with `mmixal' but do
11301 not assemble with `as':
11304 LOC to a previous address.
11307 Redefines symbol `Done'.
11310 Uses the serial operator `&'.
11313 File: as.info, Node: MSP430-Dependent, Next: SH-Dependent, Prev: MMIX-Dependent, Up: Machine Dependencies
11315 MSP 430 Dependent Features
11316 ==========================
11320 * MSP430 Options:: Options
11321 * MSP430 Syntax:: Syntax
11322 * MSP430 Floating Point:: Floating Point
11323 * MSP430 Directives:: MSP 430 Machine Directives
11324 * MSP430 Opcodes:: Opcodes
11325 * MSP430 Profiling Capability:: Profiling Capability
11328 File: as.info, Node: MSP430 Options, Next: MSP430 Syntax, Up: MSP430-Dependent
11334 select the mpu arch. Currently has no effect.
11337 enables polymorph instructions handler.
11340 enables relaxation at assembly time. DANGEROUS!
11343 File: as.info, Node: MSP430 Syntax, Next: MSP430 Floating Point, Prev: MSP430 Options, Up: MSP430-Dependent
11350 * MSP430-Macros:: Macros
11351 * MSP430-Chars:: Special Characters
11352 * MSP430-Regs:: Register Names
11353 * MSP430-Ext:: Assembler Extensions
11356 File: as.info, Node: MSP430-Macros, Next: MSP430-Chars, Up: MSP430 Syntax
11361 The macro syntax used on the MSP 430 is like that described in the
11362 MSP 430 Family Assembler Specification. Normal `as' macros should
11365 Additional built-in macros are:
11368 Extracts least significant word from 32-bit expression 'exp'.
11371 Extracts most significant word from 32-bit expression 'exp'.
11374 Extracts 3rd word from 64-bit expression 'exp'.
11377 Extracts 4rd word from 64-bit expression 'exp'.
11379 They normally being used as an immediate source operand.
11380 mov #llo(1), r10 ; == mov #1, r10
11381 mov #lhi(1), r10 ; == mov #0, r10
11384 File: as.info, Node: MSP430-Chars, Next: MSP430-Regs, Prev: MSP430-Macros, Up: MSP430 Syntax
11389 `;' is the line comment character.
11391 The character `$' in jump instructions indicates current location and
11392 implemented only for TI syntax compatibility.
11395 File: as.info, Node: MSP430-Regs, Next: MSP430-Ext, Prev: MSP430-Chars, Up: MSP430 Syntax
11400 General-purpose registers are represented by predefined symbols of
11401 the form `rN' (for global registers), where N represents a number
11402 between `0' and `15'. The leading letters may be in either upper or
11403 lower case; for example, `r13' and `R7' are both valid register names.
11405 Register names `PC', `SP' and `SR' cannot be used as register names
11406 and will be treated as variables. Use `r0', `r1', and `r2' instead.
11409 File: as.info, Node: MSP430-Ext, Prev: MSP430-Regs, Up: MSP430 Syntax
11411 Assembler Extensions
11412 ....................
11415 As destination operand being treated as `0(rn)'
11418 As source operand being treated as `@rn'
11421 Skips next N bytes followed by jump instruction and equivalent to
11424 Also, there are some instructions, which cannot be found in other
11425 assemblers. These are branch instructions, which has different opcodes
11426 upon jump distance. They all got PC relative addressing mode.
11429 A polymorph instruction which is `jeq label' in case if jump
11430 distance within allowed range for cpu's jump instruction. If not,
11431 this unrolls into a sequence of
11436 A polymorph instruction which is `jne label' or `jeq +4; br label'
11439 A polymorph instruction which is `jl label' or `jge +4; br label'
11442 A polymorph instruction which is `jn label' or `jn +2; jmp +4; br
11446 A polymorph instruction which is `jlo label' or `jhs +2; br label'
11449 A polymorph instruction which is `jge label' or `jl +4; br label'
11452 A polymorph instruction which is `jhs label' or `jlo +4; br label'
11455 A polymorph instruction which is `jeq +2; jge label' or `jeq +6;
11459 A polymorph instruction which is `jeq +2; jhs label' or `jeq +6;
11463 A polymorph instruction which is `jeq label; jlo label' or `jeq
11464 +2; jhs +4; br label'
11467 A polymorph instruction which is `jeq label; jl label' or `jeq
11468 +2; jge +4; br label'
11471 A polymorph instruction which is `jmp label' or `br label'
11474 File: as.info, Node: MSP430 Floating Point, Next: MSP430 Directives, Prev: MSP430 Syntax, Up: MSP430-Dependent
11479 The MSP 430 family uses IEEE 32-bit floating-point numbers.
11482 File: as.info, Node: MSP430 Directives, Next: MSP430 Opcodes, Prev: MSP430 Floating Point, Up: MSP430-Dependent
11484 MSP 430 Machine Directives
11485 --------------------------
11488 This directive is ignored; it is accepted for compatibility with
11489 other MSP 430 assemblers.
11491 _Warning:_ in other versions of the GNU assembler, `.file' is
11492 used for the directive called `.app-file' in the MSP 430
11496 This directive is ignored; it is accepted for compatibility with
11497 other MSP 430 assemblers.
11500 Currently this directive is ignored; it is accepted for
11501 compatibility with other MSP 430 assemblers.
11504 This directive instructs assembler to add new profile entry to the
11508 File: as.info, Node: MSP430 Opcodes, Next: MSP430 Profiling Capability, Prev: MSP430 Directives, Up: MSP430-Dependent
11513 `as' implements all the standard MSP 430 opcodes. No additional
11514 pseudo-instructions are needed on this family.
11516 For information on the 430 machine instruction set, see `MSP430
11517 User's Manual, document slau049d', Texas Instrument, Inc.
11520 File: as.info, Node: MSP430 Profiling Capability, Prev: MSP430 Opcodes, Up: MSP430-Dependent
11522 Profiling Capability
11523 --------------------
11525 It is a performance hit to use gcc's profiling approach for this
11526 tiny target. Even more - jtag hardware facility does not perform any
11527 profiling functions. However we've got gdb's built-in simulator where
11528 we can do anything.
11530 We define new section `.profiler' which holds all profiling
11531 information. We define new pseudo operation `.profiler' which will
11532 instruct assembler to add new profile entry to the object file. Profile
11533 should take place at the present address.
11535 Pseudo operation format:
11537 `.profiler flags,function_to_profile [, cycle_corrector, extra]'
11541 `flags' is a combination of the following characters:
11550 function is in init section
11553 function is in fini section
11565 interrupt service routine
11580 long jump / sjlj unwind
11583 an arbitrary code fragment
11586 extra parameter saved (a constant value like frame size)
11588 `function_to_profile'
11592 a value which should be added to the cycle counter, zero if
11596 any extra parameter, zero if omitted.
11600 .type fxx,@function
11602 .LFrameOffset_fxx=0x08
11603 .profiler "scdP", fxx ; function entry.
11604 ; we also demand stack value to be saved
11609 .profiler "cdpt",fxx,0, .LFrameOffset_fxx ; check stack value at this point
11610 ; (this is a prologue end)
11611 ; note, that spare var filled with
11615 .profiler cdE,fxx ; check stack
11620 .profiler xcde,fxx,3 ; exit adds 3 to the cycle counter
11621 ret ; cause 'ret' insn takes 3 cycles
11624 File: as.info, Node: PDP-11-Dependent, Next: PJ-Dependent, Prev: SH64-Dependent, Up: Machine Dependencies
11626 PDP-11 Dependent Features
11627 =========================
11631 * PDP-11-Options:: Options
11632 * PDP-11-Pseudos:: Assembler Directives
11633 * PDP-11-Syntax:: DEC Syntax versus BSD Syntax
11634 * PDP-11-Mnemonics:: Instruction Naming
11635 * PDP-11-Synthetic:: Synthetic Instructions
11638 File: as.info, Node: PDP-11-Options, Next: PDP-11-Pseudos, Up: PDP-11-Dependent
11643 The PDP-11 version of `as' has a rich set of machine dependent
11646 Code Generation Options
11647 .......................
11650 Generate position-independent (or position-dependent) code.
11652 The default is to generate position-independent code.
11654 Instruction Set Extension Options
11655 .................................
11657 These options enables or disables the use of extensions over the base
11658 line instruction set as introduced by the first PDP-11 CPU: the KA11.
11659 Most options come in two variants: a `-m'EXTENSION that enables
11660 EXTENSION, and a `-mno-'EXTENSION that disables EXTENSION.
11662 The default is to enable all extensions.
11664 `-mall | -mall-extensions'
11665 Enable all instruction set extensions.
11668 Disable all instruction set extensions.
11671 Enable (or disable) the use of the commercial instruction set,
11672 which consists of these instructions: `ADDNI', `ADDN', `ADDPI',
11673 `ADDP', `ASHNI', `ASHN', `ASHPI', `ASHP', `CMPCI', `CMPC',
11674 `CMPNI', `CMPN', `CMPPI', `CMPP', `CVTLNI', `CVTLN', `CVTLPI',
11675 `CVTLP', `CVTNLI', `CVTNL', `CVTNPI', `CVTNP', `CVTPLI', `CVTPL',
11676 `CVTPNI', `CVTPN', `DIVPI', `DIVP', `L2DR', `L3DR', `LOCCI',
11677 `LOCC', `MATCI', `MATC', `MOVCI', `MOVC', `MOVRCI', `MOVRC',
11678 `MOVTCI', `MOVTC', `MULPI', `MULP', `SCANCI', `SCANC', `SKPCI',
11679 `SKPC', `SPANCI', `SPANC', `SUBNI', `SUBN', `SUBPI', and `SUBP'.
11682 Enable (or disable) the use of the `CSM' instruction.
11685 Enable (or disable) the use of the extended instruction set, which
11686 consists of these instructions: `ASHC', `ASH', `DIV', `MARK',
11687 `MUL', `RTT', `SOB' `SXT', and `XOR'.
11690 `-mno-fis | -mno-kev11'
11691 Enable (or disable) the use of the KEV11 floating-point
11692 instructions: `FADD', `FDIV', `FMUL', and `FSUB'.
11694 `-mfpp | -mfpu | -mfp-11'
11695 `-mno-fpp | -mno-fpu | -mno-fp-11'
11696 Enable (or disable) the use of FP-11 floating-point instructions:
11697 `ABSF', `ADDF', `CFCC', `CLRF', `CMPF', `DIVF', `LDCFF', `LDCIF',
11698 `LDEXP', `LDF', `LDFPS', `MODF', `MULF', `NEGF', `SETD', `SETF',
11699 `SETI', `SETL', `STCFF', `STCFI', `STEXP', `STF', `STFPS', `STST',
11700 `SUBF', and `TSTF'.
11702 `-mlimited-eis | -mno-limited-eis'
11703 Enable (or disable) the use of the limited extended instruction
11704 set: `MARK', `RTT', `SOB', `SXT', and `XOR'.
11706 The -mno-limited-eis options also implies -mno-eis.
11708 `-mmfpt | -mno-mfpt'
11709 Enable (or disable) the use of the `MFPT' instruction.
11711 `-mmultiproc | -mno-multiproc'
11712 Enable (or disable) the use of multiprocessor instructions:
11713 `TSTSET' and `WRTLCK'.
11715 `-mmxps | -mno-mxps'
11716 Enable (or disable) the use of the `MFPS' and `MTPS' instructions.
11719 Enable (or disable) the use of the `SPL' instruction.
11721 Enable (or disable) the use of the microcode instructions: `LDUB',
11727 These options enable the instruction set extensions supported by a
11728 particular CPU, and disables all other extensions.
11731 KA11 CPU. Base line instruction set only.
11734 KB11 CPU. Enable extended instruction set and `SPL'.
11737 KD11-A CPU. Enable limited extended instruction set.
11740 KD11-B CPU. Base line instruction set only.
11743 KD11-D CPU. Base line instruction set only.
11746 KD11-E CPU. Enable extended instruction set, `MFPS', and `MTPS'.
11748 `-mkd11f | -mkd11h | -mkd11q'
11749 KD11-F, KD11-H, or KD11-Q CPU. Enable limited extended
11750 instruction set, `MFPS', and `MTPS'.
11753 KD11-K CPU. Enable extended instruction set, `LDUB', `MED',
11754 `MFPS', `MFPT', `MTPS', and `XFC'.
11757 KD11-Z CPU. Enable extended instruction set, `CSM', `MFPS',
11758 `MFPT', `MTPS', and `SPL'.
11761 F11 CPU. Enable extended instruction set, `MFPS', `MFPT', and
11765 J11 CPU. Enable extended instruction set, `CSM', `MFPS', `MFPT',
11766 `MTPS', `SPL', `TSTSET', and `WRTLCK'.
11769 T11 CPU. Enable limited extended instruction set, `MFPS', and
11772 Machine Model Options
11773 .....................
11775 These options enable the instruction set extensions supported by a
11776 particular machine model, and disables all other extensions.
11784 `-m11/05 | -m11/10'
11787 `-m11/15 | -m11/20'
11793 `-m11/23 | -m11/24'
11800 Ame as `-mkd11e' `-mfpp'.
11802 `-m11/35 | -m11/40'
11808 `-m11/45 | -m11/50 | -m11/55 | -m11/70'
11811 `-m11/53 | -m11/73 | -m11/83 | -m11/84 | -m11/93 | -m11/94'
11818 File: as.info, Node: PDP-11-Pseudos, Next: PDP-11-Syntax, Prev: PDP-11-Options, Up: PDP-11-Dependent
11820 Assembler Directives
11821 --------------------
11823 The PDP-11 version of `as' has a few machine dependent assembler
11827 Switch to the `bss' section.
11830 Align the location counter to an even number.
11833 File: as.info, Node: PDP-11-Syntax, Next: PDP-11-Mnemonics, Prev: PDP-11-Pseudos, Up: PDP-11-Dependent
11835 PDP-11 Assembly Language Syntax
11836 -------------------------------
11838 `as' supports both DEC syntax and BSD syntax. The only difference
11839 is that in DEC syntax, a `#' character is used to denote an immediate
11840 constants, while in BSD syntax the character for this purpose is `$'.
11842 eneral-purpose registers are named `r0' through `r7'. Mnemonic
11843 alternatives for `r6' and `r7' are `sp' and `pc', respectively.
11845 Floating-point registers are named `ac0' through `ac3', or
11846 alternatively `fr0' through `fr3'.
11848 Comments are started with a `#' or a `/' character, and extend to
11849 the end of the line. (FIXME: clash with immediates?)
11852 File: as.info, Node: PDP-11-Mnemonics, Next: PDP-11-Synthetic, Prev: PDP-11-Syntax, Up: PDP-11-Dependent
11857 Some instructions have alternative names.
11875 File: as.info, Node: PDP-11-Synthetic, Prev: PDP-11-Mnemonics, Up: PDP-11-Dependent
11877 Synthetic Instructions
11878 ----------------------
11880 The `JBR' and `J'CC synthetic instructions are not supported yet.
11883 File: as.info, Node: PJ-Dependent, Next: PPC-Dependent, Prev: PDP-11-Dependent, Up: Machine Dependencies
11885 picoJava Dependent Features
11886 ===========================
11890 * PJ Options:: Options
11893 File: as.info, Node: PJ Options, Up: PJ-Dependent
11898 `as' has two additional command-line options for the picoJava
11901 This option selects little endian data output.
11904 This option selects big endian data output.
11907 File: as.info, Node: PPC-Dependent, Next: Sparc-Dependent, Prev: PJ-Dependent, Up: Machine Dependencies
11909 PowerPC Dependent Features
11910 ==========================
11914 * PowerPC-Opts:: Options
11915 * PowerPC-Pseudo:: PowerPC Assembler Directives
11918 File: as.info, Node: PowerPC-Opts, Next: PowerPC-Pseudo, Up: PPC-Dependent
11923 The PowerPC chip family includes several successive levels, using
11924 the same core instruction set, but including a few additional
11925 instructions at each level. There are exceptions to this however. For
11926 details on what instructions each variant supports, please see the
11927 chip's architecture reference manual.
11929 The following table lists all available PowerPC options.
11932 Generate code for POWER/2 (RIOS2).
11935 Generate code for POWER (RIOS1)
11938 Generate code for PowerPC 601.
11940 `-mppc, -mppc32, -m603, -m604'
11941 Generate code for PowerPC 603/604.
11944 Generate code for PowerPC 403/405.
11947 Generate code for PowerPC 440. BookE and some 405 instructions.
11949 `-m7400, -m7410, -m7450, -m7455'
11950 Generate code for PowerPC 7400/7410/7450/7455.
11953 Generate code for PowerPC 620/625/630.
11956 Generate code for PowerPC 64, including bridge insns.
11959 Generate code for 64-bit BookE.
11961 `-mbooke, mbooke32'
11962 Generate code for 32-bit BookE.
11965 Generate code for PowerPC e300 family.
11968 Generate code for processors with AltiVec instructions.
11971 Generate code for Power4 architecture.
11974 Generate code for Power5 architecture.
11977 Generate code Power/PowerPC common instructions.
11980 Generate code for any architecture (PWR/PWRX/PPC).
11983 Allow symbolic names for registers.
11986 Do not allow symbolic names for registers.
11989 Support for GCC's -mrelocatble option.
11991 `-mrelocatable-lib'
11992 Support for GCC's -mrelocatble-lib option.
11995 Set PPC_EMB bit in ELF flags.
11997 `-mlittle, -mlittle-endian'
11998 Generate code for a little endian machine.
12000 `-mbig, -mbig-endian'
12001 Generate code for a big endian machine.
12004 Generate code for Solaris.
12007 Do not generate code for Solaris.
12010 File: as.info, Node: PowerPC-Pseudo, Prev: PowerPC-Opts, Up: PPC-Dependent
12012 PowerPC Assembler Directives
12013 ----------------------------
12015 A number of assembler directives are available for PowerPC. The
12016 following table is far from complete.
12018 `.machine "string"'
12019 This directive allows you to change the machine for which code is
12020 generated. `"string"' may be any of the -m cpu selection options
12021 (without the -m) enclosed in double quotes, `"push"', or `"pop"'.
12022 `.machine "push"' saves the currently selected cpu, which may be
12023 restored with `.machine "pop"'.
12026 File: as.info, Node: SH-Dependent, Next: SH64-Dependent, Prev: MSP430-Dependent, Up: Machine Dependencies
12028 Renesas / SuperH SH Dependent Features
12029 ======================================
12033 * SH Options:: Options
12034 * SH Syntax:: Syntax
12035 * SH Floating Point:: Floating Point
12036 * SH Directives:: SH Machine Directives
12037 * SH Opcodes:: Opcodes
12040 File: as.info, Node: SH Options, Next: SH Syntax, Up: SH-Dependent
12045 `as' has following command-line options for the Renesas (formerly
12046 Hitachi) / SuperH SH family.
12049 Generate little endian code.
12052 Generate big endian code.
12055 Alter jump instructions for long displacements.
12058 Align sections to 4 byte boundaries, not 16.
12061 Enable sh-dsp insns, and disable sh3e / sh4 insns.
12064 Disable optimization with section symbol for compatibility with
12067 `--allow-reg-prefix'
12068 Allow '$' as a register name prefix.
12071 Specify the sh4 or sh4a instruction set.
12074 Enable sh-dsp insns, and disable sh3e / sh4 insns.
12077 Enable sh2e, sh3e, sh4, and sh4a insn sets.
12080 Enable sh1, sh2, sh2e, sh3, sh3e, sh4, sh4a, and sh-dsp insn sets.
12083 File: as.info, Node: SH Syntax, Next: SH Floating Point, Prev: SH Options, Up: SH-Dependent
12090 * SH-Chars:: Special Characters
12091 * SH-Regs:: Register Names
12092 * SH-Addressing:: Addressing Modes
12095 File: as.info, Node: SH-Chars, Next: SH-Regs, Up: SH Syntax
12100 `!' is the line comment character.
12102 You can use `;' instead of a newline to separate statements.
12104 Since `$' has no special meaning, you may use it in symbol names.
12107 File: as.info, Node: SH-Regs, Next: SH-Addressing, Prev: SH-Chars, Up: SH Syntax
12112 You can use the predefined symbols `r0', `r1', `r2', `r3', `r4',
12113 `r5', `r6', `r7', `r8', `r9', `r10', `r11', `r12', `r13', `r14', and
12114 `r15' to refer to the SH registers.
12116 The SH also has these control registers:
12119 procedure register (holds return address)
12126 high and low multiply accumulator registers
12132 global base register
12135 vector base register (for interrupt vectors)
12138 File: as.info, Node: SH-Addressing, Prev: SH-Regs, Up: SH Syntax
12143 `as' understands the following addressing modes for the SH. `RN' in
12144 the following refers to any of the numbered registers, but _not_ the
12154 Register indirect with pre-decrement
12157 Register indirect with post-increment
12160 Register indirect with displacement
12173 PC relative address (for branch or for addressing memory). The
12174 `as' implementation allows you to use the simpler form ADDR
12175 anywhere a PC relative address is called for; the alternate form
12176 is supported for compatibility with other assemblers.
12182 File: as.info, Node: SH Floating Point, Next: SH Directives, Prev: SH Syntax, Up: SH-Dependent
12187 SH2E, SH3E and SH4 groups have on-chip floating-point unit (FPU).
12188 Other SH groups can use `.float' directive to generate IEEE
12189 floating-point numbers.
12191 SH2E and SH3E support single-precision floating point calculations as
12192 well as entirely PCAPI compatible emulation of double-precision
12193 floating point calculations. SH2E and SH3E instructions are a subset of
12194 the floating point calculations conforming to the IEEE754 standard.
12196 In addition to single-precision and double-precision floating-point
12197 operation capability, the on-chip FPU of SH4 has a 128-bit graphic
12198 engine that enables 32-bit floating-point data to be processed 128 bits
12199 at a time. It also supports 4 * 4 array operations and inner product
12200 operations. Also, a superscalar architecture is employed that enables
12201 simultaneous execution of two instructions (including FPU
12202 instructions), providing performance of up to twice that of
12203 conventional architectures at the same frequency.
12206 File: as.info, Node: SH Directives, Next: SH Opcodes, Prev: SH Floating Point, Up: SH-Dependent
12208 SH Machine Directives
12209 ---------------------
12213 `as' will issue a warning when a misaligned `.word' or `.long'
12214 directive is used. You may use `.uaword' or `.ualong' to indicate
12215 that the value is intentionally misaligned.
12218 File: as.info, Node: SH Opcodes, Prev: SH Directives, Up: SH-Dependent
12223 For detailed information on the SH machine instruction set, see
12224 `SH-Microcomputer User's Manual' (Renesas) or `SH-4 32-bit CPU Core
12225 Architecture' (SuperH) and `SuperH (SH) 64-Bit RISC Series' (SuperH).
12227 `as' implements all the standard SH opcodes. No additional
12228 pseudo-instructions are needed on this family. Note, however, that
12229 because `as' supports a simpler form of PC-relative addressing, you may
12230 simply write (for example)
12234 where other assemblers might require an explicit displacement to `bar'
12235 from the program counter:
12239 Here is a summary of SH opcodes:
12242 Rn a numbered register
12243 Rm another numbered register
12244 #imm immediate data
12246 disp8 8-bit displacement
12247 disp12 12-bit displacement
12249 add #imm,Rn lds.l @Rn+,PR
12250 add Rm,Rn mac.w @Rm+,@Rn+
12251 addc Rm,Rn mov #imm,Rn
12252 addv Rm,Rn mov Rm,Rn
12253 and #imm,R0 mov.b Rm,@(R0,Rn)
12254 and Rm,Rn mov.b Rm,@-Rn
12255 and.b #imm,@(R0,GBR) mov.b Rm,@Rn
12256 bf disp8 mov.b @(disp,Rm),R0
12257 bra disp12 mov.b @(disp,GBR),R0
12258 bsr disp12 mov.b @(R0,Rm),Rn
12259 bt disp8 mov.b @Rm+,Rn
12260 clrmac mov.b @Rm,Rn
12261 clrt mov.b R0,@(disp,Rm)
12262 cmp/eq #imm,R0 mov.b R0,@(disp,GBR)
12263 cmp/eq Rm,Rn mov.l Rm,@(disp,Rn)
12264 cmp/ge Rm,Rn mov.l Rm,@(R0,Rn)
12265 cmp/gt Rm,Rn mov.l Rm,@-Rn
12266 cmp/hi Rm,Rn mov.l Rm,@Rn
12267 cmp/hs Rm,Rn mov.l @(disp,Rn),Rm
12268 cmp/pl Rn mov.l @(disp,GBR),R0
12269 cmp/pz Rn mov.l @(disp,PC),Rn
12270 cmp/str Rm,Rn mov.l @(R0,Rm),Rn
12271 div0s Rm,Rn mov.l @Rm+,Rn
12273 div1 Rm,Rn mov.l R0,@(disp,GBR)
12274 exts.b Rm,Rn mov.w Rm,@(R0,Rn)
12275 exts.w Rm,Rn mov.w Rm,@-Rn
12276 extu.b Rm,Rn mov.w Rm,@Rn
12277 extu.w Rm,Rn mov.w @(disp,Rm),R0
12278 jmp @Rn mov.w @(disp,GBR),R0
12279 jsr @Rn mov.w @(disp,PC),Rn
12280 ldc Rn,GBR mov.w @(R0,Rm),Rn
12281 ldc Rn,SR mov.w @Rm+,Rn
12282 ldc Rn,VBR mov.w @Rm,Rn
12283 ldc.l @Rn+,GBR mov.w R0,@(disp,Rm)
12284 ldc.l @Rn+,SR mov.w R0,@(disp,GBR)
12285 ldc.l @Rn+,VBR mova @(disp,PC),R0
12286 lds Rn,MACH movt Rn
12287 lds Rn,MACL muls Rm,Rn
12288 lds Rn,PR mulu Rm,Rn
12289 lds.l @Rn+,MACH neg Rm,Rn
12290 lds.l @Rn+,MACL negc Rm,Rn
12293 not Rm,Rn stc.l GBR,@-Rn
12294 or #imm,R0 stc.l SR,@-Rn
12295 or Rm,Rn stc.l VBR,@-Rn
12296 or.b #imm,@(R0,GBR) sts MACH,Rn
12297 rotcl Rn sts MACL,Rn
12299 rotl Rn sts.l MACH,@-Rn
12300 rotr Rn sts.l MACL,@-Rn
12305 shar Rn swap.b Rm,Rn
12306 shll Rn swap.w Rm,Rn
12307 shll16 Rn tas.b @Rn
12308 shll2 Rn trapa #imm
12309 shll8 Rn tst #imm,R0
12311 shlr16 Rn tst.b #imm,@(R0,GBR)
12312 shlr2 Rn xor #imm,R0
12314 sleep xor.b #imm,@(R0,GBR)
12315 stc GBR,Rn xtrct Rm,Rn
12319 File: as.info, Node: SH64-Dependent, Next: PDP-11-Dependent, Prev: SH-Dependent, Up: Machine Dependencies
12321 SuperH SH64 Dependent Features
12322 ==============================
12326 * SH64 Options:: Options
12327 * SH64 Syntax:: Syntax
12328 * SH64 Directives:: SH64 Machine Directives
12329 * SH64 Opcodes:: Opcodes
12332 File: as.info, Node: SH64 Options, Next: SH64 Syntax, Up: SH64-Dependent
12338 Specify the sh4 or sh4a instruction set.
12341 Enable sh-dsp insns, and disable sh3e / sh4 insns.
12344 Enable sh2e, sh3e, sh4, and sh4a insn sets.
12347 Enable sh1, sh2, sh2e, sh3, sh3e, sh4, sh4a, and sh-dsp insn sets.
12349 `-isa=shmedia | -isa=shcompact'
12350 Specify the default instruction set. `SHmedia' specifies the
12351 32-bit opcodes, and `SHcompact' specifies the 16-bit opcodes
12352 compatible with previous SH families. The default depends on the
12353 ABI selected; the default for the 64-bit ABI is SHmedia, and the
12354 default for the 32-bit ABI is SHcompact. If neither the ABI nor
12355 the ISA is specified, the default is 32-bit SHcompact.
12357 Note that the `.mode' pseudo-op is not permitted if the ISA is not
12358 specified on the command line.
12360 `-abi=32 | -abi=64'
12361 Specify the default ABI. If the ISA is specified and the ABI is
12362 not, the default ABI depends on the ISA, with SHmedia defaulting
12363 to 64-bit and SHcompact defaulting to 32-bit.
12365 Note that the `.abi' pseudo-op is not permitted if the ABI is not
12366 specified on the command line. When the ABI is specified on the
12367 command line, any `.abi' pseudo-ops in the source must match it.
12369 `-shcompact-const-crange'
12370 Emit code-range descriptors for constants in SHcompact code
12374 Disallow SHmedia code in the same section as constants and
12378 Do not expand MOVI, PT, PTA or PTB instructions.
12381 With -abi=64, expand PT, PTA and PTB instructions to 32 bits only.
12384 File: as.info, Node: SH64 Syntax, Next: SH64 Directives, Prev: SH64 Options, Up: SH64-Dependent
12391 * SH64-Chars:: Special Characters
12392 * SH64-Regs:: Register Names
12393 * SH64-Addressing:: Addressing Modes
12396 File: as.info, Node: SH64-Chars, Next: SH64-Regs, Up: SH64 Syntax
12401 `!' is the line comment character.
12403 You can use `;' instead of a newline to separate statements.
12405 Since `$' has no special meaning, you may use it in symbol names.
12408 File: as.info, Node: SH64-Regs, Next: SH64-Addressing, Prev: SH64-Chars, Up: SH64 Syntax
12413 You can use the predefined symbols `r0' through `r63' to refer to
12414 the SH64 general registers, `cr0' through `cr63' for control registers,
12415 `tr0' through `tr7' for target address registers, `fr0' through `fr63'
12416 for single-precision floating point registers, `dr0' through `dr62'
12417 (even numbered registers only) for double-precision floating point
12418 registers, `fv0' through `fv60' (multiples of four only) for
12419 single-precision floating point vectors, `fp0' through `fp62' (even
12420 numbered registers only) for single-precision floating point pairs,
12421 `mtrx0' through `mtrx48' (multiples of 16 only) for 4x4 matrices of
12422 single-precision floating point registers, `pc' for the program
12423 counter, and `fpscr' for the floating point status and control register.
12425 You can also refer to the control registers by the mnemonics `sr',
12426 `ssr', `pssr', `intevt', `expevt', `pexpevt', `tra', `spc', `pspc',
12427 `resvec', `vbr', `tea', `dcr', `kcr0', `kcr1', `ctc', and `usr'.
12430 File: as.info, Node: SH64-Addressing, Prev: SH64-Regs, Up: SH64 Syntax
12435 SH64 operands consist of either a register or immediate value. The
12436 immediate value can be a constant or label reference (or portion of a
12437 label reference), as in this example:
12441 movi (function >> 16) & 65535,r0
12442 shori function & 65535, r0
12445 Instruction label references can reference labels in either SHmedia
12446 or SHcompact. To differentiate between the two, labels in SHmedia
12447 sections will always have the least significant bit set (i.e. they will
12448 be odd), which SHcompact labels will have the least significant bit
12449 reset (i.e. they will be even). If you need to reference the actual
12450 address of a label, you can use the `datalabel' modifier, as in this
12454 .long datalabel function
12456 In that example, the first longword may or may not have the least
12457 significant bit set depending on whether the label is an SHmedia label
12458 or an SHcompact label. The second longword will be the actual address
12459 of the label, regardless of what type of label it is.
12462 File: as.info, Node: SH64 Directives, Next: SH64 Opcodes, Prev: SH64 Syntax, Up: SH64-Dependent
12464 SH64 Machine Directives
12465 -----------------------
12467 In addition to the SH directives, the SH64 provides the following
12470 `.mode [shmedia|shcompact]'
12471 `.isa [shmedia|shcompact]'
12472 Specify the ISA for the following instructions (the two directives
12473 are equivalent). Note that programs such as `objdump' rely on
12474 symbolic labels to determine when such mode switches occur (by
12475 checking the least significant bit of the label's address), so
12476 such mode/isa changes should always be followed by a label (in
12477 practice, this is true anyway). Note that you cannot use these
12478 directives if you didn't specify an ISA on the command line.
12481 Specify the ABI for the following instructions. Note that you
12482 cannot use this directive unless you specified an ABI on the
12483 command line, and the ABIs specified must match.
12486 Like .uaword and .ualong, this allows you to specify an
12487 intentionally unaligned quadword (64 bit word).
12490 File: as.info, Node: SH64 Opcodes, Prev: SH64 Directives, Up: SH64-Dependent
12495 For detailed information on the SH64 machine instruction set, see
12496 `SuperH 64 bit RISC Series Architecture Manual' (SuperH, Inc.).
12498 `as' implements all the standard SH64 opcodes. In addition, the
12499 following pseudo-opcodes may be expanded into one or more alternate
12503 If the value doesn't fit into a standard `movi' opcode, `as' will
12504 replace the `movi' with a sequence of `movi' and `shori' opcodes.
12507 This expands to a sequence of `movi' and `shori' opcode, followed
12508 by a `ptrel' opcode, or to a `pta' or `ptb' opcode, depending on
12509 the label referenced.
12512 File: as.info, Node: Sparc-Dependent, Next: TIC54X-Dependent, Prev: PPC-Dependent, Up: Machine Dependencies
12514 SPARC Dependent Features
12515 ========================
12519 * Sparc-Opts:: Options
12520 * Sparc-Aligned-Data:: Option to enforce aligned data
12521 * Sparc-Float:: Floating Point
12522 * Sparc-Directives:: Sparc Machine Directives
12525 File: as.info, Node: Sparc-Opts, Next: Sparc-Aligned-Data, Up: Sparc-Dependent
12530 The SPARC chip family includes several successive levels, using the
12531 same core instruction set, but including a few additional instructions
12532 at each level. There are exceptions to this however. For details on
12533 what instructions each variant supports, please see the chip's
12534 architecture reference manual.
12536 By default, `as' assumes the core instruction set (SPARC v6), but
12537 "bumps" the architecture level as needed: it switches to successively
12538 higher architectures as it encounters instructions that only exist in
12541 If not configured for SPARC v9 (`sparc64-*-*') GAS will not bump
12542 passed sparclite by default, an option must be passed to enable the v9
12545 GAS treats sparclite as being compatible with v8, unless an
12546 architecture is explicitly requested. SPARC v9 is always incompatible
12549 `-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite'
12550 `-Av8plus | -Av8plusa | -Av9 | -Av9a'
12551 Use one of the `-A' options to select one of the SPARC
12552 architectures explicitly. If you select an architecture
12553 explicitly, `as' reports a fatal error if it encounters an
12554 instruction or feature requiring an incompatible or higher level.
12556 `-Av8plus' and `-Av8plusa' select a 32 bit environment.
12558 `-Av9' and `-Av9a' select a 64 bit environment and are not
12559 available unless GAS is explicitly configured with 64 bit
12560 environment support.
12562 `-Av8plusa' and `-Av9a' enable the SPARC V9 instruction set with
12563 UltraSPARC extensions.
12565 `-xarch=v8plus | -xarch=v8plusa'
12566 For compatibility with the Solaris v9 assembler. These options are
12567 equivalent to -Av8plus and -Av8plusa, respectively.
12570 Warn whenever it is necessary to switch to another level. If an
12571 architecture level is explicitly requested, GAS will not issue
12572 warnings until that level is reached, and will then bump the level
12573 as required (except between incompatible levels).
12576 Select the word size, either 32 bits or 64 bits. These options
12577 are only available with the ELF object file format, and require
12578 that the necessary BFD support has been included.
12581 File: as.info, Node: Sparc-Aligned-Data, Next: Sparc-Float, Prev: Sparc-Opts, Up: Sparc-Dependent
12583 Enforcing aligned data
12584 ----------------------
12586 SPARC GAS normally permits data to be misaligned. For example, it
12587 permits the `.long' pseudo-op to be used on a byte boundary. However,
12588 the native SunOS and Solaris assemblers issue an error when they see
12591 You can use the `--enforce-aligned-data' option to make SPARC GAS
12592 also issue an error about misaligned data, just as the SunOS and Solaris
12595 The `--enforce-aligned-data' option is not the default because gcc
12596 issues misaligned data pseudo-ops when it initializes certain packed
12597 data structures (structures defined using the `packed' attribute). You
12598 may have to assemble with GAS in order to initialize packed data
12599 structures in your own code.
12602 File: as.info, Node: Sparc-Float, Next: Sparc-Directives, Prev: Sparc-Aligned-Data, Up: Sparc-Dependent
12607 The Sparc uses IEEE floating-point numbers.
12610 File: as.info, Node: Sparc-Directives, Prev: Sparc-Float, Up: Sparc-Dependent
12612 Sparc Machine Directives
12613 ------------------------
12615 The Sparc version of `as' supports the following additional machine
12619 This must be followed by the desired alignment in bytes.
12622 This must be followed by a symbol name, a positive number, and
12623 `"bss"'. This behaves somewhat like `.comm', but the syntax is
12627 This is functionally identical to `.short'.
12630 On the Sparc, the `.nword' directive produces native word sized
12631 value, ie. if assembling with -32 it is equivalent to `.word', if
12632 assembling with -64 it is equivalent to `.xword'.
12635 This directive is ignored. Any text following it on the same line
12639 This directive declares use of a global application or system
12640 register. It must be followed by a register name %g2, %g3, %g6 or
12641 %g7, comma and the symbol name for that register. If symbol name
12642 is `#scratch', it is a scratch register, if it is `#ignore', it
12643 just suppresses any errors about using undeclared global register,
12644 but does not emit any information about it into the object file.
12645 This can be useful e.g. if you save the register before use and
12649 This must be followed by a symbol name, a positive number, and
12650 `"bss"'. This behaves somewhat like `.lcomm', but the syntax is
12654 This must be followed by `"text"', `"data"', or `"data1"'. It
12655 behaves like `.text', `.data', or `.data 1'.
12658 This is functionally identical to the `.space' directive.
12661 On the Sparc, the `.word' directive produces 32 bit values,
12662 instead of the 16 bit values it produces on many other machines.
12665 On the Sparc V9 processor, the `.xword' directive produces 64 bit
12669 File: as.info, Node: TIC54X-Dependent, Next: V850-Dependent, Prev: Sparc-Dependent, Up: Machine Dependencies
12671 TIC54X Dependent Features
12672 =========================
12676 * TIC54X-Opts:: Command-line Options
12677 * TIC54X-Block:: Blocking
12678 * TIC54X-Env:: Environment Settings
12679 * TIC54X-Constants:: Constants Syntax
12680 * TIC54X-Subsyms:: String Substitution
12681 * TIC54X-Locals:: Local Label Syntax
12682 * TIC54X-Builtins:: Builtin Assembler Math Functions
12683 * TIC54X-Ext:: Extended Addressing Support
12684 * TIC54X-Directives:: Directives
12685 * TIC54X-Macros:: Macro Features
12686 * TIC54X-MMRegs:: Memory-mapped Registers
12689 File: as.info, Node: TIC54X-Opts, Next: TIC54X-Block, Up: TIC54X-Dependent
12694 The TMS320C54x version of `as' has a few machine-dependent options.
12696 You can use the `-mfar-mode' option to enable extended addressing
12697 mode. All addresses will be assumed to be > 16 bits, and the
12698 appropriate relocation types will be used. This option is equivalent
12699 to using the `.far_mode' directive in the assembly code. If you do not
12700 use the `-mfar-mode' option, all references will be assumed to be 16
12701 bits. This option may be abbreviated to `-mf'.
12703 You can use the `-mcpu' option to specify a particular CPU. This
12704 option is equivalent to using the `.version' directive in the assembly
12705 code. For recognized CPU codes, see *Note `.version':
12706 TIC54X-Directives. The default CPU version is `542'.
12708 You can use the `-merrors-to-file' option to redirect error output
12709 to a file (this provided for those deficient environments which don't
12710 provide adequate output redirection). This option may be abbreviated to
12714 File: as.info, Node: TIC54X-Block, Next: TIC54X-Env, Prev: TIC54X-Opts, Up: TIC54X-Dependent
12719 A blocked section or memory block is guaranteed not to cross the
12720 blocking boundary (usually a page, or 128 words) if it is smaller than
12721 the blocking size, or to start on a page boundary if it is larger than
12725 File: as.info, Node: TIC54X-Env, Next: TIC54X-Constants, Prev: TIC54X-Block, Up: TIC54X-Dependent
12727 Environment Settings
12728 --------------------
12730 `C54XDSP_DIR' and `A_DIR' are semicolon-separated paths which are
12731 added to the list of directories normally searched for source and
12732 include files. `C54XDSP_DIR' will override `A_DIR'.
12735 File: as.info, Node: TIC54X-Constants, Next: TIC54X-Subsyms, Prev: TIC54X-Env, Up: TIC54X-Dependent
12740 The TIC54X version of `as' allows the following additional constant
12741 formats, using a suffix to indicate the radix:
12743 Binary `000000B, 011000b'
12745 Hexadecimal `45h, 0FH'
12748 File: as.info, Node: TIC54X-Subsyms, Next: TIC54X-Locals, Prev: TIC54X-Constants, Up: TIC54X-Dependent
12750 String Substitution
12751 -------------------
12753 A subset of allowable symbols (which we'll call subsyms) may be
12754 assigned arbitrary string values. This is roughly equivalent to C
12755 preprocessor #define macros. When `as' encounters one of these
12756 symbols, the symbol is replaced in the input stream by its string value.
12757 Subsym names *must* begin with a letter.
12759 Subsyms may be defined using the `.asg' and `.eval' directives
12760 (*Note `.asg': TIC54X-Directives, *Note `.eval': TIC54X-Directives.
12762 Expansion is recursive until a previously encountered symbol is
12763 seen, at which point substitution stops.
12765 In this example, x is replaced with SYM2; SYM2 is replaced with
12766 SYM1, and SYM1 is replaced with x. At this point, x has already been
12767 encountered and the substitution stops.
12772 add x,a ; final code assembled is "add x, a"
12774 Macro parameters are converted to subsyms; a side effect of this is
12775 the normal `as' '\ARG' dereferencing syntax is unnecessary. Subsyms
12776 defined within a macro will have global scope, unless the `.var'
12777 directive is used to identify the subsym as a local macro variable
12778 *note `.var': TIC54X-Directives..
12780 Substitution may be forced in situations where replacement might be
12781 ambiguous by placing colons on either side of the subsym. The following
12787 When assembled becomes:
12791 Smaller parts of the string assigned to a subsym may be accessed with
12792 the following syntax:
12794 ``:SYMBOL(CHAR_INDEX):''
12795 Evaluates to a single-character string, the character at
12798 ``:SYMBOL(START,LENGTH):''
12799 Evaluates to a substring of SYMBOL beginning at START with length
12803 File: as.info, Node: TIC54X-Locals, Next: TIC54X-Builtins, Prev: TIC54X-Subsyms, Up: TIC54X-Dependent
12808 Local labels may be defined in two ways:
12810 * $N, where N is a decimal number between 0 and 9
12812 * LABEL?, where LABEL is any legal symbol name.
12814 Local labels thus defined may be redefined or automatically
12815 generated. The scope of a local label is based on when it may be
12816 undefined or reset. This happens when one of the following situations
12819 * .newblock directive *note `.newblock': TIC54X-Directives.
12821 * The current section is changed (.sect, .text, or .data)
12823 * Entering or leaving an included file
12825 * The macro scope where the label was defined is exited
12828 File: as.info, Node: TIC54X-Builtins, Next: TIC54X-Ext, Prev: TIC54X-Locals, Up: TIC54X-Dependent
12833 The following built-in functions may be used to generate a
12834 floating-point value. All return a floating-point value except `$cvi',
12835 `$int', and `$sgn', which return an integer value.
12838 Returns the floating point arccosine of EXPR.
12841 Returns the floating point arcsine of EXPR.
12844 Returns the floating point arctangent of EXPR.
12846 ``$atan2(EXPR1,EXPR2)''
12847 Returns the floating point arctangent of EXPR1 / EXPR2.
12850 Returns the smallest integer not less than EXPR as floating point.
12853 Returns the floating point hyperbolic cosine of EXPR.
12856 Returns the floating point cosine of EXPR.
12859 Returns the integer value EXPR converted to floating-point.
12862 Returns the floating point value EXPR converted to integer.
12865 Returns the floating point value e ^ EXPR.
12868 Returns the floating point absolute value of EXPR.
12871 Returns the largest integer that is not greater than EXPR as
12874 ``$fmod(EXPR1,EXPR2)''
12875 Returns the floating point remainder of EXPR1 / EXPR2.
12878 Returns 1 if EXPR evaluates to an integer, zero otherwise.
12880 ``$ldexp(EXPR1,EXPR2)''
12881 Returns the floating point value EXPR1 * 2 ^ EXPR2.
12884 Returns the base 10 logarithm of EXPR.
12887 Returns the natural logarithm of EXPR.
12889 ``$max(EXPR1,EXPR2)''
12890 Returns the floating point maximum of EXPR1 and EXPR2.
12892 ``$min(EXPR1,EXPR2)''
12893 Returns the floating point minimum of EXPR1 and EXPR2.
12895 ``$pow(EXPR1,EXPR2)''
12896 Returns the floating point value EXPR1 ^ EXPR2.
12899 Returns the nearest integer to EXPR as a floating point number.
12902 Returns -1, 0, or 1 based on the sign of EXPR.
12905 Returns the floating point sine of EXPR.
12908 Returns the floating point hyperbolic sine of EXPR.
12911 Returns the floating point square root of EXPR.
12914 Returns the floating point tangent of EXPR.
12917 Returns the floating point hyperbolic tangent of EXPR.
12920 Returns the integer value of EXPR truncated towards zero as
12924 File: as.info, Node: TIC54X-Ext, Next: TIC54X-Directives, Prev: TIC54X-Builtins, Up: TIC54X-Dependent
12926 Extended Addressing
12927 -------------------
12929 The `LDX' pseudo-op is provided for loading the extended addressing
12930 bits of a label or address. For example, if an address `_label' resides
12931 in extended program memory, the value of `_label' may be loaded as
12933 ldx #_label,16,a ; loads extended bits of _label
12934 or #_label,a ; loads lower 16 bits of _label
12935 bacc a ; full address is in accumulator A
12938 File: as.info, Node: TIC54X-Directives, Next: TIC54X-Macros, Prev: TIC54X-Ext, Up: TIC54X-Dependent
12945 Align the section program counter on the next boundary, based on
12946 SIZE. SIZE may be any power of 2. `.even' is equivalent to
12947 `.align' with a SIZE of 2.
12949 Align SPC to word boundary
12952 Align SPC to longword boundary (same as .even)
12955 Align SPC to page boundary
12957 `.asg STRING, NAME'
12958 Assign NAME the string STRING. String replacement is performed on
12959 STRING before assignment.
12961 `.eval STRING, NAME'
12962 Evaluate the contents of string STRING and assign the result as a
12963 string to the subsym NAME. String replacement is performed on
12964 STRING before assignment.
12966 `.bss SYMBOL, SIZE [, [BLOCKING_FLAG] [,ALIGNMENT_FLAG]]'
12967 Reserve space for SYMBOL in the .bss section. SIZE is in words.
12968 If present, BLOCKING_FLAG indicates the allocated space should be
12969 aligned on a page boundary if it would otherwise cross a page
12970 boundary. If present, ALIGNMENT_FLAG causes the assembler to
12971 allocate SIZE on a long word boundary.
12973 `.byte VALUE [,...,VALUE_N]'
12974 `.ubyte VALUE [,...,VALUE_N]'
12975 `.char VALUE [,...,VALUE_N]'
12976 `.uchar VALUE [,...,VALUE_N]'
12977 Place one or more bytes into consecutive words of the current
12978 section. The upper 8 bits of each word is zero-filled. If a
12979 label is used, it points to the word allocated for the first byte
12982 `.clink ["SECTION_NAME"]'
12983 Set STYP_CLINK flag for this section, which indicates to the
12984 linker that if no symbols from this section are referenced, the
12985 section should not be included in the link. If SECTION_NAME is
12986 omitted, the current section is used.
12991 `.copy "FILENAME" | FILENAME'
12992 `.include "FILENAME" | FILENAME'
12993 Read source statements from FILENAME. The normal include search
12994 path is used. Normally .copy will cause statements from the
12995 included file to be printed in the assembly listing and .include
12996 will not, but this distinction is not currently implemented.
12999 Begin assembling code into the .data section.
13001 `.double VALUE [,...,VALUE_N]'
13002 `.ldouble VALUE [,...,VALUE_N]'
13003 `.float VALUE [,...,VALUE_N]'
13004 `.xfloat VALUE [,...,VALUE_N]'
13005 Place an IEEE single-precision floating-point representation of
13006 one or more floating-point values into the current section. All
13007 but `.xfloat' align the result on a longword boundary. Values are
13008 stored most-significant word first.
13012 Control printing of directives to the listing file. Ignored.
13017 Emit a user-defined error, message, or warning, respectively.
13020 Use extended addressing when assembling statements. This should
13021 appear only once per file, and is equivalent to the -mfar-mode
13022 option *note `-mfar-mode': TIC54X-Opts..
13026 Control printing of false conditional blocks to the listing file.
13028 `.field VALUE [,SIZE]'
13029 Initialize a bitfield of SIZE bits in the current section. If
13030 VALUE is relocatable, then SIZE must be 16. SIZE defaults to 16
13031 bits. If VALUE does not fit into SIZE bits, the value will be
13032 truncated. Successive `.field' directives will pack starting at
13033 the current word, filling the most significant bits first, and
13034 aligning to the start of the next word if the field size does not
13035 fit into the space remaining in the current word. A `.align'
13036 directive with an operand of 1 will force the next `.field'
13037 directive to begin packing into a new word. If a label is used, it
13038 points to the word that contains the specified field.
13040 `.global SYMBOL [,...,SYMBOL_N]'
13041 `.def SYMBOL [,...,SYMBOL_N]'
13042 `.ref SYMBOL [,...,SYMBOL_N]'
13043 `.def' nominally identifies a symbol defined in the current file
13044 and availalbe to other files. `.ref' identifies a symbol used in
13045 the current file but defined elsewhere. Both map to the standard
13046 `.global' directive.
13048 `.half VALUE [,...,VALUE_N]'
13049 `.uhalf VALUE [,...,VALUE_N]'
13050 `.short VALUE [,...,VALUE_N]'
13051 `.ushort VALUE [,...,VALUE_N]'
13052 `.int VALUE [,...,VALUE_N]'
13053 `.uint VALUE [,...,VALUE_N]'
13054 `.word VALUE [,...,VALUE_N]'
13055 `.uword VALUE [,...,VALUE_N]'
13056 Place one or more values into consecutive words of the current
13057 section. If a label is used, it points to the word allocated for
13058 the first value encountered.
13061 Define a special SYMBOL to refer to the load time address of the
13062 current section program counter.
13066 Set the page length and width of the output listing file. Ignored.
13070 Control whether the source listing is printed. Ignored.
13072 `.long VALUE [,...,VALUE_N]'
13073 `.ulong VALUE [,...,VALUE_N]'
13074 `.xlong VALUE [,...,VALUE_N]'
13075 Place one or more 32-bit values into consecutive words in the
13076 current section. The most significant word is stored first.
13077 `.long' and `.ulong' align the result on a longword boundary;
13081 `.break [CONDITION]'
13083 Repeatedly assemble a block of code. `.loop' begins the block, and
13084 `.endloop' marks its termination. COUNT defaults to 1024, and
13085 indicates the number of times the block should be repeated.
13086 `.break' terminates the loop so that assembly begins after the
13087 `.endloop' directive. The optional CONDITION will cause the loop
13088 to terminate only if it evaluates to zero.
13090 `MACRO_NAME .macro [PARAM1][,...PARAM_N]'
13093 See the section on macros for more explanation (*Note
13096 `.mlib "FILENAME" | FILENAME'
13097 Load the macro library FILENAME. FILENAME must be an archived
13098 library (BFD ar-compatible) of text files, expected to contain
13099 only macro definitions. The standard include search path is used.
13104 Control whether to include macro and loop block expansions in the
13105 listing output. Ignored.
13108 Define global symbolic names for the 'c54x registers. Supposedly
13109 equivalent to executing `.set' directives for each register with
13110 its memory-mapped value, but in reality is provided only for
13111 compatibility and does nothing.
13114 This directive resets any TIC54X local labels currently defined.
13115 Normal `as' local labels are unaffected.
13117 `.option OPTION_LIST'
13118 Set listing options. Ignored.
13120 `.sblock "SECTION_NAME" | SECTION_NAME [,"NAME_N" | NAME_N]'
13121 Designate SECTION_NAME for blocking. Blocking guarantees that a
13122 section will start on a page boundary (128 words) if it would
13123 otherwise cross a page boundary. Only initialized sections may be
13124 designated with this directive. See also *Note TIC54X-Block::.
13126 `.sect "SECTION_NAME"'
13127 Define a named initialized section and make it the current section.
13129 `SYMBOL .set "VALUE"'
13130 `SYMBOL .equ "VALUE"'
13131 Equate a constant VALUE to a SYMBOL, which is placed in the symbol
13132 table. SYMBOL may not be previously defined.
13134 `.space SIZE_IN_BITS'
13135 `.bes SIZE_IN_BITS'
13136 Reserve the given number of bits in the current section and
13137 zero-fill them. If a label is used with `.space', it points to the
13138 *first* word reserved. With `.bes', the label points to the
13139 *last* word reserved.
13143 Controls the inclusion of subsym replacement in the listing
13146 `.string "STRING" [,...,"STRING_N"]'
13147 `.pstring "STRING" [,...,"STRING_N"]'
13148 Place 8-bit characters from STRING into the current section.
13149 `.string' zero-fills the upper 8 bits of each word, while
13150 `.pstring' puts two characters into each word, filling the
13151 most-significant bits first. Unused space is zero-filled. If a
13152 label is used, it points to the first word initialized.
13154 `[STAG] .struct [OFFSET]'
13155 `[NAME_1] element [COUNT_1]'
13156 `[NAME_2] element [COUNT_2]'
13157 `[TNAME] .tag STAGX [TCOUNT]'
13159 `[NAME_N] element [COUNT_N]'
13160 `[SSIZE] .endstruct'
13161 `LABEL .tag [STAG]'
13162 Assign symbolic offsets to the elements of a structure. STAG
13163 defines a symbol to use to reference the structure. OFFSET
13164 indicates a starting value to use for the first element
13165 encountered; otherwise it defaults to zero. Each element can have
13166 a named offset, NAME, which is a symbol assigned the value of the
13167 element's offset into the structure. If STAG is missing, these
13168 become global symbols. COUNT adjusts the offset that many times,
13169 as if `element' were an array. `element' may be one of `.byte',
13170 `.word', `.long', `.float', or any equivalent of those, and the
13171 structure offset is adjusted accordingly. `.field' and `.string'
13172 are also allowed; the size of `.field' is one bit, and `.string'
13173 is considered to be one word in size. Only element descriptors,
13174 structure/union tags, `.align' and conditional assembly directives
13175 are allowed within `.struct'/`.endstruct'. `.align' aligns member
13176 offsets to word boundaries only. SSIZE, if provided, will always
13177 be assigned the size of the structure.
13179 The `.tag' directive, in addition to being used to define a
13180 structure/union element within a structure, may be used to apply a
13181 structure to a symbol. Once applied to LABEL, the individual
13182 structure elements may be applied to LABEL to produce the desired
13183 offsets using LABEL as the structure base.
13186 Set the tab size in the output listing. Ignored.
13189 `[NAME_1] element [COUNT_1]'
13190 `[NAME_2] element [COUNT_2]'
13191 `[TNAME] .tag UTAGX[,TCOUNT]'
13193 `[NAME_N] element [COUNT_N]'
13194 `[USIZE] .endstruct'
13195 `LABEL .tag [UTAG]'
13196 Similar to `.struct', but the offset after each element is reset to
13197 zero, and the USIZE is set to the maximum of all defined elements.
13198 Starting offset for the union is always zero.
13200 `[SYMBOL] .usect "SECTION_NAME", SIZE, [,[BLOCKING_FLAG] [,ALIGNMENT_FLAG]]'
13201 Reserve space for variables in a named, uninitialized section
13202 (similar to .bss). `.usect' allows definitions sections
13203 independent of .bss. SYMBOL points to the first location reserved
13204 by this allocation. The symbol may be used as a variable name.
13205 SIZE is the allocated size in words. BLOCKING_FLAG indicates
13206 whether to block this section on a page boundary (128 words)
13207 (*note TIC54X-Block::). ALIGNMENT FLAG indicates whether the
13208 section should be longword-aligned.
13210 `.var SYM[,..., SYM_N]'
13211 Define a subsym to be a local variable within a macro. See *Note
13215 Set which processor to build instructions for. Though the
13216 following values are accepted, the op is ignored.
13226 File: as.info, Node: TIC54X-Macros, Next: TIC54X-MMRegs, Prev: TIC54X-Directives, Up: TIC54X-Dependent
13231 Macros do not require explicit dereferencing of arguments (i.e.
13234 During macro expansion, the macro parameters are converted to
13235 subsyms. If the number of arguments passed the macro invocation
13236 exceeds the number of parameters defined, the last parameter is
13237 assigned the string equivalent of all remaining arguments. If fewer
13238 arguments are given than parameters, the missing parameters are
13239 assigned empty strings. To include a comma in an argument, you must
13240 enclose the argument in quotes.
13242 The following built-in subsym functions allow examination of the
13243 string value of subsyms (or ordinary strings). The arguments are
13244 strings unless otherwise indicated (subsyms passed as args will be
13245 replaced by the strings they represent).
13247 Returns the length of STR.
13249 ``$symcmp(STR1,STR2)''
13250 Returns 0 if STR1 == STR2, non-zero otherwise.
13252 ``$firstch(STR,CH)''
13253 Returns index of the first occurrence of character constant CH in
13256 ``$lastch(STR,CH)''
13257 Returns index of the last occurrence of character constant CH in
13260 ``$isdefed(SYMBOL)''
13261 Returns zero if the symbol SYMBOL is not in the symbol table,
13262 non-zero otherwise.
13264 ``$ismember(SYMBOL,LIST)''
13265 Assign the first member of comma-separated string LIST to SYMBOL;
13266 LIST is reassigned the remainder of the list. Returns zero if
13267 LIST is a null string. Both arguments must be subsyms.
13270 Returns 1 if string EXPR is binary, 2 if octal, 3 if hexadecimal,
13271 4 if a character, 5 if decimal, and zero if not an integer.
13274 Returns 1 if NAME is a valid symbol name, zero otherwise.
13277 Returns 1 if REG is a valid predefined register name (AR0-AR7
13280 ``$structsz(STAG)''
13281 Returns the size of the structure or union represented by STAG.
13283 ``$structacc(STAG)''
13284 Returns the reference point of the structure or union represented
13285 by STAG. Always returns zero.
13288 File: as.info, Node: TIC54X-MMRegs, Prev: TIC54X-Macros, Up: TIC54X-Dependent
13290 Memory-mapped Registers
13291 -----------------------
13293 The following symbols are recognized as memory-mapped registers:
13296 File: as.info, Node: Z80-Dependent, Next: Z8000-Dependent, Prev: Xtensa-Dependent, Up: Machine Dependencies
13298 Z80 Dependent Features
13299 ======================
13303 * Z80 Options:: Options
13304 * Z80 Syntax:: Syntax
13305 * Z80 Floating Point:: Floating Point
13306 * Z80 Directives:: Z80 Machine Directives
13307 * Z80 Opcodes:: Opcodes
13310 File: as.info, Node: Z80 Options, Next: Z80 Syntax, Up: Z80-Dependent
13315 The Zilog Z80 and Ascii R800 version of `as' have a few machine
13318 Produce code for the Z80 processor. There are additional options to
13319 request warnings and error messages for undocumented instructions.
13321 `-ignore-undocumented-instructions'
13323 Silently assemble undocumented Z80-instructions that have been
13324 adopted as documented R800-instructions.
13326 `-ignore-unportable-instructions'
13328 Silently assemble all undocumented Z80-instructions.
13330 `-warn-undocumented-instructions'
13332 Issue warnings for undocumented Z80-instructions that work on
13333 R800, do not assemble other undocumented instructions without
13336 `-warn-unportable-instructions'
13338 Issue warnings for other undocumented Z80-instructions, do not
13339 treat any undocumented instructions as errors.
13341 `-forbid-undocumented-instructions'
13343 Treat all undocumented z80-instructions as errors.
13345 `-forbid-unportable-instructions'
13347 Treat undocumented z80-instructions that do not work on R800 as
13351 Produce code for the R800 processor. The assembler does not support
13352 undocumented instructions for the R800. In line with common
13353 practice, `as' uses Z80 instriction names for the R800 processor,
13354 as far as they exist.
13357 File: as.info, Node: Z80 Syntax, Next: Z80 Floating Point, Prev: Z80 Options, Up: Z80-Dependent
13362 The assembler syntax closely follows the 'Z80 family CPU User
13363 Manual' by Zilog. In expressions a single `=' may be used as "is equal
13364 to" comparison operator.
13366 Suffices can be used to indicate the radix of integer constants; `H'
13367 or `h' for hexadecimal, `D' or `d' for decimal, `Q', `O', `q' or `o'
13368 for octal, and `B' for binary.
13370 The suffix `b' denotes a backreference to local label.
13374 * Z80-Chars:: Special Characters
13375 * Z80-Regs:: Register Names
13376 * Z80-Case:: Case Sensitivity
13379 File: as.info, Node: Z80-Chars, Next: Z80-Regs, Up: Z80 Syntax
13384 The semicolon `;' is the line comment character;
13386 The dollar sign `$' can be used as a prefix for hexadecimal numbers
13387 and as a symbol denoting the current location counter.
13389 A backslash `\' is an ordinary character for the Z80 assembler.
13391 The single quote `'' must be followed by a closing quote. If there
13392 is one character inbetween, it is a character constant, otherwise it is
13396 File: as.info, Node: Z80-Regs, Next: Z80-Case, Prev: Z80-Chars, Up: Z80 Syntax
13401 The registers are referred to with the letters assigned to them by
13402 Zilog. In addition `as' recognises `ixl' and `ixh' as the least and
13403 most significant octet in `ix', and similarly `iyl' and `iyh' as parts
13407 File: as.info, Node: Z80-Case, Prev: Z80-Regs, Up: Z80 Syntax
13412 Upper and lower case are equivalent in register names, opcodes,
13413 condition codes and assembler directives. The case of letters is
13414 significant in labels and symbol names. The case is also important to
13415 distinguish the suffix `b' for a backward reference to a local label
13416 from the suffix `B' for a number in binary notation.
13419 File: as.info, Node: Z80 Floating Point, Next: Z80 Directives, Prev: Z80 Syntax, Up: Z80-Dependent
13424 Floating-point numbers are not supported.
13427 File: as.info, Node: Z80 Directives, Next: Z80 Opcodes, Prev: Z80 Floating Point, Up: Z80-Dependent
13429 Z80 Assembler Directives
13430 ------------------------
13432 `as' for the Z80 supports some additional directives for
13433 compatibility with other assemblers.
13435 These are the additional directives in `as' for the Z80:
13437 `db EXPRESSION|STRING[,EXPRESSION|STRING...]'
13438 `defb EXPRESSION|STRING[,EXPRESSION|STRING...]'
13439 For each STRING the characters are copied to the object file, for
13440 each other EXPRESSION the value is stored in one byte, ignoring
13443 `dw EXPRESSION[,EXPRESSION...]'
13444 `defw EXPRESSION[,EXPRESSION...]'
13445 For each EXPRESSION the value is stored in two bytes, ignoring
13448 `ds COUNT[, VALUE]'
13449 `defs COUNT[, VALUE]'
13450 Fill COUNT bytes in the object file with VALUE, if VALUE is
13451 omitted it defaults to zero.
13453 `SYMBOL equ EXPRESSION'
13454 `SYMBOL defl EXPRESSION'
13455 These directives set the value of SYMBOL to EXPRESSION. If `equ'
13456 is used, it is an error if SYMBOL is already defined. Symbols
13457 defined with `equ' are not protected from redefinition.
13460 This is a normal instruction on Z80, and not an assembler
13464 A synonym for *Note Section::, no second argument should be given.
13467 File: as.info, Node: Z80 Opcodes, Prev: Z80 Directives, Up: Z80-Dependent
13472 In line with commmon practice Z80 mnonics are used for both the Z80
13475 In many instructions it is possible to use one of the half index
13476 registers (`ixl',`ixh',`iyl',`iyh') in stead of an 8-bit general
13477 purpose register. This yields instructions that are documented on the
13478 R800 and undocumented on the Z80. Similarly `in f,(c)' is documented
13479 on the R800 and undocumented on the Z80.
13481 The assembler also supports the following undocumented
13482 Z80-instructions, that have not been adopted in the R800 instruction
13485 Sends zero to the port pointed to by register c.
13488 Equivalent to `M = (M<<1)+1', the operand M can be any operand
13489 that is valid for `sla'. One can use `sll' as a synonym for `sli'.
13492 This is equivalent to
13498 The operation `OPC' may be any of `res B,', `set B,', `rl', `rlc',
13499 `rr', `rrc', `sla', `sli', `sra' and `srl', and the register `R'
13500 may be any of `a', `b', `c', `d', `e', `h' and `l'.
13503 As above, but with `iy' instead of `ix'.
13505 The web site at `http://www.z80.info' is a good starting place to
13506 find more information on programming the Z80.
13509 File: as.info, Node: Z8000-Dependent, Next: Vax-Dependent, Prev: Z80-Dependent, Up: Machine Dependencies
13511 Z8000 Dependent Features
13512 ========================
13514 The Z8000 as supports both members of the Z8000 family: the
13515 unsegmented Z8002, with 16 bit addresses, and the segmented Z8001 with
13518 When the assembler is in unsegmented mode (specified with the
13519 `unsegm' directive), an address takes up one word (16 bit) sized
13520 register. When the assembler is in segmented mode (specified with the
13521 `segm' directive), a 24-bit address takes up a long (32 bit) register.
13522 *Note Assembler Directives for the Z8000: Z8000 Directives, for a list
13523 of other Z8000 specific assembler directives.
13527 * Z8000 Options:: Command-line options for the Z8000
13528 * Z8000 Syntax:: Assembler syntax for the Z8000
13529 * Z8000 Directives:: Special directives for the Z8000
13530 * Z8000 Opcodes:: Opcodes
13533 File: as.info, Node: Z8000 Options, Next: Z8000 Syntax, Up: Z8000-Dependent
13539 Generate segmented code by default.
13542 Generate unsegmented code by default.
13545 File: as.info, Node: Z8000 Syntax, Next: Z8000 Directives, Prev: Z8000 Options, Up: Z8000-Dependent
13552 * Z8000-Chars:: Special Characters
13553 * Z8000-Regs:: Register Names
13554 * Z8000-Addressing:: Addressing Modes
13557 File: as.info, Node: Z8000-Chars, Next: Z8000-Regs, Up: Z8000 Syntax
13562 `!' is the line comment character.
13564 You can use `;' instead of a newline to separate statements.
13567 File: as.info, Node: Z8000-Regs, Next: Z8000-Addressing, Prev: Z8000-Chars, Up: Z8000 Syntax
13572 The Z8000 has sixteen 16 bit registers, numbered 0 to 15. You can
13573 refer to different sized groups of registers by register number, with
13574 the prefix `r' for 16 bit registers, `rr' for 32 bit registers and `rq'
13575 for 64 bit registers. You can also refer to the contents of the first
13576 eight (of the sixteen 16 bit registers) by bytes. They are named `rlN'
13580 rl0 rh0 rl1 rh1 rl2 rh2 rl3 rh3
13581 rl4 rh4 rl5 rh5 rl6 rh6 rl7 rh7
13584 r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15
13586 _long word registers_
13587 rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14
13589 _quad word registers_
13593 File: as.info, Node: Z8000-Addressing, Prev: Z8000-Regs, Up: Z8000 Syntax
13598 as understands the following addressing modes for the Z8000:
13605 Register direct: 8bit, 16bit, 32bit, and 64bit registers.
13609 Indirect register: @rrN in segmented mode, @rN in unsegmented
13613 Direct: the 16 bit or 24 bit address (depending on whether the
13614 assembler is in segmented or unsegmented mode) of the operand is
13615 in the instruction.
13618 Indexed: the 16 or 24 bit address is added to the 16 bit register
13619 to produce the final address in memory of the operand.
13623 Base Address: the 16 or 24 bit register is added to the 16 bit sign
13624 extended immediate displacement to produce the final address in
13625 memory of the operand.
13629 Base Index: the 16 or 24 bit register rN or rrN is added to the
13630 sign extended 16 bit index register rM to produce the final
13631 address in memory of the operand.
13637 File: as.info, Node: Z8000 Directives, Next: Z8000 Opcodes, Prev: Z8000 Syntax, Up: Z8000-Dependent
13639 Assembler Directives for the Z8000
13640 ----------------------------------
13642 The Z8000 port of as includes additional assembler directives, for
13643 compatibility with other Z8000 assemblers. These do not begin with `.'
13644 (unlike the ordinary as directives).
13648 Generate code for the segmented Z8001.
13652 Generate code for the unsegmented Z8002.
13655 Synonym for `.file'
13658 Synonym for `.global'
13661 Synonym for `.word'
13664 Synonym for `.long'
13667 Synonym for `.byte'
13670 Assemble a string. `sval' expects one string literal, delimited by
13671 single quotes. It assembles each byte of the string into
13672 consecutive addresses. You can use the escape sequence `%XX'
13673 (where XX represents a two-digit hexadecimal number) to represent
13674 the character whose ASCII value is XX. Use this feature to
13675 describe single quote and other characters that may not appear in
13676 string literals as themselves. For example, the C statement
13677 `char *a = "he said \"it's 50% off\"";' is represented in Z8000
13678 assembly language (shown with the assembler output in hex at the
13681 68652073 sval 'he said %22it%27s 50%25 off%22%00'
13689 synonym for `.section'
13692 synonym for `.space'
13695 special case of `.align'; aligns output to even byte boundary.
13698 File: as.info, Node: Z8000 Opcodes, Prev: Z8000 Directives, Up: Z8000-Dependent
13703 For detailed information on the Z8000 machine instruction set, see
13704 `Z8000 Technical Manual'.
13706 The following table summarizes the opcodes and their arguments:
13708 rs 16 bit source register
13709 rd 16 bit destination register
13710 rbs 8 bit source register
13711 rbd 8 bit destination register
13712 rrs 32 bit source register
13713 rrd 32 bit destination register
13714 rqs 64 bit source register
13715 rqd 64 bit destination register
13716 addr 16/24 bit address
13719 adc rd,rs clrb addr cpsir @rd,@rs,rr,cc
13720 adcb rbd,rbs clrb addr(rd) cpsirb @rd,@rs,rr,cc
13721 add rd,@rs clrb rbd dab rbd
13722 add rd,addr com @rd dbjnz rbd,disp7
13723 add rd,addr(rs) com addr dec @rd,imm4m1
13724 add rd,imm16 com addr(rd) dec addr(rd),imm4m1
13725 add rd,rs com rd dec addr,imm4m1
13726 addb rbd,@rs comb @rd dec rd,imm4m1
13727 addb rbd,addr comb addr decb @rd,imm4m1
13728 addb rbd,addr(rs) comb addr(rd) decb addr(rd),imm4m1
13729 addb rbd,imm8 comb rbd decb addr,imm4m1
13730 addb rbd,rbs comflg flags decb rbd,imm4m1
13731 addl rrd,@rs cp @rd,imm16 di i2
13732 addl rrd,addr cp addr(rd),imm16 div rrd,@rs
13733 addl rrd,addr(rs) cp addr,imm16 div rrd,addr
13734 addl rrd,imm32 cp rd,@rs div rrd,addr(rs)
13735 addl rrd,rrs cp rd,addr div rrd,imm16
13736 and rd,@rs cp rd,addr(rs) div rrd,rs
13737 and rd,addr cp rd,imm16 divl rqd,@rs
13738 and rd,addr(rs) cp rd,rs divl rqd,addr
13739 and rd,imm16 cpb @rd,imm8 divl rqd,addr(rs)
13740 and rd,rs cpb addr(rd),imm8 divl rqd,imm32
13741 andb rbd,@rs cpb addr,imm8 divl rqd,rrs
13742 andb rbd,addr cpb rbd,@rs djnz rd,disp7
13743 andb rbd,addr(rs) cpb rbd,addr ei i2
13744 andb rbd,imm8 cpb rbd,addr(rs) ex rd,@rs
13745 andb rbd,rbs cpb rbd,imm8 ex rd,addr
13746 bit @rd,imm4 cpb rbd,rbs ex rd,addr(rs)
13747 bit addr(rd),imm4 cpd rd,@rs,rr,cc ex rd,rs
13748 bit addr,imm4 cpdb rbd,@rs,rr,cc exb rbd,@rs
13749 bit rd,imm4 cpdr rd,@rs,rr,cc exb rbd,addr
13750 bit rd,rs cpdrb rbd,@rs,rr,cc exb rbd,addr(rs)
13751 bitb @rd,imm4 cpi rd,@rs,rr,cc exb rbd,rbs
13752 bitb addr(rd),imm4 cpib rbd,@rs,rr,cc ext0e imm8
13753 bitb addr,imm4 cpir rd,@rs,rr,cc ext0f imm8
13754 bitb rbd,imm4 cpirb rbd,@rs,rr,cc ext8e imm8
13755 bitb rbd,rs cpl rrd,@rs ext8f imm8
13756 bpt cpl rrd,addr exts rrd
13757 call @rd cpl rrd,addr(rs) extsb rd
13758 call addr cpl rrd,imm32 extsl rqd
13759 call addr(rd) cpl rrd,rrs halt
13760 calr disp12 cpsd @rd,@rs,rr,cc in rd,@rs
13761 clr @rd cpsdb @rd,@rs,rr,cc in rd,imm16
13762 clr addr cpsdr @rd,@rs,rr,cc inb rbd,@rs
13763 clr addr(rd) cpsdrb @rd,@rs,rr,cc inb rbd,imm16
13764 clr rd cpsi @rd,@rs,rr,cc inc @rd,imm4m1
13765 clrb @rd cpsib @rd,@rs,rr,cc inc addr(rd),imm4m1
13766 inc addr,imm4m1 ldb rbd,rs(rx) mult rrd,addr(rs)
13767 inc rd,imm4m1 ldb rd(imm16),rbs mult rrd,imm16
13768 incb @rd,imm4m1 ldb rd(rx),rbs mult rrd,rs
13769 incb addr(rd),imm4m1 ldctl ctrl,rs multl rqd,@rs
13770 incb addr,imm4m1 ldctl rd,ctrl multl rqd,addr
13771 incb rbd,imm4m1 ldd @rs,@rd,rr multl rqd,addr(rs)
13772 ind @rd,@rs,ra lddb @rs,@rd,rr multl rqd,imm32
13773 indb @rd,@rs,rba lddr @rs,@rd,rr multl rqd,rrs
13774 inib @rd,@rs,ra lddrb @rs,@rd,rr neg @rd
13775 inibr @rd,@rs,ra ldi @rd,@rs,rr neg addr
13776 iret ldib @rd,@rs,rr neg addr(rd)
13777 jp cc,@rd ldir @rd,@rs,rr neg rd
13778 jp cc,addr ldirb @rd,@rs,rr negb @rd
13779 jp cc,addr(rd) ldk rd,imm4 negb addr
13780 jr cc,disp8 ldl @rd,rrs negb addr(rd)
13781 ld @rd,imm16 ldl addr(rd),rrs negb rbd
13782 ld @rd,rs ldl addr,rrs nop
13783 ld addr(rd),imm16 ldl rd(imm16),rrs or rd,@rs
13784 ld addr(rd),rs ldl rd(rx),rrs or rd,addr
13785 ld addr,imm16 ldl rrd,@rs or rd,addr(rs)
13786 ld addr,rs ldl rrd,addr or rd,imm16
13787 ld rd(imm16),rs ldl rrd,addr(rs) or rd,rs
13788 ld rd(rx),rs ldl rrd,imm32 orb rbd,@rs
13789 ld rd,@rs ldl rrd,rrs orb rbd,addr
13790 ld rd,addr ldl rrd,rs(imm16) orb rbd,addr(rs)
13791 ld rd,addr(rs) ldl rrd,rs(rx) orb rbd,imm8
13792 ld rd,imm16 ldm @rd,rs,n orb rbd,rbs
13793 ld rd,rs ldm addr(rd),rs,n out @rd,rs
13794 ld rd,rs(imm16) ldm addr,rs,n out imm16,rs
13795 ld rd,rs(rx) ldm rd,@rs,n outb @rd,rbs
13796 lda rd,addr ldm rd,addr(rs),n outb imm16,rbs
13797 lda rd,addr(rs) ldm rd,addr,n outd @rd,@rs,ra
13798 lda rd,rs(imm16) ldps @rs outdb @rd,@rs,rba
13799 lda rd,rs(rx) ldps addr outib @rd,@rs,ra
13800 ldar rd,disp16 ldps addr(rs) outibr @rd,@rs,ra
13801 ldb @rd,imm8 ldr disp16,rs pop @rd,@rs
13802 ldb @rd,rbs ldr rd,disp16 pop addr(rd),@rs
13803 ldb addr(rd),imm8 ldrb disp16,rbs pop addr,@rs
13804 ldb addr(rd),rbs ldrb rbd,disp16 pop rd,@rs
13805 ldb addr,imm8 ldrl disp16,rrs popl @rd,@rs
13806 ldb addr,rbs ldrl rrd,disp16 popl addr(rd),@rs
13807 ldb rbd,@rs mbit popl addr,@rs
13808 ldb rbd,addr mreq rd popl rrd,@rs
13809 ldb rbd,addr(rs) mres push @rd,@rs
13810 ldb rbd,imm8 mset push @rd,addr
13811 ldb rbd,rbs mult rrd,@rs push @rd,addr(rs)
13812 ldb rbd,rs(imm16) mult rrd,addr push @rd,imm16
13813 push @rd,rs set addr,imm4 subl rrd,imm32
13814 pushl @rd,@rs set rd,imm4 subl rrd,rrs
13815 pushl @rd,addr set rd,rs tcc cc,rd
13816 pushl @rd,addr(rs) setb @rd,imm4 tccb cc,rbd
13817 pushl @rd,rrs setb addr(rd),imm4 test @rd
13818 res @rd,imm4 setb addr,imm4 test addr
13819 res addr(rd),imm4 setb rbd,imm4 test addr(rd)
13820 res addr,imm4 setb rbd,rs test rd
13821 res rd,imm4 setflg imm4 testb @rd
13822 res rd,rs sinb rbd,imm16 testb addr
13823 resb @rd,imm4 sinb rd,imm16 testb addr(rd)
13824 resb addr(rd),imm4 sind @rd,@rs,ra testb rbd
13825 resb addr,imm4 sindb @rd,@rs,rba testl @rd
13826 resb rbd,imm4 sinib @rd,@rs,ra testl addr
13827 resb rbd,rs sinibr @rd,@rs,ra testl addr(rd)
13828 resflg imm4 sla rd,imm8 testl rrd
13829 ret cc slab rbd,imm8 trdb @rd,@rs,rba
13830 rl rd,imm1or2 slal rrd,imm8 trdrb @rd,@rs,rba
13831 rlb rbd,imm1or2 sll rd,imm8 trib @rd,@rs,rbr
13832 rlc rd,imm1or2 sllb rbd,imm8 trirb @rd,@rs,rbr
13833 rlcb rbd,imm1or2 slll rrd,imm8 trtdrb @ra,@rb,rbr
13834 rldb rbb,rba sout imm16,rs trtib @ra,@rb,rr
13835 rr rd,imm1or2 soutb imm16,rbs trtirb @ra,@rb,rbr
13836 rrb rbd,imm1or2 soutd @rd,@rs,ra trtrb @ra,@rb,rbr
13837 rrc rd,imm1or2 soutdb @rd,@rs,rba tset @rd
13838 rrcb rbd,imm1or2 soutib @rd,@rs,ra tset addr
13839 rrdb rbb,rba soutibr @rd,@rs,ra tset addr(rd)
13840 rsvd36 sra rd,imm8 tset rd
13841 rsvd38 srab rbd,imm8 tsetb @rd
13842 rsvd78 sral rrd,imm8 tsetb addr
13843 rsvd7e srl rd,imm8 tsetb addr(rd)
13844 rsvd9d srlb rbd,imm8 tsetb rbd
13845 rsvd9f srll rrd,imm8 xor rd,@rs
13846 rsvdb9 sub rd,@rs xor rd,addr
13847 rsvdbf sub rd,addr xor rd,addr(rs)
13848 sbc rd,rs sub rd,addr(rs) xor rd,imm16
13849 sbcb rbd,rbs sub rd,imm16 xor rd,rs
13850 sc imm8 sub rd,rs xorb rbd,@rs
13851 sda rd,rs subb rbd,@rs xorb rbd,addr
13852 sdab rbd,rs subb rbd,addr xorb rbd,addr(rs)
13853 sdal rrd,rs subb rbd,addr(rs) xorb rbd,imm8
13854 sdl rd,rs subb rbd,imm8 xorb rbd,rbs
13855 sdlb rbd,rs subb rbd,rbs xorb rbd,rbs
13856 sdll rrd,rs subl rrd,@rs
13857 set @rd,imm4 subl rrd,addr
13858 set addr(rd),imm4 subl rrd,addr(rs)
13861 File: as.info, Node: Vax-Dependent, Prev: Z8000-Dependent, Up: Machine Dependencies
13863 VAX Dependent Features
13864 ======================
13868 * VAX-Opts:: VAX Command-Line Options
13869 * VAX-float:: VAX Floating Point
13870 * VAX-directives:: Vax Machine Directives
13871 * VAX-opcodes:: VAX Opcodes
13872 * VAX-branch:: VAX Branch Improvement
13873 * VAX-operands:: VAX Operands
13874 * VAX-no:: Not Supported on VAX
13877 File: as.info, Node: VAX-Opts, Next: VAX-float, Up: Vax-Dependent
13879 VAX Command-Line Options
13880 ------------------------
13882 The Vax version of `as' accepts any of the following options, gives
13883 a warning message that the option was ignored and proceeds. These
13884 options are for compatibility with scripts designed for other people's
13888 ``-S' (Symbol Table)'
13889 ``-T' (Token Trace)'
13890 These are obsolete options used to debug old assemblers.
13892 ``-d' (Displacement size for JUMPs)'
13893 This option expects a number following the `-d'. Like options
13894 that expect filenames, the number may immediately follow the `-d'
13895 (old standard) or constitute the whole of the command line
13896 argument that follows `-d' (GNU standard).
13898 ``-V' (Virtualize Interpass Temporary File)'
13899 Some other assemblers use a temporary file. This option commanded
13900 them to keep the information in active memory rather than in a
13901 disk file. `as' always does this, so this option is redundant.
13903 ``-J' (JUMPify Longer Branches)'
13904 Many 32-bit computers permit a variety of branch instructions to
13905 do the same job. Some of these instructions are short (and fast)
13906 but have a limited range; others are long (and slow) but can
13907 branch anywhere in virtual memory. Often there are 3 flavors of
13908 branch: short, medium and long. Some other assemblers would emit
13909 short and medium branches, unless told by this option to emit
13910 short and long branches.
13912 ``-t' (Temporary File Directory)'
13913 Some other assemblers may use a temporary file, and this option
13914 takes a filename being the directory to site the temporary file.
13915 Since `as' does not use a temporary disk file, this option makes
13916 no difference. `-t' needs exactly one filename.
13918 The Vax version of the assembler accepts additional options when
13922 External symbol or section (used for global variables) names are
13923 not case sensitive on VAX/VMS and always mapped to upper case.
13924 This is contrary to the C language definition which explicitly
13925 distinguishes upper and lower case. To implement a standard
13926 conforming C compiler, names must be changed (mapped) to preserve
13927 the case information. The default mapping is to convert all lower
13928 case characters to uppercase and adding an underscore followed by
13929 a 6 digit hex value, representing a 24 digit binary value. The
13930 one digits in the binary value represent which characters are
13931 uppercase in the original symbol name.
13933 The `-h N' option determines how we map names. This takes several
13934 values. No `-h' switch at all allows case hacking as described
13935 above. A value of zero (`-h0') implies names should be upper
13936 case, and inhibits the case hack. A value of 2 (`-h2') implies
13937 names should be all lower case, with no case hack. A value of 3
13938 (`-h3') implies that case should be preserved. The value 1 is
13939 unused. The `-H' option directs `as' to display every mapped
13940 symbol during assembly.
13942 Symbols whose names include a dollar sign `$' are exceptions to the
13943 general name mapping. These symbols are normally only used to
13944 reference VMS library names. Such symbols are always mapped to
13948 The `-+' option causes `as' to truncate any symbol name larger
13949 than 31 characters. The `-+' option also prevents some code
13950 following the `_main' symbol normally added to make the object
13951 file compatible with Vax-11 "C".
13954 This option is ignored for backward compatibility with `as'
13958 The `-H' option causes `as' to print every symbol which was
13959 changed by case mapping.
13962 File: as.info, Node: VAX-float, Next: VAX-directives, Prev: VAX-Opts, Up: Vax-Dependent
13967 Conversion of flonums to floating point is correct, and compatible
13968 with previous assemblers. Rounding is towards zero if the remainder is
13969 exactly half the least significant bit.
13971 `D', `F', `G' and `H' floating point formats are understood.
13973 Immediate floating literals (_e.g._ `S`$6.9') are rendered
13974 correctly. Again, rounding is towards zero in the boundary case.
13976 The `.float' directive produces `f' format numbers. The `.double'
13977 directive produces `d' format numbers.
13980 File: as.info, Node: VAX-directives, Next: VAX-opcodes, Prev: VAX-float, Up: Vax-Dependent
13982 Vax Machine Directives
13983 ----------------------
13985 The Vax version of the assembler supports four directives for
13986 generating Vax floating point constants. They are described in the
13990 This expects zero or more flonums, separated by commas, and
13991 assembles Vax `d' format 64-bit floating point constants.
13994 This expects zero or more flonums, separated by commas, and
13995 assembles Vax `f' format 32-bit floating point constants.
13998 This expects zero or more flonums, separated by commas, and
13999 assembles Vax `g' format 64-bit floating point constants.
14002 This expects zero or more flonums, separated by commas, and
14003 assembles Vax `h' format 128-bit floating point constants.
14006 File: as.info, Node: VAX-opcodes, Next: VAX-branch, Prev: VAX-directives, Up: Vax-Dependent
14011 All DEC mnemonics are supported. Beware that `case...' instructions
14012 have exactly 3 operands. The dispatch table that follows the `case...'
14013 instruction should be made with `.word' statements. This is compatible
14014 with all unix assemblers we know of.
14017 File: as.info, Node: VAX-branch, Next: VAX-operands, Prev: VAX-opcodes, Up: Vax-Dependent
14019 VAX Branch Improvement
14020 ----------------------
14022 Certain pseudo opcodes are permitted. They are for branch
14023 instructions. They expand to the shortest branch instruction that
14024 reaches the target. Generally these mnemonics are made by substituting
14025 `j' for `b' at the start of a DEC mnemonic. This feature is included
14026 both for compatibility and to help compilers. If you do not need this
14027 feature, avoid these opcodes. Here are the mnemonics, and the code
14028 they can expand into.
14031 `Jsb' is already an instruction mnemonic, so we chose `jbsb'.
14032 (byte displacement)
14035 (word displacement)
14038 (long displacement)
14043 Unconditional branch.
14044 (byte displacement)
14047 (word displacement)
14050 (long displacement)
14054 COND may be any one of the conditional branches `neq', `nequ',
14055 `eql', `eqlu', `gtr', `geq', `lss', `gtru', `lequ', `vc', `vs',
14056 `gequ', `cc', `lssu', `cs'. COND may also be one of the bit tests
14057 `bs', `bc', `bss', `bcs', `bsc', `bcc', `bssi', `bcci', `lbs',
14058 `lbc'. NOTCOND is the opposite condition to COND.
14059 (byte displacement)
14062 (word displacement)
14063 `bNOTCOND foo ; brw ... ; foo:'
14065 (long displacement)
14066 `bNOTCOND foo ; jmp ... ; foo:'
14069 X may be one of `b d f g h l w'.
14070 (word displacement)
14073 (long displacement)
14080 YYY may be one of `lss leq'.
14083 ZZZ may be one of `geq gtr'.
14084 (byte displacement)
14087 (word displacement)
14090 foo: brw DESTINATION ;
14093 (long displacement)
14096 foo: jmp DESTINATION ;
14104 (byte displacement)
14107 (word displacement)
14110 foo: brw DESTINATION ;
14113 (long displacement)
14116 foo: jmp DESTINATION ;
14120 File: as.info, Node: VAX-operands, Next: VAX-no, Prev: VAX-branch, Up: Vax-Dependent
14125 The immediate character is `$' for Unix compatibility, not `#' as
14128 The indirect character is `*' for Unix compatibility, not `@' as DEC
14131 The displacement sizing character is ``' (an accent grave) for Unix
14132 compatibility, not `^' as DEC writes it. The letter preceding ``' may
14133 have either case. `G' is not understood, but all other letters (`b i l
14134 s w') are understood.
14136 Register names understood are `r0 r1 r2 ... r15 ap fp sp pc'. Upper
14137 and lower case letters are equivalent.
14142 Any expression is permitted in an operand. Operands are comma
14146 File: as.info, Node: VAX-no, Prev: VAX-operands, Up: Vax-Dependent
14148 Not Supported on VAX
14149 --------------------
14151 Vax bit fields can not be assembled with `as'. Someone can add the
14152 required code if they really need it.
14155 File: as.info, Node: V850-Dependent, Next: Xtensa-Dependent, Prev: TIC54X-Dependent, Up: Machine Dependencies
14157 v850 Dependent Features
14158 =======================
14162 * V850 Options:: Options
14163 * V850 Syntax:: Syntax
14164 * V850 Floating Point:: Floating Point
14165 * V850 Directives:: V850 Machine Directives
14166 * V850 Opcodes:: Opcodes
14169 File: as.info, Node: V850 Options, Next: V850 Syntax, Up: V850-Dependent
14174 `as' supports the following additional command-line options for the
14175 V850 processor family:
14177 `-wsigned_overflow'
14178 Causes warnings to be produced when signed immediate values
14179 overflow the space available for then within their opcodes. By
14180 default this option is disabled as it is possible to receive
14181 spurious warnings due to using exact bit patterns as immediate
14184 `-wunsigned_overflow'
14185 Causes warnings to be produced when unsigned immediate values
14186 overflow the space available for then within their opcodes. By
14187 default this option is disabled as it is possible to receive
14188 spurious warnings due to using exact bit patterns as immediate
14192 Specifies that the assembled code should be marked as being
14193 targeted at the V850 processor. This allows the linker to detect
14194 attempts to link such code with code assembled for other
14198 Specifies that the assembled code should be marked as being
14199 targeted at the V850E processor. This allows the linker to detect
14200 attempts to link such code with code assembled for other
14204 Specifies that the assembled code should be marked as being
14205 targeted at the V850E1 processor. This allows the linker to
14206 detect attempts to link such code with code assembled for other
14210 Specifies that the assembled code should be marked as being
14211 targeted at the V850 processor but support instructions that are
14212 specific to the extended variants of the process. This allows the
14213 production of binaries that contain target specific code, but
14214 which are also intended to be used in a generic fashion. For
14215 example libgcc.a contains generic routines used by the code
14216 produced by GCC for all versions of the v850 architecture,
14217 together with support routines only used by the V850E architecture.
14220 Enables relaxation. This allows the .longcall and .longjump pseudo
14221 ops to be used in the assembler source code. These ops label
14222 sections of code which are either a long function call or a long
14223 branch. The assembler will then flag these sections of code and
14224 the linker will attempt to relax them.
14227 File: as.info, Node: V850 Syntax, Next: V850 Floating Point, Prev: V850 Options, Up: V850-Dependent
14234 * V850-Chars:: Special Characters
14235 * V850-Regs:: Register Names
14238 File: as.info, Node: V850-Chars, Next: V850-Regs, Up: V850 Syntax
14243 `#' is the line comment character.
14246 File: as.info, Node: V850-Regs, Prev: V850-Chars, Up: V850 Syntax
14251 `as' supports the following names for registers:
14252 `general register 0'
14255 `general register 1'
14258 `general register 2'
14261 `general register 3'
14264 `general register 4'
14267 `general register 5'
14270 `general register 6'
14273 `general register 7'
14276 `general register 8'
14279 `general register 9'
14282 `general register 10'
14285 `general register 11'
14288 `general register 12'
14291 `general register 13'
14294 `general register 14'
14297 `general register 15'
14300 `general register 16'
14303 `general register 17'
14306 `general register 18'
14309 `general register 19'
14312 `general register 20'
14315 `general register 21'
14318 `general register 22'
14321 `general register 23'
14324 `general register 24'
14327 `general register 25'
14330 `general register 26'
14333 `general register 27'
14336 `general register 28'
14339 `general register 29'
14342 `general register 30'
14345 `general register 31'
14348 `system register 0'
14351 `system register 1'
14354 `system register 2'
14357 `system register 3'
14360 `system register 4'
14363 `system register 5'
14366 `system register 16'
14369 `system register 17'
14372 `system register 18'
14375 `system register 19'
14378 `system register 20'
14382 File: as.info, Node: V850 Floating Point, Next: V850 Directives, Prev: V850 Syntax, Up: V850-Dependent
14387 The V850 family uses IEEE floating-point numbers.
14390 File: as.info, Node: V850 Directives, Next: V850 Opcodes, Prev: V850 Floating Point, Up: V850-Dependent
14392 V850 Machine Directives
14393 -----------------------
14395 `.offset <EXPRESSION>'
14396 Moves the offset into the current section to the specified amount.
14398 `.section "name", <type>'
14399 This is an extension to the standard .section directive. It sets
14400 the current section to be <type> and creates an alias for this
14401 section called "name".
14404 Specifies that the assembled code should be marked as being
14405 targeted at the V850 processor. This allows the linker to detect
14406 attempts to link such code with code assembled for other
14410 Specifies that the assembled code should be marked as being
14411 targeted at the V850E processor. This allows the linker to detect
14412 attempts to link such code with code assembled for other
14416 Specifies that the assembled code should be marked as being
14417 targeted at the V850E1 processor. This allows the linker to
14418 detect attempts to link such code with code assembled for other
14422 File: as.info, Node: V850 Opcodes, Prev: V850 Directives, Up: V850-Dependent
14427 `as' implements all the standard V850 opcodes.
14429 `as' also implements the following pseudo ops:
14432 Computes the higher 16 bits of the given expression and stores it
14433 into the immediate operand field of the given instruction. For
14436 `mulhi hi0(here - there), r5, r6'
14438 computes the difference between the address of labels 'here' and
14439 'there', takes the upper 16 bits of this difference, shifts it
14440 down 16 bits and then mutliplies it by the lower 16 bits in
14441 register 5, putting the result into register 6.
14444 Computes the lower 16 bits of the given expression and stores it
14445 into the immediate operand field of the given instruction. For
14448 `addi lo(here - there), r5, r6'
14450 computes the difference between the address of labels 'here' and
14451 'there', takes the lower 16 bits of this difference and adds it to
14452 register 5, putting the result into register 6.
14455 Computes the higher 16 bits of the given expression and then adds
14456 the value of the most significant bit of the lower 16 bits of the
14457 expression and stores the result into the immediate operand field
14458 of the given instruction. For example the following code can be
14459 used to compute the address of the label 'here' and store it into
14462 `movhi hi(here), r0, r6' `movea lo(here), r6, r6'
14464 The reason for this special behaviour is that movea performs a sign
14465 extension on its immediate operand. So for example if the address
14466 of 'here' was 0xFFFFFFFF then without the special behaviour of the
14467 hi() pseudo-op the movhi instruction would put 0xFFFF0000 into r6,
14468 then the movea instruction would takes its immediate operand,
14469 0xFFFF, sign extend it to 32 bits, 0xFFFFFFFF, and then add it
14470 into r6 giving 0xFFFEFFFF which is wrong (the fifth nibble is E).
14471 With the hi() pseudo op adding in the top bit of the lo() pseudo
14472 op, the movhi instruction actually stores 0 into r6 (0xFFFF + 1 =
14473 0x0000), so that the movea instruction stores 0xFFFFFFFF into r6 -
14477 Computes the 32 bit value of the given expression and stores it
14478 into the immediate operand field of the given instruction (which
14479 must be a mov instruction). For example:
14481 `mov hilo(here), r6'
14483 computes the absolute address of label 'here' and puts the result
14487 Computes the offset of the named variable from the start of the
14488 Small Data Area (whoes address is held in register 4, the GP
14489 register) and stores the result as a 16 bit signed value in the
14490 immediate operand field of the given instruction. For example:
14492 `ld.w sdaoff(_a_variable)[gp],r6'
14494 loads the contents of the location pointed to by the label
14495 '_a_variable' into register 6, provided that the label is located
14496 somewhere within +/- 32K of the address held in the GP register.
14497 [Note the linker assumes that the GP register contains a fixed
14498 address set to the address of the label called '__gp'. This can
14499 either be set up automatically by the linker, or specifically set
14500 by using the `--defsym __gp=<value>' command line option].
14503 Computes the offset of the named variable from the start of the
14504 Tiny Data Area (whoes address is held in register 30, the EP
14505 register) and stores the result as a 4,5, 7 or 8 bit unsigned
14506 value in the immediate operand field of the given instruction.
14509 `sld.w tdaoff(_a_variable)[ep],r6'
14511 loads the contents of the location pointed to by the label
14512 '_a_variable' into register 6, provided that the label is located
14513 somewhere within +256 bytes of the address held in the EP
14514 register. [Note the linker assumes that the EP register contains
14515 a fixed address set to the address of the label called '__ep'.
14516 This can either be set up automatically by the linker, or
14517 specifically set by using the `--defsym __ep=<value>' command line
14521 Computes the offset of the named variable from address 0 and
14522 stores the result as a 16 bit signed value in the immediate
14523 operand field of the given instruction. For example:
14525 `movea zdaoff(_a_variable),zero,r6'
14527 puts the address of the label '_a_variable' into register 6,
14528 assuming that the label is somewhere within the first 32K of
14529 memory. (Strictly speaking it also possible to access the last
14530 32K of memory as well, as the offsets are signed).
14533 Computes the offset of the named variable from the start of the
14534 Call Table Area (whoes address is helg in system register 20, the
14535 CTBP register) and stores the result a 6 or 16 bit unsigned value
14536 in the immediate field of then given instruction or piece of data.
14539 `callt ctoff(table_func1)'
14541 will put the call the function whoes address is held in the call
14542 table at the location labeled 'table_func1'.
14545 Indicates that the following sequence of instructions is a long
14546 call to function `name'. The linker will attempt to shorten this
14547 call sequence if `name' is within a 22bit offset of the call. Only
14548 valid if the `-mrelax' command line switch has been enabled.
14551 Indicates that the following sequence of instructions is a long
14552 jump to label `name'. The linker will attempt to shorten this code
14553 sequence if `name' is within a 22bit offset of the jump. Only
14554 valid if the `-mrelax' command line switch has been enabled.
14556 For information on the V850 instruction set, see `V850 Family
14557 32-/16-Bit single-Chip Microcontroller Architecture Manual' from NEC.
14561 File: as.info, Node: Xtensa-Dependent, Next: Z80-Dependent, Prev: V850-Dependent, Up: Machine Dependencies
14563 Xtensa Dependent Features
14564 =========================
14566 This chapter covers features of the GNU assembler that are specific
14567 to the Xtensa architecture. For details about the Xtensa instruction
14568 set, please consult the `Xtensa Instruction Set Architecture (ISA)
14573 * Xtensa Options:: Command-line Options.
14574 * Xtensa Syntax:: Assembler Syntax for Xtensa Processors.
14575 * Xtensa Optimizations:: Assembler Optimizations.
14576 * Xtensa Relaxation:: Other Automatic Transformations.
14577 * Xtensa Directives:: Directives for Xtensa Processors.
14580 File: as.info, Node: Xtensa Options, Next: Xtensa Syntax, Up: Xtensa-Dependent
14582 Command Line Options
14583 --------------------
14585 The Xtensa version of the GNU assembler supports these special
14588 `--text-section-literals | --no-text-section-literals'
14589 Control the treatment of literal pools. The default is
14590 `--no-text-section-literals', which places literals in a separate
14591 section in the output file. This allows the literal pool to be
14592 placed in a data RAM/ROM. With `--text-section-literals', the
14593 literals are interspersed in the text section in order to keep
14594 them as close as possible to their references. This may be
14595 necessary for large assembly files, where the literals would
14596 otherwise be out of range of the `L32R' instructions in the text
14597 section. These options only affect literals referenced via
14598 PC-relative `L32R' instructions; literals for absolute mode `L32R'
14599 instructions are handled separately.
14601 `--absolute-literals | --no-absolute-literals'
14602 Indicate to the assembler whether `L32R' instructions use absolute
14603 or PC-relative addressing. If the processor includes the absolute
14604 addressing option, the default is to use absolute `L32R'
14605 relocations. Otherwise, only the PC-relative `L32R' relocations
14608 `--target-align | --no-target-align'
14609 Enable or disable automatic alignment to reduce branch penalties
14610 at some expense in code size. *Note Automatic Instruction
14611 Alignment: Xtensa Automatic Alignment. This optimization is
14612 enabled by default. Note that the assembler will always align
14613 instructions like `LOOP' that have fixed alignment requirements.
14615 `--longcalls | --no-longcalls'
14616 Enable or disable transformation of call instructions to allow
14617 calls across a greater range of addresses. *Note Function Call
14618 Relaxation: Xtensa Call Relaxation. This option should be used
14619 when call targets can potentially be out of range. It may degrade
14620 both code size and performance, but the linker can generally
14621 optimize away the unnecessary overhead when a call ends up within
14622 range. The default is `--no-longcalls'.
14624 `--transform | --no-transform'
14625 Enable or disable all assembler transformations of Xtensa
14626 instructions, including both relaxation and optimization. The
14627 default is `--transform'; `--no-transform' should only be used in
14628 the rare cases when the instructions must be exactly as specified
14629 in the assembly source. Using `--no-transform' causes out of range
14630 instruction operands to be errors.
14632 `--rename-section OLDNAME=NEWNAME'
14633 Rename the OLDNAME section to NEWNAME. This option can be used
14634 multiple times to rename multiple sections.
14637 File: as.info, Node: Xtensa Syntax, Next: Xtensa Optimizations, Prev: Xtensa Options, Up: Xtensa-Dependent
14642 Block comments are delimited by `/*' and `*/'. End of line comments
14643 may be introduced with either `#' or `//'.
14645 Instructions consist of a leading opcode or macro name followed by
14646 whitespace and an optional comma-separated list of operands:
14648 OPCODE [OPERAND, ...]
14650 Instructions must be separated by a newline or semicolon.
14652 FLIX instructions, which bundle multiple opcodes together in a single
14653 instruction, are specified by enclosing the bundled opcodes inside
14664 The opcodes in a FLIX instruction are listed in the same order as the
14665 corresponding instruction slots in the TIE format declaration.
14666 Directives and labels are not allowed inside the braces of a FLIX
14667 instruction. A particular TIE format name can optionally be specified
14668 immediately after the opening brace, but this is usually unnecessary.
14669 The assembler will automatically search for a format that can encode the
14670 specified opcodes, so the format name need only be specified in rare
14671 cases where there is more than one applicable format and where it
14672 matters which of those formats is used. A FLIX instruction can also be
14673 specified on a single line by separating the opcodes with semicolons:
14675 { [FORMAT;] OPCODE0 [OPERANDS]; OPCODE1 [OPERANDS]; OPCODE2 [OPERANDS]; ... }
14677 The assembler can automatically bundle opcodes into FLIX
14678 instructions. It encodes the opcodes in order, one at a time, choosing
14679 the smallest format where each opcode can be encoded and filling unused
14680 instruction slots with no-ops.
14684 * Xtensa Opcodes:: Opcode Naming Conventions.
14685 * Xtensa Registers:: Register Naming.
14688 File: as.info, Node: Xtensa Opcodes, Next: Xtensa Registers, Up: Xtensa Syntax
14693 See the `Xtensa Instruction Set Architecture (ISA) Reference Manual'
14694 for a complete list of opcodes and descriptions of their semantics.
14696 If an opcode name is prefixed with an underscore character (`_'),
14697 `as' will not transform that instruction in any way. The underscore
14698 prefix disables both optimization (*note Xtensa Optimizations: Xtensa
14699 Optimizations.) and relaxation (*note Xtensa Relaxation: Xtensa
14700 Relaxation.) for that particular instruction. Only use the underscore
14701 prefix when it is essential to select the exact opcode produced by the
14702 assembler. Using this feature unnecessarily makes the code less
14703 efficient by disabling assembler optimization and less flexible by
14704 disabling relaxation.
14706 Note that this special handling of underscore prefixes only applies
14707 to Xtensa opcodes, not to either built-in macros or user-defined macros.
14708 When an underscore prefix is used with a macro (e.g., `_MOV'), it
14709 refers to a different macro. The assembler generally provides built-in
14710 macros both with and without the underscore prefix, where the underscore
14711 versions behave as if the underscore carries through to the instructions
14712 in the macros. For example, `_MOV' may expand to `_MOV.N'.
14714 The underscore prefix only applies to individual instructions, not to
14715 series of instructions. For example, if a series of instructions have
14716 underscore prefixes, the assembler will not transform the individual
14717 instructions, but it may insert other instructions between them (e.g.,
14718 to align a `LOOP' instruction). To prevent the assembler from
14719 modifying a series of instructions as a whole, use the `no-transform'
14720 directive. *Note transform: Transform Directive.
14723 File: as.info, Node: Xtensa Registers, Prev: Xtensa Opcodes, Up: Xtensa Syntax
14728 The assembly syntax for a register file entry is the "short" name for
14729 a TIE register file followed by the index into that register file. For
14730 example, the general-purpose `AR' register file has a short name of
14731 `a', so these registers are named `a0'...`a15'. As a special feature,
14732 `sp' is also supported as a synonym for `a1'. Additional registers may
14733 be added by processor configuration options and by designer-defined TIE
14734 extensions. An initial `$' character is optional in all register names.
14737 File: as.info, Node: Xtensa Optimizations, Next: Xtensa Relaxation, Prev: Xtensa Syntax, Up: Xtensa-Dependent
14739 Xtensa Optimizations
14740 --------------------
14742 The optimizations currently supported by `as' are generation of
14743 density instructions where appropriate and automatic branch target
14748 * Density Instructions:: Using Density Instructions.
14749 * Xtensa Automatic Alignment:: Automatic Instruction Alignment.
14752 File: as.info, Node: Density Instructions, Next: Xtensa Automatic Alignment, Up: Xtensa Optimizations
14754 Using Density Instructions
14755 ..........................
14757 The Xtensa instruction set has a code density option that provides
14758 16-bit versions of some of the most commonly used opcodes. Use of these
14759 opcodes can significantly reduce code size. When possible, the
14760 assembler automatically translates instructions from the core Xtensa
14761 instruction set into equivalent instructions from the Xtensa code
14762 density option. This translation can be disabled by using underscore
14763 prefixes (*note Opcode Names: Xtensa Opcodes.), by using the
14764 `--no-transform' command-line option (*note Command Line Options:
14765 Xtensa Options.), or by using the `no-transform' directive (*note
14766 transform: Transform Directive.).
14768 It is a good idea _not_ to use the density instructions directly.
14769 The assembler will automatically select dense instructions where
14770 possible. If you later need to use an Xtensa processor without the code
14771 density option, the same assembly code will then work without
14775 File: as.info, Node: Xtensa Automatic Alignment, Prev: Density Instructions, Up: Xtensa Optimizations
14777 Automatic Instruction Alignment
14778 ...............................
14780 The Xtensa assembler will automatically align certain instructions,
14781 both to optimize performance and to satisfy architectural requirements.
14783 As an optimization to improve performance, the assembler attempts to
14784 align branch targets so they do not cross instruction fetch boundaries.
14785 (Xtensa processors can be configured with either 32-bit or 64-bit
14786 instruction fetch widths.) An instruction immediately following a call
14787 is treated as a branch target in this context, because it will be the
14788 target of a return from the call. This alignment has the potential to
14789 reduce branch penalties at some expense in code size. The assembler
14790 will not attempt to align labels with the prefixes `.Ln' and `.LM',
14791 since these labels are used for debugging information and are not
14792 typically branch targets. This optimization is enabled by default.
14793 You can disable it with the `--no-target-align' command-line option
14794 (*note Command Line Options: Xtensa Options.).
14796 The target alignment optimization is done without adding instructions
14797 that could increase the execution time of the program. If there are
14798 density instructions in the code preceding a target, the assembler can
14799 change the target alignment by widening some of those instructions to
14800 the equivalent 24-bit instructions. Extra bytes of padding can be
14801 inserted immediately following unconditional jump and return
14802 instructions. This approach is usually successful in aligning many,
14803 but not all, branch targets.
14805 The `LOOP' family of instructions must be aligned such that the
14806 first instruction in the loop body does not cross an instruction fetch
14807 boundary (e.g., with a 32-bit fetch width, a `LOOP' instruction must be
14808 on either a 1 or 2 mod 4 byte boundary). The assembler knows about
14809 this restriction and inserts the minimal number of 2 or 3 byte no-op
14810 instructions to satisfy it. When no-op instructions are added, any
14811 label immediately preceding the original loop will be moved in order to
14812 refer to the loop instruction, not the newly generated no-op
14813 instruction. To preserve binary compatibility across processors with
14814 different fetch widths, the assembler conservatively assumes a 32-bit
14815 fetch width when aligning `LOOP' instructions (except if the first
14816 instruction in the loop is a 64-bit instruction).
14818 Similarly, the `ENTRY' instruction must be aligned on a 0 mod 4 byte
14819 boundary. The assembler satisfies this requirement by inserting zero
14820 bytes when required. In addition, labels immediately preceding the
14821 `ENTRY' instruction will be moved to the newly aligned instruction
14825 File: as.info, Node: Xtensa Relaxation, Next: Xtensa Directives, Prev: Xtensa Optimizations, Up: Xtensa-Dependent
14830 When an instruction operand is outside the range allowed for that
14831 particular instruction field, `as' can transform the code to use a
14832 functionally-equivalent instruction or sequence of instructions. This
14833 process is known as "relaxation". This is typically done for branch
14834 instructions because the distance of the branch targets is not known
14835 until assembly-time. The Xtensa assembler offers branch relaxation and
14836 also extends this concept to function calls, `MOVI' instructions and
14837 other instructions with immediate fields.
14841 * Xtensa Branch Relaxation:: Relaxation of Branches.
14842 * Xtensa Call Relaxation:: Relaxation of Function Calls.
14843 * Xtensa Immediate Relaxation:: Relaxation of other Immediate Fields.
14846 File: as.info, Node: Xtensa Branch Relaxation, Next: Xtensa Call Relaxation, Up: Xtensa Relaxation
14848 Conditional Branch Relaxation
14849 .............................
14851 When the target of a branch is too far away from the branch itself,
14852 i.e., when the offset from the branch to the target is too large to fit
14853 in the immediate field of the branch instruction, it may be necessary to
14854 replace the branch with a branch around a jump. For example,
14864 (The `BNEZ.N' instruction would be used in this example only if the
14865 density option is available. Otherwise, `BNEZ' would be used.)
14867 This relaxation works well because the unconditional jump instruction
14868 has a much larger offset range than the various conditional branches.
14869 However, an error will occur if a branch target is beyond the range of a
14870 jump instruction. `as' cannot relax unconditional jumps. Similarly,
14871 an error will occur if the original input contains an unconditional
14872 jump to a target that is out of range.
14874 Branch relaxation is enabled by default. It can be disabled by using
14875 underscore prefixes (*note Opcode Names: Xtensa Opcodes.), the
14876 `--no-transform' command-line option (*note Command Line Options:
14877 Xtensa Options.), or the `no-transform' directive (*note transform:
14878 Transform Directive.).
14881 File: as.info, Node: Xtensa Call Relaxation, Next: Xtensa Immediate Relaxation, Prev: Xtensa Branch Relaxation, Up: Xtensa Relaxation
14883 Function Call Relaxation
14884 ........................
14886 Function calls may require relaxation because the Xtensa immediate
14887 call instructions (`CALL0', `CALL4', `CALL8' and `CALL12') provide a
14888 PC-relative offset of only 512 Kbytes in either direction. For larger
14889 programs, it may be necessary to use indirect calls (`CALLX0',
14890 `CALLX4', `CALLX8' and `CALLX12') where the target address is specified
14891 in a register. The Xtensa assembler can automatically relax immediate
14892 call instructions into indirect call instructions. This relaxation is
14893 done by loading the address of the called function into the callee's
14894 return address register and then using a `CALLX' instruction. So, for
14899 might be relaxed to:
14905 Because the addresses of targets of function calls are not generally
14906 known until link-time, the assembler must assume the worst and relax all
14907 the calls to functions in other source files, not just those that really
14908 will be out of range. The linker can recognize calls that were
14909 unnecessarily relaxed, and it will remove the overhead introduced by the
14910 assembler for those cases where direct calls are sufficient.
14912 Call relaxation is disabled by default because it can have a negative
14913 effect on both code size and performance, although the linker can
14914 usually eliminate the unnecessary overhead. If a program is too large
14915 and some of the calls are out of range, function call relaxation can be
14916 enabled using the `--longcalls' command-line option or the `longcalls'
14917 directive (*note longcalls: Longcalls Directive.).
14920 File: as.info, Node: Xtensa Immediate Relaxation, Prev: Xtensa Call Relaxation, Up: Xtensa Relaxation
14922 Other Immediate Field Relaxation
14923 ................................
14925 The assembler normally performs the following other relaxations.
14926 They can be disabled by using underscore prefixes (*note Opcode Names:
14927 Xtensa Opcodes.), the `--no-transform' command-line option (*note
14928 Command Line Options: Xtensa Options.), or the `no-transform' directive
14929 (*note transform: Transform Directive.).
14931 The `MOVI' machine instruction can only materialize values in the
14932 range from -2048 to 2047. Values outside this range are best
14933 materialized with `L32R' instructions. Thus:
14937 is assembled into the following machine code:
14939 .literal .L1, 100000
14942 The `L8UI' machine instruction can only be used with immediate
14943 offsets in the range from 0 to 255. The `L16SI' and `L16UI' machine
14944 instructions can only be used with offsets from 0 to 510. The `L32I'
14945 machine instruction can only be used with offsets from 0 to 1020. A
14946 load offset outside these ranges can be materalized with an `L32R'
14947 instruction if the destination register of the load is different than
14948 the source address register. For example:
14959 If the load destination and source address register are the same, an
14960 out-of-range offset causes an error.
14962 The Xtensa `ADDI' instruction only allows immediate operands in the
14963 range from -128 to 127. There are a number of alternate instruction
14964 sequences for the `ADDI' operation. First, if the immediate is 0, the
14965 `ADDI' will be turned into a `MOV.N' instruction (or the equivalent
14966 `OR' instruction if the code density option is not available). If the
14967 `ADDI' immediate is outside of the range -128 to 127, but inside the
14968 range -32896 to 32639, an `ADDMI' instruction or `ADDMI'/`ADDI'
14969 sequence will be used. Finally, if the immediate is outside of this
14970 range and a free register is available, an `L32R'/`ADD' sequence will
14971 be used with a literal allocated from the literal pool.
14980 is assembled into the following:
14982 .literal .L1, 50000
14984 addmi a5, a6, 0x200
14985 addmi a5, a6, 0x200
14991 File: as.info, Node: Xtensa Directives, Prev: Xtensa Relaxation, Up: Xtensa-Dependent
14996 The Xtensa assember supports a region-based directive syntax:
14998 .begin DIRECTIVE [OPTIONS]
15002 All the Xtensa-specific directives that apply to a region of code use
15005 The directive applies to code between the `.begin' and the `.end'.
15006 The state of the option after the `.end' reverts to what it was before
15007 the `.begin'. A nested `.begin'/`.end' region can further change the
15008 state of the directive without having to be aware of its outer state.
15009 For example, consider:
15011 .begin no-transform
15019 The `ADD' opcodes at `L' and `N' in the outer `no-transform' region
15020 both result in `ADD' machine instructions, but the assembler selects an
15021 `ADD.N' instruction for the `ADD' at `M' in the inner `transform'
15024 The advantage of this style is that it works well inside macros
15025 which can preserve the context of their callers.
15027 The following directives are available:
15031 * Schedule Directive:: Enable instruction scheduling.
15032 * Longcalls Directive:: Use Indirect Calls for Greater Range.
15033 * Transform Directive:: Disable All Assembler Transformations.
15034 * Literal Directive:: Intermix Literals with Instructions.
15035 * Literal Position Directive:: Specify Inline Literal Pool Locations.
15036 * Literal Prefix Directive:: Specify Literal Section Name Prefix.
15037 * Absolute Literals Directive:: Control PC-Relative vs. Absolute Literals.
15040 File: as.info, Node: Schedule Directive, Next: Longcalls Directive, Up: Xtensa Directives
15045 The `schedule' directive is recognized only for compatibility with
15046 Tensilica's assembler.
15048 .begin [no-]schedule
15051 This directive is ignored and has no effect on `as'.
15054 File: as.info, Node: Longcalls Directive, Next: Transform Directive, Prev: Schedule Directive, Up: Xtensa Directives
15059 The `longcalls' directive enables or disables function call
15060 relaxation. *Note Function Call Relaxation: Xtensa Call Relaxation.
15062 .begin [no-]longcalls
15063 .end [no-]longcalls
15065 Call relaxation is disabled by default unless the `--longcalls'
15066 command-line option is specified. The `longcalls' directive overrides
15067 the default determined by the command-line options.
15070 File: as.info, Node: Transform Directive, Next: Literal Directive, Prev: Longcalls Directive, Up: Xtensa Directives
15075 This directive enables or disables all assembler transformation,
15076 including relaxation (*note Xtensa Relaxation: Xtensa Relaxation.) and
15077 optimization (*note Xtensa Optimizations: Xtensa Optimizations.).
15079 .begin [no-]transform
15080 .end [no-]transform
15082 Transformations are enabled by default unless the `--no-transform'
15083 option is used. The `transform' directive overrides the default
15084 determined by the command-line options. An underscore opcode prefix,
15085 disabling transformation of that opcode, always takes precedence over
15086 both directives and command-line flags.
15089 File: as.info, Node: Literal Directive, Next: Literal Position Directive, Prev: Transform Directive, Up: Xtensa Directives
15094 The `.literal' directive is used to define literal pool data, i.e.,
15095 read-only 32-bit data accessed via `L32R' instructions.
15097 .literal LABEL, VALUE[, VALUE...]
15099 This directive is similar to the standard `.word' directive, except
15100 that the actual location of the literal data is determined by the
15101 assembler and linker, not by the position of the `.literal' directive.
15102 Using this directive gives the assembler freedom to locate the literal
15103 data in the most appropriate place and possibly to combine identical
15104 literals. For example, the code:
15110 can be used to load a pointer to the symbol `sym' into register
15111 `a4'. The value of `sym' will not be placed between the `ENTRY' and
15112 `L32R' instructions; instead, the assembler puts the data in a literal
15115 Literal pools for absolute mode `L32R' instructions (*note Absolute
15116 Literals Directive::) are placed in a separate `.lit4' section. By
15117 default literal pools for PC-relative mode `L32R' instructions are
15118 placed in a separate `.literal' section; however, when using the
15119 `--text-section-literals' option (*note Command Line Options: Xtensa
15120 Options.), the literal pools are placed in the current section. These
15121 text section literal pools are created automatically before `ENTRY'
15122 instructions and manually after `.literal_position' directives (*note
15123 literal_position: Literal Position Directive.). If there are no
15124 preceding `ENTRY' instructions, explicit `.literal_position' directives
15125 must be used to place the text section literal pools; otherwise, `as'
15126 will report an error.
15129 File: as.info, Node: Literal Position Directive, Next: Literal Prefix Directive, Prev: Literal Directive, Up: Xtensa Directives
15134 When using `--text-section-literals' to place literals inline in the
15135 section being assembled, the `.literal_position' directive can be used
15136 to mark a potential location for a literal pool.
15140 The `.literal_position' directive is ignored when the
15141 `--text-section-literals' option is not used or when `L32R'
15142 instructions use the absolute addressing mode.
15144 The assembler will automatically place text section literal pools
15145 before `ENTRY' instructions, so the `.literal_position' directive is
15146 only needed to specify some other location for a literal pool. You may
15147 need to add an explicit jump instruction to skip over an inline literal
15150 For example, an interrupt vector does not begin with an `ENTRY'
15151 instruction so the assembler will be unable to automatically find a good
15152 place to put a literal pool. Moreover, the code for the interrupt
15153 vector must be at a specific starting address, so the literal pool
15154 cannot come before the start of the code. The literal pool for the
15155 vector must be explicitly positioned in the middle of the vector (before
15156 any uses of the literals, due to the negative offsets used by
15157 PC-relative `L32R' instructions). The `.literal_position' directive
15158 can be used to do this. In the following code, the literal for `M'
15159 will automatically be aligned correctly and is placed after the
15160 unconditional jump.
15171 File: as.info, Node: Literal Prefix Directive, Next: Absolute Literals Directive, Prev: Literal Position Directive, Up: Xtensa Directives
15176 The `literal_prefix' directive allows you to specify different
15177 sections to hold literals from different portions of an assembly file.
15178 With this directive, a single assembly file can be used to generate code
15179 into multiple sections, including literals generated by the assembler.
15181 .begin literal_prefix [NAME]
15182 .end literal_prefix
15184 By default the assembler places literal pools in sections separate
15185 from the instructions, using the default literal section names of
15186 `.literal' for PC-relative mode `L32R' instructions and `.lit4' for
15187 absolute mode `L32R' instructions (*note Absolute Literals
15188 Directive::). The `literal_prefix' directive causes different literal
15189 sections to be used for the code inside the delimited region. The new
15190 literal sections are determined by including NAME as a prefix to the
15191 default literal section names. If the NAME argument is omitted, the
15192 literal sections revert to the defaults. This directive has no effect
15193 when using the `--text-section-literals' option (*note Command Line
15194 Options: Xtensa Options.).
15196 Except for two special cases, the assembler determines the new
15197 literal sections by simply prepending NAME to the default section names,
15198 resulting in `NAME.literal' and `NAME.lit4' sections. The
15199 `literal_prefix' directive is often used with the name of the current
15200 text section as the prefix argument. To facilitate this usage, the
15201 assembler uses special case rules when it recognizes NAME as a text
15202 section name. First, if NAME ends with `.text', that suffix is not
15203 included in the literal section name. For example, if NAME is
15204 `.iram0.text', then the literal sections will be `.iram0.literal' and
15205 `.iram0.lit4'. Second, if NAME begins with `.gnu.linkonce.t.', then
15206 the literal section names are formed by replacing the `.t' substring
15207 with `.literal' and `.lit4'. For example, if NAME is
15208 `.gnu.linkonce.t.func', the literal sections will be
15209 `.gnu.linkonce.literal.func' and `.gnu.linkonce.lit4.func'.
15212 File: as.info, Node: Absolute Literals Directive, Prev: Literal Prefix Directive, Up: Xtensa Directives
15217 The `absolute-literals' and `no-absolute-literals' directives
15218 control the absolute vs. PC-relative mode for `L32R' instructions.
15219 These are relevant only for Xtensa configurations that include the
15220 absolute addressing option for `L32R' instructions.
15222 .begin [no-]absolute-literals
15223 .end [no-]absolute-literals
15225 These directives do not change the `L32R' mode--they only cause the
15226 assembler to emit the appropriate kind of relocation for `L32R'
15227 instructions and to place the literal values in the appropriate section.
15228 To change the `L32R' mode, the program must write the `LITBASE' special
15229 register. It is the programmer's responsibility to keep track of the
15230 mode and indicate to the assembler which mode is used in each region of
15233 If the Xtensa configuration includes the absolute `L32R' addressing
15234 option, the default is to assume absolute `L32R' addressing unless the
15235 `--no-absolute-literals' command-line option is specified. Otherwise,
15236 the default is to assume PC-relative `L32R' addressing. The
15237 `absolute-literals' directive can then be used to override the default
15238 determined by the command-line options.
15241 File: as.info, Node: Reporting Bugs, Next: Acknowledgements, Prev: Machine Dependencies, Up: Top
15246 Your bug reports play an essential role in making `as' reliable.
15248 Reporting a bug may help you by bringing a solution to your problem,
15249 or it may not. But in any case the principal function of a bug report
15250 is to help the entire community by making the next version of `as' work
15251 better. Bug reports are your contribution to the maintenance of `as'.
15253 In order for a bug report to serve its purpose, you must include the
15254 information that enables us to fix the bug.
15258 * Bug Criteria:: Have you found a bug?
15259 * Bug Reporting:: How to report bugs
15262 File: as.info, Node: Bug Criteria, Next: Bug Reporting, Up: Reporting Bugs
15264 Have You Found a Bug?
15265 =====================
15267 If you are not sure whether you have found a bug, here are some
15270 * If the assembler gets a fatal signal, for any input whatever, that
15271 is a `as' bug. Reliable assemblers never crash.
15273 * If `as' produces an error message for valid input, that is a bug.
15275 * If `as' does not produce an error message for invalid input, that
15276 is a bug. However, you should note that your idea of "invalid
15277 input" might be our idea of "an extension" or "support for
15278 traditional practice".
15280 * If you are an experienced user of assemblers, your suggestions for
15281 improvement of `as' are welcome in any case.
15284 File: as.info, Node: Bug Reporting, Prev: Bug Criteria, Up: Reporting Bugs
15289 A number of companies and individuals offer support for GNU
15290 products. If you obtained `as' from a support organization, we
15291 recommend you contact that organization first.
15293 You can find contact information for many support companies and
15294 individuals in the file `etc/SERVICE' in the GNU Emacs distribution.
15296 In any event, we also recommend that you send bug reports for `as'
15297 to `bug-binutils@gnu.org'.
15299 The fundamental principle of reporting bugs usefully is this:
15300 *report all the facts*. If you are not sure whether to state a fact or
15301 leave it out, state it!
15303 Often people omit facts because they think they know what causes the
15304 problem and assume that some details do not matter. Thus, you might
15305 assume that the name of a symbol you use in an example does not matter.
15306 Well, probably it does not, but one cannot be sure. Perhaps the bug
15307 is a stray memory reference which happens to fetch from the location
15308 where that name is stored in memory; perhaps, if the name were
15309 different, the contents of that location would fool the assembler into
15310 doing the right thing despite the bug. Play it safe and give a
15311 specific, complete example. That is the easiest thing for you to do,
15312 and the most helpful.
15314 Keep in mind that the purpose of a bug report is to enable us to fix
15315 the bug if it is new to us. Therefore, always write your bug reports
15316 on the assumption that the bug has not been reported previously.
15318 Sometimes people give a few sketchy facts and ask, "Does this ring a
15319 bell?" This cannot help us fix a bug, so it is basically useless. We
15320 respond by asking for enough details to enable us to investigate. You
15321 might as well expedite matters by sending them to begin with.
15323 To enable us to fix the bug, you should include all these things:
15325 * The version of `as'. `as' announces it if you start it with the
15326 `--version' argument.
15328 Without this, we will not know whether there is any point in
15329 looking for the bug in the current version of `as'.
15331 * Any patches you may have applied to the `as' source.
15333 * The type of machine you are using, and the operating system name
15334 and version number.
15336 * What compiler (and its version) was used to compile `as'--e.g.
15339 * The command arguments you gave the assembler to assemble your
15340 example and observe the bug. To guarantee you will not omit
15341 something important, list them all. A copy of the Makefile (or
15342 the output from make) is sufficient.
15344 If we were to try to guess the arguments, we would probably guess
15345 wrong and then we might not encounter the bug.
15347 * A complete input file that will reproduce the bug. If the bug is
15348 observed when the assembler is invoked via a compiler, send the
15349 assembler source, not the high level language source. Most
15350 compilers will produce the assembler source when run with the `-S'
15351 option. If you are using `gcc', use the options `-v
15352 --save-temps'; this will save the assembler source in a file with
15353 an extension of `.s', and also show you exactly how `as' is being
15356 * A description of what behavior you observe that you believe is
15357 incorrect. For example, "It gets a fatal signal."
15359 Of course, if the bug is that `as' gets a fatal signal, then we
15360 will certainly notice it. But if the bug is incorrect output, we
15361 might not notice unless it is glaringly wrong. You might as well
15362 not give us a chance to make a mistake.
15364 Even if the problem you experience is a fatal signal, you should
15365 still say so explicitly. Suppose something strange is going on,
15366 such as, your copy of `as' is out of synch, or you have
15367 encountered a bug in the C library on your system. (This has
15368 happened!) Your copy might crash and ours would not. If you told
15369 us to expect a crash, then when ours fails to crash, we would know
15370 that the bug was not happening for us. If you had not told us to
15371 expect a crash, then we would not be able to draw any conclusion
15372 from our observations.
15374 * If you wish to suggest changes to the `as' source, send us context
15375 diffs, as generated by `diff' with the `-u', `-c', or `-p' option.
15376 Always send diffs from the old file to the new file. If you even
15377 discuss something in the `as' source, refer to it by context, not
15380 The line numbers in our development sources will not match those
15381 in your sources. Your line numbers would convey no useful
15384 Here are some things that are not necessary:
15386 * A description of the envelope of the bug.
15388 Often people who encounter a bug spend a lot of time investigating
15389 which changes to the input file will make the bug go away and which
15390 changes will not affect it.
15392 This is often time consuming and not very useful, because the way
15393 we will find the bug is by running a single example under the
15394 debugger with breakpoints, not by pure deduction from a series of
15395 examples. We recommend that you save your time for something else.
15397 Of course, if you can find a simpler example to report _instead_
15398 of the original one, that is a convenience for us. Errors in the
15399 output will be easier to spot, running under the debugger will take
15400 less time, and so on.
15402 However, simplification is not vital; if you do not want to do
15403 this, report the bug anyway and send us the entire test case you
15406 * A patch for the bug.
15408 A patch for the bug does help us if it is a good one. But do not
15409 omit the necessary information, such as the test case, on the
15410 assumption that a patch is all we need. We might see problems
15411 with your patch and decide to fix the problem another way, or we
15412 might not understand it at all.
15414 Sometimes with a program as complicated as `as' it is very hard to
15415 construct an example that will make the program follow a certain
15416 path through the code. If you do not send us the example, we will
15417 not be able to construct one, so we will not be able to verify
15418 that the bug is fixed.
15420 And if we cannot understand what bug you are trying to fix, or why
15421 your patch should be an improvement, we will not install it. A
15422 test case will help us to understand.
15424 * A guess about what the bug is or what it depends on.
15426 Such guesses are usually wrong. Even we cannot guess right about
15427 such things without first using the debugger to find the facts.
15430 File: as.info, Node: Acknowledgements, Next: GNU Free Documentation License, Prev: Reporting Bugs, Up: Top
15435 If you have contributed to GAS and your name isn't listed here, it
15436 is not meant as a slight. We just don't know about it. Send mail to
15437 the maintainer, and we'll correct the situation. Currently the
15438 maintainer is Ken Raeburn (email address `raeburn@cygnus.com').
15440 Dean Elsner wrote the original GNU assembler for the VAX.(1)
15442 Jay Fenlason maintained GAS for a while, adding support for
15443 GDB-specific debug information and the 68k series machines, most of the
15444 preprocessing pass, and extensive changes in `messages.c',
15445 `input-file.c', `write.c'.
15447 K. Richard Pixley maintained GAS for a while, adding various
15448 enhancements and many bug fixes, including merging support for several
15449 processors, breaking GAS up to handle multiple object file format back
15450 ends (including heavy rewrite, testing, an integration of the coff and
15451 b.out back ends), adding configuration including heavy testing and
15452 verification of cross assemblers and file splits and renaming,
15453 converted GAS to strictly ANSI C including full prototypes, added
15454 support for m680[34]0 and cpu32, did considerable work on i960
15455 including a COFF port (including considerable amounts of reverse
15456 engineering), a SPARC opcode file rewrite, DECstation, rs6000, and
15457 hp300hpux host ports, updated "know" assertions and made them work,
15458 much other reorganization, cleanup, and lint.
15460 Ken Raeburn wrote the high-level BFD interface code to replace most
15461 of the code in format-specific I/O modules.
15463 The original VMS support was contributed by David L. Kashtan. Eric
15464 Youngdale has done much work with it since.
15466 The Intel 80386 machine description was written by Eliot Dresselhaus.
15468 Minh Tran-Le at IntelliCorp contributed some AIX 386 support.
15470 The Motorola 88k machine description was contributed by Devon Bowen
15471 of Buffalo University and Torbjorn Granlund of the Swedish Institute of
15474 Keith Knowles at the Open Software Foundation wrote the original
15475 MIPS back end (`tc-mips.c', `tc-mips.h'), and contributed Rose format
15476 support (which hasn't been merged in yet). Ralph Campbell worked with
15477 the MIPS code to support a.out format.
15479 Support for the Zilog Z8k and Renesas H8/300 processors (tc-z8k,
15480 tc-h8300), and IEEE 695 object file format (obj-ieee), was written by
15481 Steve Chamberlain of Cygnus Support. Steve also modified the COFF back
15482 end to use BFD for some low-level operations, for use with the H8/300
15483 and AMD 29k targets.
15485 John Gilmore built the AMD 29000 support, added `.include' support,
15486 and simplified the configuration of which versions accept which
15487 directives. He updated the 68k machine description so that Motorola's
15488 opcodes always produced fixed-size instructions (e.g., `jsr'), while
15489 synthetic instructions remained shrinkable (`jbsr'). John fixed many
15490 bugs, including true tested cross-compilation support, and one bug in
15491 relaxation that took a week and required the proverbial one-bit fix.
15493 Ian Lance Taylor of Cygnus Support merged the Motorola and MIT
15494 syntax for the 68k, completed support for some COFF targets (68k, i386
15495 SVR3, and SCO Unix), added support for MIPS ECOFF and ELF targets,
15496 wrote the initial RS/6000 and PowerPC assembler, and made a few other
15499 Steve Chamberlain made GAS able to generate listings.
15501 Hewlett-Packard contributed support for the HP9000/300.
15503 Jeff Law wrote GAS and BFD support for the native HPPA object format
15504 (SOM) along with a fairly extensive HPPA testsuite (for both SOM and
15505 ELF object formats). This work was supported by both the Center for
15506 Software Science at the University of Utah and Cygnus Support.
15508 Support for ELF format files has been worked on by Mark Eichin of
15509 Cygnus Support (original, incomplete implementation for SPARC), Pete
15510 Hoogenboom and Jeff Law at the University of Utah (HPPA mainly),
15511 Michael Meissner of the Open Software Foundation (i386 mainly), and Ken
15512 Raeburn of Cygnus Support (sparc, and some initial 64-bit support).
15514 Linas Vepstas added GAS support for the ESA/390 "IBM 370"
15517 Richard Henderson rewrote the Alpha assembler. Klaus Kaempf wrote
15518 GAS and BFD support for openVMS/Alpha.
15520 Timothy Wall, Michael Hayes, and Greg Smart contributed to the
15521 various tic* flavors.
15523 David Heine, Sterling Augustine, Bob Wilson and John Ruttenberg from
15524 Tensilica, Inc. added support for Xtensa processors.
15526 Several engineers at Cygnus Support have also provided many small
15527 bug fixes and configuration enhancements.
15529 Many others have contributed large or small bugfixes and
15530 enhancements. If you have contributed significant work and are not
15531 mentioned on this list, and want to be, let us know. Some of the
15532 history has been lost; we are not intentionally leaving anyone out.
15534 ---------- Footnotes ----------
15536 (1) Any more details?
15539 File: as.info, Node: GNU Free Documentation License, Next: Index, Prev: Acknowledgements, Up: Top
15541 GNU Free Documentation License
15542 ******************************
15544 Version 1.1, March 2000
15545 Copyright (C) 2000, 2003 Free Software Foundation, Inc.
15546 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15548 Everyone is permitted to copy and distribute verbatim copies
15549 of this license document, but changing it is not allowed.
15554 The purpose of this License is to make a manual, textbook, or other
15555 written document "free" in the sense of freedom: to assure everyone
15556 the effective freedom to copy and redistribute it, with or without
15557 modifying it, either commercially or noncommercially. Secondarily,
15558 this License preserves for the author and publisher a way to get
15559 credit for their work, while not being considered responsible for
15560 modifications made by others.
15562 This License is a kind of "copyleft", which means that derivative
15563 works of the document must themselves be free in the same sense.
15564 It complements the GNU General Public License, which is a copyleft
15565 license designed for free software.
15567 We have designed this License in order to use it for manuals for
15568 free software, because free software needs free documentation: a
15569 free program should come with manuals providing the same freedoms
15570 that the software does. But this License is not limited to
15571 software manuals; it can be used for any textual work, regardless
15572 of subject matter or whether it is published as a printed book.
15573 We recommend this License principally for works whose purpose is
15574 instruction or reference.
15577 1. APPLICABILITY AND DEFINITIONS
15579 This License applies to any manual or other work that contains a
15580 notice placed by the copyright holder saying it can be distributed
15581 under the terms of this License. The "Document", below, refers to
15582 any such manual or work. Any member of the public is a licensee,
15583 and is addressed as "you."
15585 A "Modified Version" of the Document means any work containing the
15586 Document or a portion of it, either copied verbatim, or with
15587 modifications and/or translated into another language.
15589 A "Secondary Section" is a named appendix or a front-matter
15590 section of the Document that deals exclusively with the
15591 relationship of the publishers or authors of the Document to the
15592 Document's overall subject (or to related matters) and contains
15593 nothing that could fall directly within that overall subject.
15594 (For example, if the Document is in part a textbook of
15595 mathematics, a Secondary Section may not explain any mathematics.)
15596 The relationship could be a matter of historical connection with
15597 the subject or with related matters, or of legal, commercial,
15598 philosophical, ethical or political position regarding them.
15600 The "Invariant Sections" are certain Secondary Sections whose
15601 titles are designated, as being those of Invariant Sections, in
15602 the notice that says that the Document is released under this
15605 The "Cover Texts" are certain short passages of text that are
15606 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
15607 that says that the Document is released under this License.
15609 A "Transparent" copy of the Document means a machine-readable copy,
15610 represented in a format whose specification is available to the
15611 general public, whose contents can be viewed and edited directly
15612 and straightforwardly with generic text editors or (for images
15613 composed of pixels) generic paint programs or (for drawings) some
15614 widely available drawing editor, and that is suitable for input to
15615 text formatters or for automatic translation to a variety of
15616 formats suitable for input to text formatters. A copy made in an
15617 otherwise Transparent file format whose markup has been designed
15618 to thwart or discourage subsequent modification by readers is not
15619 Transparent. A copy that is not "Transparent" is called "Opaque."
15621 Examples of suitable formats for Transparent copies include plain
15622 ASCII without markup, Texinfo input format, LaTeX input format,
15623 SGML or XML using a publicly available DTD, and
15624 standard-conforming simple HTML designed for human modification.
15625 Opaque formats include PostScript, PDF, proprietary formats that
15626 can be read and edited only by proprietary word processors, SGML
15627 or XML for which the DTD and/or processing tools are not generally
15628 available, and the machine-generated HTML produced by some word
15629 processors for output purposes only.
15631 The "Title Page" means, for a printed book, the title page itself,
15632 plus such following pages as are needed to hold, legibly, the
15633 material this License requires to appear in the title page. For
15634 works in formats which do not have any title page as such, "Title
15635 Page" means the text near the most prominent appearance of the
15636 work's title, preceding the beginning of the body of the text.
15638 2. VERBATIM COPYING
15640 You may copy and distribute the Document in any medium, either
15641 commercially or noncommercially, provided that this License, the
15642 copyright notices, and the license notice saying this License
15643 applies to the Document are reproduced in all copies, and that you
15644 add no other conditions whatsoever to those of this License. You
15645 may not use technical measures to obstruct or control the reading
15646 or further copying of the copies you make or distribute. However,
15647 you may accept compensation in exchange for copies. If you
15648 distribute a large enough number of copies you must also follow
15649 the conditions in section 3.
15651 You may also lend copies, under the same conditions stated above,
15652 and you may publicly display copies.
15654 3. COPYING IN QUANTITY
15656 If you publish printed copies of the Document numbering more than
15657 100, and the Document's license notice requires Cover Texts, you
15658 must enclose the copies in covers that carry, clearly and legibly,
15659 all these Cover Texts: Front-Cover Texts on the front cover, and
15660 Back-Cover Texts on the back cover. Both covers must also clearly
15661 and legibly identify you as the publisher of these copies. The
15662 front cover must present the full title with all words of the
15663 title equally prominent and visible. You may add other material
15664 on the covers in addition. Copying with changes limited to the
15665 covers, as long as they preserve the title of the Document and
15666 satisfy these conditions, can be treated as verbatim copying in
15669 If the required texts for either cover are too voluminous to fit
15670 legibly, you should put the first ones listed (as many as fit
15671 reasonably) on the actual cover, and continue the rest onto
15674 If you publish or distribute Opaque copies of the Document
15675 numbering more than 100, you must either include a
15676 machine-readable Transparent copy along with each Opaque copy, or
15677 state in or with each Opaque copy a publicly-accessible
15678 computer-network location containing a complete Transparent copy
15679 of the Document, free of added material, which the general
15680 network-using public has access to download anonymously at no
15681 charge using public-standard network protocols. If you use the
15682 latter option, you must take reasonably prudent steps, when you
15683 begin distribution of Opaque copies in quantity, to ensure that
15684 this Transparent copy will remain thus accessible at the stated
15685 location until at least one year after the last time you
15686 distribute an Opaque copy (directly or through your agents or
15687 retailers) of that edition to the public.
15689 It is requested, but not required, that you contact the authors of
15690 the Document well before redistributing any large number of
15691 copies, to give them a chance to provide you with an updated
15692 version of the Document.
15696 You may copy and distribute a Modified Version of the Document
15697 under the conditions of sections 2 and 3 above, provided that you
15698 release the Modified Version under precisely this License, with
15699 the Modified Version filling the role of the Document, thus
15700 licensing distribution and modification of the Modified Version to
15701 whoever possesses a copy of it. In addition, you must do these
15702 things in the Modified Version:
15704 A. Use in the Title Page (and on the covers, if any) a title
15705 distinct from that of the Document, and from those of previous
15706 versions (which should, if there were any, be listed in the
15707 History section of the Document). You may use the same title
15708 as a previous version if the original publisher of that version
15710 B. List on the Title Page, as authors, one or more persons or
15711 entities responsible for authorship of the modifications in the
15712 Modified Version, together with at least five of the principal
15713 authors of the Document (all of its principal authors, if it
15714 has less than five).
15715 C. State on the Title page the name of the publisher of the
15716 Modified Version, as the publisher.
15717 D. Preserve all the copyright notices of the Document.
15718 E. Add an appropriate copyright notice for your modifications
15719 adjacent to the other copyright notices.
15720 F. Include, immediately after the copyright notices, a license
15721 notice giving the public permission to use the Modified Version
15722 under the terms of this License, in the form shown in the
15724 G. Preserve in that license notice the full lists of Invariant
15725 Sections and required Cover Texts given in the Document's
15727 H. Include an unaltered copy of this License.
15728 I. Preserve the section entitled "History", and its title, and add
15729 to it an item stating at least the title, year, new authors, and
15730 publisher of the Modified Version as given on the Title Page.
15731 If there is no section entitled "History" in the Document,
15732 create one stating the title, year, authors, and publisher of
15733 the Document as given on its Title Page, then add an item
15734 describing the Modified Version as stated in the previous
15736 J. Preserve the network location, if any, given in the Document for
15737 public access to a Transparent copy of the Document, and
15738 likewise the network locations given in the Document for
15739 previous versions it was based on. These may be placed in the
15740 "History" section. You may omit a network location for a work
15741 that was published at least four years before the Document
15742 itself, or if the original publisher of the version it refers
15743 to gives permission.
15744 K. In any section entitled "Acknowledgements" or "Dedications",
15745 preserve the section's title, and preserve in the section all the
15746 substance and tone of each of the contributor acknowledgements
15747 and/or dedications given therein.
15748 L. Preserve all the Invariant Sections of the Document,
15749 unaltered in their text and in their titles. Section numbers
15750 or the equivalent are not considered part of the section titles.
15751 M. Delete any section entitled "Endorsements." Such a section
15752 may not be included in the Modified Version.
15753 N. Do not retitle any existing section as "Endorsements" or to
15754 conflict in title with any Invariant Section.
15756 If the Modified Version includes new front-matter sections or
15757 appendices that qualify as Secondary Sections and contain no
15758 material copied from the Document, you may at your option
15759 designate some or all of these sections as invariant. To do this,
15760 add their titles to the list of Invariant Sections in the Modified
15761 Version's license notice. These titles must be distinct from any
15762 other section titles.
15764 You may add a section entitled "Endorsements", provided it contains
15765 nothing but endorsements of your Modified Version by various
15766 parties-for example, statements of peer review or that the text has
15767 been approved by an organization as the authoritative definition
15770 You may add a passage of up to five words as a Front-Cover Text,
15771 and a passage of up to 25 words as a Back-Cover Text, to the end
15772 of the list of Cover Texts in the Modified Version. Only one
15773 passage of Front-Cover Text and one of Back-Cover Text may be
15774 added by (or through arrangements made by) any one entity. If the
15775 Document already includes a cover text for the same cover,
15776 previously added by you or by arrangement made by the same entity
15777 you are acting on behalf of, you may not add another; but you may
15778 replace the old one, on explicit permission from the previous
15779 publisher that added the old one.
15781 The author(s) and publisher(s) of the Document do not by this
15782 License give permission to use their names for publicity for or to
15783 assert or imply endorsement of any Modified Version.
15785 5. COMBINING DOCUMENTS
15787 You may combine the Document with other documents released under
15788 this License, under the terms defined in section 4 above for
15789 modified versions, provided that you include in the combination
15790 all of the Invariant Sections of all of the original documents,
15791 unmodified, and list them all as Invariant Sections of your
15792 combined work in its license notice.
15794 The combined work need only contain one copy of this License, and
15795 multiple identical Invariant Sections may be replaced with a single
15796 copy. If there are multiple Invariant Sections with the same name
15797 but different contents, make the title of each such section unique
15798 by adding at the end of it, in parentheses, the name of the
15799 original author or publisher of that section if known, or else a
15800 unique number. Make the same adjustment to the section titles in
15801 the list of Invariant Sections in the license notice of the
15804 In the combination, you must combine any sections entitled
15805 "History" in the various original documents, forming one section
15806 entitled "History"; likewise combine any sections entitled
15807 "Acknowledgements", and any sections entitled "Dedications." You
15808 must delete all sections entitled "Endorsements."
15810 6. COLLECTIONS OF DOCUMENTS
15812 You may make a collection consisting of the Document and other
15813 documents released under this License, and replace the individual
15814 copies of this License in the various documents with a single copy
15815 that is included in the collection, provided that you follow the
15816 rules of this License for verbatim copying of each of the
15817 documents in all other respects.
15819 You may extract a single document from such a collection, and
15820 distribute it individually under this License, provided you insert
15821 a copy of this License into the extracted document, and follow
15822 this License in all other respects regarding verbatim copying of
15825 7. AGGREGATION WITH INDEPENDENT WORKS
15827 A compilation of the Document or its derivatives with other
15828 separate and independent documents or works, in or on a volume of
15829 a storage or distribution medium, does not as a whole count as a
15830 Modified Version of the Document, provided no compilation
15831 copyright is claimed for the compilation. Such a compilation is
15832 called an "aggregate", and this License does not apply to the
15833 other self-contained works thus compiled with the Document, on
15834 account of their being thus compiled, if they are not themselves
15835 derivative works of the Document.
15837 If the Cover Text requirement of section 3 is applicable to these
15838 copies of the Document, then if the Document is less than one
15839 quarter of the entire aggregate, the Document's Cover Texts may be
15840 placed on covers that surround only the Document within the
15841 aggregate. Otherwise they must appear on covers around the whole
15846 Translation is considered a kind of modification, so you may
15847 distribute translations of the Document under the terms of section
15848 4. Replacing Invariant Sections with translations requires special
15849 permission from their copyright holders, but you may include
15850 translations of some or all Invariant Sections in addition to the
15851 original versions of these Invariant Sections. You may include a
15852 translation of this License provided that you also include the
15853 original English version of this License. In case of a
15854 disagreement between the translation and the original English
15855 version of this License, the original English version will prevail.
15859 You may not copy, modify, sublicense, or distribute the Document
15860 except as expressly provided for under this License. Any other
15861 attempt to copy, modify, sublicense or distribute the Document is
15862 void, and will automatically terminate your rights under this
15863 License. However, parties who have received copies, or rights,
15864 from you under this License will not have their licenses
15865 terminated so long as such parties remain in full compliance.
15867 10. FUTURE REVISIONS OF THIS LICENSE
15869 The Free Software Foundation may publish new, revised versions of
15870 the GNU Free Documentation License from time to time. Such new
15871 versions will be similar in spirit to the present version, but may
15872 differ in detail to address new problems or concerns. See
15873 http://www.gnu.org/copyleft/.
15875 Each version of the License is given a distinguishing version
15876 number. If the Document specifies that a particular numbered
15877 version of this License "or any later version" applies to it, you
15878 have the option of following the terms and conditions either of
15879 that specified version or of any later version that has been
15880 published (not as a draft) by the Free Software Foundation. If
15881 the Document does not specify a version number of this License,
15882 you may choose any version ever published (not as a draft) by the
15883 Free Software Foundation.
15886 ADDENDUM: How to use this License for your documents
15887 ====================================================
15889 To use this License in a document you have written, include a copy of
15890 the License in the document and put the following copyright and license
15891 notices just after the title page:
15893 Copyright (C) YEAR YOUR NAME.
15894 Permission is granted to copy, distribute and/or modify this document
15895 under the terms of the GNU Free Documentation License, Version 1.1
15896 or any later version published by the Free Software Foundation;
15897 with the Invariant Sections being LIST THEIR TITLES, with the
15898 Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
15899 A copy of the license is included in the section entitled "GNU
15900 Free Documentation License."
15902 If you have no Invariant Sections, write "with no Invariant Sections"
15903 instead of saying which ones are invariant. If you have no Front-Cover
15904 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
15905 LIST"; likewise for Back-Cover Texts.
15907 If your document contains nontrivial examples of program code, we
15908 recommend releasing these examples in parallel under your choice of
15909 free software license, such as the GNU General Public License, to
15910 permit their use in free software.
15913 File: as.info, Node: Index, Prev: GNU Free Documentation License, Up: Top
15921 * #APP: Preprocessing.
15922 * #NO_APP: Preprocessing.
15923 * $ in symbol names <1>: D10V-Chars.
15924 * $ in symbol names <2>: SH-Chars.
15925 * $ in symbol names <3>: D30V-Chars.
15926 * $ in symbol names: SH64-Chars.
15927 * $a: ARM Mapping Symbols.
15928 * $acos math builtin, TIC54X: TIC54X-Builtins.
15929 * $asin math builtin, TIC54X: TIC54X-Builtins.
15930 * $atan math builtin, TIC54X: TIC54X-Builtins.
15931 * $atan2 math builtin, TIC54X: TIC54X-Builtins.
15932 * $ceil math builtin, TIC54X: TIC54X-Builtins.
15933 * $cos math builtin, TIC54X: TIC54X-Builtins.
15934 * $cosh math builtin, TIC54X: TIC54X-Builtins.
15935 * $cvf math builtin, TIC54X: TIC54X-Builtins.
15936 * $cvi math builtin, TIC54X: TIC54X-Builtins.
15937 * $d: ARM Mapping Symbols.
15938 * $exp math builtin, TIC54X: TIC54X-Builtins.
15939 * $fabs math builtin, TIC54X: TIC54X-Builtins.
15940 * $firstch subsym builtin, TIC54X: TIC54X-Macros.
15941 * $floor math builtin, TIC54X: TIC54X-Builtins.
15942 * $fmod math builtin, TIC54X: TIC54X-Builtins.
15943 * $int math builtin, TIC54X: TIC54X-Builtins.
15944 * $iscons subsym builtin, TIC54X: TIC54X-Macros.
15945 * $isdefed subsym builtin, TIC54X: TIC54X-Macros.
15946 * $ismember subsym builtin, TIC54X: TIC54X-Macros.
15947 * $isname subsym builtin, TIC54X: TIC54X-Macros.
15948 * $isreg subsym builtin, TIC54X: TIC54X-Macros.
15949 * $lastch subsym builtin, TIC54X: TIC54X-Macros.
15950 * $ldexp math builtin, TIC54X: TIC54X-Builtins.
15951 * $log math builtin, TIC54X: TIC54X-Builtins.
15952 * $log10 math builtin, TIC54X: TIC54X-Builtins.
15953 * $max math builtin, TIC54X: TIC54X-Builtins.
15954 * $min math builtin, TIC54X: TIC54X-Builtins.
15955 * $pow math builtin, TIC54X: TIC54X-Builtins.
15956 * $round math builtin, TIC54X: TIC54X-Builtins.
15957 * $sgn math builtin, TIC54X: TIC54X-Builtins.
15958 * $sin math builtin, TIC54X: TIC54X-Builtins.
15959 * $sinh math builtin, TIC54X: TIC54X-Builtins.
15960 * $sqrt math builtin, TIC54X: TIC54X-Builtins.
15961 * $structacc subsym builtin, TIC54X: TIC54X-Macros.
15962 * $structsz subsym builtin, TIC54X: TIC54X-Macros.
15963 * $symcmp subsym builtin, TIC54X: TIC54X-Macros.
15964 * $symlen subsym builtin, TIC54X: TIC54X-Macros.
15965 * $t: ARM Mapping Symbols.
15966 * $tan math builtin, TIC54X: TIC54X-Builtins.
15967 * $tanh math builtin, TIC54X: TIC54X-Builtins.
15968 * $trunc math builtin, TIC54X: TIC54X-Builtins.
15969 * -+ option, VAX/VMS: VAX-Opts.
15970 * --: Command Line.
15971 * --32 option, i386: i386-Options.
15972 * --32 option, x86-64: i386-Options.
15973 * --64 option, i386: i386-Options.
15974 * --64 option, x86-64: i386-Options.
15975 * --absolute-literals: Xtensa Options.
15976 * --allow-reg-prefix: SH Options.
15977 * --alternate: alternate.
15978 * --base-size-default-16: M68K-Opts.
15979 * --base-size-default-32: M68K-Opts.
15980 * --big: SH Options.
15981 * --bitwise-or option, M680x0: M68K-Opts.
15982 * --disp-size-default-16: M68K-Opts.
15983 * --disp-size-default-32: M68K-Opts.
15984 * --divide option, i386: i386-Options.
15985 * --dsp: SH Options.
15986 * --emulation=crisaout command line option, CRIS: CRIS-Opts.
15987 * --emulation=criself command line option, CRIS: CRIS-Opts.
15988 * --enforce-aligned-data: Sparc-Aligned-Data.
15989 * --fatal-warnings: W.
15990 * --fixed-special-register-names command line option, MMIX: MMIX-Opts.
15991 * --force-long-branchs: M68HC11-Opts.
15992 * --generate-example: M68HC11-Opts.
15993 * --globalize-symbols command line option, MMIX: MMIX-Opts.
15994 * --gnu-syntax command line option, MMIX: MMIX-Opts.
15995 * --hash-size=NUMBER: Overview.
15996 * --linker-allocated-gregs command line option, MMIX: MMIX-Opts.
15997 * --listing-cont-lines: listing.
15998 * --listing-lhs-width: listing.
15999 * --listing-lhs-width2: listing.
16000 * --listing-rhs-width: listing.
16001 * --little: SH Options.
16002 * --longcalls: Xtensa Options.
16003 * --march=ARCHITECTURE command line option, CRIS: CRIS-Opts.
16005 * --mul-bug-abort command line option, CRIS: CRIS-Opts.
16006 * --no-absolute-literals: Xtensa Options.
16007 * --no-expand command line option, MMIX: MMIX-Opts.
16008 * --no-longcalls: Xtensa Options.
16009 * --no-merge-gregs command line option, MMIX: MMIX-Opts.
16010 * --no-mul-bug-abort command line option, CRIS: CRIS-Opts.
16011 * --no-predefined-syms command line option, MMIX: MMIX-Opts.
16012 * --no-pushj-stubs command line option, MMIX: MMIX-Opts.
16013 * --no-stubs command line option, MMIX: MMIX-Opts.
16014 * --no-target-align: Xtensa Options.
16015 * --no-text-section-literals: Xtensa Options.
16016 * --no-transform: Xtensa Options.
16017 * --no-underscore command line option, CRIS: CRIS-Opts.
16019 * --pcrel: M68K-Opts.
16020 * --pic command line option, CRIS: CRIS-Opts.
16021 * --print-insn-syntax: M68HC11-Opts.
16022 * --print-opcodes: M68HC11-Opts.
16023 * --register-prefix-optional option, M680x0: M68K-Opts.
16024 * --relax: SH Options.
16025 * --relax command line option, MMIX: MMIX-Opts.
16026 * --rename-section: Xtensa Options.
16027 * --renesas: SH Options.
16028 * --short-branchs: M68HC11-Opts.
16029 * --small: SH Options.
16030 * --statistics: statistics.
16031 * --strict-direct-mode: M68HC11-Opts.
16032 * --target-align: Xtensa Options.
16033 * --text-section-literals: Xtensa Options.
16034 * --traditional-format: traditional-format.
16035 * --transform: Xtensa Options.
16036 * --underscore command line option, CRIS: CRIS-Opts.
16038 * -1 option, VAX/VMS: VAX-Opts.
16039 * -32addr command line option, Alpha: Alpha Options.
16041 * -A options, i960: Options-i960.
16048 * -Asparclet: Sparc-Opts.
16049 * -Asparclite: Sparc-Opts.
16050 * -Av6: Sparc-Opts.
16051 * -Av8: Sparc-Opts.
16052 * -Av9: Sparc-Opts.
16053 * -Av9a: Sparc-Opts.
16054 * -b option, i960: Options-i960.
16055 * -big option, M32R: M32R-Opts.
16056 * -construct-floats: MIPS Opts.
16058 * -D, ignored on VAX: VAX-Opts.
16059 * -d, VAX option: VAX-Opts.
16060 * -eabi= command line option, ARM: ARM Options.
16061 * -EB command line option, ARC: ARC Options.
16062 * -EB command line option, ARM: ARM Options.
16063 * -EB option (MIPS): MIPS Opts.
16064 * -EB option, M32R: M32R-Opts.
16065 * -EL command line option, ARC: ARC Options.
16066 * -EL command line option, ARM: ARM Options.
16067 * -EL option (MIPS): MIPS Opts.
16068 * -EL option, M32R: M32R-Opts.
16070 * -F command line option, Alpha: Alpha Options.
16071 * -G command line option, Alpha: Alpha Options.
16072 * -g command line option, Alpha: Alpha Options.
16073 * -G option (MIPS): MIPS Opts.
16074 * -h option, VAX/VMS: VAX-Opts.
16075 * -H option, VAX/VMS: VAX-Opts.
16077 * -ignore-parallel-conflicts option, M32RX: M32R-Opts.
16078 * -Ip option, M32RX: M32R-Opts.
16079 * -J, ignored on VAX: VAX-Opts.
16081 * -k command line option, ARM: ARM Options.
16082 * -KPIC option, M32R: M32R-Opts.
16084 * -l option, M680x0: M68K-Opts.
16085 * -little option, M32R: M32R-Opts.
16087 * -m11/03: PDP-11-Options.
16088 * -m11/04: PDP-11-Options.
16089 * -m11/05: PDP-11-Options.
16090 * -m11/10: PDP-11-Options.
16091 * -m11/15: PDP-11-Options.
16092 * -m11/20: PDP-11-Options.
16093 * -m11/21: PDP-11-Options.
16094 * -m11/23: PDP-11-Options.
16095 * -m11/24: PDP-11-Options.
16096 * -m11/34: PDP-11-Options.
16097 * -m11/34a: PDP-11-Options.
16098 * -m11/35: PDP-11-Options.
16099 * -m11/40: PDP-11-Options.
16100 * -m11/44: PDP-11-Options.
16101 * -m11/45: PDP-11-Options.
16102 * -m11/50: PDP-11-Options.
16103 * -m11/53: PDP-11-Options.
16104 * -m11/55: PDP-11-Options.
16105 * -m11/60: PDP-11-Options.
16106 * -m11/70: PDP-11-Options.
16107 * -m11/73: PDP-11-Options.
16108 * -m11/83: PDP-11-Options.
16109 * -m11/84: PDP-11-Options.
16110 * -m11/93: PDP-11-Options.
16111 * -m11/94: PDP-11-Options.
16112 * -m16c option, M16C: M32C-Opts.
16113 * -m32c option, M32C: M32C-Opts.
16114 * -m32r option, M32R: M32R-Opts.
16115 * -m32rx option, M32R2: M32R-Opts.
16116 * -m32rx option, M32RX: M32R-Opts.
16117 * -m68000 and related options: M68K-Opts.
16118 * -m68hc11: M68HC11-Opts.
16119 * -m68hc12: M68HC11-Opts.
16120 * -m68hcs12: M68HC11-Opts.
16121 * -mall: PDP-11-Options.
16122 * -mall-extensions: PDP-11-Options.
16123 * -mapcs command line option, ARM: ARM Options.
16124 * -mapcs-float command line option, ARM: ARM Options.
16125 * -mapcs-reentrant command line option, ARM: ARM Options.
16126 * -marc[5|6|7|8] command line option, ARC: ARC Options.
16127 * -march= command line option, ARM: ARM Options.
16128 * -matpcs command line option, ARM: ARM Options.
16129 * -mcis: PDP-11-Options.
16130 * -mconstant-gp command line option, IA-64: IA-64 Options.
16131 * -mCPU command line option, Alpha: Alpha Options.
16132 * -mcpu option, cpu: TIC54X-Opts.
16133 * -mcpu= command line option, ARM: ARM Options.
16134 * -mcsm: PDP-11-Options.
16135 * -mdebug command line option, Alpha: Alpha Options.
16136 * -me option, stderr redirect: TIC54X-Opts.
16137 * -meis: PDP-11-Options.
16138 * -merrors-to-file option, stderr redirect: TIC54X-Opts.
16139 * -mf option, far-mode: TIC54X-Opts.
16140 * -mf11: PDP-11-Options.
16141 * -mfar-mode option, far-mode: TIC54X-Opts.
16142 * -mfis: PDP-11-Options.
16143 * -mfloat-abi= command line option, ARM: ARM Options.
16144 * -mfp-11: PDP-11-Options.
16145 * -mfpp: PDP-11-Options.
16146 * -mfpu: PDP-11-Options.
16147 * -mfpu= command line option, ARM: ARM Options.
16148 * -mip2022 option, IP2K: IP2K-Opts.
16149 * -mip2022ext option, IP2022: IP2K-Opts.
16150 * -mj11: PDP-11-Options.
16151 * -mka11: PDP-11-Options.
16152 * -mkb11: PDP-11-Options.
16153 * -mkd11a: PDP-11-Options.
16154 * -mkd11b: PDP-11-Options.
16155 * -mkd11d: PDP-11-Options.
16156 * -mkd11e: PDP-11-Options.
16157 * -mkd11f: PDP-11-Options.
16158 * -mkd11h: PDP-11-Options.
16159 * -mkd11k: PDP-11-Options.
16160 * -mkd11q: PDP-11-Options.
16161 * -mkd11z: PDP-11-Options.
16162 * -mkev11: PDP-11-Options.
16163 * -mlimited-eis: PDP-11-Options.
16164 * -mlong: M68HC11-Opts.
16165 * -mlong-double: M68HC11-Opts.
16166 * -mmfpt: PDP-11-Options.
16167 * -mmicrocode: PDP-11-Options.
16168 * -mmutiproc: PDP-11-Options.
16169 * -mmxps: PDP-11-Options.
16170 * -mno-cis: PDP-11-Options.
16171 * -mno-csm: PDP-11-Options.
16172 * -mno-eis: PDP-11-Options.
16173 * -mno-extensions: PDP-11-Options.
16174 * -mno-fis: PDP-11-Options.
16175 * -mno-fp-11: PDP-11-Options.
16176 * -mno-fpp: PDP-11-Options.
16177 * -mno-fpu: PDP-11-Options.
16178 * -mno-kev11: PDP-11-Options.
16179 * -mno-limited-eis: PDP-11-Options.
16180 * -mno-mfpt: PDP-11-Options.
16181 * -mno-microcode: PDP-11-Options.
16182 * -mno-mutiproc: PDP-11-Options.
16183 * -mno-mxps: PDP-11-Options.
16184 * -mno-pic: PDP-11-Options.
16185 * -mno-spl: PDP-11-Options.
16186 * -mno-sym32: MIPS Opts.
16187 * -mpic: PDP-11-Options.
16188 * -mrelax command line option, V850: V850 Options.
16189 * -mshort: M68HC11-Opts.
16190 * -mshort-double: M68HC11-Opts.
16191 * -mspl: PDP-11-Options.
16192 * -msym32: MIPS Opts.
16193 * -mt11: PDP-11-Options.
16194 * -mthumb command line option, ARM: ARM Options.
16195 * -mthumb-interwork command line option, ARM: ARM Options.
16196 * -mv850 command line option, V850: V850 Options.
16197 * -mv850any command line option, V850: V850 Options.
16198 * -mv850e command line option, V850: V850 Options.
16199 * -mv850e1 command line option, V850: V850 Options.
16200 * -N command line option, CRIS: CRIS-Opts.
16201 * -nIp option, M32RX: M32R-Opts.
16202 * -no-bitinst, M32R2: M32R-Opts.
16203 * -no-construct-floats: MIPS Opts.
16204 * -no-ignore-parallel-conflicts option, M32RX: M32R-Opts.
16205 * -no-mdebug command line option, Alpha: Alpha Options.
16206 * -no-parallel option, M32RX: M32R-Opts.
16207 * -no-relax option, i960: Options-i960.
16208 * -no-warn-explicit-parallel-conflicts option, M32RX: M32R-Opts.
16209 * -no-warn-unmatched-high option, M32R: M32R-Opts.
16210 * -nocpp ignored (MIPS): MIPS Opts.
16212 * -O option, M32RX: M32R-Opts.
16213 * -parallel option, M32RX: M32R-Opts.
16215 * -r800 command line option, Z80: Z80 Options.
16216 * -relax command line option, Alpha: Alpha Options.
16217 * -S, ignored on VAX: VAX-Opts.
16218 * -t, ignored on VAX: VAX-Opts.
16219 * -T, ignored on VAX: VAX-Opts.
16221 * -V, redundant on VAX: VAX-Opts.
16224 * -warn-explicit-parallel-conflicts option, M32RX: M32R-Opts.
16225 * -warn-unmatched-high option, M32R: M32R-Opts.
16226 * -Wnp option, M32RX: M32R-Opts.
16227 * -Wnuh option, M32RX: M32R-Opts.
16228 * -Wp option, M32RX: M32R-Opts.
16229 * -wsigned_overflow command line option, V850: V850 Options.
16230 * -Wuh option, M32RX: M32R-Opts.
16231 * -wunsigned_overflow command line option, V850: V850 Options.
16232 * -x command line option, MMIX: MMIX-Opts.
16233 * -z80 command line option, Z80: Z80 Options.
16234 * -z8001 command line option, Z8000: Z8000 Options.
16235 * -z8002 command line option, Z8000: Z8000 Options.
16237 * .arch directive, ARM: ARM Directives.
16238 * .big directive, M32RX: M32R-Directives.
16239 * .cantunwind directive, ARM: ARM Directives.
16240 * .cpu directive, ARM: ARM Directives.
16241 * .eabi_attribute directive, ARM: ARM Directives.
16242 * .fnend directive, ARM: ARM Directives.
16243 * .fnstart directive, ARM: ARM Directives.
16244 * .fpu directive, ARM: ARM Directives.
16245 * .handlerdata directive, ARM: ARM Directives.
16246 * .insn: MIPS insn.
16247 * .little directive, M32RX: M32R-Directives.
16248 * .ltorg directive, ARM: ARM Directives.
16249 * .m32r directive, M32R: M32R-Directives.
16250 * .m32r2 directive, M32R2: M32R-Directives.
16251 * .m32rx directive, M32RX: M32R-Directives.
16252 * .movsp directive, ARM: ARM Directives.
16254 * .pad directive, ARM: ARM Directives.
16255 * .param on HPPA: HPPA Directives.
16256 * .personality directive, ARM: ARM Directives.
16257 * .personalityindex directive, ARM: ARM Directives.
16258 * .pool directive, ARM: ARM Directives.
16259 * .save directive, ARM: ARM Directives.
16260 * .set autoextend: MIPS autoextend.
16261 * .set dsp: MIPS ASE instruction generation overrides.
16262 * .set mdmx: MIPS ASE instruction generation overrides.
16263 * .set mips3d: MIPS ASE instruction generation overrides.
16264 * .set mipsN: MIPS ISA.
16265 * .set mt: MIPS ASE instruction generation overrides.
16266 * .set noautoextend: MIPS autoextend.
16267 * .set nodsp: MIPS ASE instruction generation overrides.
16268 * .set nomdmx: MIPS ASE instruction generation overrides.
16269 * .set nomips3d: MIPS ASE instruction generation overrides.
16270 * .set nomt: MIPS ASE instruction generation overrides.
16271 * .set nosym32: MIPS symbol sizes.
16272 * .set pop: MIPS option stack.
16273 * .set push: MIPS option stack.
16274 * .set sym32: MIPS symbol sizes.
16275 * .setfp directive, ARM: ARM Directives.
16276 * .unwind_raw directive, ARM: ARM Directives.
16277 * .v850 directive, V850: V850 Directives.
16278 * .v850e directive, V850: V850 Directives.
16279 * .v850e1 directive, V850: V850 Directives.
16280 * .z8001: Z8000 Directives.
16281 * .z8002: Z8000 Directives.
16282 * 16-bit code, i386: i386-16bit.
16283 * 2byte directive, ARC: ARC Directives.
16284 * 3byte directive, ARC: ARC Directives.
16285 * 3DNow!, i386: i386-SIMD.
16286 * 3DNow!, x86-64: i386-SIMD.
16287 * 430 support: MSP430-Dependent.
16288 * 4byte directive, ARC: ARC Directives.
16289 * : (label): Statements.
16290 * @word modifier, D10V: D10V-Word.
16291 * \" (doublequote character): Strings.
16292 * \\ (\ character): Strings.
16293 * \b (backspace character): Strings.
16294 * \DDD (octal character code): Strings.
16295 * \f (formfeed character): Strings.
16296 * \n (newline character): Strings.
16297 * \r (carriage return character): Strings.
16298 * \t (tab): Strings.
16299 * \XD... (hex character code): Strings.
16300 * _ opcode prefix: Xtensa Opcodes.
16302 * a.out symbol attributes: a.out Symbols.
16303 * A_DIR environment variable, TIC54X: TIC54X-Env.
16304 * ABI options, SH64: SH64 Options.
16305 * ABORT directive: ABORT.
16306 * abort directive: Abort.
16307 * absolute section: Ld Sections.
16308 * absolute-literals directive: Absolute Literals Directive.
16309 * ADDI instructions, relaxation: Xtensa Immediate Relaxation.
16310 * addition, permitted arguments: Infix Ops.
16311 * addresses: Expressions.
16312 * addresses, format of: Secs Background.
16313 * addressing modes, D10V: D10V-Addressing.
16314 * addressing modes, D30V: D30V-Addressing.
16315 * addressing modes, H8/300: H8/300-Addressing.
16316 * addressing modes, M680x0: M68K-Syntax.
16317 * addressing modes, M68HC11: M68HC11-Syntax.
16318 * addressing modes, SH: SH-Addressing.
16319 * addressing modes, SH64: SH64-Addressing.
16320 * addressing modes, Z8000: Z8000-Addressing.
16321 * ADR reg,<label> pseudo op, ARM: ARM Opcodes.
16322 * ADRL reg,<label> pseudo op, ARM: ARM Opcodes.
16323 * advancing location counter: Org.
16324 * align directive: Align.
16325 * align directive, ARM: ARM Directives.
16326 * align directive, SPARC: Sparc-Directives.
16327 * align directive, TIC54X: TIC54X-Directives.
16328 * alignment of branch targets: Xtensa Automatic Alignment.
16329 * alignment of ENTRY instructions: Xtensa Automatic Alignment.
16330 * alignment of LOOP instructions: Xtensa Automatic Alignment.
16331 * Alpha floating point (IEEE): Alpha Floating Point.
16332 * Alpha line comment character: Alpha-Chars.
16333 * Alpha line separator: Alpha-Chars.
16334 * Alpha notes: Alpha Notes.
16335 * Alpha options: Alpha Options.
16336 * Alpha registers: Alpha-Regs.
16337 * Alpha relocations: Alpha-Relocs.
16338 * Alpha support: Alpha-Dependent.
16339 * Alpha Syntax: Alpha Options.
16340 * Alpha-only directives: Alpha Directives.
16341 * altered difference tables: Word.
16342 * alternate syntax for the 680x0: M68K-Moto-Syntax.
16343 * ARC floating point (IEEE): ARC Floating Point.
16344 * ARC machine directives: ARC Directives.
16345 * ARC opcodes: ARC Opcodes.
16346 * ARC options (none): ARC Options.
16347 * ARC register names: ARC-Regs.
16348 * ARC special characters: ARC-Chars.
16349 * ARC support: ARC-Dependent.
16350 * arc5 arc5, ARC: ARC Options.
16351 * arc6 arc6, ARC: ARC Options.
16352 * arc7 arc7, ARC: ARC Options.
16353 * arc8 arc8, ARC: ARC Options.
16354 * arch directive, i386: i386-Arch.
16355 * arch directive, x86-64: i386-Arch.
16356 * architecture options, i960: Options-i960.
16357 * architecture options, IP2022: IP2K-Opts.
16358 * architecture options, IP2K: IP2K-Opts.
16359 * architecture options, M16C: M32C-Opts.
16360 * architecture options, M32C: M32C-Opts.
16361 * architecture options, M32R: M32R-Opts.
16362 * architecture options, M32R2: M32R-Opts.
16363 * architecture options, M32RX: M32R-Opts.
16364 * architecture options, M680x0: M68K-Opts.
16365 * Architecture variant option, CRIS: CRIS-Opts.
16366 * architectures, PowerPC: PowerPC-Opts.
16367 * architectures, SPARC: Sparc-Opts.
16368 * arguments for addition: Infix Ops.
16369 * arguments for subtraction: Infix Ops.
16370 * arguments in expressions: Arguments.
16371 * arithmetic functions: Operators.
16372 * arithmetic operands: Arguments.
16373 * arm directive, ARM: ARM Directives.
16374 * ARM floating point (IEEE): ARM Floating Point.
16375 * ARM identifiers: ARM-Chars.
16376 * ARM immediate character: ARM-Chars.
16377 * ARM line comment character: ARM-Chars.
16378 * ARM line separator: ARM-Chars.
16379 * ARM machine directives: ARM Directives.
16380 * ARM opcodes: ARM Opcodes.
16381 * ARM options (none): ARM Options.
16382 * ARM register names: ARM-Regs.
16383 * ARM support: ARM-Dependent.
16384 * ascii directive: Ascii.
16385 * asciz directive: Asciz.
16386 * asg directive, TIC54X: TIC54X-Directives.
16387 * assembler bugs, reporting: Bug Reporting.
16388 * assembler crash: Bug Criteria.
16389 * assembler directive .arch, CRIS: CRIS-Pseudos.
16390 * assembler directive .dword, CRIS: CRIS-Pseudos.
16391 * assembler directive .far, M68HC11: M68HC11-Directives.
16392 * assembler directive .interrupt, M68HC11: M68HC11-Directives.
16393 * assembler directive .mode, M68HC11: M68HC11-Directives.
16394 * assembler directive .relax, M68HC11: M68HC11-Directives.
16395 * assembler directive .syntax, CRIS: CRIS-Pseudos.
16396 * assembler directive .xrefb, M68HC11: M68HC11-Directives.
16397 * assembler directive BSPEC, MMIX: MMIX-Pseudos.
16398 * assembler directive BYTE, MMIX: MMIX-Pseudos.
16399 * assembler directive ESPEC, MMIX: MMIX-Pseudos.
16400 * assembler directive GREG, MMIX: MMIX-Pseudos.
16401 * assembler directive IS, MMIX: MMIX-Pseudos.
16402 * assembler directive LOC, MMIX: MMIX-Pseudos.
16403 * assembler directive LOCAL, MMIX: MMIX-Pseudos.
16404 * assembler directive OCTA, MMIX: MMIX-Pseudos.
16405 * assembler directive PREFIX, MMIX: MMIX-Pseudos.
16406 * assembler directive TETRA, MMIX: MMIX-Pseudos.
16407 * assembler directive WYDE, MMIX: MMIX-Pseudos.
16408 * assembler directives, CRIS: CRIS-Pseudos.
16409 * assembler directives, M68HC11: M68HC11-Directives.
16410 * assembler directives, M68HC12: M68HC11-Directives.
16411 * assembler directives, MMIX: MMIX-Pseudos.
16412 * assembler internal logic error: As Sections.
16413 * assembler version: v.
16414 * assembler, and linker: Secs Background.
16415 * assembly listings, enabling: a.
16416 * assigning values to symbols <1>: Equ.
16417 * assigning values to symbols: Setting Symbols.
16418 * atmp directive, i860: Directives-i860.
16419 * att_syntax pseudo op, i386: i386-Syntax.
16420 * att_syntax pseudo op, x86-64: i386-Syntax.
16421 * attributes, symbol: Symbol Attributes.
16422 * auxiliary attributes, COFF symbols: COFF Symbols.
16423 * auxiliary symbol information, COFF: Dim.
16425 * backslash (\\): Strings.
16426 * backspace (\b): Strings.
16427 * balign directive: Balign.
16428 * balignl directive: Balign.
16429 * balignw directive: Balign.
16430 * bes directive, TIC54X: TIC54X-Directives.
16431 * BFIN directives: BFIN Directives.
16432 * BFIN syntax: BFIN Syntax.
16433 * big endian output, MIPS: Overview.
16434 * big endian output, PJ: Overview.
16435 * big-endian output, MIPS: MIPS Opts.
16436 * bignums: Bignums.
16437 * binary constants, TIC54X: TIC54X-Constants.
16438 * binary files, including: Incbin.
16439 * binary integers: Integers.
16440 * bit names, IA-64: IA-64-Bits.
16441 * bitfields, not supported on VAX: VAX-no.
16442 * Blackfin support: BFIN-Dependent.
16443 * block: Z8000 Directives.
16444 * branch improvement, M680x0: M68K-Branch.
16445 * branch improvement, M68HC11: M68HC11-Branch.
16446 * branch improvement, VAX: VAX-branch.
16447 * branch instructions, relaxation: Xtensa Branch Relaxation.
16448 * branch recording, i960: Options-i960.
16449 * branch statistics table, i960: Options-i960.
16450 * branch target alignment: Xtensa Automatic Alignment.
16451 * break directive, TIC54X: TIC54X-Directives.
16452 * BSD syntax: PDP-11-Syntax.
16453 * bss directive, i960: Directives-i960.
16454 * bss directive, TIC54X: TIC54X-Directives.
16455 * bss section <1>: Ld Sections.
16456 * bss section: bss.
16457 * bug criteria: Bug Criteria.
16458 * bug reports: Bug Reporting.
16459 * bugs in assembler: Reporting Bugs.
16460 * Built-in symbols, CRIS: CRIS-Symbols.
16461 * builtin math functions, TIC54X: TIC54X-Builtins.
16462 * builtin subsym functions, TIC54X: TIC54X-Macros.
16463 * bus lock prefixes, i386: i386-Prefixes.
16464 * bval: Z8000 Directives.
16465 * byte directive: Byte.
16466 * byte directive, TIC54X: TIC54X-Directives.
16467 * C54XDSP_DIR environment variable, TIC54X: TIC54X-Env.
16468 * c_mode directive, TIC54X: TIC54X-Directives.
16469 * call instructions, i386: i386-Mnemonics.
16470 * call instructions, relaxation: Xtensa Call Relaxation.
16471 * call instructions, x86-64: i386-Mnemonics.
16472 * callj, i960 pseudo-opcode: callj-i960.
16473 * carriage return (\r): Strings.
16474 * case sensitivity, Z80: Z80-Case.
16475 * cfi_endproc directive: CFI directives.
16476 * cfi_startproc directive: CFI directives.
16477 * char directive, TIC54X: TIC54X-Directives.
16478 * character constant, Z80: Z80-Chars.
16479 * character constants: Characters.
16480 * character escape codes: Strings.
16481 * character escapes, Z80: Z80-Chars.
16482 * character, single: Chars.
16483 * characters used in symbols: Symbol Intro.
16484 * clink directive, TIC54X: TIC54X-Directives.
16485 * code directive, ARM: ARM Directives.
16486 * code16 directive, i386: i386-16bit.
16487 * code16gcc directive, i386: i386-16bit.
16488 * code32 directive, i386: i386-16bit.
16489 * code64 directive, i386: i386-16bit.
16490 * code64 directive, x86-64: i386-16bit.
16491 * COFF auxiliary symbol information: Dim.
16492 * COFF structure debugging: Tag.
16493 * COFF symbol attributes: COFF Symbols.
16494 * COFF symbol descriptor: Desc.
16495 * COFF symbol storage class: Scl.
16496 * COFF symbol type: Type.
16497 * COFF symbols, debugging: Def.
16498 * COFF value attribute: Val.
16499 * COMDAT: Linkonce.
16500 * comm directive: Comm.
16501 * command line conventions: Command Line.
16502 * command line options, V850: V850 Options.
16503 * command-line options ignored, VAX: VAX-Opts.
16504 * comments: Comments.
16505 * comments, M680x0: M68K-Chars.
16506 * comments, removed by preprocessor: Preprocessing.
16507 * common directive, SPARC: Sparc-Directives.
16508 * common sections: Linkonce.
16509 * common variable storage: bss.
16510 * compare and jump expansions, i960: Compare-and-branch-i960.
16511 * compare/branch instructions, i960: Compare-and-branch-i960.
16512 * comparison expressions: Infix Ops.
16513 * conditional assembly: If.
16514 * constant, single character: Chars.
16515 * constants: Constants.
16516 * constants, bignum: Bignums.
16517 * constants, character: Characters.
16518 * constants, converted by preprocessor: Preprocessing.
16519 * constants, floating point: Flonums.
16520 * constants, integer: Integers.
16521 * constants, number: Numbers.
16522 * constants, string: Strings.
16523 * constants, TIC54X: TIC54X-Constants.
16524 * conversion instructions, i386: i386-Mnemonics.
16525 * conversion instructions, x86-64: i386-Mnemonics.
16526 * coprocessor wait, i386: i386-Prefixes.
16527 * copy directive, TIC54X: TIC54X-Directives.
16528 * crash of assembler: Bug Criteria.
16529 * CRIS --emulation=crisaout command line option: CRIS-Opts.
16530 * CRIS --emulation=criself command line option: CRIS-Opts.
16531 * CRIS --march=ARCHITECTURE command line option: CRIS-Opts.
16532 * CRIS --mul-bug-abort command line option: CRIS-Opts.
16533 * CRIS --no-mul-bug-abort command line option: CRIS-Opts.
16534 * CRIS --no-underscore command line option: CRIS-Opts.
16535 * CRIS --pic command line option: CRIS-Opts.
16536 * CRIS --underscore command line option: CRIS-Opts.
16537 * CRIS -N command line option: CRIS-Opts.
16538 * CRIS architecture variant option: CRIS-Opts.
16539 * CRIS assembler directive .arch: CRIS-Pseudos.
16540 * CRIS assembler directive .dword: CRIS-Pseudos.
16541 * CRIS assembler directive .syntax: CRIS-Pseudos.
16542 * CRIS assembler directives: CRIS-Pseudos.
16543 * CRIS built-in symbols: CRIS-Symbols.
16544 * CRIS instruction expansion: CRIS-Expand.
16545 * CRIS line comment characters: CRIS-Chars.
16546 * CRIS options: CRIS-Opts.
16547 * CRIS position-independent code: CRIS-Opts.
16548 * CRIS pseudo-op .arch: CRIS-Pseudos.
16549 * CRIS pseudo-op .dword: CRIS-Pseudos.
16550 * CRIS pseudo-op .syntax: CRIS-Pseudos.
16551 * CRIS pseudo-ops: CRIS-Pseudos.
16552 * CRIS register names: CRIS-Regs.
16553 * CRIS support: CRIS-Dependent.
16554 * CRIS symbols in position-independent code: CRIS-Pic.
16555 * ctbp register, V850: V850-Regs.
16556 * ctoff pseudo-op, V850: V850 Opcodes.
16557 * ctpc register, V850: V850-Regs.
16558 * ctpsw register, V850: V850-Regs.
16559 * current address: Dot.
16560 * current address, advancing: Org.
16561 * D10V @word modifier: D10V-Word.
16562 * D10V addressing modes: D10V-Addressing.
16563 * D10V floating point: D10V-Float.
16564 * D10V line comment character: D10V-Chars.
16565 * D10V opcode summary: D10V-Opcodes.
16566 * D10V optimization: Overview.
16567 * D10V options: D10V-Opts.
16568 * D10V registers: D10V-Regs.
16569 * D10V size modifiers: D10V-Size.
16570 * D10V sub-instruction ordering: D10V-Chars.
16571 * D10V sub-instructions: D10V-Subs.
16572 * D10V support: D10V-Dependent.
16573 * D10V syntax: D10V-Syntax.
16574 * D30V addressing modes: D30V-Addressing.
16575 * D30V floating point: D30V-Float.
16576 * D30V Guarded Execution: D30V-Guarded.
16577 * D30V line comment character: D30V-Chars.
16578 * D30V nops: Overview.
16579 * D30V nops after 32-bit multiply: Overview.
16580 * D30V opcode summary: D30V-Opcodes.
16581 * D30V optimization: Overview.
16582 * D30V options: D30V-Opts.
16583 * D30V registers: D30V-Regs.
16584 * D30V size modifiers: D30V-Size.
16585 * D30V sub-instruction ordering: D30V-Chars.
16586 * D30V sub-instructions: D30V-Subs.
16587 * D30V support: D30V-Dependent.
16588 * D30V syntax: D30V-Syntax.
16589 * data alignment on SPARC: Sparc-Aligned-Data.
16590 * data and text sections, joining: R.
16591 * data directive: Data.
16592 * data directive, TIC54X: TIC54X-Directives.
16593 * data section: Ld Sections.
16594 * data1 directive, M680x0: M68K-Directives.
16595 * data2 directive, M680x0: M68K-Directives.
16596 * datalabel, SH64: SH64-Addressing.
16597 * dbpc register, V850: V850-Regs.
16598 * dbpsw register, V850: V850-Regs.
16599 * debuggers, and symbol order: Symbols.
16600 * debugging COFF symbols: Def.
16601 * DEC syntax: PDP-11-Syntax.
16602 * decimal integers: Integers.
16603 * def directive: Def.
16604 * def directive, TIC54X: TIC54X-Directives.
16605 * density instructions: Density Instructions.
16606 * dependency tracking: MD.
16607 * deprecated directives: Deprecated.
16608 * desc directive: Desc.
16609 * descriptor, of a.out symbol: Symbol Desc.
16610 * dfloat directive, VAX: VAX-directives.
16611 * difference tables altered: Word.
16612 * difference tables, warning: K.
16613 * differences, mmixal: MMIX-mmixal.
16614 * dim directive: Dim.
16615 * directives and instructions: Statements.
16616 * directives for PowerPC: PowerPC-Pseudo.
16617 * directives, BFIN: BFIN Directives.
16618 * directives, M32R: M32R-Directives.
16619 * directives, M680x0: M68K-Directives.
16620 * directives, machine independent: Pseudo Ops.
16621 * directives, Xtensa: Xtensa Directives.
16622 * directives, Z8000: Z8000 Directives.
16623 * displacement sizing character, VAX: VAX-operands.
16624 * dollar local symbols: Symbol Names.
16625 * dot (symbol): Dot.
16626 * double directive: Double.
16627 * double directive, i386: i386-Float.
16628 * double directive, M680x0: M68K-Float.
16629 * double directive, M68HC11: M68HC11-Float.
16630 * double directive, TIC54X: TIC54X-Directives.
16631 * double directive, VAX: VAX-float.
16632 * double directive, x86-64: i386-Float.
16633 * doublequote (\"): Strings.
16634 * drlist directive, TIC54X: TIC54X-Directives.
16635 * drnolist directive, TIC54X: TIC54X-Directives.
16636 * dual directive, i860: Directives-i860.
16637 * ECOFF sections: MIPS Object.
16638 * ecr register, V850: V850-Regs.
16639 * eight-byte integer: Quad.
16640 * eipc register, V850: V850-Regs.
16641 * eipsw register, V850: V850-Regs.
16642 * eject directive: Eject.
16643 * ELF symbol type: Type.
16644 * else directive: Else.
16645 * elseif directive: Elseif.
16646 * empty expressions: Empty Exprs.
16647 * emsg directive, TIC54X: TIC54X-Directives.
16648 * emulation: Overview.
16649 * end directive: End.
16650 * enddual directive, i860: Directives-i860.
16651 * endef directive: Endef.
16652 * endfunc directive: Endfunc.
16653 * endianness, MIPS: Overview.
16654 * endianness, PJ: Overview.
16655 * endif directive: Endif.
16656 * endloop directive, TIC54X: TIC54X-Directives.
16657 * endm directive: Macro.
16658 * endm directive, TIC54X: TIC54X-Directives.
16659 * endstruct directive, TIC54X: TIC54X-Directives.
16660 * endunion directive, TIC54X: TIC54X-Directives.
16661 * ENTRY instructions, alignment: Xtensa Automatic Alignment.
16662 * environment settings, TIC54X: TIC54X-Env.
16663 * EOF, newline must precede: Statements.
16664 * ep register, V850: V850-Regs.
16665 * equ directive: Equ.
16666 * equ directive, TIC54X: TIC54X-Directives.
16667 * equiv directive: Equiv.
16668 * eqv directive: Eqv.
16669 * err directive: Err.
16670 * error directive: Error.
16671 * error messages: Errors.
16672 * error on valid input: Bug Criteria.
16673 * errors, caused by warnings: W.
16674 * errors, continuing after: Z.
16675 * ESA/390 floating point (IEEE): ESA/390 Floating Point.
16676 * ESA/390 support: ESA/390-Dependent.
16677 * ESA/390 Syntax: ESA/390 Options.
16678 * ESA/390-only directives: ESA/390 Directives.
16679 * escape codes, character: Strings.
16680 * eval directive, TIC54X: TIC54X-Directives.
16681 * even: Z8000 Directives.
16682 * even directive, M680x0: M68K-Directives.
16683 * even directive, TIC54X: TIC54X-Directives.
16684 * exitm directive: Macro.
16685 * expr (internal section): As Sections.
16686 * expression arguments: Arguments.
16687 * expressions: Expressions.
16688 * expressions, comparison: Infix Ops.
16689 * expressions, empty: Empty Exprs.
16690 * expressions, integer: Integer Exprs.
16691 * extAuxRegister directive, ARC: ARC Directives.
16692 * extCondCode directive, ARC: ARC Directives.
16693 * extCoreRegister directive, ARC: ARC Directives.
16694 * extend directive M680x0: M68K-Float.
16695 * extend directive M68HC11: M68HC11-Float.
16696 * extended directive, i960: Directives-i960.
16697 * extern directive: Extern.
16698 * extInstruction directive, ARC: ARC Directives.
16699 * fail directive: Fail.
16700 * far_mode directive, TIC54X: TIC54X-Directives.
16701 * faster processing (-f): f.
16702 * fatal signal: Bug Criteria.
16703 * fclist directive, TIC54X: TIC54X-Directives.
16704 * fcnolist directive, TIC54X: TIC54X-Directives.
16705 * fepc register, V850: V850-Regs.
16706 * fepsw register, V850: V850-Regs.
16707 * ffloat directive, VAX: VAX-directives.
16708 * field directive, TIC54X: TIC54X-Directives.
16709 * file directive <1>: File.
16710 * file directive: LNS directives.
16711 * file directive, MSP 430: MSP430 Directives.
16712 * file name, logical: File.
16713 * files, including: Include.
16714 * files, input: Input Files.
16715 * fill directive: Fill.
16716 * filling memory <1>: Skip.
16717 * filling memory: Space.
16718 * FLIX syntax: Xtensa Syntax.
16719 * float directive: Float.
16720 * float directive, i386: i386-Float.
16721 * float directive, M680x0: M68K-Float.
16722 * float directive, M68HC11: M68HC11-Float.
16723 * float directive, TIC54X: TIC54X-Directives.
16724 * float directive, VAX: VAX-float.
16725 * float directive, x86-64: i386-Float.
16726 * floating point numbers: Flonums.
16727 * floating point numbers (double): Double.
16728 * floating point numbers (single) <1>: Float.
16729 * floating point numbers (single): Single.
16730 * floating point, Alpha (IEEE): Alpha Floating Point.
16731 * floating point, ARC (IEEE): ARC Floating Point.
16732 * floating point, ARM (IEEE): ARM Floating Point.
16733 * floating point, D10V: D10V-Float.
16734 * floating point, D30V: D30V-Float.
16735 * floating point, ESA/390 (IEEE): ESA/390 Floating Point.
16736 * floating point, H8/300 (IEEE): H8/300 Floating Point.
16737 * floating point, HPPA (IEEE): HPPA Floating Point.
16738 * floating point, i386: i386-Float.
16739 * floating point, i960 (IEEE): Floating Point-i960.
16740 * floating point, M680x0: M68K-Float.
16741 * floating point, M68HC11: M68HC11-Float.
16742 * floating point, MSP 430 (IEEE): MSP430 Floating Point.
16743 * floating point, SH (IEEE): SH Floating Point.
16744 * floating point, SPARC (IEEE): Sparc-Float.
16745 * floating point, V850 (IEEE): V850 Floating Point.
16746 * floating point, VAX: VAX-float.
16747 * floating point, x86-64: i386-Float.
16748 * floating point, Z80: Z80 Floating Point.
16749 * flonums: Flonums.
16750 * force_thumb directive, ARM: ARM Directives.
16751 * format of error messages: Errors.
16752 * format of warning messages: Errors.
16753 * formfeed (\f): Strings.
16754 * func directive: Func.
16755 * functions, in expressions: Operators.
16756 * gbr960, i960 postprocessor: Options-i960.
16757 * gfloat directive, VAX: VAX-directives.
16758 * global: Z8000 Directives.
16759 * global directive: Global.
16760 * global directive, TIC54X: TIC54X-Directives.
16761 * gp register, MIPS: MIPS Object.
16762 * gp register, V850: V850-Regs.
16763 * grouping data: Sub-Sections.
16764 * H8/300 addressing modes: H8/300-Addressing.
16765 * H8/300 floating point (IEEE): H8/300 Floating Point.
16766 * H8/300 line comment character: H8/300-Chars.
16767 * H8/300 line separator: H8/300-Chars.
16768 * H8/300 machine directives (none): H8/300 Directives.
16769 * H8/300 opcode summary: H8/300 Opcodes.
16770 * H8/300 options (none): H8/300 Options.
16771 * H8/300 registers: H8/300-Regs.
16772 * H8/300 size suffixes: H8/300 Opcodes.
16773 * H8/300 support: H8/300-Dependent.
16774 * H8/300H, assembling for: H8/300 Directives.
16775 * half directive, ARC: ARC Directives.
16776 * half directive, SPARC: Sparc-Directives.
16777 * half directive, TIC54X: TIC54X-Directives.
16778 * hex character code (\XD...): Strings.
16779 * hexadecimal integers: Integers.
16780 * hexadecimal prefix, Z80: Z80-Chars.
16781 * hfloat directive, VAX: VAX-directives.
16782 * hi pseudo-op, V850: V850 Opcodes.
16783 * hi0 pseudo-op, V850: V850 Opcodes.
16784 * hidden directive: Hidden.
16785 * high directive, M32R: M32R-Directives.
16786 * hilo pseudo-op, V850: V850 Opcodes.
16787 * HPPA directives not supported: HPPA Directives.
16788 * HPPA floating point (IEEE): HPPA Floating Point.
16789 * HPPA Syntax: HPPA Options.
16790 * HPPA-only directives: HPPA Directives.
16791 * hword directive: hword.
16792 * i370 support: ESA/390-Dependent.
16793 * i386 16-bit code: i386-16bit.
16794 * i386 arch directive: i386-Arch.
16795 * i386 att_syntax pseudo op: i386-Syntax.
16796 * i386 conversion instructions: i386-Mnemonics.
16797 * i386 floating point: i386-Float.
16798 * i386 immediate operands: i386-Syntax.
16799 * i386 instruction naming: i386-Mnemonics.
16800 * i386 instruction prefixes: i386-Prefixes.
16801 * i386 intel_syntax pseudo op: i386-Syntax.
16802 * i386 jump optimization: i386-Jumps.
16803 * i386 jump, call, return: i386-Syntax.
16804 * i386 jump/call operands: i386-Syntax.
16805 * i386 memory references: i386-Memory.
16806 * i386 mul, imul instructions: i386-Notes.
16807 * i386 options: i386-Options.
16808 * i386 register operands: i386-Syntax.
16809 * i386 registers: i386-Regs.
16810 * i386 sections: i386-Syntax.
16811 * i386 size suffixes: i386-Syntax.
16812 * i386 source, destination operands: i386-Syntax.
16813 * i386 support: i386-Dependent.
16814 * i386 syntax compatibility: i386-Syntax.
16815 * i80306 support: i386-Dependent.
16816 * i860 machine directives: Directives-i860.
16817 * i860 opcodes: Opcodes for i860.
16818 * i860 support: i860-Dependent.
16819 * i960 architecture options: Options-i960.
16820 * i960 branch recording: Options-i960.
16821 * i960 callj pseudo-opcode: callj-i960.
16822 * i960 compare and jump expansions: Compare-and-branch-i960.
16823 * i960 compare/branch instructions: Compare-and-branch-i960.
16824 * i960 floating point (IEEE): Floating Point-i960.
16825 * i960 machine directives: Directives-i960.
16826 * i960 opcodes: Opcodes for i960.
16827 * i960 options: Options-i960.
16828 * i960 support: i960-Dependent.
16829 * IA-64 line comment character: IA-64-Chars.
16830 * IA-64 line separator: IA-64-Chars.
16831 * IA-64 options: IA-64 Options.
16832 * IA-64 Processor-status-Register bit names: IA-64-Bits.
16833 * IA-64 registers: IA-64-Regs.
16834 * IA-64 support: IA-64-Dependent.
16835 * IA-64 Syntax: IA-64 Options.
16836 * ident directive: Ident.
16837 * identifiers, ARM: ARM-Chars.
16838 * identifiers, MSP 430: MSP430-Chars.
16839 * if directive: If.
16840 * ifb directive: If.
16841 * ifc directive: If.
16842 * ifdef directive: If.
16843 * ifeq directive: If.
16844 * ifeqs directive: If.
16845 * ifge directive: If.
16846 * ifgt directive: If.
16847 * ifle directive: If.
16848 * iflt directive: If.
16849 * ifnb directive: If.
16850 * ifnc directive: If.
16851 * ifndef directive: If.
16852 * ifne directive: If.
16853 * ifnes directive: If.
16854 * ifnotdef directive: If.
16855 * immediate character, ARM: ARM-Chars.
16856 * immediate character, M680x0: M68K-Chars.
16857 * immediate character, VAX: VAX-operands.
16858 * immediate fields, relaxation: Xtensa Immediate Relaxation.
16859 * immediate operands, i386: i386-Syntax.
16860 * immediate operands, x86-64: i386-Syntax.
16861 * imul instruction, i386: i386-Notes.
16862 * imul instruction, x86-64: i386-Notes.
16863 * incbin directive: Incbin.
16864 * include directive: Include.
16865 * include directive search path: I.
16866 * indirect character, VAX: VAX-operands.
16867 * infix operators: Infix Ops.
16868 * inhibiting interrupts, i386: i386-Prefixes.
16869 * input: Input Files.
16870 * input file linenumbers: Input Files.
16871 * instruction expansion, CRIS: CRIS-Expand.
16872 * instruction expansion, MMIX: MMIX-Expand.
16873 * instruction naming, i386: i386-Mnemonics.
16874 * instruction naming, x86-64: i386-Mnemonics.
16875 * instruction prefixes, i386: i386-Prefixes.
16876 * instruction set, M680x0: M68K-opcodes.
16877 * instruction set, M68HC11: M68HC11-opcodes.
16878 * instruction summary, D10V: D10V-Opcodes.
16879 * instruction summary, D30V: D30V-Opcodes.
16880 * instruction summary, H8/300: H8/300 Opcodes.
16881 * instruction summary, SH: SH Opcodes.
16882 * instruction summary, SH64: SH64 Opcodes.
16883 * instruction summary, Z8000: Z8000 Opcodes.
16884 * instructions and directives: Statements.
16885 * int directive: Int.
16886 * int directive, H8/300: H8/300 Directives.
16887 * int directive, i386: i386-Float.
16888 * int directive, TIC54X: TIC54X-Directives.
16889 * int directive, x86-64: i386-Float.
16890 * integer expressions: Integer Exprs.
16891 * integer, 16-byte: Octa.
16892 * integer, 8-byte: Quad.
16893 * integers: Integers.
16894 * integers, 16-bit: hword.
16895 * integers, 32-bit: Int.
16896 * integers, binary: Integers.
16897 * integers, decimal: Integers.
16898 * integers, hexadecimal: Integers.
16899 * integers, octal: Integers.
16900 * integers, one byte: Byte.
16901 * intel_syntax pseudo op, i386: i386-Syntax.
16902 * intel_syntax pseudo op, x86-64: i386-Syntax.
16903 * internal assembler sections: As Sections.
16904 * internal directive: Internal.
16905 * invalid input: Bug Criteria.
16906 * invocation summary: Overview.
16907 * IP2K architecture options: IP2K-Opts.
16908 * IP2K options: IP2K-Opts.
16909 * IP2K support: IP2K-Dependent.
16910 * irp directive: Irp.
16911 * irpc directive: Irpc.
16912 * ISA options, SH64: SH64 Options.
16913 * joining text and data sections: R.
16914 * jump instructions, i386: i386-Mnemonics.
16915 * jump instructions, x86-64: i386-Mnemonics.
16916 * jump optimization, i386: i386-Jumps.
16917 * jump optimization, x86-64: i386-Jumps.
16918 * jump/call operands, i386: i386-Syntax.
16919 * jump/call operands, x86-64: i386-Syntax.
16920 * L16SI instructions, relaxation: Xtensa Immediate Relaxation.
16921 * L16UI instructions, relaxation: Xtensa Immediate Relaxation.
16922 * L32I instructions, relaxation: Xtensa Immediate Relaxation.
16923 * L8UI instructions, relaxation: Xtensa Immediate Relaxation.
16924 * label (:): Statements.
16925 * label directive, TIC54X: TIC54X-Directives.
16927 * lcomm directive: Lcomm.
16929 * ldouble directive M680x0: M68K-Float.
16930 * ldouble directive M68HC11: M68HC11-Float.
16931 * ldouble directive, TIC54X: TIC54X-Directives.
16932 * LDR reg,=<label> pseudo op, ARM: ARM Opcodes.
16933 * leafproc directive, i960: Directives-i960.
16934 * length directive, TIC54X: TIC54X-Directives.
16935 * length of symbols: Symbol Intro.
16936 * lflags directive (ignored): Lflags.
16937 * line comment character: Comments.
16938 * line comment character, Alpha: Alpha-Chars.
16939 * line comment character, ARM: ARM-Chars.
16940 * line comment character, D10V: D10V-Chars.
16941 * line comment character, D30V: D30V-Chars.
16942 * line comment character, H8/300: H8/300-Chars.
16943 * line comment character, IA-64: IA-64-Chars.
16944 * line comment character, M680x0: M68K-Chars.
16945 * line comment character, MSP 430: MSP430-Chars.
16946 * line comment character, SH: SH-Chars.
16947 * line comment character, SH64: SH64-Chars.
16948 * line comment character, V850: V850-Chars.
16949 * line comment character, Z80: Z80-Chars.
16950 * line comment character, Z8000: Z8000-Chars.
16951 * line comment characters, CRIS: CRIS-Chars.
16952 * line comment characters, MMIX: MMIX-Chars.
16953 * line directive: Line.
16954 * line directive, MSP 430: MSP430 Directives.
16955 * line numbers, in input files: Input Files.
16956 * line numbers, in warnings/errors: Errors.
16957 * line separator character: Statements.
16958 * line separator, Alpha: Alpha-Chars.
16959 * line separator, ARM: ARM-Chars.
16960 * line separator, H8/300: H8/300-Chars.
16961 * line separator, IA-64: IA-64-Chars.
16962 * line separator, SH: SH-Chars.
16963 * line separator, SH64: SH64-Chars.
16964 * line separator, Z8000: Z8000-Chars.
16965 * lines starting with #: Comments.
16967 * linker, and assembler: Secs Background.
16968 * linkonce directive: Linkonce.
16969 * list directive: List.
16970 * list directive, TIC54X: TIC54X-Directives.
16971 * listing control, turning off: Nolist.
16972 * listing control, turning on: List.
16973 * listing control: new page: Eject.
16974 * listing control: paper size: Psize.
16975 * listing control: subtitle: Sbttl.
16976 * listing control: title line: Title.
16977 * listings, enabling: a.
16978 * literal directive: Literal Directive.
16979 * literal_position directive: Literal Position Directive.
16980 * literal_prefix directive: Literal Prefix Directive.
16981 * little endian output, MIPS: Overview.
16982 * little endian output, PJ: Overview.
16983 * little-endian output, MIPS: MIPS Opts.
16984 * ln directive: Ln.
16985 * lo pseudo-op, V850: V850 Opcodes.
16986 * loc directive: LNS directives.
16987 * loc_mark_blocks directive: LNS directives.
16988 * local common symbols: Lcomm.
16989 * local labels, retaining in output: L.
16990 * local symbol names: Symbol Names.
16991 * location counter: Dot.
16992 * location counter, advancing: Org.
16993 * location counter, Z80: Z80-Chars.
16994 * logical file name: File.
16995 * logical line number: Line.
16996 * logical line numbers: Comments.
16997 * long directive: Long.
16998 * long directive, ARC: ARC Directives.
16999 * long directive, i386: i386-Float.
17000 * long directive, TIC54X: TIC54X-Directives.
17001 * long directive, x86-64: i386-Float.
17002 * longcall pseudo-op, V850: V850 Opcodes.
17003 * longcalls directive: Longcalls Directive.
17004 * longjump pseudo-op, V850: V850 Opcodes.
17005 * loop directive, TIC54X: TIC54X-Directives.
17006 * LOOP instructions, alignment: Xtensa Automatic Alignment.
17007 * low directive, M32R: M32R-Directives.
17008 * lp register, V850: V850-Regs.
17009 * lval: Z8000 Directives.
17010 * M16C architecture option: M32C-Opts.
17011 * M32C architecture option: M32C-Opts.
17012 * M32C modifiers: M32C-Modifiers.
17013 * M32C options: M32C-Opts.
17014 * M32C support: M32C-Dependent.
17015 * M32R architecture options: M32R-Opts.
17016 * M32R directives: M32R-Directives.
17017 * M32R options: M32R-Opts.
17018 * M32R support: M32R-Dependent.
17019 * M32R warnings: M32R-Warnings.
17020 * M680x0 addressing modes: M68K-Syntax.
17021 * M680x0 architecture options: M68K-Opts.
17022 * M680x0 branch improvement: M68K-Branch.
17023 * M680x0 directives: M68K-Directives.
17024 * M680x0 floating point: M68K-Float.
17025 * M680x0 immediate character: M68K-Chars.
17026 * M680x0 line comment character: M68K-Chars.
17027 * M680x0 opcodes: M68K-opcodes.
17028 * M680x0 options: M68K-Opts.
17029 * M680x0 pseudo-opcodes: M68K-Branch.
17030 * M680x0 size modifiers: M68K-Syntax.
17031 * M680x0 support: M68K-Dependent.
17032 * M680x0 syntax: M68K-Syntax.
17033 * M68HC11 addressing modes: M68HC11-Syntax.
17034 * M68HC11 and M68HC12 support: M68HC11-Dependent.
17035 * M68HC11 assembler directive .far: M68HC11-Directives.
17036 * M68HC11 assembler directive .interrupt: M68HC11-Directives.
17037 * M68HC11 assembler directive .mode: M68HC11-Directives.
17038 * M68HC11 assembler directive .relax: M68HC11-Directives.
17039 * M68HC11 assembler directive .xrefb: M68HC11-Directives.
17040 * M68HC11 assembler directives: M68HC11-Directives.
17041 * M68HC11 branch improvement: M68HC11-Branch.
17042 * M68HC11 floating point: M68HC11-Float.
17043 * M68HC11 modifiers: M68HC11-Modifiers.
17044 * M68HC11 opcodes: M68HC11-opcodes.
17045 * M68HC11 options: M68HC11-Opts.
17046 * M68HC11 pseudo-opcodes: M68HC11-Branch.
17047 * M68HC11 syntax: M68HC11-Syntax.
17048 * M68HC12 assembler directives: M68HC11-Directives.
17049 * machine dependencies: Machine Dependencies.
17050 * machine directives, ARC: ARC Directives.
17051 * machine directives, ARM: ARM Directives.
17052 * machine directives, H8/300 (none): H8/300 Directives.
17053 * machine directives, i860: Directives-i860.
17054 * machine directives, i960: Directives-i960.
17055 * machine directives, MSP 430: MSP430 Directives.
17056 * machine directives, SH: SH Directives.
17057 * machine directives, SH64: SH64 Directives.
17058 * machine directives, SPARC: Sparc-Directives.
17059 * machine directives, TIC54X: TIC54X-Directives.
17060 * machine directives, V850: V850 Directives.
17061 * machine directives, VAX: VAX-directives.
17062 * machine independent directives: Pseudo Ops.
17063 * machine instructions (not covered): Manual.
17064 * machine-independent syntax: Syntax.
17065 * macro directive: Macro.
17066 * macro directive, TIC54X: TIC54X-Directives.
17068 * macros, count executed: Macro.
17069 * Macros, MSP 430: MSP430-Macros.
17070 * macros, TIC54X: TIC54X-Macros.
17072 * manual, structure and purpose: Manual.
17073 * math builtins, TIC54X: TIC54X-Builtins.
17074 * Maximum number of continuation lines: listing.
17075 * memory references, i386: i386-Memory.
17076 * memory references, x86-64: i386-Memory.
17077 * memory-mapped registers, TIC54X: TIC54X-MMRegs.
17078 * merging text and data sections: R.
17079 * messages from assembler: Errors.
17080 * minus, permitted arguments: Infix Ops.
17081 * MIPS architecture options: MIPS Opts.
17082 * MIPS big-endian output: MIPS Opts.
17083 * MIPS debugging directives: MIPS Stabs.
17084 * MIPS DSP instruction generation override: MIPS ASE instruction generation overrides.
17085 * MIPS ECOFF sections: MIPS Object.
17086 * MIPS endianness: Overview.
17087 * MIPS ISA: Overview.
17088 * MIPS ISA override: MIPS ISA.
17089 * MIPS little-endian output: MIPS Opts.
17090 * MIPS MDMX instruction generation override: MIPS ASE instruction generation overrides.
17091 * MIPS MIPS-3D instruction generation override: MIPS ASE instruction generation overrides.
17092 * MIPS MT instruction generation override: MIPS ASE instruction generation overrides.
17093 * MIPS option stack: MIPS option stack.
17094 * MIPS processor: MIPS-Dependent.
17095 * MIT: M68K-Syntax.
17096 * mlib directive, TIC54X: TIC54X-Directives.
17097 * mlist directive, TIC54X: TIC54X-Directives.
17098 * MMIX assembler directive BSPEC: MMIX-Pseudos.
17099 * MMIX assembler directive BYTE: MMIX-Pseudos.
17100 * MMIX assembler directive ESPEC: MMIX-Pseudos.
17101 * MMIX assembler directive GREG: MMIX-Pseudos.
17102 * MMIX assembler directive IS: MMIX-Pseudos.
17103 * MMIX assembler directive LOC: MMIX-Pseudos.
17104 * MMIX assembler directive LOCAL: MMIX-Pseudos.
17105 * MMIX assembler directive OCTA: MMIX-Pseudos.
17106 * MMIX assembler directive PREFIX: MMIX-Pseudos.
17107 * MMIX assembler directive TETRA: MMIX-Pseudos.
17108 * MMIX assembler directive WYDE: MMIX-Pseudos.
17109 * MMIX assembler directives: MMIX-Pseudos.
17110 * MMIX line comment characters: MMIX-Chars.
17111 * MMIX options: MMIX-Opts.
17112 * MMIX pseudo-op BSPEC: MMIX-Pseudos.
17113 * MMIX pseudo-op BYTE: MMIX-Pseudos.
17114 * MMIX pseudo-op ESPEC: MMIX-Pseudos.
17115 * MMIX pseudo-op GREG: MMIX-Pseudos.
17116 * MMIX pseudo-op IS: MMIX-Pseudos.
17117 * MMIX pseudo-op LOC: MMIX-Pseudos.
17118 * MMIX pseudo-op LOCAL: MMIX-Pseudos.
17119 * MMIX pseudo-op OCTA: MMIX-Pseudos.
17120 * MMIX pseudo-op PREFIX: MMIX-Pseudos.
17121 * MMIX pseudo-op TETRA: MMIX-Pseudos.
17122 * MMIX pseudo-op WYDE: MMIX-Pseudos.
17123 * MMIX pseudo-ops: MMIX-Pseudos.
17124 * MMIX register names: MMIX-Regs.
17125 * MMIX support: MMIX-Dependent.
17126 * mmixal differences: MMIX-mmixal.
17127 * mmregs directive, TIC54X: TIC54X-Directives.
17128 * mmsg directive, TIC54X: TIC54X-Directives.
17129 * MMX, i386: i386-SIMD.
17130 * MMX, x86-64: i386-SIMD.
17131 * mnemonic suffixes, i386: i386-Syntax.
17132 * mnemonic suffixes, x86-64: i386-Syntax.
17133 * mnemonics for opcodes, VAX: VAX-opcodes.
17134 * mnemonics, D10V: D10V-Opcodes.
17135 * mnemonics, D30V: D30V-Opcodes.
17136 * mnemonics, H8/300: H8/300 Opcodes.
17137 * mnemonics, SH: SH Opcodes.
17138 * mnemonics, SH64: SH64 Opcodes.
17139 * mnemonics, Z8000: Z8000 Opcodes.
17140 * mnolist directive, TIC54X: TIC54X-Directives.
17141 * Motorola syntax for the 680x0: M68K-Moto-Syntax.
17142 * MOVI instructions, relaxation: Xtensa Immediate Relaxation.
17143 * MRI compatibility mode: M.
17144 * mri directive: MRI.
17145 * MRI mode, temporarily: MRI.
17146 * MSP 430 floating point (IEEE): MSP430 Floating Point.
17147 * MSP 430 identifiers: MSP430-Chars.
17148 * MSP 430 line comment character: MSP430-Chars.
17149 * MSP 430 machine directives: MSP430 Directives.
17150 * MSP 430 macros: MSP430-Macros.
17151 * MSP 430 opcodes: MSP430 Opcodes.
17152 * MSP 430 options (none): MSP430 Options.
17153 * MSP 430 profiling capability: MSP430 Profiling Capability.
17154 * MSP 430 register names: MSP430-Regs.
17155 * MSP 430 support: MSP430-Dependent.
17156 * MSP430 Assembler Extensions: MSP430-Ext.
17157 * mul instruction, i386: i386-Notes.
17158 * mul instruction, x86-64: i386-Notes.
17159 * name: Z8000 Directives.
17160 * named section: Section.
17161 * named sections: Ld Sections.
17162 * names, symbol: Symbol Names.
17163 * naming object file: o.
17164 * new page, in listings: Eject.
17165 * newblock directive, TIC54X: TIC54X-Directives.
17166 * newline (\n): Strings.
17167 * newline, required at file end: Statements.
17168 * no-absolute-literals directive: Absolute Literals Directive.
17169 * no-longcalls directive: Longcalls Directive.
17170 * no-schedule directive: Schedule Directive.
17171 * no-transform directive: Transform Directive.
17172 * nolist directive: Nolist.
17173 * nolist directive, TIC54X: TIC54X-Directives.
17174 * NOP pseudo op, ARM: ARM Opcodes.
17175 * notes for Alpha: Alpha Notes.
17176 * null-terminated strings: Asciz.
17177 * number constants: Numbers.
17178 * number of macros executed: Macro.
17179 * numbered subsections: Sub-Sections.
17180 * numbers, 16-bit: hword.
17181 * numeric values: Expressions.
17182 * nword directive, SPARC: Sparc-Directives.
17183 * object file: Object.
17184 * object file format: Object Formats.
17185 * object file name: o.
17186 * object file, after errors: Z.
17187 * obsolescent directives: Deprecated.
17188 * octa directive: Octa.
17189 * octal character code (\DDD): Strings.
17190 * octal integers: Integers.
17191 * offset directive, V850: V850 Directives.
17192 * opcode mnemonics, VAX: VAX-opcodes.
17193 * opcode names, Xtensa: Xtensa Opcodes.
17194 * opcode summary, D10V: D10V-Opcodes.
17195 * opcode summary, D30V: D30V-Opcodes.
17196 * opcode summary, H8/300: H8/300 Opcodes.
17197 * opcode summary, SH: SH Opcodes.
17198 * opcode summary, SH64: SH64 Opcodes.
17199 * opcode summary, Z8000: Z8000 Opcodes.
17200 * opcodes for ARC: ARC Opcodes.
17201 * opcodes for ARM: ARM Opcodes.
17202 * opcodes for MSP 430: MSP430 Opcodes.
17203 * opcodes for V850: V850 Opcodes.
17204 * opcodes, i860: Opcodes for i860.
17205 * opcodes, i960: Opcodes for i960.
17206 * opcodes, M680x0: M68K-opcodes.
17207 * opcodes, M68HC11: M68HC11-opcodes.
17208 * operand delimiters, i386: i386-Syntax.
17209 * operand delimiters, x86-64: i386-Syntax.
17210 * operand notation, VAX: VAX-operands.
17211 * operands in expressions: Arguments.
17212 * operator precedence: Infix Ops.
17213 * operators, in expressions: Operators.
17214 * operators, permitted arguments: Infix Ops.
17215 * optimization, D10V: Overview.
17216 * optimization, D30V: Overview.
17217 * optimizations: Xtensa Optimizations.
17218 * option directive, ARC: ARC Directives.
17219 * option directive, TIC54X: TIC54X-Directives.
17220 * option summary: Overview.
17221 * options for Alpha: Alpha Options.
17222 * options for ARC (none): ARC Options.
17223 * options for ARM (none): ARM Options.
17224 * options for i386: i386-Options.
17225 * options for IA-64: IA-64 Options.
17226 * options for MSP430 (none): MSP430 Options.
17227 * options for PDP-11: PDP-11-Options.
17228 * options for PowerPC: PowerPC-Opts.
17229 * options for SPARC: Sparc-Opts.
17230 * options for V850 (none): V850 Options.
17231 * options for VAX/VMS: VAX-Opts.
17232 * options for x86-64: i386-Options.
17233 * options for Z80: Z80 Options.
17234 * options, all versions of assembler: Invoking.
17235 * options, command line: Command Line.
17236 * options, CRIS: CRIS-Opts.
17237 * options, D10V: D10V-Opts.
17238 * options, D30V: D30V-Opts.
17239 * options, H8/300 (none): H8/300 Options.
17240 * options, i960: Options-i960.
17241 * options, IP2K: IP2K-Opts.
17242 * options, M32C: M32C-Opts.
17243 * options, M32R: M32R-Opts.
17244 * options, M680x0: M68K-Opts.
17245 * options, M68HC11: M68HC11-Opts.
17246 * options, MMIX: MMIX-Opts.
17247 * options, PJ: PJ Options.
17248 * options, SH: SH Options.
17249 * options, SH64: SH64 Options.
17250 * options, TIC54X: TIC54X-Opts.
17251 * options, Z8000: Z8000 Options.
17252 * org directive: Org.
17253 * other attribute, of a.out symbol: Symbol Other.
17254 * output file: Object.
17255 * p2align directive: P2align.
17256 * p2alignl directive: P2align.
17257 * p2alignw directive: P2align.
17258 * padding the location counter: Align.
17259 * padding the location counter given a power of two: P2align.
17260 * padding the location counter given number of bytes: Balign.
17261 * page, in listings: Eject.
17262 * paper size, for listings: Psize.
17263 * paths for .include: I.
17264 * patterns, writing in memory: Fill.
17265 * PDP-11 comments: PDP-11-Syntax.
17266 * PDP-11 floating-point register syntax: PDP-11-Syntax.
17267 * PDP-11 general-purpose register syntax: PDP-11-Syntax.
17268 * PDP-11 instruction naming: PDP-11-Mnemonics.
17269 * PDP-11 support: PDP-11-Dependent.
17270 * PDP-11 syntax: PDP-11-Syntax.
17271 * PIC code generation for ARM: ARM Options.
17272 * PIC code generation for M32R: M32R-Opts.
17273 * PJ endianness: Overview.
17274 * PJ options: PJ Options.
17275 * PJ support: PJ-Dependent.
17276 * plus, permitted arguments: Infix Ops.
17277 * popsection directive: PopSection.
17278 * Position-independent code, CRIS: CRIS-Opts.
17279 * Position-independent code, symbols in, CRIS: CRIS-Pic.
17280 * PowerPC architectures: PowerPC-Opts.
17281 * PowerPC directives: PowerPC-Pseudo.
17282 * PowerPC options: PowerPC-Opts.
17283 * PowerPC support: PPC-Dependent.
17284 * precedence of operators: Infix Ops.
17285 * precision, floating point: Flonums.
17286 * prefix operators: Prefix Ops.
17287 * prefixes, i386: i386-Prefixes.
17288 * preprocessing: Preprocessing.
17289 * preprocessing, turning on and off: Preprocessing.
17290 * previous directive: Previous.
17291 * primary attributes, COFF symbols: COFF Symbols.
17292 * print directive: Print.
17293 * proc directive, SPARC: Sparc-Directives.
17294 * profiler directive, MSP 430: MSP430 Directives.
17295 * profiling capability for MSP 430: MSP430 Profiling Capability.
17296 * protected directive: Protected.
17297 * pseudo-op .arch, CRIS: CRIS-Pseudos.
17298 * pseudo-op .dword, CRIS: CRIS-Pseudos.
17299 * pseudo-op .syntax, CRIS: CRIS-Pseudos.
17300 * pseudo-op BSPEC, MMIX: MMIX-Pseudos.
17301 * pseudo-op BYTE, MMIX: MMIX-Pseudos.
17302 * pseudo-op ESPEC, MMIX: MMIX-Pseudos.
17303 * pseudo-op GREG, MMIX: MMIX-Pseudos.
17304 * pseudo-op IS, MMIX: MMIX-Pseudos.
17305 * pseudo-op LOC, MMIX: MMIX-Pseudos.
17306 * pseudo-op LOCAL, MMIX: MMIX-Pseudos.
17307 * pseudo-op OCTA, MMIX: MMIX-Pseudos.
17308 * pseudo-op PREFIX, MMIX: MMIX-Pseudos.
17309 * pseudo-op TETRA, MMIX: MMIX-Pseudos.
17310 * pseudo-op WYDE, MMIX: MMIX-Pseudos.
17311 * pseudo-opcodes, M680x0: M68K-Branch.
17312 * pseudo-opcodes, M68HC11: M68HC11-Branch.
17313 * pseudo-ops for branch, VAX: VAX-branch.
17314 * pseudo-ops, CRIS: CRIS-Pseudos.
17315 * pseudo-ops, machine independent: Pseudo Ops.
17316 * pseudo-ops, MMIX: MMIX-Pseudos.
17317 * psize directive: Psize.
17318 * PSR bits: IA-64-Bits.
17319 * pstring directive, TIC54X: TIC54X-Directives.
17320 * psw register, V850: V850-Regs.
17321 * purgem directive: Purgem.
17322 * purpose of GNU assembler: GNU Assembler.
17323 * pushsection directive: PushSection.
17324 * quad directive: Quad.
17325 * quad directive, i386: i386-Float.
17326 * quad directive, x86-64: i386-Float.
17327 * real-mode code, i386: i386-16bit.
17328 * ref directive, TIC54X: TIC54X-Directives.
17329 * register directive, SPARC: Sparc-Directives.
17330 * register names, Alpha: Alpha-Regs.
17331 * register names, ARC: ARC-Regs.
17332 * register names, ARM: ARM-Regs.
17333 * register names, CRIS: CRIS-Regs.
17334 * register names, H8/300: H8/300-Regs.
17335 * register names, IA-64: IA-64-Regs.
17336 * register names, MMIX: MMIX-Regs.
17337 * register names, MSP 430: MSP430-Regs.
17338 * register names, V850: V850-Regs.
17339 * register names, VAX: VAX-operands.
17340 * register names, Xtensa: Xtensa Registers.
17341 * register names, Z80: Z80-Regs.
17342 * register operands, i386: i386-Syntax.
17343 * register operands, x86-64: i386-Syntax.
17344 * registers, D10V: D10V-Regs.
17345 * registers, D30V: D30V-Regs.
17346 * registers, i386: i386-Regs.
17347 * registers, SH: SH-Regs.
17348 * registers, SH64: SH64-Regs.
17349 * registers, TIC54X memory-mapped: TIC54X-MMRegs.
17350 * registers, x86-64: i386-Regs.
17351 * registers, Z8000: Z8000-Regs.
17352 * relaxation: Xtensa Relaxation.
17353 * relaxation of ADDI instructions: Xtensa Immediate Relaxation.
17354 * relaxation of branch instructions: Xtensa Branch Relaxation.
17355 * relaxation of call instructions: Xtensa Call Relaxation.
17356 * relaxation of immediate fields: Xtensa Immediate Relaxation.
17357 * relaxation of L16SI instructions: Xtensa Immediate Relaxation.
17358 * relaxation of L16UI instructions: Xtensa Immediate Relaxation.
17359 * relaxation of L32I instructions: Xtensa Immediate Relaxation.
17360 * relaxation of L8UI instructions: Xtensa Immediate Relaxation.
17361 * relaxation of MOVI instructions: Xtensa Immediate Relaxation.
17362 * relocation: Sections.
17363 * relocation example: Ld Sections.
17364 * relocations, Alpha: Alpha-Relocs.
17365 * repeat prefixes, i386: i386-Prefixes.
17366 * reporting bugs in assembler: Reporting Bugs.
17367 * rept directive: Rept.
17368 * req directive, ARM: ARM Directives.
17369 * reserve directive, SPARC: Sparc-Directives.
17370 * return instructions, i386: i386-Syntax.
17371 * return instructions, x86-64: i386-Syntax.
17372 * REX prefixes, i386: i386-Prefixes.
17373 * rsect: Z8000 Directives.
17374 * sblock directive, TIC54X: TIC54X-Directives.
17375 * sbttl directive: Sbttl.
17376 * schedule directive: Schedule Directive.
17377 * scl directive: Scl.
17378 * sdaoff pseudo-op, V850: V850 Opcodes.
17379 * search path for .include: I.
17380 * sect directive, MSP 430: MSP430 Directives.
17381 * sect directive, TIC54X: TIC54X-Directives.
17382 * section directive (COFF version): Section.
17383 * section directive (ELF version): Section.
17384 * section directive, V850: V850 Directives.
17385 * section override prefixes, i386: i386-Prefixes.
17386 * Section Stack <1>: PopSection.
17387 * Section Stack <2>: SubSection.
17388 * Section Stack <3>: Previous.
17389 * Section Stack <4>: Section.
17390 * Section Stack: PushSection.
17391 * section-relative addressing: Secs Background.
17392 * sections: Sections.
17393 * sections in messages, internal: As Sections.
17394 * sections, i386: i386-Syntax.
17395 * sections, named: Ld Sections.
17396 * sections, x86-64: i386-Syntax.
17397 * seg directive, SPARC: Sparc-Directives.
17398 * segm: Z8000 Directives.
17399 * set directive: Set.
17400 * set directive, TIC54X: TIC54X-Directives.
17401 * SH addressing modes: SH-Addressing.
17402 * SH floating point (IEEE): SH Floating Point.
17403 * SH line comment character: SH-Chars.
17404 * SH line separator: SH-Chars.
17405 * SH machine directives: SH Directives.
17406 * SH opcode summary: SH Opcodes.
17407 * SH options: SH Options.
17408 * SH registers: SH-Regs.
17409 * SH support: SH-Dependent.
17410 * SH64 ABI options: SH64 Options.
17411 * SH64 addressing modes: SH64-Addressing.
17412 * SH64 ISA options: SH64 Options.
17413 * SH64 line comment character: SH64-Chars.
17414 * SH64 line separator: SH64-Chars.
17415 * SH64 machine directives: SH64 Directives.
17416 * SH64 opcode summary: SH64 Opcodes.
17417 * SH64 options: SH64 Options.
17418 * SH64 registers: SH64-Regs.
17419 * SH64 support: SH64-Dependent.
17420 * shigh directive, M32R: M32R-Directives.
17421 * short directive: Short.
17422 * short directive, ARC: ARC Directives.
17423 * short directive, TIC54X: TIC54X-Directives.
17424 * SIMD, i386: i386-SIMD.
17425 * SIMD, x86-64: i386-SIMD.
17426 * single character constant: Chars.
17427 * single directive: Single.
17428 * single directive, i386: i386-Float.
17429 * single directive, x86-64: i386-Float.
17430 * single quote, Z80: Z80-Chars.
17431 * sixteen bit integers: hword.
17432 * sixteen byte integer: Octa.
17433 * size directive (COFF version): Size.
17434 * size directive (ELF version): Size.
17435 * size modifiers, D10V: D10V-Size.
17436 * size modifiers, D30V: D30V-Size.
17437 * size modifiers, M680x0: M68K-Syntax.
17438 * size prefixes, i386: i386-Prefixes.
17439 * size suffixes, H8/300: H8/300 Opcodes.
17440 * sizes operands, i386: i386-Syntax.
17441 * sizes operands, x86-64: i386-Syntax.
17442 * skip directive: Skip.
17443 * skip directive, M680x0: M68K-Directives.
17444 * skip directive, SPARC: Sparc-Directives.
17445 * sleb128 directive: Sleb128.
17446 * small objects, MIPS ECOFF: MIPS Object.
17447 * SOM symbol attributes: SOM Symbols.
17448 * source program: Input Files.
17449 * source, destination operands; i386: i386-Syntax.
17450 * source, destination operands; x86-64: i386-Syntax.
17451 * sp register: Xtensa Registers.
17452 * sp register, V850: V850-Regs.
17453 * space directive: Space.
17454 * space directive, TIC54X: TIC54X-Directives.
17455 * space used, maximum for assembly: statistics.
17456 * SPARC architectures: Sparc-Opts.
17457 * SPARC data alignment: Sparc-Aligned-Data.
17458 * SPARC floating point (IEEE): Sparc-Float.
17459 * SPARC machine directives: Sparc-Directives.
17460 * SPARC options: Sparc-Opts.
17461 * SPARC support: Sparc-Dependent.
17462 * special characters, ARC: ARC-Chars.
17463 * special characters, M680x0: M68K-Chars.
17464 * special purpose registers, MSP 430: MSP430-Regs.
17465 * sslist directive, TIC54X: TIC54X-Directives.
17466 * ssnolist directive, TIC54X: TIC54X-Directives.
17467 * stabd directive: Stab.
17468 * stabn directive: Stab.
17469 * stabs directive: Stab.
17470 * stabX directives: Stab.
17471 * standard assembler sections: Secs Background.
17472 * standard input, as input file: Command Line.
17473 * statement separator character: Statements.
17474 * statement separator, Alpha: Alpha-Chars.
17475 * statement separator, ARM: ARM-Chars.
17476 * statement separator, H8/300: H8/300-Chars.
17477 * statement separator, IA-64: IA-64-Chars.
17478 * statement separator, SH: SH-Chars.
17479 * statement separator, SH64: SH64-Chars.
17480 * statement separator, Z8000: Z8000-Chars.
17481 * statements, structure of: Statements.
17482 * statistics, about assembly: statistics.
17483 * stopping the assembly: Abort.
17484 * string constants: Strings.
17485 * string directive: String.
17486 * string directive on HPPA: HPPA Directives.
17487 * string directive, TIC54X: TIC54X-Directives.
17488 * string literals: Ascii.
17489 * string, copying to object file: String.
17490 * struct directive: Struct.
17491 * struct directive, TIC54X: TIC54X-Directives.
17492 * structure debugging, COFF: Tag.
17493 * sub-instruction ordering, D10V: D10V-Chars.
17494 * sub-instruction ordering, D30V: D30V-Chars.
17495 * sub-instructions, D10V: D10V-Subs.
17496 * sub-instructions, D30V: D30V-Subs.
17497 * subexpressions: Arguments.
17498 * subsection directive: SubSection.
17499 * subsym builtins, TIC54X: TIC54X-Macros.
17500 * subtitles for listings: Sbttl.
17501 * subtraction, permitted arguments: Infix Ops.
17502 * summary of options: Overview.
17503 * support: HPPA-Dependent.
17504 * supporting files, including: Include.
17505 * suppressing warnings: W.
17506 * sval: Z8000 Directives.
17507 * symbol attributes: Symbol Attributes.
17508 * symbol attributes, a.out: a.out Symbols.
17509 * symbol attributes, COFF: COFF Symbols.
17510 * symbol attributes, SOM: SOM Symbols.
17511 * symbol descriptor, COFF: Desc.
17512 * symbol modifiers <1>: M68HC11-Modifiers.
17513 * symbol modifiers: M32C-Modifiers.
17514 * symbol names: Symbol Names.
17515 * symbol names, $ in <1>: SH64-Chars.
17516 * symbol names, $ in <2>: SH-Chars.
17517 * symbol names, $ in <3>: D10V-Chars.
17518 * symbol names, $ in: D30V-Chars.
17519 * symbol names, local: Symbol Names.
17520 * symbol names, temporary: Symbol Names.
17521 * symbol storage class (COFF): Scl.
17522 * symbol type: Symbol Type.
17523 * symbol type, COFF: Type.
17524 * symbol type, ELF: Type.
17525 * symbol value: Symbol Value.
17526 * symbol value, setting: Set.
17527 * symbol values, assigning: Setting Symbols.
17528 * symbol versioning: Symver.
17529 * symbol, common: Comm.
17530 * symbol, making visible to linker: Global.
17531 * symbolic debuggers, information for: Stab.
17532 * symbols: Symbols.
17533 * Symbols in position-independent code, CRIS: CRIS-Pic.
17534 * symbols with uppercase, VAX/VMS: VAX-Opts.
17535 * symbols, assigning values to: Equ.
17536 * Symbols, built-in, CRIS: CRIS-Symbols.
17537 * Symbols, CRIS, built-in: CRIS-Symbols.
17538 * symbols, local common: Lcomm.
17539 * symver directive: Symver.
17540 * syntax compatibility, i386: i386-Syntax.
17541 * syntax compatibility, x86-64: i386-Syntax.
17542 * syntax, BFIN: BFIN Syntax.
17543 * syntax, D10V: D10V-Syntax.
17544 * syntax, D30V: D30V-Syntax.
17545 * syntax, M32C: M32C-Modifiers.
17546 * syntax, M680x0: M68K-Syntax.
17547 * syntax, M68HC11 <1>: M68HC11-Modifiers.
17548 * syntax, M68HC11: M68HC11-Syntax.
17549 * syntax, machine-independent: Syntax.
17550 * syntax, Xtensa assembler: Xtensa Syntax.
17551 * sysproc directive, i960: Directives-i960.
17552 * tab (\t): Strings.
17553 * tab directive, TIC54X: TIC54X-Directives.
17554 * tag directive: Tag.
17555 * tag directive, TIC54X: TIC54X-Directives.
17556 * tdaoff pseudo-op, V850: V850 Opcodes.
17557 * temporary symbol names: Symbol Names.
17558 * text and data sections, joining: R.
17559 * text directive: Text.
17560 * text section: Ld Sections.
17561 * tfloat directive, i386: i386-Float.
17562 * tfloat directive, x86-64: i386-Float.
17563 * thumb directive, ARM: ARM Directives.
17564 * Thumb support: ARM-Dependent.
17565 * thumb_func directive, ARM: ARM Directives.
17566 * thumb_set directive, ARM: ARM Directives.
17567 * TIC54X builtin math functions: TIC54X-Builtins.
17568 * TIC54X machine directives: TIC54X-Directives.
17569 * TIC54X memory-mapped registers: TIC54X-MMRegs.
17570 * TIC54X options: TIC54X-Opts.
17571 * TIC54X subsym builtins: TIC54X-Macros.
17572 * TIC54X support: TIC54X-Dependent.
17573 * TIC54X-specific macros: TIC54X-Macros.
17574 * time, total for assembly: statistics.
17575 * title directive: Title.
17576 * tp register, V850: V850-Regs.
17577 * transform directive: Transform Directive.
17578 * trusted compiler: f.
17579 * turning preprocessing on and off: Preprocessing.
17580 * type directive (COFF version): Type.
17581 * type directive (ELF version): Type.
17582 * type of a symbol: Symbol Type.
17583 * ualong directive, SH: SH Directives.
17584 * uaword directive, SH: SH Directives.
17585 * ubyte directive, TIC54X: TIC54X-Directives.
17586 * uchar directive, TIC54X: TIC54X-Directives.
17587 * uhalf directive, TIC54X: TIC54X-Directives.
17588 * uint directive, TIC54X: TIC54X-Directives.
17589 * uleb128 directive: Uleb128.
17590 * ulong directive, TIC54X: TIC54X-Directives.
17591 * undefined section: Ld Sections.
17592 * union directive, TIC54X: TIC54X-Directives.
17593 * unreq directive, ARM: ARM Directives.
17594 * unsegm: Z8000 Directives.
17595 * usect directive, TIC54X: TIC54X-Directives.
17596 * ushort directive, TIC54X: TIC54X-Directives.
17597 * uword directive, TIC54X: TIC54X-Directives.
17598 * V850 command line options: V850 Options.
17599 * V850 floating point (IEEE): V850 Floating Point.
17600 * V850 line comment character: V850-Chars.
17601 * V850 machine directives: V850 Directives.
17602 * V850 opcodes: V850 Opcodes.
17603 * V850 options (none): V850 Options.
17604 * V850 register names: V850-Regs.
17605 * V850 support: V850-Dependent.
17606 * val directive: Val.
17607 * value attribute, COFF: Val.
17608 * value of a symbol: Symbol Value.
17609 * var directive, TIC54X: TIC54X-Directives.
17610 * VAX bitfields not supported: VAX-no.
17611 * VAX branch improvement: VAX-branch.
17612 * VAX command-line options ignored: VAX-Opts.
17613 * VAX displacement sizing character: VAX-operands.
17614 * VAX floating point: VAX-float.
17615 * VAX immediate character: VAX-operands.
17616 * VAX indirect character: VAX-operands.
17617 * VAX machine directives: VAX-directives.
17618 * VAX opcode mnemonics: VAX-opcodes.
17619 * VAX operand notation: VAX-operands.
17620 * VAX register names: VAX-operands.
17621 * VAX support: Vax-Dependent.
17622 * Vax-11 C compatibility: VAX-Opts.
17623 * VAX/VMS options: VAX-Opts.
17624 * version directive: Version.
17625 * version directive, TIC54X: TIC54X-Directives.
17626 * version of assembler: v.
17627 * versions of symbols: Symver.
17628 * visibility <1>: Internal.
17629 * visibility <2>: Protected.
17630 * visibility: Hidden.
17631 * VMS (VAX) options: VAX-Opts.
17632 * vtable_entry directive: VTableEntry.
17633 * vtable_inherit directive: VTableInherit.
17634 * warning directive: Warning.
17635 * warning for altered difference tables: K.
17636 * warning messages: Errors.
17637 * warnings, causing error: W.
17638 * warnings, M32R: M32R-Warnings.
17639 * warnings, suppressing: W.
17640 * warnings, switching on: W.
17641 * weak directive: Weak.
17642 * weakref directive: Weakref.
17643 * whitespace: Whitespace.
17644 * whitespace, removed by preprocessor: Preprocessing.
17645 * wide floating point directives, VAX: VAX-directives.
17646 * width directive, TIC54X: TIC54X-Directives.
17647 * Width of continuation lines of disassembly output: listing.
17648 * Width of first line disassembly output: listing.
17649 * Width of source line output: listing.
17650 * wmsg directive, TIC54X: TIC54X-Directives.
17651 * word directive: Word.
17652 * word directive, ARC: ARC Directives.
17653 * word directive, H8/300: H8/300 Directives.
17654 * word directive, i386: i386-Float.
17655 * word directive, SPARC: Sparc-Directives.
17656 * word directive, TIC54X: TIC54X-Directives.
17657 * word directive, x86-64: i386-Float.
17658 * writing patterns in memory: Fill.
17659 * wval: Z8000 Directives.
17660 * x86-64 arch directive: i386-Arch.
17661 * x86-64 att_syntax pseudo op: i386-Syntax.
17662 * x86-64 conversion instructions: i386-Mnemonics.
17663 * x86-64 floating point: i386-Float.
17664 * x86-64 immediate operands: i386-Syntax.
17665 * x86-64 instruction naming: i386-Mnemonics.
17666 * x86-64 intel_syntax pseudo op: i386-Syntax.
17667 * x86-64 jump optimization: i386-Jumps.
17668 * x86-64 jump, call, return: i386-Syntax.
17669 * x86-64 jump/call operands: i386-Syntax.
17670 * x86-64 memory references: i386-Memory.
17671 * x86-64 options: i386-Options.
17672 * x86-64 register operands: i386-Syntax.
17673 * x86-64 registers: i386-Regs.
17674 * x86-64 sections: i386-Syntax.
17675 * x86-64 size suffixes: i386-Syntax.
17676 * x86-64 source, destination operands: i386-Syntax.
17677 * x86-64 support: i386-Dependent.
17678 * x86-64 syntax compatibility: i386-Syntax.
17679 * xfloat directive, TIC54X: TIC54X-Directives.
17680 * xlong directive, TIC54X: TIC54X-Directives.
17681 * Xtensa architecture: Xtensa-Dependent.
17682 * Xtensa assembler syntax: Xtensa Syntax.
17683 * Xtensa directives: Xtensa Directives.
17684 * Xtensa opcode names: Xtensa Opcodes.
17685 * Xtensa register names: Xtensa Registers.
17686 * xword directive, SPARC: Sparc-Directives.
17687 * Z80 $: Z80-Chars.
17688 * Z80 ': Z80-Chars.
17689 * Z80 floating point: Z80 Floating Point.
17690 * Z80 line comment character: Z80-Chars.
17691 * Z80 options: Z80 Options.
17692 * Z80 registers: Z80-Regs.
17693 * Z80 support: Z80-Dependent.
17694 * Z80 Syntax: Z80 Options.
17695 * Z80, \: Z80-Chars.
17696 * Z80, case sensitivity: Z80-Case.
17697 * Z80-only directives: Z80 Directives.
17698 * Z800 addressing modes: Z8000-Addressing.
17699 * Z8000 directives: Z8000 Directives.
17700 * Z8000 line comment character: Z8000-Chars.
17701 * Z8000 line separator: Z8000-Chars.
17702 * Z8000 opcode summary: Z8000 Opcodes.
17703 * Z8000 options: Z8000 Options.
17704 * Z8000 registers: Z8000-Regs.
17705 * Z8000 support: Z8000-Dependent.
17706 * zdaoff pseudo-op, V850: V850 Opcodes.
17707 * zero register, V850: V850-Regs.
17708 * zero-terminated strings: Asciz.