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.
This PR adds support for 32-bit ARM verification using LLVM specifications, introducing a new top-level function
llvm_verify_aarch32
with an interface similar tollvm_verify_x86
.I've marked this as a draft since it's very hacky and fragile right now.
A few things that I'd like to fix before merging:
SAWScript.X86
andSAWScript.X86Spec
, and use them in bothSAWScript.Crucible.LLVM.X86
andSAWScript.Crucible.LLVM.AArch32
.asl-translator
.There's also a problem of compile time. Some of the new dependencies take significantly longer to build, which could negatively impact the CI experience.
In the long run, I'd like to make these low-level backends less of a "walled garden". Right now, the
llvm_verify_<arch>
commands have two (tightly-coupled) steps: translate an LLVM spec to an<arch>
spec according to the ABI, and then verify that<arch>
spec. It might be nice to decouple these steps a bit to make future development cleaner.Example usage! I used Zig for a convenient binary because it's really easy to cross compile.
zig build-exe test.zig -target arm-linux --release-fast
will build a 32-bit ARM ELF withTo test:
clang -m32 -c -emit-llvm test.c
will build some reasonable bitcode that usesadd
.