https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71233

--- Comment #6 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I used the perl script and intrinsics list to build several subsets:

# List of duplicates: (a few intrinsics are listed twice
# with different prototypes, it's likely a bug in the documentation,
# not sure where to report this?)
perl neon_intrinsics.pl < intrinsics.txt |awk '{print $3;}' |sort |uniq -c
|sort -n| grep -v '^ *1 '

# List of intrinsics supported by all arches:
perl neon_intrinsics.pl < intrinsics.txt |grep v7 |awk '{print $3;}' >
intrinsics-v7-a32-a64.txt

# List of intrinsics supported by armv8 (a32+a64 modes):
perl neon_intrinsics.pl < intrinsics.txt |grep -v v7 |grep A32|awk '{print
$3;}' > intrinsics-a32-a64.txt

# List of intrinsics supported only by aarch64:
perl neon_intrinsics.pl < intrinsics.txt |grep -v A32 |awk '{print $3;}' >
intrinsics-a64.txt


Then I generated sample .i files to see which intrinsics are actually supported
by the compiler. I hope I used the right flags to get maximum coverage in
AArch32 mode.


# Generate supported intrinsics:
# -dD needed as some intrinsics are defined by macros
# hello-arm-neon.c:
# #include <arm_neon.h>
#
# AArch64
aarch64-none-linux-gnu-gcc -E -dD hello-arm-neon.c > hello-arm-neon-aarch64.i

# AArch32/v8
arm-none-linux-gnueabihf-gcc -march=armv8.2-a+fp16 -mfpu=neon-fp-armv8 -E -dD
hello-arm-neon.c > hello-arm-neon-aarch32-v8.i

# AArch32/v7 with fp16 for maximum coverage
arm-none-linux-gnueabihf-gcc -mcpu=cortex-a9 -mfpu=neon-fp16 -mfp16-format=ieee
-E -dD hello-arm-neon.c > hello-arm-neon-aarch32-v7.i

# List of A32/A64 intrinsics not present in arm/arm_neon.h
for i in `cat intrinsics-a32-a64.txt `; do
    grep -q $i hello-arm-neon-aarch32-v8.i ||echo "$i"
done > intrinsics-missing-arm-a32-a64.txt

# List of A32/A64 intrinsics not present in aarch64/arm_neon.h
for i in `cat intrinsics-a32-a64.txt `; do
    grep -q $i hello-arm-neon-aarch64.i ||echo "$i"
done > intrinsics-missing-aarch64-a32-a64.txt

# List of v7/a32/a64 intrinsics not present in aarch64/arm_neon.h
for i in `cat intrinsics-v7-a32-a64.txt `; do
    grep -q $i hello-arm-neon-aarch64.i ||echo "$i"
done > intrinsics-missing-aarch64-v7.txt

# List of v7/a32/a64 intrinsics not present in arm/arm_neon.h
for i in `cat intrinsics-v7-a32-a64.txt `; do
    grep -q $i hello-arm-neon-aarch32-v7.i ||echo "$i"
done > intrinsics-missing-arm-v7.txt

# List of A64 intrinsics not present in aarch64/arm_neon.h
for i in `cat intrinsics-a64.txt `; do
    grep -q $i hello-arm-neon-aarch64.i ||echo "$i"
done > intrinsics-missing-aarch64-a64.txt


I have also attached the intermediate results I got:
* lists of intrinsics supported in v7/a32/a64, a32/a64 or a64 only:
intrinsics-v7-a32-a64.txt
intrinsics-a32-a64.txt
intrinsics-a64.txt

* lists of intrinsics missing in aarch32 mode:
intrinsics-missing-arm-v7.txt
intrinsics-missing-arm-a32-a64.txt

* lists of intrinsics missing in aarch64 mode:
intrinsics-missing-aarch64-v7.txt
intrinsics-missing-aarch64-a32-a64.txt
intrinsics-missing-aarch64-a64.txt

So, there are still several intrinsics documented but not implemented, unless I
missed something (that's why I attached my script and process).

Reply via email to