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

Unified Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 1434263003: MIPS: Use BOVC/BNVC for overflow checking on r6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: src/full-codegen/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
index 3a322ea315c863e48ed991e728f303bd60dc59a5..08ba63ffb3ad976bf1aaf3f86788e773f1d83da3 100644
--- a/src/full-codegen/mips/full-codegen-mips.cc
+++ b/src/full-codegen/mips/full-codegen-mips.cc
@@ -2363,8 +2363,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
break;
}
case Token::ADD:
- __ AdduAndCheckForOverflow(v0, left, right, scratch1);
- __ BranchOnOverflow(&stub_call, scratch1);
+ __ AdduAndCheckForOverflow(v0, left, right, &stub_call, nullptr);
break;
case Token::SUB:
__ SubuAndCheckForOverflow(v0, left, right, scratch1);
@@ -4031,8 +4030,8 @@ void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) {
__ lbu(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
__ JumpIfInstanceTypeIsNotSequentialOneByte(scratch1, scratch2, &bailout);
__ lw(scratch1, FieldMemOperand(string, SeqOneByteString::kLengthOffset));
- __ AdduAndCheckForOverflow(string_length, string_length, scratch1, scratch3);
- __ BranchOnOverflow(&bailout, scratch3);
+ __ AdduAndCheckForOverflow(string_length, string_length, scratch1, &bailout,
+ nullptr);
__ Branch(&loop, lt, element, Operand(elements_end));
// If array_length is 1, return elements[0], a string.
@@ -4065,8 +4064,8 @@ void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) {
__ Branch(&bailout, ne, scratch3, Operand(zero_reg));
__ And(scratch3, scratch2, Operand(0x80000000));
__ Branch(&bailout, ne, scratch3, Operand(zero_reg));
- __ AdduAndCheckForOverflow(string_length, string_length, scratch2, scratch3);
- __ BranchOnOverflow(&bailout, scratch3);
+ __ AdduAndCheckForOverflow(string_length, string_length, scratch2, &bailout,
+ nullptr);
__ SmiUntag(string_length);
// Bailout for large object allocations.
@@ -4536,10 +4535,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
Register scratch1 = a1;
- Register scratch2 = t0;
__ li(scratch1, Operand(Smi::FromInt(count_value)));
- __ AdduAndCheckForOverflow(v0, v0, scratch1, scratch2);
- __ BranchOnNoOverflow(&done, scratch2);
+ __ AdduAndCheckForOverflow(v0, v0, scratch1, nullptr, &done);
// Call stub. Undo operation first.
__ Move(v0, a0);
__ jmp(&stub_call);

Powered by Google App Engine
This is Rietveld 408576698