summaryrefslogtreecommitdiff
path: root/deps/v8/src/x64/register-allocator-x64.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/x64/register-allocator-x64.cc')
-rw-r--r--deps/v8/src/x64/register-allocator-x64.cc30
1 files changed, 12 insertions, 18 deletions
diff --git a/deps/v8/src/x64/register-allocator-x64.cc b/deps/v8/src/x64/register-allocator-x64.cc
index 3aba60fb2d..deb2318564 100644
--- a/deps/v8/src/x64/register-allocator-x64.cc
+++ b/deps/v8/src/x64/register-allocator-x64.cc
@@ -39,19 +39,11 @@ namespace internal {
void Result::ToRegister() {
ASSERT(is_valid());
if (is_constant()) {
- // TODO(X64): Handle constant results.
- /*
Result fresh = CodeGeneratorScope::Current()->allocator()->Allocate();
ASSERT(fresh.is_valid());
- if (CodeGeneratorScope::Current()->IsUnsafeSmi(handle())) {
- CodeGeneratorScope::Current()->LoadUnsafeSmi(fresh.reg(), handle());
- } else {
- CodeGeneratorScope::Current()->masm()->Set(fresh.reg(),
- Immediate(handle()));
- }
+ CodeGeneratorScope::Current()->masm()->Move(fresh.reg(), handle());
// This result becomes a copy of the fresh one.
*this = fresh;
- */
}
ASSERT(is_register());
}
@@ -66,15 +58,7 @@ void Result::ToRegister(Register target) {
CodeGeneratorScope::Current()->masm()->movq(fresh.reg(), reg());
} else {
ASSERT(is_constant());
- /*
- TODO(X64): Handle constant results.
- if (CodeGeneratorScope::Current()->IsUnsafeSmi(handle())) {
- CodeGeneratorScope::Current()->LoadUnsafeSmi(fresh.reg(), handle());
- } else {
- CodeGeneratorScope::Current()->masm()->Set(fresh.reg(),
- Immediate(handle()));
- }
- */
+ CodeGeneratorScope::Current()->masm()->Move(fresh.reg(), handle());
}
*this = fresh;
} else if (is_register() && reg().is(target)) {
@@ -87,4 +71,14 @@ void Result::ToRegister(Register target) {
}
+// -------------------------------------------------------------------------
+// RegisterAllocator implementation.
+
+Result RegisterAllocator::AllocateByteRegisterWithoutSpilling() {
+ // This function is not used in 64-bit code.
+ UNREACHABLE();
+ return Result();
+}
+
+
} } // namespace v8::internal