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

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

Issue 2129083003: Revert of MIPS: [turbofan] Fix addition for deoptimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/compiler/mips64/code-generator-mips64.cc ('k') | no next file » | 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 5475 matching lines...) Expand 10 before | Expand all | Expand 10 after
5486 Register overflow_dst = t9; 5486 Register overflow_dst = t9;
5487 DCHECK(!dst.is(scratch)); 5487 DCHECK(!dst.is(scratch));
5488 DCHECK(!dst.is(overflow_dst)); 5488 DCHECK(!dst.is(overflow_dst));
5489 DCHECK(!scratch.is(overflow_dst)); 5489 DCHECK(!scratch.is(overflow_dst));
5490 DCHECK(!left.is(overflow_dst)); 5490 DCHECK(!left.is(overflow_dst));
5491 DCHECK(!right.is(overflow_dst)); 5491 DCHECK(!right.is(overflow_dst));
5492 DCHECK(!left.is(scratch)); 5492 DCHECK(!left.is(scratch));
5493 DCHECK(!right.is(scratch)); 5493 DCHECK(!right.is(scratch));
5494 5494
5495 if (left.is(right) && dst.is(left)) { 5495 if (left.is(right) && dst.is(left)) {
5496 mov(scratch, left); // Preserve left and right. 5496 mov(overflow_dst, right);
5497 addu(dst, left, right); // Both are overwritten. 5497 right = overflow_dst;
5498 xor_(overflow_dst, dst, scratch); // Left and right are equal. 5498 }
5499 Label done; // Restore inputs if overflow. 5499
5500 Branch(&done, ge, overflow_dst, Operand(zero_reg)); 5500 if (dst.is(left)) {
5501 mov(left, scratch); // Original left and right.
5502 bind(&done);
5503 } else if (dst.is(left)) {
5504 mov(scratch, left); // Preserve left. 5501 mov(scratch, left); // Preserve left.
5505 addu(dst, left, right); // Left is overwritten. 5502 addu(dst, left, right); // Left is overwritten.
5506 xor_(scratch, dst, scratch); // Original left. 5503 xor_(scratch, dst, scratch); // Original left.
5507 xor_(overflow_dst, dst, right); 5504 xor_(overflow_dst, dst, right);
5508 and_(overflow_dst, overflow_dst, scratch); 5505 and_(overflow_dst, overflow_dst, scratch);
5509 } else if (dst.is(right)) { 5506 } else if (dst.is(right)) {
5510 mov(scratch, right); // Preserve right. 5507 mov(scratch, right); // Preserve right.
5511 addu(dst, left, right); // Right is overwritten. 5508 addu(dst, left, right); // Right is overwritten.
5512 xor_(scratch, dst, scratch); // Original right. 5509 xor_(scratch, dst, scratch); // Original right.
5513 xor_(overflow_dst, dst, left); 5510 xor_(overflow_dst, dst, left);
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
6915 if (mag.shift > 0) sra(result, result, mag.shift); 6912 if (mag.shift > 0) sra(result, result, mag.shift);
6916 srl(at, dividend, 31); 6913 srl(at, dividend, 31);
6917 Addu(result, result, Operand(at)); 6914 Addu(result, result, Operand(at));
6918 } 6915 }
6919 6916
6920 6917
6921 } // namespace internal 6918 } // namespace internal
6922 } // namespace v8 6919 } // namespace v8
6923 6920
6924 #endif // V8_TARGET_ARCH_MIPS 6921 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698