Skip to content

Compilers and other tools for generating zinq implementations from Sail ISA specs

Notifications You must be signed in to change notification settings

AverardoDiMugello/zinq_dev_tools

Repository files navigation

zinq_dev_tools

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:

Generate the LLVM spec from a Jib spec

time cargo run --manifest-path ./jib_to_llvm/Cargo.toml && time llvm-release-15/bin/llvm-dis -o data/armv9p4a.ll data/armv9p4a.bc

Prep the entire LLVM spec for a specific list of entry points. Performs globaldce to eliminate

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

About

Compilers and other tools for generating zinq implementations from Sail ISA specs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages