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

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

Issue 391051: Allow a platform to indicate that some CPU features are always... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 #endif 237 #endif
238 if (code_ptr == NULL) continue; 238 if (code_ptr == NULL) continue;
239 const uintptr_t slide = _dyld_get_image_vmaddr_slide(i); 239 const uintptr_t slide = _dyld_get_image_vmaddr_slide(i);
240 const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide; 240 const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide;
241 LOG(SharedLibraryEvent(_dyld_get_image_name(i), start, start + size)); 241 LOG(SharedLibraryEvent(_dyld_get_image_name(i), start, start + size));
242 } 242 }
243 #endif // ENABLE_LOGGING_AND_PROFILING 243 #endif // ENABLE_LOGGING_AND_PROFILING
244 } 244 }
245 245
246 246
247 uint64_t OS::CpuFeaturesImpliedByPlatform() {
248 // MacOSX requires all these to install so we can assume they are present.
249 // These constants are defined by the CPUid instructions.
250 const uint64_t one = 1;
251 return (one << SSE2) | (one << CMOV) | (one << RDTSC) | (one << CPUID);
252 }
253
254
247 double OS::nan_value() { 255 double OS::nan_value() {
248 return NAN; 256 return NAN;
249 } 257 }
250 258
251 259
252 int OS::ActivationFrameAlignment() { 260 int OS::ActivationFrameAlignment() {
253 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI 261 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI
254 // Function Call Guide". 262 // Function Call Guide".
255 return 16; 263 return 16;
256 } 264 }
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 639
632 // Deallocate Mach port for thread. 640 // Deallocate Mach port for thread.
633 if (IsProfiling()) { 641 if (IsProfiling()) {
634 mach_port_deallocate(data_->task_self_, data_->profiled_thread_); 642 mach_port_deallocate(data_->task_self_, data_->profiled_thread_);
635 } 643 }
636 } 644 }
637 645
638 #endif // ENABLE_LOGGING_AND_PROFILING 646 #endif // ENABLE_LOGGING_AND_PROFILING
639 647
640 } } // namespace v8::internal 648 } } // namespace v8::internal
OLDNEW
« src/arm/assembler-arm.h ('K') | « src/platform-linux.cc ('k') | src/platform-nullos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698