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

Side by Side Diff: src/mips/lithium-mips.cc

Issue 688693002: MIPS: Remove madd.d usage for r6. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/assembler-mips.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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 } 1510 }
1511 right_op = UseRegister(right); 1511 right_op = UseRegister(right);
1512 } 1512 }
1513 LMulI* mul = new(zone()) LMulI(left_op, right_op); 1513 LMulI* mul = new(zone()) LMulI(left_op, right_op);
1514 if (can_overflow || bailout_on_minus_zero) { 1514 if (can_overflow || bailout_on_minus_zero) {
1515 AssignEnvironment(mul); 1515 AssignEnvironment(mul);
1516 } 1516 }
1517 return DefineAsRegister(mul); 1517 return DefineAsRegister(mul);
1518 1518
1519 } else if (instr->representation().IsDouble()) { 1519 } else if (instr->representation().IsDouble()) {
1520 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { 1520 if (IsMipsArchVariant(kMips32r2)) {
1521 if (instr->HasOneUse() && instr->uses().value()->IsAdd()) { 1521 if (instr->HasOneUse() && instr->uses().value()->IsAdd()) {
1522 HAdd* add = HAdd::cast(instr->uses().value()); 1522 HAdd* add = HAdd::cast(instr->uses().value());
1523 if (instr == add->left()) { 1523 if (instr == add->left()) {
1524 // This mul is the lhs of an add. The add and mul will be folded 1524 // This mul is the lhs of an add. The add and mul will be folded
1525 // into a multiply-add. 1525 // into a multiply-add.
1526 return NULL; 1526 return NULL;
1527 } 1527 }
1528 if (instr == add->right() && !add->left()->IsMul()) { 1528 if (instr == add->right() && !add->left()->IsMul()) {
1529 // This mul is the rhs of an add, where the lhs is not another mul. 1529 // This mul is the rhs of an add, where the lhs is not another mul.
1530 // The add and mul will be folded into a multiply-add. 1530 // The add and mul will be folded into a multiply-add.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 } else if (instr->representation().IsExternal()) { 1583 } else if (instr->representation().IsExternal()) {
1584 DCHECK(instr->left()->representation().IsExternal()); 1584 DCHECK(instr->left()->representation().IsExternal());
1585 DCHECK(instr->right()->representation().IsInteger32()); 1585 DCHECK(instr->right()->representation().IsInteger32());
1586 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); 1586 DCHECK(!instr->CheckFlag(HValue::kCanOverflow));
1587 LOperand* left = UseRegisterAtStart(instr->left()); 1587 LOperand* left = UseRegisterAtStart(instr->left());
1588 LOperand* right = UseOrConstantAtStart(instr->right()); 1588 LOperand* right = UseOrConstantAtStart(instr->right());
1589 LAddI* add = new(zone()) LAddI(left, right); 1589 LAddI* add = new(zone()) LAddI(left, right);
1590 LInstruction* result = DefineAsRegister(add); 1590 LInstruction* result = DefineAsRegister(add);
1591 return result; 1591 return result;
1592 } else if (instr->representation().IsDouble()) { 1592 } else if (instr->representation().IsDouble()) {
1593 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { 1593 if (IsMipsArchVariant(kMips32r2)) {
1594 if (instr->left()->IsMul()) 1594 if (instr->left()->IsMul())
1595 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right()); 1595 return DoMultiplyAdd(HMul::cast(instr->left()), instr->right());
1596 1596
1597 if (instr->right()->IsMul()) { 1597 if (instr->right()->IsMul()) {
1598 DCHECK(!instr->left()->IsMul()); 1598 DCHECK(!instr->left()->IsMul());
1599 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left()); 1599 return DoMultiplyAdd(HMul::cast(instr->right()), instr->left());
1600 } 1600 }
1601 } 1601 }
1602 return DoArithmeticD(Token::ADD, instr); 1602 return DoArithmeticD(Token::ADD, instr);
1603 } else { 1603 } else {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 LOperand* context = UseFixed(instr->context(), cp); 2583 LOperand* context = UseFixed(instr->context(), cp);
2584 LOperand* function = UseRegisterAtStart(instr->function()); 2584 LOperand* function = UseRegisterAtStart(instr->function());
2585 LAllocateBlockContext* result = 2585 LAllocateBlockContext* result =
2586 new(zone()) LAllocateBlockContext(context, function); 2586 new(zone()) LAllocateBlockContext(context, function);
2587 return MarkAsCall(DefineFixed(result, cp), instr); 2587 return MarkAsCall(DefineFixed(result, cp), instr);
2588 } 2588 }
2589 2589
2590 } } // namespace v8::internal 2590 } } // namespace v8::internal
2591 2591
2592 #endif // V8_TARGET_ARCH_MIPS 2592 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698