Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: src/mips64/code-stubs-mips64.cc

Issue 1254153002: MIPS64: Fix LoadGlobalViaContextStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5292 matching lines...) Expand 10 before | Expand all | Expand 10 after
5303 5303
5304 void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) { 5304 void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
5305 Register context_reg = cp; 5305 Register context_reg = cp;
5306 Register slot_reg = a2; 5306 Register slot_reg = a2;
5307 Register name_reg = a3; 5307 Register name_reg = a3;
5308 Register result_reg = v0; 5308 Register result_reg = v0;
5309 Label slow_case; 5309 Label slow_case;
5310 5310
5311 // Go up context chain to the script context. 5311 // Go up context chain to the script context.
5312 for (int i = 0; i < depth(); ++i) { 5312 for (int i = 0; i < depth(); ++i) {
5313 __ lw(result_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX)); 5313 __ ld(result_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX));
5314 context_reg = result_reg; 5314 context_reg = result_reg;
5315 } 5315 }
5316 5316
5317 // Load the PropertyCell value at the specified slot. 5317 // Load the PropertyCell value at the specified slot.
5318 __ dsll(at, slot_reg, kPointerSizeLog2); 5318 __ dsll(at, slot_reg, kPointerSizeLog2);
5319 __ Daddu(at, at, Operand(context_reg)); 5319 __ Daddu(at, at, Operand(context_reg));
5320 __ Daddu(at, at, Context::SlotOffset(0)); 5320 __ Daddu(at, at, Context::SlotOffset(0));
5321 __ ld(result_reg, MemOperand(at)); 5321 __ ld(result_reg, MemOperand(at));
5322 __ ld(result_reg, FieldMemOperand(result_reg, PropertyCell::kValueOffset)); 5322 __ ld(result_reg, FieldMemOperand(result_reg, PropertyCell::kValueOffset));
5323 5323
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
5751 MemOperand(fp, 6 * kPointerSize), NULL); 5751 MemOperand(fp, 6 * kPointerSize), NULL);
5752 } 5752 }
5753 5753
5754 5754
5755 #undef __ 5755 #undef __
5756 5756
5757 } // namespace internal 5757 } // namespace internal
5758 } // namespace v8 5758 } // namespace v8
5759 5759
5760 #endif // V8_TARGET_ARCH_MIPS64 5760 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698