OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_UTILS_H_ | 5 #ifndef V8_UTILS_H_ |
6 #define V8_UTILS_H_ | 6 #define V8_UTILS_H_ |
7 | 7 |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 inline void MemsetPointer(T** dest, U* value, int counter) { | 1311 inline void MemsetPointer(T** dest, U* value, int counter) { |
1312 #ifdef DEBUG | 1312 #ifdef DEBUG |
1313 T* a = NULL; | 1313 T* a = NULL; |
1314 U* b = NULL; | 1314 U* b = NULL; |
1315 a = b; // Fake assignment to check assignability. | 1315 a = b; // Fake assignment to check assignability. |
1316 USE(a); | 1316 USE(a); |
1317 #endif // DEBUG | 1317 #endif // DEBUG |
1318 #if V8_HOST_ARCH_IA32 | 1318 #if V8_HOST_ARCH_IA32 |
1319 #define STOS "stosl" | 1319 #define STOS "stosl" |
1320 #elif V8_HOST_ARCH_X64 | 1320 #elif V8_HOST_ARCH_X64 |
| 1321 #if V8_HOST_ARCH_32_BIT |
| 1322 #define STOS "addr32 stosl" |
| 1323 #else |
1321 #define STOS "stosq" | 1324 #define STOS "stosq" |
1322 #endif | 1325 #endif |
| 1326 #endif |
1323 #if defined(__native_client__) | 1327 #if defined(__native_client__) |
1324 // This STOS sequence does not validate for x86_64 Native Client. | 1328 // This STOS sequence does not validate for x86_64 Native Client. |
1325 // Here we #undef STOS to force use of the slower C version. | 1329 // Here we #undef STOS to force use of the slower C version. |
1326 // TODO(bradchen): Profile V8 and implement a faster REP STOS | 1330 // TODO(bradchen): Profile V8 and implement a faster REP STOS |
1327 // here if the profile indicates it matters. | 1331 // here if the profile indicates it matters. |
1328 #undef STOS | 1332 #undef STOS |
1329 #endif | 1333 #endif |
1330 | 1334 |
1331 #if defined(MEMORY_SANITIZER) | 1335 #if defined(MEMORY_SANITIZER) |
1332 // MemorySanitizer does not understand inline assembly. | 1336 // MemorySanitizer does not understand inline assembly. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 // Add formatted contents like printf based on a va_list. | 1578 // Add formatted contents like printf based on a va_list. |
1575 void AddFormattedList(const char* format, va_list list); | 1579 void AddFormattedList(const char* format, va_list list); |
1576 private: | 1580 private: |
1577 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); | 1581 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); |
1578 }; | 1582 }; |
1579 | 1583 |
1580 | 1584 |
1581 } } // namespace v8::internal | 1585 } } // namespace v8::internal |
1582 | 1586 |
1583 #endif // V8_UTILS_H_ | 1587 #endif // V8_UTILS_H_ |
OLD | NEW |