From 1602a091c6d2745cb81f3dd4209e691a790542dc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 18 Jul 2014 18:57:22 -0700 Subject: Fix compilation on ARM without ARMv6T2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "rbit" instruction requires ARMv6T2 or higher. This was found in the CI when building the imx6 target: Compiler: arm-poky-linux-gnueabi-g++ Flags: -mfloat-abi=hard -mfpu=neon Errors from the assembler: {standard input}:3078: Error: selected processor does not support ARM mode `rbit r3,r3' {standard input}:7341: Error: selected processor does not support ARM mode `rbit ip,ip' That compiler defaults to ARMv5T. That's obviously wrong for an i.MX 6, which is a Cortex-A9 (ARMv7), but the correction applies for older processors. Change-Id: I56c276fa411977dd7cd867d62adf021e4909302c Reviewed-by: Jędrzej Nowacki --- tests/benchmarks/corelib/tools/qstring/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp index 6101cfe8fb..b94d9f5d66 100644 --- a/tests/benchmarks/corelib/tools/qstring/main.cpp +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp @@ -2388,7 +2388,7 @@ int fromUtf8_sse2_trusted_no_bom(ushort *qch, const char *chars, int len) } #endif -#ifdef __ARM_NEON__ +#if defined(__ARM_NEON__) && (defined(Q_PROCESSOR_ARM_V7) || defined(__ARM_ARCH_6T2__)) int fromUtf8_latin1_neon(ushort *dst, const char *chars, int len) { fromLatin1_neon_improved(dst, chars, len); @@ -2521,7 +2521,7 @@ void tst_QString::fromUtf8Alternatives_data() const QTest::newRow("sse2-optimized-for-ascii") << &fromUtf8_sse2_optimised_for_ascii; QTest::newRow("sse2-trusted-no-bom") << &fromUtf8_sse2_trusted_no_bom; #endif -#ifdef __ARM_NEON__ +#if defined(__ARM_NEON__) && (defined(Q_PROCESSOR_ARM_V7) || defined(__ARM_ARCH_6T2__)) QTest::newRow("neon") << &fromUtf8_neon; QTest::newRow("neon-trusted-no-bom") << &fromUtf8_neon_trusted; #endif @@ -2531,7 +2531,7 @@ void tst_QString::fromUtf8Alternatives_data() const QTest::newRow("latin1-sse2-qt4.7") << &fromUtf8_latin1_qt47; QTest::newRow("latin1-sse2-improved") << &fromUtf8_latin1_sse2_improved; #endif -#ifdef __ARM_NEON__ +#if defined(__ARM_NEON__) && (defined(Q_PROCESSOR_ARM_V7) || defined(__ARM_ARCH_6T2__)) QTest::newRow("latin1-neon-improved") << &fromUtf8_latin1_neon; #endif } -- cgit v1.2.3