Here is a brief summary of how to invoke as
. For details,
see Command-Line Options.
as [-a[cdhlns][=file]] [-D] [--defsym sym=val] [-f] [--gstabs] [--gstabs+] [--gdwarf2] [--help] [-I dir] [-J] [-K] [-L] [--listing-lhs-width=NUM] [--listing-lhs-width2=NUM] [--listing-rhs-width=NUM] [--listing-cont-lines=NUM] [--keep-locals] [-o objfile] [-R] [--statistics] [-v] [-version] [--version] [-W] [--warn] [--fatal-warnings] [-w] [-x] [-Z] [--target-help] [target-options] [--|files ...] Target Alpha options: [-mcpu] [-mdebug | -no-mdebug] [-relax] [-g] [-Gsize] [-F] [-32addr] Target ARC options: [-marc[5|6|7|8]] [-EB|-EL] Target ARM options: [-mcpu=processor[+extension...]] [-march=architecture[+extension...]] [-mfpu=floating-point-format] [-mfloat-abi=abi] [-mthumb] [-EB|-EL] [-mapcs-32|-mapcs-26|-mapcs-float| -mapcs-reentrant] [-mthumb-interwork] [-moabi] [-k] Target CRIS options: [--underscore | --no-underscore] [--pic] [-N] [--emulation=criself | --emulation=crisaout] Target D10V options: [-O] Target D30V options: [-O|-n|-N] Target i386 options: [--32|--64] [-n] Target i960 options: [-ACA|-ACA_A|-ACB|-ACC|-AKA|-AKB| -AKC|-AMC] [-b] [-no-relax] Target IP2K options: [-mip2022|-mip2022ext] Target M32R options: [--m32rx|--[no-]warn-explicit-parallel-conflicts| --W[n]p] Target M680X0 options: [-l] [-m68000|-m68010|-m68020|...] Target M68HC11 options: [-m68hc11|-m68hc12|-m68hcs12] [-mshort|-mlong] [-mshort-double|-mlong-double] [--force-long-branchs] [--short-branchs] [--strict-direct-mode] [--print-insn-syntax] [--print-opcodes] [--generate-example] Target MCORE options: [-jsri2bsr] [-sifilter] [-relax] [-mcpu=[210|340]] Target MIPS options: [-nocpp] [-EL] [-EB] [-O[optimization level]] [-g[debug level]] [-G num] [-KPIC] [-call_shared] [-non_shared] [-xgot] [--membedded-pic] [-mabi=ABI] [-32] [-n32] [-64] [-mfp32] [-mgp32] [-march=CPU] [-mtune=CPU] [-mips1] [-mips2] [-mips3] [-mips4] [-mips5] [-mips32] [-mips32r2] [-mips64] [-mips64r2] [-construct-floats] [-no-construct-floats] [-trap] [-no-break] [-break] [-no-trap] [-mfix7000] [-mno-fix7000] [-mips16] [-no-mips16] [-mips3d] [-no-mips3d] [-mdmx] [-no-mdmx] [-mdebug] [-no-mdebug] [-mpdr] [-mno-pdr] Target MMIX options: [--fixed-special-register-names] [--globalize-symbols] [--gnu-syntax] [--relax] [--no-predefined-symbols] [--no-expand] [--no-merge-gregs] [-x] [--linker-allocated-gregs] Target PDP11 options: [-mpic|-mno-pic] [-mall] [-mno-extensions] [-mextension|-mno-extension] [-mcpu] [-mmachine] Target picoJava options: [-mb|-me] Target PowerPC options: [-mpwrx|-mpwr2|-mpwr|-m601|-mppc|-mppc32|-m603|-m604| -m403|-m405|-mppc64|-m620|-mppc64bridge|-mbooke| -mbooke32|-mbooke64] [-mcom|-many|-maltivec] [-memb] [-mregnames|-mno-regnames] [-mrelocatable|-mrelocatable-lib] [-mlittle|-mlittle-endian|-mbig|-mbig-endian] [-msolaris|-mno-solaris] Target SPARC options: [-Av6|-Av7|-Av8|-Asparclet|-Asparclite -Av8plus|-Av8plusa|-Av9|-Av9a] [-xarch=v8plus|-xarch=v8plusa] [-bump] [-32|-64] Target TIC54X options: [-mcpu=54[123589]|-mcpu=54[56]lp] [-mfar-mode|-mf] [-merrors-to-file <filename>|-me <filename>] Target Xtensa options: [--[no-]density] [--[no-]relax] [--[no-]generics] [--[no-]text-section-literals] [--[no-]target-align] [--[no-]longcalls]
-a[cdhlmns]
-ac
-ad
-ah
-al
-am
-an
-as
=file
You may combine these options; for example, use -aln
for assembly
listing without forms processing. The =file
option, if used, must be
the last one. By itself, -a
defaults to -ahls
.
-D
--defsym
sym=
value
0x
indicates a hexadecimal value, and a leading 0
indicates an octal value.
-f
--gstabs
--gstabs+
--gdwarf2
--help
--target-help
-I
dir
.include
directives.
-J
-K
-L
--keep-locals
L
, but different systems have different local
label prefixes.
--listing-lhs-width=
number
--listing-lhs-width2=
number
--listing-rhs-width=
number
--listing-cont-lines=
number
-o
objfile
as
objfile.
-R
--statistics
--strip-local-absolute
-v
-version
as
version.
--version
as
version and exit.
-W
--no-warn
--fatal-warnings
--warn
-w
-x
-Z
-- |
files ...
The following options are available when as is configured for an ARC processor.
-marc[5|6|7|8]
-EB | -EL
The following options are available when as is configured for the ARM processor family.
-mcpu=
processor[+
extension...]
-march=
architecture[+
extension...]
-mfpu=
floating-point-format
-mfloat-abi=
abi
-mthumb
-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi
-EB | -EL
-mthumb-interwork
-k
See the info pages for documentation of the CRIS-specific options.
The following options are available when as is configured for a D10V processor.
-O
The following options are available when as is configured for a D30V processor.
-O
-n
-N
The following options are available when as is configured for the Intel 80960 processor.
-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC
-b
-no-relax
The following options are available when as is configured for the Ubicom IP2K series.
-mip2022ext
-mip2022
The following options are available when as is configured for the Renesas M32R (formerly Mitsubishi M32R) series.
--m32rx
--warn-explicit-parallel-conflicts or --Wp
--no-warn-explicit-parallel-conflicts or --Wnp
The following options are available when as is configured for the Motorola 68000 series.
-l
-m68000 | -m68008 | -m68010 | -m68020 | -m68030
| -m68040 | -m68060 | -m68302 | -m68331 | -m68332
| -m68333 | -m68340 | -mcpu32 | -m5200
-m68881 | -m68882 | -mno-68881 | -mno-68882
-m68851 | -mno-68851
For details about the PDP-11 machine dependent features options, see PDP-11-Options.
-mpic | -mno-pic
-mpic
.
-mall
-mall-extensions
-mno-extensions
-m
extension | -mno-
extension
-m
cpu
-m
machine
The following options are available when as is configured for a picoJava processor.
-mb
-ml
The following options are available when as is configured for the Motorola 68HC11 or 68HC12 series.
-m68hc11 | -m68hc12 | -m68hcs12
-mshort
-mlong
-mshort-double
-mlong-double
--force-long-branchs
-S | --short-branchs
--strict-direct-mode
--print-insn-syntax
--print-opcodes
--generate-example
as
.
The following options are available when as
is configured
for the SPARC architecture:
-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
-Av8plus | -Av8plusa | -Av9 | -Av9a
-Av8plus
and -Av8plusa
select a 32 bit environment.
-Av9
and -Av9a
select a 64 bit environment.
-Av8plusa
and -Av9a
enable the SPARC V9 instruction set with
UltraSPARC extensions.
-xarch=v8plus | -xarch=v8plusa
-bump
The following options are available when as is configured for the 'c54x architecture.
-mfar-mode
-mcpu=
CPU_VERSION
-merrors-to-file
FILENAME
The following options are available when as is configured for a MIPS processor.
-G
num
gp
register. It is only accepted for targets that
use ECOFF format, such as a DECstation running Ultrix. The default value is 8.
-EB
-EL
-mips1
-mips2
-mips3
-mips4
-mips5
-mips32
-mips32r2
-mips64
-mips64r2
-mips1
is an alias for -march=r3000
, -mips2
is an
alias for -march=r6000
, -mips3
is an alias for
-march=r4000
and -mips4
is an alias for -march=r8000
.
-mips5
, -mips32
, -mips32r2
, -mips64
, and
-mips64r2
correspond to generic
MIPS V
, MIPS32
, MIPS32 Release 2
, MIPS64
,
and MIPS64 Release 2
ISA processors, respectively.
-march=
CPU
-mtune=
cpu
-mfix7000
-mno-fix7000
-mdebug
-no-mdebug
-mpdr
-mno-pdr
.pdr
sections.
-mgp32
-mfp32
-mgp32
controls the size of general-purpose registers
and -mfp32
controls the size of floating-point registers.
-mips16
-no-mips16
.set mips16
at the start of the assembly file. -no-mips16
turns off this option.
-mips3d
-no-mips3d
-no-mips3d
turns off this option.
-mdmx
-no-mdmx
-no-mdmx
turns off this option.
--construct-floats
--no-construct-floats
--no-construct-floats
option disables the construction of
double width floating point constants by loading the two halves of the
value into the two single width floating point registers that make up
the double width register. By default --construct-floats
is
selected, allowing construction of these floating point constants.
--emulation=
name
as
to emulate as
configured
for some other target, in all respects, including output format (choosing
between ELF and ECOFF only), handling of pseudo-opcodes which may generate
debugging information or store symbol table information, and default
endianness. The available configuration names are: mipsecoff
,
mipself
, mipslecoff
, mipsbecoff
, mipslelf
,
mipsbelf
. The first two do not alter the default endianness from that
of the primary target for which the assembler was configured; the others change
the default to little- or big-endian as indicated by the b
or l
in the name. Using -EB
or -EL
will override the endianness
selection in any case.
This option is currently supported only when the primary target
as
is configured for is a MIPS ELF or ECOFF target.
Furthermore, the primary target or others specified with
--enable-targets=...
at configuration time must include support for
the other format, if both are to be available. For example, the Irix 5
configuration includes support for both.
Eventually, this option will support more configurations, with more
fine-grained control over the assembler's behavior, and will be supported for
more processors.
-nocpp
as
ignores this option. It is accepted for compatibility with
the native tools.
--trap
--no-trap
--break
--no-break
--trap
or --no-break
(which are synonyms) take a trap exception
(and only work for Instruction Set Architecture level 2 and higher);
--break
or --no-trap
(also synonyms, and the default) take a
break exception.
-n
as
will issue a warning every
time it generates a nop instruction from a macro.
The following options are available when as is configured for an MCore processor.
-jsri2bsr
-nojsri2bsr
-nojsri2bsr
can be used to disable it.
-sifilter
-nosifilter
-sifilter
command line option.
-relax
-mcpu=[210|340]
-EB
-EL
See the info pages for documentation of the MMIX-specific options.
The following options are available when as is configured for an Xtensa processor.
--density | --no-density
--relax | --no-relax
--generics
and --no-generics
.
--generics | --no-generics
--generics
;
--no-generics
should be used only in the rare cases when the
instructions must be exactly as specified in the assembly source.
--text-section-literals | --no-text-section-literals
--text-section-literals
, literal pools are interspersed
in the text section. The default is
--no-text-section-literals
, which places literals in a
separate section in the output file.
--target-align | --no-target-align
--target-align
.
--longcalls | --no-longcalls
--no-longcalls
.