gcc - How to enable Aarch32 instruction set on ARMv8-a? -
raspberry pi 3 uses broadcom soc , armv8 a53 core. uses 32-bit os based on debian jessie. according arm's arm neon programming quick reference, section 3.2, instruction set:
the armv8-a aarch32 instruction set consists of a32 (arm instruction set, 32-bit fixed length instruction set) , t32 (thumb instruction set, 16-bit fixed length instruction set; thumb2 instruction set, 16 or 32-bit length instruction set). superset of armv7-a instruction set, retains backwards compatibility necessary run existing software. there additions a32 , t32 maintain alignment a64 instruction set, including neon division, , cryptographic extension instructions. neon double precision floating point (ieee compliance) supported.
i kind of asked similar question while on gcc mailing list @ how test aarch32 execution environment on aarch64? did not quite understand answer:
once you're compiling arm toolchain crc extension can enabled through
-march=armv8-a+crc
or selecting-mcpu
option enables it. enable crypto extension you'll have specify right-mfpu
option.
my question simple... how enable both crc , crypto extensions raspberry pi 3?
here attempts don't work.
attempt (4) similar how natively under aarch64: gcc -march=armv8-a+crc+crypto -mtune=cortex-a53
. attempt (5) enables crc, can't seem else enabled, pmull
, pmull2
, aes
, sha1
, sha2
.
gcc -d__arm_feature_crypto -d__arm_feature_crc -march=armv8-a+crc+crypto -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
gcc -d__arm_feature_crypto -d__arm_feature_crc -march=armv8-a+crc -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
gcc -d__arm_feature_crypto -d__arm_feature_crc -march=armv8-a -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
gcc -march=armv8-a+crc+crypto -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
gcc -march=armv8-a+crc -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
gcc -march=armv8-a -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
$ gcc -v using built-in specs. collect_gcc=gcc collect_lto_wrapper=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper target: arm-linux-gnueabihf configured with: ../src/configure -v --with-pkgversion='raspbian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/readme.bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf thread model: posix gcc version 4.9.2 (raspbian 4.9.2-10)
quite simply, "the right -mfpu
option" should -mfpu=crypto-neon-fp-armv8
.
Comments
Post a Comment