You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instr-encoding-unprivileged.adoc
+37-37Lines changed: 37 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Encoding::
20
20
]}
21
21
....
22
22
23
-
Description::
23
+
Description:: Adds rs1 and rs2, stores the result in rd
24
24
25
25
Arguments::
26
26
[%autowidth]
@@ -70,7 +70,7 @@ Encoding::
70
70
]}
71
71
....
72
72
73
-
Description::
73
+
Description:: Adds the sign-extended 12-bit immediate to rs1 and stores the result in rd
74
74
75
75
Arguments::
76
76
[%autowidth]
@@ -121,7 +121,7 @@ Encoding::
121
121
]}
122
122
....
123
123
124
-
Description::
124
+
Description:: Performs bitwise AND on rs1 and rs2, stores the result in rd
125
125
126
126
Arguments::
127
127
[%autowidth]
@@ -171,7 +171,7 @@ Encoding::
171
171
]}
172
172
....
173
173
174
-
Description::
174
+
Description:: Performs bitwise AND on rs1 and the sign-extended 12-bit immediate, stores the result in rd
175
175
176
176
Arguments::
177
177
[%autowidth]
@@ -219,7 +219,7 @@ Encoding::
219
219
]}
220
220
....
221
221
222
-
Description::
222
+
Description:: Forms a 32-bit offset from the 20-bit U-immediate, fills the lowest 12 bits with zeros, adds this offset to the PC, and places the result in register rd
223
223
224
224
Arguments::
225
225
[%autowidth]
@@ -270,7 +270,7 @@ Encoding::
270
270
]}
271
271
....
272
272
273
-
Description::
273
+
Description:: Compares rs1 and rs2, and if equal, branches to the PC-relative address formed by adding the sign-extended 12-bit immediate to the PC
274
274
275
275
Arguments::
276
276
[%autowidth]
@@ -341,7 +341,7 @@ Encoding::
341
341
]}
342
342
....
343
343
344
-
Description::
344
+
Description:: Compares rs1 and rs2 as signed integers, and if rs1 >= rs2, branches to the PC-relative address formed by adding the sign-extended 12-bit immediate to the PC
345
345
346
346
Arguments::
347
347
[%autowidth]
@@ -412,7 +412,7 @@ Encoding::
412
412
]}
413
413
....
414
414
415
-
Description::
415
+
Description:: Compares rs1 and rs2 as unsigned integers, and if rs1 >= rs2, branches to the PC-relative address formed by adding the sign-extended 12-bit immediate to the PC
416
416
417
417
Arguments::
418
418
[%autowidth]
@@ -483,7 +483,7 @@ Encoding::
483
483
]}
484
484
....
485
485
486
-
Description::
486
+
Description:: Compares rs1 and rs2 as signed integers, and if rs1 < rs2, branches to the PC-relative address formed by adding the sign-extended 12-bit immediate to the PC
487
487
488
488
Arguments::
489
489
[%autowidth]
@@ -554,7 +554,7 @@ Encoding::
554
554
]}
555
555
....
556
556
557
-
Description::
557
+
Description:: Compares rs1 and rs2 as unsigned integers, and if rs1 < rs2, branches to the PC-relative address formed by adding the sign-extended 12-bit immediate to the PC
558
558
559
559
Arguments::
560
560
[%autowidth]
@@ -625,7 +625,7 @@ Encoding::
625
625
]}
626
626
....
627
627
628
-
Description::
628
+
Description:: Compares rs1 and rs2, and if not equal, branches to the PC-relative address formed by adding the sign-extended 12-bit immediate to the PC
629
629
630
630
Arguments::
631
631
[%autowidth]
@@ -689,7 +689,7 @@ Encoding::
689
689
]}
690
690
....
691
691
692
-
Description::
692
+
Description:: No description available.
693
693
694
694
Arguments::
695
695
[%autowidth]
@@ -729,7 +729,7 @@ Encoding::
729
729
]}
730
730
....
731
731
732
-
Description::
732
+
Description:: No description available.
733
733
734
734
Arguments::
735
735
[%autowidth]
@@ -783,7 +783,7 @@ Encoding::
783
783
]}
784
784
....
785
785
786
-
Description::
786
+
Description:: Enforces ordering between memory operations and I/O from different RISC-V harts
787
787
788
788
Arguments::
789
789
[%autowidth]
@@ -851,7 +851,7 @@ Encoding::
851
851
]}
852
852
....
853
853
854
-
Description::
854
+
Description:: Jumps to an offset formed by adding the sign-extended 20-bit immediate to the PC, and saves PC+4 to register rd
855
855
856
856
Arguments::
857
857
[%autowidth]
@@ -915,7 +915,7 @@ Encoding::
915
915
]}
916
916
....
917
917
918
-
Description::
918
+
Description:: Jumps to the address formed by adding the sign-extended 12-bit immediate to register rs1, and saves PC+4 to register rd
919
919
920
920
Arguments::
921
921
[%autowidth]
@@ -956,7 +956,7 @@ Encoding::
956
956
]}
957
957
....
958
958
959
-
Description::
959
+
Description:: Loads an 8-bit value from memory, sign-extends it to 32 bits, and writes it to rd
960
960
961
961
Arguments::
962
962
[%autowidth]
@@ -997,7 +997,7 @@ Encoding::
997
997
]}
998
998
....
999
999
1000
-
Description::
1000
+
Description:: Loads an 8-bit value from memory, zero-extends it to 32 bits, and writes it to rd
1001
1001
1002
1002
Arguments::
1003
1003
[%autowidth]
@@ -1038,7 +1038,7 @@ Encoding::
1038
1038
]}
1039
1039
....
1040
1040
1041
-
Description::
1041
+
Description:: Loads a 16-bit value from memory, sign-extends it to 32 bits, and writes it to rd
1042
1042
1043
1043
Arguments::
1044
1044
[%autowidth]
@@ -1079,7 +1079,7 @@ Encoding::
1079
1079
]}
1080
1080
....
1081
1081
1082
-
Description::
1082
+
Description:: Loads a 16-bit value from memory, zero-extends it to 32 bits, and writes it to rd
1083
1083
1084
1084
Arguments::
1085
1085
[%autowidth]
@@ -1118,7 +1118,7 @@ Encoding::
1118
1118
]}
1119
1119
....
1120
1120
1121
-
Description::
1121
+
Description:: Loads a 20-bit immediate into bits 31-12 of the destination register, setting bits 11-0 to zero
1122
1122
1123
1123
Arguments::
1124
1124
[%autowidth]
@@ -1166,7 +1166,7 @@ Encoding::
1166
1166
]}
1167
1167
....
1168
1168
1169
-
Description::
1169
+
Description:: Loads a 32-bit value from memory and writes it to rd
1170
1170
1171
1171
Arguments::
1172
1172
[%autowidth]
@@ -1208,7 +1208,7 @@ Encoding::
1208
1208
]}
1209
1209
....
1210
1210
1211
-
Description::
1211
+
Description:: Performs bitwise OR on rs1 and rs2, stores the result in rd
1212
1212
1213
1213
Arguments::
1214
1214
[%autowidth]
@@ -1258,7 +1258,7 @@ Encoding::
1258
1258
]}
1259
1259
....
1260
1260
1261
-
Description::
1261
+
Description:: Performs bitwise OR on rs1 and the sign-extended 12-bit immediate, stores the result in rd
1262
1262
1263
1263
Arguments::
1264
1264
[%autowidth]
@@ -1309,7 +1309,7 @@ Encoding::
1309
1309
]}
1310
1310
....
1311
1311
1312
-
Description::
1312
+
Description:: Stores the lowest 8 bits from rs2 to memory at the address in rs1 plus the sign-extended 12-bit immediate
1313
1313
1314
1314
Arguments::
1315
1315
[%autowidth]
@@ -1350,7 +1350,7 @@ Encoding::
1350
1350
]}
1351
1351
....
1352
1352
1353
-
Description::
1353
+
Description:: Stores the lowest 16 bits from rs2 to memory at the address in rs1 plus the sign-extended 12-bit immediate
1354
1354
1355
1355
Arguments::
1356
1356
[%autowidth]
@@ -1391,7 +1391,7 @@ Encoding::
1391
1391
]}
1392
1392
....
1393
1393
1394
-
Description::
1394
+
Description:: Shifts rs1 left by the amount specified in the lower 5 bits of rs2, stores the result in rd
1395
1395
1396
1396
Arguments::
1397
1397
[%autowidth]
@@ -1444,7 +1444,7 @@ Encoding::
1444
1444
]}
1445
1445
....
1446
1446
1447
-
Description::
1447
+
Description:: Compares rs1 and rs2 as signed integers, sets rd to 1 if rs1 < rs2, 0 otherwise
1448
1448
1449
1449
Arguments::
1450
1450
[%autowidth]
@@ -1495,7 +1495,7 @@ Encoding::
1495
1495
]}
1496
1496
....
1497
1497
1498
-
Description::
1498
+
Description:: Compares rs1 with the sign-extended 12-bit immediate as signed integers, sets rd to 1 if rs1 < immediate, 0 otherwise
1499
1499
1500
1500
Arguments::
1501
1501
[%autowidth]
@@ -1546,7 +1546,7 @@ Encoding::
1546
1546
]}
1547
1547
....
1548
1548
1549
-
Description::
1549
+
Description:: Compares rs1 with the sign-extended 12-bit immediate as unsigned integers, sets rd to 1 if rs1 < immediate, 0 otherwise
1550
1550
1551
1551
Arguments::
1552
1552
[%autowidth]
@@ -1597,7 +1597,7 @@ Encoding::
1597
1597
]}
1598
1598
....
1599
1599
1600
-
Description::
1600
+
Description:: Compares rs1 and rs2 as unsigned integers, sets rd to 1 if rs1 < rs2, 0 otherwise
1601
1601
1602
1602
Arguments::
1603
1603
[%autowidth]
@@ -1648,7 +1648,7 @@ Encoding::
1648
1648
]}
1649
1649
....
1650
1650
1651
-
Description::
1651
+
Description:: Shifts rs1 right by the amount specified in the lower 5 bits of rs2, filling with the sign bit, stores the result in rd
1652
1652
1653
1653
Arguments::
1654
1654
[%autowidth]
@@ -1701,7 +1701,7 @@ Encoding::
1701
1701
]}
1702
1702
....
1703
1703
1704
-
Description::
1704
+
Description:: Shifts rs1 right by the amount specified in the lower 5 bits of rs2, filling with zeros, stores the result in rd
1705
1705
1706
1706
Arguments::
1707
1707
[%autowidth]
@@ -1754,7 +1754,7 @@ Encoding::
1754
1754
]}
1755
1755
....
1756
1756
1757
-
Description::
1757
+
Description:: Subtracts rs2 from rs1, stores the result in rd
1758
1758
1759
1759
Arguments::
1760
1760
[%autowidth]
@@ -1805,7 +1805,7 @@ Encoding::
1805
1805
]}
1806
1806
....
1807
1807
1808
-
Description::
1808
+
Description:: Stores the 32 bits from rs2 to memory at the address in rs1 plus the sign-extended 12-bit immediate
1809
1809
1810
1810
Arguments::
1811
1811
[%autowidth]
@@ -1846,7 +1846,7 @@ Encoding::
1846
1846
]}
1847
1847
....
1848
1848
1849
-
Description::
1849
+
Description:: Performs bitwise XOR on rs1 and rs2, stores the result in rd
1850
1850
1851
1851
Arguments::
1852
1852
[%autowidth]
@@ -1896,7 +1896,7 @@ Encoding::
1896
1896
]}
1897
1897
....
1898
1898
1899
-
Description::
1899
+
Description:: Performs bitwise XOR on rs1 and the sign-extended 12-bit immediate, stores the result in rd
0 commit comments