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

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

Issue 78423002: MIPS: Improvement of “MIPS: Fixed crashes exposed though fuzzing.” (r17886). (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 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
« no previous file with comments | « no previous file | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5064 matching lines...) Expand 10 before | Expand all | Expand 10 after
5075 AdduAndCheckForOverflow(index, index, index, scratch); 5075 AdduAndCheckForOverflow(index, index, index, scratch);
5076 BranchOnOverflow(&index_tag_bad, scratch); 5076 BranchOnOverflow(&index_tag_bad, scratch);
5077 Branch(&index_tag_ok); 5077 Branch(&index_tag_ok);
5078 bind(&index_tag_bad); 5078 bind(&index_tag_bad);
5079 Throw(kIndexIsTooLarge); 5079 Throw(kIndexIsTooLarge);
5080 bind(&index_tag_ok); 5080 bind(&index_tag_ok);
5081 5081
5082 lw(at, FieldMemOperand(string, String::kLengthOffset)); 5082 lw(at, FieldMemOperand(string, String::kLengthOffset));
5083 ThrowIf(ge, kIndexIsTooLarge, index, Operand(at)); 5083 ThrowIf(ge, kIndexIsTooLarge, index, Operand(at));
5084 5084
5085 li(at, Operand(Smi::FromInt(0))); 5085 ASSERT(Smi::FromInt(0) == 0);
5086 ThrowIf(lt, kIndexIsNegative, index, Operand(at)); 5086 ThrowIf(lt, kIndexIsNegative, index, Operand(zero_reg));
5087 5087
5088 SmiUntag(index, index); 5088 SmiUntag(index, index);
5089 } 5089 }
5090 5090
5091 5091
5092 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments, 5092 void MacroAssembler::PrepareCallCFunction(int num_reg_arguments,
5093 int num_double_arguments, 5093 int num_double_arguments,
5094 Register scratch) { 5094 Register scratch) {
5095 int frame_alignment = ActivationFrameAlignment(); 5095 int frame_alignment = ActivationFrameAlignment();
5096 5096
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
5749 opcode == BGTZL); 5749 opcode == BGTZL);
5750 opcode = (cond == eq) ? BEQ : BNE; 5750 opcode = (cond == eq) ? BEQ : BNE;
5751 instr = (instr & ~kOpcodeMask) | opcode; 5751 instr = (instr & ~kOpcodeMask) | opcode;
5752 masm_.emit(instr); 5752 masm_.emit(instr);
5753 } 5753 }
5754 5754
5755 5755
5756 } } // namespace v8::internal 5756 } } // namespace v8::internal
5757 5757
5758 #endif // V8_TARGET_ARCH_MIPS 5758 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698