home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / binutils-2.7-src.tgz / tar.out / fsf / binutils / gas / doc / as.info-3 (.txt) < prev    next >
GNU Info File  |  1996-09-28  |  50KB  |  1,040 lines

  1. This is Info file as.info, produced by Makeinfo-1.55 from the input
  2. file ./as.texinfo.
  3. START-INFO-DIR-ENTRY
  4. * As: (as).                     The GNU assembler.
  5. END-INFO-DIR-ENTRY
  6.    This file documents the GNU Assembler "as".
  7.    Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation,
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided that
  13. the entire resulting derived work is distributed under the terms of a
  14. permission notice identical to this one.
  15.    Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions.
  18. File: as.info,  Node: Psize,  Next: Quad,  Prev: P2align,  Up: Pseudo Ops
  19. `.psize LINES , COLUMNS'
  20. ========================
  21.    Use this directive to declare the number of lines--and, optionally,
  22. the number of columns--to use for each page, when generating listings.
  23.    If you do not use `.psize', listings use a default line-count of 60.
  24. You may omit the comma and COLUMNS specification; the default width is
  25. 200 columns.
  26.    `as' generates formfeeds whenever the specified number of lines is
  27. exceeded (or whenever you explicitly request one, using `.eject').
  28.    If you specify LINES as `0', no formfeeds are generated save those
  29. explicitly specified with `.eject'.
  30. File: as.info,  Node: Quad,  Next: Rept,  Prev: Psize,  Up: Pseudo Ops
  31. `.quad BIGNUMS'
  32. ===============
  33.    `.quad' expects zero or more bignums, separated by commas.  For each
  34. bignum, it emits an 8-byte integer.  If the bignum won't fit in 8
  35. bytes, it prints a warning message; and just takes the lowest order 8
  36. bytes of the bignum.
  37.    The term "quad" comes from contexts in which a "word" is two bytes;
  38. hence *quad*-word for 8 bytes.
  39. File: as.info,  Node: Rept,  Next: Sbttl,  Prev: Quad,  Up: Pseudo Ops
  40. `.rept COUNT'
  41. =============
  42.    Repeat the sequence of lines between the `.rept' directive and the
  43. next `.endr' directive COUNT times.
  44.    For example, assembling
  45.              .rept   3
  46.              .long   0
  47.              .endr
  48.    is equivalent to assembling
  49.              .long   0
  50.              .long   0
  51.              .long   0
  52. File: as.info,  Node: Sbttl,  Next: Scl,  Prev: Rept,  Up: Pseudo Ops
  53. `.sbttl "SUBHEADING"'
  54. =====================
  55.    Use SUBHEADING as the title (third line, immediately after the title
  56. line) when generating assembly listings.
  57.    This directive affects subsequent pages, as well as the current page
  58. if it appears within ten lines of the top of a page.
  59. File: as.info,  Node: Scl,  Next: Section,  Prev: Sbttl,  Up: Pseudo Ops
  60. `.scl CLASS'
  61. ============
  62.    Set the storage-class value for a symbol.  This directive may only be
  63. used inside a `.def'/`.endef' pair.  Storage class may flag whether a
  64. symbol is static or external, or it may record further symbolic
  65. debugging information.
  66.    The `.scl' directive is primarily associated with COFF output; when
  67. configured to generate `b.out' output format, `as' accepts this
  68. directive but ignores it.
  69. File: as.info,  Node: Section,  Next: Set,  Prev: Scl,  Up: Pseudo Ops
  70. `.section NAME, SUBSECTION'
  71. ===========================
  72.    Assemble the following code into end of subsection numbered
  73. SUBSECTION in the COFF named section NAME.  If you omit SUBSECTION,
  74. `as' uses subsection number zero.  `.section .text' is equivalent to
  75. the `.text' directive; `.section .data' is equivalent to the `.data'
  76. directive.  This directive is only supported for targets that actually
  77. support arbitrarily named sections; on `a.out' targets, for example, it
  78. is not accepted, even with a standard `a.out' section name as its
  79. parameter.
  80. File: as.info,  Node: Set,  Next: Short,  Prev: Section,  Up: Pseudo Ops
  81. `.set SYMBOL, EXPRESSION'
  82. =========================
  83.    Set the value of SYMBOL to EXPRESSION.  This changes SYMBOL's value
  84. and type to conform to EXPRESSION.  If SYMBOL was flagged as external,
  85. it remains flagged. (*Note Symbol Attributes::.)
  86.    You may `.set' a symbol many times in the same assembly.
  87.    If you `.set' a global symbol, the value stored in the object file
  88. is the last value stored into it.
  89.    The syntax for `set' on the HPPA is `SYMBOL .set EXPRESSION'.
  90. File: as.info,  Node: Short,  Next: Single,  Prev: Set,  Up: Pseudo Ops
  91. `.short EXPRESSIONS'
  92. ====================
  93.    `.short' is normally the same as `.word'.  *Note `.word': Word.
  94.    In some configurations, however, `.short' and `.word' generate
  95. numbers of different lengths; *note Machine Dependencies::..
  96. File: as.info,  Node: Single,  Next: Size,  Prev: Short,  Up: Pseudo Ops
  97. `.single FLONUMS'
  98. =================
  99.    This directive assembles zero or more flonums, separated by commas.
  100. It has the same effect as `.float'.  The exact kind of floating point
  101. numbers emitted depends on how `as' is configured.  *Note Machine
  102. Dependencies::.
  103. File: as.info,  Node: Size,  Next: Skip,  Prev: Single,  Up: Pseudo Ops
  104. `.size'
  105. =======
  106.    This directive is generated by compilers to include auxiliary
  107. debugging information in the symbol table.  It is only permitted inside
  108. `.def'/`.endef' pairs.
  109.    `.size' is only meaningful when generating COFF format output; when
  110. `as' is generating `b.out', it accepts this directive but ignores it.
  111. File: as.info,  Node: Skip,  Next: Space,  Prev: Size,  Up: Pseudo Ops
  112. `.skip SIZE , FILL'
  113. ===================
  114.    This directive emits SIZE bytes, each of value FILL.  Both SIZE and
  115. FILL are absolute expressions.  If the comma and FILL are omitted, FILL
  116. is assumed to be zero.  This is the same as `.space'.
  117. File: as.info,  Node: Space,  Next: Stab,  Prev: Skip,  Up: Pseudo Ops
  118. `.space SIZE , FILL'
  119. ====================
  120.    This directive emits SIZE bytes, each of value FILL.  Both SIZE and
  121. FILL are absolute expressions.  If the comma and FILL are omitted, FILL
  122. is assumed to be zero.  This is the same as `.skip'.
  123.      *Warning:* `.space' has a completely different meaning for HPPA
  124.      targets; use `.block' as a substitute.  See `HP9000 Series 800
  125.      Assembly Language Reference Manual' (HP 92432-90001) for the
  126.      meaning of the `.space' directive.  *Note HPPA Assembler
  127.      Directives: HPPA Directives, for a summary.
  128.    On the AMD 29K, this directive is ignored; it is accepted for
  129. compatibility with other AMD 29K assemblers.
  130.      *Warning:* In most versions of the GNU assembler, the directive
  131.      `.space' has the effect of `.block'  *Note Machine Dependencies::.
  132. File: as.info,  Node: Stab,  Next: String,  Prev: Space,  Up: Pseudo Ops
  133. `.stabd, .stabn, .stabs'
  134. ========================
  135.    There are three directives that begin `.stab'.  All emit symbols
  136. (*note Symbols::.), for use by symbolic debuggers.  The symbols are not
  137. entered in the `as' hash table: they cannot be referenced elsewhere in
  138. the source file.  Up to five fields are required:
  139. STRING
  140.      This is the symbol's name.  It may contain any character except
  141.      `\000', so is more general than ordinary symbol names.  Some
  142.      debuggers used to code arbitrarily complex structures into symbol
  143.      names using this field.
  144.      An absolute expression.  The symbol's type is set to the low 8
  145.      bits of this expression.  Any bit pattern is permitted, but `ld'
  146.      and debuggers choke on silly bit patterns.
  147. OTHER
  148.      An absolute expression.  The symbol's "other" attribute is set to
  149.      the low 8 bits of this expression.
  150.      An absolute expression.  The symbol's descriptor is set to the low
  151.      16 bits of this expression.
  152. VALUE
  153.      An absolute expression which becomes the symbol's value.
  154.    If a warning is detected while reading a `.stabd', `.stabn', or
  155. `.stabs' statement, the symbol has probably already been created; you
  156. get a half-formed symbol in your object file.  This is compatible with
  157. earlier assemblers!
  158. `.stabd TYPE , OTHER , DESC'
  159.      The "name" of the symbol generated is not even an empty string.
  160.      It is a null pointer, for compatibility.  Older assemblers used a
  161.      null pointer so they didn't waste space in object files with empty
  162.      strings.
  163.      The symbol's value is set to the location counter, relocatably.
  164.      When your program is linked, the value of this symbol is the
  165.      address of the location counter when the `.stabd' was assembled.
  166. `.stabn TYPE , OTHER , DESC , VALUE'
  167.      The name of the symbol is set to the empty string `""'.
  168. `.stabs STRING ,  TYPE , OTHER , DESC , VALUE'
  169.      All five fields are specified.
  170. File: as.info,  Node: String,  Next: Tag,  Prev: Stab,  Up: Pseudo Ops
  171. `.string' "STR"
  172. ===============
  173.    Copy the characters in STR to the object file.  You may specify more
  174. than one string to copy, separated by commas.  Unless otherwise
  175. specified for a particular machine, the assembler marks the end of each
  176. string with a 0 byte.  You can use any of the escape sequences
  177. described in *Note Strings: Strings.
  178. File: as.info,  Node: Tag,  Next: Text,  Prev: String,  Up: Pseudo Ops
  179. `.tag STRUCTNAME'
  180. =================
  181.    This directive is generated by compilers to include auxiliary
  182. debugging information in the symbol table.  It is only permitted inside
  183. `.def'/`.endef' pairs.  Tags are used to link structure definitions in
  184. the symbol table with instances of those structures.
  185.    `.tag' is only used when generating COFF format output; when `as' is
  186. generating `b.out', it accepts this directive but ignores it.
  187. File: as.info,  Node: Text,  Next: Title,  Prev: Tag,  Up: Pseudo Ops
  188. `.text SUBSECTION'
  189. ==================
  190.    Tells `as' to assemble the following statements onto the end of the
  191. text subsection numbered SUBSECTION, which is an absolute expression.
  192. If SUBSECTION is omitted, subsection number zero is used.
  193. File: as.info,  Node: Title,  Next: Type,  Prev: Text,  Up: Pseudo Ops
  194. `.title "HEADING"'
  195. ==================
  196.    Use HEADING as the title (second line, immediately after the source
  197. file name and pagenumber) when generating assembly listings.
  198.    This directive affects subsequent pages, as well as the current page
  199. if it appears within ten lines of the top of a page.
  200. File: as.info,  Node: Type,  Next: Val,  Prev: Title,  Up: Pseudo Ops
  201. `.type INT'
  202. ===========
  203.    This directive, permitted only within `.def'/`.endef' pairs, records
  204. the integer INT as the type attribute of a symbol table entry.
  205.    `.type' is associated only with COFF format output; when `as' is
  206. configured for `b.out' output, it accepts this directive but ignores it.
  207. File: as.info,  Node: Val,  Next: Word,  Prev: Type,  Up: Pseudo Ops
  208. `.val ADDR'
  209. ===========
  210.    This directive, permitted only within `.def'/`.endef' pairs, records
  211. the address ADDR as the value attribute of a symbol table entry.
  212.    `.val' is used only for COFF output; when `as' is configured for
  213. `b.out', it accepts this directive but ignores it.
  214. File: as.info,  Node: Word,  Next: Deprecated,  Prev: Val,  Up: Pseudo Ops
  215. `.word EXPRESSIONS'
  216. ===================
  217.    This directive expects zero or more EXPRESSIONS, of any section,
  218. separated by commas.
  219.    The size of the number emitted, and its byte order, depend on what
  220. target computer the assembly is for.
  221.      *Warning: Special Treatment to support Compilers*
  222.    Machines with a 32-bit address space, but that do less than 32-bit
  223. addressing, require the following special treatment.  If the machine of
  224. interest to you does 32-bit addressing (or doesn't require it; *note
  225. Machine Dependencies::.), you can ignore this issue.
  226.    In order to assemble compiler output into something that works, `as'
  227. occasionlly does strange things to `.word' directives.  Directives of
  228. the form `.word sym1-sym2' are often emitted by compilers as part of
  229. jump tables.  Therefore, when `as' assembles a directive of the form
  230. `.word sym1-sym2', and the difference between `sym1' and `sym2' does
  231. not fit in 16 bits, `as' creates a "secondary jump table", immediately
  232. before the next label.  This secondary jump table is preceded by a
  233. short-jump to the first byte after the secondary table.  This
  234. short-jump prevents the flow of control from accidentally falling into
  235. the new table.  Inside the table is a long-jump to `sym2'.  The
  236. original `.word' contains `sym1' minus the address of the long-jump to
  237. `sym2'.
  238.    If there were several occurrences of `.word sym1-sym2' before the
  239. secondary jump table, all of them are adjusted.  If there was a `.word
  240. sym3-sym4', that also did not fit in sixteen bits, a long-jump to
  241. `sym4' is included in the secondary jump table, and the `.word'
  242. directives are adjusted to contain `sym3' minus the address of the
  243. long-jump to `sym4'; and so on, for as many entries in the original
  244. jump table as necessary.
  245. File: as.info,  Node: Deprecated,  Prev: Word,  Up: Pseudo Ops
  246. Deprecated Directives
  247. =====================
  248.    One day these directives won't work.  They are included for
  249. compatibility with older assemblers.
  250. .abort
  251. .app-file
  252. .line
  253. File: as.info,  Node: Machine Dependencies,  Next: Acknowledgements,  Prev: Pseudo Ops,  Up: Top
  254. Machine Dependent Features
  255. **************************
  256.    The machine instruction sets are (almost by definition) different on
  257. each machine where `as' runs.  Floating point representations vary as
  258. well, and `as' often supports a few additional directives or
  259. command-line options for compatibility with other assemblers on a
  260. particular platform.  Finally, some versions of `as' support special
  261. pseudo-instructions for branch optimization.
  262.    This chapter discusses most of these differences, though it does not
  263. include details on any machine's instruction set.  For details on that
  264. subject, see the hardware manufacturer's manual.
  265. * Menu:
  266. * AMD29K-Dependent::            AMD 29K Dependent Features
  267. * H8/300-Dependent::            Hitachi H8/300 Dependent Features
  268. * H8/500-Dependent::            Hitachi H8/500 Dependent Features
  269. * HPPA-Dependent::              HPPA Dependent Features
  270. * i386-Dependent::              Intel 80386 Dependent Features
  271. * i960-Dependent::              Intel 80960 Dependent Features
  272. * M68K-Dependent::              M680x0 Dependent Features
  273. * MIPS-Dependent::              MIPS Dependent Features
  274. * SH-Dependent::                Hitachi SH Dependent Features
  275. * Sparc-Dependent::             SPARC Dependent Features
  276. * Z8000-Dependent::             Z8000 Dependent Features
  277. * Vax-Dependent::               VAX Dependent Features
  278. File: as.info,  Node: AMD29K-Dependent,  Next: H8/300-Dependent,  Up: Machine Dependencies
  279. AMD 29K Dependent Features
  280. ==========================
  281. * Menu:
  282. * AMD29K Options::              Options
  283. * AMD29K Syntax::               Syntax
  284. * AMD29K Floating Point::       Floating Point
  285. * AMD29K Directives::           AMD 29K Machine Directives
  286. * AMD29K Opcodes::              Opcodes
  287. File: as.info,  Node: AMD29K Options,  Next: AMD29K Syntax,  Up: AMD29K-Dependent
  288. Options
  289. -------
  290.    `as' has no additional command-line options for the AMD 29K family.
  291. File: as.info,  Node: AMD29K Syntax,  Next: AMD29K Floating Point,  Prev: AMD29K Options,  Up: AMD29K-Dependent
  292. Syntax
  293. ------
  294. * Menu:
  295. * AMD29K-Macros::        Macros
  296. * AMD29K-Chars::                Special Characters
  297. * AMD29K-Regs::                 Register Names
  298. File: as.info,  Node: AMD29K-Macros,  Next: AMD29K-Chars,  Up: AMD29K Syntax
  299. Macros
  300. ......
  301.    The macro syntax used on the AMD 29K is like that described in the
  302. AMD 29K Family Macro Assembler Specification.  Normal `as' macros
  303. should still work.
  304. File: as.info,  Node: AMD29K-Chars,  Next: AMD29K-Regs,  Prev: AMD29K-Macros,  Up: AMD29K Syntax
  305. Special Characters
  306. ..................
  307.    `;' is the line comment character.
  308.    The character `?' is permitted in identifiers (but may not begin an
  309. identifier).
  310. File: as.info,  Node: AMD29K-Regs,  Prev: AMD29K-Chars,  Up: AMD29K Syntax
  311. Register Names
  312. ..............
  313.    General-purpose registers are represented by predefined symbols of
  314. the form `GRNNN' (for global registers) or `LRNNN' (for local
  315. registers), where NNN represents a number between `0' and `127',
  316. written with no leading zeros.  The leading letters may be in either
  317. upper or lower case; for example, `gr13' and `LR7' are both valid
  318. register names.
  319.    You may also refer to general-purpose registers by specifying the
  320. register number as the result of an expression (prefixed with `%%' to
  321. flag the expression as a register number):
  322.      %%EXPRESSION
  323. --where EXPRESSION must be an absolute expression evaluating to a
  324. number between `0' and `255'.  The range [0, 127] refers to global
  325. registers, and the range [128, 255] to local registers.
  326.    In addition, `as' understands the following protected
  327. special-purpose register names for the AMD 29K family:
  328.        vab    chd    pc0
  329.        ops    chc    pc1
  330.        cps    rbp    pc2
  331.        cfg    tmc    mmu
  332.        cha    tmr    lru
  333.    These unprotected special-purpose register names are also recognized:
  334.        ipc    alu    fpe
  335.        ipa    bp     inte
  336.        ipb    fc     fps
  337.        q      cr     exop
  338. File: as.info,  Node: AMD29K Floating Point,  Next: AMD29K Directives,  Prev: AMD29K Syntax,  Up: AMD29K-Dependent
  339. Floating Point
  340. --------------
  341.    The AMD 29K family uses IEEE floating-point numbers.
  342. File: as.info,  Node: AMD29K Directives,  Next: AMD29K Opcodes,  Prev: AMD29K Floating Point,  Up: AMD29K-Dependent
  343. AMD 29K Machine Directives
  344. --------------------------
  345. `.block SIZE , FILL'
  346.      This directive emits SIZE bytes, each of value FILL.  Both SIZE
  347.      and FILL are absolute expressions.  If the comma and FILL are
  348.      omitted, FILL is assumed to be zero.
  349.      In other versions of the GNU assembler, this directive is called
  350.      `.space'.
  351. `.cputype'
  352.      This directive is ignored; it is accepted for compatibility with
  353.      other AMD 29K assemblers.
  354. `.file'
  355.      This directive is ignored; it is accepted for compatibility with
  356.      other AMD 29K assemblers.
  357.           *Warning:* in other versions of the GNU assembler, `.file' is
  358.           used for the directive called `.app-file' in the AMD 29K
  359.           support.
  360. `.line'
  361.      This directive is ignored; it is accepted for compatibility with
  362.      other AMD 29K assemblers.
  363. `.sect'
  364.      This directive is ignored; it is accepted for compatibility with
  365.      other AMD 29K assemblers.
  366. `.use SECTION NAME'
  367.      Establishes the section and subsection for the following code;
  368.      SECTION NAME may be one of `.text', `.data', `.data1', or `.lit'.
  369.      With one of the first three SECTION NAME options, `.use' is
  370.      equivalent to the machine directive SECTION NAME; the remaining
  371.      case, `.use .lit', is the same as `.data 200'.
  372. File: as.info,  Node: AMD29K Opcodes,  Prev: AMD29K Directives,  Up: AMD29K-Dependent
  373. Opcodes
  374. -------
  375.    `as' implements all the standard AMD 29K opcodes.  No additional
  376. pseudo-instructions are needed on this family.
  377.    For information on the 29K machine instruction set, see `Am29000
  378. User's Manual', Advanced Micro Devices, Inc.
  379. File: as.info,  Node: H8/300-Dependent,  Next: H8/500-Dependent,  Prev: AMD29K-Dependent,  Up: Machine Dependencies
  380. H8/300 Dependent Features
  381. =========================
  382. * Menu:
  383. * H8/300 Options::              Options
  384. * H8/300 Syntax::               Syntax
  385. * H8/300 Floating Point::       Floating Point
  386. * H8/300 Directives::           H8/300 Machine Directives
  387. * H8/300 Opcodes::              Opcodes
  388. File: as.info,  Node: H8/300 Options,  Next: H8/300 Syntax,  Up: H8/300-Dependent
  389. Options
  390. -------
  391.    `as' has no additional command-line options for the Hitachi H8/300
  392. family.
  393. File: as.info,  Node: H8/300 Syntax,  Next: H8/300 Floating Point,  Prev: H8/300 Options,  Up: H8/300-Dependent
  394. Syntax
  395. ------
  396. * Menu:
  397. * H8/300-Chars::                Special Characters
  398. * H8/300-Regs::                 Register Names
  399. * H8/300-Addressing::           Addressing Modes
  400. File: as.info,  Node: H8/300-Chars,  Next: H8/300-Regs,  Up: H8/300 Syntax
  401. Special Characters
  402. ..................
  403.    `;' is the line comment character.
  404.    `$' can be used instead of a newline to separate statements.
  405. Therefore *you may not use `$' in symbol names* on the H8/300.
  406. File: as.info,  Node: H8/300-Regs,  Next: H8/300-Addressing,  Prev: H8/300-Chars,  Up: H8/300 Syntax
  407. Register Names
  408. ..............
  409.    You can use predefined symbols of the form `rNh' and `rNl' to refer
  410. to the H8/300 registers as sixteen 8-bit general-purpose registers.  N
  411. is a digit from `0' to `7'); for instance, both `r0h' and `r7l' are
  412. valid register names.
  413.    You can also use the eight predefined symbols `rN' to refer to the
  414. H8/300 registers as 16-bit registers (you must use this form for
  415. addressing).
  416.    On the H8/300H, you can also use the eight predefined symbols `erN'
  417. (`er0' ... `er7') to refer to the 32-bit general purpose registers.
  418.    The two control registers are called `pc' (program counter; a 16-bit
  419. register, except on the H8/300H where it is 24 bits) and `ccr'
  420. (condition code register; an 8-bit register).  `r7' is used as the
  421. stack pointer, and can also be called `sp'.
  422. File: as.info,  Node: H8/300-Addressing,  Prev: H8/300-Regs,  Up: H8/300 Syntax
  423. Addressing Modes
  424. ................
  425.    as understands the following addressing modes for the H8/300:
  426.      Register direct
  427. `@rN'
  428.      Register indirect
  429. `@(D, rN)'
  430. `@(D:16, rN)'
  431. `@(D:24, rN)'
  432.      Register indirect: 16-bit or 24-bit displacement D from register
  433.      N.  (24-bit displacements are only meaningful on the H8/300H.)
  434. `@rN+'
  435.      Register indirect with post-increment
  436. `@-rN'
  437.      Register indirect with pre-decrement
  438. ``@'AA'
  439. ``@'AA:8'
  440. ``@'AA:16'
  441. ``@'AA:24'
  442.      Absolute address `aa'.  (The address size `:24' only makes sense
  443.      on the H8/300H.)
  444. `#XX'
  445. `#XX:8'
  446. `#XX:16'
  447. `#XX:32'
  448.      Immediate data XX.  You may specify the `:8', `:16', or `:32' for
  449.      clarity, if you wish; but `as' neither requires this nor uses
  450.      it--the data size required is taken from context.
  451. ``@'`@'AA'
  452. ``@'`@'AA:8'
  453.      Memory indirect.  You may specify the `:8' for clarity, if you
  454.      wish; but `as' neither requires this nor uses it.
  455. File: as.info,  Node: H8/300 Floating Point,  Next: H8/300 Directives,  Prev: H8/300 Syntax,  Up: H8/300-Dependent
  456. Floating Point
  457. --------------
  458.    The H8/300 family has no hardware floating point, but the `.float'
  459. directive generates IEEE floating-point numbers for compatibility with
  460. other development tools.
  461. File: as.info,  Node: H8/300 Directives,  Next: H8/300 Opcodes,  Prev: H8/300 Floating Point,  Up: H8/300-Dependent
  462. H8/300 Machine Directives
  463. -------------------------
  464.    `as' has only one machine-dependent directive for the H8/300:
  465. `.h8300h'
  466.      Recognize and emit additional instructions for the H8/300H
  467.      variant, and also make `.int' emit 32-bit numbers rather than the
  468.      usual (16-bit) for the H8/300 family.
  469.    On the H8/300 family (including the H8/300H) `.word' directives
  470. generate 16-bit numbers.
  471. File: as.info,  Node: H8/300 Opcodes,  Prev: H8/300 Directives,  Up: H8/300-Dependent
  472. Opcodes
  473. -------
  474.    For detailed information on the H8/300 machine instruction set, see
  475. `H8/300 Series Programming Manual' (Hitachi ADE-602-025).  For
  476. information specific to the H8/300H, see `H8/300H Series Programming
  477. Manual' (Hitachi).
  478.    `as' implements all the standard H8/300 opcodes.  No additional
  479. pseudo-instructions are needed on this family.
  480.    The following table summarizes the H8/300 opcodes, and their
  481. arguments.  Entries marked `*' are opcodes used only on the H8/300H.
  482.               Legend:
  483.                  Rs   source register
  484.                  Rd   destination register
  485.                  abs  absolute address
  486.                  imm  immediate data
  487.               disp:N  N-bit displacement from a register
  488.              pcrel:N  N-bit displacement relative to program counter
  489.      
  490.         add.b #imm,rd              *  andc #imm,ccr
  491.         add.b rs,rd                   band #imm,rd
  492.         add.w rs,rd                   band #imm,@rd
  493.      *  add.w #imm,rd                 band #imm,@abs:8
  494.      *  add.l rs,rd                   bra  pcrel:8
  495.      *  add.l #imm,rd              *  bra  pcrel:16
  496.         adds #imm,rd                  bt   pcrel:8
  497.         addx #imm,rd               *  bt   pcrel:16
  498.         addx rs,rd                    brn  pcrel:8
  499.         and.b #imm,rd              *  brn  pcrel:16
  500.         and.b rs,rd                   bf   pcrel:8
  501.      *  and.w rs,rd                *  bf   pcrel:16
  502.      *  and.w #imm,rd                 bhi  pcrel:8
  503.      *  and.l #imm,rd              *  bhi  pcrel:16
  504.      *  and.l rs,rd                   bls  pcrel:8
  505.      
  506.      *  bls  pcrel:16                 bld  #imm,rd
  507.         bcc  pcrel:8                  bld  #imm,@rd
  508.      *  bcc  pcrel:16                 bld  #imm,@abs:8
  509.         bhs  pcrel:8                  bnot #imm,rd
  510.      *  bhs  pcrel:16                 bnot #imm,@rd
  511.         bcs  pcrel:8                  bnot #imm,@abs:8
  512.      *  bcs  pcrel:16                 bnot rs,rd
  513.         blo  pcrel:8                  bnot rs,@rd
  514.      *  blo  pcrel:16                 bnot rs,@abs:8
  515.         bne  pcrel:8                  bor  #imm,rd
  516.      *  bne  pcrel:16                 bor  #imm,@rd
  517.         beq  pcrel:8                  bor  #imm,@abs:8
  518.      *  beq  pcrel:16                 bset #imm,rd
  519.         bvc  pcrel:8                  bset #imm,@rd
  520.      *  bvc  pcrel:16                 bset #imm,@abs:8
  521.         bvs  pcrel:8                  bset rs,rd
  522.      *  bvs  pcrel:16                 bset rs,@rd
  523.         bpl  pcrel:8                  bset rs,@abs:8
  524.      *  bpl  pcrel:16                 bsr  pcrel:8
  525.         bmi  pcrel:8                  bsr  pcrel:16
  526.      *  bmi  pcrel:16                 bst  #imm,rd
  527.         bge  pcrel:8                  bst  #imm,@rd
  528.      *  bge  pcrel:16                 bst  #imm,@abs:8
  529.         blt  pcrel:8                  btst #imm,rd
  530.      *  blt  pcrel:16                 btst #imm,@rd
  531.         bgt  pcrel:8                  btst #imm,@abs:8
  532.      *  bgt  pcrel:16                 btst rs,rd
  533.         ble  pcrel:8                  btst rs,@rd
  534.      *  ble  pcrel:16                 btst rs,@abs:8
  535.         bclr #imm,rd                  bxor #imm,rd
  536.         bclr #imm,@rd                 bxor #imm,@rd
  537.         bclr #imm,@abs:8              bxor #imm,@abs:8
  538.         bclr rs,rd                    cmp.b #imm,rd
  539.         bclr rs,@rd                   cmp.b rs,rd
  540.         bclr rs,@abs:8                cmp.w rs,rd
  541.         biand #imm,rd                 cmp.w rs,rd
  542.         biand #imm,@rd             *  cmp.w #imm,rd
  543.         biand #imm,@abs:8          *  cmp.l #imm,rd
  544.         bild #imm,rd               *  cmp.l rs,rd
  545.         bild #imm,@rd                 daa  rs
  546.         bild #imm,@abs:8              das  rs
  547.         bior #imm,rd                  dec.b rs
  548.         bior #imm,@rd              *  dec.w #imm,rd
  549.         bior #imm,@abs:8           *  dec.l #imm,rd
  550.         bist #imm,rd                  divxu.b rs,rd
  551.         bist #imm,@rd              *  divxu.w rs,rd
  552.         bist #imm,@abs:8           *  divxs.b rs,rd
  553.         bixor #imm,rd              *  divxs.w rs,rd
  554.         bixor #imm,@rd                eepmov
  555.         bixor #imm,@abs:8          *  eepmovw
  556.      
  557.      *  exts.w rd                     mov.w rs,@abs:16
  558.      *  exts.l rd                  *  mov.l #imm,rd
  559.      *  extu.w rd                  *  mov.l rs,rd
  560.      *  extu.l rd                  *  mov.l @rs,rd
  561.         inc  rs                    *  mov.l @(disp:16,rs),rd
  562.      *  inc.w #imm,rd              *  mov.l @(disp:24,rs),rd
  563.      *  inc.l #imm,rd              *  mov.l @rs+,rd
  564.         jmp  @rs                   *  mov.l @abs:16,rd
  565.         jmp  abs                   *  mov.l @abs:24,rd
  566.         jmp  @@abs:8               *  mov.l rs,@rd
  567.         jsr  @rs                   *  mov.l rs,@(disp:16,rd)
  568.         jsr  abs                   *  mov.l rs,@(disp:24,rd)
  569.         jsr  @@abs:8               *  mov.l rs,@-rd
  570.         ldc  #imm,ccr              *  mov.l rs,@abs:16
  571.         ldc  rs,ccr                *  mov.l rs,@abs:24
  572.      *  ldc  @abs:16,ccr              movfpe @abs:16,rd
  573.      *  ldc  @abs:24,ccr              movtpe rs,@abs:16
  574.      *  ldc  @(disp:16,rs),ccr        mulxu.b rs,rd
  575.      *  ldc  @(disp:24,rs),ccr     *  mulxu.w rs,rd
  576.      *  ldc  @rs+,ccr              *  mulxs.b rs,rd
  577.      *  ldc  @rs,ccr               *  mulxs.w rs,rd
  578.      *  mov.b @(disp:24,rs),rd        neg.b rs
  579.      *  mov.b rs,@(disp:24,rd)     *  neg.w rs
  580.         mov.b @abs:16,rd           *  neg.l rs
  581.         mov.b rs,rd                   nop
  582.         mov.b @abs:8,rd               not.b rs
  583.         mov.b rs,@abs:8            *  not.w rs
  584.         mov.b rs,rd                *  not.l rs
  585.         mov.b #imm,rd                 or.b #imm,rd
  586.         mov.b @rs,rd                  or.b rs,rd
  587.         mov.b @(disp:16,rs),rd     *  or.w #imm,rd
  588.         mov.b @rs+,rd              *  or.w rs,rd
  589.         mov.b @abs:8,rd            *  or.l #imm,rd
  590.         mov.b rs,@rd               *  or.l rs,rd
  591.         mov.b rs,@(disp:16,rd)        orc  #imm,ccr
  592.         mov.b rs,@-rd                 pop.w rs
  593.         mov.b rs,@abs:8            *  pop.l rs
  594.         mov.w rs,@rd                  push.w rs
  595.      *  mov.w @(disp:24,rs),rd     *  push.l rs
  596.      *  mov.w rs,@(disp:24,rd)        rotl.b rs
  597.      *  mov.w @abs:24,rd           *  rotl.w rs
  598.      *  mov.w rs,@abs:24           *  rotl.l rs
  599.         mov.w rs,rd                   rotr.b rs
  600.         mov.w #imm,rd              *  rotr.w rs
  601.         mov.w @rs,rd               *  rotr.l rs
  602.         mov.w @(disp:16,rs),rd        rotxl.b rs
  603.         mov.w @rs+,rd              *  rotxl.w rs
  604.         mov.w @abs:16,rd           *  rotxl.l rs
  605.         mov.w rs,@(disp:16,rd)        rotxr.b rs
  606.         mov.w rs,@-rd              *  rotxr.w rs
  607.      
  608.      *  rotxr.l rs                 *  stc  ccr,@(disp:24,rd)
  609.         bpt                        *  stc  ccr,@-rd
  610.         rte                        *  stc  ccr,@abs:16
  611.         rts                        *  stc  ccr,@abs:24
  612.         shal.b rs                     sub.b rs,rd
  613.      *  shal.w rs                     sub.w rs,rd
  614.      *  shal.l rs                  *  sub.w #imm,rd
  615.         shar.b rs                  *  sub.l rs,rd
  616.      *  shar.w rs                  *  sub.l #imm,rd
  617.      *  shar.l rs                     subs #imm,rd
  618.         shll.b rs                     subx #imm,rd
  619.      *  shll.w rs                     subx rs,rd
  620.      *  shll.l rs                  *  trapa #imm
  621.         shlr.b rs                     xor  #imm,rd
  622.      *  shlr.w rs                     xor  rs,rd
  623.      *  shlr.l rs                  *  xor.w #imm,rd
  624.         sleep                      *  xor.w rs,rd
  625.         stc  ccr,rd                *  xor.l #imm,rd
  626.      *  stc  ccr,@rs               *  xor.l rs,rd
  627.      *  stc  ccr,@(disp:16,rd)        xorc #imm,ccr
  628.    Four H8/300 instructions (`add', `cmp', `mov', `sub') are defined
  629. with variants using the suffixes `.b', `.w', and `.l' to specify the
  630. size of a memory operand.  `as' supports these suffixes, but does not
  631. require them; since one of the operands is always a register, `as' can
  632. deduce the correct size.
  633.    For example, since `r0' refers to a 16-bit register,
  634.      mov    r0,@foo
  635. is equivalent to
  636.      mov.w  r0,@foo
  637.    If you use the size suffixes, `as' issues a warning when the suffix
  638. and the register size do not match.
  639. File: as.info,  Node: H8/500-Dependent,  Next: HPPA-Dependent,  Prev: H8/300-Dependent,  Up: Machine Dependencies
  640. H8/500 Dependent Features
  641. =========================
  642. * Menu:
  643. * H8/500 Options::              Options
  644. * H8/500 Syntax::               Syntax
  645. * H8/500 Floating Point::       Floating Point
  646. * H8/500 Directives::           H8/500 Machine Directives
  647. * H8/500 Opcodes::              Opcodes
  648. File: as.info,  Node: H8/500 Options,  Next: H8/500 Syntax,  Up: H8/500-Dependent
  649. Options
  650. -------
  651.    `as' has no additional command-line options for the Hitachi H8/500
  652. family.
  653. File: as.info,  Node: H8/500 Syntax,  Next: H8/500 Floating Point,  Prev: H8/500 Options,  Up: H8/500-Dependent
  654. Syntax
  655. ------
  656. * Menu:
  657. * H8/500-Chars::                Special Characters
  658. * H8/500-Regs::                 Register Names
  659. * H8/500-Addressing::           Addressing Modes
  660. File: as.info,  Node: H8/500-Chars,  Next: H8/500-Regs,  Up: H8/500 Syntax
  661. Special Characters
  662. ..................
  663.    `!' is the line comment character.
  664.    `;' can be used instead of a newline to separate statements.
  665.    Since `$' has no special meaning, you may use it in symbol names.
  666. File: as.info,  Node: H8/500-Regs,  Next: H8/500-Addressing,  Prev: H8/500-Chars,  Up: H8/500 Syntax
  667. Register Names
  668. ..............
  669.    You can use the predefined symbols `r0', `r1', `r2', `r3', `r4',
  670. `r5', `r6', and `r7' to refer to the H8/500 registers.
  671.    The H8/500 also has these control registers:
  672.      code pointer
  673.      data pointer
  674.      base pointer
  675.      stack top pointer
  676.      extra pointer
  677.      status register
  678. `ccr'
  679.      condition code register
  680.    All registers are 16 bits long.  To represent 32 bit numbers, use two
  681. adjacent registers; for distant memory addresses, use one of the segment
  682. pointers (`cp' for the program counter; `dp' for `r0'-`r3'; `ep' for
  683. `r4' and `r5'; and `tp' for `r6' and `r7'.
  684. File: as.info,  Node: H8/500-Addressing,  Prev: H8/500-Regs,  Up: H8/500 Syntax
  685. Addressing Modes
  686. ................
  687.    as understands the following addressing modes for the H8/500:
  688.      Register direct
  689. `@RN'
  690.      Register indirect
  691. `@(d:8, RN)'
  692.      Register indirect with 8 bit signed displacement
  693. `@(d:16, RN)'
  694.      Register indirect with 16 bit signed displacement
  695. `@-RN'
  696.      Register indirect with pre-decrement
  697. `@RN+'
  698.      Register indirect with post-increment
  699. `@AA:8'
  700.      8 bit absolute address
  701. `@AA:16'
  702.      16 bit absolute address
  703. `#XX:8'
  704.      8 bit immediate
  705. `#XX:16'
  706.      16 bit immediate
  707. File: as.info,  Node: H8/500 Floating Point,  Next: H8/500 Directives,  Prev: H8/500 Syntax,  Up: H8/500-Dependent
  708. Floating Point
  709. --------------
  710.    The H8/500 family has no hardware floating point, but the `.float'
  711. directive generates IEEE floating-point numbers for compatibility with
  712. other development tools.
  713. File: as.info,  Node: H8/500 Directives,  Next: H8/500 Opcodes,  Prev: H8/500 Floating Point,  Up: H8/500-Dependent
  714. H8/500 Machine Directives
  715. -------------------------
  716.    `as' has no machine-dependent directives for the H8/500.  However,
  717. on this platform the `.int' and `.word' directives generate 16-bit
  718. numbers.
  719. File: as.info,  Node: H8/500 Opcodes,  Prev: H8/500 Directives,  Up: H8/500-Dependent
  720. Opcodes
  721. -------
  722.    For detailed information on the H8/500 machine instruction set, see
  723. `H8/500 Series Programming Manual' (Hitachi M21T001).
  724.    `as' implements all the standard H8/500 opcodes.  No additional
  725. pseudo-instructions are needed on this family.
  726.    The following table summarizes H8/500 opcodes and their operands:
  727.      Legend:
  728.      abs8      8-bit absolute address
  729.      abs16     16-bit absolute address
  730.      abs24     24-bit absolute address
  731.      crb       `ccr', `br', `ep', `dp', `tp', `dp'
  732.      disp8     8-bit displacement
  733.      ea        `rn', `@rn', `@(d:8, rn)', `@(d:16, rn)',
  734.                `@-rn', `@rn+', `@aa:8', `@aa:16',
  735.                `#xx:8', `#xx:16'
  736.      ea_mem    `@rn', `@(d:8, rn)', `@(d:16, rn)',
  737.                `@-rn', `@rn+', `@aa:8', `@aa:16'
  738.      ea_noimm  `rn', `@rn', `@(d:8, rn)', `@(d:16, rn)',
  739.                `@-rn', `@rn+', `@aa:8', `@aa:16'
  740.      fp        r6
  741.      imm4      4-bit immediate data
  742.      imm8      8-bit immediate data
  743.      imm16     16-bit immediate data
  744.      pcrel8    8-bit offset from program counter
  745.      pcrel16   16-bit offset from program counter
  746.      qim       `-2', `-1', `1', `2'
  747.      rd        any register
  748.      rs        a register distinct from rd
  749.      rlist     comma-separated list of registers in parentheses;
  750.                register ranges `rd-rs' are allowed
  751.      sp        stack pointer (`r7')
  752.      sr        status register
  753.      sz        size; `.b' or `.w'.  If omitted, default `.w'
  754.      
  755.      ldc[.b] ea,crb                 bcc[.w] pcrel16
  756.      ldc[.w] ea,sr                  bcc[.b] pcrel8
  757.      add[:q] sz qim,ea_noimm        bhs[.w] pcrel16
  758.      add[:g] sz ea,rd               bhs[.b] pcrel8
  759.      adds sz ea,rd                  bcs[.w] pcrel16
  760.      addx sz ea,rd                  bcs[.b] pcrel8
  761.      and sz ea,rd                   blo[.w] pcrel16
  762.      andc[.b] imm8,crb              blo[.b] pcrel8
  763.      andc[.w] imm16,sr              bne[.w] pcrel16
  764.      bpt                            bne[.b] pcrel8
  765.      bra[.w] pcrel16                beq[.w] pcrel16
  766.      bra[.b] pcrel8                 beq[.b] pcrel8
  767.      bt[.w] pcrel16                 bvc[.w] pcrel16
  768.      bt[.b] pcrel8                  bvc[.b] pcrel8
  769.      brn[.w] pcrel16                bvs[.w] pcrel16
  770.      brn[.b] pcrel8                 bvs[.b] pcrel8
  771.      bf[.w] pcrel16                 bpl[.w] pcrel16
  772.      bf[.b] pcrel8                  bpl[.b] pcrel8
  773.      bhi[.w] pcrel16                bmi[.w] pcrel16
  774.      bhi[.b] pcrel8                 bmi[.b] pcrel8
  775.      bls[.w] pcrel16                bge[.w] pcrel16
  776.      bls[.b] pcrel8                 bge[.b] pcrel8
  777.      
  778.      blt[.w] pcrel16                mov[:g][.b] imm8,ea_mem
  779.      blt[.b] pcrel8                 mov[:g][.w] imm16,ea_mem
  780.      bgt[.w] pcrel16                movfpe[.b] ea,rd
  781.      bgt[.b] pcrel8                 movtpe[.b] rs,ea_noimm
  782.      ble[.w] pcrel16                mulxu sz ea,rd
  783.      ble[.b] pcrel8                 neg sz ea
  784.      bclr sz imm4,ea_noimm          nop
  785.      bclr sz rs,ea_noimm            not sz ea
  786.      bnot sz imm4,ea_noimm          or sz ea,rd
  787.      bnot sz rs,ea_noimm            orc[.b] imm8,crb
  788.      bset sz imm4,ea_noimm          orc[.w] imm16,sr
  789.      bset sz rs,ea_noimm            pjmp abs24
  790.      bsr[.b] pcrel8                 pjmp @rd
  791.      bsr[.w] pcrel16                pjsr abs24
  792.      btst sz imm4,ea_noimm          pjsr @rd
  793.      btst sz rs,ea_noimm            prtd imm8
  794.      clr sz ea                      prtd imm16
  795.      cmp[:e][.b] imm8,rd            prts
  796.      cmp[:i][.w] imm16,rd           rotl sz ea
  797.      cmp[:g].b imm8,ea_noimm        rotr sz ea
  798.      cmp[:g][.w] imm16,ea_noimm     rotxl sz ea
  799.      Cmp[:g] sz ea,rd               rotxr sz ea
  800.      dadd rs,rd                     rtd imm8
  801.      divxu sz ea,rd                 rtd imm16
  802.      dsub rs,rd                     rts
  803.      exts[.b] rd                    scb/f rs,pcrel8
  804.      extu[.b] rd                    scb/ne rs,pcrel8
  805.      jmp @rd                        scb/eq rs,pcrel8
  806.      jmp @(imm8,rd)                 shal sz ea
  807.      jmp @(imm16,rd)                shar sz ea
  808.      jmp abs16                      shll sz ea
  809.      jsr @rd                        shlr sz ea
  810.      jsr @(imm8,rd)                 sleep
  811.      jsr @(imm16,rd)                stc[.b] crb,ea_noimm
  812.      jsr abs16                      stc[.w] sr,ea_noimm
  813.      ldm @sp+,(rlist)               stm (rlist),@-sp
  814.      link fp,imm8                   sub sz ea,rd
  815.      link fp,imm16                  subs sz ea,rd
  816.      mov[:e][.b] imm8,rd            subx sz ea,rd
  817.      mov[:i][.w] imm16,rd           swap[.b] rd
  818.      mov[:l][.w] abs8,rd            tas[.b] ea
  819.      mov[:l].b abs8,rd              trapa imm4
  820.      mov[:s][.w] rs,abs8            trap/vs
  821.      mov[:s].b rs,abs8              tst sz ea
  822.      mov[:f][.w] @(disp8,fp),rd     unlk fp
  823.      mov[:f][.w] rs,@(disp8,fp)     xch[.w] rs,rd
  824.      mov[:f].b @(disp8,fp),rd       xor sz ea,rd
  825.      mov[:f].b rs,@(disp8,fp)       xorc.b imm8,crb
  826.      mov[:g] sz rs,ea_mem           xorc.w imm16,sr
  827.      mov[:g] sz ea,rd
  828. File: as.info,  Node: HPPA-Dependent,  Next: i386-Dependent,  Prev: H8/500-Dependent,  Up: Machine Dependencies
  829. HPPA Dependent Features
  830. =======================
  831. * Menu:
  832. * HPPA Notes::                Notes
  833. * HPPA Options::              Options
  834. * HPPA Syntax::               Syntax
  835. * HPPA Floating Point::       Floating Point
  836. * HPPA Directives::           HPPA Machine Directives
  837. * HPPA Opcodes::              Opcodes
  838. File: as.info,  Node: HPPA Notes,  Next: HPPA Options,  Up: HPPA-Dependent
  839. Notes
  840. -----
  841.    As a back end for GNU CC `as' has been throughly tested and should
  842. work extremely well.  We have tested it only minimally on hand written
  843. assembly code and no one has tested it much on the assembly output from
  844. the HP compilers.
  845.    The format of the debugging sections has changed since the original
  846. `as' port (version 1.3X) was released; therefore, you must rebuild all
  847. HPPA objects and libraries with the new assembler so that you can debug
  848. the final executable.
  849.    The HPPA `as' port generates a small subset of the relocations
  850. available in the SOM and ELF object file formats.  Additional relocation
  851. support will be added as it becomes necessary.
  852. File: as.info,  Node: HPPA Options,  Next: HPPA Syntax,  Prev: HPPA Notes,  Up: HPPA-Dependent
  853. Options
  854. -------
  855.    `as' has no machine-dependent command-line options for the HPPA.
  856. File: as.info,  Node: HPPA Syntax,  Next: HPPA Floating Point,  Prev: HPPA Options,  Up: HPPA-Dependent
  857. Syntax
  858. ------
  859.    The assembler syntax closely follows the HPPA instruction set
  860. reference manual; assembler directives and general syntax closely
  861. follow the HPPA assembly language reference manual, with a few
  862. noteworthy differences.
  863.    First, a colon may immediately follow a label definition.  This is
  864. simply for compatibility with how most assembly language programmers
  865. write code.
  866.    Some obscure expression parsing problems may affect hand written
  867. code which uses the `spop' instructions, or code which makes significant
  868. use of the `!' line separator.
  869.    `as' is much less forgiving about missing arguments and other
  870. similar oversights than the HP assembler.  `as' notifies you of missing
  871. arguments as syntax errors; this is regarded as a feature, not a bug.
  872.    Finally, `as' allows you to use an external symbol without
  873. explicitly importing the symbol.  *Warning:* in the future this will be
  874. an error for HPPA targets.
  875.    Special characters for HPPA targets include:
  876.    `;' is the line comment character.
  877.    `!' can be used instead of a newline to separate statements.
  878.    Since `$' has no special meaning, you may use it in symbol names.
  879. File: as.info,  Node: HPPA Floating Point,  Next: HPPA Directives,  Prev: HPPA Syntax,  Up: HPPA-Dependent
  880. Floating Point
  881. --------------
  882.    The HPPA family uses IEEE floating-point numbers.
  883. File: as.info,  Node: HPPA Directives,  Next: HPPA Opcodes,  Prev: HPPA Floating Point,  Up: HPPA-Dependent
  884. HPPA Assembler Directives
  885. -------------------------
  886.    `as' for the HPPA supports many additional directives for
  887. compatibility with the native assembler.  This section describes them
  888. only briefly.  For detailed information on HPPA-specific assembler
  889. directives, see `HP9000 Series 800 Assembly Language Reference Manual'
  890. (HP 92432-90001).
  891.    `as' does *not* support the following assembler directives described
  892. in the HP manual:
  893.      .endm           .liston
  894.      .enter          .locct
  895.      .leave          .macro
  896.      .listoff
  897.    Beyond those implemented for compatibility, `as' supports one
  898. additional assembler directive for the HPPA: `.param'.  It conveys
  899. register argument locations for static functions.  Its syntax closely
  900. follows the `.export' directive.
  901.    These are the additional directives in `as' for the HPPA:
  902. `.block N'
  903. `.blockz N'
  904.      Reserve N bytes of storage, and initialize them to zero.
  905. `.call'
  906.      Mark the beginning of a procedure call.  Only the special case
  907.      with *no arguments* is allowed.
  908. `.callinfo [ PARAM=VALUE, ... ]  [ FLAG, ... ]'
  909.      Specify a number of parameters and flags that define the
  910.      environment for a procedure.
  911.      PARAM may be any of `frame' (frame size), `entry_gr' (end of
  912.      general register range), `entry_fr' (end of float register range),
  913.      `entry_sr' (end of space register range).
  914.      The values for FLAG are `calls' or `caller' (proc has
  915.      subroutines), `no_calls' (proc does not call subroutines),
  916.      `save_rp' (preserve return pointer), `save_sp' (proc preserves
  917.      stack pointer), `no_unwind' (do not unwind this proc), `hpux_int'
  918.      (proc is interrupt routine).
  919. `.code'
  920.      Assemble into the standard section called `$TEXT$', subsection
  921.      `$CODE$'.
  922. `.copyright "STRING"'
  923.      In the SOM object format, insert STRING into the object code,
  924.      marked as a copyright string.
  925. `.copyright "STRING"'
  926.      In the ELF object format, insert STRING into the object code,
  927.      marked as a version string.
  928. `.enter'
  929.      Not yet supported; the assembler rejects programs containing this
  930.      directive.
  931. `.entry'
  932.      Mark the beginning of a procedure.
  933. `.exit'
  934.      Mark the end of a procedure.
  935. `.export NAME [ ,TYP ]  [ ,PARAM=R ]'
  936.      Make a procedure NAME available to callers.  TYP, if present, must
  937.      be one of `absolute', `code' (ELF only, not SOM), `data', `entry',
  938.      `data', `entry', `millicode', `plabel', `pri_prog', or `sec_prog'.
  939.      PARAM, if present, provides either relocation information for the
  940.      procedure arguments and result, or a privilege level.  PARAM may be
  941.      `argwN' (where N ranges from `0' to `3', and indicates one of four
  942.      one-word arguments); `rtnval' (the procedure's result); or
  943.      `priv_lev' (privilege level).  For arguments or the result, R
  944.      specifies how to relocate, and must be one of `no' (not
  945.      relocatable), `gr' (argument is in general register), `fr' (in
  946.      floating point register), or `fu' (upper half of float register).
  947.      For `priv_lev', R is an integer.
  948. `.half N'
  949.      Define a two-byte integer constant N; synonym for the portable
  950.      `as' directive `.short'.
  951. `.import NAME [ ,TYP ]'
  952.      Converse of `.export'; make a procedure available to call.  The
  953.      arguments use the same conventions as the first two arguments for
  954.      `.export'.
  955. `.label NAME'
  956.      Define NAME as a label for the current assembly location.
  957. `.leave'
  958.      Not yet supported; the assembler rejects programs containing this
  959.      directive.
  960. `.origin LC'
  961.      Advance location counter to LC. Synonym for the `{No Value For
  962.      "as"}' portable directive `.org'.
  963. `.param NAME [ ,TYP ]  [ ,PARAM=R ]'
  964.      Similar to `.export', but used for static procedures.
  965. `.proc'
  966.      Use preceding the first statement of a procedure.
  967. `.procend'
  968.      Use following the last statement of a procedure.
  969. `LABEL .reg EXPR'
  970.      Synonym for `.equ'; define LABEL with the absolute expression EXPR
  971.      as its value.
  972. `.space SECNAME [ ,PARAMS ]'
  973.      Switch to section SECNAME, creating a new section by that name if
  974.      necessary.  You may only use PARAMS when creating a new section,
  975.      not when switching to an existing one.  SECNAME may identify a
  976.      section by number rather than by name.
  977.      If specified, the list PARAMS declares attributes of the section,
  978.      identified by keywords.  The keywords recognized are `spnum=EXP'
  979.      (identify this section by the number EXP, an absolute expression),
  980.      `sort=EXP' (order sections according to this sort key when linking;
  981.      EXP is an absolute expression), `unloadable' (section contains no
  982.      loadable data), `notdefined' (this section defined elsewhere), and
  983.      `private' (data in this section not available to other programs).
  984. `.spnum SECNAM'
  985.      Allocate four bytes of storage, and initialize them with the
  986.      section number of the section named SECNAM.  (You can define the
  987.      section number with the HPPA `.space' directive.)
  988. `.string "STR"'
  989.      Copy the characters in the string STR to the object file.  *Note
  990.      Strings: Strings, for information on escape sequences you can use
  991.      in `as' strings.
  992.      *Warning!* The HPPA version of `.string' differs from the usual
  993.      `as' definition: it does *not* write a zero byte after copying STR.
  994. `.stringz "STR"'
  995.      Like `.string', but appends a zero byte after copying STR to object
  996.      file.
  997. `.subspa NAME [ ,PARAMS ]'
  998. `.nsubspa NAME [ ,PARAMS ]'
  999.      Similar to `.space', but selects a subsection NAME within the
  1000.      current section.  You may only specify PARAMS when you create a
  1001.      subsection (in the first instance of `.subspa' for this NAME).
  1002.      If specified, the list PARAMS declares attributes of the
  1003.      subsection, identified by keywords.  The keywords recognized are
  1004.      `quad=EXPR' ("quadrant" for this subsection), `align=EXPR'
  1005.      (alignment for beginning of this subsection; a power of two),
  1006.      `access=EXPR' (value for "access rights" field), `sort=EXPR'
  1007.      (sorting order for this subspace in link), `code_only' (subsection
  1008.      contains only code), `unloadable' (subsection cannot be loaded
  1009.      into memory), `common' (subsection is common block), `dup_comm'
  1010.      (initialized data may have duplicate names), or `zero' (subsection
  1011.      is all zeros, do not write in object file).
  1012.      `.nsubspa' always creates a new subspace with the given name, even
  1013.      if one with the same name already exists.
  1014. `.version "STR"'
  1015.      Write STR as version identifier in object code.
  1016. File: as.info,  Node: HPPA Opcodes,  Prev: HPPA Directives,  Up: HPPA-Dependent
  1017. Opcodes
  1018. -------
  1019.    For detailed information on the HPPA machine instruction set, see
  1020. `PA-RISC Architecture and Instruction Set Reference Manual' (HP
  1021. 09740-90039).
  1022. File: as.info,  Node: i386-Dependent,  Next: i960-Dependent,  Prev: HPPA-Dependent,  Up: Machine Dependencies
  1023. 80386 Dependent Features
  1024. ========================
  1025. * Menu:
  1026. * i386-Options::                Options
  1027. * i386-Syntax::                 AT&T Syntax versus Intel Syntax
  1028. * i386-Opcodes::                Opcode Naming
  1029. * i386-Regs::                   Register Naming
  1030. * i386-prefixes::               Opcode Prefixes
  1031. * i386-Memory::                 Memory References
  1032. * i386-jumps::                  Handling of Jump Instructions
  1033. * i386-Float::                  Floating Point
  1034. * i386-16bit::                  Writing 16-bit Code
  1035. * i386-Notes::                  Notes
  1036. File: as.info,  Node: i386-Options,  Next: i386-Syntax,  Up: i386-Dependent
  1037. Options
  1038. -------
  1039.    The 80386 has no machine dependent options.
  1040.