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-5 (.txt) < prev    next >
GNU Info File  |  1996-09-28  |  36KB  |  720 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: SH Opcodes,  Prev: SH Directives,  Up: SH-Dependent
  19. Opcodes
  20. -------
  21.    For detailed information on the SH machine instruction set, see
  22. `SH-Microcomputer User's Manual' (Hitachi Micro Systems, Inc.).
  23.    `as' implements all the standard SH opcodes.  No additional
  24. pseudo-instructions are needed on this family.  Note, however, that
  25. because `as' supports a simpler form of PC-relative addressing, you may
  26. simply write (for example)
  27.      mov.l  bar,r0
  28. where other assemblers might require an explicit displacement to `bar'
  29. from the program counter:
  30.      mov.l  @(DISP, PC)
  31.    Here is a summary of SH opcodes:
  32.      Legend:
  33.      Rn        a numbered register
  34.      Rm        another numbered register
  35.      #imm      immediate data
  36.      disp      displacement
  37.      disp8     8-bit displacement
  38.      disp12    12-bit displacement
  39.      
  40.      add #imm,Rn                    lds.l @Rn+,PR
  41.      add Rm,Rn                      mac.w @Rm+,@Rn+
  42.      addc Rm,Rn                     mov #imm,Rn
  43.      addv Rm,Rn                     mov Rm,Rn
  44.      and #imm,R0                    mov.b Rm,@(R0,Rn)
  45.      and Rm,Rn                      mov.b Rm,@-Rn
  46.      and.b #imm,@(R0,GBR)           mov.b Rm,@Rn
  47.      bf disp8                       mov.b @(disp,Rm),R0
  48.      bra disp12                     mov.b @(disp,GBR),R0
  49.      bsr disp12                     mov.b @(R0,Rm),Rn
  50.      bt disp8                       mov.b @Rm+,Rn
  51.      clrmac                         mov.b @Rm,Rn
  52.      clrt                           mov.b R0,@(disp,Rm)
  53.      cmp/eq #imm,R0                 mov.b R0,@(disp,GBR)
  54.      cmp/eq Rm,Rn                   mov.l Rm,@(disp,Rn)
  55.      cmp/ge Rm,Rn                   mov.l Rm,@(R0,Rn)
  56.      cmp/gt Rm,Rn                   mov.l Rm,@-Rn
  57.      cmp/hi Rm,Rn                   mov.l Rm,@Rn
  58.      cmp/hs Rm,Rn                   mov.l @(disp,Rn),Rm
  59.      cmp/pl Rn                      mov.l @(disp,GBR),R0
  60.      cmp/pz Rn                      mov.l @(disp,PC),Rn
  61.      cmp/str Rm,Rn                  mov.l @(R0,Rm),Rn
  62.      div0s Rm,Rn                    mov.l @Rm+,Rn
  63.      div0u                          mov.l @Rm,Rn
  64.      div1 Rm,Rn                     mov.l R0,@(disp,GBR)
  65.      exts.b Rm,Rn                   mov.w Rm,@(R0,Rn)
  66.      exts.w Rm,Rn                   mov.w Rm,@-Rn
  67.      extu.b Rm,Rn                   mov.w Rm,@Rn
  68.      extu.w Rm,Rn                   mov.w @(disp,Rm),R0
  69.      jmp @Rn                        mov.w @(disp,GBR),R0
  70.      jsr @Rn                        mov.w @(disp,PC),Rn
  71.      ldc Rn,GBR                     mov.w @(R0,Rm),Rn
  72.      ldc Rn,SR                      mov.w @Rm+,Rn
  73.      ldc Rn,VBR                     mov.w @Rm,Rn
  74.      ldc.l @Rn+,GBR                 mov.w R0,@(disp,Rm)
  75.      ldc.l @Rn+,SR                  mov.w R0,@(disp,GBR)
  76.      ldc.l @Rn+,VBR                 mova @(disp,PC),R0
  77.      lds Rn,MACH                    movt Rn
  78.      lds Rn,MACL                    muls Rm,Rn
  79.      lds Rn,PR                      mulu Rm,Rn
  80.      lds.l @Rn+,MACH                neg Rm,Rn
  81.      lds.l @Rn+,MACL                negc Rm,Rn
  82.      
  83.      nop                            stc VBR,Rn
  84.      not Rm,Rn                      stc.l GBR,@-Rn
  85.      or #imm,R0                     stc.l SR,@-Rn
  86.      or Rm,Rn                       stc.l VBR,@-Rn
  87.      or.b #imm,@(R0,GBR)            sts MACH,Rn
  88.      rotcl Rn                       sts MACL,Rn
  89.      rotcr Rn                       sts PR,Rn
  90.      rotl Rn                        sts.l MACH,@-Rn
  91.      rotr Rn                        sts.l MACL,@-Rn
  92.      rte                            sts.l PR,@-Rn
  93.      rts                            sub Rm,Rn
  94.      sett                           subc Rm,Rn
  95.      shal Rn                        subv Rm,Rn
  96.      shar Rn                        swap.b Rm,Rn
  97.      shll Rn                        swap.w Rm,Rn
  98.      shll16 Rn                      tas.b @Rn
  99.      shll2 Rn                       trapa #imm
  100.      shll8 Rn                       tst #imm,R0
  101.      shlr Rn                        tst Rm,Rn
  102.      shlr16 Rn                      tst.b #imm,@(R0,GBR)
  103.      shlr2 Rn                       xor #imm,R0
  104.      shlr8 Rn                       xor Rm,Rn
  105.      sleep                          xor.b #imm,@(R0,GBR)
  106.      stc GBR,Rn                     xtrct Rm,Rn
  107.      stc SR,Rn
  108. File: as.info,  Node: Sparc-Dependent,  Next: Z8000-Dependent,  Prev: SH-Dependent,  Up: Machine Dependencies
  109. SPARC Dependent Features
  110. ========================
  111. * Menu:
  112. * Sparc-Opts::                  Options
  113. * Sparc-Float::                 Floating Point
  114. * Sparc-Directives::            Sparc Machine Directives
  115. File: as.info,  Node: Sparc-Opts,  Next: Sparc-Float,  Up: Sparc-Dependent
  116. Options
  117. -------
  118.    The SPARC chip family includes several successive levels, using the
  119. same core instruction set, but including a few additional instructions
  120. at each level.  There are exceptions to this however.  For details on
  121. what instructions each variant supports, please see the chip's
  122. architecture reference manual.
  123.    By default, `as' assumes the core instruction set (SPARC v6), but
  124. "bumps" the architecture level as needed: it switches to successively
  125. higher architectures as it encounters instructions that only exist in
  126. the higher levels.
  127.    If not configured for SPARC v9 (`sparc64-*-*') GAS will not bump
  128. passed sparclite by default, an option must be passed to enable the v9
  129. instructions.
  130.    GAS treats sparclite as being compatible with v8, unless an
  131. architecture is explicitly requested.  SPARC v9 is always incompatible
  132. with sparclite.
  133. `-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite | -Av9 | -Av9a'
  134.      Use one of the `-A' options to select one of the SPARC
  135.      architectures explicitly.  If you select an architecture
  136.      explicitly, `as' reports a fatal error if it encounters an
  137.      instruction or feature requiring a higher level.
  138. `-xarch=v8plus | -xarch=v8plusa'
  139.      For compatibility with the Solaris v9 assembler.  These options are
  140.      equivalent to -Av9 and -Av9a, respectively.
  141. `-bump'
  142.      Warn whenever it is necessary to switch to another level.  If an
  143.      architecture level is explicitly requested, GAS will not issue
  144.      warnings until that level is reached, and will then bump the level
  145.      as required (except between incompatible levels).
  146. File: as.info,  Node: Sparc-Float,  Next: Sparc-Directives,  Prev: Sparc-Opts,  Up: Sparc-Dependent
  147. Floating Point
  148. --------------
  149.    The Sparc uses IEEE floating-point numbers.
  150. File: as.info,  Node: Sparc-Directives,  Prev: Sparc-Float,  Up: Sparc-Dependent
  151. Sparc Machine Directives
  152. ------------------------
  153.    The Sparc version of `as' supports the following additional machine
  154. directives:
  155. `.align'
  156.      This must be followed by the desired alignment in bytes.
  157. `.common'
  158.      This must be followed by a symbol name, a positive number, and
  159.      `"bss"'.  This behaves somewhat like `.comm', but the syntax is
  160.      different.
  161. `.half'
  162.      This is functionally identical to `.short'.
  163. `.proc'
  164.      This directive is ignored.  Any text following it on the same line
  165.      is also ignored.
  166. `.reserve'
  167.      This must be followed by a symbol name, a positive number, and
  168.      `"bss"'.  This behaves somewhat like `.lcomm', but the syntax is
  169.      different.
  170. `.seg'
  171.      This must be followed by `"text"', `"data"', or `"data1"'.  It
  172.      behaves like `.text', `.data', or `.data 1'.
  173. `.skip'
  174.      This is functionally identical to the `.space' directive.
  175. `.word'
  176.      On the Sparc, the `.word' directive produces 32 bit values,
  177.      instead of the 16 bit values it produces on many other machines.
  178. `.xword'
  179.      On the Sparc V9 processor, the `.xword' directive produces 64 bit
  180.      values.
  181. File: as.info,  Node: Z8000-Dependent,  Next: Vax-Dependent,  Prev: Sparc-Dependent,  Up: Machine Dependencies
  182. Z8000 Dependent Features
  183. ========================
  184.    The Z8000 as supports both members of the Z8000 family: the
  185. unsegmented Z8002, with 16 bit addresses, and the segmented Z8001 with
  186. 24 bit addresses.
  187.    When the assembler is in unsegmented mode (specified with the
  188. `unsegm' directive), an address takes up one word (16 bit) sized
  189. register.  When the assembler is in segmented mode (specified with the
  190. `segm' directive), a 24-bit address takes up a long (32 bit) register.
  191. *Note Assembler Directives for the Z8000: Z8000 Directives, for a list
  192. of other Z8000 specific assembler directives.
  193. * Menu:
  194. * Z8000 Options::               No special command-line options for Z8000
  195. * Z8000 Syntax::                Assembler syntax for the Z8000
  196. * Z8000 Directives::            Special directives for the Z8000
  197. * Z8000 Opcodes::               Opcodes
  198. File: as.info,  Node: Z8000 Options,  Next: Z8000 Syntax,  Up: Z8000-Dependent
  199. Options
  200. -------
  201.    `as' has no additional command-line options for the Zilog Z8000
  202. family.
  203. File: as.info,  Node: Z8000 Syntax,  Next: Z8000 Directives,  Prev: Z8000 Options,  Up: Z8000-Dependent
  204. Syntax
  205. ------
  206. * Menu:
  207. * Z8000-Chars::                Special Characters
  208. * Z8000-Regs::                 Register Names
  209. * Z8000-Addressing::           Addressing Modes
  210. File: as.info,  Node: Z8000-Chars,  Next: Z8000-Regs,  Up: Z8000 Syntax
  211. Special Characters
  212. ..................
  213.    `!' is the line comment character.
  214.    You can use `;' instead of a newline to separate statements.
  215. File: as.info,  Node: Z8000-Regs,  Next: Z8000-Addressing,  Prev: Z8000-Chars,  Up: Z8000 Syntax
  216. Register Names
  217. ..............
  218.    The Z8000 has sixteen 16 bit registers, numbered 0 to 15.  You can
  219. refer to different sized groups of registers by register number, with
  220. the prefix `r' for 16 bit registers, `rr' for 32 bit registers and `rq'
  221. for 64 bit registers.  You can also refer to the contents of the first
  222. eight (of the sixteen 16 bit registers) by bytes.  They are named `rNh'
  223. and `rNl'.
  224. *byte registers*
  225.      r0l r0h r1h r1l r2h r2l r3h r3l
  226.      r4h r4l r5h r5l r6h r6l r7h r7l
  227. *word registers*
  228.      r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15
  229. *long word registers*
  230.      rr0 rr2 rr4 rr6 rr8 rr10 rr12 rr14
  231. *quad word registers*
  232.      rq0 rq4 rq8 rq12
  233. File: as.info,  Node: Z8000-Addressing,  Prev: Z8000-Regs,  Up: Z8000 Syntax
  234. Addressing Modes
  235. ................
  236.    as understands the following addressing modes for the Z8000:
  237.      Register direct
  238. `@rN'
  239.      Indirect register
  240. `ADDR'
  241.      Direct: the 16 bit or 24 bit address (depending on whether the
  242.      assembler is in segmented or unsegmented mode) of the operand is
  243.      in the instruction.
  244. `address(rN)'
  245.      Indexed: the 16 or 24 bit address is added to the 16 bit register
  246.      to produce the final address in memory of the operand.
  247. `rN(#IMM)'
  248.      Base Address: the 16 or 24 bit register is added to the 16 bit sign
  249.      extended immediate displacement to produce the final address in
  250.      memory of the operand.
  251. `rN(rM)'
  252.      Base Index: the 16 or 24 bit register rN is added to the sign
  253.      extended 16 bit index register rM to produce the final address in
  254.      memory of the operand.
  255. `#XX'
  256.      Immediate data XX.
  257. File: as.info,  Node: Z8000 Directives,  Next: Z8000 Opcodes,  Prev: Z8000 Syntax,  Up: Z8000-Dependent
  258. Assembler Directives for the Z8000
  259. ----------------------------------
  260.    The Z8000 port of as includes these additional assembler directives,
  261. for compatibility with other Z8000 assemblers.  As shown, these do not
  262. begin with `.' (unlike the ordinary as directives).
  263. `segm'
  264.      Generates code for the segmented Z8001.
  265. `unsegm'
  266.      Generates code for the unsegmented Z8002.
  267. `name'
  268.      Synonym for `.file'
  269. `global'
  270.      Synonym for `.global'
  271. `wval'
  272.      Synonym for `.word'
  273. `lval'
  274.      Synonym for `.long'
  275. `bval'
  276.      Synonym for `.byte'
  277. `sval'
  278.      Assemble a string.  `sval' expects one string literal, delimited by
  279.      single quotes.  It assembles each byte of the string into
  280.      consecutive addresses.  You can use the escape sequence `%XX'
  281.      (where XX represents a two-digit hexadecimal number) to represent
  282.      the character whose ASCII value is XX.  Use this feature to
  283.      describe single quote and other characters that may not appear in
  284.      string literals as themselves.  For example, the C statement
  285.      `char *a = "he said \"it's 50% off\"";' is represented in Z8000
  286.      assembly language (shown with the assembler output in hex at the
  287.      left) as
  288.           68652073    sval    'he said %22it%27s 50%25 off%22%00'
  289.           61696420
  290.           22697427
  291.           73203530
  292.           25206F66
  293.           662200
  294. `rsect'
  295.      synonym for `.section'
  296. `block'
  297.      synonym for `.space'
  298. `even'
  299.      special case of `.align'; aligns output to even byte boundary.
  300. File: as.info,  Node: Z8000 Opcodes,  Prev: Z8000 Directives,  Up: Z8000-Dependent
  301. Opcodes
  302. -------
  303.    For detailed information on the Z8000 machine instruction set, see
  304. `Z8000 Technical Manual'.
  305.    The following table summarizes the opcodes and their arguments:
  306.                  rs   16 bit source register
  307.                  rd   16 bit destination register
  308.                  rbs   8 bit source register
  309.                  rbd   8 bit destination register
  310.                  rrs   32 bit source register
  311.                  rrd   32 bit destination register
  312.                  rqs   64 bit source register
  313.                  rqd   64 bit destination register
  314.                  addr 16/24 bit address
  315.                  imm  immediate data
  316.      
  317.      adc rd,rs               clrb addr               cpsir @rd,@rs,rr,cc
  318.      adcb rbd,rbs            clrb addr(rd)           cpsirb @rd,@rs,rr,cc
  319.      add rd,@rs              clrb rbd                dab rbd
  320.      add rd,addr             com @rd                 dbjnz rbd,disp7
  321.      add rd,addr(rs)         com addr                dec @rd,imm4m1
  322.      add rd,imm16            com addr(rd)            dec addr(rd),imm4m1
  323.      add rd,rs               com rd                  dec addr,imm4m1
  324.      addb rbd,@rs            comb @rd                dec rd,imm4m1
  325.      addb rbd,addr           comb addr               decb @rd,imm4m1
  326.      addb rbd,addr(rs)       comb addr(rd)           decb addr(rd),imm4m1
  327.      addb rbd,imm8           comb rbd                decb addr,imm4m1
  328.      addb rbd,rbs            comflg flags            decb rbd,imm4m1
  329.      addl rrd,@rs            cp @rd,imm16            di i2
  330.      addl rrd,addr           cp addr(rd),imm16       div rrd,@rs
  331.      addl rrd,addr(rs)       cp addr,imm16           div rrd,addr
  332.      addl rrd,imm32          cp rd,@rs               div rrd,addr(rs)
  333.      addl rrd,rrs            cp rd,addr              div rrd,imm16
  334.      and rd,@rs              cp rd,addr(rs)          div rrd,rs
  335.      and rd,addr             cp rd,imm16             divl rqd,@rs
  336.      and rd,addr(rs)         cp rd,rs                divl rqd,addr
  337.      and rd,imm16            cpb @rd,imm8            divl rqd,addr(rs)
  338.      and rd,rs               cpb addr(rd),imm8       divl rqd,imm32
  339.      andb rbd,@rs            cpb addr,imm8           divl rqd,rrs
  340.      andb rbd,addr           cpb rbd,@rs             djnz rd,disp7
  341.      andb rbd,addr(rs)       cpb rbd,addr            ei i2
  342.      andb rbd,imm8           cpb rbd,addr(rs)        ex rd,@rs
  343.      andb rbd,rbs            cpb rbd,imm8            ex rd,addr
  344.      bit @rd,imm4            cpb rbd,rbs             ex rd,addr(rs)
  345.      bit addr(rd),imm4       cpd rd,@rs,rr,cc        ex rd,rs
  346.      bit addr,imm4           cpdb rbd,@rs,rr,cc      exb rbd,@rs
  347.      bit rd,imm4             cpdr rd,@rs,rr,cc       exb rbd,addr
  348.      bit rd,rs               cpdrb rbd,@rs,rr,cc     exb rbd,addr(rs)
  349.      bitb @rd,imm4           cpi rd,@rs,rr,cc        exb rbd,rbs
  350.      bitb addr(rd),imm4      cpib rbd,@rs,rr,cc      ext0e imm8
  351.      bitb addr,imm4          cpir rd,@rs,rr,cc       ext0f imm8
  352.      bitb rbd,imm4           cpirb rbd,@rs,rr,cc     ext8e imm8
  353.      bitb rbd,rs             cpl rrd,@rs             ext8f imm8
  354.      bpt                     cpl rrd,addr            exts rrd
  355.      call @rd                cpl rrd,addr(rs)        extsb rd
  356.      call addr               cpl rrd,imm32           extsl rqd
  357.      call addr(rd)           cpl rrd,rrs             halt
  358.      calr disp12             cpsd @rd,@rs,rr,cc      in rd,@rs
  359.      clr @rd                 cpsdb @rd,@rs,rr,cc     in rd,imm16
  360.      clr addr                cpsdr @rd,@rs,rr,cc     inb rbd,@rs
  361.      clr addr(rd)            cpsdrb @rd,@rs,rr,cc    inb rbd,imm16
  362.      clr rd                  cpsi @rd,@rs,rr,cc      inc @rd,imm4m1
  363.      clrb @rd                cpsib @rd,@rs,rr,cc     inc addr(rd),imm4m1
  364.      inc addr,imm4m1         ldb rbd,rs(rx)          mult rrd,addr(rs)
  365.      inc rd,imm4m1           ldb rd(imm16),rbs       mult rrd,imm16
  366.      incb @rd,imm4m1         ldb rd(rx),rbs          mult rrd,rs
  367.      incb addr(rd),imm4m1    ldctl ctrl,rs           multl rqd,@rs
  368.      incb addr,imm4m1        ldctl rd,ctrl           multl rqd,addr
  369.      incb rbd,imm4m1         ldd @rs,@rd,rr          multl rqd,addr(rs)
  370.      ind @rd,@rs,ra          lddb @rs,@rd,rr         multl rqd,imm32
  371.      indb @rd,@rs,rba        lddr @rs,@rd,rr         multl rqd,rrs
  372.      inib @rd,@rs,ra         lddrb @rs,@rd,rr        neg @rd
  373.      inibr @rd,@rs,ra        ldi @rd,@rs,rr          neg addr
  374.      iret                    ldib @rd,@rs,rr         neg addr(rd)
  375.      jp cc,@rd               ldir @rd,@rs,rr         neg rd
  376.      jp cc,addr              ldirb @rd,@rs,rr        negb @rd
  377.      jp cc,addr(rd)          ldk rd,imm4             negb addr
  378.      jr cc,disp8             ldl @rd,rrs             negb addr(rd)
  379.      ld @rd,imm16            ldl addr(rd),rrs        negb rbd
  380.      ld @rd,rs               ldl addr,rrs            nop
  381.      ld addr(rd),imm16       ldl rd(imm16),rrs       or rd,@rs
  382.      ld addr(rd),rs          ldl rd(rx),rrs          or rd,addr
  383.      ld addr,imm16           ldl rrd,@rs             or rd,addr(rs)
  384.      ld addr,rs              ldl rrd,addr            or rd,imm16
  385.      ld rd(imm16),rs         ldl rrd,addr(rs)        or rd,rs
  386.      ld rd(rx),rs            ldl rrd,imm32           orb rbd,@rs
  387.      ld rd,@rs               ldl rrd,rrs             orb rbd,addr
  388.      ld rd,addr              ldl rrd,rs(imm16)       orb rbd,addr(rs)
  389.      ld rd,addr(rs)          ldl rrd,rs(rx)          orb rbd,imm8
  390.      ld rd,imm16             ldm @rd,rs,n            orb rbd,rbs
  391.      ld rd,rs                ldm addr(rd),rs,n       out @rd,rs
  392.      ld rd,rs(imm16)         ldm addr,rs,n           out imm16,rs
  393.      ld rd,rs(rx)            ldm rd,@rs,n            outb @rd,rbs
  394.      lda rd,addr             ldm rd,addr(rs),n       outb imm16,rbs
  395.      lda rd,addr(rs)         ldm rd,addr,n           outd @rd,@rs,ra
  396.      lda rd,rs(imm16)        ldps @rs                outdb @rd,@rs,rba
  397.      lda rd,rs(rx)           ldps addr               outib @rd,@rs,ra
  398.      ldar rd,disp16          ldps addr(rs)           outibr @rd,@rs,ra
  399.      ldb @rd,imm8            ldr disp16,rs           pop @rd,@rs
  400.      ldb @rd,rbs             ldr rd,disp16           pop addr(rd),@rs
  401.      ldb addr(rd),imm8       ldrb disp16,rbs         pop addr,@rs
  402.      ldb addr(rd),rbs        ldrb rbd,disp16         pop rd,@rs
  403.      ldb addr,imm8           ldrl disp16,rrs         popl @rd,@rs
  404.      ldb addr,rbs            ldrl rrd,disp16         popl addr(rd),@rs
  405.      ldb rbd,@rs             mbit                    popl addr,@rs
  406.      ldb rbd,addr            mreq rd                 popl rrd,@rs
  407.      ldb rbd,addr(rs)        mres                    push @rd,@rs
  408.      ldb rbd,imm8            mset                    push @rd,addr
  409.      ldb rbd,rbs             mult rrd,@rs            push @rd,addr(rs)
  410.      ldb rbd,rs(imm16)       mult rrd,addr           push @rd,imm16
  411.      push @rd,rs             set addr,imm4           subl rrd,imm32
  412.      pushl @rd,@rs           set rd,imm4             subl rrd,rrs
  413.      pushl @rd,addr          set rd,rs               tcc cc,rd
  414.      pushl @rd,addr(rs)      setb @rd,imm4           tccb cc,rbd
  415.      pushl @rd,rrs           setb addr(rd),imm4      test @rd
  416.      res @rd,imm4            setb addr,imm4          test addr
  417.      res addr(rd),imm4       setb rbd,imm4           test addr(rd)
  418.      res addr,imm4           setb rbd,rs             test rd
  419.      res rd,imm4             setflg imm4             testb @rd
  420.      res rd,rs               sinb rbd,imm16          testb addr
  421.      resb @rd,imm4           sinb rd,imm16           testb addr(rd)
  422.      resb addr(rd),imm4      sind @rd,@rs,ra         testb rbd
  423.      resb addr,imm4          sindb @rd,@rs,rba       testl @rd
  424.      resb rbd,imm4           sinib @rd,@rs,ra        testl addr
  425.      resb rbd,rs             sinibr @rd,@rs,ra       testl addr(rd)
  426.      resflg imm4             sla rd,imm8             testl rrd
  427.      ret cc                  slab rbd,imm8           trdb @rd,@rs,rba
  428.      rl rd,imm1or2           slal rrd,imm8           trdrb @rd,@rs,rba
  429.      rlb rbd,imm1or2         sll rd,imm8             trib @rd,@rs,rbr
  430.      rlc rd,imm1or2          sllb rbd,imm8           trirb @rd,@rs,rbr
  431.      rlcb rbd,imm1or2        slll rrd,imm8           trtdrb @ra,@rb,rbr
  432.      rldb rbb,rba            sout imm16,rs           trtib @ra,@rb,rr
  433.      rr rd,imm1or2           soutb imm16,rbs         trtirb @ra,@rb,rbr
  434.      rrb rbd,imm1or2         soutd @rd,@rs,ra        trtrb @ra,@rb,rbr
  435.      rrc rd,imm1or2          soutdb @rd,@rs,rba      tset @rd
  436.      rrcb rbd,imm1or2        soutib @rd,@rs,ra       tset addr
  437.      rrdb rbb,rba            soutibr @rd,@rs,ra      tset addr(rd)
  438.      rsvd36                  sra rd,imm8             tset rd
  439.      rsvd38                  srab rbd,imm8           tsetb @rd
  440.      rsvd78                  sral rrd,imm8           tsetb addr
  441.      rsvd7e                  srl rd,imm8             tsetb addr(rd)
  442.      rsvd9d                  srlb rbd,imm8           tsetb rbd
  443.      rsvd9f                  srll rrd,imm8           xor rd,@rs
  444.      rsvdb9                  sub rd,@rs              xor rd,addr
  445.      rsvdbf                  sub rd,addr             xor rd,addr(rs)
  446.      sbc rd,rs               sub rd,addr(rs)         xor rd,imm16
  447.      sbcb rbd,rbs            sub rd,imm16            xor rd,rs
  448.      sc imm8                 sub rd,rs               xorb rbd,@rs
  449.      sda rd,rs               subb rbd,@rs            xorb rbd,addr
  450.      sdab rbd,rs             subb rbd,addr           xorb rbd,addr(rs)
  451.      sdal rrd,rs             subb rbd,addr(rs)       xorb rbd,imm8
  452.      sdl rd,rs               subb rbd,imm8           xorb rbd,rbs
  453.      sdlb rbd,rs             subb rbd,rbs            xorb rbd,rbs
  454.      sdll rrd,rs             subl rrd,@rs
  455.      set @rd,imm4            subl rrd,addr
  456.      set addr(rd),imm4       subl rrd,addr(rs)
  457. File: as.info,  Node: Vax-Dependent,  Prev: Z8000-Dependent,  Up: Machine Dependencies
  458. VAX Dependent Features
  459. ======================
  460. * Menu:
  461. * VAX-Opts::                    VAX Command-Line Options
  462. * VAX-float::                   VAX Floating Point
  463. * VAX-directives::              Vax Machine Directives
  464. * VAX-opcodes::                 VAX Opcodes
  465. * VAX-branch::                  VAX Branch Improvement
  466. * VAX-operands::                VAX Operands
  467. * VAX-no::                      Not Supported on VAX
  468. File: as.info,  Node: VAX-Opts,  Next: VAX-float,  Up: Vax-Dependent
  469. VAX Command-Line Options
  470. ------------------------
  471.    The Vax version of `as' accepts any of the following options, gives
  472. a warning message that the option was ignored and proceeds.  These
  473. options are for compatibility with scripts designed for other people's
  474. assemblers.
  475. ``-D' (Debug)'
  476. ``-S' (Symbol Table)'
  477. ``-T' (Token Trace)'
  478.      These are obsolete options used to debug old assemblers.
  479. ``-d' (Displacement size for JUMPs)'
  480.      This option expects a number following the `-d'.  Like options
  481.      that expect filenames, the number may immediately follow the `-d'
  482.      (old standard) or constitute the whole of the command line
  483.      argument that follows `-d' (GNU standard).
  484. ``-V' (Virtualize Interpass Temporary File)'
  485.      Some other assemblers use a temporary file.  This option commanded
  486.      them to keep the information in active memory rather than in a
  487.      disk file.  `as' always does this, so this option is redundant.
  488. ``-J' (JUMPify Longer Branches)'
  489.      Many 32-bit computers permit a variety of branch instructions to
  490.      do the same job.  Some of these instructions are short (and fast)
  491.      but have a limited range; others are long (and slow) but can
  492.      branch anywhere in virtual memory.  Often there are 3 flavors of
  493.      branch: short, medium and long.  Some other assemblers would emit
  494.      short and medium branches, unless told by this option to emit
  495.      short and long branches.
  496. ``-t' (Temporary File Directory)'
  497.      Some other assemblers may use a temporary file, and this option
  498.      takes a filename being the directory to site the temporary file.
  499.      Since `as' does not use a temporary disk file, this option makes
  500.      no difference.  `-t' needs exactly one filename.
  501.    The Vax version of the assembler accepts two options when compiled
  502. for VMS.  They are `-h', and `-+'.  The `-h' option prevents `as' from
  503. modifying the symbol-table entries for symbols that contain lowercase
  504. characters (I think).  The `-+' option causes `as' to print warning
  505. messages if the FILENAME part of the object file, or any symbol name is
  506. larger than 31 characters.  The `-+' option also inserts some code
  507. following the `_main' symbol so that the object file is compatible with
  508. Vax-11 "C".
  509. File: as.info,  Node: VAX-float,  Next: VAX-directives,  Prev: VAX-Opts,  Up: Vax-Dependent
  510. VAX Floating Point
  511. ------------------
  512.    Conversion of flonums to floating point is correct, and compatible
  513. with previous assemblers.  Rounding is towards zero if the remainder is
  514. exactly half the least significant bit.
  515.    `D', `F', `G' and `H' floating point formats are understood.
  516.    Immediate floating literals (*e.g.* `S`$6.9') are rendered
  517. correctly.  Again, rounding is towards zero in the boundary case.
  518.    The `.float' directive produces `f' format numbers.  The `.double'
  519. directive produces `d' format numbers.
  520. File: as.info,  Node: VAX-directives,  Next: VAX-opcodes,  Prev: VAX-float,  Up: Vax-Dependent
  521. Vax Machine Directives
  522. ----------------------
  523.    The Vax version of the assembler supports four directives for
  524. generating Vax floating point constants.  They are described in the
  525. table below.
  526. `.dfloat'
  527.      This expects zero or more flonums, separated by commas, and
  528.      assembles Vax `d' format 64-bit floating point constants.
  529. `.ffloat'
  530.      This expects zero or more flonums, separated by commas, and
  531.      assembles Vax `f' format 32-bit floating point constants.
  532. `.gfloat'
  533.      This expects zero or more flonums, separated by commas, and
  534.      assembles Vax `g' format 64-bit floating point constants.
  535. `.hfloat'
  536.      This expects zero or more flonums, separated by commas, and
  537.      assembles Vax `h' format 128-bit floating point constants.
  538. File: as.info,  Node: VAX-opcodes,  Next: VAX-branch,  Prev: VAX-directives,  Up: Vax-Dependent
  539. VAX Opcodes
  540. -----------
  541.    All DEC mnemonics are supported.  Beware that `case...' instructions
  542. have exactly 3 operands.  The dispatch table that follows the `case...'
  543. instruction should be made with `.word' statements.  This is compatible
  544. with all unix assemblers we know of.
  545. File: as.info,  Node: VAX-branch,  Next: VAX-operands,  Prev: VAX-opcodes,  Up: Vax-Dependent
  546. VAX Branch Improvement
  547. ----------------------
  548.    Certain pseudo opcodes are permitted.  They are for branch
  549. instructions.  They expand to the shortest branch instruction that
  550. reaches the target.  Generally these mnemonics are made by substituting
  551. `j' for `b' at the start of a DEC mnemonic.  This feature is included
  552. both for compatibility and to help compilers.  If you do not need this
  553. feature, avoid these opcodes.  Here are the mnemonics, and the code
  554. they can expand into.
  555. `jbsb'
  556.      `Jsb' is already an instruction mnemonic, so we chose `jbsb'.
  557.     (byte displacement)
  558.           `bsbb ...'
  559.     (word displacement)
  560.           `bsbw ...'
  561.     (long displacement)
  562.           `jsb ...'
  563. `jbr'
  564.      Unconditional branch.
  565.     (byte displacement)
  566.           `brb ...'
  567.     (word displacement)
  568.           `brw ...'
  569.     (long displacement)
  570.           `jmp ...'
  571. `jCOND'
  572.      COND may be any one of the conditional branches `neq', `nequ',
  573.      `eql', `eqlu', `gtr', `geq', `lss', `gtru', `lequ', `vc', `vs',
  574.      `gequ', `cc', `lssu', `cs'.  COND may also be one of the bit tests
  575.      `bs', `bc', `bss', `bcs', `bsc', `bcc', `bssi', `bcci', `lbs',
  576.      `lbc'.  NOTCOND is the opposite condition to COND.
  577.     (byte displacement)
  578.           `bCOND ...'
  579.     (word displacement)
  580.           `bNOTCOND foo ; brw ... ; foo:'
  581.     (long displacement)
  582.           `bNOTCOND foo ; jmp ... ; foo:'
  583. `jacbX'
  584.      X may be one of `b d f g h l w'.
  585.     (word displacement)
  586.           `OPCODE ...'
  587.     (long displacement)
  588.                OPCODE ..., foo ;
  589.                brb bar ;
  590.                foo: jmp ... ;
  591.                bar:
  592. `jaobYYY'
  593.      YYY may be one of `lss leq'.
  594. `jsobZZZ'
  595.      ZZZ may be one of `geq gtr'.
  596.     (byte displacement)
  597.           `OPCODE ...'
  598.     (word displacement)
  599.                OPCODE ..., foo ;
  600.                brb bar ;
  601.                foo: brw DESTINATION ;
  602.                bar:
  603.     (long displacement)
  604.                OPCODE ..., foo ;
  605.                brb bar ;
  606.                foo: jmp DESTINATION ;
  607.                bar:
  608. `aobleq'
  609. `aoblss'
  610. `sobgeq'
  611. `sobgtr'
  612.     (byte displacement)
  613.           `OPCODE ...'
  614.     (word displacement)
  615.                OPCODE ..., foo ;
  616.                brb bar ;
  617.                foo: brw DESTINATION ;
  618.                bar:
  619.     (long displacement)
  620.                OPCODE ..., foo ;
  621.                brb bar ;
  622.                foo: jmp DESTINATION ;
  623.                bar:
  624. File: as.info,  Node: VAX-operands,  Next: VAX-no,  Prev: VAX-branch,  Up: Vax-Dependent
  625. VAX Operands
  626. ------------
  627.    The immediate character is `$' for Unix compatibility, not `#' as
  628. DEC writes it.
  629.    The indirect character is `*' for Unix compatibility, not `@' as DEC
  630. writes it.
  631.    The displacement sizing character is ``' (an accent grave) for Unix
  632. compatibility, not `^' as DEC writes it.  The letter preceding ``' may
  633. have either case.  `G' is not understood, but all other letters (`b i l
  634. s w') are understood.
  635.    Register names understood are `r0 r1 r2 ... r15 ap fp sp pc'.  Upper
  636. and lower case letters are equivalent.
  637.    For instance
  638.      tstb *w`$4(r5)
  639.    Any expression is permitted in an operand.  Operands are comma
  640. separated.
  641. File: as.info,  Node: VAX-no,  Prev: VAX-operands,  Up: Vax-Dependent
  642. Not Supported on VAX
  643. --------------------
  644.    Vax bit fields can not be assembled with `as'.  Someone can add the
  645. required code if they really need it.
  646. File: as.info,  Node: Acknowledgements,  Next: Index,  Prev: Machine Dependencies,  Up: Top
  647. Acknowledgements
  648. ****************
  649.    If you have contributed to `as' and your name isn't listed here, it
  650. is not meant as a slight.  We just don't know about it.  Send mail to
  651. the maintainer, and we'll correct the situation.  Currently the
  652. maintainer is Ken Raeburn (email address `raeburn@cygnus.com').
  653.    Dean Elsner wrote the original GNU assembler for the VAX.(1)
  654.    Jay Fenlason maintained GAS for a while, adding support for
  655. GDB-specific debug information and the 68k series machines, most of the
  656. preprocessing pass, and extensive changes in `messages.c',
  657. `input-file.c', `write.c'.
  658.    K. Richard Pixley maintained GAS for a while, adding various
  659. enhancements and many bug fixes, including merging support for several
  660. processors, breaking GAS up to handle multiple object file format back
  661. ends (including heavy rewrite, testing, an integration of the coff and
  662. b.out back ends), adding configuration including heavy testing and
  663. verification of cross assemblers and file splits and renaming,
  664. converted GAS to strictly ANSI C including full prototypes, added
  665. support for m680[34]0 and cpu32, did considerable work on i960
  666. including a COFF port (including considerable amounts of reverse
  667. engineering), a SPARC opcode file rewrite, DECstation, rs6000, and
  668. hp300hpux host ports, updated "know" assertions and made them work,
  669. much other reorganization, cleanup, and lint.
  670.    Ken Raeburn wrote the high-level BFD interface code to replace most
  671. of the code in format-specific I/O modules.
  672.    The original VMS support was contributed by David L. Kashtan.  Eric
  673. Youngdale has done much work with it since.
  674.    The Intel 80386 machine description was written by Eliot Dresselhaus.
  675.    Minh Tran-Le at IntelliCorp contributed some AIX 386 support.
  676.    The Motorola 88k machine description was contributed by Devon Bowen
  677. of Buffalo University and Torbjorn Granlund of the Swedish Institute of
  678. Computer Science.
  679.    Keith Knowles at the Open Software Foundation wrote the original
  680. MIPS back end (`tc-mips.c', `tc-mips.h'), and contributed Rose format
  681. support (which hasn't been merged in yet).  Ralph Campbell worked with
  682. the MIPS code to support a.out format.
  683.    Support for the Zilog Z8k and Hitachi H8/300 and H8/500 processors
  684. (tc-z8k, tc-h8300, tc-h8500), and IEEE 695 object file format
  685. (obj-ieee), was written by Steve Chamberlain of Cygnus Support.  Steve
  686. also modified the COFF back end to use BFD for some low-level
  687. operations, for use with the H8/300 and AMD 29k targets.
  688.    John Gilmore built the AMD 29000 support, added `.include' support,
  689. and simplified the configuration of which versions accept which
  690. directives.  He updated the 68k machine description so that Motorola's
  691. opcodes always produced fixed-size instructions (e.g. `jsr'), while
  692. synthetic instructions remained shrinkable (`jbsr').  John fixed many
  693. bugs, including true tested cross-compilation support, and one bug in
  694. relaxation that took a week and required the proverbial one-bit fix.
  695.    Ian Lance Taylor of Cygnus Support merged the Motorola and MIT
  696. syntax for the 68k, completed support for some COFF targets (68k, i386
  697. SVR3, and SCO Unix), added support for MIPS ECOFF and ELF targets,
  698. wrote the initial RS/6000 and PowerPC assembler, and made a few other
  699. minor patches.
  700.    Steve Chamberlain made `as' able to generate listings.
  701.    Hewlett-Packard contributed support for the HP9000/300.
  702.    Jeff Law wrote GAS and BFD support for the native HPPA object format
  703. (SOM) along with a fairly extensive HPPA testsuite (for both SOM and
  704. ELF object formats).  This work was supported by both the Center for
  705. Software Science at the University of Utah and Cygnus Support.
  706.    Support for ELF format files has been worked on by Mark Eichin of
  707. Cygnus Support (original, incomplete implementation for SPARC), Pete
  708. Hoogenboom and Jeff Law at the University of Utah (HPPA mainly),
  709. Michael Meissner of the Open Software Foundation (i386 mainly), and Ken
  710. Raeburn of Cygnus Support (sparc, and some initial 64-bit support).
  711.    Richard Henderson rewrote the Alpha assembler.
  712.    Several engineers at Cygnus Support have also provided many small
  713. bug fixes and configuration enhancements.
  714.    Many others have contributed large or small bugfixes and
  715. enhancements.  If you have contributed significant work and are not
  716. mentioned on this list, and want to be, let us know.  Some of the
  717. history has been lost; we are not intentionally leaving anyone out.
  718.    ---------- Footnotes ----------
  719.    (1)  Any more details?
  720.