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

Side by Side Diff: src/x64/macro-assembler-x64.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/s390/macro-assembler-s390.cc ('k') | src/x87/macro-assembler-x87.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_X64 5 #if V8_TARGET_ARCH_X64
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 movp(scratch, ExternalOperand(store_buffer)); 220 movp(scratch, ExternalOperand(store_buffer));
221 // Store pointer to buffer. 221 // Store pointer to buffer.
222 movp(Operand(scratch, 0), addr); 222 movp(Operand(scratch, 0), addr);
223 // Increment buffer top. 223 // Increment buffer top.
224 addp(scratch, Immediate(kPointerSize)); 224 addp(scratch, Immediate(kPointerSize));
225 // Write back new top of buffer. 225 // Write back new top of buffer.
226 movp(ExternalOperand(store_buffer), scratch); 226 movp(ExternalOperand(store_buffer), scratch);
227 // Call stub on end of buffer. 227 // Call stub on end of buffer.
228 Label done; 228 Label done;
229 // Check for end of buffer. 229 // Check for end of buffer.
230 testp(scratch, Immediate(StoreBuffer::kStoreBufferOverflowBit)); 230 testp(scratch, Immediate(StoreBuffer::kStoreBufferMask));
231 if (and_then == kReturnAtEnd) { 231 if (and_then == kReturnAtEnd) {
232 Label buffer_overflowed; 232 Label buffer_overflowed;
233 j(not_equal, &buffer_overflowed, Label::kNear); 233 j(equal, &buffer_overflowed, Label::kNear);
234 ret(0); 234 ret(0);
235 bind(&buffer_overflowed); 235 bind(&buffer_overflowed);
236 } else { 236 } else {
237 DCHECK(and_then == kFallThroughAtEnd); 237 DCHECK(and_then == kFallThroughAtEnd);
238 j(equal, &done, Label::kNear); 238 j(not_equal, &done, Label::kNear);
239 } 239 }
240 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp); 240 StoreBufferOverflowStub store_buffer_overflow(isolate(), save_fp);
241 CallStub(&store_buffer_overflow); 241 CallStub(&store_buffer_overflow);
242 if (and_then == kReturnAtEnd) { 242 if (and_then == kReturnAtEnd) {
243 ret(0); 243 ret(0);
244 } else { 244 } else {
245 DCHECK(and_then == kFallThroughAtEnd); 245 DCHECK(and_then == kFallThroughAtEnd);
246 bind(&done); 246 bind(&done);
247 } 247 }
248 } 248 }
(...skipping 5454 matching lines...) Expand 10 before | Expand all | Expand 10 after
5703 movl(rax, dividend); 5703 movl(rax, dividend);
5704 shrl(rax, Immediate(31)); 5704 shrl(rax, Immediate(31));
5705 addl(rdx, rax); 5705 addl(rdx, rax);
5706 } 5706 }
5707 5707
5708 5708
5709 } // namespace internal 5709 } // namespace internal
5710 } // namespace v8 5710 } // namespace v8
5711 5711
5712 #endif // V8_TARGET_ARCH_X64 5712 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/s390/macro-assembler-s390.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698