-
Notifications
You must be signed in to change notification settings - Fork 0
/
the-aura-computer-architecture-part-ii.txt
2977 lines (1399 loc) · 111 KB
/
the-aura-computer-architecture-part-ii.txt
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
The AVRA Computer Architecture
Version 1.0
Part II: Instruction Descriptions
Document Version: DRAFT 2021-02-01
Marius Dahl
Copyright 2020-2021 Marius Dahl.
This document is released under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0).
A copy of the license can be found at:
https://creativecommons.org/licenses/by-sa/4.0/
Marius Dahl:
mariusdahl27@protonmail.com
The AVRA Computer Architecture:
• Part I: Architectural Concepts
• Part II: Instruction Descriptions
• Part III: Instruction Encoding Tables
The latest version of this document can be found at:
https://github.com/mariusdahl27/aura
────────
Contents
────────
1 Null Instructions
2 Architecture Version and Extension Instructions
3 Memory Access Instructions
4 Data Prefetch Instructions
5 Control Flow Instructions
6 Internal Interrupt Instructions
7 Imprecise Exception Management Instructions
8 Copy Instructions
9 Pack and Unpack Instructions
10 Integer Sign Manipulation Instructions
11 Integer Addition and Subtraction Instructions
12 Integer Multiplication Instructions
13 Integer Division Instructions
14 Integer Comparison Instructions
15 Bitwise Logic Instructions
16 Shift Instructions
17 Bit Field Extraction and Deposition Instructions
18 Bit Scatter and Gather Instructions
19 Bit Count Instructions
20 Register Selection Instructions
21 Atomic Memory Access Primitive Instructions
22 Memory Ordering Instructions
23 Element Extraction Instructions
24 Element Deposition Instructions
25 Broadcast Scalar Instructions
26 Element Permutation Instructions
27 Vector Selection Instructions
28 Vector Merge Instructions
29 Vector Conversion Instructions
30 Vector Integer Sign Manipulation Instructions
31 Vector Integer Addition and Subtraction Instructions
32 Vector Integer Multiplication Instructions
33 Vector Integer Division Instructions
34 Vector Integer Comparison Instructions
35 Vector Bitwise Logic Instructions
36 Vector Shift Instructions
37 Vector Bit Field Extraction and Deposition Instructions
38 Vector Bit Count Instructions
39 References
───────────
Conventions
───────────
Each section describes one or more instructions of similar function or purpose. An instruction may have its own description, or it may share a description with other instructions if they are sufficiently similar in function.
An instruction description consists of a list of instruction names, a list of instruction fields, the privilege level required to execute the instructions, and a detailed description of the instructions' effects.
There are two forms of instruction name―a mnemonic form in uppercase; and a descriptive form in title case. The instruction descriptions give the instruction name in mnemonic form, followed by the descriptive form.
An instruction field list is a comma-separated list of instruction fields. A list is shared between multiple instructions if the instructions share the same instruction fields.
Instruction fields that are register numbers state the register set that is referenced.
Instruction fields that are immediates or 'X' fields give the length of the field in bits as a number enclosed by parentheses.
Aura does not define any assembly language feature. The instruction names and instruction fields given in the instruction descriptions do not define any assembly language feature. It is expected that assembly languages will define their own mnemonics for the canonical instruction names listed in this document, and their own syntax for specifying the contents of instruction fields.
────────────────────
1 Null Instructions
────────────────────
• NULL30 Null 30
• NULL40 Null 40
• NULL50 Null 50
• NULL60 Null 60
Fields: None
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The stored-program computer instruction cycle is continued. There is a variant of this instruction for each of the 30-, 40-, 50-, and 60-bit instruction sizes. These instructions are intended to be used for padding instruction packages (filling some or all unused bits), and for patching machine code.
──────────────────────────────────────────────────
2 Architecture Version and Extension Instructions
──────────────────────────────────────────────────
• ARCHVER Architecture Version
Fields: SGPR[DA]
Privilege Level: Highest Privilege, See Description
Exceptions: INSUFFICIENT PRIVILEGE
Description:
Obtain the Aura version implemented by the processor. The Aura Version Identifier (AVI) is written to SGPR[DA], and '0' to CR[DA]. (Part I, Section 3.1, Aura Version Identifiers contains details on versioning.)
This instruction is privileged. Its privilege level is equal to the highest privilege level supported by a processor. This allows the Aura computer system to be virtualized.
• ARCHEXT Architecture Extension
Fields: SGPR[DA], GPR[SA]
Privilege Level: Highest Privilege, See Description
Exceptions: INSUFFICIENT PRIVILEGE
Description:
Check if the specified architecture extension is supported by the processor. A V2 vector in GPR[SA] specifies the architecture extension. The first element contains the Architecture Extension Namespace (AEN), the second element, the Architecture Extension Identifier (AEI). If the AEN and AEI are supported, '1' is written to SGPR[DA], otherwise '0' is written instead. '0' is always written to CR[DA].
This instruction is privileged. Its privilege level is equal to the highest privilege level supported by a processor. This allows the Aura computer system to be virtualized.
─────────────────────────────
3 Memory Access Instructions
─────────────────────────────
• LDWGW Load Word Addressed GPR Word
• LDOGW Load Octet Addressed GPR Word
• LDOGS Load Octet Addressed GPR Semi-Word
• LDOGSS Load Octet Addressed GPR Semi-Word and Sign-Extend
• LDOGQ Load Octet Addressed GPR Quadrant-Word
• LDOGQS Load Octet Addressed GPR Quadrant-Word and Sign-Extend
• LDOGB Load Octet Addressed GPR Bi-Octet
• LDOGBS Load Octet Addressed GPR Bi-Octet and Sign-Extend
• LDOGO Load Octet Addressed GPR Octet
• LDOGOS Load Octet Addressed GPR Octet and Sign-Extend
Fields: GPR[DA], GPR[SA], IA (16)
• LDWRW Load Word Addressed RNR Word
• LDORW Load Octet Addressed RNR Word
• LDORS Load Octet Addressed RNR Semi-Word
• LDORQ Load Octet Addressed RNR Quadrant-Word
• LDORB Load Octet Addressed RNR Bi-Octet
• LDORO Load Octet Addressed RNR Octet
Fields: RNR[DA], GPR[SA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: UNALIGNED PRIMARY MEMORY ADDRESS
Description:
A 128-bit memory address is computed: GPR[SA] contains a 128-bit base memory address, and the immediate IA, a 16-bit offset. A 128-bit offset is created by copying IA into bits 0—15, and IA[15] into bits 16—127. The base address and 128-bit offset are added, and the 128 low-order bits of the 129-bit sum are taken as the memory address.
The memory address is interpreted as a word address or an octet address, based on whether the instruction has the "Word Addressed" or "Octet Addressed" modifier, respectively.
If the memory address is interpreted as an octet address, it must be aligned according to the unit of data loaded by the instruction. If the memory address is unaligned, the primary memory is not read, and a precise exception (UNALIGNED PRIMARY MEMORY ADDRESS) is generated. This exception has a privilege level of 1 (Privileged).
The contents of the unit of data at the primary memory location identified by the memory address are read. If the unit of data is smaller than a word, it is zero-extended to 128 bits, or sign-extended, if the instruction has the "Sign-Extend" modifier. The result is written to GPR[DA] or RNR[DA]. If writing to a GPR, '0' is written to CR[DA].
• STWGW Store Word Addressed GPR Word
• STOGW Store Octet Addressed GPR Word
Fields: GPR[SA], GPR[SB], IA (16)
• STWRW Store Word Addressed RNR Word
• STORW Store Octet Addressed RNR Word
Fields: GPR[SA], RNR[SB], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: UNALIGNED PRIMARY MEMORY ADDRESS
Description:
A 128-bit memory address is computed: GPR[SA] contains a 128-bit base memory address, and the immediate IA, a 16-bit offset. A 128-bit offset is created by copying IA into bits 0—15, and IA[15] into bits 16—127. The base address and 128-bit offset are added, and the 128 low-order bits of the 129-bit sum are taken as the memory address.
The memory address is interpreted as a word address or an octet address, based on whether the instruction has the "Word Addressed" or "Octet Addressed" modifier, respectively.
If the memory address is interpreted as an octet address, it must be aligned according to the word. If the memory address is unaligned, the primary memory is not written, and a precise exception (UNALIGNED PRIMARY MEMORY ADDRESS) is generated. This exception has a privilege level of 1 (Privileged).
The contents of GPR[SB] or RNR[SB] are written to the word at the primary memory location identified by the memory address.
• LDOSGS Load Octet Addressed SGPR Semi-Word
• LDOSGQ Load Octet Addressed SGPR Quadrant-Word
• LDOSGQS Load Octet Addressed SGPR Quadrant-Word and Sign-Extend
• LDOSGB Load Octet Addressed SGPR Bi-Octet
• LDOSGBS Load Octet Addressed SGPR Bi-Octet and Sign-Extend
• LDOSGO Load Octet Addressed SGPR Octet
• LDOSGOS Load Octet Addressed SGPR Octet and Sign-Extend
Fields: SGPR[DA], GPR[SA], IA (16)
• LDOSRS Load Octet Addressed SRNR Semi-Word
• LDOSRQ Load Octet Addressed SRNR Quadrant-Word
• LDOSRB Load Octet Addressed SRNR Bi-Octet
• LDOSRO Load Octet Addressed SRNR Octet
Fields: SRNR[DA], GPR[SA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: UNALIGNED PRIMARY MEMORY ADDRESS
Description:
A 128-bit memory address is computed: GPR[SA] contains a 128-bit base memory address, and the immediate IA, a 16-bit offset. A 128-bit offset is created by copying IA into bits 0—15, and IA[15] into bits 16—127. The base address and 128-bit offset are added, and the 128 low-order bits of the 129-bit sum are taken as the memory address.
The memory address is interpreted as an octet address. It must be aligned according to the unit of data loaded by the instruction. If the memory address is unaligned, the primary memory is not read, and a precise exception (UNALIGNED PRIMARY MEMORY ADDRESS) is generated. This exception has a privilege level of 1 (Privileged).
The contents of the unit of data at the primary memory location identified by the memory address are read. If the unit of data is smaller than a word, it is zero-extended to 64 bits, or sign-extended, if the instruction the "Sign-Extend" modifier. The result is written to SGPR[DA] or SRNR[DA]. If writing to an SGPR, '0' is written to CR[DA].
• STOSGS Store Octet Addressed SGPR Semi-Word
• STOSGQ Store Octet Addressed SGPR Quadrant-Word
• STOSGB Store Octet Addressed SGPR Bi-Octet
• STOSGO Store Octet Addressed SGPR Octet
Fields: GPR[SA], IA (16), SGPR[SB]
• STOSRS Store Octet Addressed SRNR Semi-Word
• STOSRQ Store Octet Addressed SRNR Quadrant-Word
• STOSRB Store Octet Addressed SRNR Bi-Octet
• STOSRO Store Octet Addressed SRNR Octet
Fields: GPR[SA], IA (16), SRNR[SB]
Privilege Level: 0 (Unprivileged)
Exceptions: UNALIGNED PRIMARY MEMORY ADDRESS
Description:
A 128-bit memory address is computed: GPR[SA] contains a 128-bit base memory address, and the immediate IA, a 16-bit offset. A 128-bit offset is created by copying IA into bits 0—15, and IA[15] into bits 16―127. The base address and 128-bit offset are added, and the 128 low-order bits of the 129-bit sum are taken as the memory address.
The memory address is interpreted as an octet address. It must be aligned according to the unit of data stored by the instruction. If the memory address is unaligned, the primary memory is not written, and a precise exception (UNALIGNED PRIMARY MEMORY ADDRESS) is generated. This exception has a privilege level of 1 (Privileged).
The 8, 16, 32, or 64 low-order bits from SGPR[SB] or SRNR[SB] (based on whether the instruction has an "Octet", "Bi-Octet", "Quadrant-Word", or "Semi-Word" modifier, respectively) are written to the primary memory location identified by the memory address.
─────────────────────────────
4 Data Prefetch Instructions
─────────────────────────────
• PFW Prefetch Word Addressed
• PFO Prefetch Octet Addressed
Fields: GPR[SA], IA (16), XA (7)
• PFIW Prefetch Word Addressed Indirect Hint
• PFIO Prefetch Octet Addressed Indirect Hint
Fields: GPR[SA], IA (16), SGPR[SB]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
Attempt to prefetch the data from the primary memory in the manner specified by the prefetch hint. Whether or not the prefetch hint is acted upon, and what action(s) are performed in response to the prefetch hint if it is acted upon, is dependent on the processor implementation.
A 128-bit memory address is computed: GPR[SA] contains a 128-bit base memory address, and the immediate IA, a 16-bit offset. A 128-bit offset is created by copying IA into bits 0—15, and IA[15] into bits 16—127. The base address and 128-bit offset are added, and the 128 low-order bits of the 129-bit sum are taken as the memory address.
The memory address is interpreted as a word address or an octet address, based on whether the instruction has the "Word Addressed" or "Octet Addressed" modifier, respectively.
If the memory address is an octet address, it is assumed to reference a word―the four low-order bits in the memory address are always ignored.
The memory address identifies the word that must be prefetched if there is to be a prefetch. There is a prefetch if the prefetch hint states there should be a prefetch, and if the processor decides there should be a prefetch.
If any data is prefetched, the minimum amount of data that is prefetched is one word, the word identified by the memory address. The processor implementation may also prefetch any number of additional words at memory addresses before, after, or before and after the computed memory address.
The prefetch hint is specified by the 7-bit 'XA' field. If the instruction has the "Indirect Hint" modifier, the contents of SGPR[SB] provides the prefetch hint. The interpretation of the prefetch hint in SGPR[SB] depends on the processor implementation.
The definition of the 'XA' field is as follows:
• 0: No further accesses
• 1: Read once
• 2: Write once
• 3: Access many
All listed values are decimal numbers.
All other values are undefined and reserved. If a reserved and undefined value is used, no action is taken.
The "Indirect Hint" modifier is a mechanism that provides the means to exploit the specific data prefetch mechanisms of different processor implementations without requiring the program be modified.
────────────────────────────
5 Control Flow Instructions
────────────────────────────
• JI Jump Indirect
• JIPO Jump Indirect with Pop
Fields: GPR[SA]
• JIL Jump Indirect and Link
• JILPO Jump Indirect and Link with Pop
• JILPU Jump Indirect and Link with Push
• JILPOPU Jump Indirect and Link with Pop and Push
Fields: GPR[DA], GPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
GPR[SA] contains a 128-bit memory address that is written to the IPMAR. This memory address specifies the instruction package containing the instruction to be executed after the Jump Indirect instruction, and is interpreted as a word address. The instruction that will be executed after the Jump Indirect instruction is the first wholly contained instruction in the instruction package pointed to by the memory address in the IPMAR.
If the instruction has the "Link" modifier, the return address is written to GPR[DA], and '0' to CR[DA]. The return address is the memory address (a word address) of the instruction package following the instruction package that contains the Jump Indirect instruction.
If there is a "Pop", "Push", or "Pop and Push" hint, the processor is expected, but not required, to behave in the manner hinted. The "Pop" hint communicates to the processor that the software is returning from a previous jump. The return address is likely to be in the return address stack (RAS). The "Push" hint communicates to the processor that the software intends to return from the current jump in the future. The return address should be pushed onto the RAS. The "Pop and Push" hint communicates to the processor that both the "Pop" and "Push" are intended. These hints cause architecturally invisible and processor implementation-dependent behavior.
• JDB Jump Direct Backward
• JDF Jump Direct Forward
Fields: IA (16)
• JDLB Jump Direct and Link Backward
• JDLBPU Jump Direct and Link Backward With Push
• JDLF Jump Direct and Link Forward
• JDLFPU Jump Direct and Link Forward With Push
Fields: GPR[DA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
A 128-bit memory address called the 'jump address' is computed: The IPMAR contains a 128-bit base memory address, which specifies the location of the instruction package containing the Jump Direct instruction in the primary memory. A 128-bit offset is created by copying IA, a 16-bit immediate, into bits 0—15, and '0' into bits 16—127.
If the jump direction is backward, the 128-bit offset is subtracted from the base address. If the jump direction is forward, the 128-bit offset is incremented by '1', then added to the base address. The 128 low-order bits of the 129-bit difference or sum are taken as the jump address.
The jump address is a word address that specifies which instruction package contains the instruction to be executed after the Jump Indirect instruction.
The jump address is written to the IPMAR. The instruction that will be executed after the Jump Direct instruction is the first wholly contained instruction in the instruction package pointed to by the jump address.
If the instruction has the "Link" modifier, the return address is written to GPR[DA], and '0' to CR[DA]. The return address is the memory address (a word address) of the instruction package following the instruction package that contains the Jump Direct instruction.
If there is a "Push" hint, the processor is expected, but not required, to behave in the manner hinted. The "Push" hint communicates to the processor that the software intends to return from the current jump in the future. The return address should be pushed onto the return address stack. This hint causes architecturally invisible and processor implementation-dependent behavior.
• BBEZ Branch Backward on Equal To Zero
• BBNEZ Branch Backward on Not Equal To Zero
• BBLZ Branch Backward on Less Than To Zero
• BBLEZ Branch Backward on Less Than Or Equal To Zero
• BBGZ Branch Backward on Greater Than Zero
• BBGEZ Branch Backward on Greater Than Or Equal To Zero
• BFEZ Branch Forward on Equal To Zero
• BFNEZ Branch Forward on Not Equal To Zero
• BFLZ Branch Forward on Less Than To Zero
• BFLEZ Branch Forward on Less Than Or Equal To Zero
• BFGZ Branch Forward on Greater Than Zero
• BFGEZ Branch Forward on Greater Than Or Equal To Zero
Fields: GPR[SA], IA (16)
• BBEVNS SGPR Branch Backward on Even
• BBODDS SGPR Branch Backward on Odd
• BBEZS SGPR Branch Backward on Equal To Zero
• BBNEZS SGPR Branch Backward on Not Equal To Zero
• BBLZS SGPR Branch Backward on Less Than To Zero
• BBLEZS SGPR Branch Backward on Less Than Or Equal To Zero
• BBGZS SGPR Branch Backward on Greater Than Zero
• BBGEZS SGPR Branch Backward on Greater Than Or Equal To Zero
• BFEVNS SGPR Branch Forward on Even
• BFODDS SGPR Branch Forward on Odd
• BFEZS SGPR Branch Forward on Equal To Zero
• BFNEZS SGPR Branch Forward on Not Equal To Zero
• BFLZS SGPR Branch Forward on Less Than To Zero
• BFLEZS SGPR Branch Forward on Less Than Or Equal To Zero
• BFGZS SGPR Branch Forward on Greater Than Zero
• BFGEZS SGPR Branch Forward on Greater Than Or Equal To Zero
Fields: SGPR[SA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The branch is taken (the 'branch target address' is written to the IPMAR) if the condition specified by the instruction is true. If the branch is taken, the instruction that will be executed after the Branch instruction is the first wholly contained instruction in the instruction package pointed to by the branch target address. If the branch is not taken, the stored-program computer instruction cycle continues.
The even and odd conditions test whether the least-significant bit of SGPR[SA] is '0' or '1', respectively.
The remaining conditions perform a comparison between GPR[SA] and '0'. The contents of GPR[SA] are interpreted as a 128-bit signed integer. For those instructions that operate on a SGPR, the comparison is between SGPR[SA] and '0'. The contents of SGPR[SA] are interpreted as a 64-bit signed integer.
The branch target address is computed: The IPMAR contains a 128-bit base memory address, which specifies the location of the instruction package containing the Branch instruction in the primary memory. A 128-bit offset is created by copying IA, a 16-bit immediate, into bits 0—15, and '0' into bits 16—127.
If the branch direction is backward, the 128-bit offset is subtracted from the base address. If the branch direction is forward, the 128-bit offset is incremented by '1', then added to the base address. The 128 low-order bits of the 129-bit difference or sum are taken as the branch target address.
The branch target address is a word address that specifies which instruction package contains the instruction that is executed after the Jump Indirect instruction.
• BBE Branch Backward on Equal To
• BBNE Branch Backward on Not Equal To
• BBUL Branch Backward on Unsigned Less Than
• BBULE Branch Backward on Unsigned Less Than or Equal To
• BBSL Branch Backward on Signed Less Than
• BBSLE Branch Backward on Signed Less Than or Equal To
• BFE Branch Forward on Equal To
• BFNE Branch Forward on Not Equal To
• BFUL Branch Forward on Unsigned Less Than
• BFULE Branch Forward on Unsigned Less Than or Equal To
• BFSL Branch Forward on Signed Less Than
• BFSLE Branch Forward on Signed Less Than or Equal To
Fields: GPR[SA], GPR[SB], IA (16)
• BBES SGPR Branch Backward on Equal To
• BBNES SGPR Branch Backward on Not Equal To
• BBULS SGPR Branch Backward on Unsigned Less Than
• BBULES SGPR Branch Backward on Unsigned Less Than or Equal To
• BBSLS SGPR Branch Backward on Signed Less Than
• BBSLES SGPR Branch Backward on Signed Less Than or Equal To
• BFES SGPR Branch Forward on Equal To
• BFNES SGPR Branch Forward on Not Equal To
• BFULS SGPR Branch Forward on Unsigned Less Than
• BFULES SGPR Branch Forward on Unsigned Less Than or Equal To
• BFSLS SGPR Branch Forward on Signed Less Than
• BFSLES SGPR Branch Forward on Signed Less Than or Equal To
Fields: SGPR[SA], SGPR[SB], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The branch is taken (the 'branch target address' is written to the IPMAR) if the condition specified by the instruction is true. If the branch is taken, the instruction that will be executed after the Branch instruction is the first wholly contained instruction in the instruction package pointed to by the branch target address. If the branch is not taken, the stored-program computer instruction cycle continues.
The comparison is performed between the contents of GPR[SA] and GPR[SB], which are interpreted as 128-bit unsigned or signed integers, based on whether the instruction has the "Unsigned" or "Signed" modifier, respectively. For those instructions that operate on SGPRs, the comparison is performed between SGPR[SA] and SGPR[SB] instead, and likewise, their contents are interpreted as 64-bit unsigned or signed integers.
The branch target address is computed: The IPMAR contains a 128-bit base memory address, which specifies the location of the instruction package containing the Branch instruction in the primary memory. A 128-bit offset is created by copying IA, a 16-bit immediate, into bits 0—15, and '0' into bits 16—127.
If the branch direction is backward, the 128-bit offset is subtracted from the base address. If the branch direction is forward, the 128-bit offset is incremented by '1', then added to the base address. The 128 low-order bits of the 129-bit difference or sum are taken as the branch target address.
The branch target address is a word address that specifies which instruction package contains the instruction that is executed after the Branch instruction.
• BBCRF Branch Backward on Carry Register False
• BBCRT Branch Backward on Carry Register True
• BFCRF Branch Forward on Carry Register False
• BFCRT Branch Forward on Carry Register True
Fields: CR[SA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The branch is taken (the 'branch target address' is written to the IPMAR) if the value in CR[SA] is '0' or '1', based on whether the instruction has the "False" or "True" modifier, respectively. Any of the 128 CRs may be referenced. If the branch is taken, the instruction that will be executed after the Branch instruction is the first wholly containing instruction in the instruction package pointed to by the branch target address. If the branch is not taken, the stored-program computer instruction cycle continues.
The branch target address is computed: The IPMAR contains a 128-bit base memory address, which specifies the location of the instruction package containing the Branch instruction in the primary memory. A 128-bit offset is created by copying IA, a 16-bit immediate, into bits 0—15, and '0' into bits 16—127.
If the branch direction is backward, the 128-bit offset is subtracted from the base address. If the branch direction is forward, the 128-bit offset is incremented by '1', then added to the base address. The 128 low-order bits of the 129-bit difference or sum are taken as the branch target address.
The branch target address is a word address that specifies which instruction package contains the instruction that is executed after the Branch instruction.
──────────────────────────────────
6 Internal Interrupt Instructions
──────────────────────────────────
• CALL Call
• BREAK Break
Fields: None
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
An internal interrupt with a privilege level of 1 (Privileged) is generated. Both instructions are identical in function. CALL is intended to be used by unprivileged software to signal intervention from privileged software. BREAK is intended to be used by software to return to a debugger. Processor implementations may override the default intention of these instructions.
──────────────────────────────────────────────
7 Imprecise Exception Management Instructions
──────────────────────────────────────────────
• IEB Imprecise Exception Barrier
Fields: None
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
All instructions succeeding the IEB instruction will not modify any architectural state until it is known that all instructions preceding the IEB instruction will not generate any imprecise exceptions.
────────────────────
8 Copy Instructions
────────────────────
• CPYGZ Copy Immediate to GPR Zero-Extend
• CPYGO Copy Immediate to GPR One-Extend
Fields: GPR[DA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The 16-bit immediate IA is zero- or one-extended to 128 bits. The result is written to GPR[DA], and '0' to CR[DA].
• CPYSGZ Copy Immediate to SGPR Zero-Extend
• CPYSGO Copy Immediate to SGPR One-Extend
Fields: SGPR[DA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The 16-bit immediate IA is zero- or one-extended to 64 bits. The result is written to SGPR[DA], and '0' to CR[DA].
• CPYCZ Copy Zero to CR
• CPYCO Copy One to CR
Fields: CR[DA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
'0' or '1' is written to CR[DA]. Any of the 128 CRs can be referenced.
• CPYGG Copy GPR to GPR
Fields: GPR[DA], GPR[SA]
• CPYSGSG Copy SGPR to SGPR
Fields: SGPR[DA], SGPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The contents of GPR[SA] and CR[SA], or SGPR[SA] and CR[SA], are written to GPR[DA] and CR[DA], or SGPR[DA] and CR[DA] (respectively).
• CPYSGGZ Copy SGPR to GPR Zero-Extend
Fields: GPR[DA], SGPR[SA]
• CPYSGGS Copy SGPR to GPR Sign-Extend
Fields: GPR[DA], SGPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The contents of SGPR[SA] are zero- or sign-extended to 128 bits. The result is written to GPR[DA], and '0' to CR[DA].
• CPYSGC Copy SGPR to CR
Fields: CR[DA], SGPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The least-significant bit of SGPR[SA] is written to CR[DA]. Any of the 128 CRs can be referenced.
• CPYGR Copy GPR to RNR
Fields: RNR[DA], GPR[SA]
• CPYSGSR Copy SGPR to SRNR
Fields: SRNR[DA], SGPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The contents of GPR[SA] or SGPR[SA] are written to RNR[DA] or SRNR[DA], respectively.
• CPYCG Copy CR to GPR
Fields: GPR[DA], CR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
CR[SA] is zero-extended to 128 bits. The result is written to GPR[DA], and '0' to CR[DA]. Only the 64 CRs associated with the 64 GPRs can be referenced.
• CPYCSG Copy CR to SGPR
Fields: SGPR[DA], CR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
CR[SA] is zero-extended to 64 bits. The result is written to SGPR[DA], and '0' to CR[DA]. Any of the 128 CRs can be referenced.
• CPYRG Copy RNR to GPR
Fields: GPR[DA], RNR[SA]
• CPYSRSG Copy SRNR to SGPR
Fields: SGPR[DA], SRNR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
RNR[SA] or SRNR[SA] is written to GPR[DA] or SGPR[DA], respectively. '0' is written to CR[DA].
• CPYRR Copy RNR to RNR
Fields: RNR[DA], RNR[SA]
• CPYSRSR Copy SRNR to SRNR
Fields: SRNR[DA], SRNR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
RNR[SA] or SRNR[SA] is written to RNR[DA] or SRNR[DA], respectively.
───────────────────────────────
9 Pack and Unpack Instructions
───────────────────────────────
• PKCG Pack CR to GPR
Fields: GPR[DA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The 128 CRs are packed into a 128-bit bit vector. Each CR is mapped to the bit whose bit index has the same magnitude as its register number. The 128-bit vector is written to GPR[DA], and '0' to CR[DA].
• UNPKIGVM Unpack Immediate to GPR as Vector Mask
Fields: GPR[DA], IA (16)
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
Unpack a vector mask from the 16-bit immediate IA into a GPR. The i-th bit from IA is copied to bit i * 8 in GPR[DA]. The bits in GPR[DA] that did not receive a bit from IA are zeroed. 1'B0 is written to CR[DA].
UNPKIGVM is intended to be used with the VSELG and VSELR instructions. It is suitable for V2, V4, V8, and V16 vectors. If the vector type has few elements than there are bits in IA, any bits in IA that do not correspond to an element's least-significant bit have no effect, since the Vector Select instructions only examine the least-significant bit in each element to control the selection. These bits can be set to '0' when IA is specified for greater clarity.
• UNPKGC Unpack GPR to CR
Fields: GPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The 128-bit bit vector in GPR[SA] is unpacked. Each bit is mapped to the CR whose register number has the same magnitude as its bit index. The unpacked bits are written to their respective CRs.
──────────────────────────────────────────
10 Integer Sign Manipulation Instructions
──────────────────────────────────────────
• ABS Absolute Value
• NEG Negate
Fields: GPR[DA], GPR[SA]
• ABSS SGPR Absolute Value
• NEGS SGPR Negate
Fields: SGPR[DA], SGPR[SA]
Privilege Level: 0 (Unprivileged)
Exceptions: None
Description:
The contents of GPR[SA] or SGPR[SA] are interpreted as a signed integer. The absolute value of GPR[SA] or SGPR[SA], or its negation, is written to GPR[DA] or SGPR[DA]. '0' is written to CR[DA].
─────────────────────────────────────────────────
11 Integer Addition and Subtraction Instructions
─────────────────────────────────────────────────
• ADD Add
• SUB Subtract
Fields: GPR[DA], GPR[SA], GPR[SB]
• ADDZ Add Immediate Zero-Extend
• ADDO Add Immediate One-Extend
Fields: GPR[DA], GPR[SA], IA (16)
• ADDC Add With Carry
• SUBB Subtract With Borrow
Fields: GPR[DA], GPR[SA], GPR[SB], CR[SC]
Privilege Level: 0 (Unprivileged)
Exceptions: None