| OLD | NEW |
| 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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 | 506 |
| 507 // ----------------------------------------------------------------------------- | 507 // ----------------------------------------------------------------------------- |
| 508 // Allocation support. | 508 // Allocation support. |
| 509 | 509 |
| 510 | 510 |
| 511 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, | 511 void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, |
| 512 Register scratch, | 512 Register scratch, |
| 513 Label* miss) { | 513 Label* miss) { |
| 514 Label same_contexts; | 514 Label same_contexts; |
| 515 Register temporary = t8; |
| 515 | 516 |
| 516 DCHECK(!holder_reg.is(scratch)); | 517 DCHECK(!holder_reg.is(scratch)); |
| 517 DCHECK(!holder_reg.is(at)); | 518 DCHECK(!holder_reg.is(at)); |
| 518 DCHECK(!scratch.is(at)); | 519 DCHECK(!scratch.is(at)); |
| 519 | 520 |
| 520 // Load current lexical context from the active StandardFrame, which | 521 // Load current lexical context from the active StandardFrame, which |
| 521 // may require crawling past STUB frames. | 522 // may require crawling past STUB frames. |
| 522 Label load_context; | 523 Label load_context; |
| 523 Label has_context; | 524 Label has_context; |
| 524 mov(at, fp); | 525 mov(at, fp); |
| 525 bind(&load_context); | 526 bind(&load_context); |
| 526 ld(scratch, MemOperand(at, CommonFrameConstants::kContextOrFrameTypeOffset)); | 527 ld(scratch, MemOperand(at, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 527 JumpIfNotSmi(scratch, &has_context); | 528 // Passing temporary register, otherwise JumpIfNotSmi modifies register at. |
| 529 JumpIfNotSmi(scratch, &has_context, temporary); |
| 528 ld(at, MemOperand(at, CommonFrameConstants::kCallerFPOffset)); | 530 ld(at, MemOperand(at, CommonFrameConstants::kCallerFPOffset)); |
| 529 b(&load_context); | 531 Branch(&load_context); |
| 530 bind(&has_context); | 532 bind(&has_context); |
| 531 | 533 |
| 532 // In debug mode, make sure the lexical context is set. | 534 // In debug mode, make sure the lexical context is set. |
| 533 #ifdef DEBUG | 535 #ifdef DEBUG |
| 534 Check(ne, kWeShouldNotHaveAnEmptyLexicalContext, | 536 Check(ne, kWeShouldNotHaveAnEmptyLexicalContext, |
| 535 scratch, Operand(zero_reg)); | 537 scratch, Operand(zero_reg)); |
| 536 #endif | 538 #endif |
| 537 | 539 |
| 538 // Load the native context of the current context. | 540 // Load the native context of the current context. |
| 539 ld(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX)); | 541 ld(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX)); |
| (...skipping 6152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6692 if (mag.shift > 0) sra(result, result, mag.shift); | 6694 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6693 srl(at, dividend, 31); | 6695 srl(at, dividend, 31); |
| 6694 Addu(result, result, Operand(at)); | 6696 Addu(result, result, Operand(at)); |
| 6695 } | 6697 } |
| 6696 | 6698 |
| 6697 | 6699 |
| 6698 } // namespace internal | 6700 } // namespace internal |
| 6699 } // namespace v8 | 6701 } // namespace v8 |
| 6700 | 6702 |
| 6701 #endif // V8_TARGET_ARCH_MIPS64 | 6703 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |