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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 #define V8_HOST_ARCH_64_BIT 1 | 82 #define V8_HOST_ARCH_64_BIT 1 |
83 #define V8_HOST_CAN_READ_UNALIGNED 1 | 83 #define V8_HOST_CAN_READ_UNALIGNED 1 |
84 #endif // __native_client__ | 84 #endif // __native_client__ |
85 #elif defined(_M_IX86) || defined(__i386__) | 85 #elif defined(_M_IX86) || defined(__i386__) |
86 #define V8_HOST_ARCH_IA32 1 | 86 #define V8_HOST_ARCH_IA32 1 |
87 #define V8_HOST_ARCH_32_BIT 1 | 87 #define V8_HOST_ARCH_32_BIT 1 |
88 #define V8_HOST_CAN_READ_UNALIGNED 1 | 88 #define V8_HOST_CAN_READ_UNALIGNED 1 |
89 #elif defined(__ARMEL__) | 89 #elif defined(__ARMEL__) |
90 #define V8_HOST_ARCH_ARM 1 | 90 #define V8_HOST_ARCH_ARM 1 |
91 #define V8_HOST_ARCH_32_BIT 1 | 91 #define V8_HOST_ARCH_32_BIT 1 |
92 // Some CPU-OS combinations allow unaligned access on ARM. We assume | |
93 // that unaligned accesses are not allowed unless the build system | |
94 // defines the CAN_USE_UNALIGNED_ACCESSES macro to be non-zero. | |
95 #if CAN_USE_UNALIGNED_ACCESSES | |
96 #define V8_HOST_CAN_READ_UNALIGNED 1 | |
97 #endif | |
98 #elif defined(__MIPSEL__) | 92 #elif defined(__MIPSEL__) |
99 #define V8_HOST_ARCH_MIPS 1 | 93 #define V8_HOST_ARCH_MIPS 1 |
100 #define V8_HOST_ARCH_32_BIT 1 | 94 #define V8_HOST_ARCH_32_BIT 1 |
101 #else | 95 #else |
102 #error Host architecture was not detected as supported by v8 | 96 #error Host architecture was not detected as supported by v8 |
103 #endif | 97 #endif |
104 | 98 |
| 99 #if defined(__ARM_ARCH_7A__) || \ |
| 100 defined(__ARM_ARCH_7R__) || \ |
| 101 defined(__ARM_ARCH_7__) |
| 102 # define CAN_USE_ARMV7_INSTRUCTIONS 1 |
| 103 # ifndef CAN_USE_VFP3_INSTRUCTIONS |
| 104 # define CAN_USE_VFP3_INSTRUCTIONS |
| 105 # endif |
| 106 #endif |
| 107 |
| 108 |
105 // Target architecture detection. This may be set externally. If not, detect | 109 // Target architecture detection. This may be set externally. If not, detect |
106 // in the same way as the host architecture, that is, target the native | 110 // in the same way as the host architecture, that is, target the native |
107 // environment as presented by the compiler. | 111 // environment as presented by the compiler. |
108 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \ | 112 #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \ |
109 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS | 113 !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS |
110 #if defined(_M_X64) || defined(__x86_64__) | 114 #if defined(_M_X64) || defined(__x86_64__) |
111 #define V8_TARGET_ARCH_X64 1 | 115 #define V8_TARGET_ARCH_X64 1 |
112 #elif defined(_M_IX86) || defined(__i386__) | 116 #elif defined(_M_IX86) || defined(__i386__) |
113 #define V8_TARGET_ARCH_IA32 1 | 117 #define V8_TARGET_ARCH_IA32 1 |
114 #elif defined(__ARMEL__) | 118 #elif defined(__ARMEL__) |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // the backend, so both modes are represented by the kStrictMode value. | 433 // the backend, so both modes are represented by the kStrictMode value. |
430 enum StrictModeFlag { | 434 enum StrictModeFlag { |
431 kNonStrictMode, | 435 kNonStrictMode, |
432 kStrictMode | 436 kStrictMode |
433 }; | 437 }; |
434 | 438 |
435 | 439 |
436 } } // namespace v8::internal | 440 } } // namespace v8::internal |
437 | 441 |
438 #endif // V8_GLOBALS_H_ | 442 #endif // V8_GLOBALS_H_ |
OLD | NEW |