OLD | NEW |
| (Empty) |
1 // Copyright 2010 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can | |
3 // be found in the LICENSE file. | |
4 | |
5 #include "native_client/src/trusted/plugin/nexe_arch.h" | |
6 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" | |
7 | |
8 namespace { | |
9 // The list of supported ISA strings for x86. See issue: | |
10 // http://code.google.com/p/nativeclient/issues/detail?id=1040 for more | |
11 // information. Note that these string are to be case-insensitive compared. | |
12 const char* const kNexeArchX86_32 = "x86-32"; | |
13 const char* const kNexeArchX86_64 = "x86-64"; | |
14 } // namespace | |
15 | |
16 namespace plugin { | |
17 const char* GetSandboxISA() { | |
18 #if defined(NACL_ARCH_CPU_X86_64) && (defined(NACL_LINUX) || defined(NACL_OSX)) | |
19 return kNexeArchX86_64; // 64-bit Linux or Mac. | |
20 #else | |
21 return NaClOsIs64BitWindows() == 1 | |
22 ? kNexeArchX86_64 // 64-bit Windows (Chrome, Firefox) | |
23 : kNexeArchX86_32; // everything else. | |
24 #endif | |
25 } | |
26 } // namespace plugin | |
OLD | NEW |