Index: src/x64/assembler-x64.h |
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h |
index ad4721d6ad55c428f703a905cc636a5d6f5a9a16..db58fc355c2d31e73a66d10371823e76ecc9c5a1 100644 |
--- a/src/x64/assembler-x64.h |
+++ b/src/x64/assembler-x64.h |
@@ -44,15 +44,25 @@ namespace internal { |
// Test whether a 64-bit value is in a specific range. |
static inline bool is_uint32(int64_t x) { |
- const int64_t kUInt32Mask = V8_INT64_C(0xffffffff); |
+ static const int64_t kUInt32Mask = V8_INT64_C(0xffffffff); |
return x == (x & kUInt32Mask); |
} |
static inline bool is_int32(int64_t x) { |
- const int64_t kMinIntValue = V8_INT64_C(-0x80000000); |
+ static const int64_t kMinIntValue = V8_INT64_C(-0x80000000); |
return is_uint32(x - kMinIntValue); |
} |
+static inline bool is_int32(uint64_t x) { |
William Hesse
2009/08/03 09:03:28
I can forsee a bug happening because of this funct
Lasse Reichstein
2009/08/03 10:45:45
I'm not sure we shouldn't find a better way to bit
|
+ static const uint64_t kMaxIntValue = V8_UINT64_C(0x80000000); |
+ return x < kMaxIntValue; |
+} |
+ |
+static inline bool is_uint32(uint64_t x) { |
+ static const uint64_t kMaxUIntValue = V8_UINT64_C(0x100000000); |
+ return x < kMaxUIntValue; |
+} |
+ |
// CPU Registers. |
// |
// 1) We would prefer to use an enum, but enum values are assignment- |