Instruction sets · RISC-V

RISC-V, instruction by instruction

741 instructions across 25 extensions, checked against 2 formal models. Darker means further along.

0 · Not modeled
Not modeled: the model has no decoding plus execution semantics for this instruction.
1 · Modeled
Modeled: the model defines decoding and execution semantics for the instruction. Sail: an instruction AST clause with encdec (decode), execute and assembly clauses. riscv-coq: a decoder constructor that Decode.v produces and that Execute.v dispatches to an execute clause.
2 · Validated
Validated: level 1, and a conformance or ISA test that exercises the instruction is run against the model by the model's public CI (riscv-tests, riscv-arch-test, riscv-vector-tests for sail-riscv). Evidence names the tests and the CI workflow.
3 · Proof-ready
Proof-ready: level 2, the model's definition is available inside a proof assistant, and a public framework verifies machine-code properties using that prover output for this instruction (here: riscv-zkvm's per-instruction equivalence theorems against the Sail-generated Lean model).

Models compared

Share of all 741 instructions at each level.

ModelReadinessModeledValidatedProof-ready
Sail RISC-V

The official RISC-V ISA model, written in Sail. Rocq and Lean definitions are generated from it.

707 706 62
riscv-coq

RISC-V semantics in Coq (Rocq) from MIT PLV, generated from riscv-semantics (Haskell) with hs-to-coq; used by bedrock2.

76 0 0
Model

I (RV32I / RV64I base)

52 instructions 52 modeled · 52 validated · 49 proof-ready

riscv-opcodes files: rv_i, rv32_i, rv64_i. RV64 only: lwu, ld, sd, addiw, slliw, srliw, sraiw, addw, subw, sllw, srlw, sraw.

M (multiply and divide)

13 instructions 13 modeled · 13 validated · 13 proof-ready

riscv-opcodes files: rv_m, rv64_m. RV64 only: mulw, divw, divuw, remw, remuw.

A (atomics: Zalrsc + Zaamo)

22 instructions 22 modeled · 22 validated · 0 proof-ready

riscv-opcodes files: rv_a, rv64_a. RV64 only: lr.d, sc.d, amoswap.d, amoadd.d, amoxor.d, amoand.d, amoor.d, amomin.d, amomax.d, amominu.d, amomaxu.d.

F (single-precision float)

30 instructions 30 modeled · 30 validated · 0 proof-ready

riscv-opcodes files: rv_f, rv64_f. RV64 only: fcvt.l.s, fcvt.lu.s, fcvt.s.l, fcvt.s.lu.

D (double-precision float)

32 instructions 32 modeled · 32 validated · 0 proof-ready

riscv-opcodes files: rv_d, rv64_d. RV64 only: fcvt.l.d, fcvt.lu.d, fmv.x.d, fcvt.d.l, fcvt.d.lu, fmv.d.x.

Q (quad-precision float)

32 instructions 0 modeled · 0 validated · 0 proof-ready

riscv-opcodes files: rv_q, rv64_q. RV64 only: fcvt.l.q, fcvt.lu.q, fcvt.q.l, fcvt.q.lu.

C (compressed)

42 instructions 42 modeled · 41 validated · 0 proof-ready

riscv-opcodes files: rv_c, rv32_c, rv64_c, rv_c_d, rv32_c_f. RV32 only: c.jal, c.flw, c.fsw, c.flwsp, c.fswsp. RV64 only: c.ld, c.sd, c.addiw, c.subw, c.addw, c.ldsp, c.sdsp. Includes the compressed float loads and stores (Zcf on RV32, Zcd).

Zicsr (CSR access)

6 instructions 6 modeled · 6 validated · 0 proof-ready

riscv-opcodes files: rv_zicsr.

Zifencei (instruction fence)

1 instructions 1 modeled · 1 validated · 0 proof-ready

riscv-opcodes files: rv_zifencei.

Zba (address generation)

8 instructions 8 modeled · 8 validated · 0 proof-ready

riscv-opcodes files: rv_zba, rv64_zba. RV64 only: add.uw, sh1add.uw, sh2add.uw, sh3add.uw, slli.uw.

Zbb (basic bit manipulation)

24 instructions 24 modeled · 24 validated · 0 proof-ready

riscv-opcodes files: rv_zbb, rv32_zbb, rv64_zbb. RV64 only: clzw, ctzw, cpopw, rolw, rorw, roriw.

Zbc (carry-less multiply)

3 instructions 3 modeled · 3 validated · 0 proof-ready

riscv-opcodes files: rv_zbc.

Zbs (single-bit)

8 instructions 8 modeled · 8 validated · 0 proof-ready

riscv-opcodes files: rv_zbs, rv32_zbs, rv64_zbs.

Zbkb (bit manipulation for crypto)

16 instructions 16 modeled · 16 validated · 0 proof-ready

riscv-opcodes files: rv_zbkb, rv32_zbkb, rv64_zbkb. RV32 only: zip, unzip. RV64 only: rolw, rorw, roriw, packw.

Zbkc (carry-less multiply for crypto)

2 instructions 2 modeled · 2 validated · 0 proof-ready

riscv-opcodes files: rv_zbkc.

Zbkx (crossbar permutations)

2 instructions 2 modeled · 2 validated · 0 proof-ready

riscv-opcodes files: rv_zbkx.

Zknd (AES decryption)

7 instructions 7 modeled · 7 validated · 0 proof-ready

riscv-opcodes files: rv32_zknd, rv64_zknd. RV32 only: aes32dsmi, aes32dsi. RV64 only: aes64dsm, aes64ds, aes64ks1i, aes64im, aes64ks2.

Zkne (AES encryption)

6 instructions 6 modeled · 6 validated · 0 proof-ready

riscv-opcodes files: rv32_zkne, rv64_zkne. RV32 only: aes32esmi, aes32esi. RV64 only: aes64esm, aes64es, aes64ks1i, aes64ks2.

Zknh (SHA-2 hash)

14 instructions 14 modeled · 14 validated · 0 proof-ready

riscv-opcodes files: rv_zknh, rv32_zknh, rv64_zknh. RV32 only: sha512sum0r, sha512sum1r, sha512sig0l, sha512sig0h, sha512sig1l, sha512sig1h. RV64 only: sha512sum0, sha512sum1, sha512sig0, sha512sig1.

Zksed (SM4 block cipher)

2 instructions 2 modeled · 2 validated · 0 proof-ready

riscv-opcodes files: rv_zksed.

Zksh (SM3 hash)

2 instructions 2 modeled · 2 validated · 0 proof-ready

riscv-opcodes files: rv_zksh.

Zfh (half-precision float, includes Zfhmin)

36 instructions 34 modeled · 34 validated · 0 proof-ready

riscv-opcodes files: rv_zfh, rv64_zfh, rv_zfhmin, rv_d_zfhmin, rv_q_zfhmin. RV64 only: fcvt.l.h, fcvt.lu.h, fcvt.h.l, fcvt.h.lu. Zfh includes Zfhmin (flh, fsh, fmv.x.h, fmv.h.x and conversions to and from S, D, Q).

Zicond (integer conditional zero)

2 instructions 2 modeled · 2 validated · 0 proof-ready

riscv-opcodes files: rv_zicond.

V (vector)

375 instructions 375 modeled · 375 validated · 0 proof-ready

riscv-opcodes files: rv_v. Segment loads and stores (vlseg<n>e8.v, ...) are encodings of vle8.v etc. with nf > 0 and are folded into those rows, as riscv-opcodes does.

Privileged (machine and supervisor)

4 instructions 4 modeled · 4 validated · 0 proof-ready

riscv-opcodes files: rv_system, rv_s. mret and wfi (machine level), sret and sfence.vma (supervisor).

How this was measured

Generated by scripts/isa/riscv.py on 26 Nov 2026 from these inputs. Re-run the script to update.

Notes

  • Instruction universe: the regular instructions of the riscv-opcodes files named in each extension's description. RV32 and RV64 encodings of one mnemonic share a row (slli, c.srli, rori, rev8, ...). Assembler aliases ($pseudo_op: mv, frflags, fmv.s, ...) are left out, except zext.h, which the Zbb specification lists as an instruction. fence.tso and pause are aliases of fence there and are folded into fence. An instruction in several extensions (rol in Zbb and Zbkb, clmul in Zbc and Zbkc, aes64ks1i in Zknd and Zkne) appears under each, so per-extension counts overlap.
  • Skipped, not ratified (riscv-opcodes extensions/unratified): rv32_p, rv64_p, rv64_zbp, rv64_zilx, rv_p, rv_zabhlrsc, rv_zbp, rv_zibi, rv_zilx, rv_zvabd, rv_zvdot4a, rv_zvfbdota32f, rv_zvfofp4min, rv_zvfofp8min, rv_zvfqwbdota8f, rv_zvfqwdota8f, rv_zvfwbdota16bf, rv_zvfwdota16bf, rv_zvqwbdota8i, rv_zvqwdota8i, rv_zvt16e, rv_zvt64e, rv_zvt8e, rv_zvtbase, rv_zvtbf16fmm, rv_zvtdmm, rv_zvtfmm, rv_zvtfp16fmm, rv_zvti8i32mm, rv_zvtofp8fmm, rv_zvzip.
  • Ratified in riscv-opcodes but outside this grid's scope: rv32_d_zfa, rv32_zclsd, rv32_zicntr, rv32_zilsd, rv64_h, rv64_q_zfa, rv64_zacas, rv64_zalasr, rv64_zcb, rv_c_zicfiss, rv_c_zihintntl, rv_d_zfa, rv_f_zfa, rv_h, rv_q_zfa, rv_sdext, rv_smrnmi, rv_ssctr, rv_svinval, rv_svinval_h, rv_zabha, rv_zabha_zacas, rv_zacas, rv_zalasr, rv_zawrs, rv_zcb, rv_zcmop, rv_zcmp, rv_zcmt, rv_zfbfmin, rv_zfh_zfa, rv_zicbo, rv_zicfilp, rv_zicfiss, rv_zicntr, rv_zihintntl, rv_zimop, rv_zvbb, rv_zvbc, rv_zvfbfmin, rv_zvfbfwma, rv_zvkg, rv_zvkn, rv_zvkned, rv_zvknha, rv_zvknhb, rv_zvks, rv_zvksed, rv_zvksh.
  • Level 2 for sail-riscv: CI (https://github.com/riscv/sail-riscv/blob/e81a4367075cb8ca5c1771aeaf3b9495025c4223/.github/workflows/ci.yml) builds the model and runs precompiled tests from riscv-software-src/sail-riscv-tests release 2026-08-20 (test/sail_riscv_tests_version.txt, test/CMakeLists.txt). That release is built from riscv-tests 1eb47d946c55, riscv-arch-test db2b9fd7aa71 and riscv-vector-tests f76bff121dce (its submodules), which are the pins used here. Suites found enabled in CI: riscv-arch-test (.github/workflows/ci.yml), riscv-tests (.github/workflows/ci.yml), riscv-vector-tests (.github/workflows/ci.yml).
  • How tests are matched. riscv-tests: every rv32*/rv64* test that `make isa` builds (p and v environments); an instruction counts when its mnemonic, or a riscv-opcodes alias of it (csrr, fmv.s, ...), appears in the test's own source after comments and inactive #if __riscv_xlen branches are removed (shared macro headers are not read). riscv-arch-test: the per-instruction tests tests/rv{32,64}i/<Ext>/<Ext>-<mnemonic>-NN.S that the sail-rv32-max / sail-rv64-max configs select (REQUIRED_EXTENSIONS and params), minus the exclusions in sail-riscv's test/CMakeLists.txt. riscv-vector-tests: one generated test per configs/**/<mnemonic>.toml; CI runs VLEN/ELEN 64/64 and 128/32 on every change and all supported pairs weekly. riscv-arch-test vector tests are not built into the release (its `make elfs` does not run vector-testgen).
  • sail-riscv instructions at level 1 with no CI test found (1): c.ebreak.
  • In riscv-opcodes but not modeled by sail-riscv: q: all 32 instructions; zfh: fcvt.q.h, fcvt.h.q. riscv-arch-test's Sail configs say so for Q: "sail does not yet support this".
  • Sail assembly clauses whose mnemonic could not be evaluated (checked by hand; not instructions of this grid): ZCMOP, ZIMOP_MOP_R, ZIMOP_MOP_RR.
  • riscv-coq is at most level 1: no CI runs conformance tests against it (no GitHub workflows, only a .travis.yml that builds the Coq files), and no documented procedure runs riscv-tests or riscv-arch-test against it. Its README points to bedrock2's CI (https://github.com/mit-plv/bedrock2), which checks proofs. bedrock2 verifies compilation to RISC-V machine code against riscv-coq's semantics, which would meet level 3's framework condition, but level 3 needs level 2 first.
  • riscv-coq decodes but does not execute: lr.w, sc.w, amoswap.w, amoadd.w, amoxor.w, amoand.w, amoor.w, amomin.w, amomax.w, amominu.w, amomaxu.w, lr.d, sc.d, amoswap.d, amoadd.d, amoxor.d, amoand.d, amoor.d, amomin.d, amomax.d, amominu.d, amomaxu.d, flw, fsw, fmadd.s, fmsub.s, fnmsub.s, fnmadd.s, fadd.s, fsub.s, fmul.s, fdiv.s, fsqrt.s, fsgnj.s, fsgnjn.s, fsgnjx.s, fmin.s, fmax.s, fcvt.w.s, fcvt.wu.s, fmv.x.w, feq.s, flt.s, fle.s, fclass.s, fcvt.s.w, fcvt.s.wu, fmv.w.x, fcvt.l.s, fcvt.lu.s, fcvt.s.l, fcvt.s.lu. Execute.v dispatches only the I, M, I64, M64 and CSR families; A and A64 have clauses in ExecuteA.v / ExecuteA64.v that Execute.v never calls (it raises an illegal-instruction exception for them, contrary to the README's claim that A is supported), and F has no execute module. These rows are level 0.
  • Level 3 for sail-riscv: the model is available in Rocq and Lean (sail-riscv CI workflows rocq.yml and compile-lean.yml build the generated definitions). riscv-zkvm (https://github.com/Verified-zkEVM/riscv-zkvm) extracts the official model (https://github.com/riscv/sail-riscv.git tag 0.13.1, 27224ccb2290) to Lean and proves one *_sail_equiv theorem per instruction relating its RV64IM program logic (separation logic, weakest preconditions, symbolic execution, used for machine code in evm-asm) to the Sail definitions; level 3 is given to the 62 instructions with such a theorem (its 64 theorems include mv and nop, aliases of addi). The proofs are for RV64 and for that release, not for the pinned sail-riscv commit; ecall, ebreak and fence are mapped there but have no equivalence theorem.
  • Other frameworks considered and not used to compute level 3: Islaris (PLDI 2022, https://github.com/rems-project/islaris) verifies RISC-V machine code in Coq using Isla traces of sail-riscv pinned to a January 2024 commit; its RISC-V case studies (memcpy, binary search) use only base RV64I instructions that riscv-zkvm already covers. xv6iris (https://github.com/CharlyCst/xv6iris) verifies xv6 RISC-V binaries against Sail-generated Lean, but of a fork of the model (zeldovich/sail-riscv, branch xv6), not the official one.

Full data as JSON

esc