| Index: src/platform-tls-mac.h
|
| diff --git a/src/platform-tls-mac.h b/src/platform-tls-mac.h
|
| index 728524e80bdcfed8afae67bc4717d070ad52100e..86a3347d0f710825808a231031a4f81851b15ffa 100644
|
| --- a/src/platform-tls-mac.h
|
| +++ b/src/platform-tls-mac.h
|
| @@ -37,20 +37,20 @@ namespace internal {
|
|
|
| #define V8_FAST_TLS_SUPPORTED 1
|
|
|
| -extern intptr_t kMacTlsBaseOffset;
|
| -
|
| INLINE(intptr_t InternalGetExistingThreadLocal(intptr_t index));
|
|
|
| inline intptr_t InternalGetExistingThreadLocal(intptr_t index) {
|
| + // The constants below are taken from pthreads.s from the XNU kernel
|
| + // sources archive at www.opensource.apple.com.
|
| intptr_t result;
|
| #if defined(V8_HOST_ARCH_IA32)
|
| - asm("movl %%gs:(%1,%2,4), %0;"
|
| + asm("movl %%gs:0x48(,%1,4), %0;"
|
| :"=r"(result) // Output must be a writable register.
|
| - :"r"(kMacTlsBaseOffset), "r"(index));
|
| + :"0"(index)); // Input is the same as output.
|
| #else
|
| - asm("movq %%gs:(%1,%2,8), %0;"
|
| + asm("movq %%gs:0x60(,%1,8), %0;"
|
| :"=r"(result)
|
| - :"r"(kMacTlsBaseOffset), "r"(index));
|
| + :"0"(index));
|
| #endif
|
| return result;
|
| }
|
|
|