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

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

Issue 764003003: Reland parts of 'Use weak cells in map checks in polymorphic ICs' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
OLDNEW
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
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
2855 void MacroAssembler::Drop(int stack_elements) { 2870 void MacroAssembler::Drop(int stack_elements) {
2856 if (stack_elements > 0) { 2871 if (stack_elements > 0) {
2857 addp(rsp, Immediate(stack_elements * kPointerSize)); 2872 addp(rsp, Immediate(stack_elements * kPointerSize));
2858 } 2873 }
2859 } 2874 }
2860 2875
2861 2876
2862 void MacroAssembler::DropUnderReturnAddress(int stack_elements, 2877 void MacroAssembler::DropUnderReturnAddress(int stack_elements,
2863 Register scratch) { 2878 Register scratch) {
2864 DCHECK(stack_elements > 0); 2879 DCHECK(stack_elements > 0);
(...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after
5394 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5409 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5395 movl(rax, dividend); 5410 movl(rax, dividend);
5396 shrl(rax, Immediate(31)); 5411 shrl(rax, Immediate(31));
5397 addl(rdx, rax); 5412 addl(rdx, rax);
5398 } 5413 }
5399 5414
5400 5415
5401 } } // namespace v8::internal 5416 } } // namespace v8::internal
5402 5417
5403 #endif // V8_TARGET_ARCH_X64 5418 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698