Reviewers: danno, Paul Lind, dusmil, kisg, palfia,

Description:
MIPS: Improvement of “MIPS: Fixed crashes exposed though fuzzing.” (r17886).

BUG=

Please review this at https://codereview.chromium.org/78423002/

SVN Base: https://github.com/v8/v8.git@gbl

Affected files (+2, -2 lines):
  M src/mips/macro-assembler-mips.cc


Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc index 930afcb72abe8787d51955d2ca41235c27bd74ea..1ad6a38a85a837b9cb883b45d6d9cbaa23f5930f 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -5082,8 +5082,8 @@ void MacroAssembler::EmitSeqStringSetCharCheck(Register string,
   lw(at, FieldMemOperand(string, String::kLengthOffset));
   ThrowIf(ge, kIndexIsTooLarge, index, Operand(at));

-  li(at, Operand(Smi::FromInt(0)));
-  ThrowIf(lt, kIndexIsNegative, index, Operand(at));
+  ASSERT(Smi::FromInt(0) == 0);
+  ThrowIf(lt, kIndexIsNegative, index, Operand(zero_reg));

   SmiUntag(index, index);
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to