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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 2648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 } | 2659 } |
2660 | 2660 |
2661 | 2661 |
2662 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, | 2662 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, |
2663 Register scratch) { | 2663 Register scratch) { |
2664 Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT); | 2664 Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT); |
2665 cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset)); | 2665 cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset)); |
2666 } | 2666 } |
2667 | 2667 |
2668 | 2668 |
| 2669 void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) { |
| 2670 Move(value, cell, RelocInfo::EMBEDDED_OBJECT); |
| 2671 movp(value, FieldOperand(value, WeakCell::kValueOffset)); |
| 2672 } |
| 2673 |
| 2674 |
2669 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, | 2675 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, |
2670 Label* miss) { | 2676 Label* miss) { |
2671 Move(value, cell, RelocInfo::EMBEDDED_OBJECT); | 2677 GetWeakValue(value, cell); |
2672 movp(value, FieldOperand(value, WeakCell::kValueOffset)); | |
2673 JumpIfSmi(value, miss); | 2678 JumpIfSmi(value, miss); |
2674 } | 2679 } |
2675 | 2680 |
2676 | 2681 |
2677 void MacroAssembler::Drop(int stack_elements) { | 2682 void MacroAssembler::Drop(int stack_elements) { |
2678 if (stack_elements > 0) { | 2683 if (stack_elements > 0) { |
2679 addp(rsp, Immediate(stack_elements * kPointerSize)); | 2684 addp(rsp, Immediate(stack_elements * kPointerSize)); |
2680 } | 2685 } |
2681 } | 2686 } |
2682 | 2687 |
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5191 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5196 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
5192 movl(rax, dividend); | 5197 movl(rax, dividend); |
5193 shrl(rax, Immediate(31)); | 5198 shrl(rax, Immediate(31)); |
5194 addl(rdx, rax); | 5199 addl(rdx, rax); |
5195 } | 5200 } |
5196 | 5201 |
5197 | 5202 |
5198 } } // namespace v8::internal | 5203 } } // namespace v8::internal |
5199 | 5204 |
5200 #endif // V8_TARGET_ARCH_X64 | 5205 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |