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

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

Issue 1632913003: [heap] Move to page lookups for SemiSpace, NewSpace, and Heap containment methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips ports Created 4 years, 10 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/heap/store-buffer-inl.h ('k') | src/mips/macro-assembler-mips.h » ('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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { 165 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) {
166 Register reg = saved_regs[i]; 166 Register reg = saved_regs[i];
167 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { 167 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) {
168 pop(reg); 168 pop(reg);
169 } 169 }
170 } 170 }
171 } 171 }
172 172
173 void MacroAssembler::InNewSpace( 173 void MacroAssembler::InNewSpace(Register object, Register scratch, Condition cc,
174 Register object, 174 Label* condition_met,
175 Register scratch, 175 Label::Distance distance) {
176 Condition cc, 176 const int mask =
177 Label* condition_met, 177 (1 << MemoryChunk::IN_FROM_SPACE) | (1 << MemoryChunk::IN_TO_SPACE);
178 Label::Distance condition_met_distance) { 178 CheckPageFlag(object, scratch, mask, cc, condition_met, distance);
179 DCHECK(cc == equal || cc == not_equal);
180 if (scratch.is(object)) {
181 and_(scratch, Immediate(~Page::kPageAlignmentMask));
182 } else {
183 mov(scratch, Immediate(~Page::kPageAlignmentMask));
184 and_(scratch, object);
185 }
186 // Check that we can use a test_b.
187 DCHECK(MemoryChunk::IN_FROM_SPACE < 8);
188 DCHECK(MemoryChunk::IN_TO_SPACE < 8);
189 int mask = (1 << MemoryChunk::IN_FROM_SPACE)
190 | (1 << MemoryChunk::IN_TO_SPACE);
191 // If non-zero, the page belongs to new-space.
192 test_b(Operand(scratch, MemoryChunk::kFlagsOffset),
193 static_cast<uint8_t>(mask));
194 j(cc, condition_met, condition_met_distance);
195 } 179 }
196 180
197 181
198 void MacroAssembler::RememberedSetHelper( 182 void MacroAssembler::RememberedSetHelper(
199 Register object, // Only used for debug checks. 183 Register object, // Only used for debug checks.
200 Register addr, 184 Register addr,
201 Register scratch, 185 Register scratch,
202 SaveFPRegsMode save_fp, 186 SaveFPRegsMode save_fp,
203 MacroAssembler::RememberedSetFinalAction and_then) { 187 MacroAssembler::RememberedSetFinalAction and_then) {
204 Label done; 188 Label done;
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after
3233 mov(eax, dividend); 3217 mov(eax, dividend);
3234 shr(eax, 31); 3218 shr(eax, 31);
3235 add(edx, eax); 3219 add(edx, eax);
3236 } 3220 }
3237 3221
3238 3222
3239 } // namespace internal 3223 } // namespace internal
3240 } // namespace v8 3224 } // namespace v8
3241 3225
3242 #endif // V8_TARGET_ARCH_IA32 3226 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/store-buffer-inl.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698