~ubuntu-branches/ubuntu/utopic/rtfilter/utopic

« back to all changes in this revision

Viewing changes to debian/patches/fix-sse2-sse3-runtime-check.patch

  • Committer: Package Import Robot
  • Author(s): Nicolas Bourdaud
  • Date: 2012-01-25 18:46:48 UTC
  • Revision ID: package-import@ubuntu.com-20120125184648-w1jliwlvj430ziq8
Tags: 1.1-2
* Fix 'reatime' typo in package description. (Closes: #652577)
* Fix SSE2 and SSE3 runtime test. 
  New patch: fix-sse2-sse3-runtime-check.patch 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix SSE2 and SSE3 runtime test
 
2
 The tests for SSE2 and SSE3 were previously exactly the same as the test
 
3
 for SSE. This patch fix this by using the correct bitmask and correct
 
4
 register after cpuid instruction.
 
5
Origin: upstream, commit:496993bd58e91ae3c7c3057e76c5d5e891c1f261
 
6
Author: Nicolas Bourdaud <nicolas.bourdaud@gmail.com>
 
7
Last-Update: 2012-01-25
 
8
 
 
9
--- a/src/probesimd.h
 
10
+++ b/src/probesimd.h
 
11
@@ -1,5 +1,5 @@
 
12
 /*
 
13
-    Copyright (C) 2011 Nicolas Bourdaud <nicolas.bourdaud@epfl.ch>
 
14
+    Copyright (C) 2011-2012 Nicolas Bourdaud <nicolas.bourdaud@epfl.ch>
 
15
 
 
16
     This file is part of the rtfilter library
 
17
 
 
18
@@ -34,7 +34,7 @@
 
19
 int cputest_sse2(void)
 
20
 {
 
21
        unsigned int eax, ebx, ecx, edx;
 
22
-       if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (edx & bit_SSE))
 
23
+       if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (edx & bit_SSE2))
 
24
                return 1;
 
25
        return 0;
 
26
 }
 
27
@@ -43,7 +43,7 @@
 
28
 int cputest_sse3(void)
 
29
 {
 
30
        unsigned int eax, ebx, ecx, edx;
 
31
-       if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (edx & bit_SSE))
 
32
+       if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & bit_SSE3))
 
33
                return 1;
 
34
        return 0;
 
35
 }