| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |