Skip to content

Commit eb23e0a

Browse files
adamgemmellAmanieu
authored andcommitted
Remove ACLE submodule
This involves moving from the ACLE intrinsic definitions (which aren't available for SVE at this point) to a JSON file. This was derived from ARM's documentation[^1], and then relicensed under `MIT OR Apache-2.0` for use in this repository. [^1]: https://developer.arm.com/architectures/instruction-sets/intrinsics
1 parent 9bb996c commit eb23e0a

File tree

14 files changed

+87743
-579
lines changed

14 files changed

+87743
-579
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "crates/intrinsic-test/acle"]
2-
path = crates/intrinsic-test/acle
3-
url = https://github.com/ARM-software/acle.git

ci/docker/aarch64-unknown-linux-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1010
qemu-user \
1111
make \
1212
file \
13-
clang-13 \
13+
clang-15 \
1414
lld
1515

1616
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \

ci/docker/armv7-unknown-linux-gnueabihf/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1010
qemu-user \
1111
make \
1212
file \
13-
clang-13 \
13+
clang-15 \
1414
lld
1515
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
1616
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \

ci/run.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ esac
137137

138138
if [ "${TARGET}" = "aarch64-unknown-linux-gnu" ]; then
139139
export CPPFLAGS="-fuse-ld=lld -I/usr/aarch64-linux-gnu/include/ -I/usr/aarch64-linux-gnu/include/c++/9/aarch64-linux-gnu/"
140-
RUST_LOG=warn cargo run ${INTRINSIC_TEST} --release --bin intrinsic-test -- crates/intrinsic-test/acle/tools/intrinsic_db/advsimd.csv --runner "${CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER}" --cppcompiler "clang++-13" --skip crates/intrinsic-test/missing_aarch64.txt
140+
RUST_LOG=warn cargo run ${INTRINSIC_TEST} --release --bin intrinsic-test -- intrinsics_data/arm_intrinsics.json --runner "${CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER}" --cppcompiler "clang++-15" --skip crates/intrinsic-test/missing_aarch64.txt
141141
elif [ "${TARGET}" = "armv7-unknown-linux-gnueabihf" ]; then
142142
export CPPFLAGS="-fuse-ld=lld -I/usr/arm-linux-gnueabihf/include/ -I/usr/arm-linux-gnueabihf/include/c++/9/arm-linux-gnueabihf/"
143-
RUST_LOG=warn cargo run ${INTRINSIC_TEST} --release --bin intrinsic-test -- crates/intrinsic-test/acle/tools/intrinsic_db/advsimd.csv --runner "${CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER}" --cppcompiler "clang++-13" --skip crates/intrinsic-test/missing_arm.txt --a32
143+
RUST_LOG=warn cargo run ${INTRINSIC_TEST} --release --bin intrinsic-test -- intrinsics_data/arm_intrinsics.json --runner "${CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER}" --cppcompiler "clang++-15" --skip crates/intrinsic-test/missing_arm.txt --a32
144144
fi
145145

146146
if [ "$NORUN" != "1" ] && [ "$NOSTD" != 1 ]; then

crates/intrinsic-test/Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[package]
22
name = "intrinsic-test"
33
version = "0.1.0"
4-
authors = ["Jamie Cunliffe <[email protected]>"]
5-
edition = "2021"
4+
authors = ["Jamie Cunliffe <[email protected]>",
5+
"James McGregor <[email protected]",
6+
"Adam Gemmell <[email protected]"]
67
license = "MIT OR Apache-2.0"
8+
edition = "2021"
79

810
[dependencies]
911
lazy_static = "1.4.0"
1012
serde = { version = "1", features = ["derive"] }
13+
serde_json = "1.0"
1114
csv = "1.1"
1215
clap = "2.33.3"
1316
regex = "1.4.2"

crates/intrinsic-test/acle

-1
This file was deleted.

crates/intrinsic-test/missing_aarch64.txt

+13-59
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,6 @@ vusdotq_lane_s32
2323
vusdotq_s32
2424
vusdot_s32
2525

26-
# Implemented in Clang but missing from CSV
27-
vcmla_f64
28-
vcmla_lane_f64
29-
vcmla_laneq_f64
30-
vcmlaq_lane_f64
31-
vcmlaq_laneq_f64
32-
vcmlaq_rot180_lane_f64
33-
vcmlaq_rot180_laneq_f64
34-
vcmlaq_rot270_lane_f64
35-
vcmlaq_rot270_laneq_f64
36-
vcmlaq_rot90_lane_f64
37-
vcmlaq_rot90_laneq_f64
38-
vcmla_rot180_f64
39-
vcmla_rot180_lane_f64
40-
vcmla_rot180_laneq_f64
41-
vcmla_rot270_f64
42-
vcmla_rot270_lane_f64
43-
vcmla_rot270_laneq_f64
44-
vcmla_rot90_f64
45-
vcmla_rot90_lane_f64
46-
vcmla_rot90_laneq_f64
47-
48-
# Implemented in Clang and stdarch but missing from CSV
49-
vmov_n_p64
50-
vmovq_n_p64
51-
vreinterpret_f32_p64
52-
vreinterpret_p64_s64
53-
vreinterpretq_f32_p128
54-
vreinterpretq_f32_p64
55-
vreinterpretq_p128_p64
56-
vreinterpretq_p64_p128
57-
vtst_p16
58-
vtstq_p16
5926

6027
# Missing from both Clang and stdarch
6128
vrnd32x_f64
@@ -67,30 +34,17 @@ vrnd64xq_f64
6734
vrnd64z_f64
6835
vrnd64zq_f64
6936

70-
# QEMU 6.0 doesn't support these instructions
71-
vmmlaq_s32
72-
vmmlaq_u32
73-
vsm3partw1q_u32
74-
vsm3partw2q_u32
75-
vsm3ss1q_u32
76-
vsm3tt1aq_u32
77-
vsm3tt1bq_u32
78-
vsm3tt2aq_u32
79-
vsm3tt2bq_u32
80-
vsm4ekeyq_u32
81-
vsm4eq_u32
82-
vusmmlaq_s32
83-
8437
# LLVM select error in debug builds
85-
vqshlu_n_s16
86-
vqshlu_n_s32
87-
vqshlu_n_s64
88-
vqshlu_n_s8
89-
vqshlub_n_s8
90-
vqshlud_n_s64
91-
vqshluh_n_s16
92-
vqshluq_n_s16
93-
vqshluq_n_s32
94-
vqshluq_n_s64
95-
vqshluq_n_s8
96-
vqshlus_n_s32
38+
#vqshlu_n_s16
39+
#vqshlu_n_s32
40+
#vqshlu_n_s64
41+
#vqshlu_n_s8
42+
#vqshlub_n_s8
43+
#vqshlud_n_s64
44+
#vqshluh_n_s16
45+
#vqshluq_n_s16
46+
#vqshluq_n_s32
47+
#vqshluq_n_s64
48+
#vqshluq_n_s8
49+
#vqshlus_n_s32
50+

crates/intrinsic-test/missing_arm.txt

+26-116
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ vusdotq_lane_s32
2323
vusdotq_s32
2424
vusdot_s32
2525

26-
# Implemented in Clang and stdarch but missing from CSV
27-
vtst_p16
28-
vtstq_p16
29-
30-
# QEMU 6.0 doesn't support these instructions
31-
vmmlaq_s32
32-
vmmlaq_u32
33-
vusmmlaq_s32
34-
3526
# Implemented in Clang and stdarch for A64 only even though CSV claims A32 support
3627
__crc32d
3728
__crc32cd
@@ -214,110 +205,29 @@ vrndx_f32
214205
vrndxq_f32
215206

216207
# LLVM select error in debug builds
217-
vqrshrn_n_s16
218-
vqrshrn_n_s32
219-
vqrshrn_n_s64
220-
vqrshrn_n_u16
221-
vqrshrn_n_u32
222-
vqrshrn_n_u64
223-
vqrshrun_n_s16
224-
vqrshrun_n_s32
225-
vqrshrun_n_s64
226-
vqshrn_n_s16
227-
vqshrn_n_s32
228-
vqshrn_n_s64
229-
vqshrn_n_u16
230-
vqshrn_n_u32
231-
vqshrn_n_u64
232-
vqshrun_n_s16
233-
vqshrun_n_s32
234-
vqshrun_n_s64
235-
vrshrn_n_s16
236-
vrshrn_n_s32
237-
vrshrn_n_s64
238-
vrshrn_n_u16
239-
vrshrn_n_u32
240-
vrshrn_n_u64
241-
vshrq_n_u64
242-
vshr_n_u64
243-
244-
# Failing tests: stdarch has incorrect results compared to Clang
245-
vqshlu_n_s16
246-
vqshlu_n_s32
247-
vqshlu_n_s64
248-
vqshlu_n_s8
249-
vqshluq_n_s16
250-
vqshluq_n_s32
251-
vqshluq_n_s64
252-
vqshluq_n_s8
253-
vsli_n_p16
254-
vsli_n_p8
255-
vsli_n_s16
256-
vsli_n_s32
257-
vsli_n_s64
258-
vsli_n_s8
259-
vsli_n_u16
260-
vsli_n_u32
261-
vsli_n_u64
262-
vsli_n_u8
263-
vsliq_n_p16
264-
vsliq_n_p8
265-
vsliq_n_s16
266-
vsliq_n_s32
267-
vsliq_n_s64
268-
vsliq_n_s8
269-
vsliq_n_u16
270-
vsliq_n_u32
271-
vsliq_n_u64
272-
vsliq_n_u8
273-
vsri_n_p16
274-
vsri_n_p8
275-
vsri_n_s16
276-
vsri_n_s32
277-
vsri_n_s64
278-
vsri_n_s8
279-
vsri_n_u16
280-
vsri_n_u32
281-
vsri_n_u64
282-
vsri_n_u8
283-
vsriq_n_p16
284-
vsriq_n_p8
285-
vsriq_n_s16
286-
vsriq_n_s32
287-
vsriq_n_s64
288-
vsriq_n_s8
289-
vsriq_n_u16
290-
vsriq_n_u32
291-
vsriq_n_u64
292-
vsriq_n_u8
293-
294-
# These produce a different result on Clang depending on the optimization level.
295-
# This is definitely a bug in LLVM.
296-
vadd_f32
297-
vaddq_f32
298-
vcvt_s32_f32
299-
vcvt_u32_f32
300-
vcvtq_s32_f32
301-
vcvtq_u32_f32
302-
vfma_f32
303-
vfma_n_f32
304-
vfmaq_f32
305-
vfmaq_n_f32
306-
vfms_f32
307-
vfmsq_f32
308-
vmla_f32
309-
vmla_lane_f32
310-
vmla_n_f32
311-
vmlaq_f32
312-
vmlaq_lane_f32
313-
vmlaq_n_f32
314-
vmls_f32
315-
vmls_lane_f32
316-
vmls_n_f32
317-
vmlsq_f32
318-
vmlsq_lane_f32
319-
vmlsq_n_f32
320-
vmul_lane_f32
321-
vmul_n_f32
322-
vmulq_lane_f32
323-
vmulq_n_f32
208+
#vqrshrn_n_s16
209+
#vqrshrn_n_s32
210+
#vqrshrn_n_s64
211+
#vqrshrn_n_u16
212+
#vqrshrn_n_u32
213+
#vqrshrn_n_u64
214+
#vqrshrun_n_s16
215+
#vqrshrun_n_s32
216+
#vqrshrun_n_s64
217+
#vqshrn_n_s16
218+
#vqshrn_n_s32
219+
#vqshrn_n_s64
220+
#vqshrn_n_u16
221+
#vqshrn_n_u32
222+
#vqshrn_n_u64
223+
#vqshrun_n_s16
224+
#vqshrun_n_s32
225+
#vqshrun_n_s64
226+
#vrshrn_n_s16
227+
#vrshrn_n_s32
228+
#vrshrn_n_s64
229+
#vrshrn_n_u16
230+
#vrshrn_n_u32
231+
#vrshrn_n_u64
232+
#vshrq_n_u64
233+
#vshr_n_u64

0 commit comments

Comments
 (0)