OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #define V8_PTR_PREFIX "ll" | 91 #define V8_PTR_PREFIX "ll" |
92 #else // _MSC_VER | 92 #else // _MSC_VER |
93 #define V8_UINT64_C(x) (x ## UL) | 93 #define V8_UINT64_C(x) (x ## UL) |
94 #define V8_INT64_C(x) (x ## L) | 94 #define V8_INT64_C(x) (x ## L) |
95 #define V8_PTR_PREFIX "l" | 95 #define V8_PTR_PREFIX "l" |
96 #endif // _MSC_VER | 96 #endif // _MSC_VER |
97 #else // V8_HOST_ARCH_64_BIT | 97 #else // V8_HOST_ARCH_64_BIT |
98 #define V8_PTR_PREFIX "" | 98 #define V8_PTR_PREFIX "" |
99 #endif // V8_HOST_ARCH_64_BIT | 99 #endif // V8_HOST_ARCH_64_BIT |
100 | 100 |
101 // The following macro works on both 32 and 64-bit platforms. | |
102 // Usage: instead of writing 0x1234567890123456 | |
103 // write V8_2PART_UINT64_C(0x12345678,90123456); | |
104 #define V8_2PART_UINT64_C(a, b) (((static_cast<uint64_t>(a) << 32) + 0x##b##u)) | |
105 | |
106 #define V8PRIxPTR V8_PTR_PREFIX "x" | 101 #define V8PRIxPTR V8_PTR_PREFIX "x" |
107 #define V8PRIdPTR V8_PTR_PREFIX "d" | 102 #define V8PRIdPTR V8_PTR_PREFIX "d" |
108 | 103 |
109 // Fix for Mac OS X defining uintptr_t as "unsigned long": | 104 // Fix for Mac OS X defining uintptr_t as "unsigned long": |
110 #if defined(__APPLE__) && defined(__MACH__) | 105 #if defined(__APPLE__) && defined(__MACH__) |
111 #undef V8PRIxPTR | 106 #undef V8PRIxPTR |
112 #define V8PRIxPTR "lx" | 107 #define V8PRIxPTR "lx" |
113 #endif | 108 #endif |
114 | 109 |
115 #if defined(__APPLE__) && defined(__MACH__) | 110 #if defined(__APPLE__) && defined(__MACH__) |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 CMOV = 15, // x86 | 613 CMOV = 15, // x86 |
619 RDTSC = 4, // x86 | 614 RDTSC = 4, // x86 |
620 CPUID = 10, // x86 | 615 CPUID = 10, // x86 |
621 VFP3 = 1, // ARM | 616 VFP3 = 1, // ARM |
622 ARMv7 = 2, // ARM | 617 ARMv7 = 2, // ARM |
623 SAHF = 0}; // x86 | 618 SAHF = 0}; // x86 |
624 | 619 |
625 } } // namespace v8::internal | 620 } } // namespace v8::internal |
626 | 621 |
627 #endif // V8_GLOBALS_H_ | 622 #endif // V8_GLOBALS_H_ |
OLD | NEW |