| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #define V8_HOST_ARCH_IA32 1 | 71 #define V8_HOST_ARCH_IA32 1 |
| 72 #define V8_HOST_ARCH_32_BIT 1 | 72 #define V8_HOST_ARCH_32_BIT 1 |
| 73 #define V8_HOST_CAN_READ_UNALIGNED 1 | 73 #define V8_HOST_CAN_READ_UNALIGNED 1 |
| 74 #elif defined(__AARCH64EL__) | 74 #elif defined(__AARCH64EL__) |
| 75 #define V8_HOST_ARCH_ARM64 1 | 75 #define V8_HOST_ARCH_ARM64 1 |
| 76 #define V8_HOST_ARCH_64_BIT 1 | 76 #define V8_HOST_ARCH_64_BIT 1 |
| 77 #define V8_HOST_CAN_READ_UNALIGNED 1 | 77 #define V8_HOST_CAN_READ_UNALIGNED 1 |
| 78 #elif defined(__ARMEL__) | 78 #elif defined(__ARMEL__) |
| 79 #define V8_HOST_ARCH_ARM 1 | 79 #define V8_HOST_ARCH_ARM 1 |
| 80 #define V8_HOST_ARCH_32_BIT 1 | 80 #define V8_HOST_ARCH_32_BIT 1 |
| 81 #elif defined(__MIPSEL__) | 81 #elif defined(__MIPSEB__) || defined(__MIPSEL__) |
| 82 #define V8_HOST_ARCH_MIPS 1 | 82 #define V8_HOST_ARCH_MIPS 1 |
| 83 #define V8_HOST_ARCH_32_BIT 1 | 83 #define V8_HOST_ARCH_32_BIT 1 |
| 84 #else | 84 #else |
| 85 #error "Host architecture was not detected as supported by v8" | 85 #error "Host architecture was not detected as supported by v8" |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 #if defined(__ARM_ARCH_7A__) || \ | 88 #if defined(__ARM_ARCH_7A__) || \ |
| 89 defined(__ARM_ARCH_7R__) || \ | 89 defined(__ARM_ARCH_7R__) || \ |
| 90 defined(__ARM_ARCH_7__) | 90 defined(__ARM_ARCH_7__) |
| 91 # define CAN_USE_ARMV7_INSTRUCTIONS 1 | 91 # define CAN_USE_ARMV7_INSTRUCTIONS 1 |
| 92 # ifndef CAN_USE_VFP3_INSTRUCTIONS | 92 # ifndef CAN_USE_VFP3_INSTRUCTIONS |
| 93 # define CAN_USE_VFP3_INSTRUCTIONS | 93 # define CAN_USE_VFP3_INSTRUCTIONS |
| 94 # endif | 94 # endif |
| 95 #endif | 95 #endif |
| 96 | 96 |
| 97 | 97 |
| 98 // Target architecture detection. This may be set externally. If not, detect | 98 // Target architecture detection. This may be set externally. If not, detect |
| 99 // in the same way as the host architecture, that is, target the native | 99 // in the same way as the host architecture, that is, target the native |
| 100 // environment as presented by the compiler. | 100 // environment as presented by the compiler. |
| 101 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \ | 101 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \ |
| 102 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS | 102 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS |
| 103 #if defined(_M_X64) || defined(__x86_64__) | 103 #if defined(_M_X64) || defined(__x86_64__) |
| 104 #define V8_TARGET_ARCH_X64 1 | 104 #define V8_TARGET_ARCH_X64 1 |
| 105 #elif defined(_M_IX86) || defined(__i386__) | 105 #elif defined(_M_IX86) || defined(__i386__) |
| 106 #define V8_TARGET_ARCH_IA32 1 | 106 #define V8_TARGET_ARCH_IA32 1 |
| 107 #elif defined(__AARCH64EL__) | 107 #elif defined(__AARCH64EL__) |
| 108 #define V8_TARGET_ARCH_ARM64 1 | 108 #define V8_TARGET_ARCH_ARM64 1 |
| 109 #elif defined(__ARMEL__) | 109 #elif defined(__ARMEL__) |
| 110 #define V8_TARGET_ARCH_ARM 1 | 110 #define V8_TARGET_ARCH_ARM 1 |
| 111 #elif defined(__MIPSEL__) | 111 #elif defined(__MIPSEB__) || defined(__MIPSEL__) |
| 112 #define V8_TARGET_ARCH_MIPS 1 | 112 #define V8_TARGET_ARCH_MIPS 1 |
| 113 #else | 113 #else |
| 114 #error Target architecture was not detected as supported by v8 | 114 #error Target architecture was not detected as supported by v8 |
| 115 #endif | 115 #endif |
| 116 #endif | 116 #endif |
| 117 | 117 |
| 118 // Check for supported combinations of host and target architectures. | 118 // Check for supported combinations of host and target architectures. |
| 119 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32 | 119 #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32 |
| 120 #error Target architecture ia32 is only supported on ia32 host | 120 #error Target architecture ia32 is only supported on ia32 host |
| 121 #endif | 121 #endif |
| (...skipping 18 matching lines...) Expand all Loading... |
| 140 #define USE_SIMULATOR 1 | 140 #define USE_SIMULATOR 1 |
| 141 #endif | 141 #endif |
| 142 #if (V8_TARGET_ARCH_ARM && !V8_HOST_ARCH_ARM) | 142 #if (V8_TARGET_ARCH_ARM && !V8_HOST_ARCH_ARM) |
| 143 #define USE_SIMULATOR 1 | 143 #define USE_SIMULATOR 1 |
| 144 #endif | 144 #endif |
| 145 #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS) | 145 #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS) |
| 146 #define USE_SIMULATOR 1 | 146 #define USE_SIMULATOR 1 |
| 147 #endif | 147 #endif |
| 148 #endif | 148 #endif |
| 149 | 149 |
| 150 // Determine architecture endiannes (we only support little-endian). | 150 // Determine architecture endianness. |
| 151 #if V8_TARGET_ARCH_IA32 | 151 #if V8_TARGET_ARCH_IA32 |
| 152 #define V8_TARGET_LITTLE_ENDIAN 1 | 152 #define V8_TARGET_LITTLE_ENDIAN 1 |
| 153 #elif V8_TARGET_ARCH_X64 | 153 #elif V8_TARGET_ARCH_X64 |
| 154 #define V8_TARGET_LITTLE_ENDIAN 1 | 154 #define V8_TARGET_LITTLE_ENDIAN 1 |
| 155 #elif V8_TARGET_ARCH_ARM | 155 #elif V8_TARGET_ARCH_ARM |
| 156 #define V8_TARGET_LITTLE_ENDIAN 1 | 156 #define V8_TARGET_LITTLE_ENDIAN 1 |
| 157 #elif V8_TARGET_ARCH_ARM64 | 157 #elif V8_TARGET_ARCH_ARM64 |
| 158 #define V8_TARGET_LITTLE_ENDIAN 1 | 158 #define V8_TARGET_LITTLE_ENDIAN 1 |
| 159 #elif V8_TARGET_ARCH_MIPS | 159 #elif V8_TARGET_ARCH_MIPS |
| 160 #if defined(__MIPSEB__) |
| 161 #define V8_TARGET_BIG_ENDIAN 1 |
| 162 #else |
| 160 #define V8_TARGET_LITTLE_ENDIAN 1 | 163 #define V8_TARGET_LITTLE_ENDIAN 1 |
| 164 #endif |
| 161 #else | 165 #else |
| 162 #error Unknown target architecture endiannes | 166 #error Unknown target architecture endianness |
| 163 #endif | 167 #endif |
| 164 | 168 |
| 165 // Determine whether the architecture uses an out-of-line constant pool. | 169 // Determine whether the architecture uses an out-of-line constant pool. |
| 166 #define V8_OOL_CONSTANT_POOL 0 | 170 #define V8_OOL_CONSTANT_POOL 0 |
| 167 | 171 |
| 168 // Support for alternative bool type. This is only enabled if the code is | 172 // Support for alternative bool type. This is only enabled if the code is |
| 169 // compiled with USE_MYBOOL defined. This catches some nasty type bugs. | 173 // compiled with USE_MYBOOL defined. This catches some nasty type bugs. |
| 170 // For instance, 'bool b = "false";' results in b == true! This is a hidden | 174 // For instance, 'bool b = "false";' results in b == true! This is a hidden |
| 171 // source of bugs. | 175 // source of bugs. |
| 172 // However, redefining the bool type does have some negative impact on some | 176 // However, redefining the bool type does have some negative impact on some |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // Declarations for use in both the preparser and the rest of V8. | 415 // Declarations for use in both the preparser and the rest of V8. |
| 412 | 416 |
| 413 // The Strict Mode (ECMA-262 5th edition, 4.2.2). | 417 // The Strict Mode (ECMA-262 5th edition, 4.2.2). |
| 414 | 418 |
| 415 enum StrictMode { SLOPPY, STRICT }; | 419 enum StrictMode { SLOPPY, STRICT }; |
| 416 | 420 |
| 417 | 421 |
| 418 } } // namespace v8::internal | 422 } } // namespace v8::internal |
| 419 | 423 |
| 420 #endif // V8_GLOBALS_H_ | 424 #endif // V8_GLOBALS_H_ |
| OLD | NEW |