forked from dougallj/applegpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.html
1505 lines (1302 loc) · 337 KB
/
docs.html
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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Apple G13 GPU Architecture Reference</title>
<style>
body {
padding: 20px;
font-family: sans-serif;
}
table.opcodebits {
border-collapse: collapse;
text-align: center;
font-size: small;
margin-top: 6px;
margin-bottom: 6px;
display: inline-block;
vertical-align: top;
/* margin-left: auto; */
}
table.opcodebits thead td {
font-size: smaller; width: 18px;
}
table.opcodebits tbody {
border-left: 1px solid #000;
border-right: 1px solid #000;
}
table.opcodebits tbody td {
border-top: 1px solid #000;
border-bottom: 1px solid #000;
}
table.opcodebits td.left {
border-left: 1px solid #000;
}
table.opcodebits td.right {
border-right: 1px solid #000;
}
pre {
margin-left: 15px;
}
.unknown {
color: #ccc;
}
body.wrap .notwrapped {
display: none;
}
.wrapped {
display: none;
}
body.wrap .wrapped {
display: block;
}
div.wrapped {
direction: rtl;
text-align: left;
}
div.wrapped > table {
direction: ltr;
display: inline-block;
margin-right: -1px;
}
body.right .opcodewrapper {
text-align: right !important;
}
</style>
</head>
<script>
function update(){
if (document.getElementById("wrapcheckbox").checked){
document.body.classList.add('wrap');
} else {
document.body.classList.remove('wrap');
}
if (document.getElementById("rightcheckbox").checked){
document.body.classList.add('right');
} else {
document.body.classList.remove('right');
}
}
</script>
<body class="wrap">
<p>
This document attempts to describe the Apple G13 GPU architecture, as used
in the M1 SoC. This is based on reverse engineering and is likely to have mistakes.
The Metal Shading Language is typically used to program these GPUs,
and this document uses Metal terminology. For example a CPU <em>SIMD-lane</em>
is a Metal <em>thread</em>, and a CPU <em>thread</em> is a Metal <em>SIMD-group</em>.
</p>
<p>
The G13 architecture has 32 threads per SIMD-group. Each SIMD-group has a
stack pointer (<code>sp</code>), a program counter (<code>pc</code>), a 32-bit
execution mask (<code>exec_mask</code>), and up to 128 general purpose registers.
</p>
<p>
General purpose registers each store one 32-bit value per thread. Each register
can be accessed as a 32-bit register, named <code>r0</code> to <code>r127</code>,
the low 16-bits of the register <code>r0l</code> to <code>r127l</code>, or
the high 16-bits of the register <code>r0h</code> to <code>r127h</code>.
Some instructions may also use pairs of contiguous 32-bit registers to operate
on 64-bit values, and memory operations may use up to four contiguous 16 or
32-bit registers (in both cases, encoded as the first register).
</p>
<p>
A number of physical registers are allocated to each SIMD-group, and registers
from <code>r0</code> to <code>r(N-1)</code> may be used, but accesses to higher
register numbers are not valid, and may read or corrupt data from other
SIMD-groups. Using fewer registers (e.g. by using 16-bit types instead of
32-bit types) allows more SIMD-groups to fit in the physical register file
(higher occupancy), which improves performance.
</p>
<p>
Certain instructions are hardcoded to use early registers. <code>r0l</code>
tracks the execution mask stack, and <code>r1</code> is used as the link register.
</p>
<p>
Shared state is less well understood, but includes 256 32-bit uniform registers
named <code>u0</code> to <code>u255</code> and similarly accessible as their
16-bit halves, <code>u0l</code> to <code>u255h</code>. These are used for values
that are the same across all threads, such as <code>threads_per_grid</code>, or
addresses of buffers.
</p>
<h2>Conditional Execution</h2>
<p>
Each thread within a SIMD-group may be deactivated, meaning the values in registers
for that thread will keep their current value. Whether or not each thread is active
is tracked in a 32-bit execution mask (in this document, by convention, a one bit
indicates the thread is active and a zero bit indicates it is not).
</p>
<p>
<code>r0l</code> tracks the execution mask stack. When used with flow-control
instructions, the value in <code>r0l</code> indicates how many 'pop' operations
will be needed to re-enable an inactive thread, or zero if the thread is active.
</p>
<p>
The execution mask stack instructions (<code>pop_exec</code>, <code>if_*cmp</code>,
<code>else_*cmp</code> and <code>while_*cmp</code>) are typically used to manage
<code>r0l</code>. They also update <code>exec_mask</code> based on the value in
<code>r0l</code>, and are the only known way to manipulate <code>exec_mask</code>.
However, <code>r0l</code> may be manipulated with other instructions. It should
be initialised to zero prior to using execution mask stack instructions, and
<code>break</code> statements may be implemented by conditionally moving
a value (corresponding to the number of stack-levels to break out of) to
<code>r0l</code> and using a <code>pop_exec 0</code> (which deactivates any
threads that now have non-zero values in <code>r0l</code>).
</p>
<p>
The <code>jmp_exec_none</code> instruction may be used to jump over an <code>if</code>
statement body if no threads are active, and the <code>jmp_exec_any</code> may be used
to jump back to the start of the loop only if one or more threads are still executing
the loop.
</p>
<p>
Execution masking generally prevents reading or writing values from inactive threads,
however SIMD shuffle instructions can read from inactive threads in some cases, which
can be valuable for research or debugging purposes (e.g. it allows observing non-zero
values in <code>r0l</code>).
</p>
<h2>Register Cache</h2>
<p>The GPU has a register cache, which keeps the contents of recently used general
purpose registers more quickly accessible. When instructions read or write GPRs,
they usually allow hints for the access to be encoded. The <code>cache</code> hint,
on a source or destination operand, indicates the value will be used again,
and should be cached (meaning other values, where this hint was not used, will
be preferred for eviction). The <code>discard</code> hint (on a source operand)
invalidates the value in the register cache after all operands have been read,
without writing it back to the register file.</p>
<p>While the <code>cache</code> hint should only change performance, the
<code>discard</code> hint will make future reads undefined, which could
lead to confusing issues. <code>discard</code> should probably not
be used within conditional execution, as inactive threads within the SIMD-group
may contain data that has not been written back to the register file that would
probably also also get discarded. The behaviour of this hint when execution is
partially or completely masked has not been tested.</p>
<p>
Either hint may be used multiple times even if the same operand appears twice,
and <code>discard</code> on a source register can be used with <code>cache</code>
on the same destination register.
</p>
<h1>Instructions</h1>
<p>
Instructions vary in length in multiples of two bytes up to twelve bytes (so far).
Some instructions have a long and short encoding. This is indicated by a bit
<code>L</code>, which, if zero, indicates the last two (or four) bytes of the
instruction are omitted, and any bits within those bytes should be read as zero.
So far only 12-byte instructions omit the last four bytes, and all others omit
the last two.
</p>
<p>
The encodings are described in little-endian, meaning bytes go right-to-left
(and top-to-bottom), but bits may be read in the usual numerical order.
</p>
<p>
Behaviour is mostly described in a Python-like pseudocode for now. In operand
descriptions, the <code>:</code> operator describes bit concatenation, with
the most-significant fields first. Elsewhere, values are considered to be
Python-style arbitrary-precision integers, and floating-point values are
considered to be arbitrary-precision floats (although double-precision with
round-to-odd may be an adequate approximation).
</p>
<p>
<label for="wrapcheckbox">
<input type="checkbox" id="wrapcheckbox" onclick="update()" checked="checked">
Wrap bit diagrams
</label>
<br>
<label for="rightcheckbox">
<input type="checkbox" id="rightcheckbox" onclick="update()">
Right-align bit diagrams
</label>
</p>
<h2>Move Instructions</h2>
<h3>mov (Move 16-bit Immediate)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="1" class="left right">0</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="2" class="left right">Dt</td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="16" class="left right">imm16</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="16" class="left right">imm16</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="1" class="left right">0</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="2" class="left right">Dt</td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
D.broadcast_to_active(imm16)
</pre>
<h3>mov (Move 32-bit Immediate)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="1" class="left right">1</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="2" class="left right">Dt</td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="32" class="left right">imm32</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="32" class="left right">imm32</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="1" class="left right">1</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody><tfoot><tr><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="2" class="left right">Dt</td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td><td colspan="1" class=""></td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
D.broadcast_to_active(imm32)
</pre>
<h3>get_sr (Move From Special Register)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">SRx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="6" class="left right">SR</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">SRx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="6" class="left right">SR</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
SR = SReg32(SRx:SR)
for each active thread:
D[thread] = SR.read(thread)
</pre>
<h2>Integer Arithmetic Instructions</h2>
<h3>iadd (Integer Add or Subtract)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left right">s1</td><td colspan="1" class="left right">Bs</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left right">N</td><td colspan="1" class="left right">As</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">s2</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">s2</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="left right">s1</td><td colspan="1" class="left right">Bs</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left right">N</td><td colspan="1" class="left right">As</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst64(Dx:D, Dt)
A = AddSrc(Ax:A, At, As)
B = AddSrc(Bx:B, Bt, Bs)
shift = s2:s1
for each active thread:
a = A[thread]
b = B[thread]
saturating = (S == 1 and shift == 0 and A.thread_bit_size <= 32 and
B.thread_bit_size <= 32 and D.thread_bit_size <= 32)
if N == 1:
b = -b
if shift < 5:
b <<= shift
else:
b = 0
result = a + b
if saturating:
signed = (As == 1 or Bs == 1)
result = saturate_integer(result, D.thread_bit_size, signed)
D[thread] = result
</pre>
<h3>imadd (Integer Multiply-Add or Subtract)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left right">s1</td><td colspan="1" class="left right">Bs</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left right">N</td><td colspan="1" class="left right">As</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="2" class="left right">s2</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left right">Cs</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="2" class="left right">s2</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left right">Cs</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="1" class="left right">s1</td><td colspan="1" class="left right">Bs</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left right">N</td><td colspan="1" class="left right">As</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst64(Dx:D, Dt)
A = MulSrc(Ax:A, At, As)
B = MulSrc(Bx:B, Bt, Bs)
C = AddSrc(Cx:C, Ct, Cs)
shift = s2:s1
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
saturating = (S == 1 and shift == 0 and C.thread_bit_size <= 32 and
D.thread_bit_size <= 32)
if N == 1:
c = -c
if shift < 5:
c <<= shift
else:
c = 0
result = a * b + c
if saturating:
signed = (As == 1 or Bs == 1 or Cs == 1)
result = saturate_integer(result, D.thread_bit_size, signed)
D[thread] = result
</pre>
<h3>convert</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">srct</td><td colspan="6" class="left right">src</td><td colspan="2" class="left right">round</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="6" class="left right">mode</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">srcx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">srcx</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">srct</td><td colspan="6" class="left right">src</td><td colspan="2" class="left right">round</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="6" class="left right">mode</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
src = ALUSrc(srcx:src, srct)
TODO()
</pre>
<h2>Shift/Bitfield Instructions</h2>
<h3>bfi (Bitfield Insert/Shift Left)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
C = ALUSrc(Cx:C, Ct)
m = m3:m2:m1
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
shift_amount = (c & 0x7F)
if m == 0:
mask = 0xFFFFFFFF
else:
mask = (1 << m) - 1
result = (a & ~(mask << shift_amount)) | ((b & mask) << shift_amount)
D[thread] = result
</pre>
<h3>bfeil (Bitfield Extract and Insert Low/Shift Right)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
C = ALUSrc(Cx:C, Ct)
m = m3:m2:m1
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
shift_amount = (c & 0x7F)
if m == 0:
mask = 0xFFFFFFFF
else:
mask = (1 << m) - 1
result = (a & ~mask) | ((b >> shift_amount) & mask)
D[thread] = result
</pre>
<h3>extr (Extract From Register Pair)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
C = ALUSrc(Cx:C, Ct)
m = m3:m2:m1
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
shift_amount = (c & 0x7F)
if m == 0:
mask = 0xFFFFFFFF
else:
mask = (1 << m) - 1
result = (((b << 32) | a) >> shift_amount) & mask
D[thread] = result
</pre>
<h3>shlhi (Shift Left High and Insert)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
C = ALUSrc(Cx:C, Ct)
m = m3:m2:m1
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
shift_amount = (c & 0x7F)
if m == 0:
mask = 0xFFFFFFFF
else:
mask = (1 << m) - 1
shifted_mask = mask << max(shift_amount-32, 0)
result = (((b << shift_amount) >> 32) & shifted_mask) | (a & ~shifted_mask)
D[thread] = result
</pre>
<h3>shrhi (Shift Right High and Insert)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">m3</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">m2</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="2" class="left right">m1</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
C = ALUSrc(Cx:C, Ct)
m = m3:m2:m1
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
shift_amount = (c & 0x7F)
if m == 0:
mask = 0xFFFFFFFF
else:
mask = (1 << m) - 1
shifted_mask = (mask << 32) >> min(shift_amount, 32)
result = (((b << 32) >> shift_amount) & shifted_mask) | (a & ~shifted_mask)
D[thread] = result
</pre>
<h3>asr (Arithmetic Shift Right)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
for each active thread:
a = A[thread]
b = B[thread]
shift_amount = (b & 0x7F)
result = sign_extend(a, A.thread_bit_size) >> shift_amount
D[thread] = result
</pre>
<h3>asrh (Arithmetic Shift Right High)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">1</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">1</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
for each active thread:
a = A[thread]
b = B[thread]
shift_amount = (b & 0x7F)
result = (sign_extend(a, A.thread_bit_size) << 32) >> shift_amount
D[thread] = result
</pre>
<h2>Bit Manipulation Instructions</h2>
<h3>bitop (Bitwise Operation)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left right">tt3</td><td colspan="1" class="left right">tt2</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left right">tt1</td><td colspan="1" class="left right">tt0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="left right">tt3</td><td colspan="1" class="left right">tt2</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left right">tt1</td><td colspan="1" class="left right">tt0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
for each active thread:
a = A[thread]
b = B[thread]
if tt0 == tt1 and tt2 == tt3 and tt0 != tt2:
UNDEFINED()
result = a
else:
result = 0
if tt0: result |= ~a & ~b
if tt1: result |= a & ~b
if tt2: result |= ~a & b
if tt3: result |= a & b
D[thread] = result
</pre>
<h3>bitrev (Reverse Bits)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
for each active thread:
a = A[thread]
result = 0
i = 0
while i < 32:
if a & (1 << i):
result |= (1 << (31-i))
D[thread] = result
</pre>
<h3>popcount (Population Count)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
for each active thread:
a = A[thread]
result = 0
i = 0
while i < 32:
if a & (1 << i):
result += 1
D[thread] = result
</pre>
<h3>ffs (Find First Set)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="right">1</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">0</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
for each active thread:
a = A[thread]
result = -1
i = 31
while i >= 0:
if a & (1 << i):
result = i
break
i -= 1
D[thread] = result
</pre>
<h2>Floating-Point Arithmetic</h2>
<h3>fmadd (Floating-Point Fused Multiply-Add)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Cm</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Cm</td><td colspan="4" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
B = FloatSrc(Bx:B, Bt, Bm)
C = FloatSrc(Cx:C, Ct, Cm)
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
result = fused_multiply_add(a, b, c)
D[thread] = result
</pre>
<h3>fmadd16 (Half Precision Floating-Point Fused Multiply-Add)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Bm</td><td colspan="3" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Am</td><td colspan="3" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Cm</td><td colspan="3" class="left right">Ct</td><td colspan="6" class="left right">C</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Cx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Cm</td><td colspan="3" class="left right">Ct</td><td colspan="6" class="left right">C</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Bm</td><td colspan="3" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Am</td><td colspan="3" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst16(Dx:D, Dt, S)
A = FloatSrc16(Ax:A, At, Am)
B = FloatSrc16(Bx:B, Bt, Bm)
C = FloatSrc16(Cx:C, Ct, Cm)
for each active thread:
a = A[thread]
b = B[thread]
c = C[thread]
result = fused_multiply_add(a, b, c)
D[thread] = result
</pre>
<h3>fadd (Floating-Point Add)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
B = FloatSrc(Bx:B, Bt, Bm)
for each active thread:
a = A[thread]
b = B[thread]
result = fused_multiply_add(a, 1.0, b)
D[thread] = result
</pre>
<h3>fadd16 (Half Precision Floating-Point Add)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Bm</td><td colspan="3" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Am</td><td colspan="3" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Bm</td><td colspan="3" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Am</td><td colspan="3" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst16(Dx:D, Dt, S)
A = FloatSrc16(Ax:A, At, Am)
B = FloatSrc16(Bx:B, Bt, Bm)
for each active thread:
a = A[thread]
b = B[thread]
result = fused_multiply_add(a, 1.0, b)
D[thread] = result
</pre>
<h3>fmul (Floating-Point Multiply)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
B = FloatSrc(Bx:B, Bt, Bm)
for each active thread:
a = A[thread]
b = B[thread]
result = fused_multiply_add(a, b, 0.0)
D[thread] = result
</pre>
<h3>fmul16 (Half Precision Floating-Point Multiply)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Bm</td><td colspan="3" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Am</td><td colspan="3" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Bm</td><td colspan="3" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left right">?</td><td colspan="2" class="left right">Am</td><td colspan="3" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst16(Dx:D, Dt, S)
A = FloatSrc16(Ax:A, At, Am)
B = FloatSrc16(Bx:B, Bt, Bm)
for each active thread:
a = A[thread]
b = B[thread]
result = fused_multiply_add(a, b, 0.0)
D[thread] = result
</pre>
<h3>floor</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = floor(A[thread])
</pre>
<h3>ceil</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = ceil(A[thread])
</pre>
<h3>trunc</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = trunc(A[thread])
</pre>
<h3>rint</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">1</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = rint(A[thread])
</pre>
<h3>rcp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = reciprocal(A[thread])
</pre>
<h3>rsqrt</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">1</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">1</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = rsqrt(A[thread])
</pre>
<h3>rsqrt_special</h3>
<p>
<code>rsqrt_special</code> can be used to implement fast <code>sqrt</code> as
<code>rsqrt_special(x) * x</code>, by handling special-cases differently.
</p>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">1</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">1</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = rsqrt_special(A[thread])
</pre>
<h3>sin_pt_1</h3>
<p>
<code>sin_pt_1</code> is used together with <code>sin_pt_2</code> and
supporting ALU to compute the sine function. sin_pt_1 takes an angle
around the circle in the interval [0, 4) and produces an intermediate
result. This intermediate result is then passed to sin_pt_2, and the
two results are multipled to give sin. The argument reduction to [0, 4)
can be computed with a few ALU instructions: <code>reduce(x) = 4
fract(x / tau)</code>, where <code>tau</code> is the circle constant
formerly known as twice pi. Calculating cosine follows from the
identity <code>cos(x) = sin(x + tau/4)</code>. After multipling by
<code>1/tau</code>, the bias become 1/4 which can be added in the same
cycle via a fused multiply-add. Tangent should be lowered to a division
of sine and cosine.
</p>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = sin_pt_1(A[thread])
</pre>
<h3>sin_pt_2</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = sin_pt_2(A[thread])
</pre>
<h3>log2</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = log2(A[thread])
</pre>
<h3>exp2</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">1</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">1</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
for each active thread:
D[thread] = exp2(A[thread])
</pre>
<h3>dfdx</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
TODO()
</pre>
<h3>dfdy</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left right">S</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = FloatDst(Dx:D, Dt, S)
A = FloatSrc(Ax:A, At, Am)
TODO()
</pre>
<h2>Flow Control Instructions</h2>
<h3>ret</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="7" class="left right">reg32</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="7" class="left right">reg32</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
reg32 = Reg32(reg32)
TODO()
</pre>
<h3>stop</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
end_execution()
</pre>
<h3>trap</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
TODO()
</pre>
<h3>call</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="7" class="left right">reg32</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="7" class="left right">reg32</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
reg32 = Reg32(reg32)
TODO()
</pre>
<h3>jmp_incomplete</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="8" class="left right">off</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="8" class="left right">off</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
TODO()
</pre>
<h3>jmp_exec_any</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="32" class="left right">off</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="32" class="left right">off</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
if any(exec_mask):
next_pc = pc + sign_extend(off, 32)
</pre>
<h3>jmp_exec_none</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="32" class="left right">off</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="32" class="left right">off</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
if not any(exec_mask):
next_pc = pc + sign_extend(off, 32)
</pre>
<h3>call</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="32" class="left right">off</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="32" class="left right">off</td><td colspan="1" class="left">1</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
next_pc = pc + sign_extend(off, 32)
for each active thread:
r1 = pc + 6
</pre>
<h2>Execution Mask Stack Instructions</h2>
<h3>pop_exec</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">1</td><td colspan="1" class="right">1</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">1</td><td colspan="1" class="right">1</td><td colspan="1" class="unknown left right">?</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
for each thread:
v = D[thread]
v -= n
if v < 0:
v = 0
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h3>if_icmp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
cc = ICondition(cc, ccn)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
for each thread:
v = D[thread]
if v != 0:
v += n
elif not cc.compare(A[thread], B[thread]):
v = 1
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h3>if_fcmp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
cc = FCondition(cc, ccn)
A = FloatSrc(Ax:A, At, Am)
B = FloatSrc(Bx:B, Bt, Bm)
for each thread:
v = D[thread]
if v != 0:
v += n
elif not cc.compare(A[thread], B[thread]):
v = 1
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h3>while_icmp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
cc = ICondition(cc, ccn)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
for each thread:
v = D[thread]
if v < n:
if cc.compare(A[thread], B[thread]):
v = 0
else:
v = n
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h3>while_fcmp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">1</td><td colspan="1" class="right">0</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
cc = FCondition(cc, ccn)
A = FloatSrc(Ax:A, At, Am)
B = FloatSrc(Bx:B, Bt, Bm)
for each thread:
v = D[thread]
if v < n:
if cc.compare(A[thread], B[thread]):
v = 0
else:
v = n
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h3>else_icmp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
cc = ICondition(cc, ccn)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
for each thread:
v = D[thread]
if v == 0:
v = n
elif v == 1:
if cc.compare(A[thread], B[thread]):
v = 0
else:
v = 1
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h3>else_fcmp</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="1" class="left">0</td><td colspan="1" class="right">0</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Bm</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="2" class="left right">Am</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="3" class="left right">cc</td><td colspan="2" class="left right">n</td><td colspan="1" class="left">0</td><td colspan="1" class="right">1</td><td colspan="1" class="left right">ccn</td><td colspan="1" class="left right">Dt</td><td colspan="1" class="left">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
D = ImplicitR0L(Dt)
cc = FCondition(cc, ccn)
A = FloatSrc(Ax:A, At, Am)
B = FloatSrc(Bx:B, Bt, Bm)
for each thread:
v = D[thread]
if v == 0:
v = n
elif v == 1:
if cc.compare(A[thread], B[thread]):
v = 0
else:
v = 1
D[thread] = v
exec_mask[thread] = (v == 0)
</pre>
<h2>Select Instructions</h2>
<h3>icmpsel (Integer Compare and Select)</h3>
<div class="opcodewrapper wrapped"><table class="opcodebits"><thead><tr><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td></tr></thead><tbody><tr><td colspan="3" class="left right">cc</td><td colspan="3" class="left right">Yt</td><td colspan="6" class="left right">Y</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="3" class="left right">Xt</td><td colspan="6" class="left right">X</td></tr></tbody></table><table class="opcodebits"><thead><tr><td class="left">79</td><td>78</td><td>77</td><td>76</td><td>75</td><td>74</td><td>73</td><td class="right">72</td><td class="left">71</td><td>70</td><td>69</td><td>68</td><td>67</td><td>66</td><td>65</td><td class="right">64</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Xx</td><td colspan="2" class="left right">Yx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td></tr></tbody></table></div><div class="opcodewrapper notwrapped"><table class="opcodebits"><thead><tr><td class="left">79</td><td>78</td><td>77</td><td>76</td><td>75</td><td>74</td><td>73</td><td class="right">72</td><td class="left">71</td><td>70</td><td>69</td><td>68</td><td>67</td><td>66</td><td>65</td><td class="right">64</td><td class="left">63</td><td>62</td><td>61</td><td>60</td><td>59</td><td>58</td><td>57</td><td class="right">56</td><td class="left">55</td><td>54</td><td>53</td><td>52</td><td>51</td><td>50</td><td>49</td><td class="right">48</td><td class="left">47</td><td>46</td><td>45</td><td>44</td><td>43</td><td>42</td><td>41</td><td class="right">40</td><td class="left">39</td><td>38</td><td>37</td><td>36</td><td>35</td><td>34</td><td>33</td><td class="right">32</td><td class="left">31</td><td>30</td><td>29</td><td>28</td><td>27</td><td>26</td><td>25</td><td class="right">24</td><td class="left">23</td><td>22</td><td>21</td><td>20</td><td>19</td><td>18</td><td>17</td><td class="right">16</td><td class="left">15</td><td>14</td><td>13</td><td>12</td><td>11</td><td>10</td><td>9</td><td class="right">8</td><td class="left">7</td><td>6</td><td>5</td><td>4</td><td>3</td><td>2</td><td>1</td><td class="right">0</td></tr></thead><tbody><tr><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="2" class="left right">Dx</td><td colspan="2" class="left right">Ax</td><td colspan="2" class="left right">Bx</td><td colspan="2" class="left right">Xx</td><td colspan="2" class="left right">Yx</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="3" class="left right">cc</td><td colspan="3" class="left right">Yt</td><td colspan="6" class="left right">Y</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown">?</td><td colspan="1" class="unknown right">?</td><td colspan="3" class="left right">Xt</td><td colspan="6" class="left right">X</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">Bt</td><td colspan="6" class="left right">B</td><td colspan="1" class="unknown left">?</td><td colspan="1" class="unknown right">?</td><td colspan="4" class="left right">At</td><td colspan="6" class="left right">A</td><td colspan="1" class="left right">L</td><td colspan="6" class="left right">D</td><td colspan="2" class="left right">Dt</td><td colspan="1" class="left">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="">0</td><td colspan="1" class="">0</td><td colspan="1" class="">1</td><td colspan="1" class="right">0</td></tr></tbody></table></div>
<pre>
cc = ICondition(cc)
D = ALUDst(Dx:D, Dt)
A = ALUSrc(Ax:A, At)
B = ALUSrc(Bx:B, Bt)
X = CmpselSrc(Xx:X, Xt, Dt)
Y = CmpselSrc(Yx:Y, Yt, Dt)
for each active thread:
if cc.compare(A[thread], B[thread]):
D[thread] = X[thread]
else:
D[thread] = Y[thread]
</pre>