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

Side by Side Diff: src/mips64/macro-assembler-mips64.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/mips/macro-assembler-mips.cc ('k') | src/ppc/macro-assembler-ppc.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 #include "src/base/division-by-constant.h" 9 #include "src/base/division-by-constant.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 ExternalReference::store_buffer_top(isolate()); 478 ExternalReference::store_buffer_top(isolate());
479 li(t8, Operand(store_buffer)); 479 li(t8, Operand(store_buffer));
480 ld(scratch, MemOperand(t8)); 480 ld(scratch, MemOperand(t8));
481 // Store pointer to buffer and increment buffer top. 481 // Store pointer to buffer and increment buffer top.
482 sd(address, MemOperand(scratch)); 482 sd(address, MemOperand(scratch));
483 Daddu(scratch, scratch, kPointerSize); 483 Daddu(scratch, scratch, kPointerSize);
484 // Write back new top of buffer. 484 // Write back new top of buffer.
485 sd(scratch, MemOperand(t8)); 485 sd(scratch, MemOperand(t8));
486 // Call stub on end of buffer. 486 // Call stub on end of buffer.
487 // Check for end of buffer. 487 // Check for end of buffer.
488 And(t8, scratch, Operand(StoreBuffer::kStoreBufferOverflowBit)); 488 And(t8, scratch, Operand(StoreBuffer::kStoreBufferMask));
489 DCHECK(!scratch.is(t8)); 489 DCHECK(!scratch.is(t8));
490 if (and_then == kFallThroughAtEnd) { 490 if (and_then == kFallThroughAtEnd) {
491 Branch(&done, eq, t8, Operand(zero_reg)); 491 Branch(&done, ne, t8, Operand(zero_reg));
492 } else { 492 } else {
493 DCHECK(and_then == kReturnAtEnd); 493 DCHECK(and_then == kReturnAtEnd);
494 Ret(eq, t8, Operand(zero_reg)); 494 Ret(ne, t8, Operand(zero_reg));
495 } 495 }
496 push(ra); 496 push(ra);
497 StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode); 497 StoreBufferOverflowStub store_buffer_overflow(isolate(), fp_mode);
498 CallStub(&store_buffer_overflow); 498 CallStub(&store_buffer_overflow);
499 pop(ra); 499 pop(ra);
500 bind(&done); 500 bind(&done);
501 if (and_then == kReturnAtEnd) { 501 if (and_then == kReturnAtEnd) {
502 Ret(); 502 Ret();
503 } 503 }
504 } 504 }
(...skipping 6374 matching lines...) Expand 10 before | Expand all | Expand 10 after
6879 if (mag.shift > 0) sra(result, result, mag.shift); 6879 if (mag.shift > 0) sra(result, result, mag.shift);
6880 srl(at, dividend, 31); 6880 srl(at, dividend, 31);
6881 Addu(result, result, Operand(at)); 6881 Addu(result, result, Operand(at));
6882 } 6882 }
6883 6883
6884 6884
6885 } // namespace internal 6885 } // namespace internal
6886 } // namespace v8 6886 } // namespace v8
6887 6887
6888 #endif // V8_TARGET_ARCH_MIPS64 6888 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698