Compilers and other tools for generating zinq implementations from Sail ISA specs
jib_to_llvm
is a compiler for Sail's IR (Jib) into LLVM. It works, though the generated LLVM is not very fast (yet).
llvm_prepper
serves the roll of a quasi-LLVM pass (eventually it will actually be implemented as one) that prepares the LLVM spec for conversion into a Zinq implementation. Currently, it marks the functions and globals corresponding to the instructions and registers in the ISA we want to implement and then performs global dead code elimination to reduce the spec to just the features needed for our Zinq implementation. It can also perform the -O3 passes to generate highly optimized LLVM. We will eventually do this, so that the LLVM generated by Zinq is already highly optimized.
zinq_rearch
is a temporary module for testing the correctness of the outputs of jib_to_llvm
and llvm_prepper
.
TODO: make dependencies part of this repo. Dependencies: LLVM, isla-lib, and isla-snapshots. Add these as submodules to the workspace. Right now they are local files.
Commands, all run in the root of the workspace:
time cargo run --manifest-path ./jib_to_llvm/Cargo.toml && time llvm-release-15/bin/llvm-dis -o data/armv9p4a.ll data/armv9p4a.bc
time cargo run --manifest-path ./llvm_prepper/Cargo.toml && time llvm-release-15/bin/llvm-dis -o ./data/armv9p4a_prepped.ll ./data/armv9p4a_prepped.bc