[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
1.1 Notes | ||
1.2 Options | ||
1.3 Syntax | ||
1.4 Floating Point | ||
1.5 HPPA Assembler Directives | HPPA Machine Directives | |
1.6 Opcodes |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
As a back end for GNU CC {No value for `AS'}
has been throughly tested and should
work extremely well. We have tested it only minimally on hand written assembly
code and no one has tested it much on the assembly output from the HP
compilers.
The format of the debugging sections has changed since the original
{No value for `AS'}
port (version 1.3X) was released; therefore,
you must rebuild all HPPA objects and libraries with the new
assembler so that you can debug the final executable.
The HPPA {No value for `AS'}
port generates a small subset of the relocations
available in the SOM and ELF object file formats. Additional relocation
support will be added as it becomes necessary.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
{No value for `AS'}
has no machine-dependent command-line options for the HPPA.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The assembler syntax closely follows the HPPA instruction set reference manual; assembler directives and general syntax closely follow the HPPA assembly language reference manual, with a few noteworthy differences.
First, a colon may immediately follow a label definition. This is simply for compatibility with how most assembly language programmers write code.
Some obscure expression parsing problems may affect hand written code which
uses the spop
instructions, or code which makes significant
use of the !
line separator.
{No value for `AS'}
is much less forgiving about missing arguments and other
similar oversights than the HP assembler. {No value for `AS'}
notifies you
of missing arguments as syntax errors; this is regarded as a feature, not a
bug.
Finally, {No value for `AS'}
allows you to use an external symbol without
explicitly importing the symbol. Warning: in the future this will be
an error for HPPA targets.
Special characters for HPPA targets include:
‘;’ is the line comment character.
‘!’ can be used instead of a newline to separate statements.
Since ‘$’ has no special meaning, you may use it in symbol names.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The HPPA family uses IEEE floating-point numbers.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
{No value for `AS'}
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 (HP 92432-90001).
{No value for `AS'}
does not support the following assembler directives
described in the HP manual:
.endm .liston .enter .locct .leave .macro .listoff
Beyond those implemented for compatibility, {No value for `AS'}
supports one
additional assembler directive for the HPPA: .param
. It conveys
register argument locations for static functions. Its syntax closely follows
the .export
directive.
These are the additional directives in {No value for `AS'}
for the HPPA:
.block n
.blockz n
Reserve n bytes of storage, and initialize them to zero.
.call
Mark the beginning of a procedure call. Only the special case with no arguments is allowed.
.callinfo [ param=value, … ] [ flag, … ]
Specify a number of parameters and flags that define the environment for a procedure.
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 are ‘calls’ or ‘caller’ (proc has subroutines), ‘no_calls’ (proc does not call subroutines), ‘save_rp’ (preserve return pointer), ‘save_sp’ (proc preserves stack pointer), ‘no_unwind’ (do not unwind this proc), ‘hpux_int’ (proc is interrupt routine).
.code
Assemble into the standard section called ‘$TEXT$’, subsection ‘$CODE$’.
.enter
Not yet supported; the assembler rejects programs containing this directive.
.entry
Mark the beginning of a procedure.
.exit
Mark the end of a procedure.
.export name [ ,typ ] [ ,param=r ]
Make a procedure name available to callers. typ, if present, must be one of ‘absolute’, ‘code’ (ELF only, not SOM), ‘data’, ‘entry’, ‘data’, ‘entry’, ‘millicode’, ‘plabel’, ‘pri_prog’, or ‘sec_prog’.
param, if present, provides either relocation information for the
procedure arguments and result, or a privilege level. param may be
‘argwn’ (where n ranges from 0
to 3
, and
indicates one of four one-word arguments); ‘rtnval’ (the procedure’s
result); or ‘priv_lev’ (privilege level). For arguments or the result,
r specifies how to relocate, and must be one of ‘no’ (not
relocatable), ‘gr’ (argument is in general register), ‘fr’ (in
floating point register), or ‘fu’ (upper half of float register).
For ‘priv_lev’, r is an integer.
.half n
Define a two-byte integer constant n; synonym for the portable
{No value for `AS'}
directive .short
.
.import name [ ,typ ]
Converse of .export
; make a procedure available to call. The arguments
use the same conventions as the first two arguments for .export
.
.label name
Define name as a label for the current assembly location.
.leave
Not yet supported; the assembler rejects programs containing this directive.
.origin lc
Advance location counter to lc. Synonym for the {No value for `as'}
portable directive .org
.
.param name [ ,typ ] [ ,param=r ]
Similar to .export
, but used for static procedures.
.proc
Use preceding the first statement of a procedure.
.procend
Use following the last statement of a procedure.
label .reg expr
Synonym for .equ
; define label with the absolute expression
expr as its value.
.space secname [ ,params ]
Switch to section secname, creating a new section by that name if necessary. You may only use params when creating a new section, not when switching to an existing one. secname may identify a section by number rather than by name.
If specified, the list params declares attributes of the section, identified by keywords. The keywords recognized are ‘spnum=exp’ (identify this section by the number exp, an absolute expression), ‘sort=exp’ (order sections according to this sort key when linking; exp is an absolute expression), ‘unloadable’ (section contains no loadable data), ‘notdefined’ (this section defined elsewhere), and ‘private’ (data in this section not available to other programs).
.spnum secnam
Allocate four bytes of storage, and initialize them with the section number of
the section named secnam. (You can define the section number with the
HPPA .space
directive.)
.string "str"
Copy the characters in the string str to the object file.
@xref{Strings,,Strings}, for information on escape sequences you can use in
{No value for `AS'}
strings.
Warning! The HPPA version of .string
differs from the
usual {No value for `AS'}
definition: it does not write a zero byte
after copying str.
.stringz "str"
Like .string
, but appends a zero byte after copying str to object
file.
.subspa name [ ,params ]
.nsubspa name [ ,params ]
Similar to .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 .subspa
for 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), ‘common’ (subsection is common block), ‘dup_comm’ (initialized data may have duplicate names), or ‘zero’ (subsection is all zeros, do not write in object file).
.nsubspa
always creates a new subspace with the given name, even
if one with the same name already exists.
.version "str"
Write str as version identifier in object code.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For detailed information on the HPPA machine instruction set, see PA-RISC Architecture and Instruction Set Reference Manual (HP 09740-90039).
[Top] | [Contents] | [Index] | [ ? ] |
This document was generated on January 15, 2023 using texi2html 5.0.
The buttons in the navigation panels have the following meaning:
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ << ] | FastBack | Beginning of this chapter or previous chapter | 1 |
[ < ] | Back | Previous section in reading order | 1.2.2 |
[ Up ] | Up | Up section | 1.2 |
[ > ] | Forward | Next section in reading order | 1.2.4 |
[ >> ] | FastForward | Next chapter | 2 |
[Top] | Top | Cover (top) of document | |
[Contents] | Contents | Table of contents | |
[Index] | Index | Index | |
[ ? ] | About | About (help) |
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
This document was generated on January 15, 2023 using texi2html 5.0.