This is as.info, produced by makeinfo version 4.0 from as.texinfo. START-INFO-DIR-ENTRY * As: (as). The GNU assembler. END-INFO-DIR-ENTRY This file documents the GNU Assembler "as". Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: as.info, Node: AMD29K-Regs, Prev: AMD29K-Chars, Up: AMD29K Syntax Register Names .............. General-purpose registers are represented by predefined symbols of the form `GRNNN' (for global registers) or `LRNNN' (for local registers), where NNN represents a number between `0' and `127', written with no leading zeros. The leading letters may be in either upper or lower case; for example, `gr13' and `LR7' are both valid register names. You may also refer to general-purpose registers by specifying the register number as the result of an expression (prefixed with `%%' to flag the expression as a register number): %%EXPRESSION --where EXPRESSION must be an absolute expression evaluating to a number between `0' and `255'. The range [0, 127] refers to global registers, and the range [128, 255] to local registers. In addition, `as' understands the following protected special-purpose register names for the AMD 29K family: vab chd pc0 ops chc pc1 cps rbp pc2 cfg tmc mmu cha tmr lru These unprotected special-purpose register names are also recognized: ipc alu fpe ipa bp inte ipb fc fps q cr exop  File: as.info, Node: AMD29K Floating Point, Next: AMD29K Directives, Prev: AMD29K Syntax, Up: AMD29K-Dependent Floating Point -------------- The AMD 29K family uses IEEE floating-point numbers.  File: as.info, Node: AMD29K Directives, Next: AMD29K Opcodes, Prev: AMD29K Floating Point, Up: AMD29K-Dependent AMD 29K Machine Directives -------------------------- `.block SIZE , FILL' This directive emits SIZE bytes, each of value FILL. Both SIZE and FILL are absolute expressions. If the comma and FILL are omitted, FILL is assumed to be zero. In other versions of the GNU assembler, this directive is called `.space'. `.cputype' This directive is ignored; it is accepted for compatibility with other AMD 29K assemblers. `.file' This directive is ignored; it is accepted for compatibility with other AMD 29K assemblers. _Warning:_ in other versions of the GNU assembler, `.file' is used for the directive called `.app-file' in the AMD 29K support. `.line' This directive is ignored; it is accepted for compatibility with other AMD 29K assemblers. `.sect' This directive is ignored; it is accepted for compatibility with other AMD 29K assemblers. `.use SECTION NAME' Establishes the section and subsection for the following code; SECTION NAME may be one of `.text', `.data', `.data1', or `.lit'. With one of the first three SECTION NAME options, `.use' is equivalent to the machine directive SECTION NAME; the remaining case, `.use .lit', is the same as `.data 200'.  File: as.info, Node: AMD29K Opcodes, Prev: AMD29K Directives, Up: AMD29K-Dependent Opcodes ------- `as' implements all the standard AMD 29K opcodes. No additional pseudo-instructions are needed on this family. For information on the 29K machine instruction set, see `Am29000 User's Manual', Advanced Micro Devices, Inc.  File: as.info, Node: ARM-Dependent, Next: D10V-Dependent, Prev: ARC-Dependent, Up: Machine Dependencies ARM Dependent Features ====================== * Menu: * ARM Options:: Options * ARM Syntax:: Syntax * ARM Floating Point:: Floating Point * ARM Directives:: ARM Machine Directives * ARM Opcodes:: Opcodes  File: as.info, Node: ARM Options, Next: ARM Syntax, Up: ARM-Dependent Options ------- `-marm`[2|250|3|6|60|600|610|620|7|7m|7d|7dm|7di|7dmi|70|700|700i|710|710c|7100|7500|7500fe|7tdmi|8|810|9|9tdmi|920|strongarm|strongarm110|strongarm1100]'' `-mxscale' This option specifies the target processor. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target processor. `-marmv`[2|2a|3|3m|4|4t|5|5t|5te]'' This option specifies the target architecture. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target architecture. The option `-marmv5te' specifies that v5t architecture should be used with the El Segundo extensions enabled. `-mthumb' This option specifies that only Thumb instructions should be assembled. `-mall' This option specifies that any Arm or Thumb instruction should be assembled. `-mfpa `[10|11]'' This option specifies the floating point architecture in use on the target processor. `-mfpe-old' Do not allow the assembly of floating point multiple instructions. `-mno-fpu' Do not allow the assembly of any floating point instructions. `-mthumb-interwork' This option specifies that the output generated by the assembler should be marked as supporting interworking. `-mapcs `[26|32]'' This option specifies that the output generated by the assembler should be marked as supporting the indicated version of the Arm Procedure. Calling Standard. `-matpcs' This option specifies that the output generated by the assembler should be marked as supporting the Arm/Thumb Procedure Calling Standard. If enabled this option will cause the assembler to create an empty debugging section in the object file called .arm.atpcs. Debuggers can use this to determine the ABI being used by. `-mapcs-float' This indicates the the floating point variant of the APCS should be used. In this variant floating point arguments are passed in FP registers rather than integer registers. `-mapcs-reentrant' This indicates that the reentrant variant of the APCS should be used. This variant supports position independent code. `-EB' This option specifies that the output generated by the assembler should be marked as being encoded for a big-endian processor. `-EL' This option specifies that the output generated by the assembler should be marked as being encoded for a little-endian processor. `-k' This option specifies that the output of the assembler should be marked as position-independent code (PIC). `-moabi' This indicates that the code should be assembled using the old ARM ELF conventions, based on a beta release release of the ARM-ELF specifications, rather than the default conventions which are based on the final release of the ARM-ELF specifications.  File: as.info, Node: ARM Syntax, Next: ARM Floating Point, Prev: ARM Options, Up: ARM-Dependent Syntax ------ * Menu: * ARM-Chars:: Special Characters * ARM-Regs:: Register Names  File: as.info, Node: ARM-Chars, Next: ARM-Regs, Up: ARM Syntax Special Characters .................. The presence of a `@' on a line indicates the start of a comment that extends to the end of the current line. If a `#' appears as the first character of a line, the whole line is treated as a comment. The `;' character can be used instead of a newline to separate statements. Either `#' or `$' can be used to indicate immediate operands. *TODO* Explain about /data modifier on symbols.  File: as.info, Node: ARM-Regs, Prev: ARM-Chars, Up: ARM Syntax Register Names .............. *TODO* Explain about ARM register naming, and the predefined names.  File: as.info, Node: ARM Floating Point, Next: ARM Directives, Prev: ARM Syntax, Up: ARM-Dependent Floating Point -------------- The ARM family uses IEEE floating-point numbers.  File: as.info, Node: ARM Directives, Next: ARM Opcodes, Prev: ARM Floating Point, Up: ARM-Dependent ARM Machine Directives ---------------------- `.align EXPRESSION [, EXPRESSION]' This is the generic .ALIGN directive. For the ARM however if the first argument is zero (ie no alignment is needed) the assembler will behave as if the argument had been 2 (ie pad to the next four byte boundary). This is for compatability with ARM's own assembler. `NAME .req REGISTER NAME' This creates an alias for REGISTER NAME called NAME. For example: foo .req r0 `.code `[16|32]'' This directive selects the instruction set being generated. The value 16 selects Thumb, with the value 32 selecting ARM. `.thumb' This performs the same action as .CODE 16. `.arm' This performs the same action as .CODE 32. `.force_thumb' This directive forces the selection of Thumb instructions, even if the target processor does not support those instructions `.thumb_func' This directive specifies that the following symbol is the name of a Thumb encoded function. This information is necessary in order to allow the assembler and linker to generate correct code for interworking between Arm and Thumb instructions and should be used even if interworking is not going to be performed. The presence of this directive also implies `.thumb' `.thumb_set' This performs the equivalent of a `.set' directive in that it creates a symbol which is an alias for another symbol (possibly not yet defined). This directive also has the added property in that it marks the aliased symbol as being a thumb function entry point, in the same way that the `.thumb_func' directive does. `.ltorg' This directive causes the current contents of the literal pool to be dumped into the current section (which is assumed to be the .text section) at the current location (aligned to a word boundary). `.pool' This is a synonym for .ltorg.  File: as.info, Node: ARM Opcodes, Prev: ARM Directives, Up: ARM-Dependent Opcodes ------- `as' implements all the standard ARM opcodes. It also implements several pseudo opcodes, including several synthetic load instructions. `NOP' nop This pseudo op will always evaluate to a legal ARM instruction that does nothing. Currently it will evaluate to MOV r0, r0. `LDR' ldr , = If expression evaluates to a numeric constant then a MOV or MVN instruction will be used in place of the LDR instruction, if the constant can be generated by either of these instructions. Otherwise the constant will be placed into the nearest literal pool (if it not already there) and a PC relative LDR instruction will be generated. `ADR' adr