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

Unified Diff: src/mips64/lithium-codegen-mips64.cc

Issue 1153263012: MIPS64: Implement AddE lithium instruction to separate integer and address arithmetic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/mips64/lithium-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/lithium-codegen-mips64.cc
diff --git a/src/mips64/lithium-codegen-mips64.cc b/src/mips64/lithium-codegen-mips64.cc
index 7ee8b64a4d1fb5c087ecc0c67de12e4679fb995b..4ca54d6a2bb32cb37ad01653fe0a4294559ebf03 100644
--- a/src/mips64/lithium-codegen-mips64.cc
+++ b/src/mips64/lithium-codegen-mips64.cc
@@ -1889,6 +1889,17 @@ void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) {
}
+void LCodeGen::DoAddE(LAddE* instr) {
+ LOperand* result = instr->result();
+ LOperand* left = instr->left();
+ LOperand* right = instr->right();
+
+ DCHECK(!instr->hydrogen()->CheckFlag(HValue::kCanOverflow));
+ DCHECK(right->IsRegister() || right->IsConstantOperand());
+ __ Daddu(ToRegister(result), ToRegister(left), ToOperand(right));
+}
+
+
void LCodeGen::DoAddI(LAddI* instr) {
LOperand* left = instr->left();
LOperand* right = instr->right();
@@ -1896,18 +1907,12 @@ void LCodeGen::DoAddI(LAddI* instr) {
bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow);
if (!can_overflow) {
- if (right->IsStackSlot()) {
- Register right_reg = EmitLoadRegister(right, at);
- __ Daddu(ToRegister(result), ToRegister(left), Operand(right_reg));
- } else {
- DCHECK(right->IsRegister() || right->IsConstantOperand());
- __ Daddu(ToRegister(result), ToRegister(left), ToOperand(right));
- }
+ DCHECK(right->IsRegister());
+ __ Daddu(ToRegister(result), ToRegister(left), ToOperand(right));
} else { // can_overflow.
Register overflow = scratch0();
Register scratch = scratch1();
- if (right->IsStackSlot() ||
- right->IsConstantOperand()) {
+ if (right->IsConstantOperand()) {
Register right_reg = EmitLoadRegister(right, scratch);
__ AdduAndCheckForOverflow(ToRegister(result),
ToRegister(left),
« no previous file with comments | « no previous file | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698