for the HPPA supports many additional directives for compatibility with the native assembler. This section describes them only briefly. For detailed information on HPPA-specific assembler directives, see HP9000 Series 800 Assembly Language Reference Manual
.endm .liston .enter .locct .leave .macro .listoff
Beyond those implemented for compatibility,
supports one additional assembler directive for the HPPA:
. It conveys register argument locations for static functions. Its syntax closely follows the
, ... ] [flag
, ... ]
param may be any of ‘ frame ’ (frame size), ‘ entry_gr ’ (end of general register range), ‘ entry_fr ’ (end of float register range), ‘ entry_sr ’ (end of space register range).
The values for flag
’ or ‘
’ (proc has subroutines), ‘
’ (proc does not call subroutines), ‘
’ (preserve return pointer), ‘
’ (proc preserves stack pointer), ‘
’ (do not unwind this proc), ‘
’ (proc is interrupt routine).
] [ ,param
, if present, provides either relocation information for the procedure arguments and result, or a privilege level. param
may be ‘
’ (where n
, and indicates one of four one-word arguments); ‘
’ (the procedure's result); or ‘
’ (privilege level). For arguments or the result, r
specifies how to relocate, and must be one of ‘
’ (not relocatable), ‘
’ (argument is in general register), ‘
’ (in floating point register), or ‘
’ (upper half of float register). For ‘
is an integer.
.export; make a procedure available to call. The arguments use the same conventions as the first two arguments for
] [ ,param
.export, but used for static procedures.
.equ; define label with the absolute expression expr as its value.
If specified, the list params
declares attributes of the section, identified by keywords. The keywords recognized are ‘
’ (identify this section by the number exp
, an absolute expression), ‘
’ (order sections according to this sort key when linking; exp
is an absolute expression), ‘
’ (section contains no loadable data), ‘
’ (this section defined elsewhere), and ‘
’ (data in this section not available to other programs).
The HPPA version of
differs from the usual
definition: it does not
write a zero byte after copying str
.string, but appends a zero byte after copying str to object file.
.space, but selects a subsection name within the current section. You may only specify params when you create a subsection (in the first instance of
.subspafor this name ).
If specified, the list params declares attributes of the subsection, identified by keywords. The keywords recognized are ‘ quad= expr ’ (“quadrant” for this subsection), ‘ align= expr ’ (alignment for beginning of this subsection; a power of two), ‘ access= expr ’ (value for “access rights” field), ‘ sort= expr ’ (sorting order for this subspace in link), ‘ code_only ’ (subsection contains only code), ‘ unloadable ’ (subsection cannot be loaded into memory), ‘ comdat ’ (subsection is comdat), ‘ common ’ (subsection is common block), ‘ dup_comm ’ (subsection may have duplicate names), or ‘ zero ’ (subsection is all zeros, do not write in object file).
always creates a new subspace with the given name, even if one with the same name already exists.
‘ comdat ’, ‘ common ’ and ‘ dup_comm ’ can be used to implement various flavors of one-only support when using the SOM linker. The SOM linker only supports specific combinations of these flags. The details are not documented. A brief description is provided here.
‘ comdat ’ provides a form of linkonce support. It is useful for both code and data subspaces. A ‘ comdat ’ subspace has a key symbol marked by the ‘ is_comdat ’ flag or ‘ ST_COMDAT ’. Only the first subspace for any given key is selected. The key symbol becomes universal in shared links. This is similar to the behavior of ‘ secondary_def ’ symbols.
‘ common ’ provides Fortran named common support. It is only useful for data subspaces. Symbols with the flag ‘ is_common ’ retain this flag in shared links. Referencing a ‘ is_common ’ symbol in a shared library from outside the library doesn't work. Thus, ‘ is_common ’ symbols must be output whenever they are needed.
‘ common ’ and ‘ dup_comm ’ together provide Cobol common support. The subspaces in this case must all be the same length. Otherwise, this support is similar to the Fortran common support.
‘ dup_comm ’ by itself provides a type of one-only support for code. Only the first ‘ dup_comm ’ subspace is selected. There is a rather complex algorithm to compare subspaces. Code symbols marked with the ‘ dup_common ’ flag are hidden. This support was intended for "C++ duplicate inlines".
A simplified technique is used to mark the flags of symbols based on the flags of their subspace. A symbol with the scope SS_UNIVERSAL and type ST_ENTRY, ST_CODE or ST_DATA is marked with the corresponding settings of ‘
’ and ‘
’ from the subspace, respectively. This avoids having to introduce additional directives to mark these symbols. The HP assembler sets ‘
’ from ‘
’. However, it doesn't set the ‘
’ from ‘
’. It doesn't have ‘