-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
armv9.4 config #77
Comments
I created my #!/usr/bin/env bash
set -euxo pipefail
OCAML_COMPILER_VERSION="4.14.1"
ISLA_VERSION="4134411c0f463807edd788f67b3db34c1899d9b6"
SAIL_VERSION="eb8af69724828181bf0e91f1728399fe8a81e6f0"
SAIL_ARM_VERSION="f7dedcf3564df71ef065e56b28ff8c9689272596"
SAIL_X86_VERSION="bfc016d354d902bf78f1e2e4a28cc82dd6d5cbfe"
# Options.
function usage() {
echo "Usage: ${0} [-a] [-x]"
exit 2
}
archs=()
while getopts "ax" opt; do
case "${opt}" in
a) archs+=("arm94") ;;
x) archs+=("x86") ;;
*) usage ;;
esac
done
if [[ ${#archs[@]} -eq 0 ]]; then
echo "no architectures configured"
exit 2
fi
# Working directory.
workdir=$(mktemp -d)
cd "${workdir}"
outputs="${workdir}/outputs"
mkdir -p "${outputs}"
# Download dependencies.
function github_download() {
local org="$1"
local repo="$2"
local version="$3"
archive="https://github.com/${org}/${repo}/archive/${version}.tar.gz"
mkdir -p "${repo}"
wget -O- "${archive}" | tar xzf - --strip-components 1 -C "${repo}"
}
github_download "rems-project" "isla" "${ISLA_VERSION}"
github_download "rems-project" "sail" "${SAIL_VERSION}"
github_download "rems-project" "sail-arm" "${SAIL_ARM_VERSION}"
github_download "rems-project" "sail-x86-from-acl2" "${SAIL_X86_VERSION}"
# Setup opam.
export OPAMROOT="${workdir}/opam"
mkdir -p "${OPAMROOT}"
opam init --yes --compiler="${OCAML_COMPILER_VERSION}"
eval $(opam env)
opam repo add rems 'https://github.com/rems-project/opam-repository.git'
# Pin and install sail.
opam pin --yes add sail
# Build isla-sail.
ISLA_SAIL_PATH=$(realpath isla/isla-sail)
make -C "${ISLA_SAIL_PATH}" all
export PATH="${ISLA_SAIL_PATH}:${PATH}"
# Build architecture IRs.
function build_arm94() {
make -C sail-arm/arm-v9.4-a ir/armv9.ir
cp sail-arm/arm-v9.4-a/ir/armv9.ir "${outputs}/"
}
function build_x86() {
make -C sail-x86-from-acl2/model x86.ir
cp sail-x86-from-acl2/model/x86.ir "${outputs}/"
}
for arch in "${archs[@]}"; do
"build_${arch}"
done
# Show outputs.
tree "${outputs}" |
I've added a sample toml file to the sail-arm repository. It's pretty similar to the previous ones, but some of the feature registers have been renamed because Arm have been tidying things up a little. As an example that includes several of the recent features we've been playing with, here's a command I was playing with to produce traces for a load:
Many of the fancy features here like |
We should probably rename the config files here |
Looking at the traces for an add instruction I seem to get a bunch of:
Not sure if there's a good way to simplify that away. Running without |
Thanks for this! Just confirming this does work for me too. I can get a trace for an add instruction with:
I also observe that |
I have built IR from the latest armv9.4 model, but the configs do not appear to work.
For example:
I did try removing all these registers from the configuration, but that just ended up giving me another error, I think related to a type mismatch for HCL_EL2.
Please could you advise me on the correct configuration to use the latest ARM model. Thanks!
The text was updated successfully, but these errors were encountered: