28 #ifndef V8_PLATFORM_TLS_WIN32_H_
29 #define V8_PLATFORM_TLS_WIN32_H_
38 #if defined(_WIN32) && !defined(_WIN64)
40 #define V8_FAST_TLS_SUPPORTED 1
42 inline intptr_t InternalGetExistingThreadLocal(intptr_t index) {
43 const intptr_t kTibInlineTlsOffset = 0xE10;
44 const intptr_t kTibExtraTlsOffset = 0xF94;
45 const intptr_t kMaxInlineSlots = 64;
46 const intptr_t kMaxSlots = kMaxInlineSlots + 1024;
47 ASSERT(0 <= index && index < kMaxSlots);
48 if (index < kMaxInlineSlots) {
49 return static_cast<intptr_t
>(__readfsdword(kTibInlineTlsOffset +
52 intptr_t extra =
static_cast<intptr_t
>(__readfsdword(kTibExtraTlsOffset));
54 return *
reinterpret_cast<intptr_t*
>(extra +
62 #endif // V8_PLATFORM_TLS_WIN32_H_
#define ASSERT(condition)