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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 1812463002: MIPS: Fix context loading in CheckAccessGlobalProxy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | 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 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 503
504 // ----------------------------------------------------------------------------- 504 // -----------------------------------------------------------------------------
505 // Allocation support. 505 // Allocation support.
506 506
507 507
508 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, 508 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
509 Register scratch, 509 Register scratch,
510 Label* miss) { 510 Label* miss) {
511 Label same_contexts; 511 Label same_contexts;
512 Register temporary = t8;
512 513
513 DCHECK(!holder_reg.is(scratch)); 514 DCHECK(!holder_reg.is(scratch));
514 DCHECK(!holder_reg.is(at)); 515 DCHECK(!holder_reg.is(at));
515 DCHECK(!scratch.is(at)); 516 DCHECK(!scratch.is(at));
516 517
517 // Load current lexical context from the active StandardFrame, which 518 // Load current lexical context from the active StandardFrame, which
518 // may require crawling past STUB frames. 519 // may require crawling past STUB frames.
519 Label load_context; 520 Label load_context;
520 Label has_context; 521 Label has_context;
521 mov(at, fp); 522 mov(at, fp);
522 bind(&load_context); 523 bind(&load_context);
523 lw(scratch, MemOperand(at, CommonFrameConstants::kContextOrFrameTypeOffset)); 524 lw(scratch, MemOperand(at, CommonFrameConstants::kContextOrFrameTypeOffset));
524 JumpIfNotSmi(scratch, &has_context); 525 // Passing temporary register, otherwise JumpIfNotSmi modifies register at.
526 JumpIfNotSmi(scratch, &has_context, temporary);
525 lw(at, MemOperand(at, CommonFrameConstants::kCallerFPOffset)); 527 lw(at, MemOperand(at, CommonFrameConstants::kCallerFPOffset));
526 b(&load_context); 528 Branch(&load_context);
527 bind(&has_context); 529 bind(&has_context);
528 530
529 // In debug mode, make sure the lexical context is set. 531 // In debug mode, make sure the lexical context is set.
530 #ifdef DEBUG 532 #ifdef DEBUG
531 Check(ne, kWeShouldNotHaveAnEmptyLexicalContext, 533 Check(ne, kWeShouldNotHaveAnEmptyLexicalContext,
532 scratch, Operand(zero_reg)); 534 scratch, Operand(zero_reg));
533 #endif 535 #endif
534 536
535 // Load the native context of the current context. 537 // Load the native context of the current context.
536 lw(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX)); 538 lw(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX));
(...skipping 5484 matching lines...) Expand 10 before | Expand all | Expand 10 after
6021 if (mag.shift > 0) sra(result, result, mag.shift); 6023 if (mag.shift > 0) sra(result, result, mag.shift);
6022 srl(at, dividend, 31); 6024 srl(at, dividend, 31);
6023 Addu(result, result, Operand(at)); 6025 Addu(result, result, Operand(at));
6024 } 6026 }
6025 6027
6026 6028
6027 } // namespace internal 6029 } // namespace internal
6028 } // namespace v8 6030 } // namespace v8
6029 6031
6030 #endif // V8_TARGET_ARCH_MIPS 6032 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698