Index: src/base/bits.h |
diff --git a/src/base/bits.h b/src/base/bits.h |
index da12ee60fefdad46a6d04cc43199a40bf1009d83..b1864940b865c83ba824025452884c08723a7a78 100644 |
--- a/src/base/bits.h |
+++ b/src/base/bits.h |
@@ -6,6 +6,8 @@ |
#define V8_BASE_BITS_H_ |
#include <stdint.h> |
+ |
+#include "src/base/base-export.h" |
#include "src/base/macros.h" |
#if V8_CC_MSVC |
#include <intrin.h> |
@@ -172,8 +174,7 @@ |
// power of two, it is returned as is. |value| must be less than or equal to |
// 0x80000000u. Implementation is from "Hacker's Delight" by Henry S. Warren, |
// Jr., figure 3-3, page 48, where the function is called clp2. |
-uint32_t RoundUpToPowerOfTwo32(uint32_t value); |
- |
+V8_BASE_EXPORT uint32_t RoundUpToPowerOfTwo32(uint32_t value); |
// RoundDownToPowerOfTwo32(value) returns the greatest power of two which is |
// less than or equal to |value|. If you pass in a |value| that is already a |
@@ -241,7 +242,7 @@ |
// SignedMulOverflow32(lhs,rhs,val) performs a signed multiplication of |lhs| |
// and |rhs| and stores the result into the variable pointed to by |val| and |
// returns true if the signed multiplication resulted in an overflow. |
-bool SignedMulOverflow32(int32_t lhs, int32_t rhs, int32_t* val); |
+V8_BASE_EXPORT bool SignedMulOverflow32(int32_t lhs, int32_t rhs, int32_t* val); |
// SignedAddOverflow64(lhs,rhs,val) performs a signed summation of |lhs| and |
// |rhs| and stores the result into the variable pointed to by |val| and |
@@ -265,31 +266,28 @@ |
// SignedMulOverflow64(lhs,rhs,val) performs a signed multiplication of |lhs| |
// and |rhs| and stores the result into the variable pointed to by |val| and |
// returns true if the signed multiplication resulted in an overflow. |
-bool SignedMulOverflow64(int64_t lhs, int64_t rhs, int64_t* val); |
+V8_BASE_EXPORT bool SignedMulOverflow64(int64_t lhs, int64_t rhs, int64_t* val); |
// SignedMulHigh32(lhs, rhs) multiplies two signed 32-bit values |lhs| and |
// |rhs|, extracts the most significant 32 bits of the result, and returns |
// those. |
-int32_t SignedMulHigh32(int32_t lhs, int32_t rhs); |
- |
+V8_BASE_EXPORT int32_t SignedMulHigh32(int32_t lhs, int32_t rhs); |
// SignedMulHighAndAdd32(lhs, rhs, acc) multiplies two signed 32-bit values |
// |lhs| and |rhs|, extracts the most significant 32 bits of the result, and |
// adds the accumulate value |acc|. |
-int32_t SignedMulHighAndAdd32(int32_t lhs, int32_t rhs, int32_t acc); |
- |
+V8_BASE_EXPORT int32_t SignedMulHighAndAdd32(int32_t lhs, int32_t rhs, |
+ int32_t acc); |
// SignedDiv32(lhs, rhs) divides |lhs| by |rhs| and returns the quotient |
// truncated to int32. If |rhs| is zero, then zero is returned. If |lhs| |
// is minint and |rhs| is -1, it returns minint. |
-int32_t SignedDiv32(int32_t lhs, int32_t rhs); |
- |
+V8_BASE_EXPORT int32_t SignedDiv32(int32_t lhs, int32_t rhs); |
// SignedMod32(lhs, rhs) divides |lhs| by |rhs| and returns the remainder |
// truncated to int32. If either |rhs| is zero or |lhs| is minint and |rhs| |
// is -1, it returns zero. |
-int32_t SignedMod32(int32_t lhs, int32_t rhs); |
- |
+V8_BASE_EXPORT int32_t SignedMod32(int32_t lhs, int32_t rhs); |
// UnsignedAddOverflow32(lhs,rhs,val) performs an unsigned summation of |lhs| |
// and |rhs| and stores the result into the variable pointed to by |val| and |
@@ -319,18 +317,16 @@ |
// Clamp |value| on overflow and underflow conditions. |
-int64_t FromCheckedNumeric(const internal::CheckedNumeric<int64_t> value); |
- |
+V8_BASE_EXPORT int64_t |
+FromCheckedNumeric(const internal::CheckedNumeric<int64_t> value); |
// SignedSaturatedAdd64(lhs, rhs) adds |lhs| and |rhs|, |
// checks and returns the result. |
-int64_t SignedSaturatedAdd64(int64_t lhs, int64_t rhs); |
- |
+V8_BASE_EXPORT int64_t SignedSaturatedAdd64(int64_t lhs, int64_t rhs); |
// SignedSaturatedSub64(lhs, rhs) substracts |lhs| by |rhs|, |
// checks and returns the result. |
-int64_t SignedSaturatedSub64(int64_t lhs, int64_t rhs); |
- |
+V8_BASE_EXPORT int64_t SignedSaturatedSub64(int64_t lhs, int64_t rhs); |
} // namespace bits |
} // namespace base |