arm-asm: Enable VFP when invoking GNU as for testing VFP instructions

This commit is contained in:
Danny Milosavljevic 2021-01-21 20:28:55 +01:00
parent cdbb55396c
commit 3fc55e15e8
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -7,12 +7,17 @@ set -e
state="`mktemp -d`" state="`mktemp -d`"
cat ../arm-tok.h |grep DEF_ASM |grep -v 'not useful' |grep -v '#define' |grep -v '/[*]' |sed -e 's;^[ ]*DEF_ASM[^(]*(\(.*\)).*$;\1;' | egrep -v '^((r|c|p|s|d)[0-9]+|fp|ip|sp|lr|pc|asl)$' | while read s cat ../arm-tok.h |grep DEF_ASM |grep -v 'not useful' |grep -v '#define' |grep -v '/[*]' |sed -e 's;^[ ]*DEF_ASM[^(]*(\(.*\)).*$;\1;' | egrep -v '^((r|c|p|s|d)[0-9]+|fp|ip|sp|lr|pc|asl)$' | while read s
do do
# If VFP is disabled, skip VFP tests. as_opts=""
if [ "${s#v}" != "${s}" ] && ! grep -q "CONFIG_arm_vfp=yes" ../config.mak if [ "${s#v}" != "${s}" ]
then then
if grep -q "CONFIG_arm_vfp=yes" ../config.mak
then
as_opts="${as_opts} -mfpu=vfp"
else
echo "note: skipping VFP instruction: $s (because VFP is disabled)">&2 echo "note: skipping VFP instruction: $s (because VFP is disabled)">&2
continue continue
fi fi
fi
ok=0 ok=0
for args in "r3, r4, r5, r6" \ for args in "r3, r4, r5, r6" \
"r3, r4, r5" \ "r3, r4, r5" \
@ -123,7 +128,7 @@ do
tcc_object="${state}/tcc-$s $args.o" tcc_object="${state}/tcc-$s $args.o"
expected="${state}/expected-$s $args" expected="${state}/expected-$s $args"
got="${state}/got-$s $args" got="${state}/got-$s $args"
if echo "$s $args" | "${CROSS_COMPILE}as" -mlittle-endian -o "${as_object}" - 2>"${err}" if echo "$s $args" | "${CROSS_COMPILE}as" -mlittle-endian ${as_opts} -o "${as_object}" - 2>"${err}"
then then
cat "${err}" cat "${err}"
rm -f "${err}" rm -f "${err}"