feat: implementation of transpiler for rv64#2405
Closed
876pol wants to merge 10 commits intodevelop-v1.8.0from
Closed
feat: implementation of transpiler for rv64#2405876pol wants to merge 10 commits intodevelop-v1.8.0from
876pol wants to merge 10 commits intodevelop-v1.8.0from
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6d99906 to
cd7ad07
Compare
580a36e to
cd7ad07
Compare
cd7ad07 to
d9f5028
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves INT-6044.
Replaces the external
rrs-libcrate with a custom decoder (crates/toolchain/transpiler/src/decoder.rs) that natively supports both RV32IM and RV64IM. Key changes fromrrs-lib:ITypeShamtusesfunct6(6-bit) +shamt(6-bit) instead offunct7(7-bit) +shamt(5-bit), so RV64 6-bit shifts work nativelyInstructionProcessortrait extended with RV64 methods (process_ld,process_sd,process_lwu,process_addw,process_subw, etc.) with defaultunimplemented!()so existing RV32 impls don't need to provide themrrs-lib(Apache 2.0 with LLVM exception); attribution header includedOther code changes:
elf.rs: addsclass: Classfield so downstream can distinguish ELF32 vs ELF64util.rs: 8 newfrom_*_rv64helpers — identical to RV32 versions but withRV64_REGISTER_NUM_LIMBS;from_i_type_shamt_rv64simplified to 2 params (no separateshamt6)riscv.rs: addsRV64_REGISTER_NUM_LIMBS = 8crates/sdk: import swap fromrrs_lib::instruction_formatstoopenvm_transpiler::decoderChanges in
crates/toolchain/tests:rv32im-prefix for clarityrv64_transpiler_tests.rs: verifies ELF64 decoding, transpilation with no UNIMP, custom opcode presence, and phantom discriminantsrv64im-stress.S: exercises every RV64IM instruction group the transpiler handlesrv64im-intrin.S: exercises custom OpenVM opcodes (TERMINATE, PHANTOM, HINT_STORED, HINT_BUFFER)