xref: /netbsd/external/gpl3/gdb/dist/cpu/mt.cpu (revision 66e63ce3)
1*66e63ce3Schristos; Morpho Technologies MT Arch description.  -*- Scheme -*-
2*66e63ce3Schristos; Copyright 2001, 2007, 2009 Free Software Foundation, Inc.
3*66e63ce3Schristos;
4*66e63ce3Schristos; Contributed by Red Hat Inc; developed under contract from
5*66e63ce3Schristos; Morpho Technologies.
6*66e63ce3Schristos;
7*66e63ce3Schristos; This file is part of the GNU Binutils.
8*66e63ce3Schristos;
9*66e63ce3Schristos; This program is free software; you can redistribute it and/or modify
10*66e63ce3Schristos; it under the terms of the GNU General Public License as published by
11*66e63ce3Schristos; the Free Software Foundation; either version 3 of the License, or
12*66e63ce3Schristos; (at your option) any later version.
13*66e63ce3Schristos;
14*66e63ce3Schristos; This program is distributed in the hope that it will be useful,
15*66e63ce3Schristos; but WITHOUT ANY WARRANTY; without even the implied warranty of
16*66e63ce3Schristos; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*66e63ce3Schristos; GNU General Public License for more details.
18*66e63ce3Schristos;
19*66e63ce3Schristos; You should have received a copy of the GNU General Public License
20*66e63ce3Schristos; along with this program; if not, write to the Free Software
21*66e63ce3Schristos; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22*66e63ce3Schristos; MA 02110-1301, USA.
23*66e63ce3Schristos
24*66e63ce3Schristos(include "simplify.inc")
25*66e63ce3Schristos
26*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27*66e63ce3Schristos;; Define The Architecture, Attributes, ISA, CPU, Machine, And Model. ;;
28*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29*66e63ce3Schristos
30*66e63ce3Schristos; define-arch must appear first
31*66e63ce3Schristos(define-arch
32*66e63ce3Schristos  (name mt) ; name of cpu family
33*66e63ce3Schristos  (comment "Morpho Technologies mRISC family")
34*66e63ce3Schristos  (default-alignment aligned)
35*66e63ce3Schristos  (insn-lsb0? #t)
36*66e63ce3Schristos  (machs ms1 ms1-003 ms2)
37*66e63ce3Schristos  (isas mt)
38*66e63ce3Schristos)
39*66e63ce3Schristos
40*66e63ce3Schristos; Instruction set parameters.
41*66e63ce3Schristos
42*66e63ce3Schristos(define-isa
43*66e63ce3Schristos  (name mt)
44*66e63ce3Schristos  (comment "Morpho Technologies MT ISA")
45*66e63ce3Schristos  (default-insn-word-bitsize 32)
46*66e63ce3Schristos  (default-insn-bitsize 32)
47*66e63ce3Schristos  (base-insn-bitsize 32)
48*66e63ce3Schristos  (parallel-insns 2)
49*66e63ce3Schristos)
50*66e63ce3Schristos
51*66e63ce3Schristos; Cpu family definitions.
52*66e63ce3Schristos
53*66e63ce3Schristos
54*66e63ce3Schristos(define-cpu
55*66e63ce3Schristos  ; cpu names must be distinct from the architecture name and machine names.
56*66e63ce3Schristos  (name ms1bf)
57*66e63ce3Schristos  (comment "Morpho Technologies mRISC family")
58*66e63ce3Schristos  (endian big)
59*66e63ce3Schristos  (word-bitsize 32)
60*66e63ce3Schristos)
61*66e63ce3Schristos
62*66e63ce3Schristos(define-cpu
63*66e63ce3Schristos  ; cpu names must be distinct from the architecture name and machine names.
64*66e63ce3Schristos  (name ms1-003bf)
65*66e63ce3Schristos  (comment "Morpho Technologies mRISC family")
66*66e63ce3Schristos  (endian big)
67*66e63ce3Schristos  (word-bitsize 32)
68*66e63ce3Schristos)
69*66e63ce3Schristos
70*66e63ce3Schristos(define-cpu
71*66e63ce3Schristos  ; cpu names must be distinct from the architecture name and machine names.
72*66e63ce3Schristos  (name ms2bf)
73*66e63ce3Schristos  (comment "Morpho Technologies mRISC family")
74*66e63ce3Schristos  (endian big)
75*66e63ce3Schristos  (word-bitsize 32)
76*66e63ce3Schristos)
77*66e63ce3Schristos
78*66e63ce3Schristos(define-mach
79*66e63ce3Schristos  (name ms1)
80*66e63ce3Schristos  (comment "Morpho Technologies mrisc")
81*66e63ce3Schristos  (cpu ms1bf)
82*66e63ce3Schristos  (isas mt)
83*66e63ce3Schristos)
84*66e63ce3Schristos
85*66e63ce3Schristos(define-mach
86*66e63ce3Schristos  (name ms1-003)
87*66e63ce3Schristos  (comment "Morpho Technologies mrisc")
88*66e63ce3Schristos  (cpu ms1-003bf)
89*66e63ce3Schristos  (isas mt)
90*66e63ce3Schristos)
91*66e63ce3Schristos
92*66e63ce3Schristos(define-mach
93*66e63ce3Schristos  (name ms2)
94*66e63ce3Schristos  (comment "Morpho Technologies ms2")
95*66e63ce3Schristos  (cpu ms2bf)
96*66e63ce3Schristos  (isas mt)
97*66e63ce3Schristos)
98*66e63ce3Schristos
99*66e63ce3Schristos
100*66e63ce3Schristos; Model descriptions.
101*66e63ce3Schristos; Can probably take the u-exec out.  We'll see.
102*66e63ce3Schristos(define-model
103*66e63ce3Schristos  (name ms1)
104*66e63ce3Schristos  (comment "Morpho Technologies mrisc")
105*66e63ce3Schristos  (mach ms1)
106*66e63ce3Schristos  (unit u-exec "Execution Unit" ()
107*66e63ce3Schristos	1 1 ; issue done
108*66e63ce3Schristos	() ; state
109*66e63ce3Schristos	() ; inputs
110*66e63ce3Schristos	() ; outputs
111*66e63ce3Schristos	() ; profile action (default)
112*66e63ce3Schristos	)
113*66e63ce3Schristos)
114*66e63ce3Schristos
115*66e63ce3Schristos(define-model
116*66e63ce3Schristos  (name ms1-003)
117*66e63ce3Schristos  (comment "Morpho Technologies mrisc")
118*66e63ce3Schristos  (mach ms1-003)
119*66e63ce3Schristos  (unit u-exec "Execution Unit" ()
120*66e63ce3Schristos	1 1 ; issue done
121*66e63ce3Schristos	() ; state
122*66e63ce3Schristos	() ; inputs
123*66e63ce3Schristos	() ; outputs
124*66e63ce3Schristos	() ; profile action (default)
125*66e63ce3Schristos	)
126*66e63ce3Schristos)
127*66e63ce3Schristos
128*66e63ce3Schristos(define-model
129*66e63ce3Schristos  (name ms2)
130*66e63ce3Schristos  (comment "Morpho Technologies ms2")
131*66e63ce3Schristos  (mach ms2)
132*66e63ce3Schristos  (unit u-exec "Execution Unit" ()
133*66e63ce3Schristos	1 1 ; issue done
134*66e63ce3Schristos	() ; state
135*66e63ce3Schristos	() ; inputs
136*66e63ce3Schristos	() ; outputs
137*66e63ce3Schristos	() ; profile action (default)
138*66e63ce3Schristos	)
139*66e63ce3Schristos)
140*66e63ce3Schristos
141*66e63ce3Schristos; FIXME: It might simplify things to separate the execute process from the
142*66e63ce3Schristos; one that updates the PC.
143*66e63ce3Schristos
144*66e63ce3Schristos
145*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;
146*66e63ce3Schristos;; Instruction Fields ;;
147*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;
148*66e63ce3Schristos
149*66e63ce3Schristos; Attributes:
150*66e63ce3Schristos; PCREL-ADDR: pc relative value (for reloc and disassembly purposes)
151*66e63ce3Schristos; ABS-ADDR: absolute address (for reloc and disassembly purposes?)
152*66e63ce3Schristos; RESERVED: bits are not used to decode insn, must be all 0
153*66e63ce3Schristos; RELOC: there is a relocation associated with this field (experiment)
154*66e63ce3Schristos;
155*66e63ce3Schristos; f-msys: Identify a a morphosys insns.  1 if msys, 0 if not.
156*66e63ce3Schristos; f-opc: 6 bit opcode for non-morphosys instructions.
157*66e63ce3Schristos; f-msopc: 6 bit opcode for morphosys instructions.
158*66e63ce3Schristos; f-imm: flag to indicate use of an immediate operand.  1 if yes, 0 if no.
159*66e63ce3Schristos; f-sr1: source resgister 1. (also used for MSYS insns)
160*66e63ce3Schristos; f-sr2: source register 2. (also used for MSYS insns)
161*66e63ce3Schristos; f-dr: destination register when located in bits 19:16.
162*66e63ce3Schristos; f-drrr: destination register when located in bits 15:12. (also for MSYS insns)
163*66e63ce3Schristos; f-imm16: 16 bit immediate value when not an offset.
164*66e63ce3Schristos; f-imm16a: 16 bit immediate value when it's a pc-rel offset.
165*66e63ce3Schristos; f-uu4a: unused 4 bit field.
166*66e63ce3Schristos; f-uu4b: second unsed 4 bit field.
167*66e63ce3Schristos; f-uu1: unused 1 bit field
168*66e63ce3Schristos; f-uu12: unused 12 bit field.
169*66e63ce3Schristos; f-uu16: unused 16 bit field.
170*66e63ce3Schristos; f-uu24: unused 24 bit field.
171*66e63ce3Schristos
172*66e63ce3Schristos(dnf f-msys      "morphosys insn flag"  	() 31 1)
173*66e63ce3Schristos(dnf f-opc       "opcode field"			() 30 6)
174*66e63ce3Schristos(dnf f-imm       "immedate flag"		() 24 1)
175*66e63ce3Schristos(dnf f-uu24      "unused 24 bits"               () 23 24)
176*66e63ce3Schristos(dnf f-sr1       "sr1 register field"	(ABS-ADDR) 23 4)
177*66e63ce3Schristos(dnf f-sr2       "sr2 register field"	(ABS-ADDR) 19 4)
178*66e63ce3Schristos(dnf f-dr        "dr register field"	(ABS-ADDR) 19 4)
179*66e63ce3Schristos(dnf f-drrr      "drrr register field"	(ABS-ADDR) 15 4)
180*66e63ce3Schristos(dnf f-imm16u    "unsigned 16 bit immediate"    () 15 16)
181*66e63ce3Schristos(df  f-imm16s    "signed 16 bit immediate"      () 15 16 INT ((value pc) (add HI value 0)) ((value pc) (add HI value 0)))
182*66e63ce3Schristos(dnf f-imm16a	 "pc-rel offset"      (PCREL-ADDR) 15 16)
183*66e63ce3Schristos(dnf f-uu4a      "unused 4 bit field"		() 19 4)
184*66e63ce3Schristos(dnf f-uu4b      "unused 4 bit field"		() 23 4)
185*66e63ce3Schristos(dnf f-uu12      "unused 12 bit field"	        () 11 12)
186*66e63ce3Schristos(dnf f-uu8       "unused 8 bit field"           () 15 8)
187*66e63ce3Schristos(dnf f-uu16      "unused 16 bit field" 	        () 15 16)
188*66e63ce3Schristos(dnf f-uu1       "unused 1 bit field" 	        ()  7 1)
189*66e63ce3Schristos
190*66e63ce3Schristos; The following ifields are used exclusively for the MorphoSys instructions.
191*66e63ce3Schristos; In a few cases, a bit field is used for something in addition to what its
192*66e63ce3Schristos; name suggests.  For the most part, the names are meaningful though.
193*66e63ce3Schristos
194*66e63ce3Schristos(dnf f-msopc     "opcode field"			() 30 5)
195*66e63ce3Schristos(dnf f-uu-26-25  "unused 26 bits"               () 25 26)
196*66e63ce3Schristos(dnf f-mask      "mask"	                        () 25 16)
197*66e63ce3Schristos(dnf f-bankaddr  "bank address"	                () 25 13)
198*66e63ce3Schristos(dnf f-rda       "rda"	                        () 25 1)
199*66e63ce3Schristos(dnf f-uu-2-25   "unused bits  25 & 24"		() 25 2)
200*66e63ce3Schristos(dnf f-rbbc      "Omega network configuration"	() 25 2)
201*66e63ce3Schristos(dnf f-perm	 "perm"				() 25 2)
202*66e63ce3Schristos(dnf f-mode      "mode"                         () 25 2)
203*66e63ce3Schristos(dnf f-uu-1-24   "testing" 			() 24 1)
204*66e63ce3Schristos(dnf f-wr        "wr"	                        () 24 1)
205*66e63ce3Schristos(dnf f-fbincr    "fb incr"                      () 23 4)
206*66e63ce3Schristos(dnf f-uu-2-23   "unused bits 23 and 22"	() 23 2)
207*66e63ce3Schristos(dnf f-xmode     "xmode"	                () 23 1)
208*66e63ce3Schristos(dnf f-a23	 "a23"				() 23 1)
209*66e63ce3Schristos(dnf f-mask1     "mask1"	                () 22 3)
210*66e63ce3Schristos(dnf f-cr 	 "cr"				() 22 3)
211*66e63ce3Schristos(dnf f-type      "type"	                        () 21 2)
212*66e63ce3Schristos(dnf f-incamt    "increment amount"             () 19 8)
213*66e63ce3Schristos(dnf f-cbs	 "cbs"				() 19 2)
214*66e63ce3Schristos(dnf f-uu-1-19   "unused bit 19"		() 19 1)
215*66e63ce3Schristos(dnf f-ball      "b_all"	                () 19 1)
216*66e63ce3Schristos(dnf f-colnum    "column number"		() 18 3)
217*66e63ce3Schristos(dnf f-brc       "b_r_c"	                () 18 3)
218*66e63ce3Schristos(dnf f-incr	 "incr"				() 17 6)
219*66e63ce3Schristos(dnf f-fbdisp    "frame buffer displacement"	() 15 6)
220*66e63ce3Schristos(dnf f-uu-4-15   "unused bits 15,14,13,12"	() 15 4)
221*66e63ce3Schristos(dnf f-length	 "length"			() 15 3)
222*66e63ce3Schristos(dnf f-uu-1-15   "unused bit 15"         	() 15 1)
223*66e63ce3Schristos(dnf f-rc        "row/column context"		() 15 1)
224*66e63ce3Schristos(dnf f-rcnum     "starting cell of cntxt mem."	() 14 3)
225*66e63ce3Schristos(dnf f-rownum    "row number"		        () 14 3)
226*66e63ce3Schristos(dnf f-cbx	 "cbx"				() 14 3)
227*66e63ce3Schristos(dnf f-id        "id"                           () 14 1)
228*66e63ce3Schristos(dnf f-size      "size"                         () 13 14)
229*66e63ce3Schristos(dnf f-rownum1   "row number"		        () 12 3)
230*66e63ce3Schristos(dnf f-uu-3-11   "unused 3 bits (11-9)"         () 11 3)
231*66e63ce3Schristos(dnf f-rc1       "row/column context"		() 11 1)
232*66e63ce3Schristos(dnf f-ccb	 "ccb"				() 11 1)
233*66e63ce3Schristos(dnf f-cbrb      "data-bus orientation"		() 10 1)
234*66e63ce3Schristos(dnf f-cdb	 "cdb"				() 10 1)
235*66e63ce3Schristos(dnf f-rownum2   "row number"		        ()  9 3)
236*66e63ce3Schristos(dnf f-cell      "cell"         		()  9 3)
237*66e63ce3Schristos(dnf f-uu-3-9    "unused 3 bits (9-7)"          ()  9 3)
238*66e63ce3Schristos(dnf f-contnum   "context number"		()  8 9)
239*66e63ce3Schristos(dnf f-uu-1-6    "unused bit 6"                 ()  6 1)
240*66e63ce3Schristos(dnf f-dup       "dup"           		()  6 1)
241*66e63ce3Schristos(dnf f-rc2       "rc2"           		()  6 1)
242*66e63ce3Schristos(dnf f-ctxdisp   "context displacement"		()  5 6)
243*66e63ce3Schristos
244*66e63ce3Schristos; additional fields in ms2
245*66e63ce3Schristos(dnf f-imm16l    "loop count"                   () 23 16)
246*66e63ce3Schristos(df  f-loopo	 "loop offset"			() 7 8 UINT
247*66e63ce3Schristos    ((value pc) (srl SI value 2))
248*66e63ce3Schristos    ((value pc) (add SI (sll value 2) 8))
249*66e63ce3Schristos )
250*66e63ce3Schristos(dnf f-cb1sel    "cb1 select"                   () 25 3)
251*66e63ce3Schristos(dnf f-cb2sel    "cb2 select"                   () 22 3)
252*66e63ce3Schristos(dnf f-cb1incr   "cb1 increment"                (SIGNED) 19 6)
253*66e63ce3Schristos(dnf f-cb2incr   "cb2 increment"                (SIGNED) 13 6)
254*66e63ce3Schristos(dnf f-rc3       "row/colum context"            ()  7 1)
255*66e63ce3Schristos
256*66e63ce3Schristos; The following is just for a test
257*66e63ce3Schristos(dnf f-msysfrsr2 "sr2 for msys"			() 19 4)
258*66e63ce3Schristos(dnf f-brc2      "b_r_c2"                       () 14 3)
259*66e63ce3Schristos(dnf f-ball2     "b_all2"                       () 15 1)
260*66e63ce3Schristos
261*66e63ce3Schristos
262*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
263*66e63ce3Schristos;; Enumerations Of Instruction Fields ;;
264*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
265*66e63ce3Schristos
266*66e63ce3Schristos; insn-msys: bit 31.  1 for Morphosys Insns, 0 if not.
267*66e63ce3Schristos(define-normal-insn-enum insn-msys "msys enums" () MSYS_ f-msys
268*66e63ce3Schristos  (NO YES)
269*66e63ce3Schristos)
270*66e63ce3Schristos
271*66e63ce3Schristos; insn-opc: bits 30 through 25 .  Non-MorphoSys Instructions
272*66e63ce3Schristos; Note - the documentation is wrong for the encoding of the DBNZ
273*66e63ce3Schristos; instruction.  It is actually 011110.  See Issue 67699.
274*66e63ce3Schristos(define-normal-insn-enum insn-opc "opc enums" () OPC_ f-opc
275*66e63ce3Schristos  (ADD  ADDU SUB  SUBU MUL   -      -    -
276*66e63ce3Schristos   AND  OR   XOR  NAND NOR   XNOR   LDUI -
277*66e63ce3Schristos   LSL  LSR  ASR  -    -     -      -    -
278*66e63ce3Schristos   BRLT BRLE BREQ JMP  JAL   BRNEQ  DBNZ LOOP
279*66e63ce3Schristos   LDW  STW  -    -    -     -      -    -
280*66e63ce3Schristos   -    -    -    -    -     -      -    -
281*66e63ce3Schristos   EI   DI   SI   RETI BREAK IFLUSH -    -
282*66e63ce3Schristos  )
283*66e63ce3Schristos)
284*66e63ce3Schristos
285*66e63ce3Schristos; insn-msopc: bits 30 through 26 .  MorphoSys Instructions
286*66e63ce3Schristos(define-normal-insn-enum insn-msopc "msopc enums" () MSOPC_ f-msopc
287*66e63ce3Schristos  (LDCTXT LDFB      STFB    FBCB     MFBCB    FBCCI     FBRCI     FBCRI
288*66e63ce3Schristos   FBRRI  MFBCCI    MFBRCI  MFBCRI   MFBRRI   FBCBDR    RCFBCB    MRCFBCB
289*66e63ce3Schristos   CBCAST DUPCBCAST WFBI    WFB      RCRISC   FBCBINC   RCXMODE   INTLVR
290*66e63ce3Schristos   WFBINC MWFBINC   WFBINCR MWFBINCR FBCBINCS MFBCBINCS FBCBINCRS MFBCBINCRS
291*66e63ce3Schristos   -      -         -       -        -        -         -         -
292*66e63ce3Schristos  )
293*66e63ce3Schristos)
294*66e63ce3Schristos
295*66e63ce3Schristos; insn-imm: bit 24.  Immediate operand indicator.
296*66e63ce3Schristos(define-normal-insn-enum insn-imm "imm enums" () IMM_ f-imm
297*66e63ce3Schristos  ; This bit specifies whether and immediate operand will be present.
298*66e63ce3Schristos  ; It's 1 if there is, 0 if there is not.
299*66e63ce3Schristos  (NO YES)
300*66e63ce3Schristos)
301*66e63ce3Schristos;;;;;;;;;;;;;;;;
302*66e63ce3Schristos;; Attributes ;;
303*66e63ce3Schristos;;;;;;;;;;;;;;;;
304*66e63ce3Schristos
305*66e63ce3Schristos; Might not need this.  Keep if for the sim just in case.
306*66e63ce3Schristos;(define-attr
307*66e63ce3Schristos;  (for insn)
308*66e63ce3Schristos;  (type boolean)
309*66e63ce3Schristos;  (name EXT-SKIP-INSN)
310*66e63ce3Schristos;  (comment "instruction is a PAGE, LOADL or LOADH instruction")
311*66e63ce3Schristos;)
312*66e63ce3Schristos
313*66e63ce3Schristos(define-attr
314*66e63ce3Schristos  (for insn)
315*66e63ce3Schristos  (type boolean)
316*66e63ce3Schristos  (name LOAD-DELAY)
317*66e63ce3Schristos  (comment "insn has a load delay")
318*66e63ce3Schristos)
319*66e63ce3Schristos
320*66e63ce3Schristos(define-attr
321*66e63ce3Schristos  (for insn)
322*66e63ce3Schristos  (type boolean)
323*66e63ce3Schristos  (name MEMORY-ACCESS)
324*66e63ce3Schristos  (comment "insn performs a memory access")
325*66e63ce3Schristos)
326*66e63ce3Schristos
327*66e63ce3Schristos(define-attr
328*66e63ce3Schristos  (for insn)
329*66e63ce3Schristos  (type boolean)
330*66e63ce3Schristos  (name AL-INSN)
331*66e63ce3Schristos  (comment "insn is an arithmetic or logic insn.")
332*66e63ce3Schristos)
333*66e63ce3Schristos
334*66e63ce3Schristos(define-attr
335*66e63ce3Schristos  (for insn)
336*66e63ce3Schristos  (type boolean)
337*66e63ce3Schristos  (name IO-INSN)
338*66e63ce3Schristos  (comment "insn performs an I/O operation")
339*66e63ce3Schristos)
340*66e63ce3Schristos
341*66e63ce3Schristos(define-attr
342*66e63ce3Schristos  (for insn)
343*66e63ce3Schristos  (type boolean)
344*66e63ce3Schristos  (name BR-INSN)
345*66e63ce3Schristos  (comment "insn performs an I/O operation")
346*66e63ce3Schristos)
347*66e63ce3Schristos
348*66e63ce3Schristos(define-attr
349*66e63ce3Schristos  (for insn)
350*66e63ce3Schristos  (type boolean)
351*66e63ce3Schristos  (name JAL-HAZARD)
352*66e63ce3Schristos  (comment "insn has jal-like hazard")
353*66e63ce3Schristos)
354*66e63ce3Schristos
355*66e63ce3Schristos(define-pmacro (define-reg-use-attr regfield)
356*66e63ce3Schristos  (define-attr
357*66e63ce3Schristos    (for insn)
358*66e63ce3Schristos    (type boolean)
359*66e63ce3Schristos    (name (.sym "USES-" (.upcase regfield)))
360*66e63ce3Schristos    (comment ("insn accesses register operand " regfield))))
361*66e63ce3Schristos
362*66e63ce3Schristos(define-reg-use-attr "frdr")
363*66e63ce3Schristos(define-reg-use-attr "frdrrr")
364*66e63ce3Schristos(define-reg-use-attr "frsr1")
365*66e63ce3Schristos(define-reg-use-attr "frsr2")
366*66e63ce3Schristos
367*66e63ce3Schristos
368*66e63ce3Schristos; Might not need this.  Keep it for the sim just in case.
369*66e63ce3Schristos(define-attr
370*66e63ce3Schristos  (for insn)
371*66e63ce3Schristos  (type boolean)
372*66e63ce3Schristos  (name SKIPA)
373*66e63ce3Schristos  (comment "instruction is a SKIP instruction")
374*66e63ce3Schristos)
375*66e63ce3Schristos
376*66e63ce3Schristos
377*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;
378*66e63ce3Schristos;; Hardware Pieces ;;
379*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;
380*66e63ce3Schristos
381*66e63ce3Schristos;(define-pmacro (build-reg-name n) (.splice (.str "$" n) n))
382*66e63ce3Schristos
383*66e63ce3Schristos; These are the 16 registers that the chip has.  In later versions
384*66e63ce3Schristos; where there will be more registers, this will need to be expanded.
385*66e63ce3Schristos; Note that there are two entries for the registers with two names.
386*66e63ce3Schristos(define-hardware
387*66e63ce3Schristos  (name h-spr)
388*66e63ce3Schristos  (comment "special-purpose registers")
389*66e63ce3Schristos  (type register SI (16))
390*66e63ce3Schristos  (indices keyword "" (("R0" 0) ("R1" 1) ("R2" 2) ("R3" 3) ("R4" 4) ("R5" 5)
391*66e63ce3Schristos  ("R6" 6) ("R7" 7) ("R8" 8) ("R9" 9) ("R10" 10) ("R11" 11) ("R12" 12) ("fp" 12)
392*66e63ce3Schristos  ("R13" 13) ("sp" 13) ("R14" 14) ("ra" 14) ("R15" 15) ("ira" 15)))
393*66e63ce3Schristos;  (get (index) (and (raw-reg h-spr) #xffffffff))
394*66e63ce3Schristos;  (set (index value) (set (raw-reg h-spr) (and value #xffffffff)))
395*66e63ce3Schristos)
396*66e63ce3Schristos
397*66e63ce3Schristos; This is the  program counter.
398*66e63ce3Schristos(dnh h-pc "program counter" (PC PROFILE) (pc) () () ())
399*66e63ce3Schristos
400*66e63ce3Schristos(define-keyword
401*66e63ce3Schristos   (name msys-syms)
402*66e63ce3Schristos   (print-name h-nil)
403*66e63ce3Schristos   (prefix "")
404*66e63ce3Schristos   (values (DUP 1) (XX 0))
405*66e63ce3Schristos)
406*66e63ce3Schristos
407*66e63ce3Schristos;;;;;;;;;;;;;;
408*66e63ce3Schristos;; Operands ;;
409*66e63ce3Schristos;;;;;;;;;;;;;;
410*66e63ce3Schristos
411*66e63ce3Schristos(define-operand (name frsr1) (comment "register") (attrs)
412*66e63ce3Schristos  (type h-spr) (index f-sr1) )
413*66e63ce3Schristos(define-operand (name frsr2) (comment "register") (attrs)
414*66e63ce3Schristos  (type h-spr) (index f-sr2) )
415*66e63ce3Schristos(define-operand (name frdr) (comment "register") (attrs)
416*66e63ce3Schristos  (type h-spr) (index f-dr) )
417*66e63ce3Schristos(define-operand (name frdrrr) (comment "register") (attrs)
418*66e63ce3Schristos  (type h-spr) (index f-drrr) )
419*66e63ce3Schristos(define-operand (name imm16) (comment "immediate value - sign extd") (attrs)
420*66e63ce3Schristos  (type h-sint) (index f-imm16s) (handlers (parse "imm16") (print "dollarhex")))
421*66e63ce3Schristos(define-operand (name imm16z) (comment "immediate value - zero extd") (attrs)
422*66e63ce3Schristos  (type h-uint) (index f-imm16u) (handlers (parse "imm16") (print "dollarhex")))
423*66e63ce3Schristos(define-operand (name imm16o) (comment "immediate value") (attrs PCREL-ADDR)
424*66e63ce3Schristos  (type h-uint) (index f-imm16s) (handlers (parse "imm16") (print "pcrel")))
425*66e63ce3Schristos
426*66e63ce3Schristos; Operands for MorphoSys Instructions
427*66e63ce3Schristos
428*66e63ce3Schristos(define-operand (name rc) (comment "rc") (attrs)
429*66e63ce3Schristos  (type h-uint) (index f-rc) (handlers (parse "rc") (print "dollarhex")))
430*66e63ce3Schristos
431*66e63ce3Schristos(define-operand (name rcnum) (comment "rcnum") (attrs)
432*66e63ce3Schristos  (type h-uint) (index f-rcnum) (handlers (print "dollarhex")))
433*66e63ce3Schristos
434*66e63ce3Schristos(define-operand (name contnum) (comment "context number") (attrs)
435*66e63ce3Schristos  (type h-uint) (index f-contnum) (handlers (print "dollarhex")))
436*66e63ce3Schristos
437*66e63ce3Schristos(define-operand (name rbbc) (comment "omega network configuration") (attrs)
438*66e63ce3Schristos  (type h-uint) (index f-rbbc) (handlers (parse "rbbc") (print "dollarhex")))
439*66e63ce3Schristos
440*66e63ce3Schristos(define-operand (name colnum) (comment "column number") (attrs)
441*66e63ce3Schristos  (type h-uint) (index f-colnum) (handlers (print "dollarhex")))
442*66e63ce3Schristos
443*66e63ce3Schristos(define-operand (name rownum) (comment "row number") (attrs)
444*66e63ce3Schristos  (type h-uint) (index f-rownum) (handlers (print "dollarhex")))
445*66e63ce3Schristos
446*66e63ce3Schristos(define-operand (name rownum1) (comment "row number") (attrs)
447*66e63ce3Schristos  (type h-uint) (index f-rownum1) (handlers (print "dollarhex")))
448*66e63ce3Schristos
449*66e63ce3Schristos(define-operand (name rownum2) (comment "row number") (attrs)
450*66e63ce3Schristos  (type h-uint) (index f-rownum2) (handlers (print "dollarhex")))
451*66e63ce3Schristos
452*66e63ce3Schristos(define-operand (name rc1) (comment "rc1") (attrs)
453*66e63ce3Schristos  (type h-uint) (index f-rc1) (handlers (parse "rc") (print "dollarhex")))
454*66e63ce3Schristos
455*66e63ce3Schristos(define-operand (name rc2) (comment "rc2") (attrs)
456*66e63ce3Schristos  (type h-uint) (index f-rc2) (handlers (parse "rc") (print "dollarhex")))
457*66e63ce3Schristos
458*66e63ce3Schristos(define-operand (name cbrb) (comment "data-bus orientation") (attrs)
459*66e63ce3Schristos  (type h-uint) (index f-cbrb) (handlers (parse "cbrb") (print "dollarhex")))
460*66e63ce3Schristos
461*66e63ce3Schristos(define-operand (name cell) (comment "cell") (attrs)
462*66e63ce3Schristos  (type h-uint) (index f-cell) (handlers (print "dollarhex")))
463*66e63ce3Schristos
464*66e63ce3Schristos(define-operand (name dup) (comment "dup") (attrs)
465*66e63ce3Schristos  (type h-uint) (index f-dup) (handlers (parse "dup") (print "dollarhex")))
466*66e63ce3Schristos
467*66e63ce3Schristos(define-operand (name ctxdisp) (comment "context displacement") (attrs)
468*66e63ce3Schristos  (type h-uint) (index f-ctxdisp) (handlers (print "dollarhex")))
469*66e63ce3Schristos
470*66e63ce3Schristos(define-operand (name fbdisp) (comment "frame buffer displacement") (attrs)
471*66e63ce3Schristos  (type h-uint) (index f-fbdisp) (handlers (print "dollarhex")))
472*66e63ce3Schristos
473*66e63ce3Schristos(define-operand (name type) (comment "type") (attrs)
474*66e63ce3Schristos  (type h-uint) (index f-type) (handlers (parse "type") (print "dollarhex")))
475*66e63ce3Schristos
476*66e63ce3Schristos(define-operand (name mask) (comment "mask") (attrs)
477*66e63ce3Schristos  (type h-uint) (index f-mask) (handlers (print "dollarhex")))
478*66e63ce3Schristos
479*66e63ce3Schristos(define-operand (name bankaddr) (comment "bank address") (attrs)
480*66e63ce3Schristos  (type h-uint) (index f-bankaddr) (handlers (print "dollarhex")))
481*66e63ce3Schristos
482*66e63ce3Schristos(define-operand (name incamt) (comment "increment amount") (attrs)
483*66e63ce3Schristos  (type h-uint) (index f-incamt) (handlers (print "dollarhex")))
484*66e63ce3Schristos
485*66e63ce3Schristos(define-operand (name xmode) (comment "xmode") (attrs)
486*66e63ce3Schristos  (type h-uint) (index f-xmode) (handlers (parse "xmode") (print "dollarhex")))
487*66e63ce3Schristos
488*66e63ce3Schristos(define-operand (name mask1) (comment "mask1") (attrs)
489*66e63ce3Schristos  (type h-uint) (index f-mask1) (handlers (print "dollarhex")))
490*66e63ce3Schristos
491*66e63ce3Schristos(define-operand (name ball) (comment "b_all") (attrs)
492*66e63ce3Schristos  (type h-uint) (index f-ball) (handlers (parse "ball") (print "dollarhex")))
493*66e63ce3Schristos
494*66e63ce3Schristos(define-operand (name brc) (comment "b_r_c") (attrs)
495*66e63ce3Schristos  (type h-uint) (index f-brc) (handlers (print "dollarhex")))
496*66e63ce3Schristos
497*66e63ce3Schristos(define-operand (name rda) (comment "rd") (attrs)
498*66e63ce3Schristos  (type h-uint) (index f-rda) (handlers (print "dollarhex")))
499*66e63ce3Schristos
500*66e63ce3Schristos(define-operand (name wr) (comment "wr") (attrs)
501*66e63ce3Schristos  (type h-uint) (index f-wr) (handlers (print "dollarhex")))
502*66e63ce3Schristos
503*66e63ce3Schristos(define-operand (name ball2) (comment "b_all2") (attrs)
504*66e63ce3Schristos  (type h-uint) (index f-ball2) (handlers (parse "ball") (print "dollarhex")))
505*66e63ce3Schristos
506*66e63ce3Schristos(define-operand (name brc2) (comment "b_r_c2") (attrs)
507*66e63ce3Schristos  (type h-uint) (index f-brc2) (handlers (print "dollarhex")))
508*66e63ce3Schristos(define-operand (name perm) (comment "perm") (attrs)
509*66e63ce3Schristos  (type h-uint) (index f-perm) (handlers (print "dollarhex")))
510*66e63ce3Schristos(define-operand (name a23)   (comment "a23") (attrs)
511*66e63ce3Schristos  (type h-uint) (index f-a23) (handlers (print "dollarhex")))
512*66e63ce3Schristos(define-operand (name cr)   (comment "c-r") (attrs)
513*66e63ce3Schristos  (type h-uint) (index f-cr) (handlers (print "dollarhex")))
514*66e63ce3Schristos(define-operand (name cbs)	(comment "cbs") (attrs)
515*66e63ce3Schristos  (type h-uint) (index f-cbs) (handlers (print "dollarhex")))
516*66e63ce3Schristos(define-operand (name incr)	(comment "incr") (attrs)
517*66e63ce3Schristos  (type h-uint) (index f-incr) (handlers (print "dollarhex")))
518*66e63ce3Schristos(define-operand (name length)	(comment "length") (attrs)
519*66e63ce3Schristos  (type h-uint) (index f-length) (handlers (print "dollarhex")))
520*66e63ce3Schristos(define-operand (name cbx)	(comment "cbx") (attrs)
521*66e63ce3Schristos  (type h-uint) (index f-cbx) (handlers (print "dollarhex")))
522*66e63ce3Schristos(define-operand (name ccb)	(comment "ccb") (attrs)
523*66e63ce3Schristos  (type h-uint) (index f-ccb) (handlers (print "dollarhex")))
524*66e63ce3Schristos(define-operand (name cdb)	(comment "cdb") (attrs)
525*66e63ce3Schristos  (type h-uint) (index f-cdb) (handlers (print "dollarhex")))
526*66e63ce3Schristos
527*66e63ce3Schristos; For the INTLVR insn
528*66e63ce3Schristos(define-operand (name mode) (comment "mode") (attrs)
529*66e63ce3Schristos  (type h-uint) (index f-mode) (handlers (print "dollarhex")))
530*66e63ce3Schristos(define-operand (name id) (comment "i/d") (attrs)
531*66e63ce3Schristos  (type h-uint) (index f-id) (handlers (print "dollarhex")))
532*66e63ce3Schristos(define-operand (name size) (comment "size") (attrs)
533*66e63ce3Schristos  (type h-uint) (index f-size) (handlers (print "dollarhex")))
534*66e63ce3Schristos
535*66e63ce3Schristos(define-operand (name fbincr)	(comment "fb incr") (attrs)
536*66e63ce3Schristos  (type h-uint) (index f-fbincr) (handlers (print "dollarhex")))
537*66e63ce3Schristos
538*66e63ce3Schristos; For the ms2 insns
539*66e63ce3Schristos(define-operand (name loopsize) (comment "immediate value")
540*66e63ce3Schristos  (attrs (MACH ms2) PCREL-ADDR)
541*66e63ce3Schristos  (type h-uint) (index f-loopo) (handlers (parse "loopsize") (print "pcrel")))
542*66e63ce3Schristos(define-operand (name imm16l) (comment "immediate value")
543*66e63ce3Schristos  (attrs (MACH ms2))
544*66e63ce3Schristos  (type h-uint) (index f-imm16l) (handlers (print "dollarhex")))
545*66e63ce3Schristos(define-operand (name rc3) (comment "rc3") (attrs (MACH ms2))
546*66e63ce3Schristos  (type h-uint) (index f-rc3) (handlers (parse "rc") (print "dollarhex")))
547*66e63ce3Schristos(define-operand (name cb1sel) (comment "cb1sel") (attrs (MACH ms2))
548*66e63ce3Schristos  (type h-uint) (index f-cb1sel) (handlers (print "dollarhex")))
549*66e63ce3Schristos(define-operand (name cb2sel) (comment "cb2sel") (attrs (MACH ms2))
550*66e63ce3Schristos  (type h-uint) (index f-cb2sel) (handlers (print "dollarhex")))
551*66e63ce3Schristos(define-operand (name cb1incr) (comment "cb1incr") (attrs (MACH ms2))
552*66e63ce3Schristos  (type h-sint) (index f-cb1incr) (handlers (print "dollarhex")))
553*66e63ce3Schristos(define-operand (name cb2incr) (comment "cb2incr") (attrs (MACH ms2))
554*66e63ce3Schristos  (type h-sint) (index f-cb2incr) (handlers (print "dollarhex")))
555*66e63ce3Schristos
556*66e63ce3Schristos; Probaby won't need most of these.
557*66e63ce3Schristos(define-pmacro r0    (reg h-spr #x0))
558*66e63ce3Schristos(define-pmacro r1    (reg h-spr #x01))
559*66e63ce3Schristos(define-pmacro r2    (reg h-spr #x02))
560*66e63ce3Schristos(define-pmacro r3    (reg h-spr #x03))
561*66e63ce3Schristos(define-pmacro r4    (reg h-spr #x04))
562*66e63ce3Schristos(define-pmacro r5    (reg h-spr #x05))
563*66e63ce3Schristos(define-pmacro r6    (reg h-spr #x06))
564*66e63ce3Schristos(define-pmacro r7    (reg h-spr #x07))
565*66e63ce3Schristos(define-pmacro r8    (reg h-spr #x08))
566*66e63ce3Schristos(define-pmacro r9    (reg h-spr #x09))
567*66e63ce3Schristos(define-pmacro r10   (reg h-spr #xA))
568*66e63ce3Schristos(define-pmacro r11   (reg h-spr #xB))
569*66e63ce3Schristos(define-pmacro r12   (reg h-spr #xC))
570*66e63ce3Schristos(define-pmacro fp    (reg h-spr #xC))
571*66e63ce3Schristos(define-pmacro r13   (reg h-spr #xD))
572*66e63ce3Schristos(define-pmacro sp    (reg h-spr #xD))
573*66e63ce3Schristos(define-pmacro r14   (reg h-spr #xE))
574*66e63ce3Schristos(define-pmacro ra    (reg h-spr #xE))
575*66e63ce3Schristos(define-pmacro r15   (reg h-spr #xF))
576*66e63ce3Schristos(define-pmacro ira   (reg h-spr #xF))
577*66e63ce3Schristos
578*66e63ce3Schristos; delayed set
579*66e63ce3Schristos(define-pmacro (dset dest src) (set (delay 1 dest) src))
580*66e63ce3Schristos
581*66e63ce3Schristos
582*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
583*66e63ce3Schristos;; Instructions As Defined In the MorphoRisc ISA Document ;;
584*66e63ce3Schristos;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
585*66e63ce3Schristos
586*66e63ce3Schristos; Arithmetic Instructions
587*66e63ce3Schristos
588*66e63ce3Schristos(dni add "ADD DstReg, SrcReg1, SrcReg2"
589*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
590*66e63ce3Schristos     "add $frdrrr,$frsr1,$frsr2"
591*66e63ce3Schristos     (+ MSYS_NO OPC_ADD IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
592*66e63ce3Schristos     (set frdrrr (add SI frsr1 frsr2))
593*66e63ce3Schristos     ()
594*66e63ce3Schristos)
595*66e63ce3Schristos
596*66e63ce3Schristos(dni addu "ADDU DstReg, SrcReg1, SrcReg2"
597*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
598*66e63ce3Schristos     "addu $frdrrr,$frsr1,$frsr2"
599*66e63ce3Schristos     (+ MSYS_NO OPC_ADDU IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
600*66e63ce3Schristos     (set frdrrr (add USI frsr1 frsr2))
601*66e63ce3Schristos     ()
602*66e63ce3Schristos)
603*66e63ce3Schristos
604*66e63ce3Schristos(dni addi "ADDI DstReg, SrcReg1 UnsImm"
605*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
606*66e63ce3Schristos     "addi $frdr,$frsr1,#$imm16"
607*66e63ce3Schristos     (+ MSYS_NO OPC_ADD IMM_YES frsr1 frdr imm16)
608*66e63ce3Schristos     (sequence((HI tmp))
609*66e63ce3Schristos        (set HI tmp (and imm16 #xffff))
610*66e63ce3Schristos	(set frdr (add SI frsr1 (ext SI tmp)))
611*66e63ce3Schristos     )
612*66e63ce3Schristos     ()
613*66e63ce3Schristos)
614*66e63ce3Schristos
615*66e63ce3Schristos(dni addui "ADDUI DstReg, SrcReg1, UnsImm"
616*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
617*66e63ce3Schristos     "addui $frdr,$frsr1,#$imm16z"
618*66e63ce3Schristos     (+ MSYS_NO OPC_ADDU IMM_YES frsr1 frdr imm16z)
619*66e63ce3Schristos     (set frdr (add USI frsr1 (ext USI imm16z)))
620*66e63ce3Schristos     ()
621*66e63ce3Schristos)
622*66e63ce3Schristos
623*66e63ce3Schristos(dni sub "SUB DstReg, SrcReg1, SrcReg2"
624*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
625*66e63ce3Schristos     "sub $frdrrr,$frsr1,$frsr2"
626*66e63ce3Schristos     (+ MSYS_NO OPC_SUB IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
627*66e63ce3Schristos     (set frdrrr (sub SI frsr1 frsr2))
628*66e63ce3Schristos     ()
629*66e63ce3Schristos)
630*66e63ce3Schristos
631*66e63ce3Schristos(dni subu "SUBU DstReg, SrcReg1, SrcReg2"
632*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
633*66e63ce3Schristos     "subu $frdrrr,$frsr1,$frsr2"
634*66e63ce3Schristos     (+ MSYS_NO OPC_SUBU IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
635*66e63ce3Schristos     (set frdrrr (sub USI frsr1 frsr2))
636*66e63ce3Schristos     ()
637*66e63ce3Schristos)
638*66e63ce3Schristos
639*66e63ce3Schristos(dni subi "SUBI DstReg, SrcReg1, UnsImm"
640*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
641*66e63ce3Schristos     "subi $frdr,$frsr1,#$imm16"
642*66e63ce3Schristos     (+ MSYS_NO OPC_SUB IMM_YES frsr1 frdr imm16)
643*66e63ce3Schristos     (sequence((HI tmp))
644*66e63ce3Schristos        (set HI tmp (and imm16 #xffff))
645*66e63ce3Schristos	(set frdr (sub SI frsr1 (ext SI tmp)))
646*66e63ce3Schristos     )
647*66e63ce3Schristos     ;(set frdr (sub SI frsr1 (ext SI imm16)))
648*66e63ce3Schristos     ()
649*66e63ce3Schristos)
650*66e63ce3Schristos
651*66e63ce3Schristos(dni subui "SUBUI DstReg, SrcReg1, UnsImm"
652*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
653*66e63ce3Schristos     "subui $frdr,$frsr1,#$imm16z"
654*66e63ce3Schristos     (+ MSYS_NO OPC_SUBU IMM_YES frsr1 frdr imm16z)
655*66e63ce3Schristos     (set frdr (sub USI frsr1 (ext USI imm16z)))
656*66e63ce3Schristos     ()
657*66e63ce3Schristos)
658*66e63ce3Schristos
659*66e63ce3Schristos(dni mul "MUL DstReg, SrcReg1, SrcReg2"
660*66e63ce3Schristos     ((MACH ms1-003,ms2) AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
661*66e63ce3Schristos     "mul $frdrrr,$frsr1,$frsr2"
662*66e63ce3Schristos     (+ MSYS_NO OPC_MUL IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
663*66e63ce3Schristos     (sequence((HI op1) (HI op2))
664*66e63ce3Schristos	 (set op1 (and frsr1 #xffff))
665*66e63ce3Schristos         (if (or (lt op1 (const -32768)) (gt op1 (const 32767)))
666*66e63ce3Schristos            (error "operand out of range")
667*66e63ce3Schristos         )
668*66e63ce3Schristos	 (set op2 (and frsr2 #xffff))
669*66e63ce3Schristos         (if (or (lt op2 (const -32768)) (gt op2 (const 32767)))
670*66e63ce3Schristos            (error "operand out of range")
671*66e63ce3Schristos         )
672*66e63ce3Schristos	 (set frdrrr (mul SI (ext SI op1) (ext SI op2)))
673*66e63ce3Schristos     )
674*66e63ce3Schristos     ()
675*66e63ce3Schristos)
676*66e63ce3Schristos
677*66e63ce3Schristos(dni muli "MULI DstReg, SrcReg1, UnsImm"
678*66e63ce3Schristos     ((MACH ms1-003,ms2) AL-INSN USES-FRDR USES-FRSR1)
679*66e63ce3Schristos     "muli $frdr,$frsr1,#$imm16"
680*66e63ce3Schristos     (+ MSYS_NO OPC_MUL IMM_YES frsr1 frdr imm16)
681*66e63ce3Schristos     (sequence((HI op1) (HI op2))
682*66e63ce3Schristos	 (set op1 (and frsr1 #xffff))
683*66e63ce3Schristos         (if (or (lt op1 (const -32768)) (gt op1 (const 32767)))
684*66e63ce3Schristos            (error "operand out of range")
685*66e63ce3Schristos         )
686*66e63ce3Schristos         (set op2 (and imm16 #xffff))
687*66e63ce3Schristos         (if (eq op1 (const 0))
688*66e63ce3Schristos          (error "op1 is 0")
689*66e63ce3Schristos         )
690*66e63ce3Schristos         (if (eq op2 (const 0))
691*66e63ce3Schristos          (error "op2 is 0")
692*66e63ce3Schristos         )
693*66e63ce3Schristos	 (set frdr (mul SI (ext SI op1) (ext SI op2)))
694*66e63ce3Schristos     )
695*66e63ce3Schristos     ()
696*66e63ce3Schristos)
697*66e63ce3Schristos
698*66e63ce3Schristos; Logical Instructions
699*66e63ce3Schristos
700*66e63ce3Schristos(dni and "AND DstReg, SrcReg1, SrcReg2"
701*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
702*66e63ce3Schristos     "and $frdrrr,$frsr1,$frsr2"
703*66e63ce3Schristos     (+ MSYS_NO OPC_AND IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
704*66e63ce3Schristos     (set frdrrr (and frsr1 frsr2))
705*66e63ce3Schristos     ()
706*66e63ce3Schristos)
707*66e63ce3Schristos
708*66e63ce3Schristos(dni andi "ANDI DstReg, SrcReg1, UnsImm"
709*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
710*66e63ce3Schristos     "andi $frdr,$frsr1,#$imm16z"
711*66e63ce3Schristos     (+ MSYS_NO OPC_AND IMM_YES frsr1 frdr imm16z)
712*66e63ce3Schristos     (set frdr (and frsr1 (ext USI imm16z)))
713*66e63ce3Schristos     ()
714*66e63ce3Schristos)
715*66e63ce3Schristos
716*66e63ce3Schristos(dni or "OR DstReg, SrcReg1, SrcReg2"
717*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
718*66e63ce3Schristos     "or $frdrrr,$frsr1,$frsr2"
719*66e63ce3Schristos     (+ MSYS_NO OPC_OR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
720*66e63ce3Schristos     (set frdrrr (or frsr1 frsr2))
721*66e63ce3Schristos     ()
722*66e63ce3Schristos)
723*66e63ce3Schristos
724*66e63ce3Schristos(dni nop "nop"
725*66e63ce3Schristos     ()
726*66e63ce3Schristos     "nop"
727*66e63ce3Schristos     (+ MSYS_NO OPC_OR IMM_NO (f-uu24 0))
728*66e63ce3Schristos     (nop)
729*66e63ce3Schristos     ()
730*66e63ce3Schristos)
731*66e63ce3Schristos
732*66e63ce3Schristos(dni ori "ORI DstReg, SrcReg1, UnsImm"
733*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
734*66e63ce3Schristos     "ori $frdr,$frsr1,#$imm16z"
735*66e63ce3Schristos     (+ MSYS_NO OPC_OR IMM_YES frsr1 frdr imm16z)
736*66e63ce3Schristos     (set frdr (or frsr1 (ext USI imm16z)))
737*66e63ce3Schristos     ()
738*66e63ce3Schristos)
739*66e63ce3Schristos
740*66e63ce3Schristos(dni xor "XOR DstReg, SrcReg1, SrcReg2"
741*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
742*66e63ce3Schristos     "xor $frdrrr,$frsr1,$frsr2"
743*66e63ce3Schristos     (+ MSYS_NO OPC_XOR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
744*66e63ce3Schristos     (set frdrrr (xor frsr1 frsr2))
745*66e63ce3Schristos     ()
746*66e63ce3Schristos)
747*66e63ce3Schristos
748*66e63ce3Schristos(dni xori "XORI DstReg, SrcReg1, UnsImm"
749*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
750*66e63ce3Schristos     "xori $frdr,$frsr1,#$imm16z"
751*66e63ce3Schristos     (+ MSYS_NO OPC_XOR IMM_YES frsr1 frdr imm16z)
752*66e63ce3Schristos     (set frdr (xor frsr1 (ext USI imm16z)))
753*66e63ce3Schristos     ()
754*66e63ce3Schristos)
755*66e63ce3Schristos
756*66e63ce3Schristos(dni nand "NAND DstReg, SrcReg1, SrcReg2"
757*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
758*66e63ce3Schristos     "nand $frdrrr,$frsr1,$frsr2"
759*66e63ce3Schristos     (+ MSYS_NO OPC_NAND IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
760*66e63ce3Schristos     (set frdrrr (inv (and frsr1 frsr2)))
761*66e63ce3Schristos     ()
762*66e63ce3Schristos)
763*66e63ce3Schristos
764*66e63ce3Schristos(dni nandi "NANDI DstReg, SrcReg1, UnsImm"
765*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
766*66e63ce3Schristos     "nandi $frdr,$frsr1,#$imm16z"
767*66e63ce3Schristos     (+ MSYS_NO OPC_NAND IMM_YES frsr1 frdr imm16z)
768*66e63ce3Schristos     (set frdr (inv (and frsr1 (ext USI imm16z))))
769*66e63ce3Schristos     ()
770*66e63ce3Schristos)
771*66e63ce3Schristos
772*66e63ce3Schristos(dni nor "NOR DstReg, SrcReg1, SrcReg2"
773*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
774*66e63ce3Schristos     "nor $frdrrr,$frsr1,$frsr2"
775*66e63ce3Schristos     (+ MSYS_NO OPC_NOR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
776*66e63ce3Schristos     (set frdrrr (inv (or frsr1 frsr2)))
777*66e63ce3Schristos     ()
778*66e63ce3Schristos)
779*66e63ce3Schristos
780*66e63ce3Schristos(dni nori "NORI DstReg, SrcReg1, UnsImm"
781*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
782*66e63ce3Schristos     "nori $frdr,$frsr1,#$imm16z"
783*66e63ce3Schristos     (+ MSYS_NO OPC_NOR IMM_YES frsr1 frdr imm16z)
784*66e63ce3Schristos     (set frdr (inv (or frsr1 (ext USI imm16z))))
785*66e63ce3Schristos     ()
786*66e63ce3Schristos)
787*66e63ce3Schristos
788*66e63ce3Schristos(dni xnor "XNOR DstReg, SrcReg1, SrcReg2"
789*66e63ce3Schristos     (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
790*66e63ce3Schristos     "xnor $frdrrr,$frsr1,$frsr2"
791*66e63ce3Schristos     (+ MSYS_NO OPC_XNOR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
792*66e63ce3Schristos     (set frdrrr (inv (xor frsr1 frsr2)))
793*66e63ce3Schristos     ()
794*66e63ce3Schristos)
795*66e63ce3Schristos
796*66e63ce3Schristos(dni xnori "XNORI DstReg, SrcReg1, UnsImm"
797*66e63ce3Schristos     (AL-INSN USES-FRDR USES-FRSR1)
798*66e63ce3Schristos     "xnori $frdr,$frsr1,#$imm16z"
799*66e63ce3Schristos     (+ MSYS_NO OPC_XNOR IMM_YES frsr1 frdr imm16z)
800*66e63ce3Schristos     (set frdr (inv (xor frsr1 (ext USI imm16z))))
801*66e63ce3Schristos     ()
802*66e63ce3Schristos)
803*66e63ce3Schristos
804*66e63ce3Schristos(dni ldui "LDUI DstReg, UnsImm"
805*66e63ce3Schristos     (AL-INSN USES-FRDR)
806*66e63ce3Schristos     "ldui $frdr,#$imm16z"
807*66e63ce3Schristos     (+ MSYS_NO OPC_LDUI IMM_YES (f-uu4b 0) frdr imm16z)
808*66e63ce3Schristos     (set frdr (and (sll imm16z 16) #xffff0000))
809*66e63ce3Schristos     ()
810*66e63ce3Schristos)
811*66e63ce3Schristos
812*66e63ce3Schristos; Shift Instructions
813*66e63ce3Schristos
814*66e63ce3Schristos(dni lsl "LSL DstReg, SrcReg1, SrcReg2"
815*66e63ce3Schristos     (USES-FRDRRR USES-FRSR1 USES-FRSR2)
816*66e63ce3Schristos     "lsl $frdrrr,$frsr1,$frsr2"
817*66e63ce3Schristos     (+ MSYS_NO OPC_LSL IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
818*66e63ce3Schristos     (set frdrrr (sll frsr1 frsr2))
819*66e63ce3Schristos     ()
820*66e63ce3Schristos)
821*66e63ce3Schristos
822*66e63ce3Schristos(dni lsli "LSLI DstReg, SrcReg1, UnsImm"
823*66e63ce3Schristos     (USES-FRDR USES-FRSR1)
824*66e63ce3Schristos     "lsli $frdr,$frsr1,#$imm16"
825*66e63ce3Schristos     (+ MSYS_NO OPC_LSL IMM_YES frsr1 frdr imm16)
826*66e63ce3Schristos     (set frdr (sll frsr1 imm16))
827*66e63ce3Schristos     ()
828*66e63ce3Schristos)
829*66e63ce3Schristos
830*66e63ce3Schristos(dni lsr "LSR DstReg, SrcReg1, SrcReg2"
831*66e63ce3Schristos     (USES-FRDRRR USES-FRSR1 USES-FRSR2)
832*66e63ce3Schristos     "lsr $frdrrr,$frsr1,$frsr2"
833*66e63ce3Schristos     (+ MSYS_NO OPC_LSR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
834*66e63ce3Schristos     (set frdrrr (srl frsr1 frsr2))
835*66e63ce3Schristos     ()
836*66e63ce3Schristos)
837*66e63ce3Schristos
838*66e63ce3Schristos(dni lsri "LSRI DstReg, SrcReg1, UnsImm"
839*66e63ce3Schristos     (USES-FRDR USES-FRSR1)
840*66e63ce3Schristos     "lsri $frdr,$frsr1,#$imm16"
841*66e63ce3Schristos     (+ MSYS_NO OPC_LSR IMM_YES frsr1 frdr imm16)
842*66e63ce3Schristos     (set frdr (srl frsr1 imm16))
843*66e63ce3Schristos     ()
844*66e63ce3Schristos)
845*66e63ce3Schristos
846*66e63ce3Schristos(dni asr "ASR DstReg, SrcReg1, SrcReg2"
847*66e63ce3Schristos     (USES-FRDRRR USES-FRSR1 USES-FRSR2)
848*66e63ce3Schristos     "asr $frdrrr,$frsr1,$frsr2"
849*66e63ce3Schristos     (+ MSYS_NO OPC_ASR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
850*66e63ce3Schristos     (set frdrrr (sra frsr1 frsr2))
851*66e63ce3Schristos     ()
852*66e63ce3Schristos)
853*66e63ce3Schristos
854*66e63ce3Schristos(dni asri "ASRI DstReg, SrcReg1, UnsImm"
855*66e63ce3Schristos     (USES-FRDR USES-FRSR1)
856*66e63ce3Schristos     "asri $frdr,$frsr1,#$imm16"
857*66e63ce3Schristos     (+ MSYS_NO OPC_ASR IMM_YES frsr1 frdr imm16)
858*66e63ce3Schristos     (set frdr (sra frsr1 imm16))
859*66e63ce3Schristos     ()
860*66e63ce3Schristos)
861*66e63ce3Schristos
862*66e63ce3Schristos; Control Transfer Instructions
863*66e63ce3Schristos
864*66e63ce3Schristos(dni brlt "BRLT SrcReg1, SrcReg2, label"
865*66e63ce3Schristos     (BR-INSN DELAY-SLOT USES-FRDRRR USES-FRSR1 USES-FRSR2)
866*66e63ce3Schristos     "brlt $frsr1,$frsr2,$imm16o"
867*66e63ce3Schristos     (+ MSYS_NO OPC_BRLT IMM_YES frsr1 frsr2 imm16o)
868*66e63ce3Schristos     (sequence()
869*66e63ce3Schristos        (if (lt USI frsr1 frsr2)
870*66e63ce3Schristos            (dset pc (add pc (ext SI imm16o))))
871*66e63ce3Schristos     )
872*66e63ce3Schristos     ()
873*66e63ce3Schristos)
874*66e63ce3Schristos
875*66e63ce3Schristos(dni brle "BRLE SrcReg1, SrcReg2, label"
876*66e63ce3Schristos     (BR-INSN DELAY-SLOT USES-FRSR1 USES-FRSR2)
877*66e63ce3Schristos     "brle $frsr1,$frsr2,$imm16o"
878*66e63ce3Schristos     (+ MSYS_NO OPC_BRLE IMM_YES frsr1 frsr2 imm16o)
879*66e63ce3Schristos     (sequence()
880*66e63ce3Schristos        (if (le USI frsr1 frsr2)
881*66e63ce3Schristos            (dset pc (add pc (ext SI imm16o))))
882*66e63ce3Schristos     )
883*66e63ce3Schristos     ()
884*66e63ce3Schristos)
885*66e63ce3Schristos
886*66e63ce3Schristos(dni breq "BREQ SrcReg1, SrcReg2, label"
887*66e63ce3Schristos     (BR-INSN DELAY-SLOT USES-FRSR1 USES-FRSR2)
888*66e63ce3Schristos     "breq $frsr1,$frsr2,$imm16o"
889*66e63ce3Schristos     (+ MSYS_NO OPC_BREQ IMM_YES frsr1 frsr2 imm16o)
890*66e63ce3Schristos     (sequence()
891*66e63ce3Schristos        (if (eq USI frsr1 frsr2)
892*66e63ce3Schristos            (dset pc (add pc (ext SI imm16o))))
893*66e63ce3Schristos     )
894*66e63ce3Schristos     ()
895*66e63ce3Schristos)
896*66e63ce3Schristos
897*66e63ce3Schristos(dni brne "BRNE SrcReg1, SrcReg2, label"
898*66e63ce3Schristos     (BR-INSN DELAY-SLOT USES-FRSR1 USES-FRSR2)
899*66e63ce3Schristos     "brne $frsr1,$frsr2,$imm16o"
900*66e63ce3Schristos     (+ MSYS_NO OPC_BRNEQ IMM_YES frsr1 frsr2 imm16o)
901*66e63ce3Schristos     (sequence()
902*66e63ce3Schristos        (if (not (eq USI frsr1 frsr2))
903*66e63ce3Schristos            (dset pc (add pc (ext SI imm16o))))
904*66e63ce3Schristos     )
905*66e63ce3Schristos     ()
906*66e63ce3Schristos)
907*66e63ce3Schristos
908*66e63ce3Schristos(dni jmp "JMP, label"
909*66e63ce3Schristos     (DELAY-SLOT BR-INSN)
910*66e63ce3Schristos     "jmp $imm16o"
911*66e63ce3Schristos     (+ MSYS_NO OPC_JMP IMM_YES (f-uu4b 0) (f-uu4a 0) imm16o)
912*66e63ce3Schristos     (dset pc (add pc (ext SI imm16o)))
913*66e63ce3Schristos     ()
914*66e63ce3Schristos)
915*66e63ce3Schristos
916*66e63ce3Schristos(dni jal "JAL DstReg, SrcReg1"
917*66e63ce3Schristos     (BR-INSN DELAY-SLOT BR-INSN USES-FRDR USES-FRSR1 JAL-HAZARD)
918*66e63ce3Schristos     "jal $frdrrr,$frsr1"
919*66e63ce3Schristos     (+ MSYS_NO OPC_JAL IMM_NO frsr1 (f-uu4a 0) frdrrr (f-uu12 0))
920*66e63ce3Schristos     (sequence()
921*66e63ce3Schristos         (if (eq frsr1 #x0)
922*66e63ce3Schristos	    (c-call VOID "do_syscall" pc)
923*66e63ce3Schristos	    (sequence()   ; else part.  Do non-syscall stuff here.
924*66e63ce3Schristos		(dset frdrrr (add pc #x8))
925*66e63ce3Schristos		(dset pc frsr1)
926*66e63ce3Schristos            )
927*66e63ce3Schristos         )
928*66e63ce3Schristos     )
929*66e63ce3Schristos     ()
930*66e63ce3Schristos)
931*66e63ce3Schristos
932*66e63ce3Schristos(dni dbnz "DBNZ SrcReg1, label"
933*66e63ce3Schristos     ((MACH ms1-003,ms2) BR-INSN DELAY-SLOT USES-FRSR1)
934*66e63ce3Schristos     "dbnz $frsr1,$imm16o"
935*66e63ce3Schristos     (+ MSYS_NO OPC_DBNZ IMM_YES frsr1 (f-uu4a 0) imm16o)
936*66e63ce3Schristos     (sequence()
937*66e63ce3Schristos	 (if (not (eq USI frsr1 0))
938*66e63ce3Schristos            (dset pc (add pc (ext SI imm16o))))
939*66e63ce3Schristos     )
940*66e63ce3Schristos     ()
941*66e63ce3Schristos)
942*66e63ce3Schristos
943*66e63ce3Schristos; Interrupt Control Instructions
944*66e63ce3Schristos
945*66e63ce3Schristos(dni ei "EI - Enable Interrupt Processing"
946*66e63ce3Schristos     ()
947*66e63ce3Schristos     "ei"
948*66e63ce3Schristos     (+ MSYS_NO OPC_EI IMM_NO (f-uu4b 0) (f-uu4a 0) (f-uu16 0))
949*66e63ce3Schristos     (c-call VOID "enable_interrupts")
950*66e63ce3Schristos     ()
951*66e63ce3Schristos)
952*66e63ce3Schristos
953*66e63ce3Schristos(dni di "DI - Disable Interrupt Processing"
954*66e63ce3Schristos     ()
955*66e63ce3Schristos     "di"
956*66e63ce3Schristos     (+ MSYS_NO OPC_DI IMM_NO (f-uu4b 0) (f-uu4a 0) (f-uu16 0))
957*66e63ce3Schristos     (c-call VOID "disable_interrupts")
958*66e63ce3Schristos     ()
959*66e63ce3Schristos)
960*66e63ce3Schristos
961*66e63ce3Schristos(dni si "SI - Send software Interrupt"
962*66e63ce3Schristos     (DELAY-SLOT BR-INSN USES-FRDR)
963*66e63ce3Schristos     "si $frdrrr"
964*66e63ce3Schristos     (+ MSYS_NO OPC_SI IMM_NO (f-uu4b 0) (f-uu4a 0) frdrrr (f-uu12 0))
965*66e63ce3Schristos     ;(sequence()
966*66e63ce3Schristos     ;   (dset frdr (add pc #x4))
967*66e63ce3Schristos     ;   (c-call VOID "do_syscall1" pc)
968*66e63ce3Schristos     ;   ; (dset pc frsr1) Do this later when we have the address.
969*66e63ce3Schristos     ;)
970*66e63ce3Schristos     (sequence()
971*66e63ce3Schristos        (set frdrrr (add pc #x4))
972*66e63ce3Schristos        (c-call VOID "do_syscall" pc)
973*66e63ce3Schristos        ; (set pc frsr1) Do this later when we have the address.
974*66e63ce3Schristos     )
975*66e63ce3Schristos     ()
976*66e63ce3Schristos)
977*66e63ce3Schristos
978*66e63ce3Schristos(dni reti "RETI SrcReg1"
979*66e63ce3Schristos     (DELAY-SLOT BR-INSN USES-FRSR1 JAL-HAZARD)
980*66e63ce3Schristos     "reti $frsr1"
981*66e63ce3Schristos     (+ MSYS_NO OPC_RETI IMM_NO frsr1 (f-uu4a 0) (f-uu16 0))
982*66e63ce3Schristos     (sequence()
983*66e63ce3Schristos       (c-call VOID "enable_interrupts")
984*66e63ce3Schristos       (dset pc frsr1)
985*66e63ce3Schristos     )
986*66e63ce3Schristos     ()
987*66e63ce3Schristos)
988*66e63ce3Schristos
989*66e63ce3Schristos; Memory Access Instructions
990*66e63ce3Schristos
991*66e63ce3Schristos(dni ldw "LDW DstReg, SrcReg1, Imm"
992*66e63ce3Schristos     (LOAD-DELAY MEMORY-ACCESS USES-FRDR USES-FRSR1)
993*66e63ce3Schristos     "ldw $frdr,$frsr1,#$imm16"
994*66e63ce3Schristos     (+ MSYS_NO OPC_LDW IMM_YES frsr1 frdr imm16)
995*66e63ce3Schristos     (sequence((USI ea) (HI tmp))
996*66e63ce3Schristos      (set HI tmp (and imm16 #xffff))
997*66e63ce3Schristos      (set ea (and (add SI frsr1 (ext SI tmp)) #xfffffffc))
998*66e63ce3Schristos      (set frdr (mem SI ea))
999*66e63ce3Schristos     )
1000*66e63ce3Schristos     ()
1001*66e63ce3Schristos)
1002*66e63ce3Schristos
1003*66e63ce3Schristos(dni stw "STW SrcReg2, SrcReg1, Imm"
1004*66e63ce3Schristos     (MEMORY-ACCESS USES-FRSR1 USES-FRSR2)
1005*66e63ce3Schristos     "stw $frsr2,$frsr1,#$imm16"
1006*66e63ce3Schristos     (+ MSYS_NO OPC_STW IMM_YES frsr1 frsr2 imm16)
1007*66e63ce3Schristos     (sequence((USI ea) (HI tmp))
1008*66e63ce3Schristos      (set HI tmp (and imm16 #xffff))
1009*66e63ce3Schristos      (set ea (and (add SI frsr1 (ext SI tmp)) #xfffffffc))
1010*66e63ce3Schristos      (set (mem SI ea) frsr2)
1011*66e63ce3Schristos     )
1012*66e63ce3Schristos     ()
1013*66e63ce3Schristos)
1014*66e63ce3Schristos
1015*66e63ce3Schristos; Break Instruction
1016*66e63ce3Schristos
1017*66e63ce3Schristos(dni break "BREAK"
1018*66e63ce3Schristos     ()
1019*66e63ce3Schristos     "break"
1020*66e63ce3Schristos     (+ MSYS_NO OPC_BREAK (f-imm 0) (f-uu24 0))
1021*66e63ce3Schristos     (c-call VOID "do_break" pc)
1022*66e63ce3Schristos     ()
1023*66e63ce3Schristos)
1024*66e63ce3Schristos
1025*66e63ce3Schristos; Cache Flush Instruction
1026*66e63ce3Schristos
1027*66e63ce3Schristos(dni iflush "IFLUSH"
1028*66e63ce3Schristos     ((MACH ms1-003,ms2))
1029*66e63ce3Schristos     "iflush"
1030*66e63ce3Schristos     (+ MSYS_NO OPC_IFLUSH (f-imm 0) (f-uu24 0))
1031*66e63ce3Schristos     (nop)
1032*66e63ce3Schristos     ()
1033*66e63ce3Schristos)
1034*66e63ce3Schristos
1035*66e63ce3Schristos; MorphoSys Instructions
1036*66e63ce3Schristos
1037*66e63ce3Schristos(dni ldctxt "LDCTXT SRC1, SRC2, r/c, r/c#, context#"
1038*66e63ce3Schristos     ((MACH ms1))
1039*66e63ce3Schristos     "ldctxt $frsr1,$frsr2,#$rc,#$rcnum,#$contnum"
1040*66e63ce3Schristos     (+ MSYS_YES MSOPC_LDCTXT (f-uu-2-25 0) frsr1 frsr2 rc rcnum (f-uu-3-11 0)
1041*66e63ce3Schristos	contnum )
1042*66e63ce3Schristos     (nop)
1043*66e63ce3Schristos     ()
1044*66e63ce3Schristos)
1045*66e63ce3Schristos
1046*66e63ce3Schristos(dni ldfb "LDFB SRC1, byte#"
1047*66e63ce3Schristos     ((MACH ms1))
1048*66e63ce3Schristos     "ldfb $frsr1,$frsr2,#$imm16z"
1049*66e63ce3Schristos     (+ MSYS_YES MSOPC_LDFB (f-uu-2-25 0) frsr1 frsr2 imm16z)
1050*66e63ce3Schristos     (nop)
1051*66e63ce3Schristos     ()
1052*66e63ce3Schristos)
1053*66e63ce3Schristos
1054*66e63ce3Schristos(dni stfb "STFB SRC1, SRC2, byte "
1055*66e63ce3Schristos     ((MACH ms1))
1056*66e63ce3Schristos     "stfb $frsr1,$frsr2,#$imm16z"
1057*66e63ce3Schristos     (+ MSYS_YES MSOPC_STFB (f-uu-2-25 0) frsr1 frsr2 imm16z)
1058*66e63ce3Schristos     (nop)
1059*66e63ce3Schristos     ()
1060*66e63ce3Schristos)
1061*66e63ce3Schristos
1062*66e63ce3Schristos(dni fbcb "FBCB SRC1, RT/BR1/BR2/CS, B_all, B_r_c, r/c, CB/RB, cell, dup, ctx_disp"
1063*66e63ce3Schristos     ((MACH ms1,ms1-003))
1064*66e63ce3Schristos     "fbcb $frsr1,#$rbbc,#$ball,#$brc,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1065*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCB rbbc frsr1 ball brc (f-uu-4-15 0) rc cbrb cell dup ctxdisp)
1066*66e63ce3Schristos     (nop)
1067*66e63ce3Schristos     ()
1068*66e63ce3Schristos)
1069*66e63ce3Schristos
1070*66e63ce3Schristos(dni mfbcb "MFBCB SRC1, RT/BR1/BR2/CS, SRC2, r/c, CB/RB, cell, dup, ctx_disp"
1071*66e63ce3Schristos     ()
1072*66e63ce3Schristos     "mfbcb $frsr1,#$rbbc,$frsr2,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1073*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBCB rbbc frsr1 frsr2 (f-uu-4-15 0) rc1 cbrb cell dup ctxdisp)
1074*66e63ce3Schristos     (nop)
1075*66e63ce3Schristos     ()
1076*66e63ce3Schristos)
1077*66e63ce3Schristos
1078*66e63ce3Schristos(dni fbcci "FBCCI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1079*66e63ce3Schristos     ()
1080*66e63ce3Schristos     "fbcci $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1081*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCCI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1082*66e63ce3Schristos     (nop)
1083*66e63ce3Schristos     ()
1084*66e63ce3Schristos)
1085*66e63ce3Schristos
1086*66e63ce3Schristos(dni fbrci "FBRCI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1087*66e63ce3Schristos     ()
1088*66e63ce3Schristos     "fbrci $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1089*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBRCI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1090*66e63ce3Schristos     (nop)
1091*66e63ce3Schristos     ()
1092*66e63ce3Schristos)
1093*66e63ce3Schristos
1094*66e63ce3Schristos(dni fbcri "FBCRI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1095*66e63ce3Schristos     ()
1096*66e63ce3Schristos     "fbcri $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1097*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCRI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1098*66e63ce3Schristos     (nop)
1099*66e63ce3Schristos     ()
1100*66e63ce3Schristos)
1101*66e63ce3Schristos
1102*66e63ce3Schristos(dni fbrri "FBRRI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1103*66e63ce3Schristos     ()
1104*66e63ce3Schristos     "fbrri $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1105*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBRRI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1106*66e63ce3Schristos     (nop)
1107*66e63ce3Schristos     ()
1108*66e63ce3Schristos)
1109*66e63ce3Schristos
1110*66e63ce3Schristos(dni mfbcci "MFBCCI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1111*66e63ce3Schristos     ()
1112*66e63ce3Schristos     "mfbcci $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1113*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBCCI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1114*66e63ce3Schristos     (nop)
1115*66e63ce3Schristos     ()
1116*66e63ce3Schristos)
1117*66e63ce3Schristos
1118*66e63ce3Schristos(dni mfbrci "MFBRCI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1119*66e63ce3Schristos     ()
1120*66e63ce3Schristos     "mfbrci $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1121*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBRCI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1122*66e63ce3Schristos     (nop)
1123*66e63ce3Schristos     ()
1124*66e63ce3Schristos)
1125*66e63ce3Schristos
1126*66e63ce3Schristos(dni mfbcri "MFBCRI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1127*66e63ce3Schristos     ()
1128*66e63ce3Schristos     "mfbcri $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1129*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBCRI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1130*66e63ce3Schristos     (nop)
1131*66e63ce3Schristos     ()
1132*66e63ce3Schristos)
1133*66e63ce3Schristos
1134*66e63ce3Schristos(dni mfbrri "MFBRRI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1135*66e63ce3Schristos     ()
1136*66e63ce3Schristos     "mfbrri $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1137*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBRRI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1138*66e63ce3Schristos     (nop)
1139*66e63ce3Schristos     ()
1140*66e63ce3Schristos)
1141*66e63ce3Schristos
1142*66e63ce3Schristos(dni fbcbdr "FBCBDR SRC1, RT/BR1/BR2/CS, SRC2, B_all, B_r_c, r/c, CB/RB, cell, dup, ctx_disp"
1143*66e63ce3Schristos     ()
1144*66e63ce3Schristos     "fbcbdr $frsr1,#$rbbc,$frsr2,#$ball2,#$brc2,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1145*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCBDR rbbc frsr1 frsr2 ball2 brc2 rc1 cbrb cell dup ctxdisp)
1146*66e63ce3Schristos     (nop)
1147*66e63ce3Schristos     ()
1148*66e63ce3Schristos)
1149*66e63ce3Schristos
1150*66e63ce3Schristos(dni rcfbcb "RCFBCB RT/BR1/BR2/CS, type, B_all, B_r_c, row#, r/c, CB/RB, cell, dup, ctx_disp"
1151*66e63ce3Schristos     ()
1152*66e63ce3Schristos     "rcfbcb #$rbbc,#$type,#$ball,#$brc,#$rownum,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1153*66e63ce3Schristos     (+ MSYS_YES MSOPC_RCFBCB rbbc (f-uu-2-23 0) type ball brc (f-uu-1-15 0) rownum rc1 cbrb cell dup ctxdisp)
1154*66e63ce3Schristos     (nop)
1155*66e63ce3Schristos     ()
1156*66e63ce3Schristos)
1157*66e63ce3Schristos
1158*66e63ce3Schristos(dni mrcfbcb "MRCFBCB SRC2, RT/BR1/BR2/CS, type, row#, r/c, CB/RB, cell, dup, ctx_disp"
1159*66e63ce3Schristos     ()
1160*66e63ce3Schristos     "mrcfbcb $frsr2,#$rbbc,#$type,#$rownum,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1161*66e63ce3Schristos     (+ MSYS_YES MSOPC_MRCFBCB rbbc (f-uu-2-23 0) type frsr2 (f-uu-1-15 0) rownum rc1 cbrb cell dup ctxdisp)
1162*66e63ce3Schristos     (nop)
1163*66e63ce3Schristos     ()
1164*66e63ce3Schristos)
1165*66e63ce3Schristos
1166*66e63ce3Schristos(dni cbcast "CBCAST mask, r/c, ctx_disp "
1167*66e63ce3Schristos     ()
1168*66e63ce3Schristos     "cbcast #$mask,#$rc2,#$ctxdisp"
1169*66e63ce3Schristos     (+ MSYS_YES MSOPC_CBCAST mask (f-uu-3-9 0) rc2 ctxdisp)
1170*66e63ce3Schristos     (nop)
1171*66e63ce3Schristos     ()
1172*66e63ce3Schristos)
1173*66e63ce3Schristos
1174*66e63ce3Schristos(dni dupcbcast "DUPCBCAST mask, cell, r/c, ctx_disp "
1175*66e63ce3Schristos     ()
1176*66e63ce3Schristos     "dupcbcast #$mask,#$cell,#$rc2,#$ctxdisp"
1177*66e63ce3Schristos     (+ MSYS_YES MSOPC_DUPCBCAST mask cell rc2 ctxdisp)
1178*66e63ce3Schristos     (nop)
1179*66e63ce3Schristos     ()
1180*66e63ce3Schristos)
1181*66e63ce3Schristos
1182*66e63ce3Schristos(dni wfbi "WFBI Bank_address, row#, cell, dup, ctx_disp "
1183*66e63ce3Schristos     ()
1184*66e63ce3Schristos    "wfbi #$bankaddr,#$rownum1,#$cell,#$dup,#$ctxdisp"
1185*66e63ce3Schristos     (+ MSYS_YES MSOPC_WFBI bankaddr rownum1 cell dup ctxdisp)
1186*66e63ce3Schristos     (nop)
1187*66e63ce3Schristos     ()
1188*66e63ce3Schristos)
1189*66e63ce3Schristos
1190*66e63ce3Schristos;(dni wfb "WFB SRC1, SRC2, FB_disp, row#, ctx_disp"
1191*66e63ce3Schristos;     ()
1192*66e63ce3Schristos;     "wfb $frsr1,$frsr2,#$fbdisp,#$rownum,#$ctxdisp"
1193*66e63ce3Schristos;     (+ MSYS_YES MSOPC_WFB (f-uu-2-25 0) frsr1 frsr2 fbdisp rownum (f-uu-1-6 0) ctxdisp)
1194*66e63ce3Schristos;     (nop)
1195*66e63ce3Schristos;     ()
1196*66e63ce3Schristos;)
1197*66e63ce3Schristos
1198*66e63ce3Schristos(dni wfb "WFB, DRC1,SRC2,FB_disp,row#,ctx_disp"
1199*66e63ce3Schristos      ()
1200*66e63ce3Schristos      "wfb $frsr1,$frsr2,#$fbdisp,#$rownum2,#$ctxdisp"
1201*66e63ce3Schristos      (+ MSYS_YES MSOPC_WFB (f-uu-2-25 0) frsr1 frsr2 fbdisp rownum2 (f-uu-1-6 0) ctxdisp)
1202*66e63ce3Schristos      (nop)
1203*66e63ce3Schristos      ()
1204*66e63ce3Schristos)
1205*66e63ce3Schristos
1206*66e63ce3Schristos
1207*66e63ce3Schristos(dni rcrisc "RCRISC DEST, RT/BR1/BR2/CS, SRC1, column#, r/c, CB/RB, cell, dup, ctx_disp"
1208*66e63ce3Schristos     ()
1209*66e63ce3Schristos     "rcrisc $frdrrr,#$rbbc,$frsr1,#$colnum,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1210*66e63ce3Schristos     (+ MSYS_YES MSOPC_RCRISC rbbc frsr1 (f-uu-1-19 0) colnum frdrrr rc1 cbrb cell dup ctxdisp)
1211*66e63ce3Schristos     (nop)
1212*66e63ce3Schristos     ()
1213*66e63ce3Schristos)
1214*66e63ce3Schristos
1215*66e63ce3Schristos(dni fbcbinc "FBCBINC SRC1, RT/BR1/BR2/CS, Incr_amount, r/c, CB/RB, cell, dup, ctx_disp "
1216*66e63ce3Schristos     ()
1217*66e63ce3Schristos     "fbcbinc $frsr1,#$rbbc,#$incamt,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1218*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCBINC rbbc frsr1 incamt rc1 cbrb cell dup ctxdisp)
1219*66e63ce3Schristos     (nop)
1220*66e63ce3Schristos     ()
1221*66e63ce3Schristos)
1222*66e63ce3Schristos
1223*66e63ce3Schristos(dni rcxmode "RCXMODE SRC2, rd, wr, xmode, mask, FB_disp, row#, r/c, ctx_disp"
1224*66e63ce3Schristos     ()
1225*66e63ce3Schristos     "rcxmode $frsr2,#$rda,#$wr,#$xmode,#$mask1,#$fbdisp,#$rownum2,#$rc2,#$ctxdisp"
1226*66e63ce3Schristos     (+ MSYS_YES MSOPC_RCXMODE rda wr xmode mask1 frsr2 fbdisp rownum2 rc2 ctxdisp)
1227*66e63ce3Schristos     (nop)
1228*66e63ce3Schristos     ()
1229*66e63ce3Schristos)
1230*66e63ce3Schristos
1231*66e63ce3Schristos(dni interleaver "INTLVR ireg, mode, ireg, i/d, size"
1232*66e63ce3Schristos     ()
1233*66e63ce3Schristos     "intlvr $frsr1,#$mode,$frsr2,#$id,#$size"
1234*66e63ce3Schristos     (+ MSYS_YES MSOPC_INTLVR mode frsr1 frsr2 (f-uu-1-15 0) id size)
1235*66e63ce3Schristos     (nop)
1236*66e63ce3Schristos     ()
1237*66e63ce3Schristos)
1238*66e63ce3Schristos
1239*66e63ce3Schristos;; Issue 66262: The documenatation gives the wrong order for
1240*66e63ce3Schristos;;               the arguments to the WFBINC instruction.
1241*66e63ce3Schristos(dni wfbinc "WFBINC type, ccb/rcb, incr, all, c/r, length, rca_row, word, dup, ctxt_disp"
1242*66e63ce3Schristos     ((MACH ms1-003,ms2))
1243*66e63ce3Schristos     "wfbinc #$rda,#$wr,#$fbincr,#$ball,#$colnum,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1244*66e63ce3Schristos     (+ MSYS_YES MSOPC_WFBINC rda wr fbincr ball colnum length rownum1 rownum2 dup ctxdisp)
1245*66e63ce3Schristos     (nop)
1246*66e63ce3Schristos     ()
1247*66e63ce3Schristos)
1248*66e63ce3Schristos
1249*66e63ce3Schristos(dni mwfbinc "MWFBINC mreg, type, ccb/rcb, incr, length, rca_row, word, dup, ctxt_disp"
1250*66e63ce3Schristos     ((MACH ms1-003,ms2))
1251*66e63ce3Schristos     "mwfbinc $frsr2,#$rda,#$wr,#$fbincr,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1252*66e63ce3Schristos     (+ MSYS_YES MSOPC_MWFBINC rda wr fbincr frsr2 length rownum1 rownum2 dup ctxdisp)
1253*66e63ce3Schristos     (nop)
1254*66e63ce3Schristos     ()
1255*66e63ce3Schristos)
1256*66e63ce3Schristos
1257*66e63ce3Schristos(dni wfbincr "WFBINCR ireg, type, ccb/rcb, all, c/r, length, rca_row, word, dup, ctxt_disp"
1258*66e63ce3Schristos     ((MACH ms1-003,ms2))
1259*66e63ce3Schristos     "wfbincr $frsr1,#$rda,#$wr,#$ball,#$colnum,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1260*66e63ce3Schristos     (+ MSYS_YES MSOPC_WFBINCR rda wr frsr1 ball colnum length rownum1 rownum2 dup ctxdisp)
1261*66e63ce3Schristos     (nop)
1262*66e63ce3Schristos     ()
1263*66e63ce3Schristos)
1264*66e63ce3Schristos
1265*66e63ce3Schristos(dni mwfbincr "MWFBINCR ireg, mreg, type, ccb/rcb, length, rca_row, word, dup, ctxt_disp"
1266*66e63ce3Schristos     ((MACH ms1-003,ms2))
1267*66e63ce3Schristos     "mwfbincr $frsr1,$frsr2,#$rda,#$wr,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1268*66e63ce3Schristos     (+ MSYS_YES MSOPC_MWFBINCR rda wr frsr1 frsr2 length rownum1 rownum2 dup ctxdisp)
1269*66e63ce3Schristos     (nop)
1270*66e63ce3Schristos     ()
1271*66e63ce3Schristos)
1272*66e63ce3Schristos
1273*66e63ce3Schristos(dni fbcbincs "FBCBINCS	     perm, all, c/r, cbs, incr, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1274*66e63ce3Schristos     ((MACH ms1-003,ms2))
1275*66e63ce3Schristos     "fbcbincs #$perm,#$a23,#$cr,#$cbs,#$incr,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1276*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCBINCS perm a23 cr cbs incr ccb cdb rownum2 dup ctxdisp)
1277*66e63ce3Schristos     (nop)
1278*66e63ce3Schristos     ()
1279*66e63ce3Schristos)
1280*66e63ce3Schristos
1281*66e63ce3Schristos(dni mfbcbincs "MFBCBINCS		ireg, perm, cbs, incr, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1282*66e63ce3Schristos     ((MACH ms1-003,ms2))
1283*66e63ce3Schristos     "mfbcbincs $frsr1,#$perm,#$cbs,#$incr,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1284*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBCBINCS perm frsr1 cbs incr ccb cdb rownum2 dup ctxdisp)
1285*66e63ce3Schristos     (nop)
1286*66e63ce3Schristos     ()
1287*66e63ce3Schristos)
1288*66e63ce3Schristos
1289*66e63ce3Schristos(dni fbcbincrs "FBCBINCRS	     ireg, perm, all, c/r, cbs, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1290*66e63ce3Schristos     ((MACH ms1-003,ms2))
1291*66e63ce3Schristos     "fbcbincrs $frsr1,#$perm,#$ball,#$colnum,#$cbx,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1292*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCBINCRS perm frsr1 ball colnum (f-uu-1-15 0) cbx ccb cdb rownum2 dup ctxdisp)
1293*66e63ce3Schristos     (nop)
1294*66e63ce3Schristos     ()
1295*66e63ce3Schristos)
1296*66e63ce3Schristos
1297*66e63ce3Schristos(dni mfbcbincrs "MFBCBINCRS ireg, mreg, perm, cbs, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1298*66e63ce3Schristos     ((MACH ms1-003,ms2))
1299*66e63ce3Schristos     "mfbcbincrs $frsr1,$frsr2,#$perm,#$cbx,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1300*66e63ce3Schristos     (+ MSYS_YES MSOPC_MFBCBINCRS perm frsr1 frsr2 (f-uu-1-15 0) cbx ccb cdb rownum2 dup ctxdisp)
1301*66e63ce3Schristos     (nop)
1302*66e63ce3Schristos     ()
1303*66e63ce3Schristos)
1304*66e63ce3Schristos
1305*66e63ce3Schristos; MS2 instructions
1306*66e63ce3Schristos(dni loop "LOOP SrcReg1, label"
1307*66e63ce3Schristos     ((MACH ms2) DELAY-SLOT USES-FRSR1)
1308*66e63ce3Schristos     "loop $frsr1,$loopsize"
1309*66e63ce3Schristos     (+ MSYS_NO OPC_LOOP IMM_NO frsr1 (f-uu4a 0) (f-uu8 0) loopsize)
1310*66e63ce3Schristos     (nop)      ;; to be filled in
1311*66e63ce3Schristos     ()
1312*66e63ce3Schristos)
1313*66e63ce3Schristos
1314*66e63ce3Schristos(dni loopi "LOOPI niter, label"
1315*66e63ce3Schristos     ((MACH ms2) DELAY-SLOT)
1316*66e63ce3Schristos     "loopi #$imm16l,$loopsize"
1317*66e63ce3Schristos     (+ MSYS_NO OPC_LOOP IMM_YES imm16l loopsize)
1318*66e63ce3Schristos     (nop)      ;; to be filled in
1319*66e63ce3Schristos     ()
1320*66e63ce3Schristos)
1321*66e63ce3Schristos
1322*66e63ce3Schristos(dni dfbc "dfbc cb1sel,cb2sel,cb1inc,cb2inc,dr/c,cr/c,ctxdisp"
1323*66e63ce3Schristos     ((MACH ms2))
1324*66e63ce3Schristos     "dfbc #$cb1sel,#$cb2sel,#$cb1incr,#$cb2incr,#$rc3,#$rc2,#$ctxdisp"
1325*66e63ce3Schristos     (+ MSYS_YES MSOPC_LDCTXT cb1sel cb2sel cb1incr cb2incr rc3 rc2 ctxdisp)
1326*66e63ce3Schristos     (nop)
1327*66e63ce3Schristos     ()
1328*66e63ce3Schristos)
1329*66e63ce3Schristos
1330*66e63ce3Schristos(dni dwfb "dwfb cb1sel,cb2sel,cb1inc,cb2inc,cr/c,ctxdisp"
1331*66e63ce3Schristos     ((MACH ms2))
1332*66e63ce3Schristos     "dwfb #$cb1sel,#$cb2sel,#$cb1incr,#$cb2incr,#$rc2,#$ctxdisp"
1333*66e63ce3Schristos     (+ MSYS_YES MSOPC_LDFB cb1sel cb2sel cb1incr cb2incr (f-uu1 0) rc2 ctxdisp)
1334*66e63ce3Schristos     (nop)
1335*66e63ce3Schristos     ()
1336*66e63ce3Schristos)
1337*66e63ce3Schristos
1338*66e63ce3Schristos(dni fbwfb "fbwfb cb1sel,cb2sel,cb1inc,cb2inc,r0/1,cr/c,ctxdisp"
1339*66e63ce3Schristos     ((MACH ms2))
1340*66e63ce3Schristos     "fbwfb #$cb1sel,#$cb2sel,#$cb1incr,#$cb2incr,#$rc3,#$rc2,#$ctxdisp"
1341*66e63ce3Schristos     (+ MSYS_YES MSOPC_STFB cb1sel cb2sel cb1incr cb2incr rc3 rc2 ctxdisp)
1342*66e63ce3Schristos     (nop)
1343*66e63ce3Schristos     ()
1344*66e63ce3Schristos)
1345*66e63ce3Schristos
1346*66e63ce3Schristos(dni dfbr "dfbr cb1sel,cb2sel,reg,W/O1,W/O2,mode,cr/c,ctxdisp"
1347*66e63ce3Schristos     ((MACH ms2) USES-FRSR2)
1348*66e63ce3Schristos     "dfbr #$cb1sel,#$cb2sel,$frsr2,#$length,#$rownum1,#$rownum2,#$rc2,#$ctxdisp"
1349*66e63ce3Schristos     (+ MSYS_YES MSOPC_FBCB cb1sel cb2sel frsr2 length rownum1 rownum2 rc2 ctxdisp)
1350*66e63ce3Schristos     (nop)
1351*66e63ce3Schristos     ()
1352*66e63ce3Schristos)
1353