| Index: src/globals.h
|
| diff --git a/src/globals.h b/src/globals.h
|
| index 1606996d20b9e2fdc5f9e2144b167f3ac78aab6c..7724102eb5a91c1ef351d7bf3245908aea4ea13b 100644
|
| --- a/src/globals.h
|
| +++ b/src/globals.h
|
| @@ -67,9 +67,21 @@ namespace internal {
|
| // http://www.agner.org/optimize/calling_conventions.pdf
|
| // or with gcc, run: "echo | gcc -E -dM -"
|
| #if defined(_M_X64) || defined(__x86_64__)
|
| +#if defined(__native_client__)
|
| +// For Native Client builds of V8, use V8_TARGET_ARCH_ARM, so that V8
|
| +// generates ARM machine code, together a portable ARM simulator
|
| +// compiled for the host architecture in question.
|
| +//
|
| +// Since Native Client is ILP-32 on all architectures we use
|
| +// V8_HOST_ARCH_IA32 on both 32- and 64-bit x86.
|
| +#define V8_HOST_ARCH_IA32 1
|
| +#define V8_HOST_ARCH_32_BIT 1
|
| +#define V8_HOST_CAN_READ_UNALIGNED 1
|
| +#else
|
| #define V8_HOST_ARCH_X64 1
|
| #define V8_HOST_ARCH_64_BIT 1
|
| #define V8_HOST_CAN_READ_UNALIGNED 1
|
| +#endif // __native_client__
|
| #elif defined(_M_IX86) || defined(__i386__)
|
| #define V8_HOST_ARCH_IA32 1
|
| #define V8_HOST_ARCH_32_BIT 1
|
| @@ -95,7 +107,10 @@ namespace internal {
|
| // environment as presented by the compiler.
|
| #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_IA32) && \
|
| !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_MIPS)
|
| -#if defined(_M_X64) || defined(__x86_64__)
|
| +#if defined(__native_client__)
|
| +// use ARM JIT with interpreter to bootstrap NaCl port
|
| +#define V8_TARGET_ARCH_ARM 1
|
| +#elif defined(_M_X64) || defined(__x86_64__)
|
| #define V8_TARGET_ARCH_X64 1
|
| #elif defined(_M_IX86) || defined(__i386__)
|
| #define V8_TARGET_ARCH_IA32 1
|
| @@ -135,6 +150,14 @@ namespace internal {
|
| #define USE_SIMULATOR 1
|
| #endif
|
| #endif
|
| +// V8_ARM_ON_X86_64 is used to conditionally compile code for
|
| +// using ARM code generation together with an ARM simulator on
|
| +// x86_64 hosts.
|
| +#if defined(__x86_64__)
|
| +#if defined(V8_TARGET_ARCH_ARM) && defined(USE_SIMULATOR)
|
| +#define V8_ARM_ON_X86_64 1
|
| +#endif
|
| +#endif
|
|
|
| // Support for alternative bool type. This is only enabled if the code is
|
| // compiled with USE_MYBOOL defined. This catches some nasty type bugs.
|
|
|