Commit 50b67cf1f47d2caa5b876175129ff8943cba616a

  • avatar
  • zecke
  • Mon Nov 09 07:16:53 GMT 2009
Detect architecture and features automatically on GNU

Use the preprocessor definitions to detect the ARM architecture
and features like the availability of the pld instruction. The
QT_ARCH_ARM/QT_ARCH_ARMV6 detection should be moved to a more
central place.
src/gui/painting/qdrawhelper_arm_p.h
(40 / 0)
  
5757
5858QT_BEGIN_NAMESPACE
5959
60// On a GNU compiler figure out on which architecture we are
61// building and set QT_ARM_ARCH to the number, define if PLD
62// is available and set QT_ARCH_ARM or QT_ARCH_ARMV6
63#if defined(Q_CC_GNU) && (defined(QT_ARCH_ARM) || defined(QT_ARCH_ARMV6))
64
65// the core versions come from gcc/config/arm-cores.def
66#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
67#define QT_ARM_ARCH 4
68#endif
69
70#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__)
71#define QT_ARM_ARCH 5
72#endif
73
74#if defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__)
75#define QT_ARM_ARCH 5
76#define QT_ARM_HAS_PLD
77#endif
78
79#if defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6M__)
80#define QT_ARM_ARCH 6
81#endif
82
83#if defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__)
84#define QT_ARM_ARCH 7
85#endif
86
87#ifndef QT_ARM_ARCH
88#error "Could not detect the ARM architecture."
89#endif
90
91// Now define the global visible information
92#if QT_ARM_ARCH > 5
93#define QT_ARM_HAS_PLD
94#endif
95
96#elif defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6)
97#define QT_ARM_HAS_PLD
98#endif
99
60100#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6)
61101
62102extern "C" void qt_blend_rgb32_on_rgb32_armv6(uchar *destPixels, int dbpl,

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment