neulab/tldr huggingface dataset:
A string is written between double-quotes. It may contain double-quotes or null characters.  The way to get special characters into a string is to escape these characters: precede them with a backslash \ character. For example \\ represents one backslash: the first \ is an escape which tells as to interpret the second character literally as a backslash (which prevents as from recognizing the second \ as an escape character). The complete list of escapes follows.
\b      Mnemonic for backspace; for ASCII this is octal code 010.
\f      Mnemonic for FormFeed; for ASCII this is octal code 014.
\n      Mnemonic for newline; for ASCII this is octal code 012.
\r      Mnemonic for carriage-Return; for ASCII this is octal code 015.
\t      Mnemonic for horizontal Tab; for ASCII this is octal code 011.
\ digit digit digit An octal character code. The numeric code is 3 octal digits. For compatibility with other Unix systems, 8 and 9 are accepted as digits: for example, \008 has the value 010, and \009 the value 011.
\ x hex-digits... A hex character code. All trailing hex digits are combined. Either upper or lower case x works.
\\      Represents one \ character.
\"      Represents one  character. Needed in strings to represent this character, because an unescaped  would end the string.
\ anything-else Any other character when escaped by \ gives a warning, but assembles as if the \ was not present. The idea is that if you used an escape sequence you clearly didn't want the literal interpretation of the following character. However as has no other interpretation, so as knows it is giving you the wrong code and warns you of the fact.
Which characters are escapable, and what those escapes represent, varies widely among assemblers. The current set is what we think the BSD 4.2 assembler recognizes, and is a subset of what most C compilers recognize. If you are in doubt, do not use an escape sequence.
A single character may be written as a single quote immediately followed by that character. The same escapes apply to characters as to strings. So if you want to write the character backslash, you must write '\\ where the first \ escapes the second \.  As you can see, the quote is an acute accent, not a grave accent. A newline (or semicolon ;) immediately following an acute accent is taken as a literal character and does not count as the end of a statement. The value of a character constant in a numeric expression is the machine's byte-wide code for that character.  as assumes your character code is ASCII: 'A means 65, 'B means 66, and so on.
Number Constants
as distinguishes three kinds of numbers according to how they are stored in the target machine.  Integers are numbers that would fit into an int in the C language.  BiGNUms are integers, but they are stored in more than 32 bits.  Flonums are floating point numbers, described below.
A binary integer is 0b or 0B followed by zero or more of the binary digits 01.
An octal integer is 0 followed by zero or more of the octal digits ( 01234567).
A decimal integer starts with a non-zero digit followed by zero or more digits ( 0123456789).
A hexadecimal integer is 0x or 0X followed by one or more hexadecimal digits chosen from 0123456789abcdefABCDEF.
Integers have the usual values. To denote a negative integer, use the prefix operator - discussed under expressions (see Section “Prefix Ops”).
BiGNUms
A biGNUm has the same syntax and semantics as an integer except that the number (or its negative) takes more than 32 bits to represent in binary. The distinction is made because in some places integers are permitted while biGNUms are not.
Flonums
A flonum represents a floating point number. The translation is indirect: a decimal floating point number from the text is converted by as to a generic binary floating point number of more than sufficient precision.  This generic floating point number is converted to a particular computer's floating point format (or formats) by a portion of as specialized to that computer.
A flonum is written by writing (in order)
•   The digit 0.
•   A letter, to tell as the rest of the number is a flonum.
•   An optional sign: either + or -.
•   An optional integer part: zero or more decimal digits.
•   An optional fractional part: .  followed by zero or more decimal digits.
•   An optional exponent, consisting of:
•   An E or e.
•   Optional sign: either + or -.
•   One or more decimal digits.
At least one of the integer part or the fractional part must be present. The floating point number has the usual base-10 value.
as does all processing using integers. Flonums are computed independently of any floating point hardware in the computer running as.
Sections and Relocation Background Roughly, a section is a range of addresses, with no gaps; all data “in” those addresses is treated the same for some particular purpose. For example there may be a “read only” section.
The linker ld reads many object files (partial programs) and combines their contents to form a runnable program. When as emits an object file, the partial program is assumed to start at address 0.  ld assigns the final addresses for the partial program, so that different partial programs do not overlap. This is actually an oversimplification, but it suffices to explain how as uses sections.
ld moves blocks of bytes of your program to their run-time addresses. These blocks slide to their run-time addresses as rigid units; their length does not change and neither does the order of bytes within them. Such a rigid unit is called a section.  Assigning run-time addresses to sections is called relocation.  It includes the task of adjusting mentions of object- file addresses so they refer to the proper run-time addresses.
An object file written by as has at least three sections, any of which may be empty. These are named text, data and bss sections.
as can also generate whatever other named sections you specify using the .section directive (see Section “Section”).  If you do not use any directives that place output in the .text or .data sections, these sections still exist, but are empty.
Within the object file, the text section starts at address 0, the data section follows, and the bss section follows the data section.
To let ld know which data changes when the sections are relocated, and how to change that data, as also writes to the object file details of the relocation needed. To perform relocation ld must know, each time an address in the object file is mentioned:
•   Where in the object file is the beginning of this reference to an address?
•   How long (in bytes) is this reference?
•   Which section does the address refer to? What is the numeric value of
( address) -( start-address of section)?
•   Is the reference to an address “Program-Counter relative”?
In fact, every address as ever uses is expressed as
( section) + ( offset into section) Further, most expressions as computes have this section-relative nature.
In this manual we use the notation { secname N }to mean “offset N into section secname .”
Apart from text, data and bss sections you need to know about the absolute section. When ld mixes partial programs, addresses in the absolute section remain unchanged.  For example, address {absolute 0} is “relocated” to run- time address 0 by ld.  Although the linker never arranges two partial programs' data sections with overlapping addresses after linking, by definition their absolute sections must overlap. Address {absolute 239} in one part of a program is always the same address when the program is running as address {absolute 239} in any other part of the program.
The idea of sections is extended to the undefined section. Any address whose section is unknown at assembly time is by definition rendered {undefined U }---where U is filled in later. Since numbers are always defined, the only way to generate an undefined address is to mention an undefined symbol. A reference to a named common block would be such a symbol: its value is unknown at assembly time so it has section undefined.
By analogy the word section is used to describe groups of sections in the linked program.  ld puts all partial programs' text sections in contiguous addresses in the linked program. It is customary to refer to the text section of a program, meaning all the addresses of all partial programs' text sections.  Likewise for data and bss sections.
Some sections are manipulated by ld; others are invented for use of as and have no meaning except during assembly.
Linker Sections ld deals with just four kinds of sections, summarized below.
named sections These sections hold your program.  as and ld treat them as separate but equal sections. Anything you can say of one section is true of another. When the program is running, however, it is customary for the text section to be unalterable. The text section is often shared among processes: it contains instructions, constants and the like. The data section of a running program is usually alterable: for example, C variables would be stored in the data section.
bss section This section contains zeroed bytes when your program begins running. It is used to hold uninitialized variables or common storage. The length of each partial program's bss section is important, but because it starts out containing zeroed bytes there is no need to store explicit zero bytes in the object file.  The bss section was invented to eliminate those explicit zeros from object files.
absolute section Address 0 of this section is always “relocated” to runtime address 0. This is useful if you want to refer to an address that ld must not change when relocating. In this sense we speak of absolute addresses being “unrelocatable”: they do not change during relocation.
undefined section This “section” is a catch-all for address references to objects not in the preceding sections.
An idealized example of three relocatable sections follows. The example uses the traditional section names .text and .data.  Memory addresses are on the horizontal axis.
+-----+----+--+ partial program # 1:  |ttttt|dddd|00| +-----+----+--+
text   data bss seg.   seg. seg.
+---+---+---+ partial program # 2:  |TTT|DDD|000| +---+---+---+
+--+---+-----+--+----+---+-----+~~ linked program:       |  |TTT|ttttt|  |dddd|DDD|00000| +--+---+-----+--+----+---+-----+~~
addresses:        0 ...
Assembler Internal Sections These sections are meant only for the internal use of as.  They have no meaning at run-time. You do not really need to know about these sections for most purposes; but they can be mentioned in as warning messages, so it might be helpful to have an idea of their meanings to as.  These sections are used to permit the value of every expression in your assembly language program to be a section-relative address.
ASSEMBLER-INTERNAL-LOGIC-ERROR! An internal assembler logic error has been found. This means there is a bug in the assembler.
expr section The assembler stores complex expression internally as combinations of symbols.  When it needs to represent an expression as a symbol, it puts it in the expr section.
Sub-Sections You may have separate groups of data in named sections that you want to end up near to each other in the object file, even though they are not contiguous in the assembler source.  as allows you to use subsections for this purpose. Within each section, there can be numbered subsections with values from 0 to 8192. Objects assembled into the same subsection go into the object file together with other objects in the same subsection. For example, a compiler might want to store constants in the text section, but might not want to have them interspersed with the program being assembled. In this case, the compiler could issue a .text 0 before each section of code being output, and a .text 1 before each group of constants being output.
Subsections are optional. If you do not use subsections, everything goes in subsection number zero.
Subsections appear in your object file in numeric order, lowest numbered to highest. (All this to be compatible with other people's assemblers.) The object file contains no representation of subsections; ld and other programs that manipulate object files see no trace of them. They just see all your text subsections as a text section, and all your data subsections as a data section.
To specify which subsection you want subsequent statements assembled into, use a numeric argument to specify it, in a .text expression or a .data expression statement. You can also use the .subsection directive (see Section “SubSection”) to specify a subsection: .subsection expression. Expression should be an absolute expression (see Section “Expressions”). If you just say .text then .text 0 is assumed. Likewise .data means .data 0.  Assembly begins in text 0.  For instance:
.text 0     # The default subsection is text 0 anyway. .ascii "This lives in the first text subsection. *" .text 1 .ascii "But this lives in the second text subsection." .data 0 .ascii "This lives in the data section," .ascii "in the first data subsection." .text 0 .ascii "This lives in the first text section," .ascii "immediately following the asterisk (*)."
Each section has a location counter incremented by one for every byte assembled into that section. Because subsections are merely a convenience restricted to as there is no concept of a subsection location counter. There is no way to directly manipulate a location counter---but the .align directive changes it, and any label definition captures its current value. The location counter of the section where statements are being assembled is said to be the active location counter.
bss Section The bss section is used for local common variable storage. You may allocate address space in the bss section, but you may not dictate data to load into it before your program executes. When your program starts running, all the contents of the bss section are zeroed bytes.
The .lcomm pseudo-op defines a symbol in the bss section; see Lcomm,, .lcomm .
The .comm pseudo-op may be used to declare a common symbol, which is another form of uninitialized symbol; see Comm,, .comm .
Symbols Symbols are a central concept: the programmer uses symbols to name things, the linker uses symbols to link, and the debugger uses symbols to debug.
"Warning: as does not place symbols in the object file in the same order they were declared.  This may break some debuggers."
Labels A label is written as a symbol immediately followed by a colon :.  The symbol then represents the current value of the active location counter, and is, for example, a suitable instruction operand. You are warned if you use the same symbol to represent two different locations: the first definition overrides any other definitions.
Giving Symbols Other Values A symbol can be given an arbitrary value by writing a symbol, followed by an equals sign =, followed by an expression (see Section “Expressions”). This is equivalent to using the .set directive.See Section “Set”.  In the same way, using a double equals sign = = here represents an equivalent of the .eqv directive.See Section “Eqv”.
Symbol Names Symbol names begin with a letter or with one of ._.  On most machines, you can also use $ in symbol names; exceptions are noted in Machine Dependencies. That character may be followed by any string of digits, letters, dollar signs (unless otherwise noted for a particular target machine), and underscores.
Case of letters is significant: foo is a different symbol name than Foo.
Each symbol has exactly one name. Each name in an assembly language program refers to exactly one symbol. You may use that symbol name any number of times in a program.
Local Symbol Names
A local symbol is any symbol beginning with certain local label prefixes. By default, the local label prefix is .L for ELF systems or L for traditional a.out systems, but each target may have its own set of local label prefixes.
Local symbols are defined and used within the assembler, but they are normally not saved in object files. Thus, they are not visible when debugging. You may use the -L option (see Section “L”) to retain the local symbols in the object files.
Local Labels
Local labels help compilers and programmers use names temporarily. They create symbols which are guaranteed to be unique over the entire scope of the input source code and which can be referred to by a simple notation. To define a local label, write a label of the form N: (where N represents any positive integer). To refer to the most recent previous definition of that label write Nb, using the same number as when you defined the label. To refer to the next definition of a local label, write Nf ---the b stands for “backwards” and the f stands for “forwards”.
There is no restriction on how you can use these labels, and you can reuse them too. So that it is possible to repeatedly define the same local label (using the same number N), although you can only refer to the most recently defined local label of that number (for a backwards reference) or the next definition of a specific local label for a forward reference. It is also worth noting that the first 10 local labels ( 0: ....Li  Sy 9: ) are implemented in a slightly more efficient manner than the others.
1:        branch 1f 2:        branch 1b 1:        branch 2f 2:        branch 1b
Which is the equivalent of:
label_1:  branch label_3 label_2:  branch label_1 label_3:  branch label_4 label_4:  branch label_3
Local label names are only a notational device. They are immediately transformed into more conventional symbol names before the assembler uses them. The symbol names are stored in the symbol table, appear in error messages, and are optionally emitted to the object file. The names are constructed using these parts:
local label prefix All local symbols begin with the system-specific local label prefix. Normally both as and ld forget symbols that start with the local label prefix. These labels are used for symbols you are never intended to see. If you use the -L option then as retains these symbols in the object file. If you also instruct ld to retain these symbols, you may use them in debugging.
number  This is the number that was used in the local label definition. So if the label is written 55: then the number is 55.
C-B     This unusual character is included so you do not accidentally invent a symbol of the same name. The character has ASCII value of \002 (control-B).
ordinal number This is a serial number to keep the labels distinct. The first definition of 0: gets the number 1.  The 15th definition of 0: gets the number 15, and so on. Likewise the first definition of 1: gets the number 1 and its 15th definition gets 15 as well.
So for example, the first 1: may be named .L1 C-B1, and the 44th 3: may be named .L3 C-B44.
Dollar Local Labels
as also supports an even more local form of local labels called dollar labels.  These labels go out of scope (i.e., they become undefined) as soon as a non-local label is defined. Thus they remain valid for only a small region of the input source code. Normal local labels, by contrast, remain in scope for the entire file, or until they are redefined by another occurrence of the same local label.
Dollar labels are defined in exactly the same way as ordinary local labels, except that instead of being terminated by a colon, they are terminated by a dollar sign, e.g., 55$.
They can also be distinguished from ordinary local labels by their transformed names which use ASCII character \001 (control-A) as the magic character to distinguish them from ordinary labels.  For example, the fifth definition of 6$ may be named .L6 C-A5.
The Special Dot Symbol The special symbol .  refers to the current address that as is assembling into. Thus, the expression melvin: .long.  defines melvin to contain its own address. Assigning a value to .  is treated the same as a .org directive. Thus, the expression .=.+4 is the same as saying .space 4.
Symbol Attributes Every symbol has, as well as its name, the attributes “Value” and “Type”. Depending on output format, symbols can also have auxiliary attributes. The detailed definitions are in a.out.h.
If you use a symbol without defining it, as assumes zero for all these attributes, and probably won't warn you. This makes the symbol an externally defined symbol, which is generally what you would want.
The value of a symbol is (usually) 32 bits. For a symbol which labels a location in the text, data, bss or absolute sections the value is the number of addresses from the start of that section to the label. Naturally for text, data and bss sections the value of a symbol changes as ld changes section base addresses during linking. Absolute symbols' values do not change during linking: that is why they are called absolute.
The value of an undefined symbol is treated in a special way. If it is 0 then the symbol is not defined in this assembler source file, and ld tries to determine its value from other files linked into the same program.  You make this kind of symbol simply by mentioning a symbol name without defining it. A non-zero value represents a .comm common declaration. The value is how much common storage to reserve, in bytes (addresses). The symbol refers to the first address of the allocated storage.
The type attribute of a symbol contains relocation (section) information, any flag settings indicating that a symbol is external, and (optionally), other information for linkers and debuggers. The exact format depends on the object-code output format in use.
Expressions An expression specifies an address or numeric value. Whitespace may precede and/or follow an expression.
The result of an expression must be an absolute number, or else an offset into a particular section. If an expression is not absolute, and there is not enough information when as sees the expression to know its section, a second pass over the source program might be necessary to interpret the expression---but the second pass is currently not implemented.  as aborts with an error message in this situation.
Empty Expressions An empty expression has no value: it is just whitespace or null. Wherever an absolute expression is required, you may omit the expression, and as assumes a value of (absolute) 0. This is compatible with other assemblers.
Integer Expressions An integer expression is one or more arguments delimited by operators.
Arguments are symbols, numbers or subexpressions. In other contexts arguments are sometimes called “arithmetic operands”. In this manual, to avoid confusing them with the “instruction operands” of the machine language, we use the term “argument” to refer to parts of expressions only, reserving the word “operand” to refer only to machine instruction operands.
Symbols are evaluated to yield { section NNN }where section is one of text, data, bss, absolute, or undefined.  NNN is a signed, 2's complement 32 bit integer.
Numbers are usually integers.
A number can be a flonum or biGNUm. In this case, you are warned that only the low order 32 bits are used, and as pretends these 32 bits are an integer. You may write integer-manipulating instructions that act on exotic constants, compatible with other assemblers.
Subexpressions are a left parenthesis ( followed by an integer expression, followed by a right parenthesis ); or a prefix operator followed by an argument.
Operators are arithmetic functions, like + or %.  Prefix operators are followed by an argument. Infix operators appear between their arguments. Operators may be preceded and/or followed by whitespace.
Prefix Operator
as has the following prefix operators.  They each take one argument, which must be absolute.
-       Negation.  Two's complement negation.
~       Complementation.  Bitwise not.
Infix Operators
Infix operators take two arguments, one on either side. Operators have precedence, but operations with equal precedence are performed left to right. Apart from + or [-], both arguments must be absolute, and the result is absolute.
1.   Highest Precedence
*       Multiplication.
/       Division.  Truncation is the same as the C operator /
%       Remainder.
<<      Shift Left.  Same as the C operator <<.
>>      Shift Right.  Same as the C operator >>.
2.   Intermediate precedence
Bitwise Inclusive Or.
&       Bitwise And.
^       Bitwise Exclusive Or.
!       Bitwise Or Not.
3.   Low Precedence
+       Addition.  If either argument is absolute, the result has the section of the other argument.  You may not add together arguments from different sections.
-       Subtraction.  If the right argument is absolute, the result has the section of the left argument. If both arguments are in the same section, the result is absolute.  You may not subtract arguments from different sections.
==      Is Equal To
!=      Is Not Equal To
<       Is Less Than
>       Is Greater Than
>=      Is Greater Than Or Equal To
<=      Is Less Than Or Equal To
The comparison operators can be used as infix operators. A true results has a value of -1 whereas a false result has a value of 0. Note, these operators perform signed comparisons.
4.   Lowest Precedence
&&      Logical And.
||      Logical Or.
These two logical operations can be used to combine the results of sub expressions.  Note, unlike the comparison operators a true result returns a value of 1 but a false results does still return 0. Also note that the logical or operator has a slightly lower precedence than logical and.
In short, it's only meaningful to add or subtract the offsets in an address; you can only have a defined section in one of the two arguments.
Assembler Directives All assembler directives have names that begin with a period ( .).  The rest of the name is letters, usually in lower case.
This chapter discusses directives that are available regardless of the target machine configuration for the GNU assembler.
.abort This directive stops the assembly immediately. It is for compatibility with other assemblers. The original idea was that the assembly language source would be piped into the assembler. If the sender of the source quit, it could use this directive tells as to quit also. One day .abort will not be supported.
.align abs-expr, abs-expr, abs-expr Pad the location counter (in the current subsection) to a particular storage boundary. The first expression (which must be absolute) is the alignment required, as described below.
The second expression (also absolute) gives the fill value to be stored in the padding bytes. It (and the comma) may be omitted. If it is omitted, the padding bytes are normally zero. However, on some systems, if the section is marked as containing code and the fill value is omitted, the space is filled with no-op instructions.
The third expression is also absolute, and is also optional. If it is present, it is the maximum number of bytes that should be skipped by this alignment directive. If doing the alignment would require skipping more bytes than the specified maximum, then the alignment is not done at all. You can omit the fill value (the second argument) entirely by simply using two commas after the required alignment; this can be useful if you want the alignment to be filled with no-op instructions when appropriate.
The way the required alignment is specified varies from system to system. For the arc, hppa, i386 using ELF, i860, iq2000, m68k, or32, s390, sparc, tic4x, tic80 and xtensa, the first expression is the alignment request in bytes. For example .align 8 advances the location counter until it is a multiple of 8. If the location counter is already a multiple of 8, no change is needed. For the tic54x, the first expression is the alignment request in words.
For other systems, including the i386 using a.out format, and the arm and strongarm, it is the number of low-order zero bits the location counter must have after advancement. For example .align 3 advances the location counter until it a multiple of 8. If the location counter is already a multiple of 8, no change is needed.
This inconsistency is due to the different behaviors of the various native assemblers for these systems which GAS must emulate. GAS also provides .balign and .p2align directives, described later, which have a consistent behavior across all architectures (but are specific to GAS).
.ascii  Va string ... .ascii expects zero or more string literals (see Section “Strings”) separated by commas. It assembles each string (with no automatic trailing zero byte) into consecutive addresses.
.asciz  Va string ... .asciz is just like .ascii, but each string is followed by a zero byte. The “z” in .asciz stands for “zero”.
.balign[wl] abs-expr, abs-expr, abs-expr Pad the location counter (in the current subsection) to a particular storage boundary. The first expression (which must be absolute) is the alignment request in bytes. For example .balign 8 advances the location counter until it is a multiple of 8. If the location counter is already a multiple of 8, no change is needed.
The .balignw and .balignl directives are variants of the .balign directive. The .balignw directive treats the fill pattern as a two byte word value. The .balignl directives treats the fill pattern as a four byte longword value. For example, .balignw 4,0x368d will align to a multiple of 4. If it skips two bytes, they will be filled in with the value 0x368d (the exact placement of the bytes depends upon the endianness of the processor). If it skips 1 or 3 bytes, the fill value is undefined.
.byte expressions .byte expects zero or more expressions, separated by commas. Each expression is assembled into the next byte.
.comm symbol, length .comm declares a common symbol named symbol.  When linking, a common symbol in one object file may be merged with a defined or common symbol of the same name in another object file. If ld does not see a definition for the symbol--just one or more common symbols--then it will allocate length bytes of uninitialized memory.  length must be an absolute expression. If ld sees multiple common symbols with the same name, and they do not all have the same size, it will allocate space using the largest size.
When using ELF, the .comm directive takes an optional third argument. This is the desired alignment of the symbol, specified as a byte boundary (for example, an alignment of 16 means that the least significant 4 bits of the address should be zero).  The alignment must be an absolute expression, and it must be a power of two.  If ld allocates uninitialized memory for the common symbol, it will use the alignment when placing the symbol. If no alignment is specified, as will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16.
.cfi_startproc [simple] .cfi_startproc is used at the beginning of each function that should have an entry in .eh_frame.  It initializes some internal data structures. Don't forget to close the function by .cfi_endproc.
Unless .cfi_startproc is used along with parameter simple it also emits some architecture dependent initial CFI instructions.
.cfi_endproc .cfi_endproc is used at the end of a function where it closes its unwind entry previously opened by .cfi_startproc, and emits it to .eh_frame.
.cfi_personality encoding [, exp] .cfi_personality defines personality routine and its encoding.  encoding must be a constant determining how the personality should be encoded. If it is 255 ( DW_EH_PE_omit), second argument is not present, otherwise second argument should be a constant or a symbol name. When using indirect encodings, the symbol provided should be the location where personality can be loaded from, not the personality routine itself. The default after .cfi_startproc is .cfi_personality 0xff, no personality routine.
.cfi_lsda encoding [, exp] .cfi_lsda defines LSDA and its encoding.  encoding must be a constant determining how the LSDA should be encoded. If it is 255 ( DW_EH_PE_omit), second argument is not present, otherwise second argument should be a constant or a symbol name. The default after .cfi_startproc is .cfi_lsda 0xff, no LSDA.
.cfi_def_cfa register, offset .cfi_def_cfa defines a rule for computing CFA as: take address from register and add offset to it.
.cfi_def_cfa_register register .cfi_def_cfa_register modifies a rule for computing CFA. From now on register will be used instead of the old one. Offset remains the same.
.cfi_def_cfa_offset offset .cfi_def_cfa_offset modifies a rule for computing CFA. Register remains the same, but offset is new. Note that it is the absolute offset that will be added to a defined register to compute CFA address.
.cfi_adjust_cfa_offset offset Same as .cfi_def_cfa_offset but offset is a relative value that is added/substracted from the previous offset.
.cfi_offset register, offset Previous value of register is saved at offset offset from CFA.
.cfi_rel_offset register, offset Previous value of register is saved at offset offset from the current CFA register. This is transformed to .cfi_offset using the known displacement of the CFA register from the CFA. This is often easier to use, because the number will match the code it's annotating.
.cfi_register register1, register2 Previous value of register1 is saved in register register2.
.cfi_restore register .cfi_restore says that the rule for register is now the same as it was at the beginning of the function, after all initial instruction added by .cfi_startproc were executed.
.cfi_undefined register From now on the previous value of register can't be restored anymore.
.cfi_same_value register Current value of register is the same like in the previous frame, i.e. no restoration needed.
.cfi_remember_state, First save all current rules for all registers by .cfi_remember_state, then totally screw them up by subsequent .cfi_* directives and when everything is hopelessly bad, use .cfi_restore_state to restore the previous saved state.
.cfi_return_column register Change return column register, i.e. the return address is either directly in register or can be accessed by rules for register.
.cfi_signal_frame Mark current function as signal trampoline.
.cfi_window_save SPARC register window has been saved.
.cfi_escape expression[, ...] Allows the user to add arbitrary bytes to the unwind info. One might use this to add OS-specific CFI opcodes, or generic CFI opcodes that GAS does not yet support.
.file fileno filename When emitting dwarf2 line number information .file assigns filenames to the .debug_line file name table. The fileno operand should be a unique positive integer to use as the index of the entry in the table. The filename operand is a C string literal.
The detail of filename indices is exposed to the user because the filename table is shared with the .debug_info section of the dwarf2 debugging information, and thus the user must know the exact indices that table entries will have.
.loc fileno lineno [column] [options] The .loc directive will add row to the .debug_line line number matrix corresponding to the immediately following assembly instruction.  The fileno, lineno, and optional column arguments will be applied to the .debug_line state machine before the row is added.
The options are a sequence of the following tokens in any order:
basic_block This option will set the basic_block register in the .debug_line state machine to true.
prologue_end This option will set the prologue_end register in the .debug_line state machine to true.
epilogue_begin This option will set the epilogue_begin register in the .debug_line state machine to true.
is_stmt value This option will set the is_stmt register in the .debug_line state machine to value, which must be either 0 or 1.
isa value This directive will set the isa register in the .debug_line state machine to value, which must be an unsigned integer.
.loc_mark_blocks enable The .loc_mark_blocks directive makes the assembler emit an entry to the .debug_line line number matrix with the basic_block register in the state machine set whenever a code label is seen. The enable argument should be either 1 or 0, to enable or disable this function respectively.
.data subsection .data tells as to assemble the following statements onto the end of the data subsection numbered subsection (which is an absolute expression). If subsection is omitted, it defaults to zero.
.double flonums .double expects zero or more flonums, separated by commas. It assembles floating point numbers.
.eject Force a page break at this point, when generating assembly listings.
.else .else is part of the as support for conditional assembly; see If,, .if . It marks the beginning of a section of code to be assembled if the condition for the preceding .if was false.
.elseif .elseif is part of the as support for conditional assembly; see If,, .if . It is shorthand for beginning a new .if block that would otherwise fill the entire .else section.
.end .end marks the end of the assembly file.  as does not process anything in the file past the .end directive.
.endfunc .endfunc marks the end of a function specified with .func.
.endif .endif is part of the as support for conditional assembly; it marks the end of a block of code that is only assembled conditionally.See Section “If”.
.equ symbol, expression This directive sets the value of symbol to expression.  It is synonymous with .set; see Set,, .set .
.equiv symbol, expression The .equiv directive is like .equ and .set, except that the assembler will signal an error if symbol is already defined. Note a symbol which has been referenced but not actually defined is considered to be undefined.
Except for the contents of the error message, this is roughly equivalent to
.ifdef SYM .err .endif .equ SYM,VAL plus it protects the symbol from later redefinition.
.eqv symbol, expression The .eqv directive is like .equiv, but no attempt is made to evaluate the expression or any part of it immediately.  Instead each time the resulting symbol is used in an expression, a snapshot of its current value is taken.
.err If as assembles a .err directive, it will print an error message and, unless the [-Z] option was used, it will not generate an object file. This can be used to signal an error in conditionally compiled code.
.error  Va string Similarly to .err, this directive emits an error, but you can specify a string that will be emitted as the error message. If you don't specify the message, it defaults to .error directive invoked in source file.  See Section.Dq Errors .
.error "This code has not been assembled and tested."
.exitm Exit early from the current macro definition.See Section “Macro”.
.extern .extern is accepted in the source program---for compatibility with other assemblers---but it is ignored.  as treats all undefined symbols as external.
.fail expression Generates an error or a warning. If the value of the expression is 500 or more, as will print a warning message. If the value is less than 500, as will print an error message. The message will include the value of expression.  This can occasionally be useful inside complex nested macros or conditional assembly.
.file string .file tells as that we are about to start a new logical file.  string is the new file name. In general, the filename is recognized whether or not it is surrounded by quotes  ; but if you wish to specify an empty file name, you must give the quotes-- .  This statement may go away in future: it is only recognized to be compatible with old as programs.
.fill repeat, size, value repeat, size and value are absolute expressions. This emits repeat copies of size bytes.  Repeat may be zero or more.  Size may be zero or more, but if it is more than 8, then it is deemed to have the value 8, compatible with other people's assemblers. The contents of each repeat bytes is taken from an 8-byte number. The highest order 4 bytes are zero.  The lowest order 4 bytes are value rendered in the byte-order of an integer on the computer as is assembling for. Each size bytes in a repetition is taken from the lowest order size bytes of this number. Again, this bizarre behavior is compatible with other people's assemblers.
size and value are optional. If the second comma and value are absent, value is assumed zero. If the first comma and following tokens are absent, size is assumed to be 1.
.float flonums This directive assembles zero or more flonums, separated by commas. It has the same effect as .single.
.func name[, label] .func emits debugging information to denote function name, and is ignored unless the file is assembled with debugging enabled. Only --gstabs[+] is currently supported.  label is the entry point of the function and if omitted name prepended with the leading char is used.  leading char is usually _ or nothing, depending on the target. All functions are currently defined to have void return type. The function must be terminated with .endfunc.
.global symbol, .globl symbol .global makes the symbol visible to ld.  If you define symbol in your partial program, its value is made available to other partial programs that are linked with it. Otherwise, symbol takes its attributes from a symbol of the same name from another file linked into the same program.
Both spellings ( .globl and .global) are accepted, for compatibility with other assemblers.
.hidden names This is one of the ELF visibility directives. The other two are .internal (see Section “Internal”) and .protected (see Section “Protected”).
This directive overrides the named symbols default visibility (which is set by their binding: local, global or weak). The directive sets the visibility to hidden which means that the symbols are not visible to other components. Such symbols are always considered to be protected as well.
.hword expressions This expects zero or more expressions, and emits a 16 bit number for each.
This directive is a synonym for .short.
.ident This directive is used by some assemblers to place tags in object files. The behavior of this directive varies depending on the target. When using the a.out object file format, as simply accepts the directive for source- file compatibility with existing assemblers, but does not emit anything for it. When using COFF, comments are emitted to the .comment or .rdata section, depending on the target. When using ELF, comments are emitted to the .comment section.
.if absolute expression .if marks the beginning of a section of code which is only considered part of the source program being assembled if the argument (which must be an absolute expression) is non-zero. The end of the conditional section of code must be marked by .endif (see Section “Endif”); optionally, you may include code for the alternative condition, flagged by .else (see Section “Else”).  If you have several conditions to check, .elseif may be used to avoid nesting blocks if/else within each subsequent .else block.
The following variants of .if are also supported:
.ifdef symbol Assembles the following section of code if the specified symbol has been defined. Note a symbol which has been referenced but not yet defined is considered to be undefined.
.ifb text Assembles the following section of code if the operand is blank (empty).
.ifc string1, string2 Assembles the following section of code if the two strings are the same. The strings may be optionally quoted with single quotes. If they are not quoted, the first string stops at the first comma, and the second string stops at the end of the line. Strings which contain whitespace should be quoted. The string comparison is case sensitive.
.ifeq absolute expression Assembles the following section of code if the argument is zero.
.ifeqs string1, string2 Another form of .ifc.  The strings must be quoted using double quotes.
.ifge absolute expression Assembles the following section of code if the argument is greater than or equal to zero.
.ifgt absolute expression Assembles the following section of code if the argument is greater than zero.
.ifle absolute expression Assembles the following section of code if the argument is less than or equal to zero.
.iflt absolute expression Assembles the following section of code if the argument is less than zero.
.ifnb text Like .ifb, but the sense of the test is reversed: this assembles the following section of code if the operand is non-blank (non- empty).
.ifnc string1, string2. Like .ifc, but the sense of the test is reversed: this assembles the following section of code if the two strings are not the same.
.ifndef symbol
.ifnotdef symbol Assembles the following section of code if the specified symbol has not been defined. Both spelling variants are equivalent. Note a symbol which has been referenced but not yet defined is considered to be undefined.
.ifne absolute expression Assembles the following section of code if the argument is not equal to zero (in other words, this is equivalent to .if).
.ifnes string1, string2 Like .ifeqs, but the sense of the test is reversed: this assembles the following section of code if the two strings are not the same.
.incbin  Va file [, skip[, count]] The incbin directive includes file verbatim at the current location. You can control the search paths used with the -I command-line option (see Section “Invoking”).  Quotation marks are required around file.
The skip argument skips a number of bytes from the start of the file.  The count argument indicates the maximum number of bytes to read. Note that the data is not aligned in any way, so it is the user's responsibility to make sure that proper alignment is provided both before and after the incbin directive.
.include  Va file This directive provides a way to include supporting files at specified points in your source program. The code from file is assembled as if it followed the point of the .include; when the end of the included file is reached, assembly of the original file continues. You can control the search paths used with the -I command-line option (see Section “Invoking”). Quotation marks are required around file.
.int expressions Expect zero or more expressions, of any section, separated by commas. For each expression, emit a number that, at run time, is the value of that expression. The byte order and bit size of the number depends on what kind of target the assembly is for.
.internal names This is one of the ELF visibility directives. The other two are .hidden (see Section “Hidden”) and .protected (see Section “Protected”).
This directive overrides the named symbols default visibility (which is set by their binding: local, global or weak). The directive sets the visibility to internal which means that the symbols are considered to be hidden (i.e., not visible to other components), and that some extra, processor specific processing must also be performed upon the symbols as well.
.irp symbol, values... Evaluate a sequence of statements assigning different values to symbol. The sequence of statements starts at the .irp directive, and is terminated by an .endr directive. For each value, symbol is set to value, and the sequence of statements is assembled. If no value is listed, the sequence of statements is assembled once, with symbol set to the null string. To refer to symbol within the sequence of statements, use \symbol.
For example, assembling
.irp    param,1,2,3 move    d\param,sp@- .endr
is equivalent to assembling
move    d1,sp@- move    d2,sp@- move    d3,sp@-
For some caveats with the spelling of symbol, see also Macro.
.irpc symbol, values... Evaluate a sequence of statements assigning different values to symbol. The sequence of statements starts at the .irpc directive, and is terminated by an .endr directive. For each character in value, symbol is set to the character, and the sequence of statements is assembled. If no value is listed, the sequence of statements is assembled once, with symbol set to the null string. To refer to symbol within the sequence of statements, use \symbol.
.irpc    param,123 move    d\param,sp@- .endr
For some caveats with the spelling of symbol, see also the discussion atSee Section “Macro”.
.lcomm symbol, length Reserve length (an absolute expression) bytes for a local common denoted by symbol.  The section and value of symbol are those of the new local common. The addresses are allocated in the bss section, so that at run-time the bytes start off zeroed.  Symbol is not declared global (see Section “Global”), so is normally not visible to ld.
.lflags as accepts this directive, for compatibility with other assemblers, but ignores it.
.line line-number Even though this is a directive associated with the a.out or b.out object- code formats, as still recognizes it when producing COFF output, and treats .line as though it were the COFF .ln if it is found outside a .def / .endef pair.
Inside a .def, .line is, instead, one of the directives used by compilers to generate auxiliary symbol information for debugging.