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

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

Issue 979003003: Only reference constant root list entries in the snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows build Created 5 years, 9 months 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
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 int fixed_offset) { 170 int fixed_offset) {
171 DCHECK(root_array_available_); 171 DCHECK(root_array_available_);
172 movp(destination, 172 movp(destination,
173 Operand(kRootRegister, 173 Operand(kRootRegister,
174 variable_offset, times_pointer_size, 174 variable_offset, times_pointer_size,
175 (fixed_offset << kPointerSizeLog2) - kRootRegisterBias)); 175 (fixed_offset << kPointerSizeLog2) - kRootRegisterBias));
176 } 176 }
177 177
178 178
179 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index) { 179 void MacroAssembler::StoreRoot(Register source, Heap::RootListIndex index) {
180 DCHECK(Heap::RootCanBeWrittenAfterInitialization(index));
180 DCHECK(root_array_available_); 181 DCHECK(root_array_available_);
181 movp(Operand(kRootRegister, (index << kPointerSizeLog2) - kRootRegisterBias), 182 movp(Operand(kRootRegister, (index << kPointerSizeLog2) - kRootRegisterBias),
182 source); 183 source);
183 } 184 }
184 185
185 186
186 void MacroAssembler::PushRoot(Heap::RootListIndex index) { 187 void MacroAssembler::PushRoot(Heap::RootListIndex index) {
187 DCHECK(root_array_available_); 188 DCHECK(root_array_available_);
188 Push(Operand(kRootRegister, (index << kPointerSizeLog2) - kRootRegisterBias)); 189 Push(Operand(kRootRegister, (index << kPointerSizeLog2) - kRootRegisterBias));
189 } 190 }
(...skipping 4897 matching lines...) Expand 10 before | Expand all | Expand 10 after
5087 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5088 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5088 movl(rax, dividend); 5089 movl(rax, dividend);
5089 shrl(rax, Immediate(31)); 5090 shrl(rax, Immediate(31));
5090 addl(rdx, rax); 5091 addl(rdx, rax);
5091 } 5092 }
5092 5093
5093 5094
5094 } } // namespace v8::internal 5095 } } // namespace v8::internal
5095 5096
5096 #endif // V8_TARGET_ARCH_X64 5097 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698