Red Hat Bugzilla – Bug 666937
Disabling building unusable 3DNOW code on x86_64
Last modified: 2013-10-04 08:22:21 EDT
Created attachment 471538 [details]
Prevent compiling 3DNOW code in a x86_64 build
Description of problem:
x86_64 builds compile/link code that can not be used.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build from source RPM on x86_64 system.
2. Note QT_HAVE_3DNOW in build flags
Code is compiled which cannot be used by runtime detection of CPU features
Should not build unreachable code
From source file BUILD/qt-everywhere-opensource-src-4.7.1/src/corelib/tools/qsimd.cpp:
#elif defined(__x86_64) || defined(Q_OS_WIN64)
static inline uint detectProcessorFeatures()
uint features = MMX|SSE|SSE2|CMOV;
uint feature_result = 0;
The base set of CPUs features does not include the 3DNOW instruction set, so that flag won't be set in the "features" variable, so it will never be seen as set at runtime. Code that does a 'if (features & MMX3DNOW)' will never be reached.
Removing external tracker bug with the id '16418' as it is not valid for this tracker