Previous: Sparc-Float, Up: Sparc-Dependent


9.42.5 Sparc Machine Directives

The Sparc version of as supports the following additional machine directives:

.align
This must be followed by the desired alignment in bytes.


.common
This must be followed by a symbol name, a positive number, and "bss". This behaves somewhat like .comm, but the syntax is different.


.half
This is functionally identical to .short.


.nword
On the Sparc, the .nword directive produces native word sized value, ie. if assembling with -32 it is equivalent to .word, if assembling with -64 it is equivalent to .xword.


.proc
This directive is ignored. Any text following it on the same line is also ignored.


.register
This directive declares use of a global application or system register. It must be followed by a register name %g2, %g3, %g6 or %g7, comma and the symbol name for that register. If symbol name is #scratch, it is a scratch register, if it is #ignore, it just suppresses any errors about using undeclared global register, but does not emit any information about it into the object file. This can be useful e.g. if you save the register before use and restore it after.


.reserve
This must be followed by a symbol name, a positive number, and "bss". This behaves somewhat like .lcomm, but the syntax is different.


.seg
This must be followed by "text", "data", or "data1". It behaves like .text, .data, or .data 1.


.skip
This is functionally identical to the .space directive.


.word
On the Sparc, the .word directive produces 32 bit values, instead of the 16 bit values it produces on many other machines.


.xword
On the Sparc V9 processor, the .xword directive produces 64 bit values.