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

Side by Side Diff: src/trusted/validator/x86/64/ncvalidate_verbose.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
« no previous file with comments | « src/trusted/validator/x86/64/ncvalidate.c ('k') | src/trusted/validator/x86/build.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* Implement the ApplyValidatorVerbosely API for the x86-64 architecture. */ 7 /* Implement the ApplyValidatorVerbosely API for the x86-64 architecture. */
8 8
9 #include "native_client/src/trusted/validator/ncvalidate.h" 9 #include "native_client/src/trusted/validator/ncvalidate.h"
10 10
11 #include "native_client/src/shared/platform/nacl_log.h" 11 #include "native_client/src/shared/platform/nacl_log.h"
12 #include "native_client/src/trusted/validator/x86/nacl_cpuid.h" 12 #include "native_client/src/trusted/cpu_features/arch/x86/cpu_x86.h"
13 #include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter. h" 13 #include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter. h"
14 #include "native_client/src/trusted/validator/x86/ncval_seg_sfi/ncdecode_verbose .h" 14 #include "native_client/src/trusted/validator/x86/ncval_seg_sfi/ncdecode_verbose .h"
15 #include "native_client/src/trusted/validator/x86/64/ncvalidate.h" 15 #include "native_client/src/trusted/validator/x86/64/ncvalidate.h"
16 #include <assert.h> 16 #include <assert.h>
17 17
18 /* Be sure the correct compile flags are defined for this. */ 18 /* Be sure the correct compile flags are defined for this. */
19 #if NACL_ARCH(NACL_TARGET_ARCH) != NACL_x86 19 #if NACL_ARCH(NACL_TARGET_ARCH) != NACL_x86
20 # error("Can't compile, target is for x86-64") 20 # error("Can't compile, target is for x86-64")
21 #else 21 #else
22 # if NACL_TARGET_SUBARCH != 64 22 # if NACL_TARGET_SUBARCH != 64
(...skipping 29 matching lines...) Expand all
52 const NaClCPUFeatures *f) { 52 const NaClCPUFeatures *f) {
53 /* TODO(jfb) Use a safe cast here. */ 53 /* TODO(jfb) Use a safe cast here. */
54 const NaClCPUFeaturesX86 *cpu_features = (NaClCPUFeaturesX86 *) f; 54 const NaClCPUFeaturesX86 *cpu_features = (NaClCPUFeaturesX86 *) f;
55 55
56 if (!NaClArchSupportedX86(cpu_features)) 56 if (!NaClArchSupportedX86(cpu_features))
57 return NaClValidationFailedCpuNotSupported; 57 return NaClValidationFailedCpuNotSupported;
58 58
59 return NaClApplyValidatorVerbosely_x86_64( 59 return NaClApplyValidatorVerbosely_x86_64(
60 guest_addr, data, size, f); 60 guest_addr, data, size, f);
61 } 61 }
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/64/ncvalidate.c ('k') | src/trusted/validator/x86/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698