1 ; IQ10-only CPU description. -*- Scheme -*-
3 ; Copyright 2001, 2002 Free Software Foundation, Inc.
5 ; Contributed by Red Hat Inc; developed under contract from Vitesse.
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 2 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, MA 02110-1301, USA.
26 (dni andoui-q10 "iq10 and upper ones immediate" (MACH10 USES-RS USES-RT)
27 "andoui $rt,$rs,$hi16"
28 (+ OP10_ANDOUI rs rt hi16)
29 (set rt (and rs (or (sll hi16 16) #xFFFF)))
32 (dni andoui2-q10 "iq10 and upper ones immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT)
33 "andoui ${rt-rs},$hi16"
34 (+ OP10_ANDOUI rt-rs hi16)
35 (set rt-rs (and rt-rs (or (sll hi16 16) #xFFFF)))
38 (dni orui-q10 "or upper immediate" (MACH10 USES-RS USES-RT)
40 (+ OP10_ORUI rs rt hi16)
41 (set rt (or rs (sll hi16 16)))
44 (dni orui2-q10 "or upper immediate" (ALIAS NO-DIS MACH10 USES-RS USES-RT)
46 (+ OP10_ORUI rt-rs hi16)
47 (set rt-rs (or rt-rs (sll hi16 16)))
50 (dni mrgbq10 "merge bytes" (MACH10 USES-RD USES-RS USES-RT)
51 "mrgb $rd,$rs,$rt,$maskq10"
52 (+ OP_SPECIAL rs rt rd maskq10 FUNC_MRGB)
54 (if (bitclear? mask 0)
55 (set temp (and rs #xFF))
56 (set temp (and rt #xFF)))
57 (if (bitclear? mask 1)
58 (set temp (or temp (and rs #xFF00)))
59 (set temp (or temp (and rt #xFF00))))
60 (if (bitclear? mask 2)
61 (set temp (or temp (and rs #xFF0000)))
62 (set temp (or temp (and rt #xFF0000))))
63 (if (bitclear? mask 3)
64 (set temp (or temp (and rs #xFF000000)))
65 (set temp (or temp (and rt #xFF000000))))
69 (dni mrgbq102 "merge bytes" (ALIAS NO-DIS MACH10 USES-RD USES-RS USES-RT)
70 "mrgb ${rd-rs},$rt,$maskq10"
71 (+ OP_SPECIAL rt rd-rs maskq10 FUNC_MRGB)
73 (if (bitclear? mask 0)
74 (set temp (and rd-rs #xFF))
75 (set temp (and rt #xFF)))
76 (if (bitclear? mask 1)
77 (set temp (or temp (and rd-rs #xFF00)))
78 (set temp (or temp (and rt #xFF00))))
79 (if (bitclear? mask 2)
80 (set temp (or temp (and rd-rs #xFF0000)))
81 (set temp (or temp (and rt #xFF0000))))
82 (if (bitclear? mask 3)
83 (set temp (or temp (and rd-rs #xFF000000)))
84 (set temp (or temp (and rt #xFF000000))))
88 ; In the future, we'll want the j & jal to use the 21 bit target, with
89 ; the upper five bits shifted up. For now, give 'em the 16 bit target.
91 (dni jq10 "jump" (MACH10)
93 (+ OP_J (f-rs 0) (f-rt 0) jmptarg)
95 ; (+ OP_J upper-5-jmptargq10 (f-rt 0) lower-16-jmptargq10)
96 (delay 1 (set pc jmptarg))
99 (dni jalq10 "jump and link" (MACH10 USES-RT)
101 (+ OP_JAL (f-rs 0) rt jmptarg)
102 ; "jal $rt,$jmptargq10"
103 ; (+ OP_JAL upper-5-jmptargq10 rt lower-16-jmptargq10)
110 (dni jalq10-2 "jump and link, implied r31" (MACH10 USES-RT)
112 (+ OP_JAL (f-rs 0) (f-rt 31) jmptarg)
119 ; Branch instructions.
121 (dni bbil "branch bit immediate likely" (MACH10 USES-RS)
122 "bbil $rs($bitnum),$offset"
123 (+ OP10_BBIL rs bitnum offset)
124 (if (bitset? rs bitnum)
125 (delay 1 (set pc offset))
129 (dni bbinl "branch bit immediate negated likely" (MACH10 USES-RS)
130 "bbinl $rs($bitnum),$offset"
131 (+ OP10_BBINL rs bitnum offset)
132 (if (bitclear? rs bitnum)
133 (delay 1 (set pc offset))
137 (dni bbvl "branch bit variable likely" (MACH10 USES-RS USES-RT)
138 "bbvl $rs,$rt,$offset"
139 (+ OP10_BBVL rs rt offset)
140 (if (bitset? rs (and rt #x1F))
141 (delay 1 (set pc offset))
145 (dni bbvnl "branch bit variable negated likely" (MACH10 USES-RS USES-RT)
146 "bbvnl $rs,$rt,$offset"
147 (+ OP10_BBVNL rs rt offset)
148 (if (bitclear? rs (and rt #x1F))
149 (delay 1 (set pc offset))
153 (dni bgtzal "branch if greater than zero and link" (MACH10 USES-RS USES-R31)
155 (+ OP_REGIMM rs FUNC_BGTZAL offset)
158 (set (reg h-gr 31) (add pc 8))
159 (delay 1 (set pc offset))))
163 "branch if greater than zero and link likely" (MACH10 USES-RS USES-R31)
164 "bgtzall $rs,$offset"
165 (+ OP_REGIMM rs FUNC_BGTZALL offset)
168 (set (reg h-gr 31) (add pc 8))
169 (delay 1 (set pc offset)))
173 (dni blezal "branch if less than or equal to zero and link" (MACH10 USES-RS USES-R31)
175 (+ OP_REGIMM rs FUNC_BLEZAL offset)
178 (set (reg h-gr 31) (add pc 8))
179 (delay 1 (set pc offset))))
183 "branch if less than or equal to zero and link likely" (MACH10 USES-RS USES-R31)
184 "blezall $rs,$offset"
185 (+ OP_REGIMM rs FUNC_BLEZALL offset)
188 (set (reg h-gr 31) (add pc 8))
189 (delay 1 (set pc offset)))
193 (dni bgtz-q10 "branch if greater than zero" (MACH10 USES-RS)
195 (+ OP_REGIMM rs FUNC_BGTZ offset)
197 (delay 1 (set pc offset)))
200 (dni bgtzl-q10 "branch if greater than zero likely" (MACH10 USES-RS)
202 (+ OP_REGIMM rs FUNC_BGTZL offset)
204 (delay 1 (set pc offset))
209 (dni blez-q10 "branch if less than or equal to zero" (MACH10 USES-RS)
211 (+ OP_REGIMM rs FUNC_BLEZ offset)
213 (delay 1 (set pc offset)))
216 (dni blezl-q10 "branch if less than or equal to zero likely" (MACH10 USES-RS)
218 (+ OP_REGIMM rs FUNC_BLEZL offset)
220 (delay 1 (set pc offset))
224 (dni bmb-q10 "branch if matching byte-lane" (MACH10 USES-RS USES-RT)
225 "bmb $rs,$rt,$offset"
226 (+ OP10_BMB rs rt offset)
227 (sequence ((BI branch?))
229 (if (eq (and rs #xFF) (and rt #xFF))
231 (if (eq (and rs #xFF00) (and rt #xFF00))
233 (if (eq (and rs #xFF0000) (and rt #xFF0000))
235 (if (eq (and rs #xFF000000) (and rt #xFF000000))
238 (delay 1 (set pc offset))))
241 (dni bmbl "branch if matching byte-lane likely" (MACH10 USES-RS USES-RT)
242 "bmbl $rs,$rt,$offset"
243 (+ OP10_BMBL rs rt offset)
244 (sequence ((BI branch?))
246 (if (eq (and rs #xFF) (and rt #xFF))
248 (if (eq (and rs #xFF00) (and rt #xFF00))
250 (if (eq (and rs #xFF0000) (and rt #xFF0000))
252 (if (eq (and rs #xFF000000) (and rt #xFF000000))
255 (delay 1 (set pc offset))
259 (dni bri "branch if register invalid" (MACH10 USES-RS)
261 (+ OP_REGIMM rs FUNC_BRI offset)
263 (delay 1 (set pc offset))
267 (dni brv "branch if register invalid" (MACH10 USES-RS)
269 (+ OP_REGIMM rs FUNC_BRV offset)
271 (delay 1 (set pc offset))
277 (dni bctx "branch if the current context == instruction[21]" (MACH10 USES-RS)
279 (+ OP_REGIMM rs FUNC_BCTX offset)
280 (delay 1 (set pc offset))
283 (dni yield "unconditional yield to the other context" (MACH10)
285 (+ OP_SPECIAL (f-rs 0) (f-rt 0) (f-rd 0) (f-shamt 0) FUNC10_YIELD)
289 ; Special instructions.
291 (dni crc32 "CRC, 32 bit input" (MACH10 USES-RD USES-RS USES-RT)
293 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32)
297 (dni crc32b "CRC, 8 bit input" (MACH10 USES-RD USES-RS USES-RT)
299 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_CRC32B)
303 (dni cnt1s "Count ones" (MACH10 USES-RD USES-RS)
305 (+ OP_SPECIAL rs rt rd (f-shamt 0) FUNC10_CNT1S)
310 ; Special Instructions
312 (dni avail "Mark Header Buffer Available" (MACH10 USES-RD)
314 (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_AVAIL)
318 (dni free "Mark Header Buffer Free" (MACH10 USES-RS USES-RD)
320 (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_FREE)
324 (dni tstod "Test Header Buffer Order Dependency" (MACH10 USES-RS USES-RD)
326 (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_TSTOD)
330 (dni cmphdr "Get a Complete Header" (MACH10 USES-RD)
332 (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_CMPHDR)
336 (dni mcid "Allocate a Multicast ID" (MACH10 USES-RD USES-RT)
338 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_MCID)
342 (dni dba "Allocate a Data Buffer Pointer" (MACH10 USES-RD)
344 (+ OP_COP3 (f-rs 0) (f-rt 0) rd (f-shamt 0) FUNC10_DBA)
348 (dni dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RS USES-RT USES-RD)
350 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_DBD)
354 (dni dpwt "DSTN_PORT Write" (MACH10 USES-RS USES-RD)
356 (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_DPWT)
360 ; Architectural and coprocessor instructions.
362 (dni chkhdrq10 "" (MACH10 USES-RS USES-RD)
364 (+ OP_COP3 rs (f-rt 0) rd (f-shamt 0) FUNC10_CHKHDR)
368 ; Coprocessor DMA Instructions (IQ10)
370 (dni rba "Read Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD)
372 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBA)
376 (dni rbal "Read Bytes Absolute and Lock" (MACH10 USES-RS USES-RT USES-RD)
378 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAL)
382 (dni rbar "Read Bytes Absolute and Release" (MACH10 USES-RS USES-RT USES-RD)
384 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_RBAR)
388 (dni wba "Write Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD)
390 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBA)
394 (dni wbau "Write Bytes Absolute and Unlock" (MACH10 USES-RS USES-RT USES-RD)
396 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAU)
400 (dni wbac "Write Bytes Absolute Cacheable" (MACH10 USES-RS USES-RT USES-RD)
402 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_WBAC)
406 (dni rbi "Read Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT)
407 "rbi $rd,$rs,$rt,$bytecount"
408 (+ OP_COP3 rs rt rd FUNC10_RBI bytecount)
412 (dni rbil "Read Bytes Immediate and Lock" (MACH10 USES-RD USES-RS USES-RT)
413 "rbil $rd,$rs,$rt,$bytecount"
414 (+ OP_COP3 rs rt rd FUNC10_RBIL bytecount)
418 (dni rbir "Read Bytes Immediate and Release" (MACH10 USES-RD USES-RS USES-RT)
419 "rbir $rd,$rs,$rt,$bytecount"
420 (+ OP_COP3 rs rt rd FUNC10_RBIR bytecount)
424 (dni wbi "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT)
425 "wbi $rd,$rs,$rt,$bytecount"
426 (+ OP_COP3 rs rt rd FUNC10_WBI bytecount)
430 (dni wbic "Write Bytes Immediate Cacheable" (MACH10 USES-RD USES-RS USES-RT)
431 "wbic $rd,$rs,$rt,$bytecount"
432 (+ OP_COP3 rs rt rd FUNC10_WBIC bytecount)
436 (dni wbiu "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT)
437 "wbiu $rd,$rs,$rt,$bytecount"
438 (+ OP_COP3 rs rt rd FUNC10_WBIU bytecount)
442 (dni pkrli "Packet Release Immediate" (MACH10 USES-RD USES-RS USES-RT)
443 "pkrli $rd,$rs,$rt,$bytecount"
444 (+ OP_COP2 rs rt rd FUNC10_PKRLI bytecount)
448 (dni pkrlih "Packet Release Immediate and Hold" (MACH10 USES-RD USES-RS USES-RT)
449 "pkrlih $rd,$rs,$rt,$bytecount"
450 (+ OP_COP2 rs rt rd FUNC10_PKRLIH bytecount)
454 (dni pkrliu "Packet Release Immediate Unconditional" (MACH10 USES-RD USES-RS USES-RT)
455 "pkrliu $rd,$rs,$rt,$bytecount"
456 (+ OP_COP2 rs rt rd FUNC10_PKRLIU bytecount)
460 (dni pkrlic "Packet Release Immediate Continue" (MACH10 USES-RD USES-RS USES-RT)
461 "pkrlic $rd,$rs,$rt,$bytecount"
462 (+ OP_COP2 rs rt rd FUNC10_PKRLIC bytecount)
466 (dni pkrla "Packet Release Absolute" (MACH10 USES-RS USES-RT USES-RD)
468 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLA)
472 (dni pkrlau "Packet Release Absolute Unconditional" (MACH10 USES-RS USES-RT USES-RD)
474 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAU)
478 (dni pkrlah "Packet Release Absolute and Hold" (MACH10 USES-RS USES-RT USES-RD)
480 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAH)
484 (dni pkrlac "Packet Release Absolute Continue" (MACH10 USES-RS USES-RT USES-RD)
486 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_PKRLAC)
490 ; Main Memory Access Instructions
492 (dni lock "lock memory" (MACH10 USES-RD USES-RT)
494 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_LOCK)
498 (dni unlk "unlock memory" (MACH10 USES-RT USES-RD)
500 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_UNLK)
504 (dni swrd "Single Word Read" (MACH10 USES-RT USES-RD)
506 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_SWRD)
510 (dni swrdl "Single Word Read and Lock" (MACH10 USES-RT USES-RD)
512 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_SWRDL)
516 (dni swwr "Single Word Write" (MACH10 USES-RS USES-RT USES-RD)
518 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_SWWR)
522 (dni swwru "Single Word Write and Unlock" (MACH10 USES-RS USES-RT USES-RD)
524 (+ OP_COP3 rs rt rd (f-shamt 0) FUNC10_SWWRU)
528 (dni dwrd "Double Word Read" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
530 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_DWRD)
534 (dni dwrdl "Double Word Read and Lock" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
536 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_DWRDL)
540 ; CAM access instructions (IQ10)
542 (dni cam36 "CAM Access in 36-bit Mode" (MACH10 USES-RT USES-RD)
543 "cam36 $rd,$rt,${cam-z},${cam-y}"
544 (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM36 cam-z cam-y)
548 (dni cam72 "CAM Access in 72-bit Mode" (MACH10 USES-RT USES-RD)
549 "cam72 $rd,$rt,${cam-y},${cam-z}"
550 (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM72 cam-z cam-y)
554 (dni cam144 "CAM Access in 144-bit Mode" (MACH10 USES-RT USES-RD)
555 "cam144 $rd,$rt,${cam-y},${cam-z}"
556 (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM144 cam-z cam-y)
560 (dni cam288 "CAM Access in 288-bit Mode" (MACH10 USES-RT USES-RD)
561 "cam288 $rd,$rt,${cam-y},${cam-z}"
562 (+ OP_COP3 (f-rs 0) rt rd FUNC10_CAM288 cam-z cam-y)
566 ; Counter manager instructions (IQ10)
568 (dni cm32and "Counter Manager And" (MACH10 USES-RS USES-RT USES-RD)
569 "cm32and $rd,$rs,$rt"
570 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32AND)
574 (dni cm32andn "Counter Manager And With Inverse" (MACH10 USES-RS USES-RT USES-RD)
575 "cm32andn $rd,$rs,$rt"
576 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32ANDN)
580 (dni cm32or "Counter Manager Or" (MACH10 USES-RS USES-RT USES-RD)
582 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32OR)
586 (dni cm32ra "Counter Manager 32-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD)
588 (+ OP_COP3 rs rt rd (f-shamt 2) FUNC10_CM32RA)
592 (dni cm32rd "Counter Manager 32-bit Rolling Decrement" (MACH10 USES-RT USES-RD)
594 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32RD)
598 (dni cm32ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD)
600 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32RI)
604 (dni cm32rs "Counter Manager 32-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD)
606 (+ OP_COP3 rs rt rd (f-shamt 2) FUNC10_CM32RS)
610 (dni cm32sa "Counter Manager 32-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD)
612 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SA)
616 (dni cm32sd "Counter Manager 32-bit Saturating Decrement" (MACH10 USES-RT USES-RD)
618 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SD)
622 (dni cm32si "Counter Manager 32-bit Saturating Increment" (MACH10 USES-RT USES-RD)
624 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SI)
628 (dni cm32ss "Counter Manager 32-bit Saturating Subtract" (MACH10 USES-RS USES-RT USES-RD)
630 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32SS)
634 (dni cm32xor "Counter Manager Xor" (MACH10 USES-RS USES-RT USES-RD)
635 "cm32xor $rd,$rs,$rt"
636 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM32XOR)
640 (dni cm64clr "Counter Manager Clear" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
642 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64CLR)
646 (dni cm64ra "Counter Manager 64-bit Rolling Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
648 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RA)
652 (dni cm64rd "Counter Manager 64-bit Rolling Decrement" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
654 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RD)
658 (dni cm64ri "Counter Manager 32-bit Rolling Increment" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
660 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RI)
664 (dni cm64ria2 "Counter Manager 32/32 Rolling Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
665 "cm64ria2 $rd,$rs,$rt"
666 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RIA2)
670 (dni cm64rs "Counter Manager 64-bit Rolling Subtract" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
672 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64RS)
676 (dni cm64sa "Counter Manager 64-bit Saturating Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
678 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SA)
682 (dni cm64sd "Counter Manager 64-bit Saturating Decrement" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
684 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SD)
688 (dni cm64si "Counter Manager 64-bit Saturating Increment" (MACH10 EVEN-REG-NUM USES-RT USES-RD)
690 (+ OP_COP3 (f-rs 0) rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SI)
694 (dni cm64sia2 "Counter Manager 32/32 Saturating Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
695 "cm64sia2 $rd,$rs,$rt"
696 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SIA2)
700 (dni cm64ss "Counter Manager 64-bit Saturating Subtract" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
702 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM64SS)
706 (dni cm128ria2 "Counter Manager 128-bit 64/64 Rolling Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
707 "cm128ria2 $rd,$rs,$rt"
708 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128RIA2)
712 (dni cm128ria3 "Counter Manager 128-bit 32/32/64 Rolling Increment/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
713 "cm128ria3 $rd,$rs,$rt,${cm-3z}"
714 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128RIA3 cm-3z)
718 (dni cm128ria4 "Counter Manager 128-bit 32/32/32/32 Rolling Inc/Add" (MACH10 USES-RS USES-RT USES-RD)
719 "cm128ria4 $rd,$rs,$rt,${cm-4z}"
720 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128RIA4 cm-4z)
724 (dni cm128sia2 "Counter Manager 128-bit 64/64 Saturating Inc/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
725 "cm128sia2 $rd,$rs,$rt"
726 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128SIA2)
730 (dni cm128sia3 "Counter Manager 128-bit 32/32/64 Saturating Inc/Add" (MACH10 EVEN-REG-NUM USES-RS USES-RT USES-RD)
731 "cm128sia3 $rd,$rs,$rt,${cm-3z}"
732 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128SIA3 cm-3z)
736 (dni cm128sia4 "Counter Manager 128-bit 32/32/32/32 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD)
737 "cm128sia4 $rd,$rs,$rt,${cm-4z}"
738 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128SIA4 cm-4z)
742 (dni cm128vsa "Counter Manager Continuous State Dual Leaky Token Bucket Policing" (MACH10 USES-RS USES-RT USES-RD)
743 "cm128vsa $rd,$rs,$rt"
744 (+ OP_COP3 rs rt rd (f-cp-op 0) (f-cp-grp 2) FUNC10_CM128VSA)
748 ; Coprocessor Data Movement Instructions
750 ; Note that we don't set the USES-RD or USES-RT attributes for many of the following
751 ; instructions, as it's the COP register that's being specified.
753 ; ??? Is YIELD-INSN the right attribute for IQ10? The IQ2000 used the attribute to warn about
754 ; yielding instructions in a delay slot, but that's not relevant in IQ10. What *is* relevant
755 ; (and unique to IQ10) is instructions that yield if the destination register is accessed
756 ; before the value is there, causing a yield.
758 (dni cfc "copy from coprocessor control register" (MACH10 LOAD-DELAY USES-RD YIELD-INSN)
760 (+ OP_COP3 (f-rs 0) rt rd (f-shamt 0) FUNC10_CFC)
764 (dni ctc "copy to coprocessor control register" (MACH10 USES-RS)
766 (+ OP_COP3 rs rt (f-rd 0) (f-shamt 0) FUNC10_CTC)
772 (dnmi m-avail "Mark Header Buffer Available" (MACH10 NO-DIS)
774 (emit avail (f-rd 0))
777 (dnmi m-cam36 "CAM Access in 36-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
778 "cam36 $rd,$rt,${cam-z}"
779 (emit cam36 rd rt cam-z (f-cam-y 0))
782 (dnmi m-cam72 "CAM Access in 72-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
783 "cam72 $rd,$rt,${cam-z}"
784 (emit cam72 rd rt cam-z (f-cam-y 0))
787 (dnmi m-cam144 "CAM Access in 144-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
788 "cam144 $rd,$rt,${cam-z}"
789 (emit cam144 rd rt cam-z (f-cam-y 0))
792 (dnmi m-cam288 "CAM Access in 288-bit Mode" (MACH10 USES-RT USES-RD NO-DIS)
793 "cam288 $rd,$rt,${cam-z}"
794 (emit cam288 rd rt cam-z (f-cam-y 0))
797 (dnmi m-cm32read "Counter Manager 32-bit Rolling Add R0" (MACH10 USES-RT USES-RD NO-DIS)
799 (emit cm32ra rd (f-rs 0) rt)
802 (dnmi m-cm64read "Counter Manager 64-bit Rolling Add R0" (MACH10 USES-RT USES-RD NO-DIS)
804 (emit cm64ra rd (f-rs 0) rt)
807 (dnmi m-cm32mlog "Counter Manager 32-bit or R0" (MACH10 USES-RS USES-RT NO-DIS)
809 (emit cm32or (f-rd 0) rs rt)
812 (dnmi m-cm32and "Counter Manager And" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
814 (emit cm32and (f-rd 0) rs rt)
817 (dnmi m-cm32andn "Counter Manager And With Inverse" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
819 (emit cm32andn (f-rd 0) rs rt)
822 (dnmi m-cm32or "Counter Manager Or" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
824 (emit cm32or (f-rd 0) rs rt)
827 (dnmi m-cm32ra "Counter Manager 32-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
829 (emit cm32ra (f-rd 0) rs rt)
832 (dnmi m-cm32rd "Counter Manager 32-bit Rolling Decrement" (MACH10 USES-RT USES-RD NO-DIS)
834 (emit cm32rd (f-rd 0) rt)
837 (dnmi m-cm32ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD NO-DIS)
839 (emit cm32ri (f-rd 0) rt)
842 (dnmi m-cm32rs "Counter Manager 32-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
844 (emit cm32rs (f-rd 0) rs rt)
847 (dnmi m-cm32sa "Counter Manager 32-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
849 (emit cm32sa (f-rd 0) rs rt)
852 (dnmi m-cm32sd "Counter Manager 32-bit Saturating Decrement" (MACH10 USES-RT USES-RD NO-DIS)
854 (emit cm32sd (f-rd 0) rt)
857 (dnmi m-cm32si "Counter Manager 32-bit Saturating Increment" (MACH10 USES-RT USES-RD NO-DIS)
859 (emit cm32si (f-rd 0) rt)
862 (dnmi m-cm32ss "Counter Manager 32-bit Saturating Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
864 (emit cm32ss (f-rd 0) rs rt)
867 (dnmi m-cm32xor "Counter Manager Xor" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
869 (emit cm32xor (f-rd 0) rs rt)
872 (dnmi m-cm64clr "Counter Manager Clear" (MACH10 USES-RT USES-RD NO-DIS)
874 (emit cm64clr (f-rd 0) rt)
877 (dnmi m-cm64ra "Counter Manager 64-bit Rolling Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
879 (emit cm64ra (f-rd 0) rs rt)
882 (dnmi m-cm64rd "Counter Manager 64-bit Rolling Decrement" (MACH10 USES-RT USES-RD NO-DIS)
884 (emit cm64rd (f-rd 0) rt)
887 (dnmi m-cm64ri "Counter Manager 32-bit Rolling Increment" (MACH10 USES-RT USES-RD NO-DIS)
889 (emit cm64ri (f-rd 0) rt)
892 (dnmi m-cm64ria2 "Counter Manager 32/32 Rolling Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
894 (emit cm64ria2 (f-rd 0) rs rt)
897 (dnmi m-cm64rs "Counter Manager 64-bit Rolling Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
899 (emit cm64rs (f-rd 0) rs rt)
902 (dnmi m-cm64sa "Counter Manager 64-bit Saturating Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
904 (emit cm64sa (f-rd 0) rs rt)
907 (dnmi m-cm64sd "Counter Manager 64-bit Saturating Decrement" (MACH10 USES-RT USES-RD NO-DIS)
909 (emit cm64sd (f-rd 0) rt)
912 (dnmi m-cm64si "Counter Manager 64-bit Saturating Increment" (MACH10 USES-RT USES-RD NO-DIS)
914 (emit cm64si (f-rd 0) rt)
917 (dnmi m-cm64sia2 "Counter Manager 32/32 Saturating Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
919 (emit cm64sia2 (f-rd 0) rs rt)
922 (dnmi m-cm64ss "Counter Manager 64-bit Saturating Subtract" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
924 (emit cm64ss (f-rd 0) rs rt)
927 (dnmi m-cm128ria2 "Counter Manager 128-bit 64/64 Rolling Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
929 (emit cm128ria2 (f-rd 0) rs rt)
932 (dnmi m-cm128ria3 "Counter Manager 128-bit 32/32/64 Rolling Increment/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
933 "cm128ria3 $rs,$rt,${cm-3z}"
934 (emit cm128ria3 (f-rd 0) rs rt cm-3z)
937 (dnmi m-cm128ria4 "Counter Manager 128-bit 32/32/32/32 Rolling Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
938 "cm128ria4 $rs,$rt,${cm-4z}"
939 (emit cm128ria4 (f-rd 0) rs rt cm-4z)
942 (dnmi m-cm128sia2 "Counter Manager 128-bit 64/64 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
944 (emit cm128sia2 (f-rd 0) rs rt)
947 (dnmi m-cm128sia3 "Counter Manager 128-bit 32/32/64 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
948 "cm128sia3 $rs,$rt,${cm-3z}"
949 (emit cm128sia3 (f-rd 0) rs rt cm-3z)
952 (dnmi m-cm128sia4 "Counter Manager 128-bit 32/32/32/32 Saturating Inc/Add" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
953 "cm128sia4 $rs,$rt,${cm-4z}"
954 (emit cm128sia4 (f-rd 0) rs rt cm-4z)
957 (dnmi m-cmphdr "Get a Complete Header" (MACH10 NO-DIS)
959 (emit cmphdr (f-rd 0))
962 (dnmi m-dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RD USES-RT NO-DIS)
964 (emit dbd rd (f-rs 0) rt)
967 (dnmi m2-dbd "Deallocate a Data Buffer Pointer" (MACH10 USES-RT NO-DIS)
969 (emit dbd (f-rd 0) (f-rs 0) rt)
972 (dnmi m-dpwt "DSTN_PORT Write" (MACH10 USES-RS NO-DIS)
974 (emit dpwt (f-rd 0) rs)
977 (dnmi m-free "" (MACH10 USES-RS USES-RD NO-DIS)
979 (emit free (f-rd 0) rs)
982 ;(dnmi m-jal "jump and link, implied r31" (MACH10 USES-RT NO-DIS)
984 ; (emit jal (f-rt 31) jmptarg)
987 (dnmi m-lock "lock memory" (MACH10 USES-RT NO-DIS)
989 (emit lock (f-rd 0) rt)
992 (dnmi m-pkrla "Packet Release Absolute" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
994 (emit pkrla (f-rd 0) rs rt)
997 (dnmi m-pkrlac "Packet Release Absolute Continue" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
999 (emit pkrlac (f-rd 0) rs rt)
1002 (dnmi m-pkrlah "Packet Release Absolute and Hold" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1004 (emit pkrlah (f-rd 0) rs rt)
1007 (dnmi m-pkrlau "Packet Release Absolute Unconditional" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1009 (emit pkrlau (f-rd 0) rs rt)
1012 (dnmi m-pkrli "Packet Release Immediate" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
1013 "pkrli $rs,$rt,$bytecount"
1014 (emit pkrli (f-rd 0) rs rt bytecount)
1017 (dnmi m-pkrlic "Packet Release Immediate Continue" (MACH10 USES-RS USES-RT NO-DIS)
1018 "pkrlic $rs,$rt,$bytecount"
1019 (emit pkrlic (f-rd 0) rs rt bytecount)
1022 (dnmi m-pkrlih "Packet Release Immediate and Hold" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
1023 "pkrlih $rs,$rt,$bytecount"
1024 (emit pkrlih (f-rd 0) rs rt bytecount)
1027 (dnmi m-pkrliu "Packet Release Immediate Unconditional" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
1028 "pkrliu $rs,$rt,$bytecount"
1029 (emit pkrliu (f-rd 0) rs rt bytecount)
1032 (dnmi m-rba "Read Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1034 (emit rba (f-rd 0) rs rt)
1037 (dnmi m-rbal "Read Bytes Absolute and Lock" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1039 (emit rbal (f-rd 0) rs rt)
1042 (dnmi m-rbar "Read Bytes Absolute and Release" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1044 (emit rbar (f-rd 0) rs rt)
1047 (dnmi m-rbi "Read Bytes Immediate" (MACH10 USES-RS USES-RT NO-DIS)
1048 "rbi $rs,$rt,$bytecount"
1049 (emit rbi (f-rd 0) rs rt bytecount)
1052 (dnmi m-rbil "Read Bytes Immediate and Lock" (MACH10 USES-RS USES-RT NO-DIS)
1053 "rbil $rs,$rt,$bytecount"
1054 (emit rbil (f-rd 0) rs rt bytecount)
1057 (dnmi m-rbir "Read Bytes Immediate and Release" (MACH10 USES-RS USES-RT NO-DIS)
1058 "rbir $rs,$rt,$bytecount"
1059 (emit rbir (f-rd 0) rs rt bytecount)
1062 (dnmi m-swwr "Single Word Write" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1064 (emit swwr (f-rd 0) rs rt)
1067 (dnmi m-swwru "Single Word Write and Unlock" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1069 (emit swwru (f-rd 0) rs rt)
1072 (dnmi m-tstod "Test Header Buffer Order Dependency" (MACH10 USES-RS USES-RD NO-DIS)
1074 (emit tstod (f-rd 0) rs)
1077 (dnmi m-unlk "" (MACH10 USES-RT USES-RD NO-DIS)
1079 (emit unlk (f-rd 0) rt)
1082 (dnmi m-wba "Write Bytes Absolute" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1084 (emit wba (f-rd 0) rs rt)
1087 (dnmi m-wbac "Write Bytes Absolute Cacheable" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1089 (emit wbac (f-rd 0) rs rt)
1092 (dnmi m-wbau "Write Bytes Absolute and Unlock" (MACH10 USES-RS USES-RT USES-RD NO-DIS)
1094 (emit wbau (f-rd 0) rs rt)
1097 (dnmi m-wbi "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
1098 "wbi $rs,$rt,$bytecount"
1099 (emit wbi (f-rd 0) rs rt bytecount)
1102 (dnmi m-wbic "Write Bytes Immediate Cacheable" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
1103 "wbic $rs,$rt,$bytecount"
1104 (emit wbic (f-rd 0) rs rt bytecount)
1107 (dnmi m-wbiu "Write Bytes Immediate" (MACH10 USES-RD USES-RS USES-RT NO-DIS)
1108 "wbiu $rs,$rt,$bytecount"
1109 (emit wbiu (f-rd 0) rs rt bytecount)