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

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

Issue 2690623003: Update zlib to 1.2.11 (Closed)
Patch Set: Drop the inflater change, improve the deflater comment Created 3 years, 10 months 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/uncompr.c ('k') | third_party/zlib/zconf.h » ('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 #include "zutil.h"
12 13
13 int x86_cpu_enable_simd = 0; 14 int ZLIB_INTERNAL x86_cpu_enable_simd = 0;
14 15
15 #ifndef _MSC_VER 16 #ifndef _MSC_VER
16 #include <pthread.h> 17 #include <pthread.h>
17 18
18 pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; 19 pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT;
19 static void _x86_check_features(void); 20 static void _x86_check_features(void);
20 21
21 void x86_check_features(void) 22 void x86_check_features(void)
22 { 23 {
23 pthread_once(&cpu_check_inited_once, _x86_check_features); 24 pthread_once(&cpu_check_inited_once, _x86_check_features);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 x86_cpu_has_sse2 = regs[3] & 0x4000000; 83 x86_cpu_has_sse2 = regs[3] & 0x4000000;
83 x86_cpu_has_sse42= regs[2] & 0x100000; 84 x86_cpu_has_sse42= regs[2] & 0x100000;
84 x86_cpu_has_pclmulqdq = regs[2] & 0x2; 85 x86_cpu_has_pclmulqdq = regs[2] & 0x2;
85 86
86 x86_cpu_enable_simd = x86_cpu_has_sse2 && 87 x86_cpu_enable_simd = x86_cpu_has_sse2 &&
87 x86_cpu_has_sse42 && 88 x86_cpu_has_sse42 &&
88 x86_cpu_has_pclmulqdq; 89 x86_cpu_has_pclmulqdq;
89 return TRUE; 90 return TRUE;
90 } 91 }
91 #endif /* _MSC_VER */ 92 #endif /* _MSC_VER */
OLDNEW
« no previous file with comments | « third_party/zlib/uncompr.c ('k') | third_party/zlib/zconf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698