| Index: runtime/platform/utils_win.h
|
| diff --git a/runtime/platform/utils_win.h b/runtime/platform/utils_win.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..adb98ba6b4ca07bbb32a2e84aadae507f671bd76
|
| --- /dev/null
|
| +++ b/runtime/platform/utils_win.h
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// 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 PLATFORM_UTILS_WIN_H_
|
| +#define PLATFORM_UTILS_WIN_H_
|
| +
|
| +#include <intrin.h>
|
| +
|
| +namespace dart {
|
| +
|
| +inline int Utils::CountTrailingZeros(uint32_t x) {
|
| + unsigned long result; // NOLINT
|
| + _BitScanReverse(&result, x);
|
| + return reinterpret_cast<int>(result);
|
| +};
|
| +
|
| +inline int Utils::CountTrailingZeros(uint64_t x) {
|
| + unsigned long result; // NOLINT
|
| + _BitScanReverse64(&result, x);
|
| + return reinterpret_cast<int>(result);
|
| +};
|
| +
|
| +} // namespace dart
|
| +
|
| +#endif // PLATFORM_UTILS_WIN_H_
|
|
|