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

Side by Side Diff: source/libvpx/vpx_ports/x86.h

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vpx_ports/vpx_ports.mk ('k') | source/libvpx/vpx_ports/x86_cpuid.c » ('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 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 /* Get the leaf 7 feature flags. Needed to check for AVX2 support */ 161 /* Get the leaf 7 feature flags. Needed to check for AVX2 support */
162 reg_eax = 7; 162 reg_eax = 7;
163 reg_ecx = 0; 163 reg_ecx = 0;
164 cpuid(7, 0, reg_eax, reg_ebx, reg_ecx, reg_edx); 164 cpuid(7, 0, reg_eax, reg_ebx, reg_ecx, reg_edx);
165 165
166 if (reg_ebx & BIT(5)) flags |= HAS_AVX2; 166 if (reg_ebx & BIT(5)) flags |= HAS_AVX2;
167 167
168 return flags & mask; 168 return flags & mask;
169 } 169 }
170 170
171 vpx_cpu_t vpx_x86_vendor(void);
172
173 #if ARCH_X86_64 && defined(_MSC_VER) 171 #if ARCH_X86_64 && defined(_MSC_VER)
174 unsigned __int64 __rdtsc(void); 172 unsigned __int64 __rdtsc(void);
175 #pragma intrinsic(__rdtsc) 173 #pragma intrinsic(__rdtsc)
176 #endif 174 #endif
177 static unsigned int 175 static unsigned int
178 x86_readtsc(void) { 176 x86_readtsc(void) {
179 #if defined(__GNUC__) && __GNUC__ 177 #if defined(__GNUC__) && __GNUC__
180 unsigned int tsc; 178 unsigned int tsc;
181 __asm__ __volatile__("rdtsc\n\t":"=a"(tsc):); 179 __asm__ __volatile__("rdtsc\n\t":"=a"(tsc):);
182 return tsc; 180 return tsc;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 } 257 }
260 258
261 259
262 extern void vpx_reset_mmx_state(void); 260 extern void vpx_reset_mmx_state(void);
263 261
264 #ifdef __cplusplus 262 #ifdef __cplusplus
265 } // extern "C" 263 } // extern "C"
266 #endif 264 #endif
267 265
268 #endif // VPX_PORTS_X86_H_ 266 #endif // VPX_PORTS_X86_H_
OLDNEW
« no previous file with comments | « source/libvpx/vpx_ports/vpx_ports.mk ('k') | source/libvpx/vpx_ports/x86_cpuid.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698