Home | History | Annotate | Line # | Download | only in doc
c-pdp11.texi revision 1.1.1.5.12.1
      1  1.1.1.5.12.1  pgoyette @c Copyright (C) 2001-2018 Free Software Foundation, Inc.
      2           1.1     skrll @c This is part of the GAS manual.
      3           1.1     skrll @c For copying conditions, see the file as.texinfo.
      4           1.1     skrll @ifset GENERIC
      5           1.1     skrll @page
      6           1.1     skrll @node PDP-11-Dependent
      7           1.1     skrll @chapter PDP-11 Dependent Features
      8           1.1     skrll @end ifset
      9           1.1     skrll @ifclear GENERIC
     10           1.1     skrll @node Machine Dependencies
     11           1.1     skrll @chapter PDP-11 Dependent Features
     12           1.1     skrll @end ifclear
     13           1.1     skrll 
     14           1.1     skrll @cindex PDP-11 support
     15           1.1     skrll 
     16           1.1     skrll @menu
     17           1.1     skrll * PDP-11-Options::		Options
     18           1.1     skrll * PDP-11-Pseudos::		Assembler Directives
     19           1.1     skrll * PDP-11-Syntax::		DEC Syntax versus BSD Syntax
     20           1.1     skrll * PDP-11-Mnemonics::		Instruction Naming
     21           1.1     skrll * PDP-11-Synthetic::		Synthetic Instructions
     22           1.1     skrll @end menu
     23           1.1     skrll 
     24           1.1     skrll @node PDP-11-Options
     25           1.1     skrll @section Options
     26           1.1     skrll 
     27           1.1     skrll @cindex options for PDP-11
     28           1.1     skrll 
     29           1.1     skrll The PDP-11 version of @code{@value{AS}} has a rich set of machine
     30           1.1     skrll dependent options.
     31           1.1     skrll 
     32           1.1     skrll @subsection Code Generation Options
     33           1.1     skrll 
     34           1.1     skrll @table @code
     35           1.1     skrll @cindex -mpic
     36           1.1     skrll @cindex -mno-pic
     37           1.1     skrll @item -mpic | -mno-pic
     38           1.1     skrll Generate position-independent (or position-dependent) code.
     39           1.1     skrll 
     40           1.1     skrll The default is to generate position-independent code.
     41           1.1     skrll @end table
     42           1.1     skrll 
     43           1.1     skrll @subsection Instruction Set Extension Options
     44           1.1     skrll 
     45           1.1     skrll These options enables or disables the use of extensions over the base
     46           1.1     skrll line instruction set as introduced by the first PDP-11 CPU: the KA11.
     47           1.1     skrll Most options come in two variants: a @code{-m}@var{extension} that
     48           1.1     skrll enables @var{extension}, and a @code{-mno-}@var{extension} that disables
     49           1.1     skrll @var{extension}.
     50           1.1     skrll 
     51           1.1     skrll The default is to enable all extensions.
     52           1.1     skrll 
     53           1.1     skrll @table @code
     54           1.1     skrll @cindex -mall
     55           1.1     skrll @cindex -mall-extensions
     56           1.1     skrll @item -mall | -mall-extensions
     57           1.1     skrll Enable all instruction set extensions.
     58           1.1     skrll 
     59           1.1     skrll @cindex -mno-extensions
     60           1.1     skrll @item -mno-extensions
     61           1.1     skrll Disable all instruction set extensions.
     62           1.1     skrll 
     63           1.1     skrll @cindex -mcis
     64           1.1     skrll @cindex -mno-cis
     65           1.1     skrll @item -mcis | -mno-cis
     66           1.1     skrll Enable (or disable) the use of the commercial instruction set, which
     67           1.1     skrll consists of these instructions: @code{ADDNI}, @code{ADDN}, @code{ADDPI},
     68           1.1     skrll @code{ADDP}, @code{ASHNI}, @code{ASHN}, @code{ASHPI}, @code{ASHP},
     69           1.1     skrll @code{CMPCI}, @code{CMPC}, @code{CMPNI}, @code{CMPN}, @code{CMPPI},
     70           1.1     skrll @code{CMPP}, @code{CVTLNI}, @code{CVTLN}, @code{CVTLPI}, @code{CVTLP},
     71           1.1     skrll @code{CVTNLI}, @code{CVTNL}, @code{CVTNPI}, @code{CVTNP}, @code{CVTPLI},
     72           1.1     skrll @code{CVTPL}, @code{CVTPNI}, @code{CVTPN}, @code{DIVPI}, @code{DIVP},
     73           1.1     skrll @code{L2DR}, @code{L3DR}, @code{LOCCI}, @code{LOCC}, @code{MATCI},
     74           1.1     skrll @code{MATC}, @code{MOVCI}, @code{MOVC}, @code{MOVRCI}, @code{MOVRC},
     75           1.1     skrll @code{MOVTCI}, @code{MOVTC}, @code{MULPI}, @code{MULP}, @code{SCANCI},
     76           1.1     skrll @code{SCANC}, @code{SKPCI}, @code{SKPC}, @code{SPANCI}, @code{SPANC},
     77           1.1     skrll @code{SUBNI}, @code{SUBN}, @code{SUBPI}, and @code{SUBP}.
     78           1.1     skrll 
     79           1.1     skrll @cindex -mcsm
     80           1.1     skrll @cindex -mno-csm
     81           1.1     skrll @item -mcsm | -mno-csm
     82           1.1     skrll Enable (or disable) the use of the @code{CSM} instruction.
     83           1.1     skrll 
     84           1.1     skrll @cindex -meis
     85           1.1     skrll @cindex -mno-eis
     86           1.1     skrll @item -meis | -mno-eis
     87           1.1     skrll Enable (or disable) the use of the extended instruction set, which
     88           1.1     skrll consists of these instructions: @code{ASHC}, @code{ASH}, @code{DIV},
     89           1.1     skrll @code{MARK}, @code{MUL}, @code{RTT}, @code{SOB} @code{SXT}, and
     90           1.1     skrll @code{XOR}.
     91           1.1     skrll 
     92           1.1     skrll @cindex -mfis
     93           1.1     skrll @cindex -mno-fis
     94           1.1     skrll @cindex -mkev11
     95           1.1     skrll @cindex -mkev11
     96           1.1     skrll @cindex -mno-kev11
     97           1.1     skrll @item -mfis | -mkev11
     98           1.1     skrll @itemx -mno-fis | -mno-kev11
     99           1.1     skrll Enable (or disable) the use of the KEV11 floating-point instructions:
    100           1.1     skrll @code{FADD}, @code{FDIV}, @code{FMUL}, and @code{FSUB}.
    101           1.1     skrll 
    102           1.1     skrll @cindex -mfpp
    103           1.1     skrll @cindex -mno-fpp
    104           1.1     skrll @cindex -mfpu
    105           1.1     skrll @cindex -mno-fpu
    106           1.1     skrll @cindex -mfp-11
    107           1.1     skrll @cindex -mno-fp-11
    108           1.1     skrll @item -mfpp | -mfpu | -mfp-11
    109           1.1     skrll @itemx -mno-fpp | -mno-fpu | -mno-fp-11
    110           1.1     skrll Enable (or disable) the use of FP-11 floating-point instructions:
    111           1.1     skrll @code{ABSF}, @code{ADDF}, @code{CFCC}, @code{CLRF}, @code{CMPF},
    112           1.1     skrll @code{DIVF}, @code{LDCFF}, @code{LDCIF}, @code{LDEXP}, @code{LDF},
    113           1.1     skrll @code{LDFPS}, @code{MODF}, @code{MULF}, @code{NEGF}, @code{SETD},
    114           1.1     skrll @code{SETF}, @code{SETI}, @code{SETL}, @code{STCFF}, @code{STCFI},
    115           1.1     skrll @code{STEXP}, @code{STF}, @code{STFPS}, @code{STST}, @code{SUBF}, and
    116           1.1     skrll @code{TSTF}.
    117           1.1     skrll 
    118           1.1     skrll @cindex -mlimited-eis
    119           1.1     skrll @cindex -mno-limited-eis
    120           1.1     skrll @item -mlimited-eis | -mno-limited-eis
    121           1.1     skrll Enable (or disable) the use of the limited extended instruction set:
    122           1.1     skrll @code{MARK}, @code{RTT}, @code{SOB}, @code{SXT}, and @code{XOR}.
    123           1.1     skrll 
    124           1.1     skrll The -mno-limited-eis options also implies -mno-eis.
    125           1.1     skrll 
    126           1.1     skrll @cindex -mmfpt
    127           1.1     skrll @cindex -mno-mfpt
    128           1.1     skrll @item -mmfpt | -mno-mfpt
    129           1.1     skrll Enable (or disable) the use of the @code{MFPT} instruction.
    130           1.1     skrll 
    131           1.1     skrll @cindex -mmutiproc
    132           1.1     skrll @cindex -mno-mutiproc
    133           1.1     skrll @item -mmultiproc | -mno-multiproc
    134           1.1     skrll Enable (or disable) the use of multiprocessor instructions: @code{TSTSET} and
    135           1.1     skrll @code{WRTLCK}.
    136           1.1     skrll 
    137           1.1     skrll @cindex -mmxps
    138           1.1     skrll @cindex -mno-mxps
    139           1.1     skrll @item -mmxps | -mno-mxps
    140           1.1     skrll Enable (or disable) the use of the @code{MFPS} and @code{MTPS} instructions.
    141           1.1     skrll 
    142           1.1     skrll @cindex -mspl
    143           1.1     skrll @cindex -mno-spl
    144           1.1     skrll @item -mspl | -mno-spl
    145           1.1     skrll Enable (or disable) the use of the @code{SPL} instruction.
    146           1.1     skrll 
    147           1.1     skrll @cindex -mmicrocode
    148           1.1     skrll @cindex -mno-microcode
    149           1.1     skrll Enable (or disable) the use of the microcode instructions: @code{LDUB},
    150           1.1     skrll @code{MED}, and @code{XFC}.
    151           1.1     skrll @end table
    152           1.1     skrll 
    153           1.1     skrll @subsection CPU Model Options
    154           1.1     skrll 
    155           1.1     skrll These options enable the instruction set extensions supported by a
    156           1.1     skrll particular CPU, and disables all other extensions.
    157           1.1     skrll 
    158           1.1     skrll @table @code
    159           1.1     skrll @cindex -mka11
    160           1.1     skrll @item -mka11
    161           1.1     skrll KA11 CPU.  Base line instruction set only.
    162           1.1     skrll 
    163           1.1     skrll @cindex -mkb11
    164           1.1     skrll @item -mkb11
    165           1.1     skrll KB11 CPU.  Enable extended instruction set and @code{SPL}.
    166           1.1     skrll 
    167           1.1     skrll @cindex -mkd11a
    168           1.1     skrll @item -mkd11a
    169           1.1     skrll KD11-A CPU.  Enable limited extended instruction set.
    170           1.1     skrll 
    171           1.1     skrll @cindex -mkd11b
    172           1.1     skrll @item -mkd11b
    173           1.1     skrll KD11-B CPU.  Base line instruction set only.
    174           1.1     skrll 
    175           1.1     skrll @cindex -mkd11d
    176           1.1     skrll @item -mkd11d
    177           1.1     skrll KD11-D CPU.  Base line instruction set only.
    178           1.1     skrll 
    179           1.1     skrll @cindex -mkd11e
    180           1.1     skrll @item -mkd11e
    181           1.1     skrll KD11-E CPU.  Enable extended instruction set, @code{MFPS}, and @code{MTPS}.
    182           1.1     skrll 
    183           1.1     skrll @cindex -mkd11f
    184           1.1     skrll @cindex -mkd11h
    185           1.1     skrll @cindex -mkd11q
    186           1.1     skrll @item -mkd11f | -mkd11h | -mkd11q
    187           1.1     skrll KD11-F, KD11-H, or KD11-Q CPU.  Enable limited extended instruction set,
    188           1.1     skrll @code{MFPS}, and @code{MTPS}.
    189           1.1     skrll 
    190           1.1     skrll @cindex -mkd11k
    191           1.1     skrll @item -mkd11k
    192           1.1     skrll KD11-K CPU.  Enable extended instruction set, @code{LDUB}, @code{MED},
    193           1.1     skrll @code{MFPS}, @code{MFPT}, @code{MTPS}, and @code{XFC}.
    194           1.1     skrll 
    195           1.1     skrll @cindex -mkd11z
    196           1.1     skrll @item -mkd11z
    197           1.1     skrll KD11-Z CPU.  Enable extended instruction set, @code{CSM}, @code{MFPS},
    198           1.1     skrll @code{MFPT}, @code{MTPS}, and @code{SPL}.
    199           1.1     skrll 
    200           1.1     skrll @cindex -mf11
    201           1.1     skrll @item -mf11
    202           1.1     skrll F11 CPU.  Enable extended instruction set, @code{MFPS}, @code{MFPT}, and
    203           1.1     skrll @code{MTPS}.
    204           1.1     skrll 
    205           1.1     skrll @cindex -mj11
    206           1.1     skrll @item -mj11
    207           1.1     skrll J11 CPU.  Enable extended instruction set, @code{CSM}, @code{MFPS},
    208           1.1     skrll @code{MFPT}, @code{MTPS}, @code{SPL}, @code{TSTSET}, and @code{WRTLCK}.
    209           1.1     skrll 
    210           1.1     skrll @cindex -mt11
    211           1.1     skrll @item -mt11
    212           1.1     skrll T11 CPU.  Enable limited extended instruction set, @code{MFPS}, and
    213           1.1     skrll @code{MTPS}.
    214           1.1     skrll @end table
    215           1.1     skrll 
    216           1.1     skrll @subsection Machine Model Options
    217           1.1     skrll 
    218           1.1     skrll These options enable the instruction set extensions supported by a
    219           1.1     skrll particular machine model, and disables all other extensions.
    220           1.1     skrll 
    221           1.1     skrll @table @code
    222           1.1     skrll @cindex -m11/03
    223           1.1     skrll @item -m11/03
    224           1.1     skrll Same as @code{-mkd11f}.
    225           1.1     skrll 
    226           1.1     skrll @cindex -m11/04
    227           1.1     skrll @item -m11/04
    228           1.1     skrll Same as @code{-mkd11d}.
    229           1.1     skrll 
    230           1.1     skrll @cindex -m11/05
    231           1.1     skrll @cindex -m11/10
    232           1.1     skrll @item -m11/05 | -m11/10
    233           1.1     skrll Same as @code{-mkd11b}.
    234           1.1     skrll 
    235           1.1     skrll @cindex -m11/15
    236           1.1     skrll @cindex -m11/20
    237           1.1     skrll @item -m11/15 | -m11/20
    238           1.1     skrll Same as @code{-mka11}.
    239           1.1     skrll 
    240           1.1     skrll @cindex -m11/21
    241           1.1     skrll @item -m11/21
    242           1.1     skrll Same as @code{-mt11}.
    243           1.1     skrll 
    244           1.1     skrll @cindex -m11/23
    245           1.1     skrll @cindex -m11/24
    246           1.1     skrll @item -m11/23 | -m11/24
    247           1.1     skrll Same as @code{-mf11}.
    248           1.1     skrll 
    249           1.1     skrll @cindex -m11/34
    250           1.1     skrll @item -m11/34
    251           1.1     skrll Same as @code{-mkd11e}.
    252           1.1     skrll 
    253           1.1     skrll @cindex -m11/34a
    254           1.1     skrll @item -m11/34a
    255           1.1     skrll Ame as @code{-mkd11e} @code{-mfpp}.
    256           1.1     skrll 
    257           1.1     skrll @cindex -m11/35
    258           1.1     skrll @cindex -m11/40
    259           1.1     skrll @item -m11/35 | -m11/40
    260           1.1     skrll Same as @code{-mkd11a}.
    261           1.1     skrll 
    262           1.1     skrll @cindex -m11/44
    263           1.1     skrll @item -m11/44
    264           1.1     skrll Same as @code{-mkd11z}.
    265           1.1     skrll 
    266           1.1     skrll @cindex -m11/45
    267           1.1     skrll @cindex -m11/50
    268           1.1     skrll @cindex -m11/55
    269           1.1     skrll @cindex -m11/70
    270           1.1     skrll @item -m11/45 | -m11/50 | -m11/55 | -m11/70
    271           1.1     skrll Same as @code{-mkb11}.
    272           1.1     skrll 
    273           1.1     skrll @cindex -m11/53
    274           1.1     skrll @cindex -m11/73
    275           1.1     skrll @cindex -m11/83
    276           1.1     skrll @cindex -m11/84
    277           1.1     skrll @cindex -m11/93
    278           1.1     skrll @cindex -m11/94
    279           1.1     skrll @item -m11/53 | -m11/73 | -m11/83 | -m11/84 | -m11/93 | -m11/94
    280           1.1     skrll Same as @code{-mj11}.
    281           1.1     skrll 
    282           1.1     skrll @cindex -m11/60
    283           1.1     skrll @item -m11/60
    284           1.1     skrll Same as @code{-mkd11k}.
    285           1.1     skrll @end table
    286           1.1     skrll 
    287           1.1     skrll @node PDP-11-Pseudos
    288           1.1     skrll @section Assembler Directives
    289           1.1     skrll 
    290           1.1     skrll The PDP-11 version of @code{@value{AS}} has a few machine
    291           1.1     skrll dependent assembler directives.
    292           1.1     skrll 
    293           1.1     skrll @table @code
    294           1.1     skrll @item .bss
    295           1.1     skrll Switch to the @code{bss} section.
    296           1.1     skrll 
    297           1.1     skrll @item .even
    298           1.1     skrll Align the location counter to an even number.
    299           1.1     skrll @end table
    300           1.1     skrll 
    301           1.1     skrll @node PDP-11-Syntax
    302           1.1     skrll @section PDP-11 Assembly Language Syntax
    303           1.1     skrll 
    304           1.1     skrll @cindex PDP-11 syntax
    305           1.1     skrll 
    306           1.1     skrll @cindex DEC syntax
    307           1.1     skrll @cindex BSD syntax
    308           1.1     skrll @code{@value{AS}} supports both DEC syntax and BSD syntax.  The only
    309           1.1     skrll difference is that in DEC syntax, a @code{#} character is used to denote
    310           1.1     skrll an immediate constants, while in BSD syntax the character for this
    311           1.1     skrll purpose is @code{$}.
    312           1.1     skrll 
    313           1.1     skrll @cindex PDP-11 general-purpose register syntax
    314           1.1     skrll general-purpose registers are named @code{r0} through @code{r7}.
    315           1.1     skrll Mnemonic alternatives for @code{r6} and @code{r7} are @code{sp} and
    316           1.1     skrll @code{pc}, respectively.
    317           1.1     skrll 
    318           1.1     skrll @cindex PDP-11 floating-point register syntax
    319           1.1     skrll Floating-point registers are named @code{ac0} through @code{ac3}, or
    320           1.1     skrll alternatively @code{fr0} through @code{fr3}.
    321           1.1     skrll 
    322           1.1     skrll @cindex PDP-11 comments
    323           1.1     skrll Comments are started with a @code{#} or a @code{/} character, and extend
    324           1.1     skrll to the end of the line.  (FIXME: clash with immediates?)
    325           1.1     skrll 
    326       1.1.1.3  christos @cindex PDP-11 line separator
    327       1.1.1.3  christos Multiple statements on the same line can be separated by the @samp{;} character.
    328       1.1.1.3  christos 
    329           1.1     skrll @node PDP-11-Mnemonics
    330           1.1     skrll @section Instruction Naming
    331           1.1     skrll 
    332           1.1     skrll @cindex PDP-11 instruction naming
    333           1.1     skrll 
    334           1.1     skrll Some instructions have alternative names.
    335           1.1     skrll 
    336           1.1     skrll @table @code
    337           1.1     skrll @item BCC
    338           1.1     skrll @code{BHIS}
    339           1.1     skrll 
    340           1.1     skrll @item BCS
    341           1.1     skrll @code{BLO}
    342           1.1     skrll 
    343           1.1     skrll @item L2DR
    344           1.1     skrll @code{L2D}
    345           1.1     skrll 
    346           1.1     skrll @item L3DR
    347           1.1     skrll @code{L3D}
    348           1.1     skrll 
    349           1.1     skrll @item SYS
    350           1.1     skrll @code{TRAP}
    351           1.1     skrll @end table
    352           1.1     skrll 
    353           1.1     skrll @node PDP-11-Synthetic
    354           1.1     skrll @section Synthetic Instructions
    355           1.1     skrll 
    356           1.1     skrll The @code{JBR} and @code{J}@var{CC} synthetic instructions are not
    357           1.1     skrll supported yet.
    358