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 : #include "native_client/src/shared/platform/nacl_log.h"
8 : #include "native_client/src/trusted/validator/ncvalidate.h"
9 :
10 :
11 322 : const struct NaClValidatorInterface *NaClCreateValidator(void) {
12 : #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm
13 : return NaClValidatorCreateArm();
14 : #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips
15 : return NaClValidatorCreateMips();
16 : #elif NACL_ARCH(NACL_TARGET_ARCH) == NACL_x86
17 : # if NACL_TARGET_SUBARCH == 64
18 322 : return NaClDfaValidatorCreate_x86_64();
19 : # elif NACL_TARGET_SUBARCH == 32
20 : return NaClDfaValidatorCreate_x86_32();
21 : # else
22 : # error "Invalid sub-architecture!"
23 : # endif
24 : #else /* NACL_x86 */
25 : # error "There is no validator for this architecture!"
26 : #endif
27 : }
|