summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-17 18:10:19 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-01-06 19:38:24 +0100
commitdd8b75d8fb2503aed9e29fabf3cfd3a33a0efb5a (patch)
treea787e3cd2ec841bde3b797397690bb150a6bc5bb /src/gui
parentccef8261d4d005a8666ef2c10b82860602f781b3 (diff)
Remove workarounds for RVCT compiler bugs
This does not try to remove support for RVCT. There has been no report of it working or failing to work, so the status continues to be unknown. In particular, the inline assembly code in atomic_armv[56].h remains in place. This commit only removes workarounds for compiler bugs or bogus warnings, assuming that anyone using this compiler has updated since Qt last tried to use it for Symbian in 2011. Note also how anonymous unions are now part of the language in C++11. Change-Id: Idc4fab092beb31239eb08b7e139bce2602adae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qdrawhelper.cpp31
-rw-r--r--src/gui/painting/qdrawhelper_p.h29
2 files changed, 1 insertions, 59 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index bd53952d1b..de4be7177b 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -2648,32 +2648,10 @@ static const uint * QT_FASTCALL qt_fetch_conical_gradient(uint *buffer, const Op
return b;
}
-#if defined(Q_CC_RVCT)
-// Force ARM code generation for comp_func_* -methods
-# pragma push
-# pragma arm
-# if defined(Q_PROCESSOR_ARM_V6)
-static __forceinline void preload(const uint *start)
-{
- asm( "pld [start]" );
-}
-static const uint L2CacheLineLength = 32;
-static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint);
-# define PRELOAD_INIT(x) preload(x);
-# define PRELOAD_INIT2(x,y) PRELOAD_INIT(x) PRELOAD_INIT(y)
-# define PRELOAD_COND(x) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts);
-// Two consecutive preloads stall, so space them out a bit by using different modulus.
-# define PRELOAD_COND2(x,y) if (((uint)&x[i])%L2CacheLineLength == 0) preload(&x[i] + L2CacheLineLengthInInts); \
- if (((uint)&y[i])%L2CacheLineLength == 16) preload(&y[i] + L2CacheLineLengthInInts);
-# endif // Q_PROCESSOR_ARM_V6
-#endif // Q_CC_RVCT
-
-#if !defined(Q_CC_RVCT) || !defined(Q_PROCESSOR_ARM_V6)
# define PRELOAD_INIT(x)
# define PRELOAD_INIT2(x,y)
# define PRELOAD_COND(x)
# define PRELOAD_COND2(x,y)
-#endif
/* The constant alpha factor describes an alpha factor that gets applied
to the result of the composition operation combining it with the destination.
@@ -3828,11 +3806,7 @@ static inline int soft_light_op(int dst, int src, int da, int sa)
else if (4 * dst <= da)
return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025;
else {
-# ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2
- return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025;
-# else
return (dst * sa * 255 + da * (src2 - sa) * (int(qSqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025;
-# endif
}
}
@@ -4040,11 +4014,6 @@ void QT_FASTCALL comp_func_Exclusion(uint *Q_DECL_RESTRICT dest, const uint *Q_D
comp_func_Exclusion_impl(dest, src, length, QPartialCoverage(const_alpha));
}
-#if defined(Q_CC_RVCT)
-// Restore pragma state from previous #pragma arm
-# pragma pop
-#endif
-
void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest,
int length,
uint color,
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 695fbbdbbd..a2c8f9e7a1 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -59,12 +59,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_CC_RVCT)
-// RVCT doesn't like static template functions
-# define Q_STATIC_TEMPLATE_FUNCTION
-# define Q_ALWAYS_INLINE __forceinline
-# define Q_DECL_RESTRICT
-#elif defined(Q_CC_GNU)
+#if defined(Q_CC_GNU)
# define Q_STATIC_TEMPLATE_FUNCTION static
# define Q_ALWAYS_INLINE inline __attribute__((always_inline))
# define Q_DECL_RESTRICT __restrict__
@@ -555,10 +550,6 @@ public:
}
};
-#if defined(Q_CC_RVCT)
-# pragma push
-# pragma arm
-#endif
static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) {
uint t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
@@ -570,9 +561,6 @@ static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b
x |= t;
return x;
}
-#if defined(Q_CC_RVCT)
-# pragma pop
-#endif
#if QT_POINTER_SIZE == 8 // 64-bit versions
@@ -604,10 +592,6 @@ static Q_ALWAYS_INLINE uint INTERPOLATE_PIXEL_256(uint x, uint a, uint y, uint b
return x;
}
-#if defined(Q_CC_RVCT)
-# pragma push
-# pragma arm
-#endif
static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) {
uint t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
@@ -619,10 +603,6 @@ static Q_ALWAYS_INLINE uint BYTE_MUL(uint x, uint a) {
x |= t;
return x;
}
-#if defined(Q_CC_RVCT)
-# pragma pop
-#endif
-
#endif
@@ -664,14 +644,7 @@ static Q_ALWAYS_INLINE uint BYTE_MUL_RGB16_32(uint x, uint a) {
return t;
}
-#if defined(Q_CC_RVCT)
-# pragma push
-# pragma arm
-#endif
static Q_ALWAYS_INLINE int qt_div_255(int x) { return (x + (x>>8) + 0x80) >> 8; }
-#if defined(Q_CC_RVCT)
-# pragma pop
-#endif
static Q_ALWAYS_INLINE uint BYTE_MUL_RGB30(uint x, uint a) {
uint xa = x >> 30;