Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: src/platform-posix.cc

Issue 275253004: Require CMOV support for the ia32 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: restore uses of cmov Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform.h ('k') | src/v8globals.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <pthread.h> 10 #include <pthread.h>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "platform.h" 47 #include "platform.h"
48 48
49 namespace v8 { 49 namespace v8 {
50 namespace internal { 50 namespace internal {
51 51
52 // 0 is never a valid thread id. 52 // 0 is never a valid thread id.
53 static const pthread_t kNoThread = (pthread_t) 0; 53 static const pthread_t kNoThread = (pthread_t) 0;
54 54
55 55
56 uint64_t OS::CpuFeaturesImpliedByPlatform() { 56 uint64_t OS::CpuFeaturesImpliedByPlatform() {
57 #if V8_OS_MACOSX 57 return 0; // Nothing special.
58 // Mac OS X requires CMOV to install so we can assume it is present.
59 // These constants are defined by the CPUid instructions.
60 const uint64_t one = 1;
61 return one << CMOV;
62 #else
63 return 0; // Nothing special about the other systems.
64 #endif
65 } 58 }
66 59
67 60
68 // Maximum size of the virtual memory. 0 means there is no artificial 61 // Maximum size of the virtual memory. 0 means there is no artificial
69 // limit. 62 // limit.
70 63
71 intptr_t OS::MaxVirtualMemory() { 64 intptr_t OS::MaxVirtualMemory() {
72 struct rlimit limit; 65 struct rlimit limit;
73 int result = getrlimit(RLIMIT_DATA, &limit); 66 int result = getrlimit(RLIMIT_DATA, &limit);
74 if (result != 0) return 0; 67 if (result != 0) return 0;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 752
760 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 753 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
761 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 754 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
762 int result = pthread_setspecific(pthread_key, value); 755 int result = pthread_setspecific(pthread_key, value);
763 ASSERT_EQ(0, result); 756 ASSERT_EQ(0, result);
764 USE(result); 757 USE(result);
765 } 758 }
766 759
767 760
768 } } // namespace v8::internal 761 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698