| 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 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2845 if (dst.is(rax)) { | 2845 if (dst.is(rax)) { |
| 2846 AllowDeferredHandleDereference embedding_raw_address; | 2846 AllowDeferredHandleDereference embedding_raw_address; |
| 2847 load_rax(cell.location(), RelocInfo::CELL); | 2847 load_rax(cell.location(), RelocInfo::CELL); |
| 2848 } else { | 2848 } else { |
| 2849 Move(dst, cell, RelocInfo::CELL); | 2849 Move(dst, cell, RelocInfo::CELL); |
| 2850 movp(dst, Operand(dst, 0)); | 2850 movp(dst, Operand(dst, 0)); |
| 2851 } | 2851 } |
| 2852 } | 2852 } |
| 2853 | 2853 |
| 2854 | 2854 |
| 2855 void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, | |
| 2856 Register scratch) { | |
| 2857 Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT); | |
| 2858 cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset)); | |
| 2859 } | |
| 2860 | |
| 2861 | |
| 2862 void MacroAssembler::LoadWeakValue(Register value, Handle<WeakCell> cell, | |
| 2863 Label* miss) { | |
| 2864 Move(value, cell, RelocInfo::EMBEDDED_OBJECT); | |
| 2865 movp(value, FieldOperand(value, WeakCell::kValueOffset)); | |
| 2866 JumpIfSmi(value, miss); | |
| 2867 } | |
| 2868 | |
| 2869 | |
| 2870 void MacroAssembler::Drop(int stack_elements) { | 2855 void MacroAssembler::Drop(int stack_elements) { |
| 2871 if (stack_elements > 0) { | 2856 if (stack_elements > 0) { |
| 2872 addp(rsp, Immediate(stack_elements * kPointerSize)); | 2857 addp(rsp, Immediate(stack_elements * kPointerSize)); |
| 2873 } | 2858 } |
| 2874 } | 2859 } |
| 2875 | 2860 |
| 2876 | 2861 |
| 2877 void MacroAssembler::DropUnderReturnAddress(int stack_elements, | 2862 void MacroAssembler::DropUnderReturnAddress(int stack_elements, |
| 2878 Register scratch) { | 2863 Register scratch) { |
| 2879 DCHECK(stack_elements > 0); | 2864 DCHECK(stack_elements > 0); |
| (...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5409 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); | 5394 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); |
| 5410 movl(rax, dividend); | 5395 movl(rax, dividend); |
| 5411 shrl(rax, Immediate(31)); | 5396 shrl(rax, Immediate(31)); |
| 5412 addl(rdx, rax); | 5397 addl(rdx, rax); |
| 5413 } | 5398 } |
| 5414 | 5399 |
| 5415 | 5400 |
| 5416 } } // namespace v8::internal | 5401 } } // namespace v8::internal |
| 5417 | 5402 |
| 5418 #endif // V8_TARGET_ARCH_X64 | 5403 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |