Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: third_party/zlib/x86.c

Issue 705053002: Enable zlib SIMD optimisations on Mac OS X builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep disabled on ios; initialise symbols so we're in the BSS Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/zlib/simd_stub.c ('k') | third_party/zlib/zlib.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * x86 feature check 2 * x86 feature check
3 * 3 *
4 * Copyright (C) 2013 Intel Corporation. All rights reserved. 4 * Copyright (C) 2013 Intel Corporation. All rights reserved.
5 * Author: 5 * Author:
6 * Jim Kukunas 6 * Jim Kukunas
7 * 7 *
8 * For conditions of distribution and use, see copyright notice in zlib.h 8 * For conditions of distribution and use, see copyright notice in zlib.h
9 */ 9 */
10 10
11 #include "x86.h" 11 #include "x86.h"
12 12
13 int x86_cpu_enable_simd; 13 int x86_cpu_enable_simd = 0;
14 14
15 #ifndef _MSC_VER 15 #ifndef _MSC_VER
16 #include <pthread.h> 16 #include <pthread.h>
17 17
18 pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; 18 pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT;
19 static void _x86_check_features(void); 19 static void _x86_check_features(void);
20 20
21 void x86_check_features(void) 21 void x86_check_features(void)
22 { 22 {
23 pthread_once(&cpu_check_inited_once, _x86_check_features); 23 pthread_once(&cpu_check_inited_once, _x86_check_features);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 x86_cpu_has_sse2 = regs[3] & 0x4000000; 104 x86_cpu_has_sse2 = regs[3] & 0x4000000;
105 x86_cpu_has_sse42= regs[2] & 0x100000; 105 x86_cpu_has_sse42= regs[2] & 0x100000;
106 x86_cpu_has_pclmulqdq = regs[2] & 0x2; 106 x86_cpu_has_pclmulqdq = regs[2] & 0x2;
107 107
108 x86_cpu_enable_simd = x86_cpu_has_sse2 && 108 x86_cpu_enable_simd = x86_cpu_has_sse2 &&
109 x86_cpu_has_sse42 && 109 x86_cpu_has_sse42 &&
110 x86_cpu_has_pclmulqdq; 110 x86_cpu_has_pclmulqdq;
111 } 111 }
112 #endif /* _MSC_VER */ 112 #endif /* _MSC_VER */
OLDNEW
« no previous file with comments | « third_party/zlib/simd_stub.c ('k') | third_party/zlib/zlib.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698