Skip to content

detect risc-v zawrs, zicbom, and some crypto exts#185

Merged
nihui merged 1 commit into
nihui:masterfrom
Fros1er:master
May 22, 2026
Merged

detect risc-v zawrs, zicbom, and some crypto exts#185
nihui merged 1 commit into
nihui:masterfrom
Fros1er:master

Conversation

@Fros1er

@Fros1er Fros1er commented May 22, 2026

Copy link
Copy Markdown
Contributor
tested on k3:
froster@froster-spacemitk3picoitx ~/c/ruapu (master) > gcc main.c && ./a.out
i = 1
m = 1
a = 1
f = 1
d = 1
c = 1
p = 0
v = 1
zawrs = 1
zba = 1
zbb = 1
zbc = 1
zbpbo = 0
zbs = 1
zbkb = 0
zbkc = 1
zbkx = 0
zcb = 1
zfa = 1
zfbfmin = 1
zfh = 1
zfhmin = 1
zicbop = 1
zicbom = 1
zicond = 1
zicsr = 1
zifencei = 1
zihintpause = 1
zmmul = 1
zpn = 0
zpsfoperand = 0
zvbb = 1
zvbc = 0
zvfh = 1
zvfhmin = 1
zvfbfmin = 1
zvfbfwma = 1
zvkb = 1
zvkg = 1
zvkned = 1
zvknha = 1
zvknhb = 1
zvksed = 1
zvksh = 1
zvl32b = 1
zvl64b = 1
zvl128b = 1
zvl256b = 1
zvl512b = 0
zvl1024b = 0
xsfvfnrclipxfqf = 0
xsfvfwmaccqqq = 0
xsfvqmaccdod = 0
xsfvqmaccqoq = 0
xtheadba = 0
xtheadbb = 0
xtheadbs = 0
xtheadcondmov = 0
xtheadfmemidx = 0
xtheadfmv = 0
xtheadmac = 0
xtheadmemidx = 0
xtheadmempair = 0
xtheadsync = 0
xtheadvector = 0
xtheadvdot = 0
xsmtvmadoti8 = 1
xsmtvmadoti4 = 0
xsmtvmadotni8 = 0
xsmtvfmadotf32 = 0
xsmtvfwmadotf16 = 0
xsmtvmadothpi8 = 0
xsmtvmadothpi4 = 0
xsmtvpack = 0
xsmtvnspack = 0
i
m
a
f
d
c
v
zawrs
zba
zbb
zbc
zbs
zbkc
zcb
zfa
zfbfmin
zfh
zfhmin
zicbop
zicbom
zicond
zicsr
zifencei
zihintpause
zmmul
zvbb
zvfh
zvfhmin
zvfbfmin
zvfbfwma
zvkb
zvkg
zvkned
zvknha
zvknhb
zvksed
zvksh
zvl32b
zvl64b
zvl128b
zvl256b
xsmtvmadoti8

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the RISC-V ISA feature detection matrix by adding probes for the Zawrs and Zicbom extensions and several RVV crypto-related extensions, so they can be queried via ruapu_supports() and listed via ruapu_rua().

Changes:

  • Add new RISC-V probe instructions for zawrs and zicbom.
  • Add new RVV crypto probes: zvkg, zvkned, zvknha, zvknhb, zvksed, zvksh.
  • Update the CLI demo output (main.c) and documentation (README.md) to include the new extension names.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ruapu.h Adds instruction encodings and ISA map entries for new RISC-V / RVV extensions.
README.md Documents the newly supported RISC-V extensions in the supported-ISA table.
main.c Prints support status for the newly added RISC-V extensions in the sample program.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nihui nihui merged commit 62e6850 into nihui:master May 22, 2026
11 of 13 checks passed
@nihui

nihui commented May 22, 2026

Copy link
Copy Markdown
Owner

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants