Skip to main content

Crate javm_transpiler

Crate javm_transpiler 

Source
Expand description

RISC-V ELF to JAM PVM transpiler.

Converts RISC-V rv64em ELF binaries into PVM program blobs suitable for execution by the JAR PVM (Appendix A).

Also provides utilities to hand-assemble PVM programs directly.

Modules§

assembler
PVM program assembler — hand-craft PVM bytecode programs.
emitter
PVM bitmask packer.
layout
Shared program data-region layout for transpiler-emitted Images.
linker
Linker-based RISC-V ELF to PVM transpilation.
program
JAR program blob format — capability manifest.
riscv
RISC-V instruction decoder and PVM instruction translator.

Enums§

TranspileError

Functions§

ensure_branch_targets_are_block_starts
Post-pass: ensure all PVM branch targets are basic block starts (ϖ).
link_elf
Link a RISC-V rv64em ELF binary into a v3 chain [javm_cap::image::Image]. The Image carries the PVM CODE sub-blob in its code field, populated endpoints (from any .subsoil.endpoints ELF section, or a single PC-0 fallback for subsoil::entry!-based guests), and standard kernel-ABI slot conventions.
peephole_eliminate_dead_load_imm
Peephole pass: eliminate dead load_imm instructions.
peephole_fuse_load_imm_alu
Peephole pass: fuse load_imm(51) + ThreeReg ALU into TwoRegOneImm immediate form.
peephole_fuse_load_imm_memory
Peephole pass: fuse load_imm + indirect memory op into direct memory op.