On Wed, Apr 19, 2017 at 12:38 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > According to [1], I can use ".arch_extension" to enable it. According > to [2], ".arch_extension" is available in GCC 4.6 and GAS 2.21. My > version of Linaro provides GCC 4.9.2 and GAS 2.25.90. I can also > duplicate the issue on GCC113 (compiel farm), which provides GCC 4.8 > and GAS 2.24.
ARM is a little ambiguous. It turns out that arch_extension was added to the arm (32-bit) port in 2010, but wasn't added to the aarch64 (64-bit) port until 2014. So you need binutils-2.26 in order to use arch_extension pseudo-op with the aarch64 toolchain. Meanwhile, you might try looking at the arm_neon.h header file for your gcc version. Though it apperas in gcc-4.9.2 there is only a predefined macro __ARM_FEATURE_CRYPTO that you can use, and nothing for CRC. GCC 5.x adds a __ARM_FEATURE_CRC32 predefined macro that you could use. With gcc 6, the arm_neon.h file uses #pragma GCC push_options #pragma GCC target ("+nothing+crypto") ... #pragma GCC pop_options to enable crypto support. You can do something similar with crc, you probably want to use "+onthing+crc" if you only want crc support enalbed, or "+simd+crc" if you want both simd and crc support enabled for instance. The GCC aarch64 port does not use the arch64_extension support in binutils. I think the linux kernel just puts functions that need crc support in different files, so that those files can be compiled with crc support enabled via -mcpu=generic+crc. Jim _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-toolchain