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

Side by Side Diff: src/trusted/cpu_features/arch/x86/cpu_x86.c

Issue 11864002: Move CPU features into its own static library. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Address bsy's comments by not building x86 target when host isn't x86. This is how things are curre… Created 7 years, 11 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
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « src/trusted/cpu_features/arch/x86/cpu_x86.h ('k') | src/trusted/cpu_features/arch/x86/cpu_x86_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698