-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmips32r2.tex
655 lines (650 loc) · 35.3 KB
/
mips32r2.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
%
% Copyright (C) 2014-2022 Anders Sonmark
%
% Copying and distribution of this file, with or without modification,
% are permitted in any medium without royalty provided the copyright
% notice and this notice are preserved. This file is offered as-is,
% without any warranty.
%
\documentclass{sheet}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}
\usepackage[english]{babel}
\usepackage[a4paper, landscape, margin=.1in]{geometry}
\usepackage{amssymb}
\def\sheetheaderfont{\bfseries}
\def\sheettablefont{\footnotesize\sffamily}
\def\sheetheadercolor{black!10}
\def\sheetrowcolor{black!5}
\def\tabcolsep{2pt}
\def\arraystretch{1.3}
\defsheet{asmtable}{4}{|m{4.2em} m{5.0em}|X|m{0.7em}|}
\defsheet{asmtabledsp}{4}{|m{8.4em} m{3.7em}|X|m{0.7em}|}
\defsheet{asmtabledsp2}{4}{|m{10.2em} m{3.7em}|X|m{0.7em}|}
\defsheet{table-lX}{2}{|l X|}
\defsheet{table-llX}{3}{|l l X|}
\defsheet{table-llXr}{4}{|l l X r|}
\pagefooter{MIPS32r2 version 4 page \thepage}
\begin{document}
\begin{multicols}{3}
\raggedcolumns
\begin{center}
{\Large\bfseries MIPS32r2 Quick Reference}
\end{center}
%
\begin{table-lX}{Keys}
rx, ry, rz & General registers \\
AC0 & Accumulator register 0 (HI:LO) \\
i, p, s, rel, ptr, off & Immediate operand \\
ISA & ISA mode (0=MIPS32, 1=MIPS16e) \\
value$^{\pm}_{ }$ & Value is sign extended \\
value$^{\emptyset}_{ }$ & Value is zero extended \\
$\smul$ $\sdiv$ $\smod$ $\asr$ $\slt$ $\sge$ & Operation is signed \\
\end{table-lX}
%
\begin{asmtable}{Arithmetic Instructions}
ADD & rx, ry, rz & rx = ry $+$ rz & O \\
ADDI & rx, ry, i$^{ }_{16}$ & rx = ry $+$ i$^{\pm}_{ }$ & O \\
ADDIU & rx, ry, i$^{ }_{16}$ & rx = ry $+$ i$^{\pm}_{ }$ & \\
ADDU & rx, ry, rz & rx = ry $+$ rz & \\
DIV & rx, ry & AC0$^{ }_{63:32}$ = rx $\sdiv$ ry; AC0$^{ }_{31:0}$ = rx $\smod$ ry & \\
DIVU & rx, ry & AC0$^{ }_{63:32}$ = rx $\udiv$ ry; AC0$^{ }_{31:0}$ = rx $\umod$ ry & \\
MADD & rx, ry & AC0 = AC0 $+$ rx $\smul$ ry & \\
MADDU & rx, ry & AC0 = AC0 $+$ rx $\umul$ ry & \\
MSUB & rx, ry & AC0 = AC0 $-$ rx $\smul$ ry & \\
MSUBU & rx, ry & AC0 = AC0 $-$ rx $\umul$ ry & \\
MUL & rx, ry, rz & rx = ry $\smul$ rz & \\
MULT & rx, ry & AC0 = rx $\smul$ ry & \\
MULTU & rx, ry & AC0 = rx $\umul$ ry & \\
\textit{NEGU} & rx, ry & rx = 0 $-$ ry & \\
SUB & rx, ry, rz & rx = ry $-$ rz & O \\
SUBU & rx, ry, rz & rx = ry $-$ rz & \\
\end{asmtable}
%
\begin{asmtable}{Load and Store Instructions}
LB & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$]$^{\pm}_{8}$ & \\
LBU & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$]$^{\emptyset}_{8}$ & \\
LH & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$]$^{\pm}_{16}$ & \\
LHU & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$]$^{\emptyset}_{16}$ & \\
LL & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$]; LL = 1 & \\
LW & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$] & \\
LWL & rx, off$^{ }_{16}$(ry) & s=(ry$+$off$^{\pm}_{ }$)$^{ }_{1:0}$; rx$^{ }_{31:24-s\umul 8}$ = [ry $+$ off$^{\pm}_{ }$]$^{ }_{8+s\umul 8}$ & \\
LWR & rx, off$^{ }_{16}$(ry) & s=(ry$+$off$^{\pm}_{ }$)$^{ }_{1:0}$; rx$^{ }_{31-s\umul 8:0}$ = [ry $+$ off$^{\pm}_{ }$]$^{ }_{32-s\umul 8}$ & \\
SB & rx, off$^{ }_{16}$(ry) & [ry $+$ off$^{\pm}_{ }$]$^{ }_{8}$ = rx$^{ }_{7:0}$ & \\
SC & rx, off$^{ }_{16}$(ry) & if(atomic) [ry $+$ off$^{\pm}_{ }$]=rx; rx=1; else rx=0 & \\
SH & rx, off$^{ }_{16}$(ry) & [ry $+$ off$^{\pm}_{ }$]$^{ }_{16}$ = rx$^{ }_{15:0}$ & \\
SW & rx, off$^{ }_{16}$(ry) & [ry $+$ off$^{\pm}_{ }$] = rx & \\
SWL & rx, off$^{ }_{16}$(ry) & s=(ry$+$off$^{\pm}_{ }$)$^{ }_{1:0}$; [ry $+$ off$^{\pm}_{ }$]$^{ }_{8+s\umul 8}$ = rx$^{ }_{31:24-s\umul 8}$ & \\
SWR & rx, off$^{ }_{16}$(ry) & s=(ry$+$off$^{\pm}_{ }$)$^{ }_{1:0}$; [ry $+$ off$^{\pm}_{ }$]$^{ }_{32-s\umul 8}$ = rx$^{ }_{31-s\umul 8:0}$ & \\
\textit{ULW} & rx, off$^{ }_{16}$(ry) & rx = [ry $+$ off$^{\pm}_{ }$]$^{unaligned}_{ }$ & \\
\textit{USW} & rx, off$^{ }_{16}$(ry) & [ry $+$ off$^{\pm}_{ }$]$^{unaligned}_{ }$ = rx & \\
\end{asmtable}
%
\begin{asmtable}{Bitwise Instructions}
AND & rx, ry, rz & rx = ry \& rz & \\
ANDI & rx, ry, i$^{ }_{16}$ & rx = ry \& i$^{\emptyset}_{ }$ & \\
CLO & rx, ry & rx = CountLeadingOnes(ry) & \\
CLZ & rx, ry & rx = CountLeadingZeros(ry) & \\
EXT & rx, ry, p, s & rx = ry$^{\emptyset}_{p+s-1:p}$ & 2 \\
INS & rx, ry, p, s & rx$^{ }_{p+s-1:p}$ = ry$^{ }_{s-1:0}$ & 2 \\
NOR & rx, ry, rz & rx = $\sim$(ry | rz) & \\
\textit{NOT} & rx, ry & rx = $\sim$ry & \\
OR & rx, ry, rz & rx = ry | rz & \\
ORI & rx, ry, i$^{ }_{16}$ & rx = ry | i$^{\emptyset}_{ }$ & \\
ROTR & rx, ry, i$^{ }_{5}$ & rx = ry $\ror$ i & \\
ROTRV & rx, ry, rz & rx = ry $\ror$ rz$^{ }_{4:0}$ & \\
SLL & rx, ry, i$^{ }_{5}$ & rx = ry $\lsl$ i & \\
SLLV & rx, ry, rz & rx = ry $\lsl$ rz$^{ }_{4:0}$ & \\
SRA & rx, ry, i$^{ }_{5}$ & rx = ry $\asr$ i & \\
SRAV & rx, ry, rz & rx = ry $\asr$ rz$^{ }_{4:0}$ & \\
SRL & rx, ry, i$^{ }_{5}$ & rx = ry $\lsr$ i & \\
SRLV & rx, ry, rz & rx = ry $\lsr$ rz$^{ }_{4:0}$ & \\
WSBH & rx, ry & rx = ry$^{ }_{23:16}$:ry$^{ }_{31:24}$:ry$^{ }_{7:0}$:ry$^{ }_{15:8}$ & 2 \\
XOR & rx, ry, rz & rx = ry $\oplus$ rz & \\
XORI & rx, ry, i$^{ }_{16}$ & rx = ry $\oplus$ i$^{\emptyset}_{ }$ & \\
\end{asmtable}
%
\begin{asmtable}{Jump and Branch Instructions}
\textit{B} & rel$^{ }_{18}$ & PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
\textit{BAL} & rel$^{ }_{18}$ & RA = PC$+$8; PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BEQ & rx, ry, rel$^{ }_{18}$ & if (rx $=$ ry) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
\textit{BEQZ} & rx, rel$^{ }_{18}$ & if (rx $=$ 0) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BGEZ & rx, rel$^{ }_{18}$ & if (rx$^{ }_{31}$ $=$ 0) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BGEZAL & rx, rel$^{ }_{18}$ & if (rx$^{ }_{31}$ $=$ 0) RA = PC$+$8; PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BGTZ & rx, rel$^{ }_{18}$ & if (rx$^{ }_{31}$ $=$ 0 \&\& rx $\ne$ 0) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BLEZ & rx, rel$^{ }_{18}$ & if (rx$^{ }_{31}$ $=$ 1 || rx $=$ 0) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BLTZ & rx, rel$^{ }_{18}$ & if (rx$^{ }_{31}$ $=$ 1) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BLTZAL & rx, rel$^{ }_{18}$ & if (rx$^{ }_{31}$ $=$ 1) RA = PC$+$8; PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
BNE & rx, ry, rel$^{ }_{18}$ & if (rx $\ne$ ry) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
\textit{BNEZ} & rx, rel$^{ }_{18}$ & if (rx $\ne$ 0) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & D \\
J & ptr$^{ }_{28}$ & PC = PC$^{ }_{31:29}$:ptr$^{ }_{28:2}$:0$^{ }_{1:0}$ & D \\
JAL & ptr$^{ }_{28}$ & RA=PC$+$8; PC=PC$^{ }_{31:29}$:ptr$^{ }_{28:2}$:0$^{ }_{1:0}$ & D \\
JALX & ptr$^{ }_{28}$ & ISA=1; RA=PC$+$8; PC=PC$^{ }_{31:29}$:ptr$^{ }_{28:2}$:0$^{ }_{1:0}$ & D \\
JALR & rx, ry & rx=PC$+$8; ISA=ry$^{ }_{0}$; PC=ry$^{ }_{31:1}$:0 & D \\
\textit{JALR} & rx & RA=PC$+$8; ISA=rx$^{ }_{0}$; PC=rx$^{ }_{31:1}$:0 & D \\
JALR.HB & rx, ry & rx=PC$+$8; ISA=ry$^{ }_{0}$; PC=ry$^{ }_{31:1}$:0; ClrHazards & D \\
\textit{JALR.HB} & rx & RA=PC$+$8; ISA=rx$^{ }_{0}$; PC=rx$^{ }_{31:1}$:0; ClrHazards & D \\
JR & rx & ISA=rx$^{ }_{0}$; PC=rx$^{ }_{31:1}$:0 & D \\
JR.HB & rx & ISA=rx$^{ }_{0}$; PC=rx$^{ }_{31:1}$:0; ClrHazards & D \\
\end{asmtable}
%
\begin{asmtable}{Data Transfer Instructions}
\textit{LA} & rx, rel & rx = rel & \\
\textit{LI} & rx, i$^{ }_{32}$ & rx = i & \\
LUI & rx, i$^{ }_{16}$ & rx = i $\lsl$ 16 & \\
MFHI & rx & rx = AC0$^{ }_{63:32}$ & \\
MFLO & rx & rx = AC0$^{ }_{31:0}$ & \\
\textit{MOVE} & rx, ry & rx = ry & \\
MOVN & rx, ry, rz & if (rz $\ne$ 0) rx = ry & \\
MOVZ & rx, ry, rz & if (rz $=$ 0) rx = ry & \\
MTHI & rx & AC0$^{ }_{63:32}$ = rx & \\
MTLO & rx & AC0$^{ }_{31:0}$ = rx & \\
RDHWR & rx, ry & rx = HardwareRegister(ry) & 2 \\
SEB & rx, ry & rx = ry$^{\pm}_{7:0}$ & 2 \\
SEH & rx, ry & rx = ry$^{\pm}_{15:0}$ & 2 \\
SLT & rx, ry, rz & rx = (ry $\slt$ rz ? 1 : 0) & \\
SLTI & rx, ry, i$^{ }_{16}$ & rx = (ry $\slt$ i$^{\pm}_{ }$ ? 1 : 0) & \\
SLTIU & rx, ry, i$^{ }_{16}$ & rx = (ry $\ult$ i$^{\pm}_{ }$ ? 1 : 0) & \\
SLTU & rx, ry, rz & rx = (ry $\ult$ rz ? 1 : 0) & \\
\end{asmtable}
%
\begin{asmtable}{Control Instructions}
CACHE & i$^{ }_{5}$, off$^{ }_{16}$(rx) & CacheOperation(i, rx$+$off$^{\pm}_{ }$) & \\
EHB & & ExecutionHazardBarrier & \\
\textit{NOP} & & & \\
PAUSE & & While(LL $\ne$ 0) Wait & \\
PREF & i$^{ }_{5}$, off$^{ }_{16}$(ry) & PrefetchMemory(ry $+$ off$^{\pm}_{ }$) & \\
SSNOP & & SuperScalarNoOperation & \\
SYNC & stype$^{ }_{5}$ & SyncOperation(stype) & \\
SYNCI & off$^{ }_{16}$(rx) & SyncCacheLines(rx $+$ off$^{\pm}_{ }$) & 2 \\
\end{asmtable}
%
\begin{asmtable}{Trap Instructions}
BREAK & i$^{ }_{20}$ & Exception(Breakpoint) & \\
SYSCALL & code$^{ }_{20}$ & Exception(SystemCall) & \\
TEQ & rx, ry & if (rx $=$ ry) Exception(Trap) & \\
TEQI & rx, i$^{ }_{16}$ & if (rx $=$ i$^{\pm}_{ }$) Exception(Trap) & \\
TGE & rx, ry & if (rx $\sge$ ry) Exception(Trap) & \\
TGEI & rx, i$^{ }_{16}$ & if (rx $\sge$ i$^{\pm}_{ }$) Exception(Trap) & \\
TGEIU & rx, i$^{ }_{16}$ & if (rx $\uge$ i$^{\pm}_{ }$) Exception(Trap) & \\
TGEU & rx, ry & if (rx $\uge$ ry) Exception(Trap) & \\
TLT & rx, ry & if (rx $\slt$ ry) Exception(Trap) & \\
TLTI & rx, i$^{ }_{16}$ & if (rx $\slt$ i$^{\pm}_{ }$) Exception(Trap) & \\
TLTIU & rx, i$^{ }_{16}$ & if (rx $\ult$ i$^{\pm}_{ }$) Exception(Trap) & \\
TLTU & rx, ry & if (rx $\ult$ ry) Exception(Trap) & \\
TNE & rx, ry & if (rx $\ne$ ry) Exception(Trap) & \\
TNEI & rx, i$^{ }_{16}$ & if (rx $\ne$ i$^{\pm}_{ }$) Exception(Trap) & \\
\end{asmtable}
%
\begin{table-llX}{General Registers}
0 & ZERO & Always zero \\
1 & AT & \\
2..3 & V0..V1 & Function return value (usable by MIPS16e) \\
4..7 & A0..A3 & Function parameters (usable by MIPS16e) \\
8..15 & T0..T7 & Temporary \\
16..23 & S0..S7 & Must be preserved (S0..S1 usable by MIPS16e) \\
24..25 & T8..T9 & Temporary \\
26..27 & K0..K1 & Kernel use \\
28 & GP & Global pointer \\
29 & SP & Stack pointer \\
30 & FP/S8 & Stack frame pointer, must be preserved \\
31 & RA & Function return address \\
& PC & Program Counter \\
\end{table-llX}
%
\begin{table-llX}{Cache Operations}
0x00..0x03 & Index & (Writeback and) invalidate instr/data/3rd/2nd cache \\
0x04..0x07 & Index & Load tag instr/data/3rd/2nd cache \\
0x08..0x0B & Index & Store tag instr/data/3rd/2nd cache \\
0x10..0x13 & Address & Invalidate instr/data/3rd/2nd cache \\
0x14 & Address & Fill instruction cache \\
0x15..0x17 & Address & Writeback and invalidate data/3rd/2nd cache \\
0x19..0x1B & Address & Writeback data/3rd/2nd cache \\
0x1C..0x1D & Address & Fetch and lock instruction/data cache \\
\end{table-llX}
%
\begin{table-llX}{Memory Map}
0x00000000-0x7FFFFFFF & useg & User mapped cacheable \\
0x80000000-0x9FFFFFFF & kseg0 & Kernel unmapped cacheable \\
0xA0000000-0xBFFFFFFF & kseg1 & Kernel unmapped uncacheable \\
0xC0000000-0xDFFFFFFF & ksseg & Supervisor and kernel mapped cacheable \\
0xE0000000-0xFFFFFFFF & kseg3 & Kernel mapped cacheable \\
\end{table-llX}
%
\begin{table-lX}{RDHWR Register Numbers}
0 & Number of current CPU \\
1 & Address step size to be used with SYNCI instruction \\
2 & High-resolution cycle counter \\
3 & Resolution of the cycle counter \\
29 & User local register \\
\end{table-lX}
%
\begin{table-lX}{Notes}
2 & Only available on MIPS32 Release 2. \\
D & Delay slot of one instruction before jump is executed. \\
O & Exception without modifying the destination register on signed overflow. \\
R & reglist=\{RA,S0,S1\} If extended, reglist=\{RA,A0-A3,S0-S8\} \\
S & The shift count may be 1..8. Extendable to 0..31. \\
X & Immediate can be extended by up to 11 bits (max 16 bits total). \newline The extended immediate is unsigned for CMPI and LI, otherwise signed. \\
\end{table-lX}
%
\begin{asmtable}{Privileged Instructions}
DI & \{rx\} & rx = STATUS; STATUS$^{ }_{IE}$ = 0 & 2 \\
DERET & & DebugExceptionReturn & \\
EI & \{rx\} & rx = STATUS; STATUS$^{ }_{IE}$ = 1 & 2 \\
ERET & & ExceptionReturn & \\
MFC0 & rx, i$^{ }_{5}$, j$^{ }_{3}$ & rx = Coprocessor0Register[i, j] & \\
MTC0 & rx, i$^{ }_{5}$, j$^{ }_{3}$ & Coprocessor0Register[i, j] = rx & \\
RDPGPR & rx, ry & rx = PreviousShadowSet(ry) & 2 \\
SDBBP & code$^{ }_{20}$ & SoftwareDebugBreakpoint & \\
TLBP & & TlbIndex = FindTlbEntry(EntryHi) & \\
TLBR & & Entry:PageMask = TlbEntry[TlbIndex] & \\
TLBWI & & TlbEntry[TlbIndex] = Entry:PageMask & \\
TLBWR & & TlbEntry[TlbRandom] = Entry:PageMask & \\
WAIT & & Wait for interrupt or external request & \\
WRPGPR & rx, ry & PreviousShadowSet(rx) = ry & 2 \\
\end{asmtable}
%
\begin{asmtable}{MIPS16e Load and Store Instructions}
LB & rx, i$^{ }_{5}$(ry) & rx = [ry $+$ i$^{\emptyset}$]$^{\pm}_{8}$ & X \\
LBU & rx, i$^{ }_{5}$(ry) & rx = [ry $+$ i$^{\emptyset}$]$^{\emptyset}_{8}$ & X \\
LH & rx, i$^{ }_{6}$(ry) & rx = [ry $+$ i$^{\emptyset}_{5:1}$:0]$^{\pm}_{16}$ & X \\
LHU & rx, i$^{ }_{6}$(ry) & rx = [ry $+$ i$^{\emptyset}_{5:1}$:0]$^{\emptyset}_{16}$ & X \\
LW & rx, i$^{ }_{7}$(ry) & rx = [ry $+$ i$^{\emptyset}_{6:2}$:0$^{ }_{1:0}$] & X \\
LW & rx, i$^{ }_{10}$(PC) & rx = [PC$^{ }_{31:2}$:0$^{ }_{1:0}$ $+$ i$^{\emptyset}_{9:2}$:0$^{ }_{1:0}$] & X \\
LW & rx, i$^{ }_{10}$(SP) & rx = [SP $+$ i$^{\emptyset}_{9:2}$:0$^{ }_{1:0}$] & X \\
SB & rx, i$^{ }_{5}$(ry) & [ry $+$ i$^{\emptyset}_{ }$]$^{ }_{8}$ = rx$^{ }_{8}$ & X \\
SH & rx, i$^{ }_{6}$(ry) & [ry $+$ i$^{\emptyset}_{5:1}$:0]$^{ }_{16}$ = rx$^{ }_{16}$ & X \\
SW & rx, i$^{ }_{7}$(ry) & [ry $+$ i$^{\emptyset}_{6:2}$:0$^{ }_{1:0}$] = rx & X \\
SW & rx, i$^{ }_{10}$(SP) & [SP $+$ i$^{\emptyset}_{9:2}$:0$^{ }_{1:0}$] = rx & X \\
SW & RA, i$^{ }_{10}$(SP) & [SP $+$ i$^{\emptyset}_{9:2}$:0$^{ }_{1:0}$] = RA & X \\
\end{asmtable}
%
\begin{asmtable}{MIPS16e Jump and Branch Instructions}
B & rel$^{ }_{12}$ & PC $+$= rel$^{\pm}_{11:1}$:0 & X \\
BEQZ & rx, rel$^{ }_{9}$ & if(rx $=$ 0) PC $+$= rel$^{\pm}_{8:1}$:0 & X \\
BNEZ & rx, rel$^{ }_{9}$ & if(rx $\ne$ 0) PC $+$= rel$^{\pm}_{8:1}$:0 & X \\
BREAK & i$^{ }_{6}$ & Breakpoint trap & X \\
BTEQZ & rel$^{ }_{9}$ & if(T8 $=$ 0) PC $+$= rel$^{\pm}_{8:1}$:0 & X \\
BTNEZ & rel$^{ }_{9}$ & if(T8 $\ne$ 0) PC $+$= rel$^{\pm}_{8:1}$:0 & \\
JAL & ptr$^{ }_{28}$ & RA=PC$+$5; PC=PC$^{ }_{31:28}$:ptr$^{ }_{27:2}$:0$^{ }_{1:0}$ & D \\
JALR & RA, rx & ISA=rx$^{ }_{0}$; RA=PC$+$5; PC=rx$^{ }_{31:1}$:0 & D \\
JALRC & RA, rx & ISA=rx$^{ }_{0}$; RA=PC$+$3; PC=rx$^{ }_{31:1}$:0 & \\
JALX & ptr$^{ }_{28}$ & ISA=0; RA=PC$+$5; PC=PC$^{ }_{31:28}$:ptr$^{ }_{27:2}$:0$^{ }_{1:0}$ & D \\
JR & rx & ISA=rx$^{ }_{0}$; PC = rx$^{ }_{31:1}$:0 & D \\
JR & RA & ISA=RA$^{ }_{0}$; PC = RA$^{ }_{31:1}$:0 & D \\
JRC & rx & ISA=rx$^{ }_{0}$; PC = rx$^{ }_{31:1}$:0 & \\
JRC & RA & ISA=RA$^{ }_{0}$; PC = RA$^{ }_{31:1}$:0 & \\
\textit{NOP} & & & \\
\end{asmtable}
%
\begin{asmtable}{MIPS16e Data Transfer Instructions}
\textit{LA} & rx, rel & rx = rel & \\
LI & rx, i$^{ }_{8}$ & rx = i$^{\emptyset}_{ }$ & X \\
MFHI & rx & rx = AC0$^{ }_{63:32}$ & \\
MFLO & rx & rx = AC0$^{ }_{31:0}$ & \\
MOVE & rx, r32 & rx = r32 & \\
MOVE & r32, ry & r32 = rx & \\
RESTORE & reglist, i$^{ }_{7}$ & SP $+$= i$^{ }_{6:2}$:0$^{ }_{1:0}$; reglist = [SP] & R \\
SAVE & reglist, i$^{ }_{7}$ & [SP] = reglist; SP $-$= i$^{ }_{6:2}$:0$^{ }_{1:0}$ & R \\
SEB & rx & rx = rx$^{\pm}_{7:0}$ & \\
SEH & rx & rx = rx$^{\pm}_{15:0}$ & \\
SLT & rx, ry & T8 = (rx $\slt$ ry ? 1 : 0) & \\
SLTI & rx, i$^{ }_{8}$ & T8 = (rx $\slt$ i$^{\emptyset}_{ }$ ? 1 : 0) & X \\
SLTIU & rx, i$^{ }_{8}$ & T8 = (rx $\ult$ i$^{\emptyset}_{ }$ ? 1 : 0) & X \\
SLTU & rx, ry & T8 = (rx $\ult$ ry ? 1 : 0) & \\
ZEB & rx & rx = rx$^{\emptyset}_{7:0}$ & \\
ZEH & rx & rx = rx$^{\emptyset}_{15:0}$ & \\
\end{asmtable}
%
\begin{asmtable}{MIPS16e Arithmetic Instructions}
ADDIU & rx, i$^{ }_{8}$ & rx = rx $+$ i$^{\pm}_{ }$ & X \\
ADDIU & rx, ry, i$^{ }_{4}$ & rx = ry $+$ i$^{\pm}_{ }$ & X \\
ADDIU & rx, PC, i$^{ }_{10}$ & rx = PC $+$ i$^{\emptyset}_{9:2}$:0$^{ }_{1:0}$ & \\
ADDIU & SP, i$^{ }_{11}$ & SP = SP $+$ i$^{\pm}_{10:3}$:0$^{ }_{2:0}$ & X \\
ADDIU & rx, SP, i$^{ }_{10}$ & rx = SP $+$ i$^{\emptyset}_{9:2}$:0$^{ }_{1:0}$ & \\
ADDU & rx, ry, rz & rx = ry $+$ rz & \\
DIV & rx, ry & AC0$^{ }_{31:0}$ = rx $\sdiv$ ry; AC0$^{ }_{63:32}$ = rx $\smod$ ry & \\
DIVU & rx, ry & AC0$^{ }_{31:0}$ = rx $\div$ ry; AC0$^{ }_{63:32}$ = rx $\umod$ ry & \\
MULT & rx, ry & AC0 = rx $\smul$ ry & \\
MULTU & rx, ry & AC0 = rx $\umul$ ry & \\
NEG & rx, ry & rx = 0 $-$ ry & \\
SUBU & rx, ry, rz & rx = ry $-$ rz & \\
\end{asmtable}
%
\begin{asmtable}{MIPS16e Bitwise Instructions}
AND & rx, ry & rx = rx \& ry & \\
CMP & rx, ry & T8 = rx $\oplus$ ry & \\
CMPI & rx, i$^{ }_{8}$ & T8 = rx $\oplus$ i$^{\emptyset}_{ }$ & X \\
NOT & rx, ry & rx = $\sim$ry & \\
OR & rx, ry & rx = rx | ry & \\
SLL & rx, ry, i$^{ }_{3}$ & rx = ry $\lsl$ i & S \\
SLLV & rx, ry & rx = rx $\lsl$ ry$^{ }_{4:0}$ & \\
SRA & rx, ry, i$^{ }_{3}$ & rx = ry $\asr$ i & S \\
SRAV & rx, ry & rx = rx $\asr$ ry$^{ }_{4:0}$ & \\
SRL & rx, ry, i$^{ }_{3}$ & rx = ry $\lsr$ i & S \\
SRLV & rx, ry & rx = rx $\lsr$ ry$^{ }_{4:0}$ & \\
XOR & rx, ry & rx = rx $\oplus$ ry & \\
\end{asmtable}
%
\newpage
\begin{center}
{\Large\bfseries MIPS32 DSP Module}
\end{center}
%
\begin{table-lX}{Keys for DSP Instructions}
ac & Accumulator register (AC0, AC1, AC2, or AC3). \\
cc & Condition code (EQ, LE, or LT). \\
a & A or S to add or subtract operand. \\
\_R & Result is rounded (one is added to MSB shifted out). \\
\_S & Result from each operation is saturated. (Signed for Q instructions, Unsigned for U instructions). \\
\_SA & Also saturate the final result (64bit for W instructions, 32bit for (P)H instructions). \\
c, ccond, pos, scount & Flags from DSP Control Register. \\
\end{table-lX}
%
\begin{asmtabledsp}{DSP Bitwise Instructions}
APPEND & rx, ry, i$^{ }_{5}$ & rx = rx$^{ }_{31-i:0}$:ry$^{ }_{i-1:0}$ & Q \\
BALIGN & rx, ry, i$^{ }_{2}$ & rx = rx$^{ }_{31-8i:0}$:ry$^{ }_{31:32-8i}$ & Q \\
BITREV & rx, ry & rx = ReverseBits(ry$^{ }_{15:0}$) & \\
EXTP & rx, ac, i$^{ }_{5}$ & rx = ac$^{\emptyset}_{pos:pos-i}$ & \\
EXTPDP & rx, ac, i$^{ }_{5}$ & rx = ac$^{\emptyset}_{pos:pos-i}$; pos $-$= (i$+$1) & \\
EXTPDPV & rx, ac, rz & rx = ac$^{\emptyset}_{pos:pos-rz^{ }_{4:0}}$; pos $-$= (rz$^{ }_{4:0}$$+$1) & \\
EXTPV & rx, ac, rz & rx = ac$^{\emptyset}_{pos:pos-rz^{ }_{4:0}}$ & \\
EXTR\{\_R\{S\}\}.W & rx, ac, i$^{ }_{5}$ & rx = ac $\asr$ i & \\
EXTR\_S.H & rx, ac, i$^{ }_{5}$ & rx = ac $\asr$ i & \\
EXTRV\{\_R\{S\}\}.W & rx, ac, rz & rx = ac $\asr$ rz$^{ }_{4:0}$ & \\
EXTRV\_S.H & rx, ac, rz & rx = ac $\asr$ rz$^{ }_{4:0}$ & \\
INSV & rx, ry & rx$^{ }_{pos+scount-1:pos}$ = ry$^{ }_{scount-1:0}$ & \\
MTHLIP & rx, ac & ac = ac$^{ }_{31:0}$:rx; pos $+$= 32 & \\
PREPEND & rx, ry, i$^{ }_{5}$ & rx = ry$^{ }_{i-1:0}$:rx$^{ }_{31:i}$ & Q \\
SHLL\{\_S\}.PH & rx, ry, i$^{ }_{5}$ & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\lsl$ i & \\
SHLL.QB & rx, ry, i$^{ }_{5}$ & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $\lsl$ i & \\
SHLL\_S.W & rx, ry, i$^{ }_{5}$ & rx = ry $\lsl$ i & \\
SHLLV\{\_S\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\lsl$ rz$^{ }_{3:0}$ & \\
SHLLV.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $\lsl$ rz$^{ }_{2:0}$ & \\
SHLLV\_S.W & rx, ry, rz & rx = ry $\lsl$ rz$^{ }_{4:0}$ & \\
SHRA\{\_R\}.PH & rx, ry, i$^{ }_{4}$ & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\asr$ i & \\
SHRA\{\_R\}.QB & rx, ry, i$^{ }_{3}$ & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $\asr$ i & Q \\
SHRA\_R.W & rx, ry, i$^{ }_{5}$ & rx = ry $\asr$ i & \\
SHRAV\{\_R\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\asr$ rz$^{ }_{3:0}$ & \\
SHRAV\{\_R\}.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $\asr$ rz$^{ }_{2:0}$ & Q \\
SHRAV\_R.W & rx, ry, rz & rx = ry $\asr$ rz$^{ }_{4:0}$ & \\
SHRL.PH & rx, ry, i$^{ }_{4}$ & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\lsr$ i & Q \\
SHRL.QB & rx, ry, i$^{ }_{3}$ & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $\lsr$ i & \\
SHRLV.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\lsr$ rz$^{ }_{3:0}$ & Q \\
SHRLV.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $\lsr$ rz$^{ }_{2:0}$ & \\
SHILO & ac, i$^{ }_{6}$ & ac = (i $\slt$ 0) ? (ac $\lsl$ -i) : (ac $\lsr$ i) & \\
SHILOV & ac, ry & ac=(ry$^{ }_{5:0}$$\slt$0)?(ac$\lsl$-ry$^{ }_{5:0}$):(ac$\lsr$ry$^{ }_{5:0}$) & \\
\end{asmtabledsp}
%
\begin{asmtabledsp2}{DSP Multiplication Instructions}
DPa.W.PH & ac, ry, rz & ac = ac $\pm$ (ry$^{ }_{H1}$$\smul$rz$^{ }_{H1}$ $+$ ry$^{ }_{H0}$$\smul$rz$^{ }_{H0}$) & Q \\
DPaQ\_S.W.PH & ac, ry, rz & ac = ac $\pm$ (ry$^{ }_{H1}$$\smul$rz$^{ }_{H1}$ $+$ ry$^{ }_{H0}$$\smul$rz$^{ }_{H0}$) & \\
DPaQ\_SA.L.W & ac, ry, rz & ac = ac $\pm$ ry $\smul$ rz & \\
DPaQX\_S\{A\}.W.PH & ac, ry, rz & ac = ac $\pm$ (ry$^{ }_{H1}$$\smul$rz$^{ }_{H0}$ $+$ ry$^{ }_{H0}$$\smul$rz$^{ }_{H1}$) & Q \\
DPaU.H.QBL & ac, ry, rz & ac = ac $\pm$ (ry$^{ }_{B3}$$\umul$rz$^{ }_{B3}$ $+$ ry$^{ }_{B2}$$\umul$rz$^{ }_{B2}$) & \\
DPaU.H.QBR & ac, ry, rz & ac = ac $\pm$ (ry$^{ }_{B1}$$\umul$rz$^{ }_{B1}$ $+$ ry$^{ }_{B0}$$\umul$rz$^{ }_{B0}$) & \\
DPaX.W.PH & ac, ry, rz & ac = ac $\pm$ (ry$^{ }_{H1}$$\smul$rz$^{ }_{H0}$ $+$ ry$^{ }_{H0}$$\smul$rz$^{ }_{H1}$) & Q \\
M\{ADD|SUB\} & ac, ry, rz & ac = ac $\pm$ ry $\smul$ rz & \\
M\{ADD|SUB\}U & ac, ry, rz & ac = ac $\pm$ ry $\umul$ rz & \\
MAQ\_S\{A\}.W.PHL & ac, ry, rz & ac = ac $+$ ry$^{ }_{H1}$ $\smul$ rz$^{ }_{H1}$ & \\
MAQ\_S\{A\}.W.PHR & ac, ry, rz & ac = ac $+$ ry$^{ }_{H0}$ $\smul$ rz$^{ }_{H0}$ & \\
MUL\{\_S\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$$\smul$rz$^{ }_{Hn}$ & Q \\
MULEQ\_S.W.PHL & rx, ry, rz & rx = ry$^{ }_{H1}$ $\smul$ rz$^{ }_{H1}$ & \\
MULEQ\_S.W.PHR & rx, ry, rz & rx = ry$^{ }_{H0}$ $\smul$ rz$^{ }_{H0}$ & \\
MULEU\_S.PH.QBL & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{B(2+n)}$ $\smul$ rz$^{ }_{Hn}$ & \\
MULEU\_S.PH.QBR & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Bn}$ $\smul$ rz$^{ }_{Hn}$ & \\
MULQ\_\{R\}S.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = (ry$^{ }_{Hn}$$\smul$rz$^{ }_{Hn}$)$^{ }_{30:15}$ & Q \\
MULQ\_\{R\}S.W & rx, ry, rz & rx = (ry $\smul$ rz)$^{ }_{62:31}$ & Q \\
MULSA.W.PH & ac, ry, rz & ac = ac $+$ ry$^{ }_{H1}$$\smul$rz$^{ }_{H1}$ $-$ ry$^{ }_{H0}$$\smul$rz$^{ }_{H0}$ & Q \\
MULSAQ\_S.W.PH & ac, ry, rz & ac = ac $+$ ry$^{ }_{H1}$$\smul$rz$^{ }_{H1}$ $-$ ry$^{ }_{H0}$$\smul$rz$^{ }_{H0}$ & \\
MULT & ac, ry, rz & ac = ry $\smul$ rz & \\
MULTU & ac, ry, rz & ac = ry $\umul$ rz & \\
\end{asmtabledsp2}
%
\begin{asmtabledsp2}{DSP Pack Instructions}
PACKRL.PH & rx, ry, rz & rx = ry$^{ }_{H0}$:rz$^{ }_{H1}$ & \\
PRECEQ.W.PHL & rx, ry & rx = ry$^{ }_{H1}$:0$^{ }_{16}$ & \\
PRECEQ.W.PHR & rx, ry & rx = ry$^{ }_{H0}$:0$^{ }_{16}$ & \\
PRECEQU.PH.QBL & rx, ry & rx = 0:ry$^{ }_{B3}$:0$^{ }_{8}$:ry$^{ }_{B2}$:0$^{ }_{7}$ & \\
PRECEQU.PH.QBLA & rx, ry & rx = 0:ry$^{ }_{B3}$:0$^{ }_{8}$:ry$^{ }_{B1}$:0$^{ }_{7}$ & \\
PRECEQU.PH.QBR & rx, ry & rx = 0:ry$^{ }_{B1}$:0$^{ }_{8}$:ry$^{ }_{B0}$:0$^{ }_{7}$ & \\
PRECEQU.PH.QBRA & rx, ry & rx = 0:ry$^{ }_{B2}$:0$^{ }_{8}$:ry$^{ }_{B0}$:0$^{ }_{7}$ & \\
PRECEU.PH.QBL & rx, ry & rx = 0$^{ }_{8}$:ry$^{ }_{B3}$:0$^{ }_{8}$:ry$^{ }_{B2}$ & \\
PRECEU.PH.QBLA & rx, ry & rx = 0$^{ }_{8}$:ry$^{ }_{B3}$:0$^{ }_{8}$:ry$^{ }_{B1}$ & \\
PRECEU.PH.QBR & rx, ry & rx = 0$^{ }_{8}$:ry$^{ }_{B1}$:0$^{ }_{8}$:ry$^{ }_{B0}$ & \\
PRECEU.PH.QBRA & rx, ry & rx = 0$^{ }_{8}$:ry$^{ }_{B2}$:0$^{ }_{8}$:ry$^{ }_{B0}$ & \\
PRECR.QB.PH & rx, ry, rz & rx = ry$^{ }_{B2}$:ry$^{ }_{B0}$:rz$^{ }_{B2}$:rz$^{ }_{B0}$ & Q \\
PRECR\_SRA\{\_R\}.PH.W & rx, ry, i$^{ }_{5}$ & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $\asr$ i & Q \\
PRECRQ\{\_RS\}.PH.W & rx, ry, rz & rx = ry$^{ }_{H1}$:rz$^{ }_{H1}$ & \\
PRECRQ.QB.PH & rx, ry, rz & rx = ry$^{ }_{B3}$:ry$^{ }_{B1}$:rz$^{ }_{B3}$:rz$^{ }_{B1}$ & \\
PRECRQU\_S.QB.PH & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = (ry:rz)$^{ }_{Hn}$ $\asr$ 7 & \\
REPL.PH & rx, i$^{ }_{10}$ & for(n=0..1) rx$^{ }_{Hn}$ = i$^{\pm}_{ }$ & \\
REPL.QB & rx, i$^{ }_{8}$ & for(n=0..3) rx$^{ }_{Bn}$ = i & \\
REPLV.PH & rx, ry & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{H0}$ & \\
REPLV.QB & rx, ry & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{B0}$ & \\
\end{asmtabledsp2}
%
\begin{asmtabledsp}{DSP Arithmetic Instructions}
ABSQ\_S.PH & rx, ry & for(n=0..1) rx$^{ }_{Hn}$ = ABS(ry$^{ }_{Hn}$) & \\
ABSQ\_S.QB & rx, ry & for(n=0..3) rx$^{ }_{Bn}$ = ABS(ry$^{ }_{Bn}$) & Q \\
ABSQ\_S.W & rx, ry & rx = ABS(ry) & \\
ADDQ\{\_S\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $+$ rz$^{ }_{Hn}$ & \\
ADDQ\_S.W & rx, ry, rz & rx = ry $+$ rz & \\
ADDQH\{\_R\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = (ry$^{ }_{Hn}$ $+$ rz$^{ }_{Hn}$) $\lsr$ 1 & Q \\
ADDQH\{\_R\}.W & rx, ry, rz & rx = (ry $+$ rz) $\lsr$ 1 & Q \\
ADDSC & rx, ry, rz & c:rx = ry $+$ rz & \\
ADDU\{\_S\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $+$ rz$^{ }_{Hn}$ & Q \\
ADDU\{\_S\}.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $+$ rz$^{ }_{Bn}$ & \\
ADDUH\{\_R\}.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = (ry$^{ }_{Bn}$ $+$ rz$^{ }_{Bn}$) $\lsr$ 1 & Q \\
ADDWC & rx, ry, rz & rx = ry $+$ rz $+$ c & \\
CMP.cc.PH & rx, ry & for(n=0..1) ccond$^{ }_{n}$ = rx$^{ }_{Hn}$ $\bar{\circ}$ ry$^{ }_{Hn}$ & \\
CMPGU.cc.QB & rx, ry, rz & rx=0; for(n=0..3) rx$^{ }_{n}$ = ry$^{ }_{Bn}$ $\circ$ rz$^{ }_{Bn}$ & \\
CMPGDU.cc.QB & rx, ry, rz & rx=0; f(n=0..3) rx$^{ }_{n}$=ccond$^{ }_{n}$=ry$^{ }_{Bn}$$\circ$rz$^{ }_{Bn}$ & Q \\
CMPU.cc.PH & rx, ry & for(n=0..1) ccond$^{ }_{n}$ = rx$^{ }_{Hn}$ $\circ$ ry$^{ }_{Hn}$ & \\
MODSUB & rx, ry, rz & rx = (ry $=$ 0) ? rz$^{\emptyset}_{23:8}$ : ry - rz$^{\emptyset}_{7:0}$ & \\
RADDU.W.QB & rx, ry & rx = ry$^{\emptyset}_{B3}$ $+$ ry$^{\emptyset}_{B2}$ $+$ ry$^{\emptyset}_{B1}$ $+$ ry$^{\emptyset}_{B0}$ & \\
SUBQ\{\_S\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $-$ rz$^{ }_{Hn}$ & \\
SUBQ\_S.W & rx, ry, rz & rx = ry $-$ rz & \\
SUBQH\{\_R\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = (ry$^{ }_{Hn}$ $-$ rz$^{ }_{Hn}$) $\lsr$ 1 & Q \\
SUBQH\{\_R\}.W & rx, ry, rz & rx = (ry $-$ rz) $\lsr$ 1 & Q \\
SUBU\{\_S\}.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = ry$^{ }_{Hn}$ $-$ rz$^{ }_{Hn}$ & Q \\
SUBU\{\_S\}.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = ry$^{ }_{Bn}$ $-$ rz$^{ }_{Bn}$ & \\
SUBUH\{\_R\}.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = (ry$^{ }_{Bn}$ $-$ rz$^{ }_{Bn}$) $\lsr$ 1 & Q \\
\end{asmtabledsp}
%
\begin{asmtabledsp}{DSP Data Transfer and Control Instructions}
BPOSGE32 & rel$^{ }_{18}$ & if (pos $\uge$ 32) PC $+$= rel$^{\pm}_{16:2}$:0$^{ }_{1:0}$ & \\
LBUX & rx, ry(rz) & rx = [ry $+$ rz]$^{\emptyset}_{8}$ & \\
LHX & rx, ry(rz) & rx = [ry $+$ rz]$^{\pm}_{16}$ & \\
LWX & rx, ry(rz) & rx = [ry $+$ rz] & \\
MFHI & rx, ac & rx = ac$^{ }_{63:32}$ & \\
MFLO & rx, ac & rx = ac$^{ }_{31:0}$ & \\
MTHI & rx, ac & ac$^{ }_{63:32}$ = rx & \\
MTLO & rx, ac & ac$^{ }_{31:0}$ = rx & \\
PICK.PH & rx, ry, rz & for(n=0..1) rx$^{ }_{Hn}$ = (ccond$^{ }_{n}$ ? ry : rz)$^{ }_{Hn}$ & \\
PICK.QB & rx, ry, rz & for(n=0..3) rx$^{ }_{Bn}$ = (ccond$^{ }_{n}$ ? ry : rz)$^{ }_{Bn}$ & \\
RDDSP & rx\{, i$^{ }_{10}$\} & rx = DSPC \& i & \\
WRDSP & rx\{, i$^{ }_{10}$\} & DSPC \& i = rx & \\
\end{asmtabledsp}
%
\begin{table-lX}{DSP Module Notes}
Q & Only available with DSP Module revision 2. \\
\end{table-lX}
%
\newpage
\begin{center}
{\Large\bfseries MIPS32 Coprocessor 0 Registers}
\end{center}
%
\begin{table-llXr}{General Registers}
UserLocal & 4, 2 & User information & \\
HWREna & 7, 0 & Enable access via RDHWR & \\
Count & 9, 0 & Processor cycle count & \\
Compare & 11, 0 & Timer interrupt control & \\
Status & 12, 0 & Processor status and control & \\
IntCtl & 12, 1 & Interrupt status and control & 2 \\
SRSCtl & 12, 2 & Shadow register set status and control & 2 \\
SRSMap & 12, 3 & Shadow set IPL mapping & \\
View\_IPL & 12, 4 & Contiguous view of IP and IPL fields & O \\
SRSMap2 & 12, 5 & Shadow set IPL mapping & O \\
View\_RIPL & 13, 4 & Contiguous view of IP and RIPL fields & O \\
PRId & 15, 0 & Processor identification and revision & R \\
CDMMBase & 15, 2 & Common device memory map base & O \\
CMGCRBase & 15, 3 & Coherency manager global control base & O \\
Config & 16, 0 & Configuration & \\
Config\{1..5\} & 16, \{1..5\} & Configuration & O \\
LLAddr & 17, 0 & Load linked address & O,R \\
WatchLo & 18, \{0..7\} & Watchpoint address & O \\
WatchHi & 19, \{0..7\} & Watchpoint control & O \\
PerfCnt & 25, \{0..7\} & Performance counter interface & \\
ErrCtl & 26, 0 & Parity/ECC error control and status & O \\
CacheErr & 27, \{0..3\} & Cache parity error control and status & O \\
Tag\{Lo,Hi\} & \{28,29\},\{even\} & Cache tag interface & \\
Data\{Lo,Hi\} & \{28,29\},\{odd\} & Cache data interface & \\
KScratch & 31, \{2..7\} & Scratch for kernel mode & O \\
\end{table-llXr}
%
\begin{table-llXr}{Status Register}
CU\{3..0\} & 0xF0000000 & Access to coprocessor \{3..0\} & \\
RP & 0x08000000 & Reduced power mode & O \\
FR & 0x04000000 & 64-bit floating point datatypes & 2 \\
RE & 0x02000000 & User mode uses reverse endianess & O \\
MX & 0x01000000 & Enable MDMX and DSP & O \\
BEV & 0x00400000 & Bootstrap exeception vectors & \\
TS & 0x00200000 & TLB has detected a match on multiple entries & \\
SR & 0x00100000 & Exception was due to a soft reset & \\
NMI & 0x00080000 & Exception was due to NMI & \\
ASE & 0x00040000 & Reserved for MCU ASE & O \\
IM\{7..0\} & 0x0000FF00 & Interrupt \{7..0\} enabled & O \\
IPL & 0x0000FC00 & Interrupt priority level & O \\
KSU & 0x00000018 & Base mode is \{Kernel,Supervisor,User,-\} mode & \\
ERL & 0x00000004 & Error level & \\
EXL & 0x00000002 & Exception level & \\
IE & 0x00000001 & Interrupt master enable & \\
\end{table-llXr}
%
\begin{table-llXr}{Virtual Memory Registers}
Index & 0, 0 & Index into the TLB array & \\
Random & 1, 0 & Randomly generated index into TLB & \\
EntryLo\{0,1\} & \{2,3\}, 0 & Low-order portion of \{even,odd\} TLB entry & \\
Context & 4, 0 & Pointer to entry in memory & \\
ContextConfig & 4, 1 & Context configuration & O \\
PageMask & 5, 0 & Page size in TLB entries & \\
PageGrain & 5, 1 & Control for small page support & O \\
SegCtl\{0..2\} & 5, \{2..4\} & Segment Control \{0..2\} & O \\
PWBase & 5, 5 & Page walker page table base address & O \\
PWField & 5, 6 & Page walker directory index positions & O \\
PWSize & 5, 7 & Page walker directory index widths & O \\
Wired & 6, 0 & Number of fixed TLB entries & \\
PWCtl & 6, 6 & Page walker control & O \\
EntryHi & 10, 0 & High-order portion of TLB entry & \\
\end{table-llXr}
%
%\begin{table-llXr}{TLB EntryLo Register}
%PFN & 0x3FFFFFC0 & Physical address bits 35..12 or 33..10 & \\
%C & 0x00000038 & Cacheability (2=Uncached, 3=Cacheable) & \\
%D & 0x00000004 & Dirty & \\
%V & 0x00000002 & Valid & \\
%G & 0x00000001 & Global & \\
%\end{table-llXr}
%
\begin{table-llXr}{Multi-Thread Registers}
MVPControl & 0, 1 & Per-processor global config data & \\
MVPConf\{0,1\} & 0, \{2,3\} & Per-processor multi-VPE dynamic config & R \\
VPEControl & 1, 1 & Per-VPE volatile thread config data & \\
VPEConf\{0,1\} & 1, \{2,3\} & Per-VPE config information & \\
YQMask & 1, 4 & Per-VPE which YIELD bits may be used & \\
VPESchedule & 1, 5 & Per-VPE scheduling & O \\
VPEScheFBack & 1, 6 & Per-VPE scheduling feedback & O \\
VPEOpt & 1, 7 & Per-VPE control optional features & O \\
TCStatus & 2, 1 & Per-TC status information & \\
TCBind & 2, 2 & Per-TC binding information & \\
TCRestart & 2, 3 & Per-TC restart instruction address & \\
TCHalt & 2, 4 & Per-TC control halt state & \\
TCContext & 2, 5 & Per-TC OS usage & \\
TCSchedule & 2, 6 & Per-TC scheduling & O \\
TCScheFBack & 2, 7 & Per-TC scheduling feedback & O \\
TCOpt & 3, 7 & Per-TC control optional features & O \\
SRSConf\{0..4\} & 6, \{1..5\} & Per-VPE control shadow register set & \\
\end{table-llXr}
%
\begin{table-llXr}{VZE Module Registers}
GuestCtl1 & 10, 4 & GuestID of virtualized guest & \\
GuestCtl2 & 10, 5 & Guest interrupt control & \\
GuestCtl3 & 10, 6 & Guest shadow register set control & \\
GuestCtl0Ext & 11, 4 & Control extension & \\
GuestCtl0 & 12, 6 & Control of virtualized guest OS & \\
GTOffset & 12, 7 & Guest timer offset & \\
\end{table-llXr}
%
\begin{table-lX}{Coprocessor 0 Notes}
2 & Only available on MIPS32 Release 2. \\
O & Optional feature. \\
R & Register or field is read only. \\
\end{table-lX}
%
\begin{table-llXr}{Exception Registers}
BadVAddr & 8, 0 & Address of exception & R \\
BadInstr\{,P\} & 8, \{1,2\} & \{Faulting,Prior branch\} instruction word & O,R \\
Cause & 13, 0 & Cause of general exception & \\
NestedExc & 13, 5 & EXL and ERL at current exception & O,R \\
EPC & 14, 0 & PC at exception & \\
NestedEPC & 14, 2 & Program counter at current exception & O \\
EBase & 15, 1 & Exception vector base & \\
ErrorEPC & 30, 0 & PC at last error & \\
\end{table-llXr}
%
\begin{table-llXr}{Cause Register}
BD & 0x80000000 & Exception taken in branch delay slot & R\\
TI & 0x40000000 & Timer interrupt pending & 2,R \\
CE & 0x30000000 & Coprocessor number & R\\
DC & 0x08000000 & Disable count register & 2 \\
PCI & 0x04000000 & Performance counter interrupt pending & 2,R \\
IV & 0x00800000 & Use special interrupt vector & \\
WP & 0x00400000 & Watch exception was deferred & R \\
FDCI & 0x00200000 & Fast debug channel interrupt pending & R \\
IP\{7..2\} & 0x0000FC00 & External interrupt \{5..0\} pending & R \\
IP\{1..0\} & 0x00000300 & Request software interrupt \{1..0\} & R \\
ExcCode & 0x0000007C & Exception code & R \\
\end{table-llXr}
%
\begin{table-llXr}{Exception Codes (ExcCode)}
Int & 0 & Interrupt & \\
Mod & 1 & TLB modification exception & \\
TLB\{L,S\} & 2,3 & TLB exception \{load/fetch,store\} & \\
AdE\{L,S\} & 4,5 & Address error exception \{load/fetch,store\} & \\
\{I,D\}BE & 6,7 & Bus error exception \{fetch,load/store\} & \\
Sys & 8 & Syscall exception & \\
Bp & 9 & Breakpoint exception & \\
R1 & 10 & Reserved instruction exception & \\
CpU & 11 & Coprocessor unusable exception & \\
Ov & 12 & Arithmetic overflow exception & \\
Tr & 13 & Trap exception & \\
\{MSA,\}FPE & 14,15 & \{MSA,\} floating point exception & \\
C2E & 18 & Coprocessor 2 exceptions & \\
TLB\{R,X\}I & 19,20 & TBL \{read,exception\}-inhibit exception & \\
MSADis & 21 & MSA disabled exception & \\
MDMX & 22 & MDMX unusable exception & \\
WATCH & 23 & Reference to WatchHi/WatchLo address & \\
MCheck & 24 & Machine check & \\
Thread & 25 & Thread exceptions & \\
DSPDis & 26 & DSP module state disabled exception & \\
GE & 27 & Virtualized guest exception & \\
CacheErr & 30 & Cache error & \\
\end{table-llXr}
%
%\begin{table-llXr}{EJTAG and PDtrace Registers}
%Debug\{,2\} & 23, \{0,6\} & EJTAG debug & \\
%TraceControl\{,2\} & 23, \{1,2\} & PDtrace control & \\
%UserTraceData1 & 23, 3 & PDtrace control & \\
%Trace\{I,D\}BPC & 23, \{4,5\} & PDtrace control & \\
%DEPC & 24, 0 & PC at EJTAG debug exception & \\
%TraceControl3 & 24, 2 & PDtrace control & \\
%UserTraceData2 & 24, 3 & PDtrace control & \\
%DESAVE & 31, 0 & EJTAG debug exception save & \\
%\end{table-llXr}
%
\end{multicols}
\end{document}