as(1)
as - SGI MIPSpro Assembler
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME as - SGI MIPSpro Assembler SYNOPSIS as [ -o32 | -n32 | -64 ] [ option ] ... file ... DESCRIPTION as is the SGI assembler. It assembles a symbolic assembly language source program, producing an object file in elf format. The SGI assembler support three different Application Binary Interfaces controlled by the options -o32 , -n32 , and -64 (see abi(5) ) As never runs the loader. as always defines the preprocessor symbols: _LANGUAGE_ASSEMBLY, __sgi, __mips, __host_mips, __unix, _MIPSEB, _SYSTYPE_SVR4, _SVR4_SOURCE, _SGI_SOURCE, _MIPS_ISA, _MIPS_SIM, _MIPS_FPSET, _MIPS_SZINT, _MIPS_SZLONG, and _MIPS_SZPTR. These are shown by the -show option to as(1). The C preprocessor adds other standard definitions of its own (see cpp(1)). The following options are interpreted by as and have the same meaning in cc(1). See ld(1) for load-time options. Commandline Options This first set of options control the choice of ABI and ISA (Instruction Set Architecture). -o32 or -32 Generate a 32-bit object. This is the default on all systems that are not based on the R8000. This implies -mips2 if -mips1 has not been specified. -64 Generate a 64-bit object. This is the default on R8000 systems. This implies -mips4 if -mips3 has not been specified. -n32 Generate an n32 object. This implies -mips3 if -mips4 has not been specified. -mips1 Generate code using the instruction set of the R3000 RISC architecture. This implies -o32. -mips2 Generate code using the MIPS II instruction set (MIPS I + some R4000 specific extensions). This implies -o32. -mips3 Generate code using the full R4000 instruction set. This implies -n32 (except on R8000-based systems it implies -64) -mips4 Generate code using the full MIPS IV instruction set (64-bit R8000 extensions). This implies -n32 (except on R8000-based systems it implies -64) Options valid in all three ABI's. -cpp Run the C macro preprocessor on assembly source files before compiling. This is the default. -Dname=def -Dname Define the name to the C macro preprocessor, as if by `#define'. If no definition is given, the name is defined as "1". -E Run only the C macro preprocessor on the specified assembly source files, and send the result to the standard output. -G num Specify the maximum size, in bytes, of a data item that is to be accessed from the global pointer. Num is assumed to be a decimal number. If num is zero, no data is accessed from the global pointer. The default value for num is 8 bytes when using -64 or -n32. The default value for num is 0 when using -o32. -g0 Have the assembler produce no symbol table information for symbolic debugging. -g Have the assembler produce additional symbol table information for full symbolic debugging. This is the default. -Idir `#include' files whose names do not begin with `/' are always sought first in the directory of the file argument, then in directories specified in -I options, and finally in the standard directory (/usr/include). -I This option will cause `#include' files never to be searched for in the standard directory (/usr/include). -keep Build and use intermediate file names with the last component of the source file's name replacing its suffix with the conventional suffix for the type of file (for example `.i' file for preprocessed source). These intermediate files are not removed. This option is primarily for compiler debugging. -nocpp Do not run the C macro preprocessor on assembly source before compiling. -non_shared Don't generate position-independent code (PIC). -O0 Turn off all optimizations. This is the default for -64 or -n32. -O1 Turn on all optimizations that can be done easily. This is the default for -o32. -O or -O2 Turn on all optimizations. For -64 or -n32 this just means scheduling the code; for -o32 this also means more aggressive optimizations. -o output Name the final output file output. If this option is not used, the output file is the input file name with a `.o' suffix rather than the `.s' suffix. -P Run only the C macro preprocessor and put the result for each `.s' file in a corresponding `.i' file. The `.i' file has no `#' lines in it. -show Print the passes as they execute with their arguments and their input and output files. -Uname Remove any initial definition of name. Commandline Options (-n32 or -64 only) -help This will not run the assembler, but will list all the available options. -woff all Suppress all warning messages. The options described below primarily aid compiler development and are not generally used: -Wa,arg1[,arg2...] Pass the argument[s] argi to the assembler pass. The commas between the arguments are translated into spaces. -Ya,directory Use the asm pass from the given directory. Commandline Options (-o32 only) The options described below primarily aid compiler development and are not generally used: -fullasopt Enable all the global optimizations done by the assembler. The assembler can perform several global optimizations that are enabled automatically for high level languages like C, Pascal and Fortran. These optimizations are turned off by default while compiling an assembly language source file. This is done because the optimizations rely on the procedure calling convention to be strictly followed. Several assembly language programs violate these restrictions. The -fullasopt option allows enabling of these optimizations for .s files. -Hc Halt compiling after the pass specified by the character c, producing an intermediate file for the next pass. The c can be [ a ]. It selects the assembler pass in the same way as the -t option. If this option is used, the symbol table file produced and used by the passes,is the last component of the source file with the suffix changed to `.T' and is not removed. Please note that this switch is non-standard and may not be supported across product lines. -KPIC Activates the assembler directives for generating position- independent code (PIC). This is the default. The options -t[hpab], -hpath, and -Bstring select a name to use for a particular pass. These arguments are processed from left to right so their order is significant. When the -B option is encountered, the selection of names takes place using the last -h and -t options. These three options must be used together. -t[hpab] Select the names. The names selected are those designated by the characters following the -t option according to the following table: Name Character include h cpp p as0 a as1 b If the character `h' is in the -t argument then a directory is added to the list of directories to be used in searching for `#include' files. This directory name has the form /usr/includestring. This directory is to contain the include files for the string release of the compiler. The standard directory is still searched. -hpath Use path rather than the directory where the name is normally found. Please note that this switch is non-standard and may not be supported across product lines. -Bstring Append string to all names specified by the -t option. If no -t option has been processed before the -B, the -t option is assumed to be ``hpab''. This list designates all names. -Wc,arg1[,arg2...] Pass the argument[s] argi to the assembler pass c. The c is one of [ pab ]. The c selects the assembler pass in the same way as the -t option. Of particular interest are several options to affect the various optimizations done by the assembler. Most of these assembler optimizations are fairly new and so are perhaps more likely to have problems than other parts of the compiler: -Wb,-noxbb Turn off cross basic block instruction scheduling. -Wb,-nopeep Turn off peephole optimizations. -Wb,-noswpipe Turn off software pipelining. -Wb,-nosymregs Turn off symbolic register renaming. Note: these global optimizations are enabled only when optimization level -O2 or higher is selected for high level languages or the -fullasopt option is used for assembly language files. If the environment variable TMPDIR is set, the value is used as the directory to place any temporary files rather than the default /tmp. FILES file.o object file output /usr/include standard `#include' file directory (-o32 ONLY) /tmp/ctm* temporary files /usr/lib/cpp C macro preprocessor /usr/lib/as0 symbolic assembly language translator /usr/lib/as1 binary assembler and reorganizer (-n32 and -64 ONLY) /tmp/cmplr* temporary files /usr/lib32/cmplrs/cpp C macro preprocessor /usr/lib32/cmplrs/asm symbolic assembler BUGS The assembler attempts to continue after finding semantic errors. These errors may result in internal errors. SEE ALSO MIPSpro Assembly Language Programmer's Guide, MIPSpro N32 ABI Guide, MIPSpro 64-bit Porting and Transition Guide, cc(1), what(1), getabi(3c) DIAGNOSTICS The diagnostics produced by the assembler are intended to be self- explanatory. NOTES: The environment variable SGI_ABI can be used to change the default ABI behavior to be -o32 , -n32 , or -64 ; see getabi(3c). Also, the /etc/compiler.defaults file can be used to change default behavior. See the cc(1) man page for more information. The environment variables COMP_TARGET_ROOT, TOOLROOT, RLS_ID_OBJECT are used by as while compiling the compiler itself. Their meaning is left undefined intentionally. They should not be set in your environment.