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

Side by Side Diff: src/trusted/validator_arm/cpuid_arm.h

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
« no previous file with comments | « src/trusted/validator_arm/build.scons ('k') | src/trusted/validator_arm/cpuid_arm.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
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
4 * found in the LICENSE file.
5 */
6
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_CPUID_ARM_H
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_CPUID_ARM_H
9
10 #include "native_client/src/include/nacl_compiler_annotations.h"
11 #include "native_client/src/include/nacl_macros.h"
12 #include "native_client/src/include/portability.h"
13 #include "native_client/src/trusted/validator/ncvalidate.h"
14
15
16 EXTERN_C_BEGIN
17
18 /* List of features supported by ARM CPUs. */
19 typedef enum {
20 #define NACL_ARM_CPU_FEATURE(name) NACL_CONCAT(NaClCPUFeatureArm_, name),
21 #include "native_client/src/trusted/validator_arm/cpuid_arm_features.h"
22 #undef NACL_ARM_CPU_FEATURE
23 /* Leave the following as the last entry. */
24 NaClCPUFeatureArm_Max
25 } NaClCPUFeatureArmID;
26
27 typedef struct cpu_feature_struct_arm {
28 char data[NaClCPUFeatureArm_Max];
29 } NaClCPUFeaturesArm;
30
31 /*
32 * Platform-independent NaClValidatorInterface functions.
33 */
34 void NaClSetAllCPUFeaturesArm(NaClCPUFeatures *features);
35 void NaClGetCurrentCPUFeaturesArm(NaClCPUFeatures *features);
36 int NaClFixCPUFeaturesArm(NaClCPUFeatures *features);
37
38 /*
39 * Platform-dependent getter/setter.
40 */
41 static INLINE int NaClGetCPUFeatureArm(const NaClCPUFeaturesArm *features,
42 NaClCPUFeatureArmID id) {
43 return features->data[id];
44 }
45
46 void NaClSetCPUFeatureArm(NaClCPUFeaturesArm *features, NaClCPUFeatureArmID id,
47 int state);
48 const char *NaClGetCPUFeatureArmName(NaClCPUFeatureArmID id);
49
50 /*
51 * Platform-independent functions which are only used in platform-dependent
52 * code.
53 */
54 void NaClClearCPUFeaturesArm(NaClCPUFeaturesArm *features);
55 void NaClCopyCPUFeaturesArm(NaClCPUFeaturesArm *target,
56 const NaClCPUFeaturesArm *source);
57 /*
58 * TODO(jfb) The x86 CPU features also offers this function, which is
59 * currently not used on ARM: NaClArchSupportedArm.
60 */
61
62 EXTERN_C_END
63
64 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_CPUID_ARM_H */
OLDNEW
« no previous file with comments | « src/trusted/validator_arm/build.scons ('k') | src/trusted/validator_arm/cpuid_arm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698