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

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

Issue 1851473002: Change store buffer overflow check to not rely on the store buffer being (2*Size) aligned. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove kStoreBufferLength Created 4 years, 8 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.cc ('k') | src/mips/macro-assembler-mips.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 #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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ExternalReference::store_buffer_top(isolate()); 197 ExternalReference::store_buffer_top(isolate());
198 mov(scratch, Operand::StaticVariable(store_buffer)); 198 mov(scratch, Operand::StaticVariable(store_buffer));
199 // Store pointer to buffer. 199 // Store pointer to buffer.
200 mov(Operand(scratch, 0), addr); 200 mov(Operand(scratch, 0), addr);
201 // Increment buffer top. 201 // Increment buffer top.
202 add(scratch, Immediate(kPointerSize)); 202 add(scratch, Immediate(kPointerSize));
203 // Write back new top of buffer. 203 // Write back new top of buffer.
204 mov(Operand::StaticVariable(store_buffer), scratch); 204 mov(Operand::StaticVariable(store_buffer), scratch);
205 // Call stub on end of buffer. 205 // Call stub on end of buffer.
206 // Check for end of buffer. 206 // Check for end of buffer.
207 test(scratch, Immediate(StoreBuffer::kStoreBufferOverflowBit)); 207 test(scratch, Immediate(StoreBuffer::kStoreBufferMask));
208 if (and_then == kReturnAtEnd) { 208 if (and_then == kReturnAtEnd) {
209 Label buffer_overflowed; 209 Label buffer_overflowed;
210 j(not_equal, &buffer_overflowed, Label::kNear); 210 j(equal, &buffer_overflowed, Label::kNear);
211 ret(0); 211 ret(0);
212 bind(&buffer_overflowed); 212 bind(&buffer_overflowed);
213 } else { 213 } else {
214 DCHECK(and_then == kFallThroughAtEnd); 214 DCHECK(and_then == kFallThroughAtEnd);
215 j(equal, &done, Label::kNear); 215 j(not_equal, &done, Label::kNear);
216 } 216 }
217 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); 217 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp);
218 CallStub(&store_buffer_overflow); 218 CallStub(&store_buffer_overflow);
219 if (and_then == kReturnAtEnd) { 219 if (and_then == kReturnAtEnd) {
220 ret(0); 220 ret(0);
221 } else { 221 } else {
222 DCHECK(and_then == kFallThroughAtEnd); 222 DCHECK(and_then == kFallThroughAtEnd);
223 bind(&done); 223 bind(&done);
224 } 224 }
225 } 225 }
(...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 mov(eax, dividend); 3414 mov(eax, dividend);
3415 shr(eax, 31); 3415 shr(eax, 31);
3416 add(edx, eax); 3416 add(edx, eax);
3417 } 3417 }
3418 3418
3419 3419
3420 } // namespace internal 3420 } // namespace internal
3421 } // namespace v8 3421 } // namespace v8
3422 3422
3423 #endif // V8_TARGET_ARCH_IA32 3423 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/store-buffer.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698