Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
cff9a88
some changes in argument loading in intrinsic-test
sayantn Apr 29, 2026
af754dc
gen-arm: resolve outdated `big_endian_inverse` todo
davidtwco Apr 20, 2026
51f8123
gen-arm: use `neon-stable` anchor throughout
davidtwco Apr 20, 2026
3d5f588
gen-arm: skip `assert_instr` on big-endian
davidtwco May 1, 2026
ea71582
Merge pull request #2101 from sayantn/revert-passes
folkertdev May 6, 2026
75fb1cb
Merge pull request #2099 from sayantn/gen-arm-improvements
folkertdev May 6, 2026
1d556c4
gen-arm: port `vcopy_lane_{s,u,p,f}64` to generator
davidtwco Apr 20, 2026
cf3ac49
gen-arm: port `vcopy_laneq_{f,u,s,p}64` to generator
davidtwco Apr 20, 2026
54b56a3
gen-arm: port `vget_{high,low}_{p,f}64` to generator
davidtwco Apr 20, 2026
fe3e89d
gen-arm: port `vgetq_lane_f64` to generator
davidtwco Apr 20, 2026
4661e73
gen-arm: port `vcombine_f64` to generator
davidtwco Apr 20, 2026
1c2d423
core_arch: remove redundant tests
davidtwco May 1, 2026
11fd314
loongarch: Use `intrinsics::simd` for vbit{clr,rev,set}
heiher Apr 21, 2026
1e13d52
gen-arm: change defn of `vabdl_high_u{8,16,32}`
davidtwco Apr 20, 2026
a5073bc
gen-arm: write `vtbl{1,2,3,4}` in terms of `vqtbl`
davidtwco Apr 29, 2026
6218201
gen-arm: write `vtbx{1,2,3,4}` in terms of `vqtbx`
davidtwco Apr 30, 2026
55c9deb
Merge pull request #2105 from sayantn/gen-arm-improvements
folkertdev May 7, 2026
37473be
Merge pull request #2093 from heiher/vbit-clr-rev-set
folkertdev May 7, 2026
1964b04
Merge pull request #2100 from sayantn/gen-arm-ports
Amanieu May 8, 2026
c80d077
loongarch: Use `intrinsics::simd` for vs{add,sub}
heiher Apr 24, 2026
a023ebf
gen-arm: fix `vmlal`, `vmlsl` and `vmull`
sayantn Apr 30, 2026
aa37c1b
gen-arm: fix `vfmlal` and `vfmlsl`
sayantn Apr 30, 2026
0d76cbe
Merge pull request #2107 from sayantn/gen-arm-improvements
folkertdev May 8, 2026
a2e7797
replace uses of `simd_extract` with `vget_lane`
sayantn May 8, 2026
7050d69
gen-arm: use LLVM intrinsics for `f16` to `{i,u}16`
davidtwco Apr 20, 2026
7fb11ae
Use latest clang versions from kernel.org
sayantn Apr 30, 2026
229d480
Change implementation of `vext`
sayantn May 8, 2026
f603c7f
Change implementation of `vcopy{q}_lane{q}`
sayantn May 8, 2026
8d56c77
Change implementation of `vab{a,d}l_high`
sayantn May 8, 2026
4871c49
Change implementation of `vcvt{x}_f32_f64`
sayantn May 8, 2026
da1b202
Change implementation of `vml{a,s}{l}_lane`
sayantn May 8, 2026
ccb273a
Change implementation of `vmov{n,l}_high`
sayantn May 8, 2026
c02a41c
Change implementation of `vmull_{high,lane}`
sayantn May 8, 2026
401582d
Change implementation of `vmulx_lane`
sayantn May 8, 2026
63d8cef
Change implementation of `v{add,sub}{l,w}_high`
sayantn May 8, 2026
1404a1e
Change implementation of `vqdmull{_high}{_lane}` and `vqrdmulh_lane`
sayantn May 8, 2026
077f63f
Change implementation of `vqmov{u}n_high`
sayantn May 8, 2026
933aa5c
Change implementation of `vqrdml{a,s}h_lane`
sayantn May 8, 2026
d4bb7f4
Change implementation of `v{q}{r}shr{u}n_high_n`
sayantn May 9, 2026
3dd1690
Change implementation of `vr{add,sub}hn_high`
sayantn May 9, 2026
cee8ece
Change implementation of `vmul_lane`
sayantn May 9, 2026
0d1fd7f
Change implementation of `vld1_dup`
sayantn May 9, 2026
95e2c0f
Change implementation of `v{us,su,}dot_lane`
sayantn May 9, 2026
6338558
Split `vcopyq_lane{q}_p64` due to `vsetq_lane_p64` requiring `aes`
sayantn May 9, 2026
5187765
Merge pull request #2097 from heiher/vsadd-sub
sayantn May 9, 2026
494200b
loongarch: Use `intrinsics::simd` for vadda
heiher May 6, 2026
256c083
Merge pull request #2108 from sayantn/cleanup-gen-arm
folkertdev May 9, 2026
7012f65
gen-arm: split `vreinterpret` defn into multiple
davidtwco Apr 20, 2026
1d3d922
Remove the heuristic for big-endian reversal, reversing only if reque…
sayantn May 9, 2026
611b200
Revert "Change implementation of `vld1_dup`"
sayantn May 10, 2026
bee0bf6
Merge pull request #2103 from heiher/vadda
sayantn May 10, 2026
9de432f
Merge pull request #2112 from sayantn/revert-passes
folkertdev May 10, 2026
5b038a3
Merge pull request #2111 from sayantn/remove-heuristic
folkertdev May 10, 2026
46b8878
Add davidtwco and adamgemmell as maintainers
Amanieu May 10, 2026
f42d908
Merge pull request #2113 from Amanieu/stdarch-maintainers2
Amanieu May 11, 2026
1330bfb
Merge pull request #2106 from sayantn/cvtf16s16
folkertdev May 11, 2026
98b0121
loongarch: Use `intrinsics::simd` for vabsd
heiher May 6, 2026
0e97ab3
Correct small typo in gen-arm
sayantn May 11, 2026
ffe6e2a
Implement `vcmla_lane` with ARM intrinsics
sayantn May 11, 2026
fc7d746
Merge pull request #2115 from sayantn/cleanup-gen-arm
folkertdev May 11, 2026
c477e71
Remove code for compiling and comparing C and Rust files, made the C …
sayantn Mar 9, 2026
a6c9e82
zeroall/zeroupper *are* supported by Miri
RalfJung May 12, 2026
3c7dee4
Update/add comments for miri-ignored tests
RalfJung May 12, 2026
e91ca04
explain ignore aarch64 tests
RalfJung May 12, 2026
fc8d4c4
Merge pull request #2116 from RalfJung/miri-tests
adamgemmell May 12, 2026
1458d88
Merge pull request #2114 from heiher/vabsd
folkertdev May 12, 2026
35d77fb
loongarch: Use `intrinsics::simd` for vpick{ev,od}
heiher May 7, 2026
ee0c016
Generate rust bindings and test code
sayantn Apr 30, 2026
0962db6
Use pointers for the C definitions to resolve ABI inconsistencies
sayantn Apr 24, 2026
a5179d0
Make floats static, as rounding is not a real concern here anymore
sayantn May 7, 2026
10f4190
Modify the CI scripts to work with the new design
sayantn Mar 16, 2026
f09bf0b
gen-arm: toggle `big_endian_inverse` where required
sayantn May 9, 2026
0415e2f
Disable some `assert_instr` tests in big-endian
sayantn May 10, 2026
b13eb77
Fix `_mm_sm3rnds2_epi32`
sayantn Apr 29, 2026
deaa509
Disable some tests in x86 due to CI failures
sayantn May 10, 2026
b24fe3e
Merge pull request #2118 from heiher/vpick-ev-od
sayantn May 15, 2026
d913db7
Merge pull request #2063 from sayantn/intrinsic-test
Amanieu May 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion library/stdarch/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ jobs:
- aarch64-unknown-linux-gnu
- aarch64_be-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- arm-unknown-linux-gnueabihf
- x86_64-unknown-linux-gnu
profile: [dev, release]
include:
Expand Down
12 changes: 8 additions & 4 deletions library/stdarch/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM ubuntu:25.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
ca-certificates \
libc6-dev \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu \
libc6-dev-arm64-cross \
qemu-user \
make \
file \
clang \
lld
xz-utils \
wget

RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.4-x86_64.tar.gz -O llvm.tar.xz
RUN mkdir llvm
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm

ENV PATH="/llvm/bin:$PATH"

ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -cpu max -L /usr/aarch64-linux-gnu" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ FROM ubuntu:25.10

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
ca-certificates \
libc6-dev \
libc6-dev-arm64-cross \
qemu-user \
make \
file \
clang \
curl \
xz-utils \
lld
wget

ENV TOOLCHAIN="arm-gnu-toolchain-14.3.rel1-x86_64-aarch64_be-none-linux-gnu"

Expand All @@ -21,6 +19,12 @@ RUN curl -L "https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/bin
RUN tar -xvf "${TOOLCHAIN}.tar.xz"
RUN mkdir /toolchains && mv "./${TOOLCHAIN}" /toolchains

RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.4-x86_64.tar.gz -O llvm.tar.xz
RUN mkdir llvm
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm

ENV PATH="/llvm/bin:$PATH"

ENV AARCH64_BE_TOOLCHAIN="/toolchains/${TOOLCHAIN}"
ENV AARCH64_BE_LIBC="${AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libc6-dev-armhf-cross \
qemu-user \
make \
file
file \
clang \
lld
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -cpu max -L /usr/arm-linux-gnueabihf" \
OBJDUMP=arm-linux-gnueabihf-objdump
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
ca-certificates \
libc6-dev \
gcc-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
qemu-user \
make \
file \
clang \
lld
wget

RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.4-x86_64.tar.gz -O llvm.tar.xz
RUN mkdir llvm
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm

ENV PATH="/llvm/bin:$PATH"

ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -cpu max -L /usr/arm-linux-gnueabihf" \
OBJDUMP=arm-linux-gnueabihf-objdump
13 changes: 8 additions & 5 deletions library/stdarch/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
make \
ca-certificates \
wget \
xz-utils \
clang \
libstdc++-14-dev \
build-essential \
lld
xz-utils

RUN wget http://ci-mirrors.rust-lang.org/sde-external-10.8.0-2026-03-15-lin.tar.xz -O sde.tar.xz
RUN mkdir intel-sde
RUN tar -xJf sde.tar.xz --strip-components=1 -C intel-sde

RUN wget https://mirrors.edge.kernel.org/pub/tools/llvm/files/llvm-22.1.4-x86_64.tar.gz -O llvm.tar.xz
RUN mkdir llvm
RUN tar -xvf llvm.tar.xz --strip-components=1 -C llvm

ENV PATH="/llvm/bin:$PATH"

ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER="/intel-sde/sde64 \
-cpuid-in /checkout/ci/docker/x86_64-unknown-linux-gnu/cpuid.def \
-rtm-mode full -tsx --"
Expand Down
2 changes: 1 addition & 1 deletion library/stdarch/ci/intrinsic-test-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ run() {
--workdir /checkout \
--privileged \
stdarch \
sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/intrinsic-test.sh ${1}"
sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec ci/intrinsic-test.sh"
}

if [ -z "$1" ]; then
Expand Down
115 changes: 22 additions & 93 deletions library/stdarch/ci/intrinsic-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,127 +5,56 @@ set -ex
: "${TARGET?The TARGET environment variable must be set.}"

export RUSTFLAGS="${RUSTFLAGS} -D warnings -Z merge-functions=disabled -Z verify-llvm-ir"
export HOST_RUSTFLAGS="${RUSTFLAGS}"
export PROFILE="${PROFILE:="release"}"

case ${TARGET} in
# On 32-bit use a static relocation model which avoids some extra
# instructions when dealing with static data, notably allowing some
# instruction assertion checks to pass below the 20 instruction limit. If
# this is the default, dynamic, then too many instructions are generated
# when we assert the instruction for a function and it causes tests to fail.
i686-* | i586-*)
export RUSTFLAGS="${RUSTFLAGS} -C relocation-model=static"
;;
# Some x86_64 targets enable by default more features beyond SSE2,
# which cause some instruction assertion checks to fail.
x86_64-*)
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=-sse3"
;;
#Unoptimized build uses fast-isel which breaks with msa
mips-* | mipsel-*)
export RUSTFLAGS="${RUSTFLAGS} -C llvm-args=-fast-isel=false"
;;
armv7-*eabihf | thumbv7-*eabihf)
export RUSTFLAGS="${RUSTFLAGS} -Ctarget-feature=+neon"
;;
# Some of our test dependencies use the deprecated `gcc` crates which
# doesn't detect RISC-V compilers automatically, so do it manually here.
riscv*)
export RUSTFLAGS="${RUSTFLAGS} -Ctarget-feature=+zk,+zks,+zbb,+zbc"
;;
esac

echo "RUSTFLAGS=${RUSTFLAGS}"
echo "OBJDUMP=${OBJDUMP}"
echo "PROFILE=${PROFILE}"

INTRINSIC_TEST="--manifest-path=crates/intrinsic-test/Cargo.toml"

# Test targets compiled with extra features.
export CC="clang"

case ${TARGET} in
# Setup aarch64 & armv7 specific variables, the runner, along with some
# tests to skip
aarch64-unknown-linux-gnu*)
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/aarch64-linux-gnu/include/ -I/usr/aarch64-linux-gnu/include/c++/9/aarch64-linux-gnu/"
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_aarch64.txt
TEST_CXX_COMPILER="clang++"
TEST_RUNNER="${CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER}"
: "${TEST_SAMPLE_INTRINSICS_PERCENTAGE:=100}"
aarch64_be*)
export CFLAGS="-I${AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc/usr/include --sysroot={AARCH64_BE_TOOLCHAIN}/aarch64_be-none-linux-gnu/libc -Wno-nonportable-vector-initialization"
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_aarch64_be.txt
;;

aarch64_be-unknown-linux-gnu*)
TEST_CPPFLAGS="-fuse-ld=lld"
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_aarch64_be.txt
TEST_CXX_COMPILER="clang++"
TEST_RUNNER="${CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_RUNNER}"
: "${TEST_SAMPLE_INTRINSICS_PERCENTAGE:=100}"
aarch64*)
export CFLAGS="-I/usr/aarch64-linux-gnu/include/"
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_aarch64.txt
;;

armv7-unknown-linux-gnueabihf*)
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/arm-linux-gnueabihf/include/ -I/usr/arm-linux-gnueabihf/include/c++/9/arm-linux-gnueabihf/"
armv7*)
export CFLAGS="-I/usr/arm-linux-gnueabihf/include/"
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_arm.txt
TEST_CXX_COMPILER="clang++"
TEST_RUNNER="${CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER}"
: "${TEST_SAMPLE_INTRINSICS_PERCENTAGE:=100}"
;;

x86_64-unknown-linux-gnu*)
TEST_CPPFLAGS="-fuse-ld=lld -I/usr/include/x86_64-linux-gnu/"
TEST_CXX_COMPILER="clang++"
TEST_RUNNER="${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
x86_64*)
export CFLAGS="-I/usr/include/x86_64-linux-gnu/"
TEST_SKIP_INTRINSICS=crates/intrinsic-test/missing_x86.txt
: "${TEST_SAMPLE_INTRINSICS_PERCENTAGE:=20}"
;;
*)
;;

esac

# Arm specific
case "${TARGET}" in
aarch64-unknown-linux-gnu*|armv7-unknown-linux-gnueabihf*)
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=warn \
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
--runner "${TEST_RUNNER}" \
--cppcompiler "${TEST_CXX_COMPILER}" \
--skip "${TEST_SKIP_INTRINSICS}" \
--target "${TARGET}" \
--profile "${PROFILE}" \
--sample-percentage "${TEST_SAMPLE_INTRINSICS_PERCENTAGE}"
;;

aarch64_be-unknown-linux-gnu*)
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" RUST_LOG=warn \
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
--runner "${TEST_RUNNER}" \
--cppcompiler "${TEST_CXX_COMPILER}" \
--skip "${TEST_SKIP_INTRINSICS}" \
--target "${TARGET}" \
--profile "${PROFILE}" \
--linker "${CARGO_TARGET_AARCH64_BE_UNKNOWN_LINUX_GNU_LINKER}" \
--cxx-toolchain-dir "${AARCH64_BE_TOOLCHAIN}" \
--sample-percentage "${TEST_SAMPLE_INTRINSICS_PERCENTAGE}"
;;

x86_64-unknown-linux-gnu*)
# `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER` is not necessary for `intrinsic-test`
# because the binary needs to run directly on the host.
# Hence the use of `env -u`.
env -u CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER \
CPPFLAGS="${TEST_CPPFLAGS}" RUSTFLAGS="${HOST_RUSTFLAGS}" \
RUST_LOG=warn RUST_BACKTRACE=1 \
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/x86-intel.xml \
--runner "${TEST_RUNNER}" \
--skip "${TEST_SKIP_INTRINSICS}" \
--cppcompiler "${TEST_CXX_COMPILER}" \
--target "${TARGET}" \
--profile "${PROFILE}" \
--sample-percentage "${TEST_SAMPLE_INTRINSICS_PERCENTAGE}"
--target "${TARGET}"

echo "${CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER}"
;;
*)
*)
cargo run "${INTRINSIC_TEST}" --release \
--bin intrinsic-test -- intrinsics_data/arm_intrinsics.json \
--skip "${TEST_SKIP_INTRINSICS}" \
--target "${TARGET}"
;;
esac

cargo test --manifest-path=rust_programs/Cargo.toml --target "${TARGET}" --profile "${PROFILE}"
Loading
Loading