Index: runtime/platform/utils_linux.h |
diff --git a/runtime/vm/cpu.h b/runtime/platform/utils_linux.h |
similarity index 50% |
copy from runtime/vm/cpu.h |
copy to runtime/platform/utils_linux.h |
index c8f5e9c034817c45c03482b163e1b9b93732b2e6..68316823ee769b5f27dcebf112ca82c3403e7c6b 100644 |
--- a/runtime/vm/cpu.h |
+++ b/runtime/platform/utils_linux.h |
@@ -2,24 +2,19 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-#ifndef VM_CPU_H_ |
-#define VM_CPU_H_ |
- |
-#include "vm/allocation.h" |
+#ifndef PLATFORM_UTILS_LINUX_H_ |
+#define PLATFORM_UTILS_LINUX_H_ |
namespace dart { |
-// Forward Declarations. |
-class Error; |
-class Instance; |
- |
+inline int Utils::CountTrailingZeros(uint32_t x) { |
+ return __builtin_ctzl(x); |
+}; |
-class CPU : public AllStatic { |
- public: |
- static void FlushICache(uword start, uword size); |
- static const char* Id(); |
+inline int Utils::CountTrailingZeros(uint64_t x) { |
+ return __builtin_ctzll(x); |
}; |
} // namespace dart |
-#endif // VM_CPU_H_ |
+#endif // PLATFORM_UTILS_LINUX_H_ |