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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 __asm _emit 0x0f __asm _emit 0x01 __asm _emit 0xd0 | 129 __asm _emit 0x0f __asm _emit 0x01 __asm _emit 0xd0 |
130 mov eax_, eax | 130 mov eax_, eax |
131 mov edx_, edx | 131 mov edx_, edx |
132 } | 132 } |
133 return ((uint64_t)edx_ << 32) | eax_; | 133 return ((uint64_t)edx_ << 32) | eax_; |
134 } | 134 } |
135 #else | 135 #else |
136 #define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains. | 136 #define xgetbv() 0U // no AVX for older x64 or unrecognized toolchains. |
137 #endif | 137 #endif |
138 | 138 |
| 139 #if defined(_MSC_VER) && _MSC_VER >= 1700 |
| 140 #include <windows.h> |
| 141 #if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP) |
| 142 #define getenv(x) NULL |
| 143 #endif |
| 144 #endif |
| 145 |
139 #define HAS_MMX 0x01 | 146 #define HAS_MMX 0x01 |
140 #define HAS_SSE 0x02 | 147 #define HAS_SSE 0x02 |
141 #define HAS_SSE2 0x04 | 148 #define HAS_SSE2 0x04 |
142 #define HAS_SSE3 0x08 | 149 #define HAS_SSE3 0x08 |
143 #define HAS_SSSE3 0x10 | 150 #define HAS_SSSE3 0x10 |
144 #define HAS_SSE4_1 0x20 | 151 #define HAS_SSE4_1 0x20 |
145 #define HAS_AVX 0x40 | 152 #define HAS_AVX 0x40 |
146 #define HAS_AVX2 0x80 | 153 #define HAS_AVX2 0x80 |
147 #ifndef BIT | 154 #ifndef BIT |
148 #define BIT(n) (1<<n) | 155 #define BIT(n) (1<<n) |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 } | 301 } |
295 | 302 |
296 | 303 |
297 extern void vpx_reset_mmx_state(void); | 304 extern void vpx_reset_mmx_state(void); |
298 | 305 |
299 #ifdef __cplusplus | 306 #ifdef __cplusplus |
300 } // extern "C" | 307 } // extern "C" |
301 #endif | 308 #endif |
302 | 309 |
303 #endif // VPX_PORTS_X86_H_ | 310 #endif // VPX_PORTS_X86_H_ |
OLD | NEW |