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

Side by Side Diff: src/mips/macro-assembler-mips.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/ia32/macro-assembler-ia32.cc ('k') | src/mips64/macro-assembler-mips64.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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 ExternalReference::store_buffer_top(isolate()); 475 ExternalReference::store_buffer_top(isolate());
476 li(t8, Operand(store_buffer)); 476 li(t8, Operand(store_buffer));
477 lw(scratch, MemOperand(t8)); 477 lw(scratch, MemOperand(t8));
478 // Store pointer to buffer and increment buffer top. 478 // Store pointer to buffer and increment buffer top.
479 sw(address, MemOperand(scratch)); 479 sw(address, MemOperand(scratch));
480 Addu(scratch, scratch, kPointerSize); 480 Addu(scratch, scratch, kPointerSize);
481 // Write back new top of buffer. 481 // Write back new top of buffer.
482 sw(scratch, MemOperand(t8)); 482 sw(scratch, MemOperand(t8));
483 // Call stub on end of buffer. 483 // Call stub on end of buffer.
484 // Check for end of buffer. 484 // Check for end of buffer.
485 And(t8, scratch, Operand(StoreBuffer::kStoreBufferOverflowBit)); 485 And(t8, scratch, Operand(StoreBuffer::kStoreBufferMask));
486 if (and_then == kFallThroughAtEnd) { 486 if (and_then == kFallThroughAtEnd) {
487 Branch(&done, eq, t8, Operand(zero_reg)); 487 Branch(&done, ne, t8, Operand(zero_reg));
488 } else { 488 } else {
489 DCHECK(and_then == kReturnAtEnd); 489 DCHECK(and_then == kReturnAtEnd);
490 Ret(eq, t8, Operand(zero_reg)); 490 Ret(ne, t8, Operand(zero_reg));
491 } 491 }
492 push(ra); 492 push(ra);
493 StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode); 493 StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
494 CallStub(&store_buffer_overflow); 494 CallStub(&store_buffer_overflow);
495 pop(ra); 495 pop(ra);
496 bind(&done); 496 bind(&done);
497 if (and_then == kReturnAtEnd) { 497 if (and_then == kReturnAtEnd) {
498 Ret(); 498 Ret();
499 } 499 }
500 } 500 }
(...skipping 5744 matching lines...) Expand 10 before | Expand all | Expand 10 after
6245 if (mag.shift > 0) sra(result, result, mag.shift); 6245 if (mag.shift > 0) sra(result, result, mag.shift);
6246 srl(at, dividend, 31); 6246 srl(at, dividend, 31);
6247 Addu(result, result, Operand(at)); 6247 Addu(result, result, Operand(at));
6248 } 6248 }
6249 6249
6250 6250
6251 } // namespace internal 6251 } // namespace internal
6252 } // namespace v8 6252 } // namespace v8
6253 6253
6254 #endif // V8_TARGET_ARCH_MIPS 6254 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698