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

Side by Side Diff: src/platform.h

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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 va_list args); 240 va_list args);
241 241
242 static char* StrChr(char* str, int c); 242 static char* StrChr(char* str, int c);
243 static void StrNCpy(Vector<char> dest, const char* src, size_t n); 243 static void StrNCpy(Vector<char> dest, const char* src, size_t n);
244 244
245 // Support for profiler. Can do nothing, in which case ticks 245 // Support for profiler. Can do nothing, in which case ticks
246 // occuring in shared libraries will not be properly accounted 246 // occuring in shared libraries will not be properly accounted
247 // for. 247 // for.
248 static void LogSharedLibraryAddresses(); 248 static void LogSharedLibraryAddresses();
249 249
250 // The return value indicates the CPU features we are sure of because of the
251 // OS. For example MacOSX doesn't run on any x86 CPUs that don't have SSE2
252 // instructions.
253 // This is a little messy because the interpretation is subject to the cross
254 // of the CPU and the OS. The bits in the answer correspond to the bit
255 // positions indicated by the members of the CpuFeature enum from globals.h
256 static uint64_t CpuFeaturesImpliedByPlatform();
257
250 // Returns the double constant NAN 258 // Returns the double constant NAN
251 static double nan_value(); 259 static double nan_value();
252 260
253 // Support runtime detection of VFP3 on ARM CPUs. 261 // Support runtime detection of VFP3 on ARM CPUs.
254 enum CpuFeature { VFP };
255 static bool ArmCpuHasFeature(CpuFeature feature); 262 static bool ArmCpuHasFeature(CpuFeature feature);
256 263
257 // Returns the activation frame alignment constraint or zero if 264 // Returns the activation frame alignment constraint or zero if
258 // the platform doesn't care. Guaranteed to be a power of two. 265 // the platform doesn't care. Guaranteed to be a power of two.
259 static int ActivationFrameAlignment(); 266 static int ActivationFrameAlignment();
260 267
261 private: 268 private:
262 static const int msPerSecond = 1000; 269 static const int msPerSecond = 1000;
263 270
264 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); 271 DISALLOW_IMPLICIT_CONSTRUCTORS(OS);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 bool active_; 547 bool active_;
541 PlatformData* data_; // Platform specific data. 548 PlatformData* data_; // Platform specific data.
542 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler); 549 DISALLOW_IMPLICIT_CONSTRUCTORS(Sampler);
543 }; 550 };
544 551
545 #endif // ENABLE_LOGGING_AND_PROFILING 552 #endif // ENABLE_LOGGING_AND_PROFILING
546 553
547 } } // namespace v8::internal 554 } } // namespace v8::internal
548 555
549 #endif // V8_PLATFORM_H_ 556 #endif // V8_PLATFORM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698