1AS(1) GNU Development Tools AS(1)
2
3
4
6 AS - the portable GNU assembler.
7
9 as [-a[cdghlns][=file]] [--alternate] [-D]
10 [--compress-debug-sections] [--nocompress-debug-sections]
11 [--debug-prefix-map old=new]
12 [--defsym sym=val] [-f] [-g] [--gstabs]
13 [--gstabs+] [--gdwarf-2] [--help] [-I dir] [-J]
14 [-K] [-L] [--listing-lhs-width=NUM]
15 [--listing-lhs-width2=NUM] [--listing-rhs-width=NUM]
16 [--listing-cont-lines=NUM] [--keep-locals] [-o
17 objfile] [-R] [--reduce-memory-overheads] [--statistics]
18 [-v] [-version] [--version] [-W] [--warn]
19 [--fatal-warnings] [-w] [-x] [-Z] [@FILE]
20 [--target-help] [target-options]
21 [--|files ...]
22
23 Target Alpha options:
24 [-mcpu]
25 [-mdebug | -no-mdebug]
26 [-replace | -noreplace]
27 [-relax] [-g] [-Gsize]
28 [-F] [-32addr]
29
30 Target ARC options:
31 [-marc[5|6|7|8]]
32 [-EB|-EL]
33
34 Target ARM options:
35 [-mcpu=processor[+extension...]]
36 [-march=architecture[+extension...]]
37 [-mfpu=floating-point-format]
38 [-mfloat-abi=abi]
39 [-meabi=ver]
40 [-mthumb]
41 [-EB|-EL]
42 [-mapcs-32|-mapcs-26|-mapcs-float|
43 -mapcs-reentrant]
44 [-mthumb-interwork] [-k]
45
46 Target Blackfin options:
47 [-mcpu=processor[-sirevision]]
48 [-mfdpic]
49 [-mno-fdpic]
50 [-mnopic]
51
52 Target CRIS options:
53 [--underscore | --no-underscore]
54 [--pic] [-N]
55 [--emulation=criself | --emulation=crisaout]
56 [--march=v0_v10 | --march=v10 | --march=v32 |
57 --march=common_v10_v32]
58
59 Target D10V options:
60 [-O]
61
62 Target D30V options:
63 [-O|-n|-N]
64
65 Target H8/300 options:
66 [-h-tick-hex]
67
68 Target i386 options:
69 [--32|--64] [-n]
70 [-march=CPU[+EXTENSION...]] [-mtune=CPU]
71
72 Target i960 options:
73 [-ACA|-ACA_A|-ACB|-ACC|-AKA|-AKB|
74 -AKC|-AMC]
75 [-b] [-no-relax]
76
77 Target IA-64 options:
78 [-mconstant-gp|-mauto-pic]
79 [-milp32|-milp64|-mlp64|-mp64]
80 [-mle|mbe]
81 [-mtune=itanium1|-mtune=itanium2]
82 [-munwind-check=warning|-munwind-check=error]
83 [-mhint.b=ok|-mhint.b=warning|-mhint.b=error]
84 [-x|-xexplicit] [-xauto] [-xdebug]
85
86 Target IP2K options:
87 [-mip2022|-mip2022ext]
88
89 Target M32C options:
90 [-m32c|-m16c] [-relax] [-h-tick-hex]
91
92 Target M32R options:
93 [--m32rx|--[no-]warn-explicit-parallel-conflicts|
94 --W[n]p]
95
96 Target M680X0 options:
97 [-l] [-m68000|-m68010|-m68020|...]
98
99 Target M68HC11 options:
100 [-m68hc11|-m68hc12|-m68hcs12]
101 [-mshort|-mlong]
102 [-mshort-double|-mlong-double]
103 [--force-long-branches] [--short-branches]
104 [--strict-direct-mode] [--print-insn-syntax]
105 [--print-opcodes] [--generate-example]
106
107 Target MCORE options:
108 [-jsri2bsr] [-sifilter] [-relax]
109 [-mcpu=[210|340]] Target MICROBLAZE options:
110
111 Target MIPS options:
112 [-nocpp] [-EL] [-EB] [-O[optimization level]]
113 [-g[debug level]] [-G num] [-KPIC] [-call_shared]
114 [-non_shared] [-xgot [-mvxworks-pic]
115 [-mabi=ABI] [-32] [-n32] [-64] [-mfp32] [-mgp32]
116 [-march=CPU] [-mtune=CPU] [-mips1] [-mips2]
117 [-mips3] [-mips4] [-mips5] [-mips32] [-mips32r2]
118 [-mips64] [-mips64r2]
119 [-construct-floats] [-no-construct-floats]
120 [-trap] [-no-break] [-break] [-no-trap]
121 [-mips16] [-no-mips16]
122 [-msmartmips] [-mno-smartmips]
123 [-mips3d] [-no-mips3d]
124 [-mdmx] [-no-mdmx]
125 [-mdsp] [-mno-dsp]
126 [-mdspr2] [-mno-dspr2]
127 [-mmt] [-mno-mt]
128 [-mfix7000] [-mno-fix7000]
129 [-mfix-vr4120] [-mno-fix-vr4120]
130 [-mfix-vr4130] [-mno-fix-vr4130]
131 [-mdebug] [-no-mdebug]
132 [-mpdr] [-mno-pdr]
133
134 Target MMIX options:
135 [--fixed-special-register-names] [--globalize-symbols]
136 [--gnu-syntax] [--relax] [--no-predefined-symbols]
137 [--no-expand] [--no-merge-gregs] [-x]
138 [--linker-allocated-gregs]
139
140 Target PDP11 options:
141 [-mpic|-mno-pic] [-mall] [-mno-extensions]
142 [-mextension|-mno-extension]
143 [-mcpu] [-mmachine]
144
145 Target picoJava options:
146 [-mb|-me]
147
148 Target PowerPC options:
149 [-mpwrx|-mpwr2|-mpwr|-m601|-mppc|-mppc32|-m603|-m604|
150 -m403|-m405|-mppc64|-m620|-mppc64bridge|-mbooke]
151 [-mcom|-many|-maltivec|-mvsx] [-memb]
152 [-mregnames|-mno-regnames]
153 [-mrelocatable|-mrelocatable-lib]
154 [-mlittle|-mlittle-endian|-mbig|-mbig-endian]
155 [-msolaris|-mno-solaris]
156
157 Target RX options:
158 [-mlittle-endian|-mbig-endian]
159 [-m32bit-ints|-m16bit-ints]
160 [-m32bit-doubles|-m64bit-doubles]
161
162 Target s390 options:
163 [-m31|-m64] [-mesa|-mzarch] [-march=CPU]
164 [-mregnames|-mno-regnames]
165 [-mwarn-areg-zero]
166
167 Target SCORE options:
168 [-EB][-EL][-FIXDD][-NWARN]
169 [-SCORE5][-SCORE5U][-SCORE7][-SCORE3]
170 [-march=score7][-march=score3]
171 [-USE_R1][-KPIC][-O0][-G num][-V]
172
173 Target SPARC options:
174 [-Av6|-Av7|-Av8|-Asparclet|-Asparclite
175 -Av8plus|-Av8plusa|-Av9|-Av9a]
176 [-xarch=v8plus|-xarch=v8plusa] [-bump]
177 [-32|-64]
178
179 Target TIC54X options:
180 [-mcpu=54[123589]|-mcpu=54[56]lp] [-mfar-mode|-mf]
181 [-merrors-to-file <filename>|-me <filename>]
182
183 Target TIC6X options:
184 [-march=arch] [-matomic|-mno-atomic]
185 [-mbig-endian|-mlittle-endian] [-mdsbt|-mno-dsbt]
186 [-mpid=no|-mpid=near|-mpid=far] [-mpic|-mno-pic]
187
188 Target Z80 options:
189 [-z80] [-r800]
190 [ -ignore-undocumented-instructions] [-Wnud]
191 [ -ignore-unportable-instructions] [-Wnup]
192 [ -warn-undocumented-instructions] [-Wud]
193 [ -warn-unportable-instructions] [-Wup]
194 [ -forbid-undocumented-instructions] [-Fud]
195 [ -forbid-unportable-instructions] [-Fup]
196
197 Target Xtensa options:
198 [--[no-]text-section-literals] [--[no-]absolute-literals]
199 [--[no-]target-align] [--[no-]longcalls]
200 [--[no-]transform]
201 [--rename-section oldname=newname]
202
204 GNU as is really a family of assemblers. If you use (or have used) the
205 GNU assembler on one architecture, you should find a fairly similar
206 environment when you use it on another architecture. Each version has
207 much in common with the others, including object file formats, most
208 assembler directives (often called pseudo-ops) and assembler syntax.
209
210 as is primarily intended to assemble the output of the GNU C compiler
211 "gcc" for use by the linker "ld". Nevertheless, we've tried to make as
212 assemble correctly everything that other assemblers for the same
213 machine would assemble. Any exceptions are documented explicitly.
214 This doesn't mean as always uses the same syntax as another assembler
215 for the same architecture; for example, we know of several incompatible
216 versions of 680x0 assembly language syntax.
217
218 Each time you run as it assembles exactly one source program. The
219 source program is made up of one or more files. (The standard input is
220 also a file.)
221
222 You give as a command line that has zero or more input file names. The
223 input files are read (from left file name to right). A command line
224 argument (in any position) that has no special meaning is taken to be
225 an input file name.
226
227 If you give as no file names it attempts to read one input file from
228 the as standard input, which is normally your terminal. You may have
229 to type ctl-D to tell as there is no more program to assemble.
230
231 Use -- if you need to explicitly name the standard input file in your
232 command line.
233
234 If the source is empty, as produces a small, empty object file.
235
236 as may write warnings and error messages to the standard error file
237 (usually your terminal). This should not happen when a compiler runs
238 as automatically. Warnings report an assumption made so that as could
239 keep assembling a flawed program; errors report a grave problem that
240 stops the assembly.
241
242 If you are invoking as via the GNU C compiler, you can use the -Wa
243 option to pass arguments through to the assembler. The assembler
244 arguments must be separated from each other (and the -Wa) by commas.
245 For example:
246
247 gcc -c -g -O -Wa,-alh,-L file.c
248
249 This passes two options to the assembler: -alh (emit a listing to
250 standard output with high-level and assembly source) and -L (retain
251 local symbols in the symbol table).
252
253 Usually you do not need to use this -Wa mechanism, since many compiler
254 command-line options are automatically passed to the assembler by the
255 compiler. (You can call the GNU compiler driver with the -v option to
256 see precisely what options it passes to each compilation pass,
257 including the assembler.)
258
260 @file
261 Read command-line options from file. The options read are inserted
262 in place of the original @file option. If file does not exist, or
263 cannot be read, then the option will be treated literally, and not
264 removed.
265
266 Options in file are separated by whitespace. A whitespace
267 character may be included in an option by surrounding the entire
268 option in either single or double quotes. Any character (including
269 a backslash) may be included by prefixing the character to be
270 included with a backslash. The file may itself contain additional
271 @file options; any such options will be processed recursively.
272
273 -a[cdghlmns]
274 Turn on listings, in any of a variety of ways:
275
276 -ac omit false conditionals
277
278 -ad omit debugging directives
279
280 -ag include general information, like as version and options passed
281
282 -ah include high-level source
283
284 -al include assembly
285
286 -am include macro expansions
287
288 -an omit forms processing
289
290 -as include symbols
291
292 =file
293 set the name of the listing file
294
295 You may combine these options; for example, use -aln for assembly
296 listing without forms processing. The =file option, if used, must
297 be the last one. By itself, -a defaults to -ahls.
298
299 --alternate
300 Begin in alternate macro mode.
301
302 --compress-debug-sections
303 Compress DWARF debug sections using zlib. The debug sections are
304 renamed to begin with .zdebug, and the resulting object file may
305 not be compatible with older linkers and object file utilities.
306
307 --nocompress-debug-sections
308 Do not compress DWARF debug sections. This is the default.
309
310 -D Ignored. This option is accepted for script compatibility with
311 calls to other assemblers.
312
313 --debug-prefix-map old=new
314 When assembling files in directory old, record debugging
315 information describing them as in new instead.
316
317 --defsym sym=value
318 Define the symbol sym to be value before assembling the input file.
319 value must be an integer constant. As in C, a leading 0x indicates
320 a hexadecimal value, and a leading 0 indicates an octal value. The
321 value of the symbol can be overridden inside a source file via the
322 use of a ".set" pseudo-op.
323
324 -f "fast"---skip whitespace and comment preprocessing (assume source
325 is compiler output).
326
327 -g
328 --gen-debug
329 Generate debugging information for each assembler source line using
330 whichever debug format is preferred by the target. This currently
331 means either STABS, ECOFF or DWARF2.
332
333 --gstabs
334 Generate stabs debugging information for each assembler line. This
335 may help debugging assembler code, if the debugger can handle it.
336
337 --gstabs+
338 Generate stabs debugging information for each assembler line, with
339 GNU extensions that probably only gdb can handle, and that could
340 make other debuggers crash or refuse to read your program. This
341 may help debugging assembler code. Currently the only GNU
342 extension is the location of the current working directory at
343 assembling time.
344
345 --gdwarf-2
346 Generate DWARF2 debugging information for each assembler line.
347 This may help debugging assembler code, if the debugger can handle
348 it. Note---this option is only supported by some targets, not all
349 of them.
350
351 --help
352 Print a summary of the command line options and exit.
353
354 --target-help
355 Print a summary of all target specific options and exit.
356
357 -I dir
358 Add directory dir to the search list for ".include" directives.
359
360 -J Don't warn about signed overflow.
361
362 -K Issue warnings when difference tables altered for long
363 displacements.
364
365 -L
366 --keep-locals
367 Keep (in the symbol table) local symbols. These symbols start with
368 system-specific local label prefixes, typically .L for ELF systems
369 or L for traditional a.out systems.
370
371 --listing-lhs-width=number
372 Set the maximum width, in words, of the output data column for an
373 assembler listing to number.
374
375 --listing-lhs-width2=number
376 Set the maximum width, in words, of the output data column for
377 continuation lines in an assembler listing to number.
378
379 --listing-rhs-width=number
380 Set the maximum width of an input source line, as displayed in a
381 listing, to number bytes.
382
383 --listing-cont-lines=number
384 Set the maximum number of lines printed in a listing for a single
385 line of input to number + 1.
386
387 -o objfile
388 Name the object-file output from as objfile.
389
390 -R Fold the data section into the text section.
391
392 Set the default size of GAS's hash tables to a prime number close
393 to number. Increasing this value can reduce the length of time it
394 takes the assembler to perform its tasks, at the expense of
395 increasing the assembler's memory requirements. Similarly reducing
396 this value can reduce the memory requirements at the expense of
397 speed.
398
399 --reduce-memory-overheads
400 This option reduces GAS's memory requirements, at the expense of
401 making the assembly processes slower. Currently this switch is a
402 synonym for --hash-size=4051, but in the future it may have other
403 effects as well.
404
405 --statistics
406 Print the maximum space (in bytes) and total time (in seconds) used
407 by assembly.
408
409 --strip-local-absolute
410 Remove local absolute symbols from the outgoing symbol table.
411
412 -v
413 -version
414 Print the as version.
415
416 --version
417 Print the as version and exit.
418
419 -W
420 --no-warn
421 Suppress warning messages.
422
423 --fatal-warnings
424 Treat warnings as errors.
425
426 --warn
427 Don't suppress warning messages or treat them as errors.
428
429 -w Ignored.
430
431 -x Ignored.
432
433 -Z Generate an object file even after errors.
434
435 -- | files ...
436 Standard input, or source files to assemble.
437
438 The following options are available when as is configured for an ARC
439 processor.
440
441 -marc[5|6|7|8]
442 This option selects the core processor variant.
443
444 -EB | -EL
445 Select either big-endian (-EB) or little-endian (-EL) output.
446
447 The following options are available when as is configured for the ARM
448 processor family.
449
450 -mcpu=processor[+extension...]
451 Specify which ARM processor variant is the target.
452
453 -march=architecture[+extension...]
454 Specify which ARM architecture variant is used by the target.
455
456 -mfpu=floating-point-format
457 Select which Floating Point architecture is the target.
458
459 -mfloat-abi=abi
460 Select which floating point ABI is in use.
461
462 -mthumb
463 Enable Thumb only instruction decoding.
464
465 -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant
466 Select which procedure calling convention is in use.
467
468 -EB | -EL
469 Select either big-endian (-EB) or little-endian (-EL) output.
470
471 -mthumb-interwork
472 Specify that the code has been generated with interworking between
473 Thumb and ARM code in mind.
474
475 -k Specify that PIC code has been generated.
476
477 The following options are available when as is configured for the
478 Blackfin processor family.
479
480 -mcpu=processor[-sirevision]
481 This option specifies the target processor. The optional
482 sirevision is not used in assembler.
483
484 -mfdpic
485 Assemble for the FDPIC ABI.
486
487 -mno-fdpic
488 -mnopic
489 Disable -mfdpic.
490
491 See the info pages for documentation of the CRIS-specific options.
492
493 The following options are available when as is configured for a D10V
494 processor.
495
496 -O Optimize output by parallelizing instructions.
497
498 The following options are available when as is configured for a D30V
499 processor.
500
501 -O Optimize output by parallelizing instructions.
502
503 -n Warn when nops are generated.
504
505 -N Warn when a nop after a 32-bit multiply instruction is generated.
506
507 The following options are available when as is configured for the Intel
508 80960 processor.
509
510 -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC
511 Specify which variant of the 960 architecture is the target.
512
513 -b Add code to collect statistics about branches taken.
514
515 -no-relax
516 Do not alter compare-and-branch instructions for long
517 displacements; error if necessary.
518
519 The following options are available when as is configured for the
520 Ubicom IP2K series.
521
522 -mip2022ext
523 Specifies that the extended IP2022 instructions are allowed.
524
525 -mip2022
526 Restores the default behaviour, which restricts the permitted
527 instructions to just the basic IP2022 ones.
528
529 The following options are available when as is configured for the
530 Renesas M32C and M16C processors.
531
532 -m32c
533 Assemble M32C instructions.
534
535 -m16c
536 Assemble M16C instructions (the default).
537
538 -relax
539 Enable support for link-time relaxations.
540
541 -h-tick-hex
542 Support H'00 style hex constants in addition to 0x00 style.
543
544 The following options are available when as is configured for the
545 Renesas M32R (formerly Mitsubishi M32R) series.
546
547 --m32rx
548 Specify which processor in the M32R family is the target. The
549 default is normally the M32R, but this option changes it to the
550 M32RX.
551
552 --warn-explicit-parallel-conflicts or --Wp
553 Produce warning messages when questionable parallel constructs are
554 encountered.
555
556 --no-warn-explicit-parallel-conflicts or --Wnp
557 Do not produce warning messages when questionable parallel
558 constructs are encountered.
559
560 The following options are available when as is configured for the
561 Motorola 68000 series.
562
563 -l Shorten references to undefined symbols, to one word instead of
564 two.
565
566 -m68000 | -m68008 | -m68010 | -m68020 | -m68030
567 | -m68040 | -m68060 | -m68302 | -m68331 | -m68332
568 | -m68333 | -m68340 | -mcpu32 | -m5200
569 Specify what processor in the 68000 family is the target. The
570 default is normally the 68020, but this can be changed at
571 configuration time.
572
573 -m68881 | -m68882 | -mno-68881 | -mno-68882
574 The target machine does (or does not) have a floating-point
575 coprocessor. The default is to assume a coprocessor for 68020,
576 68030, and cpu32. Although the basic 68000 is not compatible with
577 the 68881, a combination of the two can be specified, since it's
578 possible to do emulation of the coprocessor instructions with the
579 main processor.
580
581 -m68851 | -mno-68851
582 The target machine does (or does not) have a memory-management unit
583 coprocessor. The default is to assume an MMU for 68020 and up.
584
585 For details about the PDP-11 machine dependent features options, see
586 PDP-11-Options.
587
588 -mpic | -mno-pic
589 Generate position-independent (or position-dependent) code. The
590 default is -mpic.
591
592 -mall
593 -mall-extensions
594 Enable all instruction set extensions. This is the default.
595
596 -mno-extensions
597 Disable all instruction set extensions.
598
599 -mextension | -mno-extension
600 Enable (or disable) a particular instruction set extension.
601
602 -mcpu
603 Enable the instruction set extensions supported by a particular
604 CPU, and disable all other extensions.
605
606 -mmachine
607 Enable the instruction set extensions supported by a particular
608 machine model, and disable all other extensions.
609
610 The following options are available when as is configured for a
611 picoJava processor.
612
613 -mb Generate "big endian" format output.
614
615 -ml Generate "little endian" format output.
616
617 The following options are available when as is configured for the
618 Motorola 68HC11 or 68HC12 series.
619
620 -m68hc11 | -m68hc12 | -m68hcs12
621 Specify what processor is the target. The default is defined by
622 the configuration option when building the assembler.
623
624 -mshort
625 Specify to use the 16-bit integer ABI.
626
627 -mlong
628 Specify to use the 32-bit integer ABI.
629
630 -mshort-double
631 Specify to use the 32-bit double ABI.
632
633 -mlong-double
634 Specify to use the 64-bit double ABI.
635
636 --force-long-branches
637 Relative branches are turned into absolute ones. This concerns
638 conditional branches, unconditional branches and branches to a sub
639 routine.
640
641 -S | --short-branches
642 Do not turn relative branches into absolute ones when the offset is
643 out of range.
644
645 --strict-direct-mode
646 Do not turn the direct addressing mode into extended addressing
647 mode when the instruction does not support direct addressing mode.
648
649 --print-insn-syntax
650 Print the syntax of instruction in case of error.
651
652 --print-opcodes
653 print the list of instructions with syntax and then exit.
654
655 --generate-example
656 print an example of instruction for each possible instruction and
657 then exit. This option is only useful for testing as.
658
659 The following options are available when as is configured for the SPARC
660 architecture:
661
662 -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
663 -Av8plus | -Av8plusa | -Av9 | -Av9a
664 Explicitly select a variant of the SPARC architecture.
665
666 -Av8plus and -Av8plusa select a 32 bit environment. -Av9 and -Av9a
667 select a 64 bit environment.
668
669 -Av8plusa and -Av9a enable the SPARC V9 instruction set with
670 UltraSPARC extensions.
671
672 -xarch=v8plus | -xarch=v8plusa
673 For compatibility with the Solaris v9 assembler. These options are
674 equivalent to -Av8plus and -Av8plusa, respectively.
675
676 -bump
677 Warn when the assembler switches to another architecture.
678
679 The following options are available when as is configured for the 'c54x
680 architecture.
681
682 -mfar-mode
683 Enable extended addressing mode. All addresses and relocations
684 will assume extended addressing (usually 23 bits).
685
686 -mcpu=CPU_VERSION
687 Sets the CPU version being compiled for.
688
689 -merrors-to-file FILENAME
690 Redirect error output to a file, for broken systems which don't
691 support such behaviour in the shell.
692
693 The following options are available when as is configured for a MIPS
694 processor.
695
696 -G num
697 This option sets the largest size of an object that can be
698 referenced implicitly with the "gp" register. It is only accepted
699 for targets that use ECOFF format, such as a DECstation running
700 Ultrix. The default value is 8.
701
702 -EB Generate "big endian" format output.
703
704 -EL Generate "little endian" format output.
705
706 -mips1
707 -mips2
708 -mips3
709 -mips4
710 -mips5
711 -mips32
712 -mips32r2
713 -mips64
714 -mips64r2
715 Generate code for a particular MIPS Instruction Set Architecture
716 level. -mips1 is an alias for -march=r3000, -mips2 is an alias for
717 -march=r6000, -mips3 is an alias for -march=r4000 and -mips4 is an
718 alias for -march=r8000. -mips5, -mips32, -mips32r2, -mips64, and
719 -mips64r2 correspond to generic MIPS V, MIPS32, MIPS32 Release 2,
720 MIPS64, and MIPS64 Release 2 ISA processors, respectively.
721
722 -march=CPU
723 Generate code for a particular MIPS cpu.
724
725 -mtune=cpu
726 Schedule and tune for a particular MIPS cpu.
727
728 -mfix7000
729 -mno-fix7000
730 Cause nops to be inserted if the read of the destination register
731 of an mfhi or mflo instruction occurs in the following two
732 instructions.
733
734 -mdebug
735 -no-mdebug
736 Cause stabs-style debugging output to go into an ECOFF-style
737 .mdebug section instead of the standard ELF .stabs sections.
738
739 -mpdr
740 -mno-pdr
741 Control generation of ".pdr" sections.
742
743 -mgp32
744 -mfp32
745 The register sizes are normally inferred from the ISA and ABI, but
746 these flags force a certain group of registers to be treated as 32
747 bits wide at all times. -mgp32 controls the size of general-
748 purpose registers and -mfp32 controls the size of floating-point
749 registers.
750
751 -mips16
752 -no-mips16
753 Generate code for the MIPS 16 processor. This is equivalent to
754 putting ".set mips16" at the start of the assembly file.
755 -no-mips16 turns off this option.
756
757 -msmartmips
758 -mno-smartmips
759 Enables the SmartMIPS extension to the MIPS32 instruction set. This
760 is equivalent to putting ".set smartmips" at the start of the
761 assembly file. -mno-smartmips turns off this option.
762
763 -mips3d
764 -no-mips3d
765 Generate code for the MIPS-3D Application Specific Extension. This
766 tells the assembler to accept MIPS-3D instructions. -no-mips3d
767 turns off this option.
768
769 -mdmx
770 -no-mdmx
771 Generate code for the MDMX Application Specific Extension. This
772 tells the assembler to accept MDMX instructions. -no-mdmx turns
773 off this option.
774
775 -mdsp
776 -mno-dsp
777 Generate code for the DSP Release 1 Application Specific Extension.
778 This tells the assembler to accept DSP Release 1 instructions.
779 -mno-dsp turns off this option.
780
781 -mdspr2
782 -mno-dspr2
783 Generate code for the DSP Release 2 Application Specific Extension.
784 This option implies -mdsp. This tells the assembler to accept DSP
785 Release 2 instructions. -mno-dspr2 turns off this option.
786
787 -mmt
788 -mno-mt
789 Generate code for the MT Application Specific Extension. This
790 tells the assembler to accept MT instructions. -mno-mt turns off
791 this option.
792
793 --construct-floats
794 --no-construct-floats
795 The --no-construct-floats option disables the construction of
796 double width floating point constants by loading the two halves of
797 the value into the two single width floating point registers that
798 make up the double width register. By default --construct-floats
799 is selected, allowing construction of these floating point
800 constants.
801
802 --emulation=name
803 This option causes as to emulate as configured for some other
804 target, in all respects, including output format (choosing between
805 ELF and ECOFF only), handling of pseudo-opcodes which may generate
806 debugging information or store symbol table information, and
807 default endianness. The available configuration names are:
808 mipsecoff, mipself, mipslecoff, mipsbecoff, mipslelf, mipsbelf.
809 The first two do not alter the default endianness from that of the
810 primary target for which the assembler was configured; the others
811 change the default to little- or big-endian as indicated by the b
812 or l in the name. Using -EB or -EL will override the endianness
813 selection in any case.
814
815 This option is currently supported only when the primary target as
816 is configured for is a MIPS ELF or ECOFF target. Furthermore, the
817 primary target or others specified with --enable-targets=... at
818 configuration time must include support for the other format, if
819 both are to be available. For example, the Irix 5 configuration
820 includes support for both.
821
822 Eventually, this option will support more configurations, with more
823 fine-grained control over the assembler's behavior, and will be
824 supported for more processors.
825
826 -nocpp
827 as ignores this option. It is accepted for compatibility with the
828 native tools.
829
830 --trap
831 --no-trap
832 --break
833 --no-break
834 Control how to deal with multiplication overflow and division by
835 zero. --trap or --no-break (which are synonyms) take a trap
836 exception (and only work for Instruction Set Architecture level 2
837 and higher); --break or --no-trap (also synonyms, and the default)
838 take a break exception.
839
840 -n When this option is used, as will issue a warning every time it
841 generates a nop instruction from a macro.
842
843 The following options are available when as is configured for an MCore
844 processor.
845
846 -jsri2bsr
847 -nojsri2bsr
848 Enable or disable the JSRI to BSR transformation. By default this
849 is enabled. The command line option -nojsri2bsr can be used to
850 disable it.
851
852 -sifilter
853 -nosifilter
854 Enable or disable the silicon filter behaviour. By default this is
855 disabled. The default can be overridden by the -sifilter command
856 line option.
857
858 -relax
859 Alter jump instructions for long displacements.
860
861 -mcpu=[210|340]
862 Select the cpu type on the target hardware. This controls which
863 instructions can be assembled.
864
865 -EB Assemble for a big endian target.
866
867 -EL Assemble for a little endian target.
868
869 See the info pages for documentation of the MMIX-specific options.
870
871 See the info pages for documentation of the RX-specific options.
872
873 The following options are available when as is configured for the s390
874 processor family.
875
876 -m31
877 -m64
878 Select the word size, either 31/32 bits or 64 bits.
879
880 -mesa
881 -mzarch
882 Select the architecture mode, either the Enterprise System
883 Architecture (esa) or the z/Architecture mode (zarch).
884
885 -march=processor
886 Specify which s390 processor variant is the target, g6, g6, z900,
887 z990, z9-109, z9-ec, or z10.
888
889 -mregnames
890 -mno-regnames
891 Allow or disallow symbolic names for registers.
892
893 -mwarn-areg-zero
894 Warn whenever the operand for a base or index register has been
895 specified but evaluates to zero.
896
897 The following options are available when as is configured for a
898 TMS320C6000 processor.
899
900 -march=arch
901 Enable (only) instructions from architecture arch. By default, all
902 instructions are permitted.
903
904 The following values of arch are accepted: "c62x", "c64x", "c64x+",
905 "c67x", "c67x+", "c674x".
906
907 -matomic
908 -mno-atomic
909 Enable or disable the optional C64x+ atomic operation instructions.
910 By default, they are enabled if no -march option is given, or if an
911 architecture is specified with -march that implies these
912 instructions are present (currently, there are no such
913 architectures); they are disabled if an architecture is specified
914 with -march on which the instructions are optional or not present.
915 This option overrides such a default from the architecture,
916 independent of the order in which the -march or -matomic or
917 -mno-atomic options are passed.
918
919 -mdsbt
920 -mno-dsbt
921 The -mdsbt option causes the assembler to generate the
922 "Tag_ABI_DSBT" attribute with a value of 1, indicating that the
923 code is using DSBT addressing. The -mno-dsbt option, the default,
924 causes the tag to have a value of 0, indicating that the code does
925 not use DSBT addressing. The linker will emit a warning if objects
926 of different type (DSBT and non-DSBT) are linked together.
927
928 -mpid=no
929 -mpid=near
930 -mpid=far
931 The -mpid= option causes the assembler to generate the
932 "Tag_ABI_PID" attribute with a value indicating the form of data
933 addressing used by the code. -mpid=no, the default, indicates
934 position-dependent data addressing, -mpid=near indicates position-
935 independent addressing with GOT accesses using near DP addressing,
936 and -mpid=far indicates position-independent addressing with GOT
937 accesses using far DP addressing. The linker will emit a warning
938 if objects built with different settings of this option are linked
939 together.
940
941 -mpic
942 -mno-pic
943 The -mpic option causes the assembler to generate the "Tag_ABI_PIC"
944 attribute with a value of 1, indicating that the code is using
945 position-independent code addressing, The "-mno-pic" option, the
946 default, causes the tag to have a value of 0, indicating position-
947 dependent code addressing. The linker will emit a warning if
948 objects of different type (position-dependent and position-
949 independent) are linked together.
950
951 -mbig-endian
952 -mlittle-endian
953 Generate code for the specified endianness. The default is little-
954 endian.
955
956 The following options are available when as is configured for an Xtensa
957 processor.
958
959 --text-section-literals | --no-text-section-literals
960 With --text-section-literals, literal pools are interspersed in the
961 text section. The default is --no-text-section-literals, which
962 places literals in a separate section in the output file. These
963 options only affect literals referenced via PC-relative "L32R"
964 instructions; literals for absolute mode "L32R" instructions are
965 handled separately.
966
967 --absolute-literals | --no-absolute-literals
968 Indicate to the assembler whether "L32R" instructions use absolute
969 or PC-relative addressing. The default is to assume absolute
970 addressing if the Xtensa processor includes the absolute "L32R"
971 addressing option. Otherwise, only the PC-relative "L32R" mode can
972 be used.
973
974 --target-align | --no-target-align
975 Enable or disable automatic alignment to reduce branch penalties at
976 the expense of some code density. The default is --target-align.
977
978 --longcalls | --no-longcalls
979 Enable or disable transformation of call instructions to allow
980 calls across a greater range of addresses. The default is
981 --no-longcalls.
982
983 --transform | --no-transform
984 Enable or disable all assembler transformations of Xtensa
985 instructions. The default is --transform; --no-transform should be
986 used only in the rare cases when the instructions must be exactly
987 as specified in the assembly source.
988
989 --rename-section oldname=newname
990 When generating output sections, rename the oldname section to
991 newname.
992
993 The following options are available when as is configured for a Z80
994 family processor.
995
996 -z80
997 Assemble for Z80 processor.
998
999 -r800
1000 Assemble for R800 processor.
1001
1002 -ignore-undocumented-instructions
1003 -Wnud
1004 Assemble undocumented Z80 instructions that also work on R800
1005 without warning.
1006
1007 -ignore-unportable-instructions
1008 -Wnup
1009 Assemble all undocumented Z80 instructions without warning.
1010
1011 -warn-undocumented-instructions
1012 -Wud
1013 Issue a warning for undocumented Z80 instructions that also work on
1014 R800.
1015
1016 -warn-unportable-instructions
1017 -Wup
1018 Issue a warning for undocumented Z80 instructions that do not work
1019 on R800.
1020
1021 -forbid-undocumented-instructions
1022 -Fud
1023 Treat all undocumented instructions as errors.
1024
1025 -forbid-unportable-instructions
1026 -Fup
1027 Treat undocumented Z80 instructions that do not work on R800 as
1028 errors.
1029
1031 gcc(1), ld(1), and the Info entries for binutils and ld.
1032
1034 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1035 2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010 Free Software
1036 Foundation, Inc.
1037
1038 Permission is granted to copy, distribute and/or modify this document
1039 under the terms of the GNU Free Documentation License, Version 1.3 or
1040 any later version published by the Free Software Foundation; with no
1041 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
1042 Texts. A copy of the license is included in the section entitled "GNU
1043 Free Documentation License".
1044
1045
1046
1047binutils-2.21 2010-12-08 AS(1)