1 ; Morpho Technologies MT Arch description. -*- Scheme -*-
2 ; Copyright 2001, 2007 Free Software Foundation, Inc.
4 ; Contributed by Red Hat Inc; developed under contract from
7 ; This file is part of the GNU Binutils.
9 ; This program is free software; you can redistribute it and/or modify
10 ; it under the terms of the GNU General Public License as published by
11 ; the Free Software Foundation; either version 3 of the License, or
12 ; (at your option) any later version.
14 ; This program is distributed in the hope that it will be useful,
15 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ; GNU General Public License for more details.
19 ; You should have received a copy of the GNU General Public License
20 ; along with this program; if not, write to the Free Software
21 ; Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
24 (include "simplify.inc")
26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 ;; Define The Architecture, Attributes, ISA, CPU, Machine, And Model. ;;
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 ; define-arch must appear first
32 (name mt) ; name of cpu family
33 (comment "Morpho Technologies mRISC family")
34 (default-alignment aligned)
36 (machs ms1 ms1-003 ms2)
40 ; Instruction set parameters.
44 (comment "Morpho Technologies MT ISA")
45 (default-insn-word-bitsize 32)
46 (default-insn-bitsize 32)
47 (base-insn-bitsize 32)
51 ; Cpu family definitions.
55 ; cpu names must be distinct from the architecture name and machine names.
57 (comment "Morpho Technologies mRISC family")
63 ; cpu names must be distinct from the architecture name and machine names.
65 (comment "Morpho Technologies mRISC family")
71 ; cpu names must be distinct from the architecture name and machine names.
73 (comment "Morpho Technologies mRISC family")
80 (comment "Morpho Technologies mrisc")
87 (comment "Morpho Technologies mrisc")
94 (comment "Morpho Technologies ms2")
100 ; Model descriptions.
101 ; Can probably take the u-exec out. We'll see.
104 (comment "Morpho Technologies mrisc")
106 (unit u-exec "Execution Unit" ()
111 () ; profile action (default)
117 (comment "Morpho Technologies mrisc")
119 (unit u-exec "Execution Unit" ()
124 () ; profile action (default)
130 (comment "Morpho Technologies ms2")
132 (unit u-exec "Execution Unit" ()
137 () ; profile action (default)
141 ; FIXME: It might simplify things to separate the execute process from the
142 ; one that updates the PC.
145 ;;;;;;;;;;;;;;;;;;;;;;;;
146 ;; Instruction Fields ;;
147 ;;;;;;;;;;;;;;;;;;;;;;;;
150 ; PCREL-ADDR: pc relative value (for reloc and disassembly purposes)
151 ; ABS-ADDR: absolute address (for reloc and disassembly purposes?)
152 ; RESERVED: bits are not used to decode insn, must be all 0
153 ; RELOC: there is a relocation associated with this field (experiment)
155 ; f-msys: Identify a a morphosys insns. 1 if msys, 0 if not.
156 ; f-opc: 6 bit opcode for non-morphosys instructions.
157 ; f-msopc: 6 bit opcode for morphosys instructions.
158 ; f-imm: flag to indicate use of an immediate operand. 1 if yes, 0 if no.
159 ; f-sr1: source resgister 1. (also used for MSYS insns)
160 ; f-sr2: source register 2. (also used for MSYS insns)
161 ; f-dr: destination register when located in bits 19:16.
162 ; f-drrr: destination register when located in bits 15:12. (also for MSYS insns)
163 ; f-imm16: 16 bit immediate value when not an offset.
164 ; f-imm16a: 16 bit immediate value when it's a pc-rel offset.
165 ; f-uu4a: unused 4 bit field.
166 ; f-uu4b: second unsed 4 bit field.
167 ; f-uu1: unused 1 bit field
168 ; f-uu12: unused 12 bit field.
169 ; f-uu16: unused 16 bit field.
170 ; f-uu24: unused 24 bit field.
172 (dnf f-msys "morphosys insn flag" () 31 1)
173 (dnf f-opc "opcode field" () 30 6)
174 (dnf f-imm "immedate flag" () 24 1)
175 (dnf f-uu24 "unused 24 bits" () 23 24)
176 (dnf f-sr1 "sr1 register field" (ABS-ADDR) 23 4)
177 (dnf f-sr2 "sr2 register field" (ABS-ADDR) 19 4)
178 (dnf f-dr "dr register field" (ABS-ADDR) 19 4)
179 (dnf f-drrr "drrr register field" (ABS-ADDR) 15 4)
180 (dnf f-imm16u "unsigned 16 bit immediate" () 15 16)
181 (df f-imm16s "signed 16 bit immediate" () 15 16 INT ((value pc) (add HI value 0)) ((value pc) (add HI value 0)))
182 (dnf f-imm16a "pc-rel offset" (PCREL-ADDR) 15 16)
183 (dnf f-uu4a "unused 4 bit field" () 19 4)
184 (dnf f-uu4b "unused 4 bit field" () 23 4)
185 (dnf f-uu12 "unused 12 bit field" () 11 12)
186 (dnf f-uu8 "unused 8 bit field" () 15 8)
187 (dnf f-uu16 "unused 16 bit field" () 15 16)
188 (dnf f-uu1 "unused 1 bit field" () 7 1)
190 ; The following ifields are used exclusively for the MorphoSys instructions.
191 ; In a few cases, a bit field is used for something in addition to what its
192 ; name suggests. For the most part, the names are meaningful though.
194 (dnf f-msopc "opcode field" () 30 5)
195 (dnf f-uu-26-25 "unused 26 bits" () 25 26)
196 (dnf f-mask "mask" () 25 16)
197 (dnf f-bankaddr "bank address" () 25 13)
198 (dnf f-rda "rda" () 25 1)
199 (dnf f-uu-2-25 "unused bits 25 & 24" () 25 2)
200 (dnf f-rbbc "Omega network configuration" () 25 2)
201 (dnf f-perm "perm" () 25 2)
202 (dnf f-mode "mode" () 25 2)
203 (dnf f-uu-1-24 "testing" () 24 1)
204 (dnf f-wr "wr" () 24 1)
205 (dnf f-fbincr "fb incr" () 23 4)
206 (dnf f-uu-2-23 "unused bits 23 and 22" () 23 2)
207 (dnf f-xmode "xmode" () 23 1)
208 (dnf f-a23 "a23" () 23 1)
209 (dnf f-mask1 "mask1" () 22 3)
210 (dnf f-cr "cr" () 22 3)
211 (dnf f-type "type" () 21 2)
212 (dnf f-incamt "increment amount" () 19 8)
213 (dnf f-cbs "cbs" () 19 2)
214 (dnf f-uu-1-19 "unused bit 19" () 19 1)
215 (dnf f-ball "b_all" () 19 1)
216 (dnf f-colnum "column number" () 18 3)
217 (dnf f-brc "b_r_c" () 18 3)
218 (dnf f-incr "incr" () 17 6)
219 (dnf f-fbdisp "frame buffer displacement" () 15 6)
220 (dnf f-uu-4-15 "unused bits 15,14,13,12" () 15 4)
221 (dnf f-length "length" () 15 3)
222 (dnf f-uu-1-15 "unused bit 15" () 15 1)
223 (dnf f-rc "row/column context" () 15 1)
224 (dnf f-rcnum "starting cell of cntxt mem." () 14 3)
225 (dnf f-rownum "row number" () 14 3)
226 (dnf f-cbx "cbx" () 14 3)
227 (dnf f-id "id" () 14 1)
228 (dnf f-size "size" () 13 14)
229 (dnf f-rownum1 "row number" () 12 3)
230 (dnf f-uu-3-11 "unused 3 bits (11-9)" () 11 3)
231 (dnf f-rc1 "row/column context" () 11 1)
232 (dnf f-ccb "ccb" () 11 1)
233 (dnf f-cbrb "data-bus orientation" () 10 1)
234 (dnf f-cdb "cdb" () 10 1)
235 (dnf f-rownum2 "row number" () 9 3)
236 (dnf f-cell "cell" () 9 3)
237 (dnf f-uu-3-9 "unused 3 bits (9-7)" () 9 3)
238 (dnf f-contnum "context number" () 8 9)
239 (dnf f-uu-1-6 "unused bit 6" () 6 1)
240 (dnf f-dup "dup" () 6 1)
241 (dnf f-rc2 "rc2" () 6 1)
242 (dnf f-ctxdisp "context displacement" () 5 6)
244 ; additional fields in ms2
245 (dnf f-imm16l "loop count" () 23 16)
246 (df f-loopo "loop offset" () 7 8 UINT
247 ((value pc) (srl SI value 2))
248 ((value pc) (add SI (sll value 2) 8))
250 (dnf f-cb1sel "cb1 select" () 25 3)
251 (dnf f-cb2sel "cb2 select" () 22 3)
252 (dnf f-cb1incr "cb1 increment" (SIGNED) 19 6)
253 (dnf f-cb2incr "cb2 increment" (SIGNED) 13 6)
254 (dnf f-rc3 "row/colum context" () 7 1)
256 ; The following is just for a test
257 (dnf f-msysfrsr2 "sr2 for msys" () 19 4)
258 (dnf f-brc2 "b_r_c2" () 14 3)
259 (dnf f-ball2 "b_all2" () 15 1)
262 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
263 ;; Enumerations Of Instruction Fields ;;
264 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
266 ; insn-msys: bit 31. 1 for Morphosys Insns, 0 if not.
267 (define-normal-insn-enum insn-msys "msys enums" () MSYS_ f-msys
271 ; insn-opc: bits 30 through 25 . Non-MorphoSys Instructions
272 ; Note - the documentation is wrong for the encoding of the DBNZ
273 ; instruction. It is actually 011110. See Issue 67699.
274 (define-normal-insn-enum insn-opc "opc enums" () OPC_ f-opc
275 (ADD ADDU SUB SUBU MUL - - -
276 AND OR XOR NAND NOR XNOR LDUI -
277 LSL LSR ASR - - - - -
278 BRLT BRLE BREQ JMP JAL BRNEQ DBNZ LOOP
281 EI DI SI RETI BREAK IFLUSH - -
285 ; insn-msopc: bits 30 through 26 . MorphoSys Instructions
286 (define-normal-insn-enum insn-msopc "msopc enums" () MSOPC_ f-msopc
287 (LDCTXT LDFB STFB FBCB MFBCB FBCCI FBRCI FBCRI
288 FBRRI MFBCCI MFBRCI MFBCRI MFBRRI FBCBDR RCFBCB MRCFBCB
289 CBCAST DUPCBCAST WFBI WFB RCRISC FBCBINC RCXMODE INTLVR
290 WFBINC MWFBINC WFBINCR MWFBINCR FBCBINCS MFBCBINCS FBCBINCRS MFBCBINCRS
295 ; insn-imm: bit 24. Immediate operand indicator.
296 (define-normal-insn-enum insn-imm "imm enums" () IMM_ f-imm
297 ; This bit specifies whether and immediate operand will be present.
298 ; It's 1 if there is, 0 if there is not.
305 ; Might not need this. Keep if for the sim just in case.
309 ; (name EXT-SKIP-INSN)
310 ; (comment "instruction is a PAGE, LOADL or LOADH instruction")
317 (comment "insn has a load delay")
324 (comment "insn performs a memory access")
331 (comment "insn is an arithmetic or logic insn.")
338 (comment "insn performs an I/O operation")
345 (comment "insn performs an I/O operation")
352 (comment "insn has jal-like hazard")
355 (define-pmacro (define-reg-use-attr regfield)
359 (name (.sym "USES-" (.upcase regfield)))
360 (comment ("insn accesses register operand " regfield))))
362 (define-reg-use-attr "frdr")
363 (define-reg-use-attr "frdrrr")
364 (define-reg-use-attr "frsr1")
365 (define-reg-use-attr "frsr2")
368 ; Might not need this. Keep it for the sim just in case.
373 (comment "instruction is a SKIP instruction")
377 ;;;;;;;;;;;;;;;;;;;;;
378 ;; Hardware Pieces ;;
379 ;;;;;;;;;;;;;;;;;;;;;
381 ;(define-pmacro (build-reg-name n) (.splice (.str "$" n) n))
383 ; These are the 16 registers that the chip has. In later versions
384 ; where there will be more registers, this will need to be expanded.
385 ; Note that there are two entries for the registers with two names.
388 (comment "special-purpose registers")
389 (type register SI (16))
390 (indices keyword "" (("R0" 0) ("R1" 1) ("R2" 2) ("R3" 3) ("R4" 4) ("R5" 5)
391 ("R6" 6) ("R7" 7) ("R8" 8) ("R9" 9) ("R10" 10) ("R11" 11) ("R12" 12) ("fp" 12)
392 ("R13" 13) ("sp" 13) ("R14" 14) ("ra" 14) ("R15" 15) ("ira" 15)))
393 ; (get (index) (and (raw-reg h-spr) #xffffffff))
394 ; (set (index value) (set (raw-reg h-spr) (and value #xffffffff)))
397 ; This is the program counter.
398 (dnh h-pc "program counter" (PC PROFILE) (pc) () () ())
404 (values (DUP 1) (XX 0))
411 (define-operand (name frsr1) (comment "register") (attrs)
412 (type h-spr) (index f-sr1) )
413 (define-operand (name frsr2) (comment "register") (attrs)
414 (type h-spr) (index f-sr2) )
415 (define-operand (name frdr) (comment "register") (attrs)
416 (type h-spr) (index f-dr) )
417 (define-operand (name frdrrr) (comment "register") (attrs)
418 (type h-spr) (index f-drrr) )
419 (define-operand (name imm16) (comment "immediate value - sign extd") (attrs)
420 (type h-sint) (index f-imm16s) (handlers (parse "imm16") (print "dollarhex")))
421 (define-operand (name imm16z) (comment "immediate value - zero extd") (attrs)
422 (type h-uint) (index f-imm16u) (handlers (parse "imm16") (print "dollarhex")))
423 (define-operand (name imm16o) (comment "immediate value") (attrs PCREL-ADDR)
424 (type h-uint) (index f-imm16s) (handlers (parse "imm16") (print "pcrel")))
426 ; Operands for MorphoSys Instructions
428 (define-operand (name rc) (comment "rc") (attrs)
429 (type h-uint) (index f-rc) (handlers (parse "rc") (print "dollarhex")))
431 (define-operand (name rcnum) (comment "rcnum") (attrs)
432 (type h-uint) (index f-rcnum) (handlers (print "dollarhex")))
434 (define-operand (name contnum) (comment "context number") (attrs)
435 (type h-uint) (index f-contnum) (handlers (print "dollarhex")))
437 (define-operand (name rbbc) (comment "omega network configuration") (attrs)
438 (type h-uint) (index f-rbbc) (handlers (parse "rbbc") (print "dollarhex")))
440 (define-operand (name colnum) (comment "column number") (attrs)
441 (type h-uint) (index f-colnum) (handlers (print "dollarhex")))
443 (define-operand (name rownum) (comment "row number") (attrs)
444 (type h-uint) (index f-rownum) (handlers (print "dollarhex")))
446 (define-operand (name rownum1) (comment "row number") (attrs)
447 (type h-uint) (index f-rownum1) (handlers (print "dollarhex")))
449 (define-operand (name rownum2) (comment "row number") (attrs)
450 (type h-uint) (index f-rownum2) (handlers (print "dollarhex")))
452 (define-operand (name rc1) (comment "rc1") (attrs)
453 (type h-uint) (index f-rc1) (handlers (parse "rc") (print "dollarhex")))
455 (define-operand (name rc2) (comment "rc2") (attrs)
456 (type h-uint) (index f-rc2) (handlers (parse "rc") (print "dollarhex")))
458 (define-operand (name cbrb) (comment "data-bus orientation") (attrs)
459 (type h-uint) (index f-cbrb) (handlers (parse "cbrb") (print "dollarhex")))
461 (define-operand (name cell) (comment "cell") (attrs)
462 (type h-uint) (index f-cell) (handlers (print "dollarhex")))
464 (define-operand (name dup) (comment "dup") (attrs)
465 (type h-uint) (index f-dup) (handlers (parse "dup") (print "dollarhex")))
467 (define-operand (name ctxdisp) (comment "context displacement") (attrs)
468 (type h-uint) (index f-ctxdisp) (handlers (print "dollarhex")))
470 (define-operand (name fbdisp) (comment "frame buffer displacement") (attrs)
471 (type h-uint) (index f-fbdisp) (handlers (print "dollarhex")))
473 (define-operand (name type) (comment "type") (attrs)
474 (type h-uint) (index f-type) (handlers (parse "type") (print "dollarhex")))
476 (define-operand (name mask) (comment "mask") (attrs)
477 (type h-uint) (index f-mask) (handlers (print "dollarhex")))
479 (define-operand (name bankaddr) (comment "bank address") (attrs)
480 (type h-uint) (index f-bankaddr) (handlers (print "dollarhex")))
482 (define-operand (name incamt) (comment "increment amount") (attrs)
483 (type h-uint) (index f-incamt) (handlers (print "dollarhex")))
485 (define-operand (name xmode) (comment "xmode") (attrs)
486 (type h-uint) (index f-xmode) (handlers (parse "xmode") (print "dollarhex")))
488 (define-operand (name mask1) (comment "mask1") (attrs)
489 (type h-uint) (index f-mask1) (handlers (print "dollarhex")))
491 (define-operand (name ball) (comment "b_all") (attrs)
492 (type h-uint) (index f-ball) (handlers (parse "ball") (print "dollarhex")))
494 (define-operand (name brc) (comment "b_r_c") (attrs)
495 (type h-uint) (index f-brc) (handlers (print "dollarhex")))
497 (define-operand (name rda) (comment "rd") (attrs)
498 (type h-uint) (index f-rda) (handlers (print "dollarhex")))
500 (define-operand (name wr) (comment "wr") (attrs)
501 (type h-uint) (index f-wr) (handlers (print "dollarhex")))
503 (define-operand (name ball2) (comment "b_all2") (attrs)
504 (type h-uint) (index f-ball2) (handlers (parse "ball") (print "dollarhex")))
506 (define-operand (name brc2) (comment "b_r_c2") (attrs)
507 (type h-uint) (index f-brc2) (handlers (print "dollarhex")))
508 (define-operand (name perm) (comment "perm") (attrs)
509 (type h-uint) (index f-perm) (handlers (print "dollarhex")))
510 (define-operand (name a23) (comment "a23") (attrs)
511 (type h-uint) (index f-a23) (handlers (print "dollarhex")))
512 (define-operand (name cr) (comment "c-r") (attrs)
513 (type h-uint) (index f-cr) (handlers (print "dollarhex")))
514 (define-operand (name cbs) (comment "cbs") (attrs)
515 (type h-uint) (index f-cbs) (handlers (print "dollarhex")))
516 (define-operand (name incr) (comment "incr") (attrs)
517 (type h-uint) (index f-incr) (handlers (print "dollarhex")))
518 (define-operand (name length) (comment "length") (attrs)
519 (type h-uint) (index f-length) (handlers (print "dollarhex")))
520 (define-operand (name cbx) (comment "cbx") (attrs)
521 (type h-uint) (index f-cbx) (handlers (print "dollarhex")))
522 (define-operand (name ccb) (comment "ccb") (attrs)
523 (type h-uint) (index f-ccb) (handlers (print "dollarhex")))
524 (define-operand (name cdb) (comment "cdb") (attrs)
525 (type h-uint) (index f-cdb) (handlers (print "dollarhex")))
527 ; For the INTLVR insn
528 (define-operand (name mode) (comment "mode") (attrs)
529 (type h-uint) (index f-mode) (handlers (print "dollarhex")))
530 (define-operand (name id) (comment "i/d") (attrs)
531 (type h-uint) (index f-id) (handlers (print "dollarhex")))
532 (define-operand (name size) (comment "size") (attrs)
533 (type h-uint) (index f-size) (handlers (print "dollarhex")))
535 (define-operand (name fbincr) (comment "fb incr") (attrs)
536 (type h-uint) (index f-fbincr) (handlers (print "dollarhex")))
539 (define-operand (name loopsize) (comment "immediate value")
540 (attrs (MACH ms2) PCREL-ADDR)
541 (type h-uint) (index f-loopo) (handlers (parse "loopsize") (print "pcrel")))
542 (define-operand (name imm16l) (comment "immediate value")
544 (type h-uint) (index f-imm16l) (handlers (print "dollarhex")))
545 (define-operand (name rc3) (comment "rc3") (attrs (MACH ms2))
546 (type h-uint) (index f-rc3) (handlers (parse "rc") (print "dollarhex")))
547 (define-operand (name cb1sel) (comment "cb1sel") (attrs (MACH ms2))
548 (type h-uint) (index f-cb1sel) (handlers (print "dollarhex")))
549 (define-operand (name cb2sel) (comment "cb2sel") (attrs (MACH ms2))
550 (type h-uint) (index f-cb2sel) (handlers (print "dollarhex")))
551 (define-operand (name cb1incr) (comment "cb1incr") (attrs (MACH ms2))
552 (type h-sint) (index f-cb1incr) (handlers (print "dollarhex")))
553 (define-operand (name cb2incr) (comment "cb2incr") (attrs (MACH ms2))
554 (type h-sint) (index f-cb2incr) (handlers (print "dollarhex")))
556 ; Probaby won't need most of these.
557 (define-pmacro r0 (reg h-spr #x0))
558 (define-pmacro r1 (reg h-spr #x01))
559 (define-pmacro r2 (reg h-spr #x02))
560 (define-pmacro r3 (reg h-spr #x03))
561 (define-pmacro r4 (reg h-spr #x04))
562 (define-pmacro r5 (reg h-spr #x05))
563 (define-pmacro r6 (reg h-spr #x06))
564 (define-pmacro r7 (reg h-spr #x07))
565 (define-pmacro r8 (reg h-spr #x08))
566 (define-pmacro r9 (reg h-spr #x09))
567 (define-pmacro r10 (reg h-spr #xA))
568 (define-pmacro r11 (reg h-spr #xB))
569 (define-pmacro r12 (reg h-spr #xC))
570 (define-pmacro fp (reg h-spr #xC))
571 (define-pmacro r13 (reg h-spr #xD))
572 (define-pmacro sp (reg h-spr #xD))
573 (define-pmacro r14 (reg h-spr #xE))
574 (define-pmacro ra (reg h-spr #xE))
575 (define-pmacro r15 (reg h-spr #xF))
576 (define-pmacro ira (reg h-spr #xF))
579 (define-pmacro (dset dest src) (set (delay 1 dest) src))
582 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
583 ;; Instructions As Defined In the MorphoRisc ISA Document ;;
584 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
586 ; Arithmetic Instructions
588 (dni add "ADD DstReg, SrcReg1, SrcReg2"
589 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
590 "add $frdrrr,$frsr1,$frsr2"
591 (+ MSYS_NO OPC_ADD IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
592 (set frdrrr (add SI frsr1 frsr2))
596 (dni addu "ADDU DstReg, SrcReg1, SrcReg2"
597 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
598 "addu $frdrrr,$frsr1,$frsr2"
599 (+ MSYS_NO OPC_ADDU IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
600 (set frdrrr (add USI frsr1 frsr2))
604 (dni addi "ADDI DstReg, SrcReg1 UnsImm"
605 (AL-INSN USES-FRDR USES-FRSR1)
606 "addi $frdr,$frsr1,#$imm16"
607 (+ MSYS_NO OPC_ADD IMM_YES frsr1 frdr imm16)
609 (set HI tmp (and imm16 #xffff))
610 (set frdr (add SI frsr1 (ext SI tmp)))
615 (dni addui "ADDUI DstReg, SrcReg1, UnsImm"
616 (AL-INSN USES-FRDR USES-FRSR1)
617 "addui $frdr,$frsr1,#$imm16z"
618 (+ MSYS_NO OPC_ADDU IMM_YES frsr1 frdr imm16z)
619 (set frdr (add USI frsr1 (ext USI imm16z)))
623 (dni sub "SUB DstReg, SrcReg1, SrcReg2"
624 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
625 "sub $frdrrr,$frsr1,$frsr2"
626 (+ MSYS_NO OPC_SUB IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
627 (set frdrrr (sub SI frsr1 frsr2))
631 (dni subu "SUBU DstReg, SrcReg1, SrcReg2"
632 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
633 "subu $frdrrr,$frsr1,$frsr2"
634 (+ MSYS_NO OPC_SUBU IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
635 (set frdrrr (sub USI frsr1 frsr2))
639 (dni subi "SUBI DstReg, SrcReg1, UnsImm"
640 (AL-INSN USES-FRDR USES-FRSR1)
641 "subi $frdr,$frsr1,#$imm16"
642 (+ MSYS_NO OPC_SUB IMM_YES frsr1 frdr imm16)
644 (set HI tmp (and imm16 #xffff))
645 (set frdr (sub SI frsr1 (ext SI tmp)))
647 ;(set frdr (sub SI frsr1 (ext SI imm16)))
651 (dni subui "SUBUI DstReg, SrcReg1, UnsImm"
652 (AL-INSN USES-FRDR USES-FRSR1)
653 "subui $frdr,$frsr1,#$imm16z"
654 (+ MSYS_NO OPC_SUBU IMM_YES frsr1 frdr imm16z)
655 (set frdr (sub USI frsr1 (ext USI imm16z)))
659 (dni mul "MUL DstReg, SrcReg1, SrcReg2"
660 ((MACH ms1-003,ms2) AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
661 "mul $frdrrr,$frsr1,$frsr2"
662 (+ MSYS_NO OPC_MUL IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
663 (sequence((HI op1) (HI op2))
664 (set op1 (and frsr1 #xffff))
665 (if (or (lt op1 (const -32768)) (gt op1 (const 32767)))
666 (error "operand out of range")
668 (set op2 (and frsr2 #xffff))
669 (if (or (lt op2 (const -32768)) (gt op2 (const 32767)))
670 (error "operand out of range")
672 (set frdrrr (mul SI (ext SI op1) (ext SI op2)))
677 (dni muli "MULI DstReg, SrcReg1, UnsImm"
678 ((MACH ms1-003,ms2) AL-INSN USES-FRDR USES-FRSR1)
679 "muli $frdr,$frsr1,#$imm16"
680 (+ MSYS_NO OPC_MUL IMM_YES frsr1 frdr imm16)
681 (sequence((HI op1) (HI op2))
682 (set op1 (and frsr1 #xffff))
683 (if (or (lt op1 (const -32768)) (gt op1 (const 32767)))
684 (error "operand out of range")
686 (set op2 (and imm16 #xffff))
687 (if (eq op1 (const 0))
690 (if (eq op2 (const 0))
693 (set frdr (mul SI (ext SI op1) (ext SI op2)))
698 ; Logical Instructions
700 (dni and "AND DstReg, SrcReg1, SrcReg2"
701 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
702 "and $frdrrr,$frsr1,$frsr2"
703 (+ MSYS_NO OPC_AND IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
704 (set frdrrr (and frsr1 frsr2))
708 (dni andi "ANDI DstReg, SrcReg1, UnsImm"
709 (AL-INSN USES-FRDR USES-FRSR1)
710 "andi $frdr,$frsr1,#$imm16z"
711 (+ MSYS_NO OPC_AND IMM_YES frsr1 frdr imm16z)
712 (set frdr (and frsr1 (ext USI imm16z)))
716 (dni or "OR DstReg, SrcReg1, SrcReg2"
717 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
718 "or $frdrrr,$frsr1,$frsr2"
719 (+ MSYS_NO OPC_OR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
720 (set frdrrr (or frsr1 frsr2))
727 (+ MSYS_NO OPC_OR IMM_NO (f-uu24 0))
732 (dni ori "ORI DstReg, SrcReg1, UnsImm"
733 (AL-INSN USES-FRDR USES-FRSR1)
734 "ori $frdr,$frsr1,#$imm16z"
735 (+ MSYS_NO OPC_OR IMM_YES frsr1 frdr imm16z)
736 (set frdr (or frsr1 (ext USI imm16z)))
740 (dni xor "XOR DstReg, SrcReg1, SrcReg2"
741 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
742 "xor $frdrrr,$frsr1,$frsr2"
743 (+ MSYS_NO OPC_XOR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
744 (set frdrrr (xor frsr1 frsr2))
748 (dni xori "XORI DstReg, SrcReg1, UnsImm"
749 (AL-INSN USES-FRDR USES-FRSR1)
750 "xori $frdr,$frsr1,#$imm16z"
751 (+ MSYS_NO OPC_XOR IMM_YES frsr1 frdr imm16z)
752 (set frdr (xor frsr1 (ext USI imm16z)))
756 (dni nand "NAND DstReg, SrcReg1, SrcReg2"
757 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
758 "nand $frdrrr,$frsr1,$frsr2"
759 (+ MSYS_NO OPC_NAND IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
760 (set frdrrr (inv (and frsr1 frsr2)))
764 (dni nandi "NANDI DstReg, SrcReg1, UnsImm"
765 (AL-INSN USES-FRDR USES-FRSR1)
766 "nandi $frdr,$frsr1,#$imm16z"
767 (+ MSYS_NO OPC_NAND IMM_YES frsr1 frdr imm16z)
768 (set frdr (inv (and frsr1 (ext USI imm16z))))
772 (dni nor "NOR DstReg, SrcReg1, SrcReg2"
773 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
774 "nor $frdrrr,$frsr1,$frsr2"
775 (+ MSYS_NO OPC_NOR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
776 (set frdrrr (inv (or frsr1 frsr2)))
780 (dni nori "NORI DstReg, SrcReg1, UnsImm"
781 (AL-INSN USES-FRDR USES-FRSR1)
782 "nori $frdr,$frsr1,#$imm16z"
783 (+ MSYS_NO OPC_NOR IMM_YES frsr1 frdr imm16z)
784 (set frdr (inv (or frsr1 (ext USI imm16z))))
788 (dni xnor "XNOR DstReg, SrcReg1, SrcReg2"
789 (AL-INSN USES-FRDRRR USES-FRSR1 USES-FRSR2)
790 "xnor $frdrrr,$frsr1,$frsr2"
791 (+ MSYS_NO OPC_XNOR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
792 (set frdrrr (inv (xor frsr1 frsr2)))
796 (dni xnori "XNORI DstReg, SrcReg1, UnsImm"
797 (AL-INSN USES-FRDR USES-FRSR1)
798 "xnori $frdr,$frsr1,#$imm16z"
799 (+ MSYS_NO OPC_XNOR IMM_YES frsr1 frdr imm16z)
800 (set frdr (inv (xor frsr1 (ext USI imm16z))))
804 (dni ldui "LDUI DstReg, UnsImm"
806 "ldui $frdr,#$imm16z"
807 (+ MSYS_NO OPC_LDUI IMM_YES (f-uu4b 0) frdr imm16z)
808 (set frdr (and (sll imm16z 16) #xffff0000))
814 (dni lsl "LSL DstReg, SrcReg1, SrcReg2"
815 (USES-FRDRRR USES-FRSR1 USES-FRSR2)
816 "lsl $frdrrr,$frsr1,$frsr2"
817 (+ MSYS_NO OPC_LSL IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
818 (set frdrrr (sll frsr1 frsr2))
822 (dni lsli "LSLI DstReg, SrcReg1, UnsImm"
823 (USES-FRDR USES-FRSR1)
824 "lsli $frdr,$frsr1,#$imm16"
825 (+ MSYS_NO OPC_LSL IMM_YES frsr1 frdr imm16)
826 (set frdr (sll frsr1 imm16))
830 (dni lsr "LSR DstReg, SrcReg1, SrcReg2"
831 (USES-FRDRRR USES-FRSR1 USES-FRSR2)
832 "lsr $frdrrr,$frsr1,$frsr2"
833 (+ MSYS_NO OPC_LSR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
834 (set frdrrr (srl frsr1 frsr2))
838 (dni lsri "LSRI DstReg, SrcReg1, UnsImm"
839 (USES-FRDR USES-FRSR1)
840 "lsri $frdr,$frsr1,#$imm16"
841 (+ MSYS_NO OPC_LSR IMM_YES frsr1 frdr imm16)
842 (set frdr (srl frsr1 imm16))
846 (dni asr "ASR DstReg, SrcReg1, SrcReg2"
847 (USES-FRDRRR USES-FRSR1 USES-FRSR2)
848 "asr $frdrrr,$frsr1,$frsr2"
849 (+ MSYS_NO OPC_ASR IMM_NO frsr1 frsr2 frdrrr (f-uu12 0))
850 (set frdrrr (sra frsr1 frsr2))
854 (dni asri "ASRI DstReg, SrcReg1, UnsImm"
855 (USES-FRDR USES-FRSR1)
856 "asri $frdr,$frsr1,#$imm16"
857 (+ MSYS_NO OPC_ASR IMM_YES frsr1 frdr imm16)
858 (set frdr (sra frsr1 imm16))
862 ; Control Transfer Instructions
864 (dni brlt "BRLT SrcReg1, SrcReg2, label"
865 (BR-INSN DELAY-SLOT USES-FRDRRR USES-FRSR1 USES-FRSR2)
866 "brlt $frsr1,$frsr2,$imm16o"
867 (+ MSYS_NO OPC_BRLT IMM_YES frsr1 frsr2 imm16o)
869 (if (lt USI frsr1 frsr2)
870 (dset pc (add pc (ext SI imm16o))))
875 (dni brle "BRLE SrcReg1, SrcReg2, label"
876 (BR-INSN DELAY-SLOT USES-FRSR1 USES-FRSR2)
877 "brle $frsr1,$frsr2,$imm16o"
878 (+ MSYS_NO OPC_BRLE IMM_YES frsr1 frsr2 imm16o)
880 (if (le USI frsr1 frsr2)
881 (dset pc (add pc (ext SI imm16o))))
886 (dni breq "BREQ SrcReg1, SrcReg2, label"
887 (BR-INSN DELAY-SLOT USES-FRSR1 USES-FRSR2)
888 "breq $frsr1,$frsr2,$imm16o"
889 (+ MSYS_NO OPC_BREQ IMM_YES frsr1 frsr2 imm16o)
891 (if (eq USI frsr1 frsr2)
892 (dset pc (add pc (ext SI imm16o))))
897 (dni brne "BRNE SrcReg1, SrcReg2, label"
898 (BR-INSN DELAY-SLOT USES-FRSR1 USES-FRSR2)
899 "brne $frsr1,$frsr2,$imm16o"
900 (+ MSYS_NO OPC_BRNEQ IMM_YES frsr1 frsr2 imm16o)
902 (if (not (eq USI frsr1 frsr2))
903 (dset pc (add pc (ext SI imm16o))))
908 (dni jmp "JMP, label"
911 (+ MSYS_NO OPC_JMP IMM_YES (f-uu4b 0) (f-uu4a 0) imm16o)
912 (dset pc (add pc (ext SI imm16o)))
916 (dni jal "JAL DstReg, SrcReg1"
917 (BR-INSN DELAY-SLOT BR-INSN USES-FRDR USES-FRSR1 JAL-HAZARD)
919 (+ MSYS_NO OPC_JAL IMM_NO frsr1 (f-uu4a 0) frdrrr (f-uu12 0))
922 (c-call VOID "do_syscall" pc)
923 (sequence() ; else part. Do non-syscall stuff here.
924 (dset frdrrr (add pc #x8))
932 (dni dbnz "DBNZ SrcReg1, label"
933 ((MACH ms1-003,ms2) BR-INSN DELAY-SLOT USES-FRSR1)
934 "dbnz $frsr1,$imm16o"
935 (+ MSYS_NO OPC_DBNZ IMM_YES frsr1 (f-uu4a 0) imm16o)
937 (if (not (eq USI frsr1 0))
938 (dset pc (add pc (ext SI imm16o))))
943 ; Interrupt Control Instructions
945 (dni ei "EI - Enable Interrupt Processing"
948 (+ MSYS_NO OPC_EI IMM_NO (f-uu4b 0) (f-uu4a 0) (f-uu16 0))
949 (c-call VOID "enable_interrupts")
953 (dni di "DI - Disable Interrupt Processing"
956 (+ MSYS_NO OPC_DI IMM_NO (f-uu4b 0) (f-uu4a 0) (f-uu16 0))
957 (c-call VOID "disable_interrupts")
961 (dni si "SI - Send software Interrupt"
962 (DELAY-SLOT BR-INSN USES-FRDR)
964 (+ MSYS_NO OPC_SI IMM_NO (f-uu4b 0) (f-uu4a 0) frdrrr (f-uu12 0))
966 ; (dset frdr (add pc #x4))
967 ; (c-call VOID "do_syscall1" pc)
968 ; ; (dset pc frsr1) Do this later when we have the address.
971 (set frdrrr (add pc #x4))
972 (c-call VOID "do_syscall" pc)
973 ; (set pc frsr1) Do this later when we have the address.
978 (dni reti "RETI SrcReg1"
979 (DELAY-SLOT BR-INSN USES-FRSR1 JAL-HAZARD)
981 (+ MSYS_NO OPC_RETI IMM_NO frsr1 (f-uu4a 0) (f-uu16 0))
983 (c-call VOID "enable_interrupts")
989 ; Memory Access Instructions
991 (dni ldw "LDW DstReg, SrcReg1, Imm"
992 (LOAD-DELAY MEMORY-ACCESS USES-FRDR USES-FRSR1)
993 "ldw $frdr,$frsr1,#$imm16"
994 (+ MSYS_NO OPC_LDW IMM_YES frsr1 frdr imm16)
995 (sequence((USI ea) (HI tmp))
996 (set HI tmp (and imm16 #xffff))
997 (set ea (and (add SI frsr1 (ext SI tmp)) #xfffffffc))
998 (set frdr (mem SI ea))
1003 (dni stw "STW SrcReg2, SrcReg1, Imm"
1004 (MEMORY-ACCESS USES-FRSR1 USES-FRSR2)
1005 "stw $frsr2,$frsr1,#$imm16"
1006 (+ MSYS_NO OPC_STW IMM_YES frsr1 frsr2 imm16)
1007 (sequence((USI ea) (HI tmp))
1008 (set HI tmp (and imm16 #xffff))
1009 (set ea (and (add SI frsr1 (ext SI tmp)) #xfffffffc))
1010 (set (mem SI ea) frsr2)
1020 (+ MSYS_NO OPC_BREAK (f-imm 0) (f-uu24 0))
1021 (c-call VOID "do_break" pc)
1025 ; Cache Flush Instruction
1027 (dni iflush "IFLUSH"
1028 ((MACH ms1-003,ms2))
1030 (+ MSYS_NO OPC_IFLUSH (f-imm 0) (f-uu24 0))
1035 ; MorphoSys Instructions
1037 (dni ldctxt "LDCTXT SRC1, SRC2, r/c, r/c#, context#"
1039 "ldctxt $frsr1,$frsr2,#$rc,#$rcnum,#$contnum"
1040 (+ MSYS_YES MSOPC_LDCTXT (f-uu-2-25 0) frsr1 frsr2 rc rcnum (f-uu-3-11 0)
1046 (dni ldfb "LDFB SRC1, byte#"
1048 "ldfb $frsr1,$frsr2,#$imm16z"
1049 (+ MSYS_YES MSOPC_LDFB (f-uu-2-25 0) frsr1 frsr2 imm16z)
1054 (dni stfb "STFB SRC1, SRC2, byte "
1056 "stfb $frsr1,$frsr2,#$imm16z"
1057 (+ MSYS_YES MSOPC_STFB (f-uu-2-25 0) frsr1 frsr2 imm16z)
1062 (dni fbcb "FBCB SRC1, RT/BR1/BR2/CS, B_all, B_r_c, r/c, CB/RB, cell, dup, ctx_disp"
1063 ((MACH ms1,ms1-003))
1064 "fbcb $frsr1,#$rbbc,#$ball,#$brc,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1065 (+ MSYS_YES MSOPC_FBCB rbbc frsr1 ball brc (f-uu-4-15 0) rc cbrb cell dup ctxdisp)
1070 (dni mfbcb "MFBCB SRC1, RT/BR1/BR2/CS, SRC2, r/c, CB/RB, cell, dup, ctx_disp"
1072 "mfbcb $frsr1,#$rbbc,$frsr2,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1073 (+ MSYS_YES MSOPC_MFBCB rbbc frsr1 frsr2 (f-uu-4-15 0) rc1 cbrb cell dup ctxdisp)
1078 (dni fbcci "FBCCI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1080 "fbcci $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1081 (+ MSYS_YES MSOPC_FBCCI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1086 (dni fbrci "FBRCI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1088 "fbrci $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1089 (+ MSYS_YES MSOPC_FBRCI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1094 (dni fbcri "FBCRI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1096 "fbcri $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1097 (+ MSYS_YES MSOPC_FBCRI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1102 (dni fbrri "FBRRI SRC1, RT/BR1/BR2/CS, B_all, B_r_c, FB_disp, cell, dup, ctx_disp"
1104 "fbrri $frsr1,#$rbbc,#$ball,#$brc,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1105 (+ MSYS_YES MSOPC_FBRRI rbbc frsr1 ball brc fbdisp cell dup ctxdisp)
1110 (dni mfbcci "MFBCCI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1112 "mfbcci $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1113 (+ MSYS_YES MSOPC_MFBCCI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1118 (dni mfbrci "MFBRCI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1120 "mfbrci $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1121 (+ MSYS_YES MSOPC_MFBRCI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1126 (dni mfbcri "MFBCRI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1128 "mfbcri $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1129 (+ MSYS_YES MSOPC_MFBCRI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1134 (dni mfbrri "MFBRRI SRC1, RT/BR1/BR2/CS, SRC2, FB_disp, cell, dup, ctx_disp"
1136 "mfbrri $frsr1,#$rbbc,$frsr2,#$fbdisp,#$cell,#$dup,#$ctxdisp"
1137 (+ MSYS_YES MSOPC_MFBRRI rbbc frsr1 frsr2 fbdisp cell dup ctxdisp)
1142 (dni fbcbdr "FBCBDR SRC1, RT/BR1/BR2/CS, SRC2, B_all, B_r_c, r/c, CB/RB, cell, dup, ctx_disp"
1144 "fbcbdr $frsr1,#$rbbc,$frsr2,#$ball2,#$brc2,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1145 (+ MSYS_YES MSOPC_FBCBDR rbbc frsr1 frsr2 ball2 brc2 rc1 cbrb cell dup ctxdisp)
1150 (dni rcfbcb "RCFBCB RT/BR1/BR2/CS, type, B_all, B_r_c, row#, r/c, CB/RB, cell, dup, ctx_disp"
1152 "rcfbcb #$rbbc,#$type,#$ball,#$brc,#$rownum,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1153 (+ MSYS_YES MSOPC_RCFBCB rbbc (f-uu-2-23 0) type ball brc (f-uu-1-15 0) rownum rc1 cbrb cell dup ctxdisp)
1158 (dni mrcfbcb "MRCFBCB SRC2, RT/BR1/BR2/CS, type, row#, r/c, CB/RB, cell, dup, ctx_disp"
1160 "mrcfbcb $frsr2,#$rbbc,#$type,#$rownum,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1161 (+ MSYS_YES MSOPC_MRCFBCB rbbc (f-uu-2-23 0) type frsr2 (f-uu-1-15 0) rownum rc1 cbrb cell dup ctxdisp)
1166 (dni cbcast "CBCAST mask, r/c, ctx_disp "
1168 "cbcast #$mask,#$rc2,#$ctxdisp"
1169 (+ MSYS_YES MSOPC_CBCAST mask (f-uu-3-9 0) rc2 ctxdisp)
1174 (dni dupcbcast "DUPCBCAST mask, cell, r/c, ctx_disp "
1176 "dupcbcast #$mask,#$cell,#$rc2,#$ctxdisp"
1177 (+ MSYS_YES MSOPC_DUPCBCAST mask cell rc2 ctxdisp)
1182 (dni wfbi "WFBI Bank_address, row#, cell, dup, ctx_disp "
1184 "wfbi #$bankaddr,#$rownum1,#$cell,#$dup,#$ctxdisp"
1185 (+ MSYS_YES MSOPC_WFBI bankaddr rownum1 cell dup ctxdisp)
1190 ;(dni wfb "WFB SRC1, SRC2, FB_disp, row#, ctx_disp"
1192 ; "wfb $frsr1,$frsr2,#$fbdisp,#$rownum,#$ctxdisp"
1193 ; (+ MSYS_YES MSOPC_WFB (f-uu-2-25 0) frsr1 frsr2 fbdisp rownum (f-uu-1-6 0) ctxdisp)
1198 (dni wfb "WFB, DRC1,SRC2,FB_disp,row#,ctx_disp"
1200 "wfb $frsr1,$frsr2,#$fbdisp,#$rownum2,#$ctxdisp"
1201 (+ MSYS_YES MSOPC_WFB (f-uu-2-25 0) frsr1 frsr2 fbdisp rownum2 (f-uu-1-6 0) ctxdisp)
1207 (dni rcrisc "RCRISC DEST, RT/BR1/BR2/CS, SRC1, column#, r/c, CB/RB, cell, dup, ctx_disp"
1209 "rcrisc $frdrrr,#$rbbc,$frsr1,#$colnum,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1210 (+ MSYS_YES MSOPC_RCRISC rbbc frsr1 (f-uu-1-19 0) colnum frdrrr rc1 cbrb cell dup ctxdisp)
1215 (dni fbcbinc "FBCBINC SRC1, RT/BR1/BR2/CS, Incr_amount, r/c, CB/RB, cell, dup, ctx_disp "
1217 "fbcbinc $frsr1,#$rbbc,#$incamt,#$rc1,#$cbrb,#$cell,#$dup,#$ctxdisp"
1218 (+ MSYS_YES MSOPC_FBCBINC rbbc frsr1 incamt rc1 cbrb cell dup ctxdisp)
1223 (dni rcxmode "RCXMODE SRC2, rd, wr, xmode, mask, FB_disp, row#, r/c, ctx_disp"
1225 "rcxmode $frsr2,#$rda,#$wr,#$xmode,#$mask1,#$fbdisp,#$rownum2,#$rc2,#$ctxdisp"
1226 (+ MSYS_YES MSOPC_RCXMODE rda wr xmode mask1 frsr2 fbdisp rownum2 rc2 ctxdisp)
1231 (dni interleaver "INTLVR ireg, mode, ireg, i/d, size"
1233 "intlvr $frsr1,#$mode,$frsr2,#$id,#$size"
1234 (+ MSYS_YES MSOPC_INTLVR mode frsr1 frsr2 (f-uu-1-15 0) id size)
1239 ;; Issue 66262: The documenatation gives the wrong order for
1240 ;; the arguments to the WFBINC instruction.
1241 (dni wfbinc "WFBINC type, ccb/rcb, incr, all, c/r, length, rca_row, word, dup, ctxt_disp"
1242 ((MACH ms1-003,ms2))
1243 "wfbinc #$rda,#$wr,#$fbincr,#$ball,#$colnum,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1244 (+ MSYS_YES MSOPC_WFBINC rda wr fbincr ball colnum length rownum1 rownum2 dup ctxdisp)
1249 (dni mwfbinc "MWFBINC mreg, type, ccb/rcb, incr, length, rca_row, word, dup, ctxt_disp"
1250 ((MACH ms1-003,ms2))
1251 "mwfbinc $frsr2,#$rda,#$wr,#$fbincr,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1252 (+ MSYS_YES MSOPC_MWFBINC rda wr fbincr frsr2 length rownum1 rownum2 dup ctxdisp)
1257 (dni wfbincr "WFBINCR ireg, type, ccb/rcb, all, c/r, length, rca_row, word, dup, ctxt_disp"
1258 ((MACH ms1-003,ms2))
1259 "wfbincr $frsr1,#$rda,#$wr,#$ball,#$colnum,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1260 (+ MSYS_YES MSOPC_WFBINCR rda wr frsr1 ball colnum length rownum1 rownum2 dup ctxdisp)
1265 (dni mwfbincr "MWFBINCR ireg, mreg, type, ccb/rcb, length, rca_row, word, dup, ctxt_disp"
1266 ((MACH ms1-003,ms2))
1267 "mwfbincr $frsr1,$frsr2,#$rda,#$wr,#$length,#$rownum1,#$rownum2,#$dup,#$ctxdisp"
1268 (+ MSYS_YES MSOPC_MWFBINCR rda wr frsr1 frsr2 length rownum1 rownum2 dup ctxdisp)
1273 (dni fbcbincs "FBCBINCS perm, all, c/r, cbs, incr, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1274 ((MACH ms1-003,ms2))
1275 "fbcbincs #$perm,#$a23,#$cr,#$cbs,#$incr,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1276 (+ MSYS_YES MSOPC_FBCBINCS perm a23 cr cbs incr ccb cdb rownum2 dup ctxdisp)
1281 (dni mfbcbincs "MFBCBINCS ireg, perm, cbs, incr, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1282 ((MACH ms1-003,ms2))
1283 "mfbcbincs $frsr1,#$perm,#$cbs,#$incr,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1284 (+ MSYS_YES MSOPC_MFBCBINCS perm frsr1 cbs incr ccb cdb rownum2 dup ctxdisp)
1289 (dni fbcbincrs "FBCBINCRS ireg, perm, all, c/r, cbs, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1290 ((MACH ms1-003,ms2))
1291 "fbcbincrs $frsr1,#$perm,#$ball,#$colnum,#$cbx,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1292 (+ MSYS_YES MSOPC_FBCBINCRS perm frsr1 ball colnum (f-uu-1-15 0) cbx ccb cdb rownum2 dup ctxdisp)
1297 (dni mfbcbincrs "MFBCBINCRS ireg, mreg, perm, cbs, ccb/rcb, cdb/rdb, word, dup, ctxt_disp"
1298 ((MACH ms1-003,ms2))
1299 "mfbcbincrs $frsr1,$frsr2,#$perm,#$cbx,#$ccb,#$cdb,#$rownum2,#$dup,#$ctxdisp"
1300 (+ MSYS_YES MSOPC_MFBCBINCRS perm frsr1 frsr2 (f-uu-1-15 0) cbx ccb cdb rownum2 dup ctxdisp)
1306 (dni loop "LOOP SrcReg1, label"
1307 ((MACH ms2) DELAY-SLOT USES-FRSR1)
1308 "loop $frsr1,$loopsize"
1309 (+ MSYS_NO OPC_LOOP IMM_NO frsr1 (f-uu4a 0) (f-uu8 0) loopsize)
1310 (nop) ;; to be filled in
1314 (dni loopi "LOOPI niter, label"
1315 ((MACH ms2) DELAY-SLOT)
1316 "loopi #$imm16l,$loopsize"
1317 (+ MSYS_NO OPC_LOOP IMM_YES imm16l loopsize)
1318 (nop) ;; to be filled in
1322 (dni dfbc "dfbc cb1sel,cb2sel,cb1inc,cb2inc,dr/c,cr/c,ctxdisp"
1324 "dfbc #$cb1sel,#$cb2sel,#$cb1incr,#$cb2incr,#$rc3,#$rc2,#$ctxdisp"
1325 (+ MSYS_YES MSOPC_LDCTXT cb1sel cb2sel cb1incr cb2incr rc3 rc2 ctxdisp)
1330 (dni dwfb "dwfb cb1sel,cb2sel,cb1inc,cb2inc,cr/c,ctxdisp"
1332 "dwfb #$cb1sel,#$cb2sel,#$cb1incr,#$cb2incr,#$rc2,#$ctxdisp"
1333 (+ MSYS_YES MSOPC_LDFB cb1sel cb2sel cb1incr cb2incr (f-uu1 0) rc2 ctxdisp)
1338 (dni fbwfb "fbwfb cb1sel,cb2sel,cb1inc,cb2inc,r0/1,cr/c,ctxdisp"
1340 "fbwfb #$cb1sel,#$cb2sel,#$cb1incr,#$cb2incr,#$rc3,#$rc2,#$ctxdisp"
1341 (+ MSYS_YES MSOPC_STFB cb1sel cb2sel cb1incr cb2incr rc3 rc2 ctxdisp)
1346 (dni dfbr "dfbr cb1sel,cb2sel,reg,W/O1,W/O2,mode,cr/c,ctxdisp"
1347 ((MACH ms2) USES-FRSR2)
1348 "dfbr #$cb1sel,#$cb2sel,$frsr2,#$length,#$rownum1,#$rownum2,#$rc2,#$ctxdisp"
1349 (+ MSYS_YES MSOPC_FBCB cb1sel cb2sel frsr2 length rownum1 rownum2 rc2 ctxdisp)