OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3565 JumpIfNotObjectType(result, scratch, scratch, MAP_TYPE, &done); | 3565 JumpIfNotObjectType(result, scratch, scratch, MAP_TYPE, &done); |
3566 | 3566 |
3567 // Get the prototype from the initial map. | 3567 // Get the prototype from the initial map. |
3568 Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); | 3568 Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); |
3569 | 3569 |
3570 // All done. | 3570 // All done. |
3571 Bind(&done); | 3571 Bind(&done); |
3572 } | 3572 } |
3573 | 3573 |
3574 | 3574 |
| 3575 void MacroAssembler::PushRoot(Heap::RootListIndex index) { |
| 3576 UseScratchRegisterScope temps(this); |
| 3577 Register temp = temps.AcquireX(); |
| 3578 LoadRoot(temp, index); |
| 3579 Push(temp); |
| 3580 } |
| 3581 |
| 3582 |
3575 void MacroAssembler::CompareRoot(const Register& obj, | 3583 void MacroAssembler::CompareRoot(const Register& obj, |
3576 Heap::RootListIndex index) { | 3584 Heap::RootListIndex index) { |
3577 UseScratchRegisterScope temps(this); | 3585 UseScratchRegisterScope temps(this); |
3578 Register temp = temps.AcquireX(); | 3586 Register temp = temps.AcquireX(); |
3579 DCHECK(!AreAliased(obj, temp)); | 3587 DCHECK(!AreAliased(obj, temp)); |
3580 LoadRoot(temp, index); | 3588 LoadRoot(temp, index); |
3581 Cmp(obj, temp); | 3589 Cmp(obj, temp); |
3582 } | 3590 } |
3583 | 3591 |
3584 | 3592 |
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5067 } | 5075 } |
5068 | 5076 |
5069 | 5077 |
5070 #undef __ | 5078 #undef __ |
5071 | 5079 |
5072 | 5080 |
5073 } // namespace internal | 5081 } // namespace internal |
5074 } // namespace v8 | 5082 } // namespace v8 |
5075 | 5083 |
5076 #endif // V8_TARGET_ARCH_ARM64 | 5084 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |