|
1 | 1 | --- a/pixman/pixman/pixman-x86.c |
2 | 2 | +++ b/pixman/pixman/pixman-x86.c |
3 | | -@@ -74,10 +74,12 @@ detect_cpu_features (void) |
| 3 | +@@ -74,12 +74,18 @@ |
4 | 4 |
|
5 | 5 | #else |
6 | 6 |
|
7 | 7 | -#if defined (__GNUC__) |
8 | 8 | +#if defined (__GNUC__) && !defined(__EMSCRIPTEN__) |
9 | 9 | #include <cpuid.h> |
| 10 | + #elif defined(_MSC_VER) |
| 11 | + #include <intrin.h> |
10 | 12 | #endif |
11 | 13 |
|
12 | | -+#if !defined(__EMSCRIPTEN__) |
13 | | -+ |
| 14 | ++#if defined(__EMSCRIPTEN__) |
| 15 | ++static cpu_features_t |
| 16 | ++detect_cpu_features (void) { |
| 17 | ++ return X86_SSE | X86_SSE2 | X86_SSSE3; |
| 18 | ++} |
| 19 | ++#else // !defined(__EMSCRIPTEN__) |
14 | 20 | static void |
15 | 21 | pixman_cpuid (uint32_t feature, |
16 | 22 | uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) |
17 | | -@@ -98,10 +100,17 @@ pixman_cpuid (uint32_t feature, |
18 | | - #error Unknown compiler |
19 | | - #endif |
20 | | - } |
21 | | -+ |
22 | | -+#endif // !__EMSCRIPTEN__ |
23 | | - |
24 | | - static cpu_features_t |
25 | | - detect_cpu_features (void) |
26 | | - { |
27 | | -+#if defined(__EMSCRIPTEN__) |
28 | | -+ |
29 | | -+ return X86_MMX | X86_MMX_EXTENSIONS | X86_SSE | X86_SSE2; |
30 | | -+ |
31 | | -+#else |
32 | | - uint32_t a, b, c, d; |
33 | | - cpu_features_t features = 0; |
34 | | - |
35 | | -@@ -147,6 +156,8 @@ detect_cpu_features (void) |
36 | | - } |
| 23 | +@@ -150,6 +156,7 @@ |
37 | 24 |
|
38 | 25 | return features; |
39 | | -+ |
40 | | -+#endif // !__EMSCRIPTEN__ |
41 | 26 | } |
| 27 | ++#endif |
42 | 28 |
|
43 | 29 | #endif |
| 30 | + |
| 31 | + |
44 | 32 | --- a/pixman/pixman/pixman-ssse3.c |
45 | 33 | +++ b/pixman/pixman/pixman-ssse3.c |
46 | 34 | @@ -28,7 +28,9 @@ |
|
0 commit comments