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 // Platform-specific code for POSIX goes here. This is not a platform on its | 5 // Platform-specific code for POSIX goes here. This is not a platform on its |
6 // own, but contains the parts which are the same across the POSIX platforms | 6 // own, but contains the parts which are the same across the POSIX platforms |
7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. | 7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. |
8 | 8 |
9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
10 #include <errno.h> | 10 #include <errno.h> |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 } | 283 } |
284 | 284 |
285 | 285 |
286 void OS::DebugBreak() { | 286 void OS::DebugBreak() { |
287 #if V8_HOST_ARCH_ARM | 287 #if V8_HOST_ARCH_ARM |
288 asm("bkpt 0"); | 288 asm("bkpt 0"); |
289 #elif V8_HOST_ARCH_ARM64 | 289 #elif V8_HOST_ARCH_ARM64 |
290 asm("brk 0"); | 290 asm("brk 0"); |
291 #elif V8_HOST_ARCH_MIPS | 291 #elif V8_HOST_ARCH_MIPS |
292 asm("break"); | 292 asm("break"); |
| 293 #elif V8_HOST_ARCH_MIPS64 |
| 294 asm("break"); |
293 #elif V8_HOST_ARCH_IA32 | 295 #elif V8_HOST_ARCH_IA32 |
294 #if defined(__native_client__) | 296 #if defined(__native_client__) |
295 asm("hlt"); | 297 asm("hlt"); |
296 #else | 298 #else |
297 asm("int $3"); | 299 asm("int $3"); |
298 #endif // __native_client__ | 300 #endif // __native_client__ |
299 #elif V8_HOST_ARCH_X64 | 301 #elif V8_HOST_ARCH_X64 |
300 asm("int $3"); | 302 asm("int $3"); |
301 #else | 303 #else |
302 #error Unsupported host architecture. | 304 #error Unsupported host architecture. |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 | 728 |
727 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 729 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
728 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); | 730 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); |
729 int result = pthread_setspecific(pthread_key, value); | 731 int result = pthread_setspecific(pthread_key, value); |
730 ASSERT_EQ(0, result); | 732 ASSERT_EQ(0, result); |
731 USE(result); | 733 USE(result); |
732 } | 734 } |
733 | 735 |
734 | 736 |
735 } } // namespace v8::base | 737 } } // namespace v8::base |
OLD | NEW |