Bug 666937 - Disabling building unusable 3DNOW code on x86_64
Disabling building unusable 3DNOW code on x86_64
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: qt (Show other bugs)
14
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Ngo Than
Fedora Extras Quality Assurance
: MoveUpstream, Patch, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-03 14:02 EST by Steve Snyder
Modified: 2013-10-04 08:22 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-20 11:16:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Prevent compiling 3DNOW code in a x86_64 build (772 bytes, patch)
2011-01-03 14:02 EST, Steve Snyder
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Qt Bug Tracker QTBUG-16418 None None None Never

  None (edit)
Description Steve Snyder 2011-01-03 14:02:56 EST
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):

qt-4.7.1-7.fc14

How reproducible:

always

Steps to Reproduce:
1. Build from source RPM on x86_64 system.
2. Note QT_HAVE_3DNOW in build flags
3.
  
Actual results:

Code is compiled which cannot be used by runtime detection of CPU features

Expected results:

Should not build unreachable code

Additional info:

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.
Comment 1 Steve Snyder 2011-01-03 14:32:08 EST
http://bugreports.qt.nokia.com/browse/QTBUG-16418
Comment 2 Rex Dieter 2011-01-03 14:35:47 EST
Thanks!
Comment 3 Red Hat Bugzilla 2013-10-03 20:19:43 EDT
Removing external tracker bug with the id '16418' as it is not valid for this tracker

Note You need to log in before you can comment on or make changes to this bug.