Index: src/x64/assembler-x64.h |
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h |
index 92d63d2e7ccfdde1c34d295e321ce3323aa67f03..9009e4ff59dcbe5a7b9584212ed6d71493014d9c 100644 |
--- a/src/x64/assembler-x64.h |
+++ b/src/x64/assembler-x64.h |
@@ -357,6 +357,10 @@ inline Condition ReverseCondition(Condition cc) { |
class Immediate BASE_EMBEDDED { |
public: |
explicit Immediate(int32_t value) : value_(value) {} |
+ explicit Immediate(Smi* value) { |
+ ASSERT(SmiValuesAre31Bits()); // Only available for 31-bit SMI. |
+ value_ = static_cast<int32_t>(reinterpret_cast<intptr_t>(value)); |
+ } |
private: |
int32_t value_; |