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 /* Implement the ApplyValidator API for the x86-64 architecture. */ | 7 /* Implement the ApplyValidator API for the x86-64 architecture. */ |
8 #include <assert.h> | 8 #include <assert.h> |
9 #include "native_client/src/shared/platform/nacl_log.h" | 9 #include "native_client/src/shared/platform/nacl_log.h" |
10 #include "native_client/src/trusted/validator/ncvalidate.h" | 10 #include "native_client/src/trusted/validator/ncvalidate.h" |
11 #include "native_client/src/trusted/validator/validation_cache.h" | 11 #include "native_client/src/trusted/validator/validation_cache.h" |
12 #include "native_client/src/trusted/validator/x86/decoder/nc_inst_iter.h" | 12 #include "native_client/src/trusted/validator/x86/decoder/nc_inst_iter.h" |
13 #include "native_client/src/trusted/validator/x86/decoder/nc_inst_state_internal
.h" | 13 #include "native_client/src/trusted/validator/x86/decoder/nc_inst_state_internal
.h" |
14 #include "native_client/src/trusted/validator/x86/nacl_cpuid.h" | 14 #include "native_client/src/trusted/cpu_features/arch/x86/cpu_x86.h" |
15 #include "native_client/src/trusted/validator/x86/nc_segment.h" | 15 #include "native_client/src/trusted/validator/x86/nc_segment.h" |
16 #include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_decode_tab
les.h" | 16 #include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncval_decode_tab
les.h" |
17 #include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter.
h" | 17 #include "native_client/src/trusted/validator/x86/ncval_reg_sfi/ncvalidate_iter.
h" |
18 | 18 |
19 /* Be sure the correct compile flags are defined for this. */ | 19 /* Be sure the correct compile flags are defined for this. */ |
20 #if NACL_ARCH(NACL_TARGET_ARCH) != NACL_x86 | 20 #if NACL_ARCH(NACL_TARGET_ARCH) != NACL_x86 |
21 # error("Can't compile, target is for x86-64") | 21 # error("Can't compile, target is for x86-64") |
22 #else | 22 #else |
23 # if NACL_TARGET_SUBARCH != 64 | 23 # if NACL_TARGET_SUBARCH != 64 |
24 # error("Can't compile, target is for x86-64") | 24 # error("Can't compile, target is for x86-64") |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 ApplyValidatorCodeReplacement_x86_64, | 231 ApplyValidatorCodeReplacement_x86_64, |
232 sizeof(NaClCPUFeaturesX86), | 232 sizeof(NaClCPUFeaturesX86), |
233 NaClSetAllCPUFeaturesX86, | 233 NaClSetAllCPUFeaturesX86, |
234 NaClGetCurrentCPUFeaturesX86, | 234 NaClGetCurrentCPUFeaturesX86, |
235 NaClFixCPUFeaturesX86, | 235 NaClFixCPUFeaturesX86, |
236 }; | 236 }; |
237 | 237 |
238 const struct NaClValidatorInterface *NaClValidatorCreate_x86_64(void) { | 238 const struct NaClValidatorInterface *NaClValidatorCreate_x86_64(void) { |
239 return &validator; | 239 return &validator; |
240 } | 240 } |
OLD | NEW |