| 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 #include "native_client/src/trusted/service_runtime/sel_qualify.h" | 7 #include "native_client/src/trusted/service_runtime/sel_qualify.h" |
| 8 | 8 |
| 9 #include "native_client/src/trusted/platform_qualify/nacl_cpuwhitelist.h" | 9 #include "native_client/src/trusted/platform_qualify/nacl_cpuwhitelist.h" |
| 10 #include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h" | 10 #include "native_client/src/trusted/platform_qualify/nacl_dep_qualify.h" |
| 11 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" | 11 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" |
| 12 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm | 12 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm |
| 13 #include "native_client/src/trusted/platform_qualify/arch/arm/nacl_arm_qualify.h
" | 13 #include "native_client/src/trusted/platform_qualify/arch/arm/nacl_arm_qualify.h
" |
| 14 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips |
| 15 #include "native_client/src/trusted/platform_qualify/arch/mips/nacl_mips_qualify
.h" |
| 14 #endif | 16 #endif |
| 15 | 17 |
| 16 NaClErrorCode NaClRunSelQualificationTests() { | 18 NaClErrorCode NaClRunSelQualificationTests() { |
| 17 if (!NaClOsIsSupported()) { | 19 if (!NaClOsIsSupported()) { |
| 18 return LOAD_UNSUPPORTED_OS_PLATFORM; | 20 return LOAD_UNSUPPORTED_OS_PLATFORM; |
| 19 } | 21 } |
| 20 | 22 |
| 21 if (!NaClCheckDEP()) { | 23 if (!NaClCheckDEP()) { |
| 22 return LOAD_DEP_UNSUPPORTED; | 24 return LOAD_DEP_UNSUPPORTED; |
| 23 } | 25 } |
| 24 | 26 |
| 25 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 | 27 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 |
| 26 if (NaCl_ThisCPUIsBlacklisted()) { | 28 if (NaCl_ThisCPUIsBlacklisted()) { |
| 27 return LOAD_UNSUPPORTED_CPU; | 29 return LOAD_UNSUPPORTED_CPU; |
| 28 } | 30 } |
| 29 #endif | 31 #endif |
| 30 | 32 |
| 31 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm | 33 #if NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm || \ |
| 34 NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips |
| 32 if (!NaClQualifyFpu()) { | 35 if (!NaClQualifyFpu()) { |
| 33 return LOAD_UNSUPPORTED_CPU; | 36 return LOAD_UNSUPPORTED_CPU; |
| 34 } | 37 } |
| 35 #endif | 38 #endif |
| 36 | 39 |
| 37 return LOAD_OK; | 40 return LOAD_OK; |
| 38 } | 41 } |
| OLD | NEW |