X64: Fix bug that reads from rax instead of correct register.

Crashes if rax doesn't point to readable memory.
Recent change made rax contain garbage due to write-barrier computation.
(The fact that it hasn't crashed before highly suggests that the line does nothing.)

Review URL: http://codereview.chromium.org/545117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3644 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
lrn@chromium.org 2010-01-19 12:27:04 +00:00
parent ca564dcd54
commit 712d108ebf

View File

@ -2418,7 +2418,7 @@ void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
// Move up the chain of contexts to the context containing the slot.
movq(dst, Operand(rsi, Context::SlotOffset(Context::CLOSURE_INDEX)));
// Load the function context (which is the incoming, outer context).
movq(rax, FieldOperand(rax, JSFunction::kContextOffset));
movq(dst, FieldOperand(dst, JSFunction::kContextOffset));
for (int i = 1; i < context_chain_length; i++) {
movq(dst, Operand(dst, Context::SlotOffset(Context::CLOSURE_INDEX)));
movq(dst, FieldOperand(dst, JSFunction::kContextOffset));