OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #define V8_HOST_CAN_READ_UNALIGNED 1 | 47 #define V8_HOST_CAN_READ_UNALIGNED 1 |
48 #elif defined(__ARMEL__) | 48 #elif defined(__ARMEL__) |
49 #define V8_HOST_ARCH_ARM 1 | 49 #define V8_HOST_ARCH_ARM 1 |
50 #define V8_HOST_ARCH_32_BIT 1 | 50 #define V8_HOST_ARCH_32_BIT 1 |
51 // Some CPU-OS combinations allow unaligned access on ARM. We assume | 51 // Some CPU-OS combinations allow unaligned access on ARM. We assume |
52 // that unaligned accesses are not allowed unless the build system | 52 // that unaligned accesses are not allowed unless the build system |
53 // defines the CAN_USE_UNALIGNED_ACCESSES macro to be non-zero. | 53 // defines the CAN_USE_UNALIGNED_ACCESSES macro to be non-zero. |
54 #if CAN_USE_UNALIGNED_ACCESSES | 54 #if CAN_USE_UNALIGNED_ACCESSES |
55 #define V8_HOST_CAN_READ_UNALIGNED 1 | 55 #define V8_HOST_CAN_READ_UNALIGNED 1 |
56 #endif | 56 #endif |
57 #elif defined(_MIPS_ARCH_MIPS32R2) | 57 #elif defined(__MIPSEL__) |
58 #define V8_HOST_ARCH_MIPS 1 | 58 #define V8_HOST_ARCH_MIPS 1 |
59 #define V8_HOST_ARCH_32_BIT 1 | 59 #define V8_HOST_ARCH_32_BIT 1 |
60 #else | 60 #else |
61 #error Host architecture was not detected as supported by v8 | 61 #error Host architecture was not detected as supported by v8 |
62 #endif | 62 #endif |
63 | 63 |
64 // Target architecture detection. This may be set externally. If not, detect | 64 // Target architecture detection. This may be set externally. If not, detect |
65 // in the same way as the host architecture, that is, target the native | 65 // in the same way as the host architecture, that is, target the native |
66 // environment as presented by the compiler. | 66 // environment as presented by the compiler. |
67 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_IA32) && \ | 67 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_IA32) && \ |
68 !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_MIPS) | 68 !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_MIPS) |
69 #if defined(_M_X64) || defined(__x86_64__) | 69 #if defined(_M_X64) || defined(__x86_64__) |
70 #define V8_TARGET_ARCH_X64 1 | 70 #define V8_TARGET_ARCH_X64 1 |
71 #elif defined(_M_IX86) || defined(__i386__) | 71 #elif defined(_M_IX86) || defined(__i386__) |
72 #define V8_TARGET_ARCH_IA32 1 | 72 #define V8_TARGET_ARCH_IA32 1 |
73 #elif defined(__ARMEL__) | 73 #elif defined(__ARMEL__) |
74 #define V8_TARGET_ARCH_ARM 1 | 74 #define V8_TARGET_ARCH_ARM 1 |
75 #elif defined(_MIPS_ARCH_MIPS32R2) | 75 #elif defined(__MIPSEL__) |
76 #define V8_TARGET_ARCH_MIPS 1 | 76 #define V8_TARGET_ARCH_MIPS 1 |
77 #else | 77 #else |
78 #error Target architecture was not detected as supported by v8 | 78 #error Target architecture was not detected as supported by v8 |
79 #endif | 79 #endif |
80 #endif | 80 #endif |
81 | 81 |
82 // Check for supported combinations of host and target architectures. | 82 // Check for supported combinations of host and target architectures. |
83 #if defined(V8_TARGET_ARCH_IA32) && !defined(V8_HOST_ARCH_IA32) | 83 #if defined(V8_TARGET_ARCH_IA32) && !defined(V8_HOST_ARCH_IA32) |
84 #error Target architecture ia32 is only supported on ia32 host | 84 #error Target architecture ia32 is only supported on ia32 host |
85 #endif | 85 #endif |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 // ----------------------------------------------------------------------------- | 316 // ----------------------------------------------------------------------------- |
317 // Forward declarations for frequently used classes | 317 // Forward declarations for frequently used classes |
318 // (sorted alphabetically) | 318 // (sorted alphabetically) |
319 | 319 |
320 class FreeStoreAllocationPolicy; | 320 class FreeStoreAllocationPolicy; |
321 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 321 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
322 | 322 |
323 } } // namespace v8::internal | 323 } } // namespace v8::internal |
324 | 324 |
325 #endif // V8_GLOBALS_H_ | 325 #endif // V8_GLOBALS_H_ |
OLD | NEW |