1 @c Copyright 2001, 2002 Free Software Foundation, Inc.
2 @c This is part of the GAS manual.
3 @c For copying conditions, see the file as.texinfo.
7 @chapter PDP-11 Dependent Features
10 @node Machine Dependencies
11 @chapter PDP-11 Dependent Features
14 @cindex PDP-11 support
17 * PDP-11-Options:: Options
18 * PDP-11-Pseudos:: Assembler Directives
19 * PDP-11-Syntax:: DEC Syntax versus BSD Syntax
20 * PDP-11-Mnemonics:: Instruction Naming
21 * PDP-11-Synthetic:: Synthetic Instructions
27 @cindex options for PDP-11
29 The PDP-11 version of @code{@value{AS}} has a rich set of machine
32 @subsection Code Generation Options
37 @item -mpic | -mno-pic
38 Generate position-independent (or position-dependent) code.
40 The default is to generate position-independent code.
43 @subsection Instruction Set Extension Options
45 These options enables or disables the use of extensions over the base
46 line instruction set as introduced by the first PDP-11 CPU: the KA11.
47 Most options come in two variants: a @code{-m}@var{extension} that
48 enables @var{extension}, and a @code{-mno-}@var{extension} that disables
51 The default is to enable all extensions.
55 @cindex -mall-extensions
56 @item -mall | -mall-extensions
57 Enable all instruction set extensions.
59 @cindex -mno-extensions
61 Disable all instruction set extensions.
65 @item -mcis | -mno-cis
66 Enable (or disable) the use of the commercial instruction set, which
67 consists of these instructions: @code{ADDNI}, @code{ADDN}, @code{ADDPI},
68 @code{ADDP}, @code{ASHNI}, @code{ASHN}, @code{ASHPI}, @code{ASHP},
69 @code{CMPCI}, @code{CMPC}, @code{CMPNI}, @code{CMPN}, @code{CMPPI},
70 @code{CMPP}, @code{CVTLNI}, @code{CVTLN}, @code{CVTLPI}, @code{CVTLP},
71 @code{CVTNLI}, @code{CVTNL}, @code{CVTNPI}, @code{CVTNP}, @code{CVTPLI},
72 @code{CVTPL}, @code{CVTPNI}, @code{CVTPN}, @code{DIVPI}, @code{DIVP},
73 @code{L2DR}, @code{L3DR}, @code{LOCCI}, @code{LOCC}, @code{MATCI},
74 @code{MATC}, @code{MOVCI}, @code{MOVC}, @code{MOVRCI}, @code{MOVRC},
75 @code{MOVTCI}, @code{MOVTC}, @code{MULPI}, @code{MULP}, @code{SCANCI},
76 @code{SCANC}, @code{SKPCI}, @code{SKPC}, @code{SPANCI}, @code{SPANC},
77 @code{SUBNI}, @code{SUBN}, @code{SUBPI}, and @code{SUBP}.
81 @item -mcsm | -mno-csm
82 Enable (or disable) the use of the @code{CSM} instruction.
86 @item -meis | -mno-eis
87 Enable (or disable) the use of the extended instruction set, which
88 consists of these instructions: @code{ASHC}, @code{ASH}, @code{DIV},
89 @code{MARK}, @code{MUL}, @code{RTT}, @code{SOB} @code{SXT}, and
98 @itemx -mno-fis | -mno-kev11
99 Enable (or disable) the use of the KEV11 floating-point instructions:
100 @code{FADD}, @code{FDIV}, @code{FMUL}, and @code{FSUB}.
108 @item -mfpp | -mfpu | -mfp-11
109 @itemx -mno-fpp | -mno-fpu | -mno-fp-11
110 Enable (or disable) the use of FP-11 floating-point instructions:
111 @code{ABSF}, @code{ADDF}, @code{CFCC}, @code{CLRF}, @code{CMPF},
112 @code{DIVF}, @code{LDCFF}, @code{LDCIF}, @code{LDEXP}, @code{LDF},
113 @code{LDFPS}, @code{MODF}, @code{MULF}, @code{NEGF}, @code{SETD},
114 @code{SETF}, @code{SETI}, @code{SETL}, @code{STCFF}, @code{STCFI},
115 @code{STEXP}, @code{STF}, @code{STFPS}, @code{STST}, @code{SUBF}, and
118 @cindex -mlimited-eis
119 @cindex -mno-limited-eis
120 @item -mlimited-eis | -mno-limited-eis
121 Enable (or disable) the use of the limited extended instruction set:
122 @code{MARK}, @code{RTT}, @code{SOB}, @code{SXT}, and @code{XOR}.
124 The -mno-limited-eis options also implies -mno-eis.
128 @item -mmfpt | -mno-mfpt
129 Enable (or disable) the use of the @code{MFPT} instruction.
132 @cindex -mno-mutiproc
133 @item -mmultiproc | -mno-multiproc
134 Enable (or disable) the use of multiprocessor instructions: @code{TSTSET} and
139 @item -mmxps | -mno-mxps
140 Enable (or disable) the use of the @code{MFPS} and @code{MTPS} instructions.
144 @item -mspl | -mno-spl
145 Enable (or disable) the use of the @code{SPL} instruction.
148 @cindex -mno-microcode
149 Enable (or disable) the use of the microcode instructions: @code{LDUB},
150 @code{MED}, and @code{XFC}.
153 @subsection CPU Model Options
155 These options enable the instruction set extensions supported by a
156 particular CPU, and disables all other extensions.
161 KA11 CPU. Base line instruction set only.
165 KB11 CPU. Enable extended instruction set and @code{SPL}.
169 KD11-A CPU. Enable limited extended instruction set.
173 KD11-B CPU. Base line instruction set only.
177 KD11-D CPU. Base line instruction set only.
181 KD11-E CPU. Enable extended instruction set, @code{MFPS}, and @code{MTPS}.
186 @item -mkd11f | -mkd11h | -mkd11q
187 KD11-F, KD11-H, or KD11-Q CPU. Enable limited extended instruction set,
188 @code{MFPS}, and @code{MTPS}.
192 KD11-K CPU. Enable extended instruction set, @code{LDUB}, @code{MED},
193 @code{MFPS}, @code{MFPT}, @code{MTPS}, and @code{XFC}.
197 KD11-Z CPU. Enable extended instruction set, @code{CSM}, @code{MFPS},
198 @code{MFPT}, @code{MTPS}, and @code{SPL}.
202 F11 CPU. Enable extended instruction set, @code{MFPS}, @code{MFPT}, and
207 J11 CPU. Enable extended instruction set, @code{CSM}, @code{MFPS},
208 @code{MFPT}, @code{MTPS}, @code{SPL}, @code{TSTSET}, and @code{WRTLCK}.
212 T11 CPU. Enable limited extended instruction set, @code{MFPS}, and
216 @subsection Machine Model Options
218 These options enable the instruction set extensions supported by a
219 particular machine model, and disables all other extensions.
224 Same as @code{-mkd11f}.
228 Same as @code{-mkd11d}.
232 @item -m11/05 | -m11/10
233 Same as @code{-mkd11b}.
237 @item -m11/15 | -m11/20
238 Same as @code{-mka11}.
242 Same as @code{-mt11}.
246 @item -m11/23 | -m11/24
247 Same as @code{-mf11}.
251 Same as @code{-mkd11e}.
255 Ame as @code{-mkd11e} @code{-mfpp}.
259 @item -m11/35 | -m11/40
260 Same as @code{-mkd11a}.
264 Same as @code{-mkd11z}.
270 @item -m11/45 | -m11/50 | -m11/55 | -m11/70
271 Same as @code{-mkb11}.
279 @item -m11/53 | -m11/73 | -m11/83 | -m11/84 | -m11/93 | -m11/94
280 Same as @code{-mj11}.
284 Same as @code{-mkd11k}.
288 @section Assembler Directives
290 The PDP-11 version of @code{@value{AS}} has a few machine
291 dependent assembler directives.
295 Switch to the @code{bss} section.
298 Align the location counter to an even number.
302 @section PDP-11 Assembly Language Syntax
304 @cindex PDP-11 syntax
308 @code{@value{AS}} supports both DEC syntax and BSD syntax. The only
309 difference is that in DEC syntax, a @code{#} character is used to denote
310 an immediate constants, while in BSD syntax the character for this
313 @cindex PDP-11 general-purpose register syntax
314 general-purpose registers are named @code{r0} through @code{r7}.
315 Mnemonic alternatives for @code{r6} and @code{r7} are @code{sp} and
316 @code{pc}, respectively.
318 @cindex PDP-11 floating-point register syntax
319 Floating-point registers are named @code{ac0} through @code{ac3}, or
320 alternatively @code{fr0} through @code{fr3}.
322 @cindex PDP-11 comments
323 Comments are started with a @code{#} or a @code{/} character, and extend
324 to the end of the line. (FIXME: clash with immediates?)
326 @node PDP-11-Mnemonics
327 @section Instruction Naming
329 @cindex PDP-11 instruction naming
331 Some instructions have alternative names.
350 @node PDP-11-Synthetic
351 @section Synthetic Instructions
353 The @code{JBR} and @code{J}@var{CC} synthetic instructions are not