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

Side by Side Diff: src/trusted/validator/x86/nacl_cpuid.h

Issue 9535001: Add validation caching interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: More edits Created 8 years, 9 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 /* 7 /*
8 * cpuid.c 8 * cpuid.c
9 * This module provides a simple abstraction for using the CPUID 9 * This module provides a simple abstraction for using the CPUID
10 * instruction to determine instruction set extensions supported by 10 * instruction to determine instruction set extensions supported by
11 * the current processor. 11 * the current processor.
12 */ 12 */
13 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NACL_CPUID_H_ 13 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NACL_CPUID_H_
14 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NACL_CPUID_H_ 14 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NACL_CPUID_H_
15 15
16 #include "native_client/src/include/portability.h" 16 #include "native_client/src/include/portability.h"
17 17
18 EXTERN_C_BEGIN
19
18 /* The list of features we can get from the CPUID instruction. 20 /* The list of features we can get from the CPUID instruction.
19 * Do not modify this enum without making similar modifications to 21 * Do not modify this enum without making similar modifications to
20 * CPUFeatureDescriptions in nacl_cpuid.c. 22 * CPUFeatureDescriptions in nacl_cpuid.c.
21 */ 23 */
22 typedef enum { 24 typedef enum {
23 NaClCPUFeature_x87 = 0, 25 NaClCPUFeature_x87 = 0,
24 NaClCPUFeature_MMX, 26 NaClCPUFeature_MMX,
25 NaClCPUFeature_SSE, 27 NaClCPUFeature_SSE,
26 NaClCPUFeature_SSE2, 28 NaClCPUFeature_SSE2,
27 NaClCPUFeature_SSE3, 29 NaClCPUFeature_SSE3,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 /* Copy a set of cpu features. */ 139 /* Copy a set of cpu features. */
138 void NaClCopyCPUFeatures(NaClCPUFeaturesX86* target, 140 void NaClCopyCPUFeatures(NaClCPUFeaturesX86* target,
139 const NaClCPUFeaturesX86* source); 141 const NaClCPUFeaturesX86* source);
140 142
141 /* Get the features for the CPU this code is running on. */ 143 /* Get the features for the CPU this code is running on. */
142 void NaClGetCurrentCPUFeatures(NaClCPUFeaturesX86 *cpu_features); 144 void NaClGetCurrentCPUFeatures(NaClCPUFeaturesX86 *cpu_features);
143 145
144 /* Returns true if CPUID is defined, and the CPU is supported. */ 146 /* Returns true if CPUID is defined, and the CPU is supported. */
145 int NaClArchSupported(NaClCPUFeaturesX86 *features); 147 int NaClArchSupported(NaClCPUFeaturesX86 *features);
146 148
149 EXTERN_C_END
150
147 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NACL_CPUID_H_ */ 151 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_NACL_CPUID_H_ */
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/64/ncvalidate_verbose.c ('k') | src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698