Commit bd36d753337090a2878fc0ca4117e2250c5ae1b7

Fixing 'softvfp+vfpv2' compiling issue for Tb9.2

When compiling with -fpu=softvfp+vfpv2 on Tb9.2 we were getting the
segmentattion fault.
This seems to be due to the RVCT bug when it comes to using int->float
(and reverse) castings. One extra level of indirection (function
call) has to be applied.

Task-number: QTBUG-4893
Reviewed-by: TrustMe
src/gui/painting/qdrawhelper.cpp
(4 / 0)
  
24082408 else if (4 * dst <= da)
24092409 return (dst * sa * 255 + da * (src2 - sa) * ((((16 * dst_np - 12 * 255) * dst_np + 3 * 65025) * dst_np) / 65025) + temp) / 65025;
24102410 else {
2411# ifdef Q_CC_RVCT // needed to avoid compiler crash in RVCT 2.2
2412 return (dst * sa * 255 + da * (src2 - sa) * (qIntSqrtInt(dst_np * 255) - dst_np) + temp) / 65025;
2413# else
24112414 return (dst * sa * 255 + da * (src2 - sa) * (int(sqrt(qreal(dst_np * 255))) - dst_np) + temp) / 65025;
2415# endif
24122416 }
24132417}
24142418
src/gui/painting/qmath_p.h
(6 / 0)
  
5454//
5555
5656#include <math.h>
57#include <qmath.h>
5758
5859QT_BEGIN_NAMESPACE
5960
6061static const qreal Q_PI = qreal(3.14159265358979323846); // pi
6162static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi
6263static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2
64
65inline int qIntSqrtInt(int v)
66{
67 return static_cast<int>(qSqrt(static_cast<qreal>(v)));
68}
6369
6470QT_END_NAMESPACE
6571

Comments

Add a new comment:

Login or create an account to post a comment

Add your comment