diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2010-08-22 11:30:49 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-03-19 09:44:01 -0400 |
commit | 2966a2f526c8773857f3399a115a2d4c4226f08f (patch) | |
tree | f4e5328e56f8513e4c10edd3f5d5febc6bdab25d | |
parent | 8de742d5ce921a337dd04f829df806632aeee4cd (diff) |
Don't include MMX_EXTENSIONS in the SSE flag.cpu-refactor
It's more obvious what's going on if we set the MMX_EXTENSIONS flag
when setting the SSE flag, and then check for MMX_EXTENSIONS only when
*that* isn't set.
-rw-r--r-- | pixman/pixman-cpu-x86.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pixman/pixman-cpu-x86.c b/pixman/pixman-cpu-x86.c index 974d3588..aa554916 100644 --- a/pixman/pixman-cpu-x86.c +++ b/pixman/pixman-cpu-x86.c @@ -36,11 +36,11 @@ typedef enum { NO_FEATURES = 0, - MMX = 0x1, - MMX_EXTENSIONS = 0x2, - SSE = 0x4 | MMX_EXTENSIONS, - SSE2 = 0x8, - CMOV = 0x10 + MMX = (1 << 0), + MMX_EXTENSIONS = (1 << 1), + SSE = (1 << 2), + SSE2 = (1 << 3), + CMOV = (1 << 4) } cpu_features_t; #ifdef HAVE_GETISAX @@ -247,10 +247,10 @@ detect_cpu_features (void) if (result & (1 << 23)) features |= MMX; if (result & (1 << 25)) - features |= SSE; + features |= (SSE | MMX_EXTENSIONS); if (result & (1 << 26)) features |= SSE2; - if ((features & MMX) && !(features & SSE) && + if ((features & MMX) && !(features & MMX_EXTENSIONS) && (strcmp (vendor, "AuthenticAMD") == 0 || strcmp (vendor, "Geode by NSC") == 0)) { |