Skip to main content

Opcode

Enum Opcode 

Source
#[repr(u32)]
pub enum Opcode {
Show 1040 variants ADD = 0, ADDUW = 1, ADDI = 2, ADDIW = 3, ADDW = 4, AES32DSI = 5, AES32DSMI = 6, AES32ESI = 7, AES32ESMI = 8, AES64DS = 9, AES64DSM = 10, AES64ES = 11, AES64ESM = 12, AES64IM = 13, AES64KS1I = 14, AES64KS2 = 15, AMOADDB = 16, AMOADDD = 17, AMOADDH = 18, AMOADDW = 19, AMOANDB = 20, AMOANDD = 21, AMOANDH = 22, AMOANDW = 23, AMOCASB = 24, AMOCASD = 25, AMOCASH = 26, AMOCASQ = 27, AMOCASW = 28, AMOMAXB = 29, AMOMAXD = 30, AMOMAXH = 31, AMOMAXW = 32, AMOMAXUB = 33, AMOMAXUD = 34, AMOMAXUH = 35, AMOMAXUW = 36, AMOMINB = 37, AMOMIND = 38, AMOMINH = 39, AMOMINW = 40, AMOMINUB = 41, AMOMINUD = 42, AMOMINUH = 43, AMOMINUW = 44, AMOORB = 45, AMOORD = 46, AMOORH = 47, AMOORW = 48, AMOSWAPB = 49, AMOSWAPD = 50, AMOSWAPH = 51, AMOSWAPW = 52, AMOXORB = 53, AMOXORD = 54, AMOXORH = 55, AMOXORW = 56, AND = 57, ANDI = 58, ANDN = 59, AUIPC = 60, BCLR = 61, BCLRI = 62, BCLRIRV32 = 63, BEQ = 64, BEQZ = 65, BEXT = 66, BEXTI = 67, BEXTIRV32 = 68, BGE = 69, BGEU = 70, BGEZ = 71, BGT = 72, BGTU = 73, BGTZ = 74, BINV = 75, BINVI = 76, BINVIRV32 = 77, BLE = 78, BLEU = 79, BLEZ = 80, BLT = 81, BLTU = 82, BLTZ = 83, BNE = 84, BNEZ = 85, BREV8 = 86, BSET = 87, BSETI = 88, BSETIRV32 = 89, CADD = 90, CADDI = 91, CADDI16SP = 92, CADDI4SPN = 93, CADDIW = 94, CADDW = 95, CAND = 96, CANDI = 97, CBEQZ = 98, CBNEZ = 99, CEBREAK = 100, CFLD = 101, CFLDSP = 102, CFLW = 103, CFLWSP = 104, CFSD = 105, CFSDSP = 106, CFSW = 107, CFSWSP = 108, CJ = 109, CJAL = 110, CJALR = 111, CJR = 112, CLBU = 113, CLD = 114, CLDSP = 115, CLH = 116, CLHU = 117, CLI = 118, CLUI = 119, CLW = 120, CLWSP = 121, CMOP1 = 122, CMOP11 = 123, CMOP13 = 124, CMOP15 = 125, CMOP3 = 126, CMOP5 = 127, CMOP7 = 128, CMOP9 = 129, CMOPN = 130, CMUL = 131, CMV = 132, CNOP = 133, CNOT = 134, CNTLALL = 135, CNTLP1 = 136, CNTLPALL = 137, CNTLS1 = 138, COR = 139, CSB = 140, CSD = 141, CSDSP = 142, CSEXTB = 143, CSEXTH = 144, CSEXTW = 145, CSH = 146, CSLLI = 147, CSLLIRV32 = 148, CSRAI = 149, CSRAIRV32 = 150, CSRLI = 151, CSRLIRV32 = 152, CSSPOPCHKX5 = 153, CSSPUSHX1 = 154, CSUB = 155, CSUBW = 156, CSW = 157, CSWSP = 158, CXOR = 159, CZEXTB = 160, CZEXTH = 161, CZEXTW = 162, CBOCLEAN = 163, CBOFLUSH = 164, CBOINVAL = 165, CBOZERO = 166, CLMUL = 167, CLMULH = 168, CLMULR = 169, CLZ = 170, CLZW = 171, CMJALT = 172, CMMVA01S = 173, CMMVSA01 = 174, CMPOP = 175, CMPOPRET = 176, CMPOPRETZ = 177, CMPUSH = 178, CPOP = 179, CPOPW = 180, CSRC = 181, CSRCI = 182, CSRR = 183, CSRRC = 184, CSRRCI = 185, CSRRS = 186, CSRRSI = 187, CSRRW = 188, CSRRWI = 189, CSRS = 190, CSRSI = 191, CSRW = 192, CSRWI = 193, CTZ = 194, CTZW = 195, CZEROEQZ = 196, CZERONEZ = 197, DIV = 198, DIVU = 199, DIVUW = 200, DIVW = 201, DRET = 202, EBREAK = 203, ECALL = 204, FABSD = 205, FABSH = 206, FABSQ = 207, FABSS = 208, FADDD = 209, FADDH = 210, FADDQ = 211, FADDS = 212, FCLASSD = 213, FCLASSH = 214, FCLASSQ = 215, FCLASSS = 216, FCVTBF16S = 217, FCVTDH = 218, FCVTDL = 219, FCVTDLU = 220, FCVTDQ = 221, FCVTDS = 222, FCVTDW = 223, FCVTDWU = 224, FCVTHD = 225, FCVTHL = 226, FCVTHLU = 227, FCVTHQ = 228, FCVTHS = 229, FCVTHW = 230, FCVTHWU = 231, FCVTLD = 232, FCVTLH = 233, FCVTLQ = 234, FCVTLS = 235, FCVTLUD = 236, FCVTLUH = 237, FCVTLUQ = 238, FCVTLUS = 239, FCVTQD = 240, FCVTQH = 241, FCVTQL = 242, FCVTQLU = 243, FCVTQS = 244, FCVTQW = 245, FCVTQWU = 246, FCVTSBF16 = 247, FCVTSD = 248, FCVTSH = 249, FCVTSL = 250, FCVTSLU = 251, FCVTSQ = 252, FCVTSW = 253, FCVTSWU = 254, FCVTWD = 255, FCVTWH = 256, FCVTWQ = 257, FCVTWS = 258, FCVTWUD = 259, FCVTWUH = 260, FCVTWUQ = 261, FCVTWUS = 262, FCVTMODWD = 263, FDIVD = 264, FDIVH = 265, FDIVQ = 266, FDIVS = 267, FENCE = 268, FENCEI = 269, FENCETSO = 270, FEQD = 271, FEQH = 272, FEQQ = 273, FEQS = 274, FLD = 275, FLED = 276, FLEH = 277, FLEQ = 278, FLES = 279, FLEQD = 280, FLEQH = 281, FLEQQ = 282, FLEQS = 283, FLH = 284, FLID = 285, FLIH = 286, FLIQ = 287, FLIS = 288, FLQ = 289, FLTD = 290, FLTH = 291, FLTQ = 292, FLTS = 293, FLTQD = 294, FLTQH = 295, FLTQQ = 296, FLTQS = 297, FLW = 298, FMADDD = 299, FMADDH = 300, FMADDQ = 301, FMADDS = 302, FMAXD = 303, FMAXH = 304, FMAXQ = 305, FMAXS = 306, FMAXMD = 307, FMAXMH = 308, FMAXMQ = 309, FMAXMS = 310, FMIND = 311, FMINH = 312, FMINQ = 313, FMINS = 314, FMINMD = 315, FMINMH = 316, FMINMQ = 317, FMINMS = 318, FMSUBD = 319, FMSUBH = 320, FMSUBQ = 321, FMSUBS = 322, FMULD = 323, FMULH = 324, FMULQ = 325, FMULS = 326, FMVD = 327, FMVDX = 328, FMVH = 329, FMVHX = 330, FMVQ = 331, FMVS = 332, FMVSX = 333, FMVWX = 334, FMVXD = 335, FMVXH = 336, FMVXS = 337, FMVXW = 338, FMVHXD = 339, FMVHXQ = 340, FMVPDX = 341, FMVPQX = 342, FNEGD = 343, FNEGH = 344, FNEGQ = 345, FNEGS = 346, FNMADDD = 347, FNMADDH = 348, FNMADDQ = 349, FNMADDS = 350, FNMSUBD = 351, FNMSUBH = 352, FNMSUBQ = 353, FNMSUBS = 354, FRCSR = 355, FRFLAGS = 356, FROUNDD = 357, FROUNDH = 358, FROUNDQ = 359, FROUNDS = 360, FROUNDNXD = 361, FROUNDNXH = 362, FROUNDNXQ = 363, FROUNDNXS = 364, FRRM = 365, FSCSR = 366, FSD = 367, FSFLAGS = 368, FSFLAGSI = 369, FSGNJD = 370, FSGNJH = 371, FSGNJQ = 372, FSGNJS = 373, FSGNJND = 374, FSGNJNH = 375, FSGNJNQ = 376, FSGNJNS = 377, FSGNJXD = 378, FSGNJXH = 379, FSGNJXQ = 380, FSGNJXS = 381, FSH = 382, FSQ = 383, FSQRTD = 384, FSQRTH = 385, FSQRTQ = 386, FSQRTS = 387, FSRM = 388, FSRMI = 389, FSUBD = 390, FSUBH = 391, FSUBQ = 392, FSUBS = 393, FSW = 394, HFENCEGVMA = 395, HFENCEVVMA = 396, HINVALGVMA = 397, HINVALVVMA = 398, HLVB = 399, HLVBU = 400, HLVD = 401, HLVH = 402, HLVHU = 403, HLVW = 404, HLVWU = 405, HLVXHU = 406, HLVXWU = 407, HSVB = 408, HSVD = 409, HSVH = 410, HSVW = 411, J = 412, JAL = 413, JALPSEUDO = 414, JALR = 415, JALRPSEUDO = 416, JR = 417, LB = 418, LBU = 419, LD = 420, LH = 421, LHU = 422, LPAD = 423, LRD = 424, LRW = 425, LUI = 426, LW = 427, LWU = 428, MAX = 429, MAXU = 430, MIN = 431, MINU = 432, MNRET = 433, MOPR0 = 434, MOPR1 = 435, MOPR10 = 436, MOPR11 = 437, MOPR12 = 438, MOPR13 = 439, MOPR14 = 440, MOPR15 = 441, MOPR16 = 442, MOPR17 = 443, MOPR18 = 444, MOPR19 = 445, MOPR2 = 446, MOPR20 = 447, MOPR21 = 448, MOPR22 = 449, MOPR23 = 450, MOPR24 = 451, MOPR25 = 452, MOPR26 = 453, MOPR27 = 454, MOPR28 = 455, MOPR29 = 456, MOPR3 = 457, MOPR30 = 458, MOPR31 = 459, MOPR4 = 460, MOPR5 = 461, MOPR6 = 462, MOPR7 = 463, MOPR8 = 464, MOPR9 = 465, MOPRN = 466, MOPRR0 = 467, MOPRR1 = 468, MOPRR2 = 469, MOPRR3 = 470, MOPRR4 = 471, MOPRR5 = 472, MOPRR6 = 473, MOPRR7 = 474, MOPRRN = 475, MRET = 476, MUL = 477, MULH = 478, MULHSU = 479, MULHU = 480, MULW = 481, MV = 482, NEG = 483, NOP = 484, NTLALL = 485, NTLP1 = 486, NTLPALL = 487, NTLS1 = 488, OR = 489, ORCB = 490, ORI = 491, ORN = 492, PACK = 493, PACKH = 494, PACKW = 495, PAUSE = 496, PREFETCHI = 497, PREFETCHR = 498, PREFETCHW = 499, RDCYCLE = 500, RDCYCLEH = 501, RDINSTRET = 502, RDINSTRETH = 503, RDTIME = 504, RDTIMEH = 505, REM = 506, REMU = 507, REMUW = 508, REMW = 509, RET = 510, REV8 = 511, REV8RV32 = 512, ROL = 513, ROLW = 514, ROR = 515, RORI = 516, RORIRV32 = 517, RORIW = 518, RORW = 519, SB = 520, SBREAK = 521, SCD = 522, SCW = 523, SCALL = 524, SCTRCLR = 525, SD = 526, SEQZ = 527, SEXTB = 528, SEXTH = 529, SEXTW = 530, SFENCEINVALIR = 531, SFENCEVMA = 532, SFENCEWINVAL = 533, SGTZ = 534, SH = 535, SH1ADD = 536, SH1ADDUW = 537, SH2ADD = 538, SH2ADDUW = 539, SH3ADD = 540, SH3ADDUW = 541, SHA256SIG0 = 542, SHA256SIG1 = 543, SHA256SUM0 = 544, SHA256SUM1 = 545, SHA512SIG0 = 546, SHA512SIG0H = 547, SHA512SIG0L = 548, SHA512SIG1 = 549, SHA512SIG1H = 550, SHA512SIG1L = 551, SHA512SUM0 = 552, SHA512SUM0R = 553, SHA512SUM1 = 554, SHA512SUM1R = 555, SINVALVMA = 556, SLL = 557, SLLI = 558, SLLIRV32 = 559, SLLIUW = 560, SLLIW = 561, SLLW = 562, SLT = 563, SLTI = 564, SLTIU = 565, SLTU = 566, SLTZ = 567, SM3P0 = 568, SM3P1 = 569, SM4ED = 570, SM4KS = 571, SNEZ = 572, SRA = 573, SRAI = 574, SRAIRV32 = 575, SRAIW = 576, SRAW = 577, SRET = 578, SRL = 579, SRLI = 580, SRLIRV32 = 581, SRLIW = 582, SRLW = 583, SSAMOSWAPD = 584, SSAMOSWAPW = 585, SSPOPCHKX1 = 586, SSPOPCHKX5 = 587, SSPUSHX1 = 588, SSPUSHX5 = 589, SSRDP = 590, SUB = 591, SUBW = 592, SW = 593, UNZIP = 594, VAADDVV = 595, VAADDVX = 596, VAADDUVV = 597, VAADDUVX = 598, VADCVIM = 599, VADCVVM = 600, VADCVXM = 601, VADDVI = 602, VADDVV = 603, VADDVX = 604, VAESDFVS = 605, VAESDFVV = 606, VAESDMVS = 607, VAESDMVV = 608, VAESEFVS = 609, VAESEFVV = 610, VAESEMVS = 611, VAESEMVV = 612, VAESKF1VI = 613, VAESKF2VI = 614, VAESZVS = 615, VANDVI = 616, VANDVV = 617, VANDVX = 618, VANDNVV = 619, VANDNVX = 620, VASUBVV = 621, VASUBVX = 622, VASUBUVV = 623, VASUBUVX = 624, VBREV8V = 625, VBREVV = 626, VCLMULVV = 627, VCLMULVX = 628, VCLMULHVV = 629, VCLMULHVX = 630, VCLZV = 631, VCOMPRESSVM = 632, VCPOPM = 633, VCPOPV = 634, VCTZV = 635, VDIVVV = 636, VDIVVX = 637, VDIVUVV = 638, VDIVUVX = 639, VFADDVF = 640, VFADDVV = 641, VFCLASSV = 642, VFCVTFXV = 643, VFCVTFXUV = 644, VFCVTRTZXFV = 645, VFCVTRTZXUFV = 646, VFCVTXFV = 647, VFCVTXUFV = 648, VFDIVVF = 649, VFDIVVV = 650, VFIRSTM = 651, VFMACCVF = 652, VFMACCVV = 653, VFMADDVF = 654, VFMADDVV = 655, VFMAXVF = 656, VFMAXVV = 657, VFMERGEVFM = 658, VFMINVF = 659, VFMINVV = 660, VFMSACVF = 661, VFMSACVV = 662, VFMSUBVF = 663, VFMSUBVV = 664, VFMULVF = 665, VFMULVV = 666, VFMVFS = 667, VFMVSF = 668, VFMVVF = 669, VFNCVTFFW = 670, VFNCVTFXW = 671, VFNCVTFXUW = 672, VFNCVTRODFFW = 673, VFNCVTRTZXFW = 674, VFNCVTRTZXUFW = 675, VFNCVTXFW = 676, VFNCVTXUFW = 677, VFNCVTBF16FFW = 678, VFNMACCVF = 679, VFNMACCVV = 680, VFNMADDVF = 681, VFNMADDVV = 682, VFNMSACVF = 683, VFNMSACVV = 684, VFNMSUBVF = 685, VFNMSUBVV = 686, VFRDIVVF = 687, VFREC7V = 688, VFREDMAXVS = 689, VFREDMINVS = 690, VFREDOSUMVS = 691, VFREDSUMVS = 692, VFREDUSUMVS = 693, VFRSQRT7V = 694, VFRSUBVF = 695, VFSGNJVF = 696, VFSGNJVV = 697, VFSGNJNVF = 698, VFSGNJNVV = 699, VFSGNJXVF = 700, VFSGNJXVV = 701, VFSLIDE1DOWNVF = 702, VFSLIDE1UPVF = 703, VFSQRTV = 704, VFSUBVF = 705, VFSUBVV = 706, VFWADDVF = 707, VFWADDVV = 708, VFWADDWF = 709, VFWADDWV = 710, VFWCVTFFV = 711, VFWCVTFXV = 712, VFWCVTFXUV = 713, VFWCVTRTZXFV = 714, VFWCVTRTZXUFV = 715, VFWCVTXFV = 716, VFWCVTXUFV = 717, VFWCVTBF16FFV = 718, VFWMACCVF = 719, VFWMACCVV = 720, VFWMACCBF16VF = 721, VFWMACCBF16VV = 722, VFWMSACVF = 723, VFWMSACVV = 724, VFWMULVF = 725, VFWMULVV = 726, VFWNMACCVF = 727, VFWNMACCVV = 728, VFWNMSACVF = 729, VFWNMSACVV = 730, VFWREDOSUMVS = 731, VFWREDSUMVS = 732, VFWREDUSUMVS = 733, VFWSUBVF = 734, VFWSUBVV = 735, VFWSUBWF = 736, VFWSUBWV = 737, VGHSHVV = 738, VGMULVV = 739, VIDV = 740, VIOTAM = 741, VL1RV = 742, VL1RE16V = 743, VL1RE32V = 744, VL1RE64V = 745, VL1RE8V = 746, VL2RV = 747, VL2RE16V = 748, VL2RE32V = 749, VL2RE64V = 750, VL2RE8V = 751, VL4RV = 752, VL4RE16V = 753, VL4RE32V = 754, VL4RE64V = 755, VL4RE8V = 756, VL8RV = 757, VL8RE16V = 758, VL8RE32V = 759, VL8RE64V = 760, VL8RE8V = 761, VLE16V = 762, VLE16FFV = 763, VLE1V = 764, VLE32V = 765, VLE32FFV = 766, VLE64V = 767, VLE64FFV = 768, VLE8V = 769, VLE8FFV = 770, VLMV = 771, VLOXEI16V = 772, VLOXEI32V = 773, VLOXEI64V = 774, VLOXEI8V = 775, VLSE16V = 776, VLSE32V = 777, VLSE64V = 778, VLSE8V = 779, VLUXEI16V = 780, VLUXEI32V = 781, VLUXEI64V = 782, VLUXEI8V = 783, VMACCVV = 784, VMACCVX = 785, VMADCVI = 786, VMADCVIM = 787, VMADCVV = 788, VMADCVVM = 789, VMADCVX = 790, VMADCVXM = 791, VMADDVV = 792, VMADDVX = 793, VMANDMM = 794, VMANDNMM = 795, VMANDNOTMM = 796, VMAXVV = 797, VMAXVX = 798, VMAXUVV = 799, VMAXUVX = 800, VMERGEVIM = 801, VMERGEVVM = 802, VMERGEVXM = 803, VMFEQVF = 804, VMFEQVV = 805, VMFGEVF = 806, VMFGTVF = 807, VMFLEVF = 808, VMFLEVV = 809, VMFLTVF = 810, VMFLTVV = 811, VMFNEVF = 812, VMFNEVV = 813, VMINVV = 814, VMINVX = 815, VMINUVV = 816, VMINUVX = 817, VMNANDMM = 818, VMNORMM = 819, VMORMM = 820, VMORNMM = 821, VMORNOTMM = 822, VMSBCVV = 823, VMSBCVVM = 824, VMSBCVX = 825, VMSBCVXM = 826, VMSBFM = 827, VMSEQVI = 828, VMSEQVV = 829, VMSEQVX = 830, VMSGTVI = 831, VMSGTVX = 832, VMSGTUVI = 833, VMSGTUVX = 834, VMSIFM = 835, VMSLEVI = 836, VMSLEVV = 837, VMSLEVX = 838, VMSLEUVI = 839, VMSLEUVV = 840, VMSLEUVX = 841, VMSLTVV = 842, VMSLTVX = 843, VMSLTUVV = 844, VMSLTUVX = 845, VMSNEVI = 846, VMSNEVV = 847, VMSNEVX = 848, VMSOFM = 849, VMULVV = 850, VMULVX = 851, VMULHVV = 852, VMULHVX = 853, VMULHSUVV = 854, VMULHSUVX = 855, VMULHUVV = 856, VMULHUVX = 857, VMV1RV = 858, VMV2RV = 859, VMV4RV = 860, VMV8RV = 861, VMVSX = 862, VMVVI = 863, VMVVV = 864, VMVVX = 865, VMVXS = 866, VMXNORMM = 867, VMXORMM = 868, VNCLIPWI = 869, VNCLIPWV = 870, VNCLIPWX = 871, VNCLIPUWI = 872, VNCLIPUWV = 873, VNCLIPUWX = 874, VNMSACVV = 875, VNMSACVX = 876, VNMSUBVV = 877, VNMSUBVX = 878, VNSRAWI = 879, VNSRAWV = 880, VNSRAWX = 881, VNSRLWI = 882, VNSRLWV = 883, VNSRLWX = 884, VORVI = 885, VORVV = 886, VORVX = 887, VPOPCM = 888, VREDANDVS = 889, VREDMAXVS = 890, VREDMAXUVS = 891, VREDMINVS = 892, VREDMINUVS = 893, VREDORVS = 894, VREDSUMVS = 895, VREDXORVS = 896, VREMVV = 897, VREMVX = 898, VREMUVV = 899, VREMUVX = 900, VREV8V = 901, VRGATHERVI = 902, VRGATHERVV = 903, VRGATHERVX = 904, VRGATHEREI16VV = 905, VROLVV = 906, VROLVX = 907, VRORVI = 908, VRORVV = 909, VRORVX = 910, VRSUBVI = 911, VRSUBVX = 912, VS1RV = 913, VS2RV = 914, VS4RV = 915, VS8RV = 916, VSADDVI = 917, VSADDVV = 918, VSADDVX = 919, VSADDUVI = 920, VSADDUVV = 921, VSADDUVX = 922, VSBCVVM = 923, VSBCVXM = 924, VSE16V = 925, VSE1V = 926, VSE32V = 927, VSE64V = 928, VSE8V = 929, VSETIVLI = 930, VSETVL = 931, VSETVLI = 932, VSEXTVF2 = 933, VSEXTVF4 = 934, VSEXTVF8 = 935, VSHA2CHVV = 936, VSHA2CLVV = 937, VSHA2MSVV = 938, VSLIDE1DOWNVX = 939, VSLIDE1UPVX = 940, VSLIDEDOWNVI = 941, VSLIDEDOWNVX = 942, VSLIDEUPVI = 943, VSLIDEUPVX = 944, VSLLVI = 945, VSLLVV = 946, VSLLVX = 947, VSM3CVI = 948, VSM3MEVV = 949, VSM4KVI = 950, VSM4RVS = 951, VSM4RVV = 952, VSMV = 953, VSMULVV = 954, VSMULVX = 955, VSOXEI16V = 956, VSOXEI32V = 957, VSOXEI64V = 958, VSOXEI8V = 959, VSRAVI = 960, VSRAVV = 961, VSRAVX = 962, VSRLVI = 963, VSRLVV = 964, VSRLVX = 965, VSSE16V = 966, VSSE32V = 967, VSSE64V = 968, VSSE8V = 969, VSSRAVI = 970, VSSRAVV = 971, VSSRAVX = 972, VSSRLVI = 973, VSSRLVV = 974, VSSRLVX = 975, VSSUBVV = 976, VSSUBVX = 977, VSSUBUVV = 978, VSSUBUVX = 979, VSUBVV = 980, VSUBVX = 981, VSUXEI16V = 982, VSUXEI32V = 983, VSUXEI64V = 984, VSUXEI8V = 985, VWADDVV = 986, VWADDVX = 987, VWADDWV = 988, VWADDWX = 989, VWADDUVV = 990, VWADDUVX = 991, VWADDUWV = 992, VWADDUWX = 993, VWMACCVV = 994, VWMACCVX = 995, VWMACCSUVV = 996, VWMACCSUVX = 997, VWMACCUVV = 998, VWMACCUVX = 999, VWMACCUSVX = 1000, VWMULVV = 1001, VWMULVX = 1002, VWMULSUVV = 1003, VWMULSUVX = 1004, VWMULUVV = 1005, VWMULUVX = 1006, VWREDSUMVS = 1007, VWREDSUMUVS = 1008, VWSLLVI = 1009, VWSLLVV = 1010, VWSLLVX = 1011, VWSUBVV = 1012, VWSUBVX = 1013, VWSUBWV = 1014, VWSUBWX = 1015, VWSUBUVV = 1016, VWSUBUVX = 1017, VWSUBUWV = 1018, VWSUBUWX = 1019, VXORVI = 1020, VXORVV = 1021, VXORVX = 1022, VZEXTVF2 = 1023, VZEXTVF4 = 1024, VZEXTVF8 = 1025, WFI = 1026, WRSNTO = 1027, WRSSTO = 1028, XNOR = 1029, XOR = 1030, XORI = 1031, XPERM4 = 1032, XPERM8 = 1033, ZEXTB = 1034, ZEXTH = 1035, ZEXTHRV32 = 1036, ZEXTW = 1037, ZIP = 1038, Invalid = 1039,
}

Variants§

§

ADD = 0

Integer add

Add the value in rs1 to rs2, and store the result in rd. Any overflow is thrown away.

§Forms

Assembly: add xd, xs1, xs2

§

ADDUW = 1

Add unsigned word

This instruction performs an XLEN-wide addition between rs2 and the zero-extended least-significant word of rs1.

§Forms

Assembly: add.uw xd, xs1, xs2

§

ADDI = 2

Add immediate

Add an immediate to the value in rs1, and store the result in rd

§Forms

Assembly: addi xd, xs1, imm

§

ADDIW = 3

Add immediate word

Add an immediate to the 32-bit value in rs1, and store the sign extended result in rd

§Forms

Assembly: addiw xd, xs1, imm

§

ADDW = 4

Add word

Add the 32-bit values in rs1 to rs2, and store the sign-extended result in rd. Any overflow is thrown away.

§Forms

Assembly: addw xd, xs1, xs2

§

AES32DSI = 5

RISC-V aes32dsi instruction.

§Forms

Assembly: aes32dsi xd, xs1, xs2, bs

§

AES32DSMI = 6

RISC-V aes32dsmi instruction.

§Forms

Assembly: aes32dsmi xd, xs1, xs2, bs

§

AES32ESI = 7

RISC-V aes32esi instruction.

§Forms

Assembly: aes32esi xd, xs1, xs2, bs

§

AES32ESMI = 8

RISC-V aes32esmi instruction.

§Forms

Assembly: aes32esmi xd, xs1, xs2, bs

§

AES64DS = 9

RISC-V aes64ds instruction.

§Forms

Assembly: aes64ds xd, xs1, xs2

§

AES64DSM = 10

RISC-V aes64dsm instruction.

§Forms

Assembly: aes64dsm xd, xs1, xs2

§

AES64ES = 11

RISC-V aes64es instruction.

§Forms

Assembly: aes64es xd, xs1, xs2

§

AES64ESM = 12

RISC-V aes64esm instruction.

§Forms

Assembly: aes64esm xd, xs1, xs2

§

AES64IM = 13

RISC-V aes64im instruction.

§Forms

Assembly: aes64im xd, xs1

§

AES64KS1I = 14

RISC-V aes64ks1i instruction.

§Forms

Assembly: aes64ks1i xd, xs1, rnum

§

AES64KS2 = 15

RISC-V aes64ks2 instruction.

§Forms

Assembly: aes64ks2 xd, xs1, xs2

§

AMOADDB = 16

RISC-V amoadd.b instruction.

§Forms

Assembly: amoadd.b xd, xs1, xs2, aq, rl

§

AMOADDD = 17

Atomic fetch-and-add doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • Add the value of register rs2 to the loaded value
  • Write the sum to the address in rs1

§Forms

Assembly: amoadd.d xd, xs2, (xs1)

§

AMOADDH = 18

RISC-V amoadd.h instruction.

§Forms

Assembly: amoadd.h xd, xs1, xs2, aq, rl

§

AMOADDW = 19

Atomic fetch-and-add word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • Add the least-significant word of register rs2 to the loaded value
  • Write the sum to the address in rs1

§Forms

Assembly: amoadd.w xd, xs2, (xrs1)

§

AMOANDB = 20

RISC-V amoand.b instruction.

§Forms

Assembly: amoand.b xd, xs1, xs2, aq, rl

§

AMOANDD = 21

Atomic fetch-and-and doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • AND the value of register rs2 to the loaded value
  • Write the result to the address in rs1

§Forms

Assembly: amoand.d xd, xs2, (xrs1)

§

AMOANDH = 22

RISC-V amoand.h instruction.

§Forms

Assembly: amoand.h xd, xs1, xs2, aq, rl

§

AMOANDW = 23

Atomic fetch-and-and word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • AND the least-significant word of register rs2 to the loaded value
  • Write the result to the address in rs1

§Forms

Assembly: amoand.w xd, xs2, (xrs1)

§

AMOCASB = 24

RISC-V amocas.b instruction.

§Forms

Assembly: amocas.b xd, xs1, xs2, aq, rl

§

AMOCASD = 25

RISC-V amocas.d instruction.

§Forms

Assembly: amocas.d xd, xs1, xs2, aq, rl

§

AMOCASH = 26

RISC-V amocas.h instruction.

§Forms

Assembly: amocas.h xd, xs1, xs2, aq, rl

§

AMOCASQ = 27

RISC-V amocas.q instruction.

§Forms

Assembly: amocas.q xd, xs1, xs2, aq, rl

§

AMOCASW = 28

RISC-V amocas.w instruction.

§Forms

Assembly: amocas.w xd, xs1, xs2, aq, rl

§

AMOMAXB = 29

RISC-V amomax.b instruction.

§Forms

Assembly: amomax.b xd, xs1, xs2, aq, rl

§

AMOMAXD = 30

Atomic MAX doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • Signed compare the value of register rs2 to the loaded value, and select the maximum value
  • Write the maximum to the address in rs1

§Forms

Assembly: amomax.d xd, xs2, (xrs1)

§

AMOMAXH = 31

RISC-V amomax.h instruction.

§Forms

Assembly: amomax.h xd, xs1, xs2, aq, rl

§

AMOMAXW = 32

Atomic MAX word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • Signed compare the least-significant word of register rs2 to the loaded value, and select the maximum value
  • Write the maximum to the address in rs1

§Forms

Assembly: amomax.w xd, xs2, (xrs1)

§

AMOMAXUB = 33

RISC-V amomaxu.b instruction.

§Forms

Assembly: amomaxu.b xd, xs1, xs2, aq, rl

§

AMOMAXUD = 34

Atomic MAX unsigned doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • Unsigned compare the value of register rs2 to the loaded value, and select the maximum value
  • Write the maximum to the address in rs1

§Forms

Assembly: amomaxu.d xd, xs2, (xrs1)

§

AMOMAXUH = 35

RISC-V amomaxu.h instruction.

§Forms

Assembly: amomaxu.h xd, xs1, xs2, aq, rl

§

AMOMAXUW = 36

Atomic MAX unsigned word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • Unsigned compare the least-significant word of register rs2 to the loaded value, and select the maximum value
  • Write the maximum to the address in rs1

§Forms

Assembly: amomaxu.w xd, xs2, (xrs1)

§

AMOMINB = 37

RISC-V amomin.b instruction.

§Forms

Assembly: amomin.b xd, xs1, xs2, aq, rl

§

AMOMIND = 38

Atomic MIN doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • Signed compare the value of register rs2 to the loaded value, and select the minimum value
  • Write the minimum to the address in rs1

§Forms

Assembly: amomin.d xd, xs2, (xrs1)

§

AMOMINH = 39

RISC-V amomin.h instruction.

§Forms

Assembly: amomin.h xd, xs1, xs2, aq, rl

§

AMOMINW = 40

Atomic MIN word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • Signed compare the least-significant word of register rs2 to the loaded value, and select the minimum value
  • Write the result to the address in rs1

§Forms

Assembly: amomin.w xd, xs2, (xrs1)

§

AMOMINUB = 41

RISC-V amominu.b instruction.

§Forms

Assembly: amominu.b xd, xs1, xs2, aq, rl

§

AMOMINUD = 42

Atomic MIN unsigned doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • Unsigned compare the value of register rs2 to the loaded value, and select the minimum value
  • Write the minimum to the address in rs1

§Forms

Assembly: amominu.d xd, xs2, (xrs1)

§

AMOMINUH = 43

RISC-V amominu.h instruction.

§Forms

Assembly: amominu.h xd, xs1, xs2, aq, rl

§

AMOMINUW = 44

Atomic MIN unsigned word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • Unsigned compare the least-significant word of register rs2 to the loaded word, and select the minimum value
  • Write the result to the address in rs1

§Forms

Assembly: amominu.w xd, xs2, (xrs1)

§

AMOORB = 45

RISC-V amoor.b instruction.

§Forms

Assembly: amoor.b xd, xs1, xs2, aq, rl

§

AMOORD = 46

Atomic fetch-and-or doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • OR the value of register rs2 to the loaded value
  • Write the result to the address in rs1

§Forms

Assembly: amoor.d xd, xs2, (xrs1)

§

AMOORH = 47

RISC-V amoor.h instruction.

§Forms

Assembly: amoor.h xd, xs1, xs2, aq, rl

§

AMOORW = 48

Atomic fetch-and-or word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • OR the least-significant word of register rs2 to the loaded value
  • Write the result to the address in rs1

§Forms

Assembly: amoor.w xd, xs2, (xrs1)

§

AMOSWAPB = 49

RISC-V amoswap.b instruction.

§Forms

Assembly: amoswap.b xd, xs1, xs2, aq, rl

§

AMOSWAPD = 50

Atomic SWAP doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the value into rd
  • Store the value of register rs2 to the address in rs1

§Forms

Assembly: amoswap.d xd, xs2, (xrs1)

§

AMOSWAPH = 51

RISC-V amoswap.h instruction.

§Forms

Assembly: amoswap.h xd, xs1, xs2, aq, rl

§

AMOSWAPW = 52

Atomic SWAP word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • Store the least-significant word of register rs2 to the address in rs1

§Forms

Assembly: amoswap.w xd, xs2, (xrs1)

§

AMOXORB = 53

RISC-V amoxor.b instruction.

§Forms

Assembly: amoxor.b xd, xs1, xs2, aq, rl

§

AMOXORD = 54

Atomic fetch-and-xor doubleword

Atomically:

  • Load the doubleword at address rs1
  • Write the loaded value into rd
  • XOR the value of register rs2 to the loaded value
  • Write the result to the address in rs1

§Forms

Assembly: amoxor.d xd, xs2, (xrs1)

§

AMOXORH = 55

RISC-V amoxor.h instruction.

§Forms

Assembly: amoxor.h xd, xs1, xs2, aq, rl

§

AMOXORW = 56

Atomic fetch-and-xor word

Atomically:

  • Load the word at address rs1
  • Write the sign-extended value into rd
  • XOR the least-significant word of register rs2 to the loaded value
  • Write the result to the address in rs1

§Forms

Assembly: amoxor.w xd, xs2, (xrs1)

§

AND = 57

And

And rs1 with rs2, and store the result in rd

§Forms

Assembly: and xd, xs1, xs2

§

ANDI = 58

And immediate

And an immediate to the value in rs1, and store the result in rd

§Forms

Assembly: andi xd, xs1, imm

§

ANDN = 59

AND with inverted operand

This instruction performs the bitwise logical AND operation between rs1 and the bitwise inversion of rs2.

§Forms

Assembly: andn xd, xs1, xs2

§

AUIPC = 60

Add upper immediate to pc

Add an immediate to the current PC.

§Forms

Assembly: auipc xd, imm

§

BCLR = 61

Single-Bit clear (Register)

This instruction returns rs1 with a single bit cleared at the index specified in rs2. The index is read from the lower log2(XLEN) bits of rs2.

§Forms

Assembly: bclr xd, xs1, xs2

§

BCLRI = 62

Single-Bit clear (Immediate)

This instruction returns rs1 with a single bit cleared at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: bclri xd, xs1, shamt

§

BCLRIRV32 = 63

Single-Bit clear (Immediate)

This instruction returns rs1 with a single bit cleared at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: bclri.rv32 xd, xs1, shamt

§

BEQ = 64

Branch if equal

Branch to PC + imm if the value in register rs1 is equal to the value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

§Forms

Assembly: beq xs1, xs2, imm

§

BEQZ = 65

RISC-V beqz instruction.

§Forms

Assembly: beqz rs1 bimm12lohi

§

BEXT = 66

Single-Bit extract (Register)

This instruction returns a single bit extracted from rs1 at the index specified in rs2. The index is read from the lower log2(XLEN) bits of rs2.

§Forms

Assembly: bext xd, xs1, xs2

§

BEXTI = 67

Single-Bit extract (Immediate)

This instruction returns a single bit extracted from rs1 at the index specified in rs2. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: bexti xd, xs1, shamt

§

BEXTIRV32 = 68

Single-Bit extract (Immediate)

This instruction returns a single bit extracted from rs1 at the index specified in rs2. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: bexti.rv32 xd, xs1, shamt

§

BGE = 69

Branch if greater than or equal

Branch to PC + imm if the signed value in register rs1 is greater than or equal to the signed value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

§Forms

Assembly: bge xs1, xs2, imm

§

BGEU = 70

Branch if greater than or equal unsigned

Branch to PC + imm if the unsigned value in register rs1 is greater than or equal to the unsigned value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

§Forms

Assembly: bgeu xs1, xs2, imm

§

BGEZ = 71

RISC-V bgez instruction.

§Forms

Assembly: bgez rs1 bimm12lohi

§

BGT = 72

RISC-V bgt instruction.

§Forms

Assembly: bgt rs1 rs2 bimm12lohi

§

BGTU = 73

RISC-V bgtu instruction.

§Forms

Assembly: bgtu rs1 rs2 bimm12lohi

§

BGTZ = 74

RISC-V bgtz instruction.

§Forms

Assembly: bgtz rs2 bimm12lohi

§

BINV = 75

Single-Bit invert (Register)

This instruction returns rs1 with a single bit inverted at the index specified in rs2. The index is read from the lower log2(XLEN) bits of rs2.

§Forms

Assembly: binv xd, xs1, xs2

§

BINVI = 76

Single-Bit invert (Immediate)

This instruction returns rs1 with a single bit inverted at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: binvi xd, xs1, shamt

§

BINVIRV32 = 77

Single-Bit invert (Immediate)

This instruction returns rs1 with a single bit inverted at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: binvi.rv32 xd, xs1, shamt

§

BLE = 78

RISC-V ble instruction.

§Forms

Assembly: ble rs1 rs2 bimm12lohi

§

BLEU = 79

RISC-V bleu instruction.

§Forms

Assembly: bleu rs1 rs2 bimm12lohi

§

BLEZ = 80

RISC-V blez instruction.

§Forms

Assembly: blez rs2 bimm12lohi

§

BLT = 81

Branch if less than

Branch to PC + imm if the signed value in register rs1 is less than the signed value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

§Forms

Assembly: blt xs1, xs2, imm

§

BLTU = 82

Branch if less than unsigned

Branch to PC + imm if the unsigned value in register rs1 is less than the unsigned value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

§Forms

Assembly: bltu xs1, xs2, imm

§

BLTZ = 83

RISC-V bltz instruction.

§Forms

Assembly: bltz rs1 bimm12lohi

§

BNE = 84

Branch if not equal

Branch to PC + imm if the value in register rs1 is not equal to the value in register rs2.

Raise a MisalignedAddress exception if PC + imm is misaligned.

§Forms

Assembly: bne xs1, xs2, imm

§

BNEZ = 85

RISC-V bnez instruction.

§Forms

Assembly: bnez rs1 bimm12lohi

§

BREV8 = 86

Reverse bits in bytes

This instruction reverses the order of the bits in every byte of a register.

§Forms

Assembly: brev8 xd, xs1

§

BSET = 87

Single-Bit set (Register)

This instruction returns rs1 with a single bit set at the index specified in rs2. The index is read from the lower log2(XLEN) bits of rs2.

§Forms

Assembly: bset xd, xs1, xs2

§

BSETI = 88

Single-Bit set (Immediate)

This instruction returns rs1 with a single bit set at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: bseti xd, xs1, shamt

§

BSETIRV32 = 89

Single-Bit set (Immediate)

This instruction returns rs1 with a single bit set at the index specified in shamt. The index is read from the lower log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: bseti.rv32 xd, xs1, shamt

§

CADD = 90

Add

Add the value in rs2 to rd, and store the result in rd. C.ADD expands into add rd, rd, rs2.

§Forms

Assembly: c.add xd, rs2

§

CADDI = 91

Add a sign-extended non-zero immediate

C.ADDI adds the non-zero sign-extended 6-bit immediate to the value in register rd then writes the result to rd. C.ADDI expands into addi rd, rd, imm. C.ADDI is only valid when rd ≠ x0 and imm ≠ 0. The code points with rd=x0 encode the C.NOP instruction; the remaining code points with imm=0 encode HINTs.

§Forms

Assembly: c.addi xd, imm

§

CADDI16SP = 92

Add a sign-extended non-zero immediate

C.ADDI16SP adds the non-zero sign-extended 6-bit immediate to the value in the stack pointer (sp=x2), where the immediate is scaled to represent multiples of 16 in the range (-512,496). C.ADDI16SP is used to adjust the stack pointer in procedure prologues and epilogues. It expands into addi x2, x2, nzimm\[9:4\]. C.ADDI16SP is only valid when nzimm ≠ 0; the code point with nzimm=0 is reserved.

§Forms

Assembly: c.addi16sp imm

§

CADDI4SPN = 93

Add a zero-extended non-zero immediate, scaled by 4, to the stack pointer

Adds a zero-extended non-zero immediate, scaled by 4, to the stack pointer, x2, and writes the result to rd’. This instruction is used to generate pointers to stack-allocated variables. It expands to addi rd', x2, nzuimm\[9:2\]. C.ADDI4SPN is only valid when nzuimm ≠ 0; the code points with nzuimm=0 are reserved.

§Forms

Assembly: c.addi4spn xd, imm

§

CADDIW = 94

Add a sign-extended non-zero immediate

C.ADDIW is an RV64C/RV128C-only instruction that performs the same computation as C.ADDI but produces a 32-bit result, then sign-extends result to 64 bits. C.ADDIW expands into addiw rd, rd, imm. The immediate can be zero for C.ADDIW, where this corresponds to sext.w rd. C.ADDIW is only valid when rd ≠ x0; the code points with rd=x0 are reserved.

§Forms

Assembly: c.addiw xd, imm

§

CADDW = 95

Add word

Add the 32-bit values in rs2 from rd, and store the result in rd. The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15). C.ADDW expands into addw rd, rd, rs2.

§Forms

Assembly: c.addw xd, rs2

§

CAND = 96

And

And rd with rs2, and store the result in rd The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15). C.AND expands into and rd, rd, rs2.

§Forms

Assembly: c.and xd, rs2

§

CANDI = 97

And immediate

And an immediate to the value in rd, and store the result in rd. The rd register index should be used as rd+8 (registers x8-x15). C.ANDI expands into andi rd, rd, imm.

§Forms

Assembly: c.andi xd, imm

§

CBEQZ = 98

Branch if Equal Zero

C.BEQZ performs conditional control transfers. The offset is sign-extended and added to the pc to form the branch target address. It can therefore target a ±256 B range. C.BEQZ takes the branch if the value in register rs1’ is zero. It expands to beq rs1, x0, offset.

§Forms

Assembly: c.beqz xs1, imm

§

CBNEZ = 99

Branch if NOT Equal Zero

C.BEQZ performs conditional control transfers. The offset is sign-extended and added to the pc to form the branch target address. It can therefore target a ±256 B range. C.BEQZ takes the branch if the value in register rs1’ is NOT zero. It expands to beq rs1, x0, offset.

§Forms

Assembly: c.bnez xs1, imm

§

CEBREAK = 100

Breakpoint exception.

The C.EBREAK instruction is used by debuggers to cause control to be transferred back to a debugging environment. Unless overridden by an external debug environment, C.EBREAK raises a breakpoint exception and performs no other operation.

[NOTE] As described in the C Standard Extension for Compressed Instructions, the c.ebreak instruction performs the same operation as the EBREAK instruction.

EBREAK causes the receiving privilege mode’s epc register to be set to the address of the EBREAK instruction itself, not the address of the following instruction. As EBREAK causes a synchronous exception, it is not considered to retire, and should not increment the minstret CSR.

§Forms

Assembly: c.ebreak " "

§

CFLD = 101

Load double-precision

Loads a double precision floating-point value from memory into register rd. It computes an effective address by adding the zero-extended offset, scaled by 8, to the base address in register rs1. It expands to fld rd, offset(rs1).

§Forms

Assembly: c.fld xd, imm(xs1)

§

CFLDSP = 102

Load doubleword into floating-point register from stack

Loads a double-precision floating-point value from memory into floating-point register rd. It computes its effective address by adding the zero-extended offset, scaled by 8, to the stack pointer, x2. It expands to fld rd, offset(x2).

§Forms

Assembly: c.fldsp fd, imm(sp)

§

CFLW = 103

Load single-precision

Loads a single precision floating-point value from memory into register rd. It computes an effective address by adding the zero-extended offset, scaled by 4, to the base address in register rs1. It expands to flw rd, offset(rs1).

§Forms

Assembly: c.flw xd, imm(xs1)

§

CFLWSP = 104

Load word into floating-point register from stack

Loads a single-precision floating-point value from memory into floating-point register rd. It computes its effective address by adding the zero-extended offset, scaled by 4, to the stack pointer, x2. It expands to flw rd, offset(x2).

§Forms

Assembly: c.flwsp fd, imm(sp)

§

CFSD = 105

Store double-precision

Stores a double precision floating-point value in register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 8, to the base address in register rs1. It expands to fsd rs2, offset(rs1).

§Forms

Assembly: c.fsd xs2, imm(xs1)

§

CFSDSP = 106

Store double-precision value to stack

Stores a double-precision floating-point value in floating-point register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 8, to the stack pointer, x2. It expands to fsd rs2, offset(x2).

§Forms

Assembly: c.fsdsp fs2, imm(sp)

§

CFSW = 107

Store single-precision

Stores a single precision floating-point value in register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 4, to the base address in register rs1. It expands to fsw rs2, offset(rs1).

§Forms

Assembly: c.fsw xs2, imm(xs1)

§

CFSWSP = 108

Store single-precision value to stack

Stores a single-precision floating-point value in floating-point register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 4, to the stack pointer, x2. It expands to fsw rs2, offset(x2).

§Forms

Assembly: c.fswsp fs2, imm(sp)

§

CJ = 109

Jump

C.J performs an unconditional control transfer. The offset is sign-extended and added to the pc to form the jump target address. C.J can therefore target a ±2 KiB range. It expands to jal x0, offset.

§Forms

Assembly: c.j imm

§

CJAL = 110

Jump and Link

C.JAL is an RV32C-only instruction that performs the same operation as C.J, but additionally writes the address of the instruction following the jump (pc+2) to the link register, x1. It expands to jal x1, offset.

§Forms

Assembly: c.jal imm

§

CJALR = 111

Jump and Link Register.

C.JALR (jump and link register) performs the same operation as C.JR, but additionally writes the address of the instruction following the jump (pc+2) to the link register, x1. C.JALR expands to jalr x1, 0(rs1).

§Forms

Assembly: c.jalr xs1

§

CJR = 112

Jump Register

C.JR (jump register) performs an unconditional control transfer to the address in register rs1. C.JR expands to jalr x0, 0(rs1).

§Forms

Assembly: c.jr xs1

§

CLBU = 113

Load unsigned byte, 16-bit encoding

Loads a 8-bit value from memory into register rd. It computes an effective address by adding the zero-extended offset, to the base address in register rs1. It expands to lbu rd, offset(rs1).

§Forms

Assembly: c.lbu xd, imm(xs1)

§

CLD = 114

Load double

Loads a 64-bit value from memory into register rd. It computes an effective address by adding the zero-extended offset, scaled by 8, to the base address in register rs1. It expands to ld rd, offset(rs1).

§Forms

Assembly: c.ld xd, imm(xs1)

§

CLDSP = 115

Load doubleword from stack pointer

C.LDSP is an RV64C/RV128C-only instruction that loads a 64-bit value from memory into register rd. It computes its effective address by adding the zero-extended offset, scaled by 8, to the stack pointer, x2. It expands to ld rd, offset(x2). C.LDSP is only valid when rd ≠ x0 the code points with rd=x0 are reserved.

§Forms

Assembly: c.ldsp xd, imm(sp)

§

CLH = 116

Load signed halfword, 16-bit encoding

Loads a 16-bit value from memory into register rd. It computes an effective address by adding the zero-extended offset, to the base address in register rs1. It expands to lh rd, offset(rs1).

§Forms

Assembly: c.lh xd, imm(xs1)

§

CLHU = 117

Load unsigned halfword, 16-bit encoding

Loads a 16-bit value from memory into register rd. It computes an effective address by adding the zero-extended offset, to the base address in register rs1. It expands to lhu rd, offset(rs1).

§Forms

Assembly: c.lhu xd, imm(xs1)

§

CLI = 118

Load the sign-extended 6-bit immediate

C.LI loads the sign-extended 6-bit immediate, imm, into register rd. C.LI expands into addi rd, x0, imm. C.LI is only valid when rd ≠ x0; the code points with rd=x0 encode HINTs.

§Forms

Assembly: c.li xd, imm

§

CLUI = 119

Load the non-zero 6-bit immediate field into bits 17-12 of the destination register

C.LUI loads the non-zero 6-bit immediate field into bits 17-12 of the destination register, clears the bottom 12 bits, and sign-extends bit 17 into all higher bits of the destination. C.LUI expands into lui rd, imm. C.LUI is only valid when rd≠x0 and rd≠x2, and when the immediate is not equal to zero. The code points with imm=0 are reserved; the remaining code points with rd=x0 are HINTs; and the remaining code points with rd=x2 correspond to the C.ADDI16SP instruction

§Forms

Assembly: c.lui xd, imm

§

CLW = 120

Load word

Loads a 32-bit value from memory into register rd. It computes an effective address by adding the zero-extended offset, scaled by 4, to the base address in register rs1. It expands to lw rd, offset(rs1).

§Forms

Assembly: c.lw xd, imm(xs1)

§

CLWSP = 121

Load word from stack pointer

Loads a 32-bit value from memory into register rd. It computes an effective address by adding the zero-extended offset, scaled by 4, to the stack pointer, x2. It expands to lw rd, offset(x2). C.LWSP is only valid when rd ≠ x0. The code points with rd=x0 are reserved.

§Forms

Assembly: c.lwsp xd, imm(sp)

§

CMOP1 = 122

RISC-V c.mop.1 instruction.

§Forms

Assembly: c.mop.1

§

CMOP11 = 123

RISC-V c.mop.11 instruction.

§Forms

Assembly: c.mop.11

§

CMOP13 = 124

RISC-V c.mop.13 instruction.

§Forms

Assembly: c.mop.13

§

CMOP15 = 125

RISC-V c.mop.15 instruction.

§Forms

Assembly: c.mop.15

§

CMOP3 = 126

RISC-V c.mop.3 instruction.

§Forms

Assembly: c.mop.3

§

CMOP5 = 127

RISC-V c.mop.5 instruction.

§Forms

Assembly: c.mop.5

§

CMOP7 = 128

RISC-V c.mop.7 instruction.

§Forms

Assembly: c.mop.7

§

CMOP9 = 129

RISC-V c.mop.9 instruction.

§Forms

Assembly: c.mop.9

§

CMOPN = 130

RISC-V c.mop.n instruction.

§Forms

Assembly: c.mop.n c_mop_t

§

CMUL = 131

Multiply, 16-bit encoding

This instruction multiplies XLEN bits of the source operands from rsd’ and rs2’ and writes the lowest XLEN bits of the result to rsd’.

§Forms

Assembly: c.mul xd, xs2

§

CMV = 132

Move Register

C.MV (move register) performs copy of the data in register rs2 to register rd C.MV expands to addi rd, x0, rs2.

§Forms

Assembly: c.mv xd, xs2

§

CNOP = 133

Non-operation

C.NOP expands into addi x0, x0, imm.

§Forms

Assembly: c.nop imm

§

CNOT = 134

Bitwise not, 16-bit encoding

This instruction takes a single source/destination operand. This instruction takes the one’s complement of rd’/rs1’ and writes the result to the same register.

§Forms

Assembly: c.not xd

§

CNTLALL = 135

RISC-V c.ntl.all instruction.

§Forms

Assembly: c.ntl.all

§

CNTLP1 = 136

RISC-V c.ntl.p1 instruction.

§Forms

Assembly: c.ntl.p1

§

CNTLPALL = 137

RISC-V c.ntl.pall instruction.

§Forms

Assembly: c.ntl.pall

§

CNTLS1 = 138

RISC-V c.ntl.s1 instruction.

§Forms

Assembly: c.ntl.s1

§

COR = 139

Or

Or rd with rs2, and store the result in rd The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15). C.OR expands into or rd, rd, rs2.

§Forms

Assembly: c.or xd, rs2

§

CSB = 140

Store unsigned byte, 16-bit encoding

Stores a 8-bit value from register rs2 into memory. It computes an effective address by adding the zero-extended offset, to the base address in register rs1. It expands to sb rs2, offset(rs1).

§Forms

Assembly: c.sb xs2, imm(xs1)

§

CSD = 141

Store double

Stores a 64-bit value in register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 8, to the base address in register rs1. It expands to sd rs2, offset(rs1).

§Forms

Assembly: c.sd xs2, imm(xs1)

§

CSDSP = 142

Store doubleword to stack

Stores a 64-bit value in register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 8, to the stack pointer, x2. It expands to sd rs2, offset(x2).

§Forms

Assembly: c.sdsp xs2, imm(sp)

§

CSEXTB = 143

Sign-extend byte, 16-bit encoding

This instruction takes a single source/destination operand. This instruction sign-extends the least-significant byte of the source to XLEN by copying the most-significant bit in the byte (i.e., bit 7) to all of the more-significant bits.

§Forms

Assembly: c.sext.b xd

§

CSEXTH = 144

Sign-extend halfword, 16-bit encoding

This instruction takes a single source/destination operand. This instruction sign-extends the least-significant halfword of the source to XLEN by copying the most-significant bit in the halfword (i.e., bit 15) to all of the more-significant bits.

§Forms

Assembly: c.sext.h xd

§

CSEXTW = 145

RISC-V c.sext.w instruction.

§Forms

Assembly: c.sext.w rd_rs1_n0

§

CSH = 146

Store unsigned halfword, 16-bit encoding

Stores a 16-bit value from register rs2 into memory. It computes an effective address by adding the zero-extended offset, to the base address in register rs1. It expands to sh rs2, offset(rs1).

§Forms

Assembly: c.sh xs2, imm(xs1)

§

CSLLI = 147

Shift left logical immediate

Shift the value in rd left by shamt, and store the result back in rd. C.SLLI expands into slli rd, rd, shamt.

§Forms

Assembly: c.slli xd, shamt

§

CSLLIRV32 = 148

Shift left logical immediate

Shift the value in rd left by shamt, and store the result back in rd. C.SLLI expands into slli rd, rd, shamt.

§Forms

Assembly: c.slli.rv32 xd, shamt

§

CSRAI = 149

Shift right arithmetical immediate

Arithmetic shift (the original sign bit is copied into the vacated upper bits) the value in rd right by shamt, and store the result in rd. The rd register index should be used as rd+8 (registers x8-x15). C.SRAI expands into srai rd, rd, shamt.

§Forms

Assembly: c.srai xd, shamt

§

CSRAIRV32 = 150

Shift right arithmetical immediate

Arithmetic shift (the original sign bit is copied into the vacated upper bits) the value in rd right by shamt, and store the result in rd. The rd register index should be used as rd+8 (registers x8-x15). C.SRAI expands into srai rd, rd, shamt.

§Forms

Assembly: c.srai.rv32 xd, shamt

§

CSRLI = 151

Shift right logical immediate

Shift the value in rd right by shamt, and store the result back in rd. The rd register index should be used as rd+8 (registers x8-x15). C.SRLI expands into srli rd, rd, shamt.

§Forms

Assembly: c.srli xd, shamt

§

CSRLIRV32 = 152

Shift right logical immediate

Shift the value in rd right by shamt, and store the result back in rd. The rd register index should be used as rd+8 (registers x8-x15). C.SRLI expands into srli rd, rd, shamt.

§Forms

Assembly: c.srli.rv32 xd, shamt

§

CSSPOPCHKX5 = 153

RISC-V c.sspopchk.x5 instruction.

§Forms

Assembly: c.sspopchk.x5

§

CSSPUSHX1 = 154

RISC-V c.sspush.x1 instruction.

§Forms

Assembly: c.sspush.x1

§

CSUB = 155

Subtract

Subtract the value in rs2 from rd, and store the result in rd. The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15). C.SUB expands into sub rd, rd, rs2.

§Forms

Assembly: c.sub xd, rs2

§

CSUBW = 156

Subtract word

Subtract the 32-bit values in rs2 from rd, and store the result in rd. The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15). C.SUBW expands into subw rd, rd, rs2.

§Forms

Assembly: c.subw xd, rs2

§

CSW = 157

Store word

Stores a 32-bit value in register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 4, to the base address in register rs1. It expands to sw rs2, offset(rs1).

§Forms

Assembly: c.sw xs2, imm(xs1)

§

CSWSP = 158

Store word to stack

Stores a 32-bit value in register rs2 to memory. It computes an effective address by adding the zero-extended offset, scaled by 4, to the stack pointer, x2. It expands to sw rs2, offset(x2).

§Forms

Assembly: c.swsp xs2, imm(sp)

§

CXOR = 159

Exclusive Or

Exclusive or rd with rs2, and store the result in rd The rd and rs2 register indexes should be used as rd+8 and rs2+8 (registers x8-x15). C.XOR expands into xor rd, rd, rs2.

§Forms

Assembly: c.xor xd, rs2

§

CZEXTB = 160

Zero-extend byte, 16-bit encoding

This instruction takes a single source/destination operand. This instruction zero-extends the least-significant byte of the source to XLEN by inserting 0’s into all of the bits more significant than 7.

§Forms

Assembly: c.zext.b xd

§

CZEXTH = 161

Zero-extend halfword, 16-bit encoding

This instruction takes a single source/destination operand. This instruction zero-extends the least-significant halfword of the source to XLEN by inserting 0’s into all of the bits more significant than 15.

§Forms

Assembly: c.zext.h xd

§

CZEXTW = 162

Zero-extend word, 16-bit encoding

This instruction takes a single source/destination operand. It zero-extends the least-significant word of the operand to XLEN bits by inserting zeros into all of the bits more significant than 31.

§Forms

Assembly: c.zext.w xd

§

CBOCLEAN = 163

Cache Block Clean

Cleans an entire cache block globally throughout the system.

Exactly what happens is coherence protocol-dependent, but in general it is expected that after this operation():

  • The cache block will be in the clean (not dirty) state in any coherent cache holding a valid copy of the line.
  • The data will be cleaned to a point such that an incoherent load can observe the cleaned data.

cbo.clean is ordered by FENCE instructions but not FENCE.I or SFENCE.VMA.

<%- if CACHE_BLOCK_SIZE.bit_length > [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Both PMP and PMA access control must be the same for all bytes in the block; otherwise, cbo.clean has UNSPECIFIED behavior. <%- end -%>

Clean operations are treated as stores for page and access permissions. If permission checks fail, one of the following exceptions will occur:

<%- if ext?(:H) -%>

  • Store/AMO Guest-Page Fault if virtual memory translation fails during G-stage translation. <%- end -%>
  • Store/AMO Page Fault if virtual memory translation fails <% if ext?(:H) %>when V=0 or during VS-stage translation<% end %>
  • Store/AMO Access Fault if a PMP or PMA access check fails

<%- if CACHE_BLOCK_SIZE.bit_length <= [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Because cache blocks are naturally aligned and always fit in a single PMP or PMA regions, the PMP and PMA access checks only need to check a single address in the line. <%- end -%>

CBO operations never raise a misaligned address fault.

§Forms

Assembly: cbo.clean "TODO"

§

CBOFLUSH = 164

Cache Block Flush

Flushes an entire cache block by cleaning it and then invalidating it in all caches.

cbo.flush is ordered by FENCE instructions but not FENCE.I or SFENCE.VMA.

<%- if CACHE_BLOCK_SIZE.bit_length > [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Both PMP and PMA access control must be the same for all bytes in the block; otherwise, cbo.flush has UNSPECIFIED behavior. <%- end -%>

Flush operations are treated as stores for page and access permissions. If permission checks fail, one of the following exceptions will occur:

<%- if ext?(:H) -%>

  • Store/AMO Guest-Page Fault if virtual memory translation fails during G-stage translation. <%- end -%>
  • Store/AMO Page Fault if virtual memory translation fails <% if ext?(:H) %>when V=0 or during VS-stage translation<% end %>
  • Store/AMO Access Fault if a PMP or PMA access check fails.

<%- if CACHE_BLOCK_SIZE.bit_length <= [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Because cache blocks are naturally aligned and always fit in a single PMP or PMA regions, the PMP and PMA access checks only need to check a single address in the line. <%- end -%>

CBO operations never raise a misaligned address fault.

§Forms

Assembly: cbo.flush "TODO"

§

CBOINVAL = 165

Cache Block Invalidate

Either invalidates or flushes (clean + invalidate) a cache block, depending on the current mode and value of menvcfg.CBIE, senvcfg.CBIE, and/or henvcfg.CBIE.

The instruction is an invalidate (without a clean) when:

  • In M-mode
  • In (H)S-mode and menvcfg.CBIE == 11
  • In U-mode and menvcfg.CBIE == 11 and senvcfg.CBIE == 11
  • In VS-mode and menvcfg.CBIE == 11 and henvcfg.CBIE == 11
  • In VU-mode and menvcfg.CBIE == 11 and henvcfg.CBIE == 11 and senvcfg.CBIE == 11

Otherwise, if the instruction does not trap (see Access section), the operation is a flush. The table below summarizes the options.

[%autowidth,cols=“1,1,1,1,1,1,1,1”,separator=“!”] !=== .2+h![.rotate]#menvcfg.CBIE# .2+h! [.rotate]#senvcfg.CBIE# .2+h! [.rotate]#henvcfg.CBIE# 5+^.>h! cbe.inval Operation .^h! M-mode .^h! S-mode .^h! U-mode .^h! VS-mode .^h! VU-mode

! 00 ! - ! - ! Invalidate ! Illegal Instruction ! Illegal Instruction ! Virtual Instruction ! Virtual Instruction ! 01 ! 00 ! 00 ! Invalidate ! Flush ! Illegal Instruction ! Virtual Instruction ! Virtual Instruction ! 01 ! 00 ! 01 ! Invalidate ! Flush ! Illegal Instruction ! Flush ! Virtual Instruction ! 01 ! 00 ! 11 ! Invalidate ! Flush ! Illegal Instruction ! Flush ! Virtual Instruction ! 01 ! 01 ! 00 ! Invalidate ! Flush ! Flush ! Virtual Instruction ! Virtual Instruction ! 01 ! 01 ! 01 ! Invalidate ! Flush ! Flush ! Flush ! Flush ! 01 ! 01 ! 11 ! Invalidate ! Flush ! Flush ! Flush ! Flush ! 01 ! 11 ! 00 ! Invalidate ! Flush ! Flush ! Virtual Instruction ! Virtual Instruction ! 01 ! 11 ! 01 ! Invalidate ! Flush ! Flush ! Flush ! Flush ! 01 ! 11 ! 11 ! Invalidate ! Flush ! Flush ! Flush ! Flush ! 11 ! 00 ! 00 ! Invalidate ! Invalidate ! Illegal Instruction ! Virtual Instruction ! Virtual Instruction ! 11 ! 00 ! 01 ! Invalidate ! Invalidate ! Illegal Instruction ! Flush ! Virtual Instruction ! 11 ! 00 ! 11 ! Invalidate ! Invalidate ! Illegal Instruction ! Invalidate ! Virtual Instruction ! 11 ! 01 ! 00 ! Invalidate ! Invalidate ! Flush ! Virtual Instruction ! Virtual Instruction ! 11 ! 01 ! 01 ! Invalidate ! Invalidate ! Flush ! Flush ! Flush ! 11 ! 01 ! 11 ! Invalidate ! Invalidate ! Flush ! Invalidate ! Flush ! 11 ! 11 ! 00 ! Invalidate ! Invalidate ! Invalidate ! Virtual Instruction ! Virtual Instruction ! 11 ! 11 ! 01 ! Invalidate ! Invalidate ! Invalidate ! Flush ! Flush ! 11 ! 11 ! 11 ! Invalidate ! Invalidate ! Invalidate ! Invalidate ! Invalidate !===

cbo.inval is ordered by FENCE instructions but not FENCE.I or SFENCE.VMA.

<%- if CACHE_BLOCK_SIZE.bit_length > [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Both PMP and PMA access control must be the same for all bytes in the block; otherwise, cbo.zero has UNSPECIFIED behavior. <%- end -%>

Invalidate operations are treated as stores for page and access permissions. If permission checks fail, one of the following exceptions will occur:

<%- if ext?(:H) -%>

  • Store/AMO Guest-Page Fault if virtual memory translation fails during G-stage translation. <%- end -%>
  • Store/AMO Page Fault if virtual memory translation fails <% if ext?(:H) %>when V=0 or during VS-stage translation<% end %>
  • Store/AMO Access Fault if a PMP or PMA access check fails.

<%- if CACHE_BLOCK_SIZE.bit_length <= [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Because cache blocks are naturally aligned and always fit in a single PMP or PMA regions, the PMP and PMA access checks only need to check a single address in the line. <%- end -%>

CBO operations never raise a misaligned address fault.

§Forms

Assembly: cbo.inval "TODO"

§

CBOZERO = 166

Cache Block Zero

Zeros an entire cache block

The block zeroing does not need to be atomic.

cbo.zero is ordered by FENCE instructions but not FENCE.I or SFENCE.VMA.

<%- if CACHE_BLOCK_SIZE.bit_length > [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Both PMP and PMA access control must be the same for all bytes in the block; otherwise, cbo.zero has UNSPECIFIED behavior. <%- end -%>

Clean operations are treated as stores for page and access permissions. If permission checks fail, one of the following exceptions will occur:

<%- if ext?(:H) -%>

  • Store/AMO Guest-Page Fault if virtual memory translation fails during G-stage translation. <%- end -%>
  • Store/AMO Page Fault if virtual memory translation fails <% if ext?(:H) %>when V=0 or during VS-stage translation<% end %>
  • Store/AMO Access Fault if a PMP or PMA access check fails.

<%- if CACHE_BLOCK_SIZE.bit_length <= [PMP_GRANULARITY, PMA_GRANULARITY].min -%> Because cache blocks are naturally aligned and always fit in a single PMP or PMA regions, the PMP and PMA access checks only need to check a single address in the line. <%- end -%>

CBO operations never raise a misaligned address fault.

§Forms

Assembly: cbo.zero "TODO"

§

CLMUL = 167

Carry-less multiply (low-part)

clmul produces the lower half of the 2*XLEN carry-less product

§Forms

Assembly: clmul xd, xs1, xs2

§

CLMULH = 168

Carry-less multiply (high-part)

clmulh produces the upper half of the 2*XLEN carry-less product

§Forms

Assembly: clmulh xd, xs1, xs2

§

CLMULR = 169

Carry-less multiply (reversed)

clmulr produces bits 2XLEN-2:XLEN-1 of the 2XLEN carry-less product

§Forms

Assembly: clmulr xd, xs1, xs2

§

CLZ = 170

Count leading zero bits

This instruction counts the number of 0’s before the first 1, starting at the most-significant bit (i.e., XLEN-1) and progressing to bit 0. Accordingly, if the input is 0, the output is XLEN, and if the most-significant bit of the input is a 1, the output is 0.

§Forms

Assembly: clz xd, xs1

§

CLZW = 171

Count leading zero bits in word

This instruction counts the number of 0’s before the first 1 starting at bit 31 and progressing to bit 0. Accordingly, if the least-significant word is 0, the output is 32, and if the most-significant bit of the word (i.e., bit 31) is a 1, the output is 0.

§Forms

Assembly: clzw xd, xs1

§

CMJALT = 172

RISC-V cm.jalt instruction.

§Forms

Assembly: cm.jalt c_index

§

CMMVA01S = 173

Move two s0-s7 registers into a0-a1

This instruction moves r1s’ into a0 and r2s’ into a1. The execution is atomic, so it is not possible to observe state where only one of a0 or a1 have been updated. The encoding uses sreg number specifiers instead of xreg number specifiers to save encoding space. The mapping between them is specified in the pseudo-code below.

§Forms

Assembly: cm.mva01s r1s, r2s

§

CMMVSA01 = 174

Move a0-a1 into two registers of s0-s7

This instruction moves a0 into r1s’ and a1 into r2s’. r1s’ and r2s’ must be different. The execution is atomic, so it is not possible to observe state where only one of r1s’ or r2s’ has been updated. The encoding uses sreg number specifiers instead of xreg number specifiers to save encoding space. The mapping between them is specified in the pseudo-code below.

§Forms

Assembly: cm.mvsa01 r1s, r2s

§

CMPOP = 175

Destroy function call stack frame

Destroy stack frame: load ra and 0 to 12 saved registers from the stack frame, deallocate the stack frame. This instruction pops (loads) the registers in reg_list from stack memory, and then adjusts the stack pointer by stack_adj.

Restrictions on stack_adj:

  • it must be enough to store all of the listed registers
  • it must be a multiple of 16 (bytes): ** for RV32 the allowed values are: 16, 32, 48, 64, 80, 96, 112 ** for RV64 the allowed values are: 16, 32, 48, 64, 80, 96, 112, 128, 144, 160

§Forms

Assembly: cm.pop reg_list, stack_adj

§

CMPOPRET = 176

Destroy function call stack frame and return to ra.

Destroy stack frame: load ra and 0 to 12 saved registers from the stack frame, deallocate the stack frame, return to ra. This instruction pops (loads) the registers in reg_list from stack memory, and then adjusts the stack pointer by stack_adj and then return to ra.

Restrictions on stack_adj:

  • it must be enough to store all of the listed registers
  • it must be a multiple of 16 (bytes): ** for RV32 the allowed values are: 16, 32, 48, 64, 80, 96, 112 ** for RV64 the allowed values are: 16, 32, 48, 64, 80, 96, 112, 128, 144, 160

§Forms

Assembly: cm.popret reg_list, stack_adj

§

CMPOPRETZ = 177

Destroy function call stack frame, move zero to a0 and return to ra.

Destroy stack frame: load ra and 0 to 12 saved registers from the stack frame, deallocate the stack frame, move zero to a0, return to ra. This instruction pops (loads) the registers in reg_list from stack memory, and then adjusts the stack pointer by stack_adj, move zero to a0 and then return to ra.

Restrictions on stack_adj:

  • it must be enough to store all of the listed registers
  • it must be a multiple of 16 (bytes): ** for RV32 the allowed values are: 16, 32, 48, 64, 80, 96, 112 ** for RV64 the allowed values are: 16, 32, 48, 64, 80, 96, 112, 128, 144, 160

§Forms

Assembly: cm.popretz reg_list, stack_adj

§

CMPUSH = 178

Create function call stack frame

Create stack frame: store ra and 0 to 12 saved registers to the stack frame, optionally allocate additional stack space. This instruction pushes (stores) the registers in reg_list to the memory below the stack pointer, and then creates the stack frame by decrementing the stack pointer by stack_adj.

Restrictions on stack_adj:

  • it must be enough to store all of the listed registers
  • it must be a multiple of 16 (bytes): ** for RV32 the allowed values are: 16, 32, 48, 64, 80, 96, 112 ** for RV64 the allowed values are: 16, 32, 48, 64, 80, 96, 112, 128, 144, 160

§Forms

Assembly: cm.push reg_list, -stack_adj

§

CPOP = 179

Count set bits

This instructions counts the number of 1’s (i.e., set bits) in the source register.

§.Software Hint [NOTE]

This operations is known as population count, popcount, sideways sum, bit summation, or Hamming weight.

§The GCC builtin function __builtin_popcount (unsigned int x) is implemented by cpop on RV32 and by cpopw on RV64. The GCC builtin function __builtin_popcountl (unsigned long x) for LP64 is implemented by cpop on RV64.

§Forms

Assembly: cpop xd, xs1

§

CPOPW = 180

Count set bits in word

This instructions counts the number of 1’s (i.e., set bits) in the least-significant word of the source register.

§.Software Hint [NOTE]

This operations is known as population count, popcount, sideways sum, bit summation, or Hamming weight.

§The GCC builtin function __builtin_popcount (unsigned int x) is implemented by cpop on RV32 and by cpopw on RV64. The GCC builtin function __builtin_popcountl (unsigned long x) for LP64 is implemented by cpop on RV64.

§Forms

Assembly: cpopw xd, xs1

§

CSRC = 181

RISC-V csrc instruction.

§Forms

Assembly: csrc rs1 csr

§

CSRCI = 182

RISC-V csrci instruction.

§Forms

Assembly: csrci csr zimm5

§

CSRR = 183

RISC-V csrr instruction.

§Forms

Assembly: csrr rd csr

§

CSRRC = 184

RISC-V csrrc instruction.

§Forms

Assembly: csrrc xd, xs1, csr

§

CSRRCI = 185

RISC-V csrrci instruction.

§Forms

Assembly: csrrci xd, csr, imm

§

CSRRS = 186

Atomic Read and Set Bits in CSR

Atomically read and set bits in a CSR.

Reads the value of the CSR, zero-extends the value to XLEN bits, and writes it to integer register rd. The initial value in integer register rs1 is treated as a bit mask that specifies bit positions to be set in the CSR. Any bit that is high in rs1 will cause the corresponding bit to be set in the CSR, if that CSR bit is writable. Other bits in the CSR are not explicitly written.

§Forms

Assembly: csrrs xd, xs1, csr

§

CSRRSI = 187

RISC-V csrrsi instruction.

§Forms

Assembly: csrrsi xd, csr, imm

§

CSRRW = 188

Atomic Read/Write CSR

Atomically swap values in the CSRs and integer registers.

Read the old value of the CSR, zero-extends the value to XLEN bits, and then write it to integer register rd. The initial value in rs1 is written to the CSR. If rd=x0, then the instruction shall not read the CSR and shall not cause any of the side effects that might occur on a CSR read.

§Forms

Assembly: csrrw xd, xs1, csr

§

CSRRWI = 189

Atomic Read/Write CSR Immediate

Atomically write CSR using a 5-bit immediate, and load the previous value into ‘rd’.

Read the old value of the CSR, zero-extends the value to XLEN bits, and then write it to integer register rd. The 5-bit uimm field is zero-extended and written to the CSR. If rd=x0, then the instruction shall not read the CSR and shall not cause any of the side effects that might occur on a CSR read.

§Forms

Assembly: csrrwi xd, zimm, csr

§

CSRS = 190

RISC-V csrs instruction.

§Forms

Assembly: csrs rs1 csr

§

CSRSI = 191

RISC-V csrsi instruction.

§Forms

Assembly: csrsi csr zimm5

§

CSRW = 192

RISC-V csrw instruction.

§Forms

Assembly: csrw rs1 csr

§

CSRWI = 193

RISC-V csrwi instruction.

§Forms

Assembly: csrwi csr zimm5

§

CTZ = 194

Count trailing zero bits

This instruction counts the number of 0’s before the first 1, starting at the least-significant bit (i.e., 0) and progressing to the most-significant bit (i.e., XLEN-1). Accordingly, if the input is 0, the output is XLEN, and if the least-significant bit of the input is a 1, the output is 0.

§Forms

Assembly: ctz xd, xs1

§

CTZW = 195

Count trailing zero bits in word

This instruction counts the number of 0’s before the first 1, starting at the least-significant bit (i.e., 0) and progressing to the most-significant bit of the least-significant word (i.e., 31). Accordingly, if the least-significant word is 0, the output is 32, and if the least-significant bit of the input is a 1, the output is 0.

§Forms

Assembly: ctzw xd, xs1

§

CZEROEQZ = 196

RISC-V czero.eqz instruction.

§Forms

Assembly: czero.eqz xd, xs1, xs2

§

CZERONEZ = 197

RISC-V czero.nez instruction.

§Forms

Assembly: czero.nez xd, xs1, xs2

§

DIV = 198

Signed division

Divide rs1 by rs2, and store the result in rd. The remainder is discarded.

Division by zero will put -1 into rd.

Division resulting in signed overflow (when most negative number is divided by -1) will put the most negative number into rd;

§Forms

Assembly: div xd, xs1, xs2

§

DIVU = 199

Unsigned division

Divide unsigned values in rs1 by rs2, and store the result in rd.

The remainder is discarded.

If the value in rs2 is zero, rd gets the largest unsigned value.

§Forms

Assembly: divu xd, xs1, xs2

§

DIVUW = 200

Unsigned 32-bit division

Divide the unsigned 32-bit values in rs1 and rs2, and store the sign-extended result in rd.

The remainder is discarded.

If the value in rs2 is zero, rd is written with all 1s.

§Forms

Assembly: divuw xd, xs1, xs2

§

DIVW = 201

Signed 32-bit division

Divide the lower 32-bits of register rs1 by the lower 32-bits of register rs2, and store the sign-extended result in rd.

The remainder is discarded.

Division by zero will put -1 into rd.

Division resulting in signed overflow (when most negative number is divided by -1) will put the most negative number into rd;

§Forms

Assembly: divw xd, xs1, xs2

§

DRET = 202

RISC-V dret instruction.

§Forms

Assembly: dret dret

§

EBREAK = 203

Breakpoint exception

The EBREAK instruction is used by debuggers to cause control to be transferred back to a debugging environment. Unless overridden by an external debug environment, EBREAK raises a breakpoint exception and performs no other operation.

[NOTE] As described in the C Standard Extension for Compressed Instructions, the c.ebreak instruction performs the same operation as the EBREAK instruction.

EBREAK causes the receiving privilege mode’s epc register to be set to the address of the EBREAK instruction itself, not the address of the following instruction. As EBREAK causes a synchronous exception, it is not considered to retire, and should not increment the minstret CSR.

§Forms

Assembly: ebreak ""

§

ECALL = 204

Environment call

The ECALL instruction is used to make a request to the supporting execution environment. When executed in U-mode, S-mode, or M-mode, it generates an environment-call-from-U-mode exception, environment-call-from-S-mode exception, or environment-call-from-M-mode exception, respectively, and performs no other operation.

[NOTE] ECALL generates a different exception for each originating privilege mode so that environment call exceptions can be selectively delegated. A typical use case for Unix-like operating systems is to delegate to S-mode the environment-call-from-U-mode exception but not the others.

ECALL causes the receiving privilege mode’s epc register to be set to the address of the ECALL instruction itself, not the address of the following instruction. As ECALL causes a synchronous exception, it is not considered to retire, and should not increment the minstret CSR.

§Forms

Assembly: ecall ""

§

FABSD = 205

RISC-V fabs.d instruction.

§Forms

Assembly: fabs.d rd rs1 rs2_eq_rs1

§

FABSH = 206

RISC-V fabs.h instruction.

§Forms

Assembly: fabs.h rd rs1 rs2_eq_rs1

§

FABSQ = 207

RISC-V fabs.q instruction.

§Forms

Assembly: fabs.q rd rs1 rs2_eq_rs1

§

FABSS = 208

RISC-V fabs.s instruction.

§Forms

Assembly: fabs.s rd rs1 rs2_eq_rs1

§

FADDD = 209

RISC-V fadd.d instruction.

§Forms

Assembly: fadd.d xd, xs1, xs2, rm

§

FADDH = 210

RISC-V fadd.h instruction.

§Forms

Assembly: fadd.h xd, xs1, xs2, rm

§

FADDQ = 211

RISC-V fadd.q instruction.

§Forms

Assembly: fadd.q qd, qs1, qs2, rm

§

FADDS = 212

Single-precision floating-point addition

Do the single-precision floating-point addition of fs1 and fs2 and store the result in fd. rm is the dynamic Rounding Mode.

§Forms

Assembly: fadd.s fd, fs1, fs2, rm

§

FCLASSD = 213

RISC-V fclass.d instruction.

§Forms

Assembly: fclass.d xd, xs1

§

FCLASSH = 214

RISC-V fclass.h instruction.

§Forms

Assembly: fclass.h xd, xs1

§

FCLASSQ = 215

RISC-V fclass.q instruction.

§Forms

Assembly: fclass.q xd, qs1

§

FCLASSS = 216

Single-precision floating-point classify.

The fclass.s instruction examines the value in floating-point register fs1 and writes to integer register rd a 10-bit mask that indicates the class of the floating-point number. The format of the mask is described in the table below. The corresponding bit in rd will be set if the property is true and clear otherwise. All other bits in rd are cleared. Note that exactly one bit in rd will be set. fclass.s does not set the floating-point exception flags.

.Format of result of fclass instruction. [%autowidth,float=“center”,align=“center”,cols=“^,<”,options=“header”,] |=== |rd bit |Meaning |0 |rs1 is latexmath:[$-\infty$]. |1 |rs1 is a negative normal number. |2 |rs1 is a negative subnormal number. |3 |rs1 is latexmath:[$-0$]. |4 |rs1 is latexmath:[$+0$]. |5 |rs1 is a positive subnormal number. |6 |rs1 is a positive normal number. |7 |rs1 is latexmath:[$+\infty$]. |8 |rs1 is a signaling NaN. |9 |rs1 is a quiet NaN. |===

§Forms

Assembly: fclass.s xd, fs1

§

FCVTBF16S = 217

RISC-V fcvt.bf16.s instruction.

§Forms

Assembly: fcvt.bf16.s xd, xs1, rm

§

FCVTDH = 218

RISC-V fcvt.d.h instruction.

§Forms

Assembly: fcvt.d.h xd, xs1, rm

§

FCVTDL = 219

RISC-V fcvt.d.l instruction.

§Forms

Assembly: fcvt.d.l xd, xs1, rm

§

FCVTDLU = 220

RISC-V fcvt.d.lu instruction.

§Forms

Assembly: fcvt.d.lu xd, xs1, rm

§

FCVTDQ = 221

RISC-V fcvt.d.q instruction.

§Forms

Assembly: fcvt.d.q xd, qs1, rm

§

FCVTDS = 222

RISC-V fcvt.d.s instruction.

§Forms

Assembly: fcvt.d.s xd, xs1, rm

§

FCVTDW = 223

RISC-V fcvt.d.w instruction.

§Forms

Assembly: fcvt.d.w xd, xs1, rm

§

FCVTDWU = 224

RISC-V fcvt.d.wu instruction.

§Forms

Assembly: fcvt.d.wu xd, xs1, rm

§

FCVTHD = 225

RISC-V fcvt.h.d instruction.

§Forms

Assembly: fcvt.h.d xd, xs1, rm

§

FCVTHL = 226

RISC-V fcvt.h.l instruction.

§Forms

Assembly: fcvt.h.l xd, xs1, rm

§

FCVTHLU = 227

RISC-V fcvt.h.lu instruction.

§Forms

Assembly: fcvt.h.lu xd, xs1, rm

§

FCVTHQ = 228

RISC-V fcvt.h.q instruction.

§Forms

Assembly: fcvt.h.q xd, qs1, rm

§

FCVTHS = 229

Convert half-precision float to a single-precision float

Converts a half-precision number in floating-point register fs1 into a single-precision floating-point number in floating-point register fd.

fcvt.h.s rounds according to the rm field.

All floating-point conversion instructions set the Inexact exception flag if the rounded result differs from the operand value and the Invalid exception flag is not set.

§Forms

Assembly: fcvt.h.s fd, xs1

§

FCVTHW = 230

RISC-V fcvt.h.w instruction.

§Forms

Assembly: fcvt.h.w xd, xs1, rm

§

FCVTHWU = 231

RISC-V fcvt.h.wu instruction.

§Forms

Assembly: fcvt.h.wu xd, xs1, rm

§

FCVTLD = 232

RISC-V fcvt.l.d instruction.

§Forms

Assembly: fcvt.l.d xd, xs1, rm

§

FCVTLH = 233

RISC-V fcvt.l.h instruction.

§Forms

Assembly: fcvt.l.h xd, xs1, rm

§

FCVTLQ = 234

RISC-V fcvt.l.q instruction.

§Forms

Assembly: fcvt.l.q xd, qs1, rm

§

FCVTLS = 235

RISC-V fcvt.l.s instruction.

§Forms

Assembly: fcvt.l.s xd, fs1, rm

§

FCVTLUD = 236

RISC-V fcvt.lu.d instruction.

§Forms

Assembly: fcvt.lu.d xd, xs1, rm

§

FCVTLUH = 237

RISC-V fcvt.lu.h instruction.

§Forms

Assembly: fcvt.lu.h xd, xs1, rm

§

FCVTLUQ = 238

RISC-V fcvt.lu.q instruction.

§Forms

Assembly: fcvt.lu.q qd, hs1, rm

§

FCVTLUS = 239

RISC-V fcvt.lu.s instruction.

§Forms

Assembly: fcvt.lu.s xd, fs1, rm

§

FCVTQD = 240

RISC-V fcvt.q.d instruction.

§Forms

Assembly: fcvt.q.d dd, fs1, rm

§

FCVTQH = 241

RISC-V fcvt.q.h instruction.

§Forms

Assembly: fcvt.q.h hd, qs1, rm

§

FCVTQL = 242

RISC-V fcvt.q.l instruction.

§Forms

Assembly: fcvt.q.l qd, xs1, rm

§

FCVTQLU = 243

RISC-V fcvt.q.lu instruction.

§Forms

Assembly: fcvt.q.lu qd, xs1, rm

§

FCVTQS = 244

RISC-V fcvt.q.s instruction.

§Forms

Assembly: fcvt.q.s qd, fs1, rm

§

FCVTQW = 245

RISC-V fcvt.q.w instruction.

§Forms

Assembly: fcvt.q.w fd, xs1, rm

§

FCVTQWU = 246

RISC-V fcvt.q.wu instruction.

§Forms

Assembly: fcvt.q.wu qd, xs1, rm

§

FCVTSBF16 = 247

RISC-V fcvt.s.bf16 instruction.

§Forms

Assembly: fcvt.s.bf16 xd, xs1, rm

§

FCVTSD = 248

RISC-V fcvt.s.d instruction.

§Forms

Assembly: fcvt.s.d xd, xs1, rm

§

FCVTSH = 249

Convert single-precision float to a half-precision float

Converts a single-precision number in floating-point register fs1 into a half-precision floating-point number in floating-point register fd.

fcvt.s.h will never round, and so the ‘rm’ field is effectively ignored.

§Forms

Assembly: fcvt.s.h fd, xs1

§

FCVTSL = 250

RISC-V fcvt.s.l instruction.

§Forms

Assembly: fcvt.s.l fd, xs1, rm

§

FCVTSLU = 251

RISC-V fcvt.s.lu instruction.

§Forms

Assembly: fcvt.s.lu fd, xs1, rm

§

FCVTSQ = 252

RISC-V fcvt.s.q instruction.

§Forms

Assembly: fcvt.s.q fd, qs1, rm

§

FCVTSW = 253

Convert signed 32-bit integer to single-precision float

Converts a 32-bit signed integer in integer register rs1 into a floating-point number in floating-point register fd.

All floating-point to integer and integer to floating-point conversion instructions round according to the rm field. A floating-point register can be initialized to floating-point positive zero using fcvt.s.w rd, x0, which will never set any exception flags.

All floating-point conversion instructions set the Inexact exception flag if the rounded result differs from the operand value and the Invalid exception flag is not set.

§Forms

Assembly: fcvt.s.w fd, xs1

§

FCVTSWU = 254

RISC-V fcvt.s.wu instruction.

§Forms

Assembly: fcvt.s.wu fd, xs1, rm

§

FCVTWD = 255

RISC-V fcvt.w.d instruction.

§Forms

Assembly: fcvt.w.d xd, xs1, rm

§

FCVTWH = 256

RISC-V fcvt.w.h instruction.

§Forms

Assembly: fcvt.w.h xd, xs1, rm

§

FCVTWQ = 257

RISC-V fcvt.w.q instruction.

§Forms

Assembly: fcvt.w.q xd, qs1, rm

§

FCVTWS = 258

Convert single-precision float to integer word to signed 32-bit integer.

Converts a floating-point number in floating-point register fs1 to a signed 32-bit integer indicates integer register rd.

For XLEN >32, fcvt.w.s sign-extends the 32-bit result to the destination register width.

If the rounded result is not representable as a 32-bit signed integer, it is clipped to the nearest value and the invalid flag is set.

The range of valid inputs and behavior for invalid inputs are:

[separator=“!”] !=== ! ! Value

h! Minimum valid input (after rounding) ! -2^31 h! Maximum valid input (after rounding) ! 2^31 - 1 h! Output for out-of-range negative input ! -2^31 h! Output for -&infin; ! -2^31 h! Output for out-of-range positive input ! 2^31 - 1 h! Output for +&infin; for NaN ! 2^31 - 1 !===

All floating-point to integer and integer to floating-point conversion instructions round according to the rm field. A floating-point register can be initialized to floating-point positive zero using fcvt.s.w rd, x0, which will never set any exception flags.

All floating-point conversion instructions set the Inexact exception flag if the rounded result differs from the operand value and the Invalid exception flag is not set.

§Forms

Assembly: fcvt.w.s xd, fs1

§

FCVTWUD = 259

RISC-V fcvt.wu.d instruction.

§Forms

Assembly: fcvt.wu.d xd, xs1, rm

§

FCVTWUH = 260

RISC-V fcvt.wu.h instruction.

§Forms

Assembly: fcvt.wu.h xd, xs1, rm

§

FCVTWUQ = 261

RISC-V fcvt.wu.q instruction.

§Forms

Assembly: fcvt.wu.q xd, xs1, rm

§

FCVTWUS = 262

RISC-V fcvt.wu.s instruction.

§Forms

Assembly: fcvt.wu.s xd, fs1, rm

§

FCVTMODWD = 263

RISC-V fcvtmod.w.d instruction.

§Forms

Assembly: fcvtmod.w.d xd, xs1

§

FDIVD = 264

RISC-V fdiv.d instruction.

§Forms

Assembly: fdiv.d xd, xs1, xs2, rm

§

FDIVH = 265

RISC-V fdiv.h instruction.

§Forms

Assembly: fdiv.h xd, xs1, xs2, rm

§

FDIVQ = 266

RISC-V fdiv.q instruction.

§Forms

Assembly: fdiv.q qd, qs1, qs2, rm

§

FDIVS = 267

RISC-V fdiv.s instruction.

§Forms

Assembly: fdiv.s fd, fs1, fs2, rm

§

FENCE = 268

Memory ordering fence

Orders memory operations.

The fence instruction is used to order device I/O and memory accesses as viewed by other RISC-V harts and external devices or coprocessors. Any combination of device input (I), device output (O), memory reads (R), and memory writes (W) may be ordered with respect to any combination of the same. Informally, no other RISC-V hart or external device can observe any operation in the successor set following a fence before any operation in the predecessor set preceding the fence.

The predecessor and successor fields have the same format to specify operation types:

[%autowidth] |=== 4+| pred 4+| succ

| 27 | 26 |25 | 24 | 23 | 22 | 21| 20 | PI | PO |PR | PW | SI | SO |SR | SW |===

[%autowidth,align=“center”,cols=“^1,^1,<3”,options=“header”] .Fence mode encoding |=== |fm field |Mnemonic |Meaning |0000 |none |Normal Fence |1000 |TSO |With FENCE RW,RW: exclude write-to-read ordering; otherwise: Reserved for future use. 2+|other |Reserved for future use. |===

When the mode field fm is 0001 and both the predecessor and successor sets are ‘RW’, then the instruction acts as a special-case fence.tso. fence.tso orders all load operations in its predecessor set before all memory operations in its successor set, and all store operations in its predecessor set before all store operations in its successor set. This leaves non-AMO store operations in the ’fence.tso’s predecessor set unordered with non-AMO loads in its successor set.

When mode field fm is not 0001, or when mode field fm is 0001 but the pred and succ fields are not both ‘RW’ (0x3), then the fence acts as a baseline fence (e.g., fm is effectively 0000). This is unaffected by the FIOM bits, described below (implicit promotion does not change how fence.tso is decoded).

The rs1 and rd fields are unused and ignored.

In modes other than M-mode, fence is further affected by menvcfg.FIOM, senvcfg.FIOM<% if ext?(:H) %>, and/or henvcfg.FIOM<% end %> as follows:

.Effective PR/PW/SR/SW in (H)S-mode [%autowidth,cols=“,,,”,options=“header”,separator=“!”] !=== ! [.rotate]#menvcfg.FIOM# ! pred.PI + pred.PO + succ.SI + succ.SO ! -> + -> + -> + -> ! effective PR + effective PW + effective SR + effective SW

! 0 ! - ! ! from encoding ! 1 ! 0 ! ! from encoding ! 1 ! 1 ! ! 1 !===

.Effective PR/PW/SR/SW in U-mode [%autowidth,options=“header”,separator=“!”,cols=“,,,,”] !=== ! [.rotate]#menvcfg.FIOM# ! [.rotate]#senvcfg.FIOM# ! pred.PI + pred.PO + succ.SI + succ.SO ! -> + -> + -> + -> ! effective PR + effective PW + effective SR + effective SW

! 0 ! 0 ! - ! ! from encoding ! 0 ! 1 ! 0 ! ! from encoding ! 0 ! 1 ! 1 ! ! 1 ! 1 ! - ! 0 ! ! from encoding ! 1 ! - ! 1 ! ! 1 !===

<%- if ext?(:H) -%> .Effective PR/PW/SR/SW in VS-mode and VU-mode [%autowidth,options=“header”,separator=“!”,cols=“,,,,”] !=== ! [.rotate]#menvcfg.FIOM# ! [.rotate]#henvcfg.FIOM# ! pred.PI + pred.PO + succ.SI + succ.SO ! -> + -> + -> + -> ! effective PR + effective PW + effective SR + effective SW

! 0 ! 0 ! - ! ! from encoding ! 0 ! 1 ! 0 ! ! from encoding ! 0 ! 1 ! 1 ! ! 1 ! 1 ! - ! 0 ! ! from encoding ! 1 ! - ! 1 ! ! 1 !=== <%- end -%>

§Forms

Assembly: fence "TODO"

§

FENCEI = 269

Instruction fence

The FENCE.I instruction is used to synchronize the instruction and data streams. RISC-V does not guarantee that stores to instruction memory will be made visible to instruction fetches on a RISC-V hart until that hart executes a FENCE.I instruction. A FENCE.I instruction ensures that a subsequent instruction fetch on a RISC-V hart will see any previous data stores already visible to the same RISC-V hart. FENCE.I does not ensure that other RISC-V harts’ instruction fetches will observe the local hart’s stores in a multiprocessor system. To make a store to instruction memory visible to all RISC-V harts, the writing hart also has to execute a data FENCE before requesting that all remote RISC-V harts execute a FENCE.I.

The unused fields in the FENCE.I instruction, imm[11:0], rs1, and rd, are reserved for finer-grain fences in future extensions. For forward compatibility, base implementations shall ignore these fields, and standard software shall zero these fields. (((FENCE.I, finer-grained))) (((FENCE.I, forward compatibility)))

§[NOTE]

§Because FENCE.I only orders stores with a hart’s own instruction fetches, application code should only rely upon FENCE.I if the application thread will not be migrated to a different hart. The EEI can provide mechanisms for efficient multiprocessor instruction-stream synchronization.

§Forms

Assembly: fence.i ""

§

FENCETSO = 270

RISC-V fence.tso instruction.

§Forms

Assembly: fence.tso

§

FEQD = 271

RISC-V feq.d instruction.

§Forms

Assembly: feq.d xd, xs1, xs2

§

FEQH = 272

RISC-V feq.h instruction.

§Forms

Assembly: feq.h xd, xs1, xs2

§

FEQQ = 273

RISC-V feq.q instruction.

§Forms

Assembly: feq.q xd, qs1, qs2

§

FEQS = 274

Single-precision floating-point equal

Writes 1 to rd if fs1 and fs2 are equal, and 0 otherwise.

If either operand is NaN, the result is 0 (not equal). If either operand is a signaling NaN, the invalid flag is set.

Positive zero is considered equal to negative zero.

§Forms

Assembly: feq.s xd, fs1, fs2

§

FLD = 275

RISC-V fld instruction.

§Forms

Assembly: fld xd, xs1, imm

§

FLED = 276

RISC-V fle.d instruction.

§Forms

Assembly: fle.d xd, xs1, xs2

§

FLEH = 277

RISC-V fle.h instruction.

§Forms

Assembly: fle.h xd, xs1, xs2

§

FLEQ = 278

RISC-V fle.q instruction.

§Forms

Assembly: fle.q xd, qs1, qs2

§

FLES = 279

Single-precision floating-point less than or equal

Writes 1 to rd if fs1 is less than or equal to fs2, and 0 otherwise.

If either operand is NaN, the result is 0 (not equal). If either operand is a NaN (signaling or quiet), the invalid flag is set.

Positive zero and negative zero are considered equal.

§Forms

Assembly: fle.s xd, fs1, fs2

§

FLEQD = 280

RISC-V fleq.d instruction.

§Forms

Assembly: fleq.d xd, xs1, xs2

§

FLEQH = 281

RISC-V fleq.h instruction.

§Forms

Assembly: fleq.h xd, xs1, xs2

§

FLEQQ = 282

RISC-V fleq.q instruction.

§Forms

Assembly: fleq.q xd, qs1, qs2

§

FLEQS = 283

RISC-V fleq.s instruction.

§Forms

Assembly: fleq.s xd, fs1, fs2

§

FLH = 284

Half-precision floating-point load

The flh instruction loads a single-precision floating-point value from memory at address rs1 + imm into floating-point register rd.

flh does not modify the bits being transferred; in particular, the payloads of non-canonical NaNs are preserved.

flh is only guaranteed to execute atomically if the effective address is naturally aligned.

§Forms

Assembly: flh fd, imm(xs1)

§

FLID = 285

RISC-V fli.d instruction.

§Forms

Assembly: fli.d xd, xs1

§

FLIH = 286

RISC-V fli.h instruction.

§Forms

Assembly: fli.h xd, xs1

§

FLIQ = 287

RISC-V fli.q instruction.

§Forms

Assembly: fli.q fd, qs1

§

FLIS = 288

RISC-V fli.s instruction.

§Forms

Assembly: fli.s fd, fs1

§

FLQ = 289

RISC-V flq instruction.

§Forms

Assembly: flq qd, xs1, imm

§

FLTD = 290

RISC-V flt.d instruction.

§Forms

Assembly: flt.d xd, xs1, xs2

§

FLTH = 291

RISC-V flt.h instruction.

§Forms

Assembly: flt.h xd, xs1, xs2

§

FLTQ = 292

RISC-V flt.q instruction.

§Forms

Assembly: flt.q xd, qs1, qs2

§

FLTS = 293

Single-precision floating-point less than

Writes 1 to rd if fs1 is less than fs2, and 0 otherwise.

If either operand is NaN, the result is 0 (not equal). If either operand is a NaN (signaling or quiet), the invalid flag is set.

§Forms

Assembly: flt.s xd, fs1, fs2

§

FLTQD = 294

RISC-V fltq.d instruction.

§Forms

Assembly: fltq.d xd, xs1, xs2

§

FLTQH = 295

RISC-V fltq.h instruction.

§Forms

Assembly: fltq.h xd, xs1, xs2

§

FLTQQ = 296

RISC-V fltq.q instruction.

§Forms

Assembly: fltq.q qd, qs1, qs2

§

FLTQS = 297

RISC-V fltq.s instruction.

§Forms

Assembly: fltq.s xd, fs1, fs2

§

FLW = 298

Single-precision floating-point load

The flw instruction loads a single-precision floating-point value from memory at address rs1 + imm into floating-point register fd.

flw does not modify the bits being transferred; in particular, the payloads of non-canonical NaNs are preserved.

§Forms

Assembly: flw fd, xs1, imm

§

FMADDD = 299

RISC-V fmadd.d instruction.

§Forms

Assembly: fmadd.d xd, xs1, xs2, xs3, rm

§

FMADDH = 300

RISC-V fmadd.h instruction.

§Forms

Assembly: fmadd.h xd, xs1, xs2, xs3, rm

§

FMADDQ = 301

RISC-V fmadd.q instruction.

§Forms

Assembly: fmadd.q qd, qs1, qs2, qs3, rm

§

FMADDS = 302

RISC-V fmadd.s instruction.

§Forms

Assembly: fmadd.s fd, fs1, fs2, fs3, rm

§

FMAXD = 303

RISC-V fmax.d instruction.

§Forms

Assembly: fmax.d xd, xs1, xs2

§

FMAXH = 304

RISC-V fmax.h instruction.

§Forms

Assembly: fmax.h xd, xs1, xs2

§

FMAXQ = 305

RISC-V fmax.q instruction.

§Forms

Assembly: fmax.q qd, qs1, qs2

§

FMAXS = 306

RISC-V fmax.s instruction.

§Forms

Assembly: fmax.s fd, fs1, fs2

§

FMAXMD = 307

RISC-V fmaxm.d instruction.

§Forms

Assembly: fmaxm.d xd, xs1, xs2

§

FMAXMH = 308

RISC-V fmaxm.h instruction.

§Forms

Assembly: fmaxm.h xd, xs1, xs2

§

FMAXMQ = 309

RISC-V fmaxm.q instruction.

§Forms

Assembly: fmaxm.q qd, qs1, qs2

§

FMAXMS = 310

RISC-V fmaxm.s instruction.

§Forms

Assembly: fmaxm.s xd, xs1, xs2

§

FMIND = 311

RISC-V fmin.d instruction.

§Forms

Assembly: fmin.d xd, xs1, xs2

§

FMINH = 312

RISC-V fmin.h instruction.

§Forms

Assembly: fmin.h xd, xs1, xs2

§

FMINQ = 313

RISC-V fmin.q instruction.

§Forms

Assembly: fmin.q xd, xs1, xs2

§

FMINS = 314

RISC-V fmin.s instruction.

§Forms

Assembly: fmin.s xd, xs1, xs2

§

FMINMD = 315

RISC-V fminm.d instruction.

§Forms

Assembly: fminm.d xd, xs1, xs2

§

FMINMH = 316

RISC-V fminm.h instruction.

§Forms

Assembly: fminm.h xd, xs1, xs2

§

FMINMQ = 317

RISC-V fminm.q instruction.

§Forms

Assembly: fminm.q qd, qs1, qs2

§

FMINMS = 318

RISC-V fminm.s instruction.

§Forms

Assembly: fminm.s fd, fs1, fs2

§

FMSUBD = 319

RISC-V fmsub.d instruction.

§Forms

Assembly: fmsub.d xd, xs1, xs2, xs3, rm

§

FMSUBH = 320

RISC-V fmsub.h instruction.

§Forms

Assembly: fmsub.h xd, xs1, xs2, xs3, rm

§

FMSUBQ = 321

RISC-V fmsub.q instruction.

§Forms

Assembly: fmsub.q qd, qs1, qs2, qs3, rm

§

FMSUBS = 322

RISC-V fmsub.s instruction.

§Forms

Assembly: fmsub.s fd, fs1, fs2, fs3, rm

§

FMULD = 323

RISC-V fmul.d instruction.

§Forms

Assembly: fmul.d xd, xs1, xs2, rm

§

FMULH = 324

RISC-V fmul.h instruction.

§Forms

Assembly: fmul.h xd, xs1, xs2, rm

§

FMULQ = 325

RISC-V fmul.q instruction.

§Forms

Assembly: fmul.q qd, qs1, qs2, rm

§

FMULS = 326

RISC-V fmul.s instruction.

§Forms

Assembly: fmul.s fd, fs1, fs2, rm

§

FMVD = 327

RISC-V fmv.d instruction.

§Forms

Assembly: fmv.d rd rs1 rs2_eq_rs1

§

FMVDX = 328

RISC-V fmv.d.x instruction.

§Forms

Assembly: fmv.d.x xd, xs1

§

FMVH = 329

RISC-V fmv.h instruction.

§Forms

Assembly: fmv.h rd rs1 rs2_eq_rs1

§

FMVHX = 330

Half-precision floating-point move from integer

Moves the half-precision value encoded in IEEE 754-2008 standard encoding from the lower 16 bits of integer register rs1 to the floating-point register fd. The bits are not modified in the transfer, and in particular, the payloads of non-canonical NaNs are preserved.

§Forms

Assembly: fmv.h.x fd, xs1

§

FMVQ = 331

RISC-V fmv.q instruction.

§Forms

Assembly: fmv.q rd rs1 rs2_eq_rs1

§

FMVS = 332

RISC-V fmv.s instruction.

§Forms

Assembly: fmv.s rd rs1 rs2_eq_rs1

§

FMVSX = 333

RISC-V fmv.s.x instruction.

§Forms

Assembly: fmv.s.x rd rs1

§

FMVWX = 334

Single-precision floating-point move from integer

Moves the single-precision value encoded in IEEE 754-2008 standard encoding from the lower 32 bits of integer register rs1 to the floating-point register fd. The bits are not modified in the transfer, and in particular, the payloads of non-canonical NaNs are preserved.

§Forms

Assembly: fmv.w.x fd, xs1

§

FMVXD = 335

RISC-V fmv.x.d instruction.

§Forms

Assembly: fmv.x.d xd, xs1

§

FMVXH = 336

Move half-precision value from floating-point to integer register

Moves the half-precision value in floating-point register rs1 represented in IEEE 754-2008 encoding to the lower 16 bits of integer register rd.

The bits are not modified in the transfer, and in particular, the payloads of non-canonical NaNs are preserved.

The highest XLEN-16 bits of the destination register are filled with copies of the floating-point number’s sign bit.

§Forms

Assembly: fmv.x.h rd, fs1

§

FMVXS = 337

RISC-V fmv.x.s instruction.

§Forms

Assembly: fmv.x.s rd rs1

§

FMVXW = 338

Move single-precision value from floating-point to integer register

Moves the single-precision value in floating-point register rs1 represented in IEEE 754-2008 encoding to the lower 32 bits of integer register rd. The bits are not modified in the transfer, and in particular, the payloads of non-canonical NaNs are preserved. For RV64, the higher 32 bits of the destination register are filled with copies of the floating-point number’s sign bit.

§Forms

Assembly: fmv.x.w xd, fs1

§

FMVHXD = 339

RISC-V fmvh.x.d instruction.

§Forms

Assembly: fmvh.x.d xd, xs1

§

FMVHXQ = 340

RISC-V fmvh.x.q instruction.

§Forms

Assembly: fmvh.x.q xd, qs1

§

FMVPDX = 341

RISC-V fmvp.d.x instruction.

§Forms

Assembly: fmvp.d.x xd, xs1, xs2

§

FMVPQX = 342

RISC-V fmvp.q.x instruction.

§Forms

Assembly: fmvp.q.x qd, xs1, xs2

§

FNEGD = 343

RISC-V fneg.d instruction.

§Forms

Assembly: fneg.d rd rs1 rs2_eq_rs1

§

FNEGH = 344

RISC-V fneg.h instruction.

§Forms

Assembly: fneg.h rd rs1 rs2_eq_rs1

§

FNEGQ = 345

RISC-V fneg.q instruction.

§Forms

Assembly: fneg.q rd rs1 rs2_eq_rs1

§

FNEGS = 346

RISC-V fneg.s instruction.

§Forms

Assembly: fneg.s rd rs1 rs2_eq_rs1

§

FNMADDD = 347

RISC-V fnmadd.d instruction.

§Forms

Assembly: fnmadd.d xd, xs1, xs2, xs3, rm

§

FNMADDH = 348

RISC-V fnmadd.h instruction.

§Forms

Assembly: fnmadd.h xd, xs1, xs2, xs3, rm

§

FNMADDQ = 349

RISC-V fnmadd.q instruction.

§Forms

Assembly: fnmadd.q qd, qs1, qs2, qs3, rm

§

FNMADDS = 350

RISC-V fnmadd.s instruction.

§Forms

Assembly: fnmadd.s fd, fs1, fs2, fs3, rm

§

FNMSUBD = 351

RISC-V fnmsub.d instruction.

§Forms

Assembly: fnmsub.d xd, xs1, xs2, xs3, rm

§

FNMSUBH = 352

RISC-V fnmsub.h instruction.

§Forms

Assembly: fnmsub.h xd, xs1, xs2, xs3, rm

§

FNMSUBQ = 353

RISC-V fnmsub.q instruction.

§Forms

Assembly: fnmsub.q qd, qs1, qs2, qs3, rm

§

FNMSUBS = 354

RISC-V fnmsub.s instruction.

§Forms

Assembly: fnmsub.s xd, xs1, xs2, xs3, rm

§

FRCSR = 355

RISC-V frcsr instruction.

§Forms

Assembly: frcsr rd

§

FRFLAGS = 356

RISC-V frflags instruction.

§Forms

Assembly: frflags rd

§

FROUNDD = 357

RISC-V fround.d instruction.

§Forms

Assembly: fround.d xd, xs1, rm

§

FROUNDH = 358

RISC-V fround.h instruction.

§Forms

Assembly: fround.h xd, xs1, rm

§

FROUNDQ = 359

RISC-V fround.q instruction.

§Forms

Assembly: fround.q qd, qs1, rm

§

FROUNDS = 360

RISC-V fround.s instruction.

§Forms

Assembly: fround.s fd, xs1, rm

§

FROUNDNXD = 361

RISC-V froundnx.d instruction.

§Forms

Assembly: froundnx.d xd, xs1, rm

§

FROUNDNXH = 362

RISC-V froundnx.h instruction.

§Forms

Assembly: froundnx.h xd, xs1, rm

§

FROUNDNXQ = 363

RISC-V froundnx.q instruction.

§Forms

Assembly: froundnx.q qd, qs1, rm

§

FROUNDNXS = 364

RISC-V froundnx.s instruction.

§Forms

Assembly: froundnx.s fd, rs1, rm

§

FRRM = 365

RISC-V frrm instruction.

§Forms

Assembly: frrm rd

§

FSCSR = 366

RISC-V fscsr instruction.

§Forms

Assembly: fscsr rd rs1

§

FSD = 367

RISC-V fsd instruction.

§Forms

Assembly: fsd xs1, xs2, imm

§

FSFLAGS = 368

RISC-V fsflags instruction.

§Forms

Assembly: fsflags rd rs1

§

FSFLAGSI = 369

RISC-V fsflagsi instruction.

§Forms

Assembly: fsflagsi rd zimm5

§

FSGNJD = 370

RISC-V fsgnj.d instruction.

§Forms

Assembly: fsgnj.d xd, xs1, xs2

§

FSGNJH = 371

RISC-V fsgnj.h instruction.

§Forms

Assembly: fsgnj.h xd, xs1, xs2

§

FSGNJQ = 372

RISC-V fsgnj.q instruction.

§Forms

Assembly: fsgnj.q qd, qs1, qs2

§

FSGNJS = 373

Single-precision sign inject

Writes fd with sign bit of fs2 and the exponent and mantissa of fs1.

Sign-injection instructions do not set floating-point exception flags, nor do they canonicalize NaNs.

§Forms

Assembly: fsgnj.s fd, fs1, fs2

§

FSGNJND = 374

RISC-V fsgnjn.d instruction.

§Forms

Assembly: fsgnjn.d xd, xs1, xs2

§

FSGNJNH = 375

RISC-V fsgnjn.h instruction.

§Forms

Assembly: fsgnjn.h xd, xs1, xs2

§

FSGNJNQ = 376

RISC-V fsgnjn.q instruction.

§Forms

Assembly: fsgnjn.q qd, qs1, qs2

§

FSGNJNS = 377

Single-precision sign inject negate

Writes fd with the opposite of the sign bit of fs2 and the exponent and mantissa of fs1.

Sign-injection instructions do not set floating-point exception flags, nor do they canonicalize NaNs.

§Forms

Assembly: fsgnjn.s fd, fs1, fs2

§

FSGNJXD = 378

RISC-V fsgnjx.d instruction.

§Forms

Assembly: fsgnjx.d xd, xs1, xs2

§

FSGNJXH = 379

RISC-V fsgnjx.h instruction.

§Forms

Assembly: fsgnjx.h xd, xs1, xs2

§

FSGNJXQ = 380

RISC-V fsgnjx.q instruction.

§Forms

Assembly: fsgnjx.q qd, qs1, qs2

§

FSGNJXS = 381

Single-precision sign inject exclusive or

Writes fd with the xor of the sign bits of fs2 and fs1 and the exponent and mantissa of fs1.

Sign-injection instructions do not set floating-point exception flags, nor do they canonicalize NaNs.

§Forms

Assembly: fsgnjx.s fd, fs1, fs2

§

FSH = 382

Half-precision floating-point store

The fsh instruction stores a half-precision floating-point value from register rd to memory at address rs1 + imm.

fsh does not modify the bits being transferred; in particular, the payloads of non-canonical NaNs are preserved.

fsh ignores all but the lower 16 bits in rs2.

fsh is only guaranteed to execute atomically if the effective address is naturally aligned.

§Forms

Assembly: fsh fs2, imm(xs1)

§

FSQ = 383

RISC-V fsq instruction.

§Forms

Assembly: fsq xs1, qs2, imm

§

FSQRTD = 384

RISC-V fsqrt.d instruction.

§Forms

Assembly: fsqrt.d xd, xs1, rm

§

FSQRTH = 385

RISC-V fsqrt.h instruction.

§Forms

Assembly: fsqrt.h xd, xs1, rm

§

FSQRTQ = 386

RISC-V fsqrt.q instruction.

§Forms

Assembly: fsqrt.q qd, qs1, rm

§

FSQRTS = 387

RISC-V fsqrt.s instruction.

§Forms

Assembly: fsqrt.s fd, fs1, rm

§

FSRM = 388

RISC-V fsrm instruction.

§Forms

Assembly: fsrm rd rs1

§

FSRMI = 389

RISC-V fsrmi instruction.

§Forms

Assembly: fsrmi rd zimm5

§

FSUBD = 390

RISC-V fsub.d instruction.

§Forms

Assembly: fsub.d xd, xs1, xs2, rm

§

FSUBH = 391

RISC-V fsub.h instruction.

§Forms

Assembly: fsub.h xd, xs1, xs2, rm

§

FSUBQ = 392

RISC-V fsub.q instruction.

§Forms

Assembly: fsub.q qd, qs1, qs2, rm

§

FSUBS = 393

Single-precision floating-point subtraction

Do the single-precision floating-point subtraction of fs2 from fs1 and store the result in fd. rm is the dynamic Rounding Mode.

§Forms

Assembly: fsub.s fd, fs1, fs2, rm

§

FSW = 394

Single-precision floating-point store

The fsw instruction stores a single-precision floating-point value in fs2 to memory at address rs1 + imm.

fsw does not modify the bits being transferred; in particular, the payloads of non-canonical NaNs are preserved.

§Forms

Assembly: fsw fs2, xs1, imm

§

HFENCEGVMA = 395

RISC-V hfence.gvma instruction.

§Forms

Assembly: hfence.gvma xs1, xs2

§

HFENCEVVMA = 396

RISC-V hfence.vvma instruction.

§Forms

Assembly: hfence.vvma xs1, xs2

§

HINVALGVMA = 397

Invalidate cached address translations

hinval.gvma has the same semantics as sinval.vma except that it combines with sfence.w.inval and sfence.inval.ir to replace hfence.gvma and uses VMID instead of ASID.

§Forms

Assembly: hinval.gvma xs1, xs2

§

HINVALVVMA = 398

Invalidate cached address translations

hinval.vvma has the same semantics as sinval.vma except that it combines with sfence.w.inval and sfence.inval.ir to replace hfence.vvma.

§Forms

Assembly: hinval.vvma xs1, xs2

§

HLVB = 399

RISC-V hlv.b instruction.

§Forms

Assembly: hlv.b xd, xs1

§

HLVBU = 400

RISC-V hlv.bu instruction.

§Forms

Assembly: hlv.bu xd, xs1

§

HLVD = 401

RISC-V hlv.d instruction.

§Forms

Assembly: hlv.d xd, xs1

§

HLVH = 402

RISC-V hlv.h instruction.

§Forms

Assembly: hlv.h xd, xs1

§

HLVHU = 403

RISC-V hlv.hu instruction.

§Forms

Assembly: hlv.hu xd, xs1

§

HLVW = 404

RISC-V hlv.w instruction.

§Forms

Assembly: hlv.w xd, xs1

§

HLVWU = 405

RISC-V hlv.wu instruction.

§Forms

Assembly: hlv.wu xd, xs1

§

HLVXHU = 406

RISC-V hlvx.hu instruction.

§Forms

Assembly: hlvx.hu xd, xs1

§

HLVXWU = 407

RISC-V hlvx.wu instruction.

§Forms

Assembly: hlvx.wu xd, xs1

§

HSVB = 408

RISC-V hsv.b instruction.

§Forms

Assembly: hsv.b xs1, xs2

§

HSVD = 409

RISC-V hsv.d instruction.

§Forms

Assembly: hsv.d xs1, xs2

§

HSVH = 410

RISC-V hsv.h instruction.

§Forms

Assembly: hsv.h xs1, xs2

§

HSVW = 411

RISC-V hsv.w instruction.

§Forms

Assembly: hsv.w xs1, xs2

§

J = 412

RISC-V j instruction.

§Forms

Assembly: j jimm20

§

JAL = 413

Jump and link

Jump to a PC-relative offset and store the return address in rd.

§Forms

Assembly: jal xd, imm

§

JALPSEUDO = 414

RISC-V jal.pseudo instruction.

§Forms

Assembly: jal.pseudo jimm20

§

JALR = 415

Jump and link register

Jump to an address formed by adding rs1 to a signed offset then clearing the least significant bit, and store the return address in rd.

§Forms

Assembly: jalr xd, imm(rs1)

§

JALRPSEUDO = 416

RISC-V jalr.pseudo instruction.

§Forms

Assembly: jalr.pseudo rs1

§

JR = 417

RISC-V jr instruction.

§Forms

Assembly: jr rs1

§

LB = 418

Load byte

Load 8 bits of data into register rd from an address formed by adding rs1 to a signed offset. Sign extend the result.

§Forms

Assembly: lb xd, imm(rs1)

§

LBU = 419

Load byte unsigned

Load 8 bits of data into register rd from an address formed by adding rs1 to a signed offset. Zero extend the result.

§Forms

Assembly: lbu xd, imm(rs1)

§

LD = 420

Load doubleword

Load 64 bits of data into register rd from an address formed by adding rs1 to a signed offset.

§Forms

Assembly: ld xd, imm(rs1)

§

LH = 421

Load halfword

Load 16 bits of data into register rd from an address formed by adding rs1 to a signed offset. Sign extend the result.

§Forms

Assembly: lh xd, imm(rs1)

§

LHU = 422

Load halfword unsigned

Load 16 bits of data into register rd from an address formed by adding rs1 to a signed offset. Zero extend the result.

§Forms

Assembly: lhu xd, imm(rs1)

§

LPAD = 423

RISC-V lpad instruction.

§Forms

Assembly: lpad imm

§

LRD = 424

Load reserved doubleword

Loads a word from the address in rs1, places the value in rd, and registers a reservation set – a set of bytes that subsumes the bytes in the addressed word.

The address in rs1 must be 8-byte aligned.

If the address is not naturally aligned, a LoadAddressMisaligned exception or an LoadAccessFault exception will be generated. The access-fault exception can be generated for a memory access that would otherwise be able to complete except for the misalignment, if the misaligned access should not be emulated.

An implementation can register an arbitrarily large reservation set on each LR, provided the reservation set includes all bytes of the addressed data word or doubleword. An SC can only pair with the most recent LR in program order. An SC may succeed only if no store from another hart to the reservation set can be observed to have occurred between the LR and the SC, and if there is no other SC between the LR and itself in program order. An SC may succeed only if no write from a device other than a hart to the bytes accessed by the LR instruction can be observed to have occurred between the LR and SC. Note this LR might have had a different effective address and data size, but reserved the SC’s address as part of the reservation set.

§[NOTE]

Following this model, in systems with memory translation, an SC is allowed to succeed if the earlier LR reserved the same location using an alias with a different virtual address, but is also allowed to fail if the virtual address is different.

§To accommodate legacy devices and buses, writes from devices other than RISC-V harts are only required to invalidate reservations when they overlap the bytes accessed by the LR. These writes are not required to invalidate the reservation when they access other bytes in the reservation set.

Software should not set the rl bit on an LR instruction unless the aq bit is also set. LR.rl and SC.aq instructions are not guaranteed to provide any stronger ordering than those with both bits clear, but may result in lower performance.

§Forms

Assembly: lr.d xd, xs1

§

LRW = 425

Load reserved word

Loads a word from the address in rs1, places the sign-extended value in rd, and registers a reservation set – a set of bytes that subsumes the bytes in the addressed word.

<%- if XLEN == 64 -%> The 32-bit load result is sign-extended to 64-bits. <%- end -%>

The address in rs1 must be naturally aligned to the size of the operand (i.e., eight-byte aligned for doublewords and four-byte aligned for words).

If the address is not naturally aligned, a LoadAddressMisaligned exception or an LoadAccessFault exception will be generated. The access-fault exception can be generated for a memory access that would otherwise be able to complete except for the misalignment, if the misaligned access should not be emulated.

An implementation can register an arbitrarily large reservation set on each LR, provided the reservation set includes all bytes of the addressed data word or doubleword. An SC can only pair with the most recent LR in program order. An SC may succeed only if no store from another hart to the reservation set can be observed to have occurred between the LR and the SC, and if there is no other SC between the LR and itself in program order. An SC may succeed only if no write from a device other than a hart to the bytes accessed by the LR instruction can be observed to have occurred between the LR and SC. Note this LR might have had a different effective address and data size, but reserved the SC’s address as part of the reservation set.

§[NOTE]

Following this model, in systems with memory translation, an SC is allowed to succeed if the earlier LR reserved the same location using an alias with a different virtual address, but is also allowed to fail if the virtual address is different.

§To accommodate legacy devices and buses, writes from devices other than RISC-V harts are only required to invalidate reservations when they overlap the bytes accessed by the LR. These writes are not required to invalidate the reservation when they access other bytes in the reservation set.

Software should not set the rl bit on an LR instruction unless the aq bit is also set. LR.rl and SC.aq instructions are not guaranteed to provide any stronger ordering than those with both bits clear, but may result in lower performance.

§Forms

Assembly: lr.w xd, xs1

§

LUI = 426

Load upper immediate

Load the zero-extended imm into rd.

§Forms

Assembly: lui xd, imm

§

LW = 427

Load word

Load 32 bits of data into register rd from an address formed by adding rs1 to a signed offset. Sign extend the result.

§Forms

Assembly: lw xd, imm(rs1)

§

LWU = 428

Load word unsigned

Load 64 bits of data into register rd from an address formed by adding rs1 to a signed offset. Zero extend the result.

§Forms

Assembly: lwu xd, imm(rs1)

§

MAX = 429

Maximum

This instruction returns the larger of two signed integers.

.Software Hint [NOTE] Calculating the absolute value of a signed integer can be performed using the following sequence: neg rD,rS followed by `max rD,rS,rD. When using this common sequence, it is suggested that they are scheduled with no intervening instructions so that implementations that are so optimized can fuse them together.

§Forms

Assembly: max xd, xs1, xs2

§

MAXU = 430

Unsigned maximum

This instruction returns the larger of two unsigned integers.

§Forms

Assembly: maxu xd, xs1, xs2

§

MIN = 431

Minimum

This instruction returns the smaller of two signed integers.

§Forms

Assembly: min xd, xs1, xs2

§

MINU = 432

Unsigned minimum

This instruction returns the smaller of two unsigned integers.

§Forms

Assembly: minu xd, xs1, xs2

§

MNRET = 433

RISC-V mnret instruction.

§Forms

Assembly: mnret mnret

§

MOPR0 = 434

RISC-V mop.r.0 instruction.

§Forms

Assembly: mop.r.0 rd rs1

§

MOPR1 = 435

RISC-V mop.r.1 instruction.

§Forms

Assembly: mop.r.1 rd rs1

§

MOPR10 = 436

RISC-V mop.r.10 instruction.

§Forms

Assembly: mop.r.10 rd rs1

§

MOPR11 = 437

RISC-V mop.r.11 instruction.

§Forms

Assembly: mop.r.11 rd rs1

§

MOPR12 = 438

RISC-V mop.r.12 instruction.

§Forms

Assembly: mop.r.12 rd rs1

§

MOPR13 = 439

RISC-V mop.r.13 instruction.

§Forms

Assembly: mop.r.13 rd rs1

§

MOPR14 = 440

RISC-V mop.r.14 instruction.

§Forms

Assembly: mop.r.14 rd rs1

§

MOPR15 = 441

RISC-V mop.r.15 instruction.

§Forms

Assembly: mop.r.15 rd rs1

§

MOPR16 = 442

RISC-V mop.r.16 instruction.

§Forms

Assembly: mop.r.16 rd rs1

§

MOPR17 = 443

RISC-V mop.r.17 instruction.

§Forms

Assembly: mop.r.17 rd rs1

§

MOPR18 = 444

RISC-V mop.r.18 instruction.

§Forms

Assembly: mop.r.18 rd rs1

§

MOPR19 = 445

RISC-V mop.r.19 instruction.

§Forms

Assembly: mop.r.19 rd rs1

§

MOPR2 = 446

RISC-V mop.r.2 instruction.

§Forms

Assembly: mop.r.2 rd rs1

§

MOPR20 = 447

RISC-V mop.r.20 instruction.

§Forms

Assembly: mop.r.20 rd rs1

§

MOPR21 = 448

RISC-V mop.r.21 instruction.

§Forms

Assembly: mop.r.21 rd rs1

§

MOPR22 = 449

RISC-V mop.r.22 instruction.

§Forms

Assembly: mop.r.22 rd rs1

§

MOPR23 = 450

RISC-V mop.r.23 instruction.

§Forms

Assembly: mop.r.23 rd rs1

§

MOPR24 = 451

RISC-V mop.r.24 instruction.

§Forms

Assembly: mop.r.24 rd rs1

§

MOPR25 = 452

RISC-V mop.r.25 instruction.

§Forms

Assembly: mop.r.25 rd rs1

§

MOPR26 = 453

RISC-V mop.r.26 instruction.

§Forms

Assembly: mop.r.26 rd rs1

§

MOPR27 = 454

RISC-V mop.r.27 instruction.

§Forms

Assembly: mop.r.27 rd rs1

§

MOPR28 = 455

RISC-V mop.r.28 instruction.

§Forms

Assembly: mop.r.28 rd rs1

§

MOPR29 = 456

RISC-V mop.r.29 instruction.

§Forms

Assembly: mop.r.29 rd rs1

§

MOPR3 = 457

RISC-V mop.r.3 instruction.

§Forms

Assembly: mop.r.3 rd rs1

§

MOPR30 = 458

RISC-V mop.r.30 instruction.

§Forms

Assembly: mop.r.30 rd rs1

§

MOPR31 = 459

RISC-V mop.r.31 instruction.

§Forms

Assembly: mop.r.31 rd rs1

§

MOPR4 = 460

RISC-V mop.r.4 instruction.

§Forms

Assembly: mop.r.4 rd rs1

§

MOPR5 = 461

RISC-V mop.r.5 instruction.

§Forms

Assembly: mop.r.5 rd rs1

§

MOPR6 = 462

RISC-V mop.r.6 instruction.

§Forms

Assembly: mop.r.6 rd rs1

§

MOPR7 = 463

RISC-V mop.r.7 instruction.

§Forms

Assembly: mop.r.7 rd rs1

§

MOPR8 = 464

RISC-V mop.r.8 instruction.

§Forms

Assembly: mop.r.8 rd rs1

§

MOPR9 = 465

RISC-V mop.r.9 instruction.

§Forms

Assembly: mop.r.9 rd rs1

§

MOPRN = 466

RISC-V mop.r.n instruction.

§Forms

Assembly: mop.r.n mop_r_t_30, mop_r_t_27_26, mop_r_t_21_20, xd, xs1

§

MOPRR0 = 467

RISC-V mop.rr.0 instruction.

§Forms

Assembly: mop.rr.0 rd rs1 rs2

§

MOPRR1 = 468

RISC-V mop.rr.1 instruction.

§Forms

Assembly: mop.rr.1 rd rs1 rs2

§

MOPRR2 = 469

RISC-V mop.rr.2 instruction.

§Forms

Assembly: mop.rr.2 rd rs1 rs2

§

MOPRR3 = 470

RISC-V mop.rr.3 instruction.

§Forms

Assembly: mop.rr.3 rd rs1 rs2

§

MOPRR4 = 471

RISC-V mop.rr.4 instruction.

§Forms

Assembly: mop.rr.4 rd rs1 rs2

§

MOPRR5 = 472

RISC-V mop.rr.5 instruction.

§Forms

Assembly: mop.rr.5 rd rs1 rs2

§

MOPRR6 = 473

RISC-V mop.rr.6 instruction.

§Forms

Assembly: mop.rr.6 rd rs1 rs2

§

MOPRR7 = 474

RISC-V mop.rr.7 instruction.

§Forms

Assembly: mop.rr.7 rd rs1 rs2

§

MOPRRN = 475

RISC-V mop.rr.n instruction.

§Forms

Assembly: mop.rr.n mop_rr_t_30, mop_rr_t_27_26, xd, xs1, xs2

§

MRET = 476

Machine Exception Return

Returns from an exception in M-mode.

§Forms

Assembly: mret ""

§

MUL = 477

Signed multiply

MUL performs an XLEN-bitxXLEN-bit multiplication of rs1 by rs2 and places the lower XLEN bits in the destination register. Any overflow is thrown away.

[NOTE] If both the high and low bits of the same product are required, then the recommended code sequence is: MULH[[S]U] rdh, rs1, rs2; MUL rdl, rs1, rs2 (source register specifiers must be in same order and rdh cannot be the same as rs1 or rs2). Microarchitectures can then fuse these into a single multiply operation instead of performing two separate multiplies.

§Forms

Assembly: mul xd, xs1, xs2

§

MULH = 478

Signed multiply high

Multiply the signed values in rs1 to rs2, and store the upper half of the result in rd. The lower half is thrown away.

If both the upper and lower halves are needed, it suggested to use the sequence:


§mulh rdh, rs1, rs2 mul rdl, rs1, rs2

Microarchitectures may look for that sequence and fuse the operations.

§Forms

Assembly: mulh xd, xs1, xs2

§

MULHSU = 479

Signed/unsigned multiply high

Multiply the signed value in rs1 by the unsigned value in rs2, and store the upper half of the result in rd. The lower half is thrown away.

If both the upper and lower halves are needed, it suggested to use the sequence:


§mulhsu rdh, rs1, rs2 mul rdl, rs1, rs2

Microarchitectures may look for that sequence and fuse the operations.

§Forms

Assembly: mulhsu xd, xs1, xs2

§

MULHU = 480

Unsigned multiply high

Multiply the unsigned values in rs1 to rs2, and store the upper half of the result in rd. The lower half is thrown away.

If both the upper and lower halves are needed, it suggested to use the sequence:


§mulhu rdh, rs1, rs2 mul rdl, rs1, rs2

Microarchitectures may look for that sequence and fuse the operations.

§Forms

Assembly: mulhu xd, xs1, xs2

§

MULW = 481

Signed 32-bit multiply

Multiplies the lower 32 bits of the source registers, placing the sign-extension of the lower 32 bits of the result into the destination register.

Any overflow is thrown away.

[NOTE] In RV64, MUL can be used to obtain the upper 32 bits of the 64-bit product, but signed arguments must be proper 32-bit signed values, whereas unsigned arguments must have their upper 32 bits clear. If the arguments are not known to be sign- or zero-extended, an alternative is to shift both arguments left by 32 bits, then use MULH[[S]U].

§Forms

Assembly: mulw xd, xs1, xs2

§

MV = 482

RISC-V mv instruction.

§Forms

Assembly: mv rd rs1

§

NEG = 483

RISC-V neg instruction.

§Forms

Assembly: neg rd rs1

§

NOP = 484

RISC-V nop instruction.

§Forms

Assembly: nop

§

NTLALL = 485

RISC-V ntl.all instruction.

§Forms

Assembly: ntl.all

§

NTLP1 = 486

RISC-V ntl.p1 instruction.

§Forms

Assembly: ntl.p1

§

NTLPALL = 487

RISC-V ntl.pall instruction.

§Forms

Assembly: ntl.pall

§

NTLS1 = 488

RISC-V ntl.s1 instruction.

§Forms

Assembly: ntl.s1

§

OR = 489

Or

Or rs1 with rs2, and store the result in rd

§Forms

Assembly: or xd, xs1, xs2

§

ORCB = 490

Bitware OR-combine, byte granule

Combines the bits within each byte using bitwise logical OR. This sets the bits of each byte in the result rd to all zeros if no bit within the respective byte of rs is set, or to all ones if any bit within the respective byte of rs is set.

§Forms

Assembly: orc.b xd, xs1, xs2

§

ORI = 491

Or immediate

Or an immediate to the value in rs1, and store the result in rd

§Forms

Assembly: ori xd, xs1, imm

§

ORN = 492

OR with inverted operand

This instruction performs the bitwise logical OR operation between rs1 and the bitwise inversion of rs2.

§Forms

Assembly: orn xd, xs1, xs2

§

PACK = 493

RISC-V pack instruction.

§Forms

Assembly: pack xd, xs1, xs2

§

PACKH = 494

RISC-V packh instruction.

§Forms

Assembly: packh xd, xs1, xs2

§

PACKW = 495

RISC-V packw instruction.

§Forms

Assembly: packw xd, xs1, xs2

§

PAUSE = 496

RISC-V pause instruction.

§Forms

Assembly: pause

§

PREFETCHI = 497

RISC-V prefetch.i instruction.

§Forms

Assembly: prefetch.i rs1 imm12lohi

§

PREFETCHR = 498

RISC-V prefetch.r instruction.

§Forms

Assembly: prefetch.r rs1 imm12lohi

§

PREFETCHW = 499

RISC-V prefetch.w instruction.

§Forms

Assembly: prefetch.w rs1 imm12lohi

§

RDCYCLE = 500

RISC-V rdcycle instruction.

§Forms

Assembly: rdcycle rd

§

RDCYCLEH = 501

RISC-V rdcycleh instruction.

§Forms

Assembly: rdcycleh rd

§

RDINSTRET = 502

RISC-V rdinstret instruction.

§Forms

Assembly: rdinstret rd

§

RDINSTRETH = 503

RISC-V rdinstreth instruction.

§Forms

Assembly: rdinstreth rd

§

RDTIME = 504

RISC-V rdtime instruction.

§Forms

Assembly: rdtime rd

§

RDTIMEH = 505

RISC-V rdtimeh instruction.

§Forms

Assembly: rdtimeh rd

§

REM = 506

Signed remainder

Calculate the remainder of signed division of rs1 by rs2, and store the result in rd.

If the value in register rs2 is zero, write the value in rs1 into rd;

If the result of the division overflows, write zero into rd;

§Forms

Assembly: rem xd, xs1, xs2

§

REMU = 507

Unsigned remainder

Calculate the remainder of unsigned division of rs1 by rs2, and store the result in rd.

§Forms

Assembly: remu xd, xs1, xs2

§

REMUW = 508

Unsigned 32-bit remainder

Calculate the remainder of unsigned division of the 32-bit values in rs1 by rs2, and store the sign-extended result in rd.

If the value in rs2 is zero, rd gets the sign-extended value in rs1.

§Forms

Assembly: remuw xd, xs1, xs2

§

REMW = 509

Signed 32-bit remainder

Calculate the remainder of signed division of the 32-bit values rs1 by rs2, and store the sign-extended result in rd.

If the value in register rs2 is zero, write the sign-extended 32-bit value in rs1 into rd;

If the result of the division overflows, write zero into rd;

§Forms

Assembly: remw xd, xs1, xs2

§

RET = 510

RISC-V ret instruction.

§Forms

Assembly: ret

§

REV8 = 511

Byte-reverse register (RV64 encoding)

This instruction reverses the order of the bytes in rs1.

[NOTE] The rev8 mnemonic corresponds to different instruction encodings in RV32 and RV64.

[NOTE] The byte-reverse operation is only available for the full register width. To emulate word-sized and halfword-sized byte-reversal, perform a rev8 rd,rs followed by a srai rd,rd,K, where K is XLEN-32 and XLEN-16, respectively.

§Forms

Assembly: rev8 xd, xs1

§

REV8RV32 = 512

Byte-reverse register (RV64 encoding)

This instruction reverses the order of the bytes in rs1.

[NOTE] The rev8 mnemonic corresponds to different instruction encodings in RV32 and RV64.

[NOTE] The byte-reverse operation is only available for the full register width. To emulate word-sized and halfword-sized byte-reversal, perform a rev8 rd,rs followed by a srai rd,rd,K, where K is XLEN-32 and XLEN-16, respectively.

§Forms

Assembly: rev8.rv32 xd, xs1

§

ROL = 513

Rotate left (Register)

This instruction performs a rotate left of rs1 by the amount in least-significant log2(XLEN) bits of rs2.

§Forms

Assembly: rol xd, xs1, xs2

§

ROLW = 514

Rotate left word (Register)

This instruction performs a rotate left of the least-significant word of rs1 by the amount in least-significant 5 bits of rs2. The resulting word value is sign-extended by copying bit 31 to all of the more-significant bits.

§Forms

Assembly: rolw xd, xs1, xs2

§

ROR = 515

Rotate right (Register)

This instruction performs a rotate right of rs1 by the amount in least-significant log2(XLEN) bits of rs2.

§Forms

Assembly: ror xd, xs1, xs2

§

RORI = 516

Rotate right (Immediate)

This instruction performs a rotate right of rs1 by the amount in the least-significant log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: rori xd, xs1, shamt

§

RORIRV32 = 517

Rotate right (Immediate)

This instruction performs a rotate right of rs1 by the amount in the least-significant log2(XLEN) bits of shamt. For RV32, the encodings corresponding to shamt[5]=1 are reserved.

§Forms

Assembly: rori.rv32 xd, xs1, shamt

§

RORIW = 518

Rotate right word (Immediate)

This instruction performs a rotate right on the least-significant word of rs1 by the amount in the least-significant log2(XLEN) bits of shamt. The resulting word value is sign-extended by copying bit 31 to all of the more-significant bits.

§Forms

Assembly: roriw xd, xs1, shamt

§

RORW = 519

Rotate right word (Register)

This instruction performs a rotate right on the least-significant word of rs1 by the amount in least-significant 5 bits of rs2. The resultant word is sign-extended by copying bit 31 to all of the more-significant bits.

§Forms

Assembly: rorw xd, xs1, xs2

§

SB = 520

Store byte

Store 8 bits of data from register rs2 to an address formed by adding rs1 to a signed offset.

§Forms

Assembly: sb xs2, imm(xs1)

§

SBREAK = 521

RISC-V sbreak instruction.

§Forms

Assembly: sbreak

§

SCD = 522

Store conditional doubleword

sc.d conditionally writes a doubleword in rs2 to the address in rs1: the sc.d succeeds only if the reservation is still valid and the reservation set contains the bytes being written. If the sc.d succeeds, the instruction writes the doubleword in rs2 to memory, and it writes zero to rd. If the sc.d fails, the instruction does not write to memory, and it writes a nonzero value to rd. For the purposes of memory protection, a failed sc.d may be treated like a store. Regardless of success or failure, executing an sc.d instruction invalidates any reservation held by this hart.

The failure code with value 1 encodes an unspecified failure. Other failure codes are reserved at this time. Portable software should only assume the failure code will be non-zero.

The address held in rs1 must be naturally aligned to the size of the operand (i.e., eight-byte aligned). If the address is not naturally aligned, an address-misaligned exception or an access-fault exception will be generated. The access-fault exception can be generated for a memory access that would otherwise be able to complete except for the misalignment, if the misaligned access should not be emulated.

§[NOTE]

Emulating misaligned LR/SC sequences is impractical in most systems.

§Misaligned LR/SC sequences also raise the possibility of accessing multiple reservation sets at once, which present definitions do not provide for.

An implementation can register an arbitrarily large reservation set on each LR, provided the reservation set includes all bytes of the addressed data word or doubleword. An SC can only pair with the most recent LR in program order. An SC may succeed only if no store from another hart to the reservation set can be observed to have occurred between the LR and the SC, and if there is no other SC between the LR and itself in program order. An SC may succeed only if no write from a device other than a hart to the bytes accessed by the LR instruction can be observed to have occurred between the LR and SC. Note this LR might have had a different effective address and data size, but reserved the SC’s address as part of the reservation set.

§[NOTE]

Following this model, in systems with memory translation, an SC is allowed to succeed if the earlier LR reserved the same location using an alias with a different virtual address, but is also allowed to fail if the virtual address is different.

§To accommodate legacy devices and buses, writes from devices other than RISC-V harts are only required to invalidate reservations when they overlap the bytes accessed by the LR. These writes are not required to invalidate the reservation when they access other bytes in the reservation set.

The SC must fail if the address is not within the reservation set of the most recent LR in program order. The SC must fail if a store to the reservation set from another hart can be observed to occur between the LR and SC. The SC must fail if a write from some other device to the bytes accessed by the LR can be observed to occur between the LR and SC. (If such a device writes the reservation set but does not write the bytes accessed by the LR, the SC may or may not fail.) An SC must fail if there is another SC (to any address) between the LR and the SC in program order. The precise statement of the atomicity requirements for successful LR/SC sequences is defined by the Atomicity Axiom of the memory model.

§[NOTE]

The platform should provide a means to determine the size and shape of the reservation set.

A platform specification may constrain the size and shape of the reservation set.

A store-conditional instruction to a scratch word of memory should be used to forcibly invalidate any existing load reservation:

  • during a preemptive context switch, and
  • if necessary when changing virtual to physical address mappings, such as when migrating pages that might contain an active reservation.
§The invalidation of a hart’s reservation when it executes an LR or SC imply that a hart can only hold one reservation at a time, and that an SC can only pair with the most recent LR, and LR with the next following SC, in program order. This is a restriction to the Atomicity Axiom in Section 18.1 that ensures software runs correctly on expected common implementations that operate in this manner.

An SC instruction can never be observed by another RISC-V hart before the LR instruction that established the reservation.

§[NOTE]

The LR/SC sequence can be given acquire semantics by setting the aq bit on the LR instruction. The LR/SC sequence can be given release semantics by by setting the rl bit on the SC instruction. Assuming suitable mappings for other atomic operations, setting the aq bit on the LR instruction, and setting the rl bit on the SC instruction makes the LR/SC sequence sequentially consistent in the C++ memory_order_seq_cst sense. Such a sequence does not act as a fence for ordering ordinary load and store instructions before and after the sequence. Specific instruction mappings for other C++ atomic operations, or stronger notions of “sequential consistency”, may require both bits to be set on either or both of the LR or SC instruction.

§If neither bit is set on either LR or SC, the LR/SC sequence can be observed to occur before or after surrounding memory operations from the same RISC-V hart. This can be appropriate when the LR/SC sequence is used to implement a parallel reduction operation.

Software should not set the rl bit on an LR instruction unless the aq bit is also set. LR.rl and SC.aq instructions are not guaranteed to provide any stronger ordering than those with both bits clear, but may result in lower performance.

§Forms

Assembly: sc.d xd, xs2, xs1

§

SCW = 523

Store conditional word

sc.w conditionally writes a word in rs2 to the address in rs1: the sc.w succeeds only if the reservation is still valid and the reservation set contains the bytes being written. If the sc.w succeeds, the instruction writes the word in rs2 to memory, and it writes zero to rd. If the sc.w fails, the instruction does not write to memory, and it writes a nonzero value to rd. For the purposes of memory protection, a failed sc.w may be treated like a store. Regardless of success or failure, executing an sc.w instruction invalidates any reservation held by this hart.

<%- if XLEN == 64 -%> [NOTE] If a value other than 0 or 1 is defined as a result for sc.w, the value will before sign-extended into rd. <%- end -%>

The failure code with value 1 encodes an unspecified failure. Other failure codes are reserved at this time. Portable software should only assume the failure code will be non-zero.

The address held in rs1 must be naturally aligned to the size of the operand (i.e., eight-byte aligned for doublewords and four-byte aligned for words). If the address is not naturally aligned, an address-misaligned exception or an access-fault exception will be generated. The access-fault exception can be generated for a memory access that would otherwise be able to complete except for the misalignment, if the misaligned access should not be emulated.

§[NOTE]

Emulating misaligned LR/SC sequences is impractical in most systems.

§Misaligned LR/SC sequences also raise the possibility of accessing multiple reservation sets at once, which present definitions do not provide for.

An implementation can register an arbitrarily large reservation set on each LR, provided the reservation set includes all bytes of the addressed data word or doubleword. An SC can only pair with the most recent LR in program order. An SC may succeed only if no store from another hart to the reservation set can be observed to have occurred between the LR and the SC, and if there is no other SC between the LR and itself in program order. An SC may succeed only if no write from a device other than a hart to the bytes accessed by the LR instruction can be observed to have occurred between the LR and SC. Note this LR might have had a different effective address and data size, but reserved the SC’s address as part of the reservation set.

§[NOTE]

Following this model, in systems with memory translation, an SC is allowed to succeed if the earlier LR reserved the same location using an alias with a different virtual address, but is also allowed to fail if the virtual address is different.

§To accommodate legacy devices and buses, writes from devices other than RISC-V harts are only required to invalidate reservations when they overlap the bytes accessed by the LR. These writes are not required to invalidate the reservation when they access other bytes in the reservation set.

The SC must fail if the address is not within the reservation set of the most recent LR in program order. The SC must fail if a store to the reservation set from another hart can be observed to occur between the LR and SC. The SC must fail if a write from some other device to the bytes accessed by the LR can be observed to occur between the LR and SC. (If such a device writes the reservation set but does not write the bytes accessed by the LR, the SC may or may not fail.) An SC must fail if there is another SC (to any address) between the LR and the SC in program order. The precise statement of the atomicity requirements for successful LR/SC sequences is defined by the Atomicity Axiom of the memory model.

§[NOTE]

The platform should provide a means to determine the size and shape of the reservation set.

A platform specification may constrain the size and shape of the reservation set.

A store-conditional instruction to a scratch word of memory should be used to forcibly invalidate any existing load reservation:

  • during a preemptive context switch, and
  • if necessary when changing virtual to physical address mappings, such as when migrating pages that might contain an active reservation.
§The invalidation of a hart’s reservation when it executes an LR or SC imply that a hart can only hold one reservation at a time, and that an SC can only pair with the most recent LR, and LR with the next following SC, in program order. This is a restriction to the Atomicity Axiom in Section 18.1 that ensures software runs correctly on expected common implementations that operate in this manner.

An SC instruction can never be observed by another RISC-V hart before the LR instruction that established the reservation.

§[NOTE]

The LR/SC sequence can be given acquire semantics by setting the aq bit on the LR instruction. The LR/SC sequence can be given release semantics by by setting the rl bit on the SC instruction. Assuming suitable mappings for other atomic operations, setting the aq bit on the LR instruction, and setting the rl bit on the SC instruction makes the LR/SC sequence sequentially consistent in the C++ memory_order_seq_cst sense. Such a sequence does not act as a fence for ordering ordinary load and store instructions before and after the sequence. Specific instruction mappings for other C++ atomic operations, or stronger notions of “sequential consistency”, may require both bits to be set on either or both of the LR or SC instruction.

§If neither bit is set on either LR or SC, the LR/SC sequence can be observed to occur before or after surrounding memory operations from the same RISC-V hart. This can be appropriate when the LR/SC sequence is used to implement a parallel reduction operation.

Software should not set the rl bit on an LR instruction unless the aq bit is also set. LR.rl and SC.aq instructions are not guaranteed to provide any stronger ordering than those with both bits clear, but may result in lower performance.

§Forms

Assembly: sc.w xd, xs2, xs1

§

SCALL = 524

RISC-V scall instruction.

§Forms

Assembly: scall

§

SCTRCLR = 525

RISC-V sctrclr instruction.

§Forms

Assembly: sctrclr sctrclr

§

SD = 526

Store doubleword

Store 64 bits of data from register rs2 to an address formed by adding rs1 to a signed offset.

§Forms

Assembly: sd xs2, imm(xs1)

§

SEQZ = 527

RISC-V seqz instruction.

§Forms

Assembly: seqz rd rs1

§

SEXTB = 528

Sign-extend byte

This instruction sign-extends the least-significant byte in the source to XLEN by copying the most-significant bit in the byte (i.e., bit 7) to all of the more-significant bits.

§Forms

Assembly: sext.b xd, xs1

§

SEXTH = 529

Sign-extend halfword

This instruction sign-extends the least-significant halfword in the source to XLEN by copying the most-significant bit in the halfword (i.e., bit 15) to all of the more-significant bits.

§Forms

Assembly: sext.h xd, xs1

§

SEXTW = 530

RISC-V sext.w instruction.

§Forms

Assembly: sext.w rd rs1

§

SFENCEINVALIR = 531

Order implicit page table reads after invalidation

The sfence.inval.ir instruction guarantees that any previous sinval.vma instructions executed by the current hart are ordered before subsequent implicit references by that hart to the memory-management data structures.

§Forms

Assembly: sfence.inval.ir ""

§

SFENCEVMA = 532

Supervisor memory-management fence

The supervisor memory-management fence instruction SFENCE.VMA is used to synchronize updates to in-memory memory-management data structures with current execution. Instruction execution causes implicit reads and writes to these data structures; however, these implicit references are ordinarily not ordered with respect to explicit loads and stores. Executing an SFENCE.VMA instruction guarantees that any previous stores already visible to the current RISC-V hart are ordered before certain implicit references by subsequent instructions in that hart to the memory-management data structures. The specific set of operations ordered by SFENCE.VMA is determined by rs1 and rs2, as described below. SFENCE.VMA is also used to invalidate entries in the address-translation cache associated with a hart (see <<sv32algorithm>>). Further details on the behavior of this instruction are described in <<virt-control>> and <<pmp-vmem>>.

§[NOTE]

SFENCE.VMA orders only the local hart’s implicit references to the memory-management data structures.

§[NOTE]

§Consequently, other harts must be notified separately when the memory-management data structures have been modified. One approach is to use 1) a local data fence to ensure local writes are visible globally, then 2) an interprocessor interrupt to the other thread, then 3) a local SFENCE.VMA in the interrupt handler of the remote thread, and finally 4) signal back to originating thread that operation is complete. This is, of course, the RISC-V analog to a TLB shootdown.

For the common case that the translation data structures have only been modified for a single address mapping (i.e., one page or superpage), rs1 can specify a virtual address within that mapping to effect a translation fence for that mapping only. Furthermore, for the common case that the translation data structures have only been modified for a single address-space identifier, rs2 can specify the address space. The behavior of SFENCE.VMA depends on rs1 and rs2 as follows:

  • If rs1=x0 and rs2=x0, the fence orders all reads and writes made to any level of the page tables, for all address spaces. The fence also invalidates all address-translation cache entries, for all address spaces.
  • If rs1=x0 and rs2x0, the fence orders all reads and writes made to any level of the page tables, but only for the address space identified by integer register rs2. Accesses to global mappings (see <<translation>>) are not ordered. The fence also invalidates all address-translation cache entries matching the address space identified by integer register rs2, except for entries containing global mappings.
  • If rs1x0 and rs2=x0, the fence orders only reads and writes made to leaf page table entries corresponding to the virtual address in rs1, for all address spaces. The fence also invalidates all address-translation cache entries that contain leaf page table entries corresponding to the virtual address in rs1, for all address spaces.
  • If rs1x0 and rs2x0, the fence orders only reads and writes made to leaf page table entries corresponding to the virtual address in rs1, for the address space identified by integer register rs2. Accesses to global mappings are not ordered. The fence also invalidates all address-translation cache entries that contain leaf page table entries corresponding to the virtual address in rs1 and that match the address space identified by integer register rs2, except for entries containing global mappings.

If the value held in rs1 is not a valid virtual address, then the SFENCE.VMA instruction has no effect. No exception is raised in this case.

When rs2x0, bits SXLEN-1:ASIDMAX of the value held in rs2 are reserved for future standard use. Until their use is defined by a standard extension, they should be zeroed by software and ignored by current implementations. Furthermore, if ASIDLEN<ASIDMAX, the implementation shall ignore bits ASIDMAX-1:ASIDLEN of the value held in rs2.

§[NOTE]

An implicit read of the memory-management data structures may return any translation for an address that was valid at any time since the most recent SFENCE.VMA that subsumes that address. The ordering implied by SFENCE.VMA does not place implicit reads and writes to the memory-management data structures into the global memory order in a way that interacts cleanly with the standard RVWMO ordering rules. In particular, even though an SFENCE.VMA orders prior explicit accesses before subsequent implicit accesses, and those implicit accesses are ordered before their associated explicit accesses, SFENCE.VMA does not necessarily place prior explicit accesses before subsequent explicit accesses in the global memory order. These implicit loads also need not otherwise obey normal program order semantics with respect to prior loads or stores to the same address.

§[NOTE]

A consequence of this specification is that an implementation may use any translation for an address that was valid at any time since the most recent SFENCE.VMA that subsumes that address. In particular, if a leaf PTE is modified but a subsuming SFENCE.VMA is not executed, either the old translation or the new translation will be used, but the choice is unpredictable. The behavior is otherwise well-defined.

In a conventional TLB design, it is possible for multiple entries to match a single address if, for example, a page is upgraded to a superpage without first clearing the original non-leaf PTE’s valid bit and executing an SFENCE.VMA with rs1=x0. In this case, a similar remark applies: it is unpredictable whether the old non-leaf PTE or the new leaf PTE is used, but the behavior is otherwise well defined.

Another consequence of this specification is that it is generally unsafe to update a PTE using a set of stores of a width less than the width of the PTE, as it is legal for the implementation to read the PTE at any time, including when only some of the partial stores have taken effect.


§This specification permits the caching of PTEs whose V (Valid) bit is clear. Operating systems must be written to cope with this possibility, but implementers are reminded that eagerly caching invalid PTEs will reduce performance by causing additional page faults.

Implementations must only perform implicit reads of the translation data structures pointed to by the current contents of the satp register or a subsequent valid (V=1) translation data structure entry, and must only raise exceptions for implicit accesses that are generated as a result of instruction execution, not those that are performed speculatively.

Changes to the sstatus fields SUM and MXR take effect immediately, without the need to execute an SFENCE.VMA instruction. Changing satp.MODE from Bare to other modes and vice versa also takes effect immediately, without the need to execute an SFENCE.VMA instruction. Likewise, changes to satp.ASID take effect immediately.

§[TIP]

The following common situations typically require executing an SFENCE.VMA instruction:

  • When software recycles an ASID (i.e., reassociates it with a different page table), it should first change satp to point to the new page table using the recycled ASID, then execute SFENCE.VMA with rs1=x0 and rs2 set to the recycled ASID. Alternatively, software can execute the same SFENCE.VMA instruction while a different ASID is loaded into satp, provided the next time satp is loaded with the recycled ASID, it is simultaneously loaded with the new page table.
  • If the implementation does not provide ASIDs, or software chooses to always use ASID 0, then after every satp write, software should execute SFENCE.VMA with rs1=x0. In the common case that no global translations have been modified, rs2 should be set to a register other than x0 but which contains the value zero, so that global translations are not flushed.
  • If software modifies a non-leaf PTE, it should execute SFENCE.VMA with rs1=x0. If any PTE along the traversal path had its G bit set, rs2 must be x0; otherwise, rs2 should be set to the ASID for which the translation is being modified.
  • If software modifies a leaf PTE, it should execute SFENCE.VMA with rs1 set to a virtual address within the page. If any PTE along the traversal path had its G bit set, rs2 must be x0; otherwise, rs2 should be set to the ASID for which the translation is being modified.
  • For the special cases of increasing the permissions on a leaf PTE and changing an invalid PTE to a valid leaf, software may choose to execute the SFENCE.VMA lazily. After modifying the PTE but before executing SFENCE.VMA, either the new or old permissions will be used. In the latter case, a page-fault exception might occur, at which point software should execute SFENCE.VMA in accordance with the previous bullet point. ====

If a hart employs an address-translation cache, that cache must appear to be private to that hart. In particular, the meaning of an ASID is local to a hart; software may choose to use the same ASID to refer to different address spaces on different harts.

§[NOTE]

§A future extension could redefine ASIDs to be global across the SEE, enabling such options as shared translation caches and hardware support for broadcast TLB shootdown. However, as OSes have evolved to significantly reduce the scope of TLB shootdowns using novel ASID-management techniques, we expect the local-ASID scheme to remain attractive for its simplicity and possibly better scalability.

For implementations that make satp.MODE read-only zero (always Bare), attempts to execute an SFENCE.VMA instruction might raise an illegal-instruction exception.

§Forms

Assembly: sfence.vma xs1, xs2

§

SFENCEWINVAL = 533

Order writes before sfence

The sfence.w.inval instruction guarantees that any previous stores already visible to the current RISC-V hart are ordered before subsequent sinval.vma instructions executed by the same hart.

§Forms

Assembly: sfence.w.inval ""

§

SGTZ = 534

RISC-V sgtz instruction.

§Forms

Assembly: sgtz rd rs2

§

SH = 535

Store halfword

Store 16 bits of data from register rs2 to an address formed by adding rs1 to a signed offset.

§Forms

Assembly: sh xs2, imm(xs1)

§

SH1ADD = 536

Shift left by 1 and add

This instruction shifts rs1 to the left by 1 bit and adds it to rs2.

§Forms

Assembly: sh1add xd, xs1, xs2

§

SH1ADDUW = 537

Shift unsigned word left by 1 and add

This instruction performs an XLEN-wide addition of two addends. The first addend is rs2. The second addend is the unsigned value formed by extracting the least-significant word of rs1 and shifting it left by 1 place.

§Forms

Assembly: sh1add.uw xd, xs1, xs2

§

SH2ADD = 538

Shift left by 2 and add

This instruction shifts rs1 to the left by 2 places and adds it to rs2.

§Forms

Assembly: sh2add xd, xs1, xs2

§

SH2ADDUW = 539

Shift unsigned word left by 2 and add

This instruction performs an XLEN-wide addition of two addends. The first addend is rs2. The second addend is the unsigned value formed by extracting the least-significant word of rs1 and shifting it left by 2 places.

§Forms

Assembly: sh2add.uw xd, xs1, xs2

§

SH3ADD = 540

Shift left by 3 and add

This instruction shifts rs1 to the left by 3 places and adds it to rs2.

§Forms

Assembly: sh3add xd, xs1, xs2

§

SH3ADDUW = 541

Shift unsigned word left by 3 and add

This instruction performs an XLEN-wide addition of two addends. The first addend is rs2. The second addend is the unsigned value formed by extracting the least-significant word of rs1 and shifting it left by 3 places.

§Forms

Assembly: sh3add.uw xd, xs1, xs2

§

SHA256SIG0 = 542

RISC-V sha256sig0 instruction.

§Forms

Assembly: sha256sig0 xd, xs1

§

SHA256SIG1 = 543

RISC-V sha256sig1 instruction.

§Forms

Assembly: sha256sig1 xd, xs1

§

SHA256SUM0 = 544

RISC-V sha256sum0 instruction.

§Forms

Assembly: sha256sum0 xd, xs1

§

SHA256SUM1 = 545

RISC-V sha256sum1 instruction.

§Forms

Assembly: sha256sum1 xd, xs1

§

SHA512SIG0 = 546

RISC-V sha512sig0 instruction.

§Forms

Assembly: sha512sig0 xd, xs1

§

SHA512SIG0H = 547

RISC-V sha512sig0h instruction.

§Forms

Assembly: sha512sig0h xd, xs1, xs2

§

SHA512SIG0L = 548

RISC-V sha512sig0l instruction.

§Forms

Assembly: sha512sig0l xd, xs1, xs2

§

SHA512SIG1 = 549

RISC-V sha512sig1 instruction.

§Forms

Assembly: sha512sig1 xd, xs1

§

SHA512SIG1H = 550

RISC-V sha512sig1h instruction.

§Forms

Assembly: sha512sig1h xd, xs1, xs2

§

SHA512SIG1L = 551

RISC-V sha512sig1l instruction.

§Forms

Assembly: sha512sig1l xd, xs1, xs2

§

SHA512SUM0 = 552

RISC-V sha512sum0 instruction.

§Forms

Assembly: sha512sum0 xd, xs1

§

SHA512SUM0R = 553

RISC-V sha512sum0r instruction.

§Forms

Assembly: sha512sum0r xd, xs1, xs2

§

SHA512SUM1 = 554

RISC-V sha512sum1 instruction.

§Forms

Assembly: sha512sum1 xd, xs1

§

SHA512SUM1R = 555

RISC-V sha512sum1r instruction.

§Forms

Assembly: sha512sum1r xd, xs1, xs2

§

SINVALVMA = 556

Invalidate cached address translations

§Forms

Assembly: sinval.vma xs1, xs2

§

SLL = 557

Shift left logical

Shift the value in rs1 left by the value in the lower 6 bits of rs2, and store the result in rd.

§Forms

Assembly: sll xd, xs1, xs2

§

SLLI = 558

Shift left logical immediate

Shift the value in rs1 left by shamt, and store the result in rd

§Forms

Assembly: slli xd, xs1, shamt

§

SLLIRV32 = 559

Shift left logical immediate

Shift the value in rs1 left by shamt, and store the result in rd

§Forms

Assembly: slli.rv32 xd, xs1, shamt

§

SLLIUW = 560

Shift left unsigned word (Immediate)

This instruction takes the least-significant word of rs1, zero-extends it, and shifts it left by the immediate.

[NOTE] This instruction is the same as slli with zext.w performed on rs1 before shifting.

§Forms

Assembly: slli.uw xd, xs1, shamt

§

SLLIW = 561

Shift left logical immediate word

Shift the 32-bit value in rs1 left by shamt, and store the sign-extended result in rd

§Forms

Assembly: slliw xd, xs1, shamt

§

SLLW = 562

Shift left logical word

Shift the 32-bit value in rs1 left by the value in the lower 5 bits of rs2, and store the sign-extended result in rd.

§Forms

Assembly: sllw xd, xs1, xs2

§

SLT = 563

Set on less than

Places the value 1 in register rd if register rs1 is less than the value in register rs2, where both sources are treated as signed numbers, else 0 is written to rd.

§Forms

Assembly: slt xd, xs1, rs2

§

SLTI = 564

Set on less than immediate

Places the value 1 in register rd if register rs1 is less than the sign-extended immediate when both are treated as signed numbers, else 0 is written to rd.

§Forms

Assembly: slti xd, xs1, imm

§

SLTIU = 565

Set on less than immediate unsigned

Places the value 1 in register rd if register rs1 is less than the sign-extended immediate when both are treated as unsigned numbers (i.e., the immediate is first sign-extended to XLEN bits then treated as an unsigned number), else 0 is written to rd.

NOTE: sltiu rd, rs1, 1 sets rd to 1 if rs1 equals zero, otherwise sets rd to 0 (assembler pseudoinstruction SEQZ rd, rs).

§Forms

Assembly: sltiu xd, xs1, imm

§

SLTU = 566

Set on less than unsigned

Places the value 1 in register rd if register rs1 is less than the value in register rs2, where both sources are treated as unsigned numbers, else 0 is written to rd.

§Forms

Assembly: sltu xd, xs1, xs2

§

SLTZ = 567

RISC-V sltz instruction.

§Forms

Assembly: sltz rd rs1

§

SM3P0 = 568

RISC-V sm3p0 instruction.

§Forms

Assembly: sm3p0 xd, xs1

§

SM3P1 = 569

RISC-V sm3p1 instruction.

§Forms

Assembly: sm3p1 xd, xs1

§

SM4ED = 570

RISC-V sm4ed instruction.

§Forms

Assembly: sm4ed xd, xs1, xs2, bs

§

SM4KS = 571

RISC-V sm4ks instruction.

§Forms

Assembly: sm4ks xd, xs1, xs2, bs

§

SNEZ = 572

RISC-V snez instruction.

§Forms

Assembly: snez rd rs2

§

SRA = 573

Shift right arithmetic

Arithmetic shift the value in rs1 right by the value in the lower 5 bits of rs2, and store the result in rd.

§Forms

Assembly: sra xd, xs1, xs2

§

SRAI = 574

Shift right arithmetic immediate

Arithmetic shift (the original sign bit is copied into the vacated upper bits) the value in rs1 right by shamt, and store the result in rd.

§Forms

Assembly: srai xd, xs1, shamt

§

SRAIRV32 = 575

Shift right arithmetic immediate

Arithmetic shift (the original sign bit is copied into the vacated upper bits) the value in rs1 right by shamt, and store the result in rd.

§Forms

Assembly: srai.rv32 xd, xs1, shamt

§

SRAIW = 576

Shift right arithmetic immediate word

Arithmetic shift (the original sign bit is copied into the vacated upper bits) the 32-bit value in rs1 right by shamt, and store the sign-extended result in rd.

§Forms

Assembly: sraiw xd, xs1, shamt

§

SRAW = 577

Shift right arithmetic word

Arithmetic shift the 32-bit value in rs1 right by the value in the lower 5 bits of rs2, and store the sign-extended result in rd.

§Forms

Assembly: sraw xd, xs1, xs2

§

SRET = 578

Supervisor Exception Return

Returns from an exception.

When sret is allowed to execute, its behavior depends on whether or not the current privilege mode is virtualized.

When the current privilege mode is (H)S-mode or M-mode

sret sets hstatus.HPV = 0, mstatus.SPP = 0, mstatus.SIE = mstatus.SPIE, and mstatus.SPIE = 1, changes the privilege mode according to the table below, and then jumps to the address in sepc.

.Next privilege mode following an sret in (H)S-mode or M-mode [%autowidth] |=== | [.rotate]#mstatus.SPP# | [.rotate]#hstatus.SPV# .>| Mode after sret

| 0 | 0 | U-mode | 0 | 1 | VU-mode | 1 | 0 | (H)S-mode | 1 | 1 | VS-mode |===

When the current privilege mode is VS-mode

sret sets vsstatus.SPP = 0, vsstatus.SIE = vstatus.SPIE, and vsstatus.SPIE = 1, changes the privilege mode according to the table below, and then jumps to the address in vsepc.

.Next privilege mode following an sret in (H)S-mode or M-mode [%autowidth] |=== | [.rotate]#vsstatus.SPP# .>| Mode after sret

| 0 | VU-mode | 1 | VS-mode |===

§Forms

Assembly: sret ""

§

SRL = 579

Shift right logical

Logical shift the value in rs1 right by the value in the lower bits of rs2, and store the result in rd.

§Forms

Assembly: srl xd, xs1, xs2

§

SRLI = 580

Shift right logical immediate

Shift the value in rs1 right by shamt, and store the result in rd

§Forms

Assembly: srli xd, xs1, shamt

§

SRLIRV32 = 581

Shift right logical immediate

Shift the value in rs1 right by shamt, and store the result in rd

§Forms

Assembly: srli.rv32 xd, xs1, shamt

§

SRLIW = 582

Shift right logical immediate word

Shift the 32-bit value in rs1 right by shamt, and store the sign-extended result in rd

§Forms

Assembly: srliw xd, xs1, shamt

§

SRLW = 583

Shift right logical word

Logical shift the 32-bit value in rs1 right by the value in the lower 5 bits of rs2, and store the sign-extended result in rd.

§Forms

Assembly: srlw xd, xs1, xs2

§

SSAMOSWAPD = 584

RISC-V ssamoswap.d instruction.

§Forms

Assembly: ssamoswap.d xd, xs1, xs2, aq, rl

§

SSAMOSWAPW = 585

RISC-V ssamoswap.w instruction.

§Forms

Assembly: ssamoswap.w xd, xs1, xs2, aq, rl

§

SSPOPCHKX1 = 586

RISC-V sspopchk.x1 instruction.

§Forms

Assembly: sspopchk.x1 sspopchk_x1

§

SSPOPCHKX5 = 587

RISC-V sspopchk.x5 instruction.

§Forms

Assembly: sspopchk.x5 sspopchk_x5

§

SSPUSHX1 = 588

RISC-V sspush.x1 instruction.

§Forms

Assembly: sspush.x1 sspush_x1

§

SSPUSHX5 = 589

RISC-V sspush.x5 instruction.

§Forms

Assembly: sspush.x5 sspush_x5

§

SSRDP = 590

RISC-V ssrdp instruction.

§Forms

Assembly: ssrdp xd

§

SUB = 591

Subtract

Subtract the value in rs2 from rs1, and store the result in rd

§Forms

Assembly: sub xd, xs1, xs2

§

SUBW = 592

Subtract word

Subtract the 32-bit values in rs2 from rs1, and store the sign-extended result in rd

§Forms

Assembly: subw xd, xs1, xs2

§

SW = 593

Store word

Store 32 bits of data from register rs2 to an address formed by adding rs1 to a signed offset.

§Forms

Assembly: sw xs2, imm(xs1)

§

UNZIP = 594

Bit deinterleave

This instruction gathers bits from the high and low halves of the source word into odd/even bit positions in the destination word. It is the inverse of the zip instruction. This instruction is available only on RV32.

§Forms

Assembly: unzip xd, xs1

§

VAADDVV = 595

RISC-V vaadd.vv instruction.

§Forms

Assembly: vaadd.vv vm, vs2, vs1, vd

§

VAADDVX = 596

RISC-V vaadd.vx instruction.

§Forms

Assembly: vaadd.vx vm, vs2, xs1, vd

§

VAADDUVV = 597

RISC-V vaaddu.vv instruction.

§Forms

Assembly: vaaddu.vv vm, vs2, vs1, vd

§

VAADDUVX = 598

RISC-V vaaddu.vx instruction.

§Forms

Assembly: vaaddu.vx vm, vs2, xs1, vd

§

VADCVIM = 599

RISC-V vadc.vim instruction.

§Forms

Assembly: vadc.vim vs2, vd, imm

§

VADCVVM = 600

RISC-V vadc.vvm instruction.

§Forms

Assembly: vadc.vvm vs2, vs1, vd

§

VADCVXM = 601

RISC-V vadc.vxm instruction.

§Forms

Assembly: vadc.vxm vs2, xs1, vd

§

VADDVI = 602

RISC-V vadd.vi instruction.

§Forms

Assembly: vadd.vi vm, vs2, vd, imm

§

VADDVV = 603

RISC-V vadd.vv instruction.

§Forms

Assembly: vadd.vv vm, vs2, vs1, vd

§

VADDVX = 604

RISC-V vadd.vx instruction.

§Forms

Assembly: vadd.vx vm, vs2, xs1, vd

§

VAESDFVS = 605

RISC-V vaesdf.vs instruction.

§Forms

Assembly: vaesdf.vs vs2, vd

§

VAESDFVV = 606

RISC-V vaesdf.vv instruction.

§Forms

Assembly: vaesdf.vv vs2, vd

§

VAESDMVS = 607

RISC-V vaesdm.vs instruction.

§Forms

Assembly: vaesdm.vs vs2, vd

§

VAESDMVV = 608

RISC-V vaesdm.vv instruction.

§Forms

Assembly: vaesdm.vv vs2, vd

§

VAESEFVS = 609

RISC-V vaesef.vs instruction.

§Forms

Assembly: vaesef.vs vs2, vd

§

VAESEFVV = 610

RISC-V vaesef.vv instruction.

§Forms

Assembly: vaesef.vv vs2, vd

§

VAESEMVS = 611

RISC-V vaesem.vs instruction.

§Forms

Assembly: vaesem.vs vs2, vd

§

VAESEMVV = 612

RISC-V vaesem.vv instruction.

§Forms

Assembly: vaesem.vv vs2, vd

§

VAESKF1VI = 613

RISC-V vaeskf1.vi instruction.

§Forms

Assembly: vaeskf1.vi vs2, vd, imm

§

VAESKF2VI = 614

RISC-V vaeskf2.vi instruction.

§Forms

Assembly: vaeskf2.vi vs2, vd, imm

§

VAESZVS = 615

Vector AES round zero

§Forms

Assembly: vaesz.vs vs2, vd

§

VANDVI = 616

RISC-V vand.vi instruction.

§Forms

Assembly: vand.vi vm, vs2, vd, imm

§

VANDVV = 617

RISC-V vand.vv instruction.

§Forms

Assembly: vand.vv vm, vs2, vs1, vd

§

VANDVX = 618

RISC-V vand.vx instruction.

§Forms

Assembly: vand.vx vm, vs2, xs1, vd

§

VANDNVV = 619

RISC-V vandn.vv instruction.

§Forms

Assembly: vandn.vv vm, vs2, vs1, vd

§

VANDNVX = 620

RISC-V vandn.vx instruction.

§Forms

Assembly: vandn.vx vm, vs2, xs1, vd

§

VASUBVV = 621

RISC-V vasub.vv instruction.

§Forms

Assembly: vasub.vv vm, vs2, vs1, vd

§

VASUBVX = 622

RISC-V vasub.vx instruction.

§Forms

Assembly: vasub.vx vm, vs2, xs1, vd

§

VASUBUVV = 623

RISC-V vasubu.vv instruction.

§Forms

Assembly: vasubu.vv vm, vs2, vs1, vd

§

VASUBUVX = 624

RISC-V vasubu.vx instruction.

§Forms

Assembly: vasubu.vx vm, vs2, xs1, vd

§

VBREV8V = 625

RISC-V vbrev8.v instruction.

§Forms

Assembly: vbrev8.v vm, vs2, vd

§

VBREVV = 626

RISC-V vbrev.v instruction.

§Forms

Assembly: vbrev.v vm, vs2, vd

§

VCLMULVV = 627

RISC-V vclmul.vv instruction.

§Forms

Assembly: vclmul.vv vm, vs2, vs1, vd

§

VCLMULVX = 628

RISC-V vclmul.vx instruction.

§Forms

Assembly: vclmul.vx vm, vs2, xs1, vd

§

VCLMULHVV = 629

RISC-V vclmulh.vv instruction.

§Forms

Assembly: vclmulh.vv vm, vs2, vs1, vd

§

VCLMULHVX = 630

RISC-V vclmulh.vx instruction.

§Forms

Assembly: vclmulh.vx vm, vs2, xs1, vd

§

VCLZV = 631

RISC-V vclz.v instruction.

§Forms

Assembly: vclz.v vm, vs2, vd

§

VCOMPRESSVM = 632

RISC-V vcompress.vm instruction.

§Forms

Assembly: vcompress.vm vs2, vs1, vd

§

VCPOPM = 633

RISC-V vcpop.m instruction.

§Forms

Assembly: vcpop.m vm, vs2, xd

§

VCPOPV = 634

RISC-V vcpop.v instruction.

§Forms

Assembly: vcpop.v vm, vs2, vd

§

VCTZV = 635

RISC-V vctz.v instruction.

§Forms

Assembly: vctz.v vm, vs2, vd

§

VDIVVV = 636

RISC-V vdiv.vv instruction.

§Forms

Assembly: vdiv.vv vm, vs2, vs1, vd

§

VDIVVX = 637

RISC-V vdiv.vx instruction.

§Forms

Assembly: vdiv.vx vm, vs2, xs1, vd

§

VDIVUVV = 638

RISC-V vdivu.vv instruction.

§Forms

Assembly: vdivu.vv vm, vs2, vs1, vd

§

VDIVUVX = 639

RISC-V vdivu.vx instruction.

§Forms

Assembly: vdivu.vx vm, vs2, xs1, vd

§

VFADDVF = 640

RISC-V vfadd.vf instruction.

§Forms

Assembly: vfadd.vf vm, vs2, xs1, vd

§

VFADDVV = 641

RISC-V vfadd.vv instruction.

§Forms

Assembly: vfadd.vv vm, vs2, vs1, vd

§

VFCLASSV = 642

RISC-V vfclass.v instruction.

§Forms

Assembly: vfclass.v vm, vs2, vd

§

VFCVTFXV = 643

RISC-V vfcvt.f.x.v instruction.

§Forms

Assembly: vfcvt.f.x.v vm, vs2, vd

§

VFCVTFXUV = 644

RISC-V vfcvt.f.xu.v instruction.

§Forms

Assembly: vfcvt.f.xu.v vm, vs2, vd

§

VFCVTRTZXFV = 645

RISC-V vfcvt.rtz.x.f.v instruction.

§Forms

Assembly: vfcvt.rtz.x.f.v vm, vs2, vd

§

VFCVTRTZXUFV = 646

RISC-V vfcvt.rtz.xu.f.v instruction.

§Forms

Assembly: vfcvt.rtz.xu.f.v vm, vs2, vd

§

VFCVTXFV = 647

RISC-V vfcvt.x.f.v instruction.

§Forms

Assembly: vfcvt.x.f.v vm, vs2, vd

§

VFCVTXUFV = 648

RISC-V vfcvt.xu.f.v instruction.

§Forms

Assembly: vfcvt.xu.f.v vm, vs2, vd

§

VFDIVVF = 649

RISC-V vfdiv.vf instruction.

§Forms

Assembly: vfdiv.vf vm, vs2, xs1, vd

§

VFDIVVV = 650

RISC-V vfdiv.vv instruction.

§Forms

Assembly: vfdiv.vv vm, vs2, vs1, vd

§

VFIRSTM = 651

RISC-V vfirst.m instruction.

§Forms

Assembly: vfirst.m vm, vs2, xd

§

VFMACCVF = 652

RISC-V vfmacc.vf instruction.

§Forms

Assembly: vfmacc.vf vm, vs2, xs1, vd

§

VFMACCVV = 653

RISC-V vfmacc.vv instruction.

§Forms

Assembly: vfmacc.vv vm, vs2, vs1, vd

§

VFMADDVF = 654

RISC-V vfmadd.vf instruction.

§Forms

Assembly: vfmadd.vf vm, vs2, xs1, vd

§

VFMADDVV = 655

RISC-V vfmadd.vv instruction.

§Forms

Assembly: vfmadd.vv vm, vs2, vs1, vd

§

VFMAXVF = 656

RISC-V vfmax.vf instruction.

§Forms

Assembly: vfmax.vf vm, vs2, xs1, vd

§

VFMAXVV = 657

RISC-V vfmax.vv instruction.

§Forms

Assembly: vfmax.vv vm, vs2, vs1, vd

§

VFMERGEVFM = 658

RISC-V vfmerge.vfm instruction.

§Forms

Assembly: vfmerge.vfm vs2, xs1, vd

§

VFMINVF = 659

RISC-V vfmin.vf instruction.

§Forms

Assembly: vfmin.vf vm, vs2, xs1, vd

§

VFMINVV = 660

RISC-V vfmin.vv instruction.

§Forms

Assembly: vfmin.vv vm, vs2, vs1, vd

§

VFMSACVF = 661

RISC-V vfmsac.vf instruction.

§Forms

Assembly: vfmsac.vf vm, vs2, xs1, vd

§

VFMSACVV = 662

RISC-V vfmsac.vv instruction.

§Forms

Assembly: vfmsac.vv vm, vs2, vs1, vd

§

VFMSUBVF = 663

RISC-V vfmsub.vf instruction.

§Forms

Assembly: vfmsub.vf vm, vs2, xs1, vd

§

VFMSUBVV = 664

RISC-V vfmsub.vv instruction.

§Forms

Assembly: vfmsub.vv vm, vs2, vs1, vd

§

VFMULVF = 665

RISC-V vfmul.vf instruction.

§Forms

Assembly: vfmul.vf vm, vs2, xs1, vd

§

VFMULVV = 666

RISC-V vfmul.vv instruction.

§Forms

Assembly: vfmul.vv vm, vs2, vs1, vd

§

VFMVFS = 667

RISC-V vfmv.f.s instruction.

§Forms

Assembly: vfmv.f.s vs2, xd

§

VFMVSF = 668

RISC-V vfmv.s.f instruction.

§Forms

Assembly: vfmv.s.f xs1, vd

§

VFMVVF = 669

RISC-V vfmv.v.f instruction.

§Forms

Assembly: vfmv.v.f xs1, vd

§

VFNCVTFFW = 670

RISC-V vfncvt.f.f.w instruction.

§Forms

Assembly: vfncvt.f.f.w vm, vs2, vd

§

VFNCVTFXW = 671

RISC-V vfncvt.f.x.w instruction.

§Forms

Assembly: vfncvt.f.x.w vm, vs2, vd

§

VFNCVTFXUW = 672

RISC-V vfncvt.f.xu.w instruction.

§Forms

Assembly: vfncvt.f.xu.w vm, vs2, vd

§

VFNCVTRODFFW = 673

RISC-V vfncvt.rod.f.f.w instruction.

§Forms

Assembly: vfncvt.rod.f.f.w vm, vs2, vd

§

VFNCVTRTZXFW = 674

RISC-V vfncvt.rtz.x.f.w instruction.

§Forms

Assembly: vfncvt.rtz.x.f.w vm, vs2, vd

§

VFNCVTRTZXUFW = 675

RISC-V vfncvt.rtz.xu.f.w instruction.

§Forms

Assembly: vfncvt.rtz.xu.f.w vm, vs2, vd

§

VFNCVTXFW = 676

RISC-V vfncvt.x.f.w instruction.

§Forms

Assembly: vfncvt.x.f.w vm, vs2, vd

§

VFNCVTXUFW = 677

RISC-V vfncvt.xu.f.w instruction.

§Forms

Assembly: vfncvt.xu.f.w vm, vs2, vd

§

VFNCVTBF16FFW = 678

RISC-V vfncvtbf16.f.f.w instruction.

§Forms

Assembly: vfncvtbf16.f.f.w vm, vs2, vd

§

VFNMACCVF = 679

RISC-V vfnmacc.vf instruction.

§Forms

Assembly: vfnmacc.vf vm, vs2, xs1, vd

§

VFNMACCVV = 680

RISC-V vfnmacc.vv instruction.

§Forms

Assembly: vfnmacc.vv vm, vs2, vs1, vd

§

VFNMADDVF = 681

RISC-V vfnmadd.vf instruction.

§Forms

Assembly: vfnmadd.vf vm, vs2, xs1, vd

§

VFNMADDVV = 682

RISC-V vfnmadd.vv instruction.

§Forms

Assembly: vfnmadd.vv vm, vs2, vs1, vd

§

VFNMSACVF = 683

RISC-V vfnmsac.vf instruction.

§Forms

Assembly: vfnmsac.vf vm, vs2, xs1, vd

§

VFNMSACVV = 684

RISC-V vfnmsac.vv instruction.

§Forms

Assembly: vfnmsac.vv vm, vs2, vs1, vd

§

VFNMSUBVF = 685

RISC-V vfnmsub.vf instruction.

§Forms

Assembly: vfnmsub.vf vm, vs2, xs1, vd

§

VFNMSUBVV = 686

RISC-V vfnmsub.vv instruction.

§Forms

Assembly: vfnmsub.vv vm, vs2, vs1, vd

§

VFRDIVVF = 687

RISC-V vfrdiv.vf instruction.

§Forms

Assembly: vfrdiv.vf vm, vs2, xs1, vd

§

VFREC7V = 688

RISC-V vfrec7.v instruction.

§Forms

Assembly: vfrec7.v vm, vs2, vd

§

VFREDMAXVS = 689

RISC-V vfredmax.vs instruction.

§Forms

Assembly: vfredmax.vs vm, vs2, vs1, vd

§

VFREDMINVS = 690

RISC-V vfredmin.vs instruction.

§Forms

Assembly: vfredmin.vs vm, vs2, vs1, vd

§

VFREDOSUMVS = 691

RISC-V vfredosum.vs instruction.

§Forms

Assembly: vfredosum.vs vm, vs2, vs1, vd

§

VFREDSUMVS = 692

RISC-V vfredsum.vs instruction.

§Forms

Assembly: vfredsum.vs vd vs1 vs2 vm

§

VFREDUSUMVS = 693

RISC-V vfredusum.vs instruction.

§Forms

Assembly: vfredusum.vs vm, vs2, vs1, vd

§

VFRSQRT7V = 694

RISC-V vfrsqrt7.v instruction.

§Forms

Assembly: vfrsqrt7.v vm, vs2, vd

§

VFRSUBVF = 695

RISC-V vfrsub.vf instruction.

§Forms

Assembly: vfrsub.vf vm, vs2, xs1, vd

§

VFSGNJVF = 696

RISC-V vfsgnj.vf instruction.

§Forms

Assembly: vfsgnj.vf vm, vs2, xs1, vd

§

VFSGNJVV = 697

RISC-V vfsgnj.vv instruction.

§Forms

Assembly: vfsgnj.vv vm, vs2, vs1, vd

§

VFSGNJNVF = 698

RISC-V vfsgnjn.vf instruction.

§Forms

Assembly: vfsgnjn.vf vm, vs2, xs1, vd

§

VFSGNJNVV = 699

RISC-V vfsgnjn.vv instruction.

§Forms

Assembly: vfsgnjn.vv vm, vs2, vs1, vd

§

VFSGNJXVF = 700

RISC-V vfsgnjx.vf instruction.

§Forms

Assembly: vfsgnjx.vf vm, vs2, xs1, vd

§

VFSGNJXVV = 701

RISC-V vfsgnjx.vv instruction.

§Forms

Assembly: vfsgnjx.vv vm, vs2, vs1, vd

§

VFSLIDE1DOWNVF = 702

RISC-V vfslide1down.vf instruction.

§Forms

Assembly: vfslide1down.vf vm, vs2, xs1, vd

§

VFSLIDE1UPVF = 703

RISC-V vfslide1up.vf instruction.

§Forms

Assembly: vfslide1up.vf vm, vs2, xs1, vd

§

VFSQRTV = 704

RISC-V vfsqrt.v instruction.

§Forms

Assembly: vfsqrt.v vm, vs2, vd

§

VFSUBVF = 705

RISC-V vfsub.vf instruction.

§Forms

Assembly: vfsub.vf vm, vs2, xs1, vd

§

VFSUBVV = 706

RISC-V vfsub.vv instruction.

§Forms

Assembly: vfsub.vv vm, vs2, vs1, vd

§

VFWADDVF = 707

RISC-V vfwadd.vf instruction.

§Forms

Assembly: vfwadd.vf vm, vs2, xs1, vd

§

VFWADDVV = 708

RISC-V vfwadd.vv instruction.

§Forms

Assembly: vfwadd.vv vm, vs2, vs1, vd

§

VFWADDWF = 709

RISC-V vfwadd.wf instruction.

§Forms

Assembly: vfwadd.wf vm, vs2, xs1, vd

§

VFWADDWV = 710

RISC-V vfwadd.wv instruction.

§Forms

Assembly: vfwadd.wv vm, vs2, vs1, vd

§

VFWCVTFFV = 711

RISC-V vfwcvt.f.f.v instruction.

§Forms

Assembly: vfwcvt.f.f.v vm, vs2, vd

§

VFWCVTFXV = 712

RISC-V vfwcvt.f.x.v instruction.

§Forms

Assembly: vfwcvt.f.x.v vm, vs2, vd

§

VFWCVTFXUV = 713

RISC-V vfwcvt.f.xu.v instruction.

§Forms

Assembly: vfwcvt.f.xu.v vm, vs2, vd

§

VFWCVTRTZXFV = 714

RISC-V vfwcvt.rtz.x.f.v instruction.

§Forms

Assembly: vfwcvt.rtz.x.f.v vm, vs2, vd

§

VFWCVTRTZXUFV = 715

RISC-V vfwcvt.rtz.xu.f.v instruction.

§Forms

Assembly: vfwcvt.rtz.xu.f.v vm, vs2, vd

§

VFWCVTXFV = 716

RISC-V vfwcvt.x.f.v instruction.

§Forms

Assembly: vfwcvt.x.f.v vm, vs2, vd

§

VFWCVTXUFV = 717

RISC-V vfwcvt.xu.f.v instruction.

§Forms

Assembly: vfwcvt.xu.f.v vm, vs2, vd

§

VFWCVTBF16FFV = 718

RISC-V vfwcvtbf16.f.f.v instruction.

§Forms

Assembly: vfwcvtbf16.f.f.v vm, vs2, vd

§

VFWMACCVF = 719

RISC-V vfwmacc.vf instruction.

§Forms

Assembly: vfwmacc.vf vm, vs2, xs1, vd

§

VFWMACCVV = 720

RISC-V vfwmacc.vv instruction.

§Forms

Assembly: vfwmacc.vv vm, vs2, vs1, vd

§

VFWMACCBF16VF = 721

RISC-V vfwmaccbf16.vf instruction.

§Forms

Assembly: vfwmaccbf16.vf vm, vs2, xs1, vd

§

VFWMACCBF16VV = 722

RISC-V vfwmaccbf16.vv instruction.

§Forms

Assembly: vfwmaccbf16.vv vm, vs2, vs1, vd

§

VFWMSACVF = 723

RISC-V vfwmsac.vf instruction.

§Forms

Assembly: vfwmsac.vf vm, vs2, xs1, vd

§

VFWMSACVV = 724

RISC-V vfwmsac.vv instruction.

§Forms

Assembly: vfwmsac.vv vm, vs2, vs1, vd

§

VFWMULVF = 725

RISC-V vfwmul.vf instruction.

§Forms

Assembly: vfwmul.vf vm, vs2, xs1, vd

§

VFWMULVV = 726

RISC-V vfwmul.vv instruction.

§Forms

Assembly: vfwmul.vv vm, vs2, vs1, vd

§

VFWNMACCVF = 727

RISC-V vfwnmacc.vf instruction.

§Forms

Assembly: vfwnmacc.vf vm, vs2, xs1, vd

§

VFWNMACCVV = 728

RISC-V vfwnmacc.vv instruction.

§Forms

Assembly: vfwnmacc.vv vm, vs2, vs1, vd

§

VFWNMSACVF = 729

RISC-V vfwnmsac.vf instruction.

§Forms

Assembly: vfwnmsac.vf vm, vs2, xs1, vd

§

VFWNMSACVV = 730

RISC-V vfwnmsac.vv instruction.

§Forms

Assembly: vfwnmsac.vv vm, vs2, vs1, vd

§

VFWREDOSUMVS = 731

RISC-V vfwredosum.vs instruction.

§Forms

Assembly: vfwredosum.vs vm, vs2, vs1, vd

§

VFWREDSUMVS = 732

RISC-V vfwredsum.vs instruction.

§Forms

Assembly: vfwredsum.vs vd vs1 vs2 vm

§

VFWREDUSUMVS = 733

RISC-V vfwredusum.vs instruction.

§Forms

Assembly: vfwredusum.vs vm, vs2, vs1, vd

§

VFWSUBVF = 734

RISC-V vfwsub.vf instruction.

§Forms

Assembly: vfwsub.vf vm, vs2, xs1, vd

§

VFWSUBVV = 735

RISC-V vfwsub.vv instruction.

§Forms

Assembly: vfwsub.vv vm, vs2, vs1, vd

§

VFWSUBWF = 736

RISC-V vfwsub.wf instruction.

§Forms

Assembly: vfwsub.wf vm, vs2, xs1, vd

§

VFWSUBWV = 737

RISC-V vfwsub.wv instruction.

§Forms

Assembly: vfwsub.wv vm, vs2, vs1, vd

§

VGHSHVV = 738

RISC-V vghsh.vv instruction.

§Forms

Assembly: vghsh.vv vs2, vs1, vd

§

VGMULVV = 739

RISC-V vgmul.vv instruction.

§Forms

Assembly: vgmul.vv vs2, vd

§

VIDV = 740

RISC-V vid.v instruction.

§Forms

Assembly: vid.v vm, vd

§

VIOTAM = 741

RISC-V viota.m instruction.

§Forms

Assembly: viota.m vm, vs2, vd

§

VL1RV = 742

RISC-V vl1r.v instruction.

§Forms

Assembly: vl1r.v vd rs1

§

VL1RE16V = 743

RISC-V vl1re16.v instruction.

§Forms

Assembly: vl1re16.v xs1, vd

§

VL1RE32V = 744

RISC-V vl1re32.v instruction.

§Forms

Assembly: vl1re32.v xs1, vd

§

VL1RE64V = 745

RISC-V vl1re64.v instruction.

§Forms

Assembly: vl1re64.v xs1, vd

§

VL1RE8V = 746

RISC-V vl1re8.v instruction.

§Forms

Assembly: vl1re8.v xs1, vd

§

VL2RV = 747

RISC-V vl2r.v instruction.

§Forms

Assembly: vl2r.v vd rs1

§

VL2RE16V = 748

RISC-V vl2re16.v instruction.

§Forms

Assembly: vl2re16.v xs1, vd

§

VL2RE32V = 749

RISC-V vl2re32.v instruction.

§Forms

Assembly: vl2re32.v xs1, vd

§

VL2RE64V = 750

RISC-V vl2re64.v instruction.

§Forms

Assembly: vl2re64.v xs1, vd

§

VL2RE8V = 751

RISC-V vl2re8.v instruction.

§Forms

Assembly: vl2re8.v xs1, vd

§

VL4RV = 752

RISC-V vl4r.v instruction.

§Forms

Assembly: vl4r.v vd rs1

§

VL4RE16V = 753

RISC-V vl4re16.v instruction.

§Forms

Assembly: vl4re16.v xs1, vd

§

VL4RE32V = 754

RISC-V vl4re32.v instruction.

§Forms

Assembly: vl4re32.v xs1, vd

§

VL4RE64V = 755

RISC-V vl4re64.v instruction.

§Forms

Assembly: vl4re64.v xs1, vd

§

VL4RE8V = 756

RISC-V vl4re8.v instruction.

§Forms

Assembly: vl4re8.v xs1, vd

§

VL8RV = 757

RISC-V vl8r.v instruction.

§Forms

Assembly: vl8r.v vd rs1

§

VL8RE16V = 758

RISC-V vl8re16.v instruction.

§Forms

Assembly: vl8re16.v xs1, vd

§

VL8RE32V = 759

RISC-V vl8re32.v instruction.

§Forms

Assembly: vl8re32.v xs1, vd

§

VL8RE64V = 760

RISC-V vl8re64.v instruction.

§Forms

Assembly: vl8re64.v xs1, vd

§

VL8RE8V = 761

RISC-V vl8re8.v instruction.

§Forms

Assembly: vl8re8.v xs1, vd

§

VLE16V = 762

RISC-V vle16.v instruction.

§Forms

Assembly: vle16.v vm, xs1, vd

§

VLE16FFV = 763

RISC-V vle16ff.v instruction.

§Forms

Assembly: vle16ff.v vm, xs1, vd

§

VLE1V = 764

RISC-V vle1.v instruction.

§Forms

Assembly: vle1.v vd rs1

§

VLE32V = 765

RISC-V vle32.v instruction.

§Forms

Assembly: vle32.v vm, xs1, vd

§

VLE32FFV = 766

RISC-V vle32ff.v instruction.

§Forms

Assembly: vle32ff.v vm, xs1, vd

§

VLE64V = 767

RISC-V vle64.v instruction.

§Forms

Assembly: vle64.v vm, xs1, vd

§

VLE64FFV = 768

RISC-V vle64ff.v instruction.

§Forms

Assembly: vle64ff.v vm, xs1, vd

§

VLE8V = 769

RISC-V vle8.v instruction.

§Forms

Assembly: vle8.v vm, xs1, vd

§

VLE8FFV = 770

RISC-V vle8ff.v instruction.

§Forms

Assembly: vle8ff.v vm, xs1, vd

§

VLMV = 771

RISC-V vlm.v instruction.

§Forms

Assembly: vlm.v xs1, vd

§

VLOXEI16V = 772

RISC-V vloxei16.v instruction.

§Forms

Assembly: vloxei16.v vm, vs2, xs1, vd

§

VLOXEI32V = 773

RISC-V vloxei32.v instruction.

§Forms

Assembly: vloxei32.v vm, vs2, xs1, vd

§

VLOXEI64V = 774

RISC-V vloxei64.v instruction.

§Forms

Assembly: vloxei64.v vm, vs2, xs1, vd

§

VLOXEI8V = 775

RISC-V vloxei8.v instruction.

§Forms

Assembly: vloxei8.v vm, vs2, xs1, vd

§

VLSE16V = 776

RISC-V vlse16.v instruction.

§Forms

Assembly: vlse16.v vm, xs2, xs1, vd

§

VLSE32V = 777

RISC-V vlse32.v instruction.

§Forms

Assembly: vlse32.v vm, xs2, xs1, vd

§

VLSE64V = 778

RISC-V vlse64.v instruction.

§Forms

Assembly: vlse64.v vm, xs2, xs1, vd

§

VLSE8V = 779

RISC-V vlse8.v instruction.

§Forms

Assembly: vlse8.v vm, xs2, xs1, vd

§

VLUXEI16V = 780

RISC-V vluxei16.v instruction.

§Forms

Assembly: vluxei16.v vm, vs2, xs1, vd

§

VLUXEI32V = 781

RISC-V vluxei32.v instruction.

§Forms

Assembly: vluxei32.v vm, vs2, xs1, vd

§

VLUXEI64V = 782

RISC-V vluxei64.v instruction.

§Forms

Assembly: vluxei64.v vm, vs2, xs1, vd

§

VLUXEI8V = 783

RISC-V vluxei8.v instruction.

§Forms

Assembly: vluxei8.v vm, vs2, xs1, vd

§

VMACCVV = 784

RISC-V vmacc.vv instruction.

§Forms

Assembly: vmacc.vv vm, vs2, vs1, vd

§

VMACCVX = 785

RISC-V vmacc.vx instruction.

§Forms

Assembly: vmacc.vx vm, vs2, xs1, vd

§

VMADCVI = 786

RISC-V vmadc.vi instruction.

§Forms

Assembly: vmadc.vi vs2, vd, imm

§

VMADCVIM = 787

RISC-V vmadc.vim instruction.

§Forms

Assembly: vmadc.vim vs2, vd, imm

§

VMADCVV = 788

RISC-V vmadc.vv instruction.

§Forms

Assembly: vmadc.vv vs2, vs1, vd

§

VMADCVVM = 789

RISC-V vmadc.vvm instruction.

§Forms

Assembly: vmadc.vvm vs2, vs1, vd

§

VMADCVX = 790

RISC-V vmadc.vx instruction.

§Forms

Assembly: vmadc.vx vs2, xs1, vd

§

VMADCVXM = 791

RISC-V vmadc.vxm instruction.

§Forms

Assembly: vmadc.vxm vs2, xs1, vd

§

VMADDVV = 792

RISC-V vmadd.vv instruction.

§Forms

Assembly: vmadd.vv vm, vs2, vs1, vd

§

VMADDVX = 793

RISC-V vmadd.vx instruction.

§Forms

Assembly: vmadd.vx vm, vs2, xs1, vd

§

VMANDMM = 794

RISC-V vmand.mm instruction.

§Forms

Assembly: vmand.mm vs2, vs1, vd

§

VMANDNMM = 795

RISC-V vmandn.mm instruction.

§Forms

Assembly: vmandn.mm vs2, vs1, vd

§

VMANDNOTMM = 796

RISC-V vmandnot.mm instruction.

§Forms

Assembly: vmandnot.mm vd vs1 vs2 vm

§

VMAXVV = 797

RISC-V vmax.vv instruction.

§Forms

Assembly: vmax.vv vm, vs2, vs1, vd

§

VMAXVX = 798

RISC-V vmax.vx instruction.

§Forms

Assembly: vmax.vx vm, vs2, xs1, vd

§

VMAXUVV = 799

RISC-V vmaxu.vv instruction.

§Forms

Assembly: vmaxu.vv vm, vs2, vs1, vd

§

VMAXUVX = 800

RISC-V vmaxu.vx instruction.

§Forms

Assembly: vmaxu.vx vm, vs2, xs1, vd

§

VMERGEVIM = 801

RISC-V vmerge.vim instruction.

§Forms

Assembly: vmerge.vim vs2, vd, imm

§

VMERGEVVM = 802

RISC-V vmerge.vvm instruction.

§Forms

Assembly: vmerge.vvm vs2, vs1, vd

§

VMERGEVXM = 803

RISC-V vmerge.vxm instruction.

§Forms

Assembly: vmerge.vxm vs2, xs1, vd

§

VMFEQVF = 804

RISC-V vmfeq.vf instruction.

§Forms

Assembly: vmfeq.vf vm, vs2, xs1, vd

§

VMFEQVV = 805

RISC-V vmfeq.vv instruction.

§Forms

Assembly: vmfeq.vv vm, vs2, vs1, vd

§

VMFGEVF = 806

RISC-V vmfge.vf instruction.

§Forms

Assembly: vmfge.vf vm, vs2, xs1, vd

§

VMFGTVF = 807

RISC-V vmfgt.vf instruction.

§Forms

Assembly: vmfgt.vf vm, vs2, xs1, vd

§

VMFLEVF = 808

RISC-V vmfle.vf instruction.

§Forms

Assembly: vmfle.vf vm, vs2, xs1, vd

§

VMFLEVV = 809

RISC-V vmfle.vv instruction.

§Forms

Assembly: vmfle.vv vm, vs2, vs1, vd

§

VMFLTVF = 810

RISC-V vmflt.vf instruction.

§Forms

Assembly: vmflt.vf vm, vs2, xs1, vd

§

VMFLTVV = 811

RISC-V vmflt.vv instruction.

§Forms

Assembly: vmflt.vv vm, vs2, vs1, vd

§

VMFNEVF = 812

RISC-V vmfne.vf instruction.

§Forms

Assembly: vmfne.vf vm, vs2, xs1, vd

§

VMFNEVV = 813

RISC-V vmfne.vv instruction.

§Forms

Assembly: vmfne.vv vm, vs2, vs1, vd

§

VMINVV = 814

RISC-V vmin.vv instruction.

§Forms

Assembly: vmin.vv vm, vs2, vs1, vd

§

VMINVX = 815

RISC-V vmin.vx instruction.

§Forms

Assembly: vmin.vx vm, vs2, xs1, vd

§

VMINUVV = 816

RISC-V vminu.vv instruction.

§Forms

Assembly: vminu.vv vm, vs2, vs1, vd

§

VMINUVX = 817

RISC-V vminu.vx instruction.

§Forms

Assembly: vminu.vx vm, vs2, xs1, vd

§

VMNANDMM = 818

RISC-V vmnand.mm instruction.

§Forms

Assembly: vmnand.mm vs2, vs1, vd

§

VMNORMM = 819

RISC-V vmnor.mm instruction.

§Forms

Assembly: vmnor.mm vs2, vs1, vd

§

VMORMM = 820

RISC-V vmor.mm instruction.

§Forms

Assembly: vmor.mm vs2, vs1, vd

§

VMORNMM = 821

RISC-V vmorn.mm instruction.

§Forms

Assembly: vmorn.mm vs2, vs1, vd

§

VMORNOTMM = 822

RISC-V vmornot.mm instruction.

§Forms

Assembly: vmornot.mm vd vs1 vs2 vm

§

VMSBCVV = 823

RISC-V vmsbc.vv instruction.

§Forms

Assembly: vmsbc.vv vs2, vs1, vd

§

VMSBCVVM = 824

RISC-V vmsbc.vvm instruction.

§Forms

Assembly: vmsbc.vvm vs2, vs1, vd

§

VMSBCVX = 825

RISC-V vmsbc.vx instruction.

§Forms

Assembly: vmsbc.vx vs2, xs1, vd

§

VMSBCVXM = 826

RISC-V vmsbc.vxm instruction.

§Forms

Assembly: vmsbc.vxm vs2, xs1, vd

§

VMSBFM = 827

RISC-V vmsbf.m instruction.

§Forms

Assembly: vmsbf.m vm, vs2, vd

§

VMSEQVI = 828

RISC-V vmseq.vi instruction.

§Forms

Assembly: vmseq.vi vm, vs2, vd, imm

§

VMSEQVV = 829

RISC-V vmseq.vv instruction.

§Forms

Assembly: vmseq.vv vm, vs2, vs1, vd

§

VMSEQVX = 830

RISC-V vmseq.vx instruction.

§Forms

Assembly: vmseq.vx vm, vs2, xs1, vd

§

VMSGTVI = 831

RISC-V vmsgt.vi instruction.

§Forms

Assembly: vmsgt.vi vm, vs2, vd, imm

§

VMSGTVX = 832

RISC-V vmsgt.vx instruction.

§Forms

Assembly: vmsgt.vx vm, vs2, xs1, vd

§

VMSGTUVI = 833

RISC-V vmsgtu.vi instruction.

§Forms

Assembly: vmsgtu.vi vm, vs2, vd, imm

§

VMSGTUVX = 834

RISC-V vmsgtu.vx instruction.

§Forms

Assembly: vmsgtu.vx vm, vs2, xs1, vd

§

VMSIFM = 835

RISC-V vmsif.m instruction.

§Forms

Assembly: vmsif.m vm, vs2, vd

§

VMSLEVI = 836

RISC-V vmsle.vi instruction.

§Forms

Assembly: vmsle.vi vm, vs2, vd, imm

§

VMSLEVV = 837

RISC-V vmsle.vv instruction.

§Forms

Assembly: vmsle.vv vm, vs2, vs1, vd

§

VMSLEVX = 838

RISC-V vmsle.vx instruction.

§Forms

Assembly: vmsle.vx vm, vs2, xs1, vd

§

VMSLEUVI = 839

RISC-V vmsleu.vi instruction.

§Forms

Assembly: vmsleu.vi vm, vs2, vd, imm

§

VMSLEUVV = 840

RISC-V vmsleu.vv instruction.

§Forms

Assembly: vmsleu.vv vm, vs2, vs1, vd

§

VMSLEUVX = 841

RISC-V vmsleu.vx instruction.

§Forms

Assembly: vmsleu.vx vm, vs2, xs1, vd

§

VMSLTVV = 842

RISC-V vmslt.vv instruction.

§Forms

Assembly: vmslt.vv vm, vs2, vs1, vd

§

VMSLTVX = 843

RISC-V vmslt.vx instruction.

§Forms

Assembly: vmslt.vx vm, vs2, xs1, vd

§

VMSLTUVV = 844

RISC-V vmsltu.vv instruction.

§Forms

Assembly: vmsltu.vv vm, vs2, vs1, vd

§

VMSLTUVX = 845

RISC-V vmsltu.vx instruction.

§Forms

Assembly: vmsltu.vx vm, vs2, xs1, vd

§

VMSNEVI = 846

RISC-V vmsne.vi instruction.

§Forms

Assembly: vmsne.vi vm, vs2, vd, imm

§

VMSNEVV = 847

RISC-V vmsne.vv instruction.

§Forms

Assembly: vmsne.vv vm, vs2, vs1, vd

§

VMSNEVX = 848

RISC-V vmsne.vx instruction.

§Forms

Assembly: vmsne.vx vm, vs2, xs1, vd

§

VMSOFM = 849

RISC-V vmsof.m instruction.

§Forms

Assembly: vmsof.m vm, vs2, vd

§

VMULVV = 850

RISC-V vmul.vv instruction.

§Forms

Assembly: vmul.vv vm, vs2, vs1, vd

§

VMULVX = 851

RISC-V vmul.vx instruction.

§Forms

Assembly: vmul.vx vm, vs2, xs1, vd

§

VMULHVV = 852

RISC-V vmulh.vv instruction.

§Forms

Assembly: vmulh.vv vm, vs2, vs1, vd

§

VMULHVX = 853

RISC-V vmulh.vx instruction.

§Forms

Assembly: vmulh.vx vm, vs2, xs1, vd

§

VMULHSUVV = 854

RISC-V vmulhsu.vv instruction.

§Forms

Assembly: vmulhsu.vv vm, vs2, vs1, vd

§

VMULHSUVX = 855

RISC-V vmulhsu.vx instruction.

§Forms

Assembly: vmulhsu.vx vm, vs2, xs1, vd

§

VMULHUVV = 856

RISC-V vmulhu.vv instruction.

§Forms

Assembly: vmulhu.vv vm, vs2, vs1, vd

§

VMULHUVX = 857

RISC-V vmulhu.vx instruction.

§Forms

Assembly: vmulhu.vx vm, vs2, xs1, vd

§

VMV1RV = 858

RISC-V vmv1r.v instruction.

§Forms

Assembly: vmv1r.v vs2, vd

§

VMV2RV = 859

RISC-V vmv2r.v instruction.

§Forms

Assembly: vmv2r.v vs2, vd

§

VMV4RV = 860

RISC-V vmv4r.v instruction.

§Forms

Assembly: vmv4r.v vs2, vd

§

VMV8RV = 861

RISC-V vmv8r.v instruction.

§Forms

Assembly: vmv8r.v vs2, vd

§

VMVSX = 862

RISC-V vmv.s.x instruction.

§Forms

Assembly: vmv.s.x xs1, vd

§

VMVVI = 863

RISC-V vmv.v.i instruction.

§Forms

Assembly: vmv.v.i vd, imm

§

VMVVV = 864

RISC-V vmv.v.v instruction.

§Forms

Assembly: vmv.v.v vs1, vd

§

VMVVX = 865

RISC-V vmv.v.x instruction.

§Forms

Assembly: vmv.v.x xs1, vd

§

VMVXS = 866

RISC-V vmv.x.s instruction.

§Forms

Assembly: vmv.x.s vs2, xd

§

VMXNORMM = 867

RISC-V vmxnor.mm instruction.

§Forms

Assembly: vmxnor.mm vs2, vs1, vd

§

VMXORMM = 868

RISC-V vmxor.mm instruction.

§Forms

Assembly: vmxor.mm vs2, vs1, vd

§

VNCLIPWI = 869

RISC-V vnclip.wi instruction.

§Forms

Assembly: vnclip.wi vm, vs2, vd, imm

§

VNCLIPWV = 870

RISC-V vnclip.wv instruction.

§Forms

Assembly: vnclip.wv vm, vs2, vs1, vd

§

VNCLIPWX = 871

RISC-V vnclip.wx instruction.

§Forms

Assembly: vnclip.wx vm, vs2, xs1, vd

§

VNCLIPUWI = 872

RISC-V vnclipu.wi instruction.

§Forms

Assembly: vnclipu.wi vm, vs2, vd, imm

§

VNCLIPUWV = 873

RISC-V vnclipu.wv instruction.

§Forms

Assembly: vnclipu.wv vm, vs2, vs1, vd

§

VNCLIPUWX = 874

RISC-V vnclipu.wx instruction.

§Forms

Assembly: vnclipu.wx vm, vs2, xs1, vd

§

VNMSACVV = 875

RISC-V vnmsac.vv instruction.

§Forms

Assembly: vnmsac.vv vm, vs2, vs1, vd

§

VNMSACVX = 876

RISC-V vnmsac.vx instruction.

§Forms

Assembly: vnmsac.vx vm, vs2, xs1, vd

§

VNMSUBVV = 877

RISC-V vnmsub.vv instruction.

§Forms

Assembly: vnmsub.vv vm, vs2, vs1, vd

§

VNMSUBVX = 878

RISC-V vnmsub.vx instruction.

§Forms

Assembly: vnmsub.vx vm, vs2, xs1, vd

§

VNSRAWI = 879

RISC-V vnsra.wi instruction.

§Forms

Assembly: vnsra.wi vm, vs2, vd, imm

§

VNSRAWV = 880

RISC-V vnsra.wv instruction.

§Forms

Assembly: vnsra.wv vm, vs2, vs1, vd

§

VNSRAWX = 881

RISC-V vnsra.wx instruction.

§Forms

Assembly: vnsra.wx vm, vs2, xs1, vd

§

VNSRLWI = 882

RISC-V vnsrl.wi instruction.

§Forms

Assembly: vnsrl.wi vm, vs2, vd, imm

§

VNSRLWV = 883

RISC-V vnsrl.wv instruction.

§Forms

Assembly: vnsrl.wv vm, vs2, vs1, vd

§

VNSRLWX = 884

RISC-V vnsrl.wx instruction.

§Forms

Assembly: vnsrl.wx vm, vs2, xs1, vd

§

VORVI = 885

RISC-V vor.vi instruction.

§Forms

Assembly: vor.vi vm, vs2, vd, imm

§

VORVV = 886

RISC-V vor.vv instruction.

§Forms

Assembly: vor.vv vm, vs2, vs1, vd

§

VORVX = 887

RISC-V vor.vx instruction.

§Forms

Assembly: vor.vx vm, vs2, xs1, vd

§

VPOPCM = 888

RISC-V vpopc.m instruction.

§Forms

Assembly: vpopc.m rd vs2 vm

§

VREDANDVS = 889

RISC-V vredand.vs instruction.

§Forms

Assembly: vredand.vs vm, vs2, vs1, vd

§

VREDMAXVS = 890

RISC-V vredmax.vs instruction.

§Forms

Assembly: vredmax.vs vm, vs2, vs1, vd

§

VREDMAXUVS = 891

RISC-V vredmaxu.vs instruction.

§Forms

Assembly: vredmaxu.vs vm, vs2, vs1, vd

§

VREDMINVS = 892

RISC-V vredmin.vs instruction.

§Forms

Assembly: vredmin.vs vm, vs2, vs1, vd

§

VREDMINUVS = 893

RISC-V vredminu.vs instruction.

§Forms

Assembly: vredminu.vs vm, vs2, vs1, vd

§

VREDORVS = 894

RISC-V vredor.vs instruction.

§Forms

Assembly: vredor.vs vm, vs2, vs1, vd

§

VREDSUMVS = 895

RISC-V vredsum.vs instruction.

§Forms

Assembly: vredsum.vs vm, vs2, vs1, vd

§

VREDXORVS = 896

RISC-V vredxor.vs instruction.

§Forms

Assembly: vredxor.vs vm, vs2, vs1, vd

§

VREMVV = 897

RISC-V vrem.vv instruction.

§Forms

Assembly: vrem.vv vm, vs2, vs1, vd

§

VREMVX = 898

RISC-V vrem.vx instruction.

§Forms

Assembly: vrem.vx vm, vs2, xs1, vd

§

VREMUVV = 899

RISC-V vremu.vv instruction.

§Forms

Assembly: vremu.vv vm, vs2, vs1, vd

§

VREMUVX = 900

RISC-V vremu.vx instruction.

§Forms

Assembly: vremu.vx vm, vs2, xs1, vd

§

VREV8V = 901

RISC-V vrev8.v instruction.

§Forms

Assembly: vrev8.v vm, vs2, vd

§

VRGATHERVI = 902

RISC-V vrgather.vi instruction.

§Forms

Assembly: vrgather.vi vm, vs2, vd, imm

§

VRGATHERVV = 903

RISC-V vrgather.vv instruction.

§Forms

Assembly: vrgather.vv vm, vs2, vs1, vd

§

VRGATHERVX = 904

RISC-V vrgather.vx instruction.

§Forms

Assembly: vrgather.vx vm, vs2, xs1, vd

§

VRGATHEREI16VV = 905

RISC-V vrgatherei16.vv instruction.

§Forms

Assembly: vrgatherei16.vv vm, vs2, vs1, vd

§

VROLVV = 906

RISC-V vrol.vv instruction.

§Forms

Assembly: vrol.vv vm, vs2, vs1, vd

§

VROLVX = 907

RISC-V vrol.vx instruction.

§Forms

Assembly: vrol.vx vm, vs2, xs1, vd

§

VRORVI = 908

RISC-V vror.vi instruction.

§Forms

Assembly: vror.vi vm, vs2, vd, imm

§

VRORVV = 909

RISC-V vror.vv instruction.

§Forms

Assembly: vror.vv vm, vs2, vs1, vd

§

VRORVX = 910

RISC-V vror.vx instruction.

§Forms

Assembly: vror.vx vm, vs2, xs1, vd

§

VRSUBVI = 911

RISC-V vrsub.vi instruction.

§Forms

Assembly: vrsub.vi vm, vs2, vd, imm

§

VRSUBVX = 912

RISC-V vrsub.vx instruction.

§Forms

Assembly: vrsub.vx vm, vs2, xs1, vd

§

VS1RV = 913

RISC-V vs1r.v instruction.

§Forms

Assembly: vs1r.v xs1, vs3

§

VS2RV = 914

RISC-V vs2r.v instruction.

§Forms

Assembly: vs2r.v xs1, vs3

§

VS4RV = 915

RISC-V vs4r.v instruction.

§Forms

Assembly: vs4r.v xs1, vs3

§

VS8RV = 916

RISC-V vs8r.v instruction.

§Forms

Assembly: vs8r.v xs1, vs3

§

VSADDVI = 917

RISC-V vsadd.vi instruction.

§Forms

Assembly: vsadd.vi vm, vs2, vd, imm

§

VSADDVV = 918

RISC-V vsadd.vv instruction.

§Forms

Assembly: vsadd.vv vm, vs2, vs1, vd

§

VSADDVX = 919

RISC-V vsadd.vx instruction.

§Forms

Assembly: vsadd.vx vm, vs2, xs1, vd

§

VSADDUVI = 920

RISC-V vsaddu.vi instruction.

§Forms

Assembly: vsaddu.vi vm, vs2, vd, imm

§

VSADDUVV = 921

RISC-V vsaddu.vv instruction.

§Forms

Assembly: vsaddu.vv vm, vs2, vs1, vd

§

VSADDUVX = 922

RISC-V vsaddu.vx instruction.

§Forms

Assembly: vsaddu.vx vm, vs2, xs1, vd

§

VSBCVVM = 923

RISC-V vsbc.vvm instruction.

§Forms

Assembly: vsbc.vvm vs2, vs1, vd

§

VSBCVXM = 924

RISC-V vsbc.vxm instruction.

§Forms

Assembly: vsbc.vxm vs2, xs1, vd

§

VSE16V = 925

RISC-V vse16.v instruction.

§Forms

Assembly: vse16.v vm, xs1, vs3

§

VSE1V = 926

RISC-V vse1.v instruction.

§Forms

Assembly: vse1.v vs3 rs1

§

VSE32V = 927

RISC-V vse32.v instruction.

§Forms

Assembly: vse32.v vm, xs1, vs3

§

VSE64V = 928

RISC-V vse64.v instruction.

§Forms

Assembly: vse64.v vm, xs1, vs3

§

VSE8V = 929

RISC-V vse8.v instruction.

§Forms

Assembly: vse8.v vm, xs1, vs3

§

VSETIVLI = 930

RISC-V vsetivli instruction.

§Forms

Assembly: vsetivli xd, imm

§

VSETVL = 931

RISC-V vsetvl instruction.

§Forms

Assembly: vsetvl xs2, xs1, xd

§

VSETVLI = 932

RISC-V vsetvli instruction.

§Forms

Assembly: vsetvli xs1, xd, imm

§

VSEXTVF2 = 933

RISC-V vsext.vf2 instruction.

§Forms

Assembly: vsext.vf2 vm, vs2, vd

§

VSEXTVF4 = 934

RISC-V vsext.vf4 instruction.

§Forms

Assembly: vsext.vf4 vm, vs2, vd

§

VSEXTVF8 = 935

RISC-V vsext.vf8 instruction.

§Forms

Assembly: vsext.vf8 vm, vs2, vd

§

VSHA2CHVV = 936

RISC-V vsha2ch.vv instruction.

§Forms

Assembly: vsha2ch.vv vs2, vs1, vd

§

VSHA2CLVV = 937

RISC-V vsha2cl.vv instruction.

§Forms

Assembly: vsha2cl.vv vs2, vs1, vd

§

VSHA2MSVV = 938

RISC-V vsha2ms.vv instruction.

§Forms

Assembly: vsha2ms.vv vs2, vs1, vd

§

VSLIDE1DOWNVX = 939

RISC-V vslide1down.vx instruction.

§Forms

Assembly: vslide1down.vx vm, vs2, xs1, vd

§

VSLIDE1UPVX = 940

RISC-V vslide1up.vx instruction.

§Forms

Assembly: vslide1up.vx vm, vs2, xs1, vd

§

VSLIDEDOWNVI = 941

RISC-V vslidedown.vi instruction.

§Forms

Assembly: vslidedown.vi vm, vs2, vd, imm

§

VSLIDEDOWNVX = 942

RISC-V vslidedown.vx instruction.

§Forms

Assembly: vslidedown.vx vm, vs2, xs1, vd

§

VSLIDEUPVI = 943

RISC-V vslideup.vi instruction.

§Forms

Assembly: vslideup.vi vm, vs2, vd, imm

§

VSLIDEUPVX = 944

RISC-V vslideup.vx instruction.

§Forms

Assembly: vslideup.vx vm, vs2, xs1, vd

§

VSLLVI = 945

RISC-V vsll.vi instruction.

§Forms

Assembly: vsll.vi vm, vs2, vd, imm

§

VSLLVV = 946

RISC-V vsll.vv instruction.

§Forms

Assembly: vsll.vv vm, vs2, vs1, vd

§

VSLLVX = 947

RISC-V vsll.vx instruction.

§Forms

Assembly: vsll.vx vm, vs2, xs1, vd

§

VSM3CVI = 948

RISC-V vsm3c.vi instruction.

§Forms

Assembly: vsm3c.vi vs2, vd, imm

§

VSM3MEVV = 949

RISC-V vsm3me.vv instruction.

§Forms

Assembly: vsm3me.vv vs2, vs1, vd

§

VSM4KVI = 950

RISC-V vsm4k.vi instruction.

§Forms

Assembly: vsm4k.vi vs2, vd, imm

§

VSM4RVS = 951

RISC-V vsm4r.vs instruction.

§Forms

Assembly: vsm4r.vs vs2, vd

§

VSM4RVV = 952

RISC-V vsm4r.vv instruction.

§Forms

Assembly: vsm4r.vv vs2, vd

§

VSMV = 953

RISC-V vsm.v instruction.

§Forms

Assembly: vsm.v xs1, vs3

§

VSMULVV = 954

RISC-V vsmul.vv instruction.

§Forms

Assembly: vsmul.vv vm, vs2, vs1, vd

§

VSMULVX = 955

RISC-V vsmul.vx instruction.

§Forms

Assembly: vsmul.vx vm, vs2, xs1, vd

§

VSOXEI16V = 956

RISC-V vsoxei16.v instruction.

§Forms

Assembly: vsoxei16.v vm, vs2, xs1, vs3

§

VSOXEI32V = 957

RISC-V vsoxei32.v instruction.

§Forms

Assembly: vsoxei32.v vm, vs2, xs1, vs3

§

VSOXEI64V = 958

RISC-V vsoxei64.v instruction.

§Forms

Assembly: vsoxei64.v vm, vs2, xs1, vs3

§

VSOXEI8V = 959

RISC-V vsoxei8.v instruction.

§Forms

Assembly: vsoxei8.v vm, vs2, xs1, vs3

§

VSRAVI = 960

RISC-V vsra.vi instruction.

§Forms

Assembly: vsra.vi vm, vs2, vd, imm

§

VSRAVV = 961

RISC-V vsra.vv instruction.

§Forms

Assembly: vsra.vv vm, vs2, vs1, vd

§

VSRAVX = 962

RISC-V vsra.vx instruction.

§Forms

Assembly: vsra.vx vm, vs2, xs1, vd

§

VSRLVI = 963

RISC-V vsrl.vi instruction.

§Forms

Assembly: vsrl.vi vm, vs2, vd, imm

§

VSRLVV = 964

RISC-V vsrl.vv instruction.

§Forms

Assembly: vsrl.vv vm, vs2, vs1, vd

§

VSRLVX = 965

RISC-V vsrl.vx instruction.

§Forms

Assembly: vsrl.vx vm, vs2, xs1, vd

§

VSSE16V = 966

RISC-V vsse16.v instruction.

§Forms

Assembly: vsse16.v vm, xs2, xs1, vs3

§

VSSE32V = 967

RISC-V vsse32.v instruction.

§Forms

Assembly: vsse32.v vm, xs2, xs1, vs3

§

VSSE64V = 968

RISC-V vsse64.v instruction.

§Forms

Assembly: vsse64.v vm, xs2, xs1, vs3

§

VSSE8V = 969

RISC-V vsse8.v instruction.

§Forms

Assembly: vsse8.v vm, xs2, xs1, vs3

§

VSSRAVI = 970

RISC-V vssra.vi instruction.

§Forms

Assembly: vssra.vi vm, vs2, vd, imm

§

VSSRAVV = 971

RISC-V vssra.vv instruction.

§Forms

Assembly: vssra.vv vm, vs2, vs1, vd

§

VSSRAVX = 972

RISC-V vssra.vx instruction.

§Forms

Assembly: vssra.vx vm, vs2, xs1, vd

§

VSSRLVI = 973

RISC-V vssrl.vi instruction.

§Forms

Assembly: vssrl.vi vm, vs2, vd, imm

§

VSSRLVV = 974

RISC-V vssrl.vv instruction.

§Forms

Assembly: vssrl.vv vm, vs2, vs1, vd

§

VSSRLVX = 975

RISC-V vssrl.vx instruction.

§Forms

Assembly: vssrl.vx vm, vs2, xs1, vd

§

VSSUBVV = 976

RISC-V vssub.vv instruction.

§Forms

Assembly: vssub.vv vm, vs2, vs1, vd

§

VSSUBVX = 977

RISC-V vssub.vx instruction.

§Forms

Assembly: vssub.vx vm, vs2, xs1, vd

§

VSSUBUVV = 978

RISC-V vssubu.vv instruction.

§Forms

Assembly: vssubu.vv vm, vs2, vs1, vd

§

VSSUBUVX = 979

RISC-V vssubu.vx instruction.

§Forms

Assembly: vssubu.vx vm, vs2, xs1, vd

§

VSUBVV = 980

RISC-V vsub.vv instruction.

§Forms

Assembly: vsub.vv vm, vs2, vs1, vd

§

VSUBVX = 981

RISC-V vsub.vx instruction.

§Forms

Assembly: vsub.vx vm, vs2, xs1, vd

§

VSUXEI16V = 982

RISC-V vsuxei16.v instruction.

§Forms

Assembly: vsuxei16.v vm, vs2, xs1, vs3

§

VSUXEI32V = 983

RISC-V vsuxei32.v instruction.

§Forms

Assembly: vsuxei32.v vm, vs2, xs1, vs3

§

VSUXEI64V = 984

RISC-V vsuxei64.v instruction.

§Forms

Assembly: vsuxei64.v vm, vs2, xs1, vs3

§

VSUXEI8V = 985

RISC-V vsuxei8.v instruction.

§Forms

Assembly: vsuxei8.v vm, vs2, xs1, vs3

§

VWADDVV = 986

RISC-V vwadd.vv instruction.

§Forms

Assembly: vwadd.vv vm, vs2, vs1, vd

§

VWADDVX = 987

RISC-V vwadd.vx instruction.

§Forms

Assembly: vwadd.vx vm, vs2, xs1, vd

§

VWADDWV = 988

RISC-V vwadd.wv instruction.

§Forms

Assembly: vwadd.wv vm, vs2, vs1, vd

§

VWADDWX = 989

RISC-V vwadd.wx instruction.

§Forms

Assembly: vwadd.wx vm, vs2, xs1, vd

§

VWADDUVV = 990

RISC-V vwaddu.vv instruction.

§Forms

Assembly: vwaddu.vv vm, vs2, vs1, vd

§

VWADDUVX = 991

RISC-V vwaddu.vx instruction.

§Forms

Assembly: vwaddu.vx vm, vs2, xs1, vd

§

VWADDUWV = 992

RISC-V vwaddu.wv instruction.

§Forms

Assembly: vwaddu.wv vm, vs2, vs1, vd

§

VWADDUWX = 993

RISC-V vwaddu.wx instruction.

§Forms

Assembly: vwaddu.wx vm, vs2, xs1, vd

§

VWMACCVV = 994

RISC-V vwmacc.vv instruction.

§Forms

Assembly: vwmacc.vv vm, vs2, vs1, vd

§

VWMACCVX = 995

RISC-V vwmacc.vx instruction.

§Forms

Assembly: vwmacc.vx vm, vs2, xs1, vd

§

VWMACCSUVV = 996

RISC-V vwmaccsu.vv instruction.

§Forms

Assembly: vwmaccsu.vv vm, vs2, vs1, vd

§

VWMACCSUVX = 997

RISC-V vwmaccsu.vx instruction.

§Forms

Assembly: vwmaccsu.vx vm, vs2, xs1, vd

§

VWMACCUVV = 998

RISC-V vwmaccu.vv instruction.

§Forms

Assembly: vwmaccu.vv vm, vs2, vs1, vd

§

VWMACCUVX = 999

RISC-V vwmaccu.vx instruction.

§Forms

Assembly: vwmaccu.vx vm, vs2, xs1, vd

§

VWMACCUSVX = 1000

RISC-V vwmaccus.vx instruction.

§Forms

Assembly: vwmaccus.vx vm, vs2, xs1, vd

§

VWMULVV = 1001

RISC-V vwmul.vv instruction.

§Forms

Assembly: vwmul.vv vm, vs2, vs1, vd

§

VWMULVX = 1002

RISC-V vwmul.vx instruction.

§Forms

Assembly: vwmul.vx vm, vs2, xs1, vd

§

VWMULSUVV = 1003

RISC-V vwmulsu.vv instruction.

§Forms

Assembly: vwmulsu.vv vm, vs2, vs1, vd

§

VWMULSUVX = 1004

RISC-V vwmulsu.vx instruction.

§Forms

Assembly: vwmulsu.vx vm, vs2, xs1, vd

§

VWMULUVV = 1005

RISC-V vwmulu.vv instruction.

§Forms

Assembly: vwmulu.vv vm, vs2, vs1, vd

§

VWMULUVX = 1006

RISC-V vwmulu.vx instruction.

§Forms

Assembly: vwmulu.vx vm, vs2, xs1, vd

§

VWREDSUMVS = 1007

RISC-V vwredsum.vs instruction.

§Forms

Assembly: vwredsum.vs vm, vs2, vs1, vd

§

VWREDSUMUVS = 1008

RISC-V vwredsumu.vs instruction.

§Forms

Assembly: vwredsumu.vs vm, vs2, vs1, vd

§

VWSLLVI = 1009

RISC-V vwsll.vi instruction.

§Forms

Assembly: vwsll.vi vm, vs2, vd, imm

§

VWSLLVV = 1010

RISC-V vwsll.vv instruction.

§Forms

Assembly: vwsll.vv vm, vs2, vs1, vd

§

VWSLLVX = 1011

RISC-V vwsll.vx instruction.

§Forms

Assembly: vwsll.vx vm, vs2, xs1, vd

§

VWSUBVV = 1012

RISC-V vwsub.vv instruction.

§Forms

Assembly: vwsub.vv vm, vs2, vs1, vd

§

VWSUBVX = 1013

RISC-V vwsub.vx instruction.

§Forms

Assembly: vwsub.vx vm, vs2, xs1, vd

§

VWSUBWV = 1014

RISC-V vwsub.wv instruction.

§Forms

Assembly: vwsub.wv vm, vs2, vs1, vd

§

VWSUBWX = 1015

RISC-V vwsub.wx instruction.

§Forms

Assembly: vwsub.wx vm, vs2, xs1, vd

§

VWSUBUVV = 1016

RISC-V vwsubu.vv instruction.

§Forms

Assembly: vwsubu.vv vm, vs2, vs1, vd

§

VWSUBUVX = 1017

RISC-V vwsubu.vx instruction.

§Forms

Assembly: vwsubu.vx vm, vs2, xs1, vd

§

VWSUBUWV = 1018

RISC-V vwsubu.wv instruction.

§Forms

Assembly: vwsubu.wv vm, vs2, vs1, vd

§

VWSUBUWX = 1019

RISC-V vwsubu.wx instruction.

§Forms

Assembly: vwsubu.wx vm, vs2, xs1, vd

§

VXORVI = 1020

RISC-V vxor.vi instruction.

§Forms

Assembly: vxor.vi vm, vs2, vd, imm

§

VXORVV = 1021

RISC-V vxor.vv instruction.

§Forms

Assembly: vxor.vv vm, vs2, vs1, vd

§

VXORVX = 1022

RISC-V vxor.vx instruction.

§Forms

Assembly: vxor.vx vm, vs2, xs1, vd

§

VZEXTVF2 = 1023

RISC-V vzext.vf2 instruction.

§Forms

Assembly: vzext.vf2 vm, vs2, vd

§

VZEXTVF4 = 1024

RISC-V vzext.vf4 instruction.

§Forms

Assembly: vzext.vf4 vm, vs2, vd

§

VZEXTVF8 = 1025

RISC-V vzext.vf8 instruction.

§Forms

Assembly: vzext.vf8 vm, vs2, vd

§

WFI = 1026

Wait for interrupt

Can causes the processor to enter a low-power state until the next interrupt occurs.

<%- if ext?(:H) -%> The behavior of wfi is affected by the mstatus.TW and hstatus.VTW bits, as summarized below.

[%autowidth,%footer] |=== .2+| [.rotate]#mstatus.TW# .2+| [.rotate]#hstatus.VTW# 4+^.>| wfi behavior h| HS-mode h| U-mode h| VS-mode h| in VU-mode

| 0 | 0 | Wait | Trap (I) | Wait | Trap (V) | 0 | 1 | Wait | Trap (I) | Trap (V) | Trap (V) | 1 | - | Trap (I) | Trap (I) | Trap (I) | Trap (I)

6+| Trap (I) - Trap with Illegal Instruction code + Trap (V) - Trap with Virtual Instruction code |===

<%- else -%> The wfi instruction is also affected by mstatus.TW, as shown below:

[%autowidth,%footer] |=== .2+| [.rotate]#mstatus.TW# 2+^.>| wfi behavior h| S-mode h| U-mode

| 0 | Wait | Trap (I) | 1 | Trap (I) | Trap (I)

3+| Trap (I) - Trap with Illegal Instruction code |===

<%- end -%>

When wfi is marked as causing a trap above, the implementation is allowed to wait for an unspecified period of time to see if an interrupt occurs before raising the trap. That period of time can be zero (i.e., wfi always causes a trap in the cases identified above).

§Forms

Assembly: wfi ""

§

WRSNTO = 1027

RISC-V wrs.nto instruction.

§Forms

Assembly: wrs.nto wrs_nto

§

WRSSTO = 1028

RISC-V wrs.sto instruction.

§Forms

Assembly: wrs.sto wrs_sto

§

XNOR = 1029

Exclusive NOR

This instruction performs the bit-wise exclusive-NOR operation on rs1 and rs2.

§Forms

Assembly: xnor xd, xs1, xs2

§

XOR = 1030

Exclusive Or

Exclusive or rs1 with rs2, and store the result in rd

§Forms

Assembly: xor xd, xs1, xs2

§

XORI = 1031

Exclusive Or immediate

Exclusive or an immediate to the value in rs1, and store the result in rd

§Forms

Assembly: xori xd, xs1, imm

§

XPERM4 = 1032

Crossbar permutation (nibbles)

The xperm4 instruction operates on nibbles. The rs1 register contains a vector of XLEN/4 4-bit elements. The rs2 register contains a vector of XLEN/4 4-bit indexes. The result is each element in rs2 replaced by the indexed element in rs1, or zero if the index into rs2 is out of bounds.

§Forms

Assembly: xperm4 xd, xs1, xs2

§

XPERM8 = 1033

Crossbar permutation (bytes)

The xperm8 instruction operates on bytes. The rs1 register contains a vector of XLEN/8 8-bit elements. The rs2 register contains a vector of XLEN/8 8-bit indexes. The result is each element in rs2 replaced by the indexed element in rs1, or zero if the index into rs2 is out of bounds.

§Forms

Assembly: xperm8 xd, xs1, xs2

§

ZEXTB = 1034

RISC-V zext.b instruction.

§Forms

Assembly: zext.b rd rs1

§

ZEXTH = 1035

Zero-extend halfword

This instruction zero-extends the least-significant halfword of the source to XLEN by inserting 0’s into all of the bits more significant than 15.

[NOTE] The zext.h instruction is a pseudo-op for pack when Zbkb is implemented and XLEN == 32.

[NOTE] The zext.h instruction is a pseudo-op for packw when Zbkb is implemented and XLEN == 64.

§Forms

Assembly: zext.h xd, xs1

§

ZEXTHRV32 = 1036

Zero-extend halfword

This instruction zero-extends the least-significant halfword of the source to XLEN by inserting 0’s into all of the bits more significant than 15.

[NOTE] The zext.h instruction is a pseudo-op for pack when Zbkb is implemented and XLEN == 32.

[NOTE] The zext.h instruction is a pseudo-op for packw when Zbkb is implemented and XLEN == 64.

§Forms

Assembly: zext.h.rv32 xd, xs1

§

ZEXTW = 1037

RISC-V zext.w instruction.

§Forms

Assembly: zext.w rd rs1

§

ZIP = 1038

Bit interleave

This instruction scatters all of the odd and even bits of a source word into the high and low halves of a destination word. It is the inverse of the unzip instruction. This instruction is available only on RV32.

§Forms

Assembly: zip xd, xs1

§

Invalid = 1039

Implementations§

Source§

impl Opcode

Source

pub fn inst_info(self) -> &'static InstInfo

Returns the effects database entry for this opcode.

Source

pub fn implicit_reg_effects(self) -> &'static ImplicitRegEffects

Returns the implicit fixed-register effects of this opcode.

Source§

impl Opcode

Source

pub fn encoding(self) -> Encoding

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Opcode

Source§

impl Debug for Opcode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Opcode

Source§

impl Hash for Opcode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Opcode

Source§

fn eq(&self, other: &Opcode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.