Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

Previous Previous     Contents     Index     Next Next
Appendix A

Pseudo-Operations

The pseudo-operations listed in this appendix are supported by the SPARC assembler.

A.1 Alphabetized Listing with Descriptions

 

.alias

Turns off the effect of the preceding .noalias pseudo-op. (Compiler-generated only.)

 

.align boundary

Aligns the location counter on a boundary where (("location counter" mod boundary)==0); boundary may be any power of 2.

 

.ascii string [, string"]

Generates the given sequence(s) of ASCII characters.

 

.asciz string [, string]*

Generates the given sequence(s) of ASCII characters. This pseudo-op appends a null (zero) byte to each string.

 

.byte 8bitval [, 8bitval]*

Generates (a sequence of) initialized bytes in the current segment.

 

.common symbol, size [, sect_name] [, alignment]

Provides a tentative definition of symbol. Size bytes are allocated for the object represented by symbol.

  • If the symbol is not defined in the input file and is declared to be local to the file, the symbol is allocated in sect_name and its location is optionally aligned to a multiple of alignment. If sect_name is not given, the symbol is allocated in the uninitialized data section (bss). Currently, only .bss is supported for the section name. (.data is not currently supported.)

  • If the symbol is not defined in the input file and is declared to be global, the SPARC link editor allocates storage for the symbol, depending on the definition of symbol_name in other files. Global is the default binding for common symbols.

  • If the symbol is defined in the input file, the definition specifies the location of the symbol and the tentative definition is overridden.

 

.double 0rfloatval [, 0rfloatval]*

Generates (a sequence of) initialized double-precision floating-point values in the current segment. floatval is a string acceptable to atof(3); that is, an optional sign followed by a non-empty string of digits with optional decimal point and optional exponent.

 

.empty

Suppresses assembler complaints about the next instruction presence in a delay slot when used in the delay slot of a Control Transfer Instruction (CTI).

Some instructions should not be in the delay slot of a CTI. See the SPARC Architecture Manual for details.

 

.file string

Creates a symbol table entry where string is the symbol name and STT_FILE is the symbol table type. string specifies the name of the source file associated with the object file.

 

.global symbol [, symbol]* .globl symbol [, symbol]*

Declares each symbol in the list to be global; that is, each symbol is either defined externally or defined in the input file and accessible in other files; default bindings for the symbol are overridden.

  • A global symbol definition in one file will satisfy an undefined reference to the same global symbol in another file.

  • Multiple definitions of a defined global symbol is not allowed. If a defined global symbol has more than one definition, an error will occur.

  • A global psuedo-op oes not need to occur before a definition, or tentative definition, of the specified symbol.


Note - This pseudo-op by itself does not define the symbol.


 

.half 16bitval [, 16bitval]*

Generates (a sequence of) initialized halfwords in the current segment. The location counter must already be aligned on a halfword boundary (use .align 2).

 

.ident string

Generates the null terminated string in a comment section. This operation is equivalent to:

.pushsection .comment

.asciz string

.popsection 

 

.local symbol [, symbol]*

Declares each symbol in the list to be local; that is, each symbol is defined in the input file and not accessible in other files; default bindings for the symbol are overridden. These symbols take precedence over weak and global symbols.

Since local symbols are not accessible to other files, local symbols of the same name may exist in multiple files.


Note - This pseudo-op by itself does not define the symbol.


 

.noalias %reg1, %reg2

%reg1 and %reg2 will not alias each other (that is, point to the same destination) until a .alias pseudo-op is issued. (Compiler-generated only.)

 

.nonvolatile

Defines the end of a block of instruction. The instructions in the block may not be permuted. This pseudo-op has no effect if:

  • The block of instruction has been previously terminated by a Control Transfer Instruction (CTI) or a label

  • There is no preceding .volatile pseudo-op

 

.nword 64bitval [, 64bitval]*

If -xarch=v8/v8plus then assembler interprets the instruction as .word. If -xarch=v9 the assembler interprets the instruction as .xword.

 

.optim string

This pseudo-op changes the optimization level of a particular function. (Compiler-generated only.)

 

.popsection

Removes the top section from the section stack. The new section on the top of the stack becomes the current section. This pseudo-op and its corresponding .pushsection command allow you to switch back and forth between the named sections.

 

.proc n

Signals the beginning of a procedure (that is, a unit of optimization) to the peephole optimizer in the SPARC assembler; n specifies which registers will contain the return value upon return from the procedure. (Compiler-generated only.)

 

.pushsection sect_name [, attributes]

Moves the named section to the top of the section stack. This new top section then becomes the current section. This pseudo-op and its corresponding .popsection command allow you to switch back and forth between the named sections.

 

.quad 0rfloatval [, 0rfloatval]*

Generates (a sequence of) initialized quad-precision floating-point values in the current segment. floatval is a string acceptable to atof(3); that is, an optional sign followed by a non-empty string of digits with optional decimal point and optional exponent.


Note - The .quad command currently generates quad-precision values with only double-precision significance.


 

.reserve symbol, size [, sect_name [, alignment]]

Defines symbol, and reserves size bytes of space for it in the sect_name. This operation is equivalent to:

	.pushsection	 sect_name

	.align	 alignment
symbol:

	.skip 	 size

	.popsection 

If a section is not specified, space is reserved in the current segment.

Previous Previous     Contents     Index     Next Next
 

Updated: 2003-09-30, 01:22