Index Index for
Section 1
Index Alphabetical
listing for A
Bottom of page Bottom of
page

as(1)

NAME

as - assembler

SYNOPSIS

as [option]... file

OPTIONS

Options described in this section are divided into the following categories. · Options Common to as and cc (see cc(1) for complete information) · Options Specific to as · Assembler Development Options (not generally used) Options Common to as and cc -g0 Produce no symbol table information for symbolic debugging. This is the default. -g1 Produce additional symbol table information for accurate but limited symbolic debugging of partially optimized code. -g or -g2 Produce additional symbol table information for full symbolic debugging and not do optimizations that limit full symbolic debugging. -[no]pg Turns gprof profiling on or off when assembling and linking the file immediately following this option. The gprof profiler produces a call graph showing the execution of a C program. When this option is turned on, the standard run-time startup routine is replaced by the gcrt0.o routine. Programs that are linked with the -pg option and then run will produce, in file gmon.out, a dynamic call graph and profile. You then run gprof on the gmon.out file to display the output. When you use the -pg option together with either the -pthread option or the -threads option, the profiling library libprof1_r.a is used. For more information, see the gprof(1) reference page. -compress Produce a compressed object as output. -O0 Performs no optimization. -O1 Runs the instruction scheduler. -w[n] Controls the display of messages as well as the actions that occur as a result of the messages. The value of n can be one of the following: 0 Displays assembler messages for less important issues. 1 Suppresses warning and informational messages and displays error and fatal messages. This is equivalent to specifying -w. 2 If the assembler encounters an error that generates a warning-level diagnostic message, the assembler displays the message and then aborts. 3 Does not print warning messages. However, when warnings occur, exits with nonzero status. -P Run only the C macro preprocessor and put the result in a file with the suffix of the source file changed to .i or if the file has no suffix then a i is added to the source file name. The .i file has no # lines in it. This sets the -cpp option. -E Run only the C macro preprocessor on the file and send the result to the standard output. This sets the -cpp option. -C or -M or -Q These three options are passed directly to cpp(1). See cpp(1) for details. -eflag number Set the default exception handling runtime procedure descriptor flags (see <pdsc.h>) to the number specified. If you provide a .eflag directive in a procedure in your source code, the -eflag option is ignored for that procedure. -o output Name the final output file output. If this option is used, the file a.out is undisturbed. -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". -Uname Remove any initial definition of name. -I dir The #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). -v Print the passes as they execute with their arguments and their input and output files. -V Print the version of the driver and the versions of all passes. This is done with the what(1) command. -[no]cpp Determines whether to run the C macro preprocessor on assembly source files before assembling. The default is -cpp. -arch option Specifies which version of the Alpha architecture to generate instructions for. All Alpha processors implement a core set of instructions and, in some cases, the following extensions: BWX (byte/word-manipulation extension), MVI (multimedia extension), FIX (square root and floating-point convert extension), and CIX (count extension). (The Alpha Architecture Reference Manual describes the extensions in detail.) The option argument can be one of the following, which determines the instructions that the assembler can generate (for details, see cc(1)): generic Generate instructions that are appropriate for all Alpha processors. This option is the default. host Generate instructions for the processor that the assembler is running on (for example, EV6 instructions on an EV6 processor). ev4 ev5 ev56 ev6 ev67 pca56 -tune option Instructs the optimizer to tune the application for a specific version of the Alpha hardware. This will not prevent the application from running correctly on other versions of Alpha but it may run more slowly than generically-tuned code on those versions. The option argument can be one of the following, which selects instruction tuning appropriate for the listed processor(s) (for details, see cc(1)): generic Tune instructions for all Alpha processors. This is the default. host Tune instructions for the processor on which the code is assembeled. ev4 ev5 ev56 ev6 ev67 pca56 See also the -arch option in cc(1) for an explanation of the differences between -tune and -arch. Options Specific to as -no_const_opts When specified with optimization (the default, unless -O0 is specified), the register manager will not attempt to perform any register optimizations involving float or integer constants. -no_reg_mgr When specified with optimization (the default, unless -O0 is specified), stops all register manager optimizations from being performed by the assembler. Assembler Development Options The options described below primarily aid assembler development and are not generally used: -Wc[c...],arg1,[arg2...] Pass the argument[s] argi to the assembler pass[es] c[c..]. The c can be one of [ pab]. The c selects the assembler pass in the same way as the -t option. The options -t[ hpa], -h path, 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. Therefore, the -B option is always required when using -h or -t. Sets of these options can be used to select any combination of names. -t[ hpa] 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 (see note following table) cpp p adu a ______________________________________ If the character `h' is in the -t argument, a directory is added to the list of directories to be used in searching for #include files. This directory name has the form COMP_TARGET_ROOT/usr/include/string. This directory is to contain the include files for the string release of the assembler. The standard directory is still searched. For compatibility, -tb is equivalent to -ta -hpath Use path rather than the directory where the name is normally found. -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. Invoking the assembler with a name of the form asstring has the same effect as using a -Bstring option on the command line. If the environment variable COMP_HOST_ROOT is set, the value is used as the root directory for all paths to the pass names other than the default root directory ( /). If the environment variable COMP_TARGET_ROOT is set, the value is used as the root directory for the #include files other than the default root directory (/). If the environment variable ROOTDIR is set, the value is used as the root directory for all names rather than the default /usr/. This also affects the standard directory for #include files, /usr/include. If the environment variable TMPDIR is set, the value is used as the directory to place any temporary files rather than the default /tmp/. Other arguments are ignored.

DESCRIPTION

The assembler, as, produces object code files in extended coff format. The as command never runs the link editor (ld(1)). The as command accepts one type of argument. The argument file is assumed to be a symbolic assembly language source program. It is assembled, producing an object file. The assembler always defines the C preprocessor macros unix, and LANGUAGE_ASSEMBLY to the C macro preprocessor. To see a list of predefined macros, use the -v option.

ERRORS

The diagnostics produced by the assembler are intended to be self- explanatory.

FILES

file.o object file a.out assembler output /tmp/ctm? temporary /usr/lib/cpp C macro preprocessor /usr/lib/cmplrs/cc/adu assembly source file to extended COFF object file translator /usr/include standard directory for #include files

SEE ALSO

Commands: cc(1), what(1) Programmer's Guide, Assembly Language Programmer's Guide

Index Index for
Section 1
Index Alphabetical
listing for A
Top of page Top of
page