Miri doesn't seem to support any of the numerous RISC-V intrinsics yet.
I have implemented a bunch of them as part of my RISC-V interpreter under 0BSC license and wondering what would it take to maybe upstream them into Miri itself?
Specifically, I have implemented the following RISC-V extensions (RV32 and RV64 flavors of each where applicable), and any intrinsic present there is implemented as the result:
- M
- B
- Zba
- Zbb
- Zbc
- Zbkb
- Zbkc
- Zbkx
- Zbs
- Zca
- Zcb
- Zcmp
- Zkn
- Zknd
- Zkne
- Zknh
- Zicond
- Zicsr
- Zvbb
- Zvbc
- Zve64x
- Zvkb
Implementations have basic unit tests, including under Miri, in CI, as well as validation against RISC-V Architectural Certification Tests as part of comprehensive integration/end-to-end testing.
Intrinsics are hardware-accelerated where possible, for example, RV64 Zknd/Zkne are implemented using platform-specific AES intrinics on aarch64 and x86-64. As more extensions are implemented, more intrinsics may be covered and contributed back to Miri.
I can extract intrinsics into a separate small crate if that is preferred/desirable or the code could be just copied instead (I have no issues with it being relicensed to whatever).
Miri doesn't seem to support any of the numerous RISC-V intrinsics yet.
I have implemented a bunch of them as part of my RISC-V interpreter under 0BSC license and wondering what would it take to maybe upstream them into Miri itself?
Specifically, I have implemented the following RISC-V extensions (RV32 and RV64 flavors of each where applicable), and any intrinsic present there is implemented as the result:
Implementations have basic unit tests, including under Miri, in CI, as well as validation against RISC-V Architectural Certification Tests as part of comprehensive integration/end-to-end testing.
Intrinsics are hardware-accelerated where possible, for example, RV64 Zknd/Zkne are implemented using platform-specific AES intrinics on aarch64 and x86-64. As more extensions are implemented, more intrinsics may be covered and contributed back to Miri.
I can extract intrinsics into a separate small crate if that is preferred/desirable or the code could be just copied instead (I have no issues with it being relicensed to whatever).