| 1 | This is as.info, produced by makeinfo version 4.3 from as.texinfo.
|
|---|
| 2 |
|
|---|
| 3 | START-INFO-DIR-ENTRY
|
|---|
| 4 | * As: (as). The GNU assembler.
|
|---|
| 5 | * Gas: (as). The GNU assembler.
|
|---|
| 6 | END-INFO-DIR-ENTRY
|
|---|
| 7 |
|
|---|
| 8 | This file documents the GNU Assembler "as".
|
|---|
| 9 |
|
|---|
| 10 | Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002
|
|---|
| 11 | Free Software Foundation, Inc.
|
|---|
| 12 |
|
|---|
| 13 | Permission is granted to copy, distribute and/or modify this document
|
|---|
| 14 | under the terms of the GNU Free Documentation License, Version 1.1 or
|
|---|
| 15 | any later version published by the Free Software Foundation; with no
|
|---|
| 16 | Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
|---|
| 17 | Texts. A copy of the license is included in the section entitled "GNU
|
|---|
| 18 | Free Documentation License".
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | File: as.info, Node: Balign, Next: Byte, Prev: Asciz, Up: Pseudo Ops
|
|---|
| 22 |
|
|---|
| 23 | `.balign[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR'
|
|---|
| 24 | ==========================================
|
|---|
| 25 |
|
|---|
| 26 | Pad the location counter (in the current subsection) to a particular
|
|---|
| 27 | storage boundary. The first expression (which must be absolute) is the
|
|---|
| 28 | alignment request in bytes. For example `.balign 8' advances the
|
|---|
| 29 | location counter until it is a multiple of 8. If the location counter
|
|---|
| 30 | is already a multiple of 8, no change is needed.
|
|---|
| 31 |
|
|---|
| 32 | The second expression (also absolute) gives the fill value to be
|
|---|
| 33 | stored in the padding bytes. It (and the comma) may be omitted. If it
|
|---|
| 34 | is omitted, the padding bytes are normally zero. However, on some
|
|---|
| 35 | systems, if the section is marked as containing code and the fill value
|
|---|
| 36 | is omitted, the space is filled with no-op instructions.
|
|---|
| 37 |
|
|---|
| 38 | The third expression is also absolute, and is also optional. If it
|
|---|
| 39 | is present, it is the maximum number of bytes that should be skipped by
|
|---|
| 40 | this alignment directive. If doing the alignment would require
|
|---|
| 41 | skipping more bytes than the specified maximum, then the alignment is
|
|---|
| 42 | not done at all. You can omit the fill value (the second argument)
|
|---|
| 43 | entirely by simply using two commas after the required alignment; this
|
|---|
| 44 | can be useful if you want the alignment to be filled with no-op
|
|---|
| 45 | instructions when appropriate.
|
|---|
| 46 |
|
|---|
| 47 | The `.balignw' and `.balignl' directives are variants of the
|
|---|
| 48 | `.balign' directive. The `.balignw' directive treats the fill pattern
|
|---|
| 49 | as a two byte word value. The `.balignl' directives treats the fill
|
|---|
| 50 | pattern as a four byte longword value. For example, `.balignw
|
|---|
| 51 | 4,0x368d' will align to a multiple of 4. If it skips two bytes, they
|
|---|
| 52 | will be filled in with the value 0x368d (the exact placement of the
|
|---|
| 53 | bytes depends upon the endianness of the processor). If it skips 1 or
|
|---|
| 54 | 3 bytes, the fill value is undefined.
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | File: as.info, Node: Byte, Next: Comm, Prev: Balign, Up: Pseudo Ops
|
|---|
| 58 |
|
|---|
| 59 | `.byte EXPRESSIONS'
|
|---|
| 60 | ===================
|
|---|
| 61 |
|
|---|
| 62 | `.byte' expects zero or more expressions, separated by commas. Each
|
|---|
| 63 | expression is assembled into the next byte.
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 | File: as.info, Node: Comm, Next: Data, Prev: Byte, Up: Pseudo Ops
|
|---|
| 67 |
|
|---|
| 68 | `.comm SYMBOL , LENGTH '
|
|---|
| 69 | ========================
|
|---|
| 70 |
|
|---|
| 71 | `.comm' declares a common symbol named SYMBOL. When linking, a
|
|---|
| 72 | common symbol in one object file may be merged with a defined or common
|
|---|
| 73 | symbol of the same name in another object file. If `ld' does not see a
|
|---|
| 74 | definition for the symbol-just one or more common symbols-then it will
|
|---|
| 75 | allocate LENGTH bytes of uninitialized memory. LENGTH must be an
|
|---|
| 76 | absolute expression. If `ld' sees multiple common symbols with the
|
|---|
| 77 | same name, and they do not all have the same size, it will allocate
|
|---|
| 78 | space using the largest size.
|
|---|
| 79 |
|
|---|
| 80 | When using ELF, the `.comm' directive takes an optional third
|
|---|
| 81 | argument. This is the desired alignment of the symbol, specified as a
|
|---|
| 82 | byte boundary (for example, an alignment of 16 means that the least
|
|---|
| 83 | significant 4 bits of the address should be zero). The alignment must
|
|---|
| 84 | be an absolute expression, and it must be a power of two. If `ld'
|
|---|
| 85 | allocates uninitialized memory for the common symbol, it will use the
|
|---|
| 86 | alignment when placing the symbol. If no alignment is specified, `as'
|
|---|
| 87 | will set the alignment to the largest power of two less than or equal
|
|---|
| 88 | to the size of the symbol, up to a maximum of 16.
|
|---|
| 89 |
|
|---|
| 90 | The syntax for `.comm' differs slightly on the HPPA. The syntax is
|
|---|
| 91 | `SYMBOL .comm, LENGTH'; SYMBOL is optional.
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 | File: as.info, Node: Data, Next: Def, Prev: Comm, Up: Pseudo Ops
|
|---|
| 95 |
|
|---|
| 96 | `.data SUBSECTION'
|
|---|
| 97 | ==================
|
|---|
| 98 |
|
|---|
| 99 | `.data' tells `as' to assemble the following statements onto the end
|
|---|
| 100 | of the data subsection numbered SUBSECTION (which is an absolute
|
|---|
| 101 | expression). If SUBSECTION is omitted, it defaults to zero.
|
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 | File: as.info, Node: Def, Next: Desc, Prev: Data, Up: Pseudo Ops
|
|---|
| 105 |
|
|---|
| 106 | `.def NAME'
|
|---|
| 107 | ===========
|
|---|
| 108 |
|
|---|
| 109 | Begin defining debugging information for a symbol NAME; the
|
|---|
| 110 | definition extends until the `.endef' directive is encountered.
|
|---|
| 111 |
|
|---|
| 112 | This directive is only observed when `as' is configured for COFF
|
|---|
| 113 | format output; when producing `b.out', `.def' is recognized, but
|
|---|
| 114 | ignored.
|
|---|
| 115 |
|
|---|
| 116 |
|
|---|
| 117 | File: as.info, Node: Desc, Next: Dim, Prev: Def, Up: Pseudo Ops
|
|---|
| 118 |
|
|---|
| 119 | `.desc SYMBOL, ABS-EXPRESSION'
|
|---|
| 120 | ==============================
|
|---|
| 121 |
|
|---|
| 122 | This directive sets the descriptor of the symbol (*note Symbol
|
|---|
| 123 | Attributes::) to the low 16 bits of an absolute expression.
|
|---|
| 124 |
|
|---|
| 125 | The `.desc' directive is not available when `as' is configured for
|
|---|
| 126 | COFF output; it is only for `a.out' or `b.out' object format. For the
|
|---|
| 127 | sake of compatibility, `as' accepts it, but produces no output, when
|
|---|
| 128 | configured for COFF.
|
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 | File: as.info, Node: Dim, Next: Double, Prev: Desc, Up: Pseudo Ops
|
|---|
| 132 |
|
|---|
| 133 | `.dim'
|
|---|
| 134 | ======
|
|---|
| 135 |
|
|---|
| 136 | This directive is generated by compilers to include auxiliary
|
|---|
| 137 | debugging information in the symbol table. It is only permitted inside
|
|---|
| 138 | `.def'/`.endef' pairs.
|
|---|
| 139 |
|
|---|
| 140 | `.dim' is only meaningful when generating COFF format output; when
|
|---|
| 141 | `as' is generating `b.out', it accepts this directive but ignores it.
|
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 | File: as.info, Node: Double, Next: Eject, Prev: Dim, Up: Pseudo Ops
|
|---|
| 145 |
|
|---|
|
|---|