| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/trusted/validator/x86/nacl_cpuid.h" | 7 #include "native_client/src/trusted/cpu_features/arch/x86/cpu_x86.h" |
| 8 | 8 |
| 9 /* | 9 /* |
| 10 * nacl_cpuid.c | 10 * cpu_x86.c |
| 11 * Retrieve and decode CPU model specific feature mask. | 11 * Retrieve and decode CPU model specific feature mask. |
| 12 */ | 12 */ |
| 13 #if NACL_WINDOWS | 13 #if NACL_WINDOWS |
| 14 #include <intrin.h> /* __cpuid intrinsic */ | 14 #include <intrin.h> /* __cpuid intrinsic */ |
| 15 #endif /* NACL_WINDOWS */ | 15 #endif /* NACL_WINDOWS */ |
| 16 | 16 |
| 17 #include <stdio.h> | 17 #include <stdio.h> |
| 18 #include <string.h> | 18 #include <string.h> |
| 19 #include <assert.h> | 19 #include <assert.h> |
| 20 #include <stdlib.h> | 20 #include <stdlib.h> |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 | 628 |
| 629 void NaClCopyCPUFeaturesX86(NaClCPUFeaturesX86 *target, | 629 void NaClCopyCPUFeaturesX86(NaClCPUFeaturesX86 *target, |
| 630 const NaClCPUFeaturesX86 *source) { | 630 const NaClCPUFeaturesX86 *source) { |
| 631 memcpy(target, source, sizeof(*target)); | 631 memcpy(target, source, sizeof(*target)); |
| 632 } | 632 } |
| 633 | 633 |
| 634 int NaClArchSupportedX86(const NaClCPUFeaturesX86 *f) { | 634 int NaClArchSupportedX86(const NaClCPUFeaturesX86 *f) { |
| 635 return (NaClGetCPUFeatureX86(f, NaClCPUFeatureX86_CPUIDSupported) && | 635 return (NaClGetCPUFeatureX86(f, NaClCPUFeatureX86_CPUIDSupported) && |
| 636 NaClGetCPUFeatureX86(f, NaClCPUFeatureX86_CPUSupported)); | 636 NaClGetCPUFeatureX86(f, NaClCPUFeatureX86_CPUSupported)); |
| 637 } | 637 } |
| OLD | NEW |