Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 5e6dd3d200d3b47005c9636c03643bec901050a0..ef3d30d46d3739be49a8bf29003eba68046658a7 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -29,6 +29,7 @@ |
#include "bootstrapper.h" |
#include "codegen-inl.h" |
+#include "macro-assembler-x64.h" |
namespace v8 { |
namespace internal { |
@@ -45,4 +46,28 @@ void MacroAssembler::TailCallRuntime(ExternalReference const& a, int b) { |
UNIMPLEMENTED(); |
} |
+ |
+void MacroAssembler::Set(Register dst, int64_t x) { |
+ if (is_int32(x)) { |
+ movq(dst, Immediate(x)); |
+ } else if (is_uint32(x)) { |
+ movl(dst, Immediate(x)); |
+ } else { |
+ movq(dst, x, RelocInfo::NONE); |
William Hesse
2009/06/02 13:21:58
Let's put a warning here, at least until we see if
|
+ } |
+} |
+ |
+ |
+void MacroAssembler::Set(Operand& dst, int64_t x) { |
+ if (is_int32(x)) { |
+ movq(kScratchRegister, Immediate(x)); |
+ } else if (is_uint32(x)) { |
+ movl(kScratchRegister, Immediate(x)); |
+ } else { |
+ movq(kScratchRegister, x, RelocInfo::NONE); |
+ } |
+ movq(dst, kScratchRegister); |
+} |
+ |
+ |
} } // namespace v8::internal |