From: whesse@chromium.org Date: Tue, 29 Mar 2011 10:48:28 +0000 (+0000) Subject: Fix x64 compilation error due to some dead code, by deleting the dead code. X-Git-Tag: upstream/4.7.83~19779 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea7190657ed94541e4e272494a78651d7c2eb7a9;p=platform%2Fupstream%2Fv8.git Fix x64 compilation error due to some dead code, by deleting the dead code. BUG=1286 TEST=compile V8 with gcc-4.4.x. Review URL: http://codereview.chromium.org/6771007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc index 6f34cf7..8c338fe 100644 --- a/src/x64/codegen-x64.cc +++ b/src/x64/codegen-x64.cc @@ -8207,17 +8207,9 @@ Result CodeGenerator::EmitNamedLoad(Handle name, bool is_contextual) { result = allocator()->Allocate(); ASSERT(result.is_valid()); - // Cannot use r12 for receiver, because that changes - // the distance between a call and a fixup location, - // due to a special encoding of r12 as r/m in a ModR/M byte. - if (receiver.reg().is(r12)) { - frame()->Spill(receiver.reg()); // It will be overwritten with result. - // Swap receiver and value. - __ movq(result.reg(), receiver.reg()); - Result temp = receiver; - receiver = result; - result = temp; - } + // r12 is now a reserved register, so it cannot be the receiver. + // If it was, the distance to the fixup location would not be constant. + ASSERT(!receiver.reg().is(r12)); DeferredReferenceGetNamedValue* deferred = new DeferredReferenceGetNamedValue(result.reg(), receiver.reg(), name);