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

Unified Diff: runtime/vm/assembler_x64.h

Issue 10990028: Add code for CPU feature detection and use it to detect SSE3 and SSE 4.1. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: simplified, because there is no code in snapshots Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_x64.h
===================================================================
--- runtime/vm/assembler_x64.h (revision 12828)
+++ runtime/vm/assembler_x64.h (working copy)
@@ -272,6 +272,22 @@
};
+class CPUFeatures : public AllStatic {
+ public:
+ static void InitOnce();
+ static bool sse3_supported();
+ static bool sse4_1_supported();
+
+ private:
+ static const uint64_t kSSE3BitMask = static_cast<uint64_t>(1) << 32;
+ static const uint64_t kSSE4_1BitMask = static_cast<uint64_t>(1) << 51;
+
+ static bool sse3_supported_;
+ static bool sse4_1_supported_;
+ static bool initialized_;
srdjan 2012/09/25 17:12:25 in #ifdef DEBUG as on ia32?
Florian Schneider 2012/09/26 09:03:16 Done.
+};
+
+
class Assembler : public ValueObject {
public:
Assembler() : buffer_(), prolog_offset_(-1), comments_() { }
@@ -497,6 +513,8 @@
cmpxchgq(address, reg);
}
+ void cpuid();
+
// Issue memory to memory move through a TMP register.
void MoveMemoryToMemory(const Address& dst, const Address& src) {
movq(TMP, src);

Powered by Google App Engine
This is Rietveld 408576698