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

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

Issue 22877043: MIPS: Add a trap_on_abort flag. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 3 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 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 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after
4470 // from the real pointer as a smi. 4470 // from the real pointer as a smi.
4471 const char* msg = GetBailoutReason(reason); 4471 const char* msg = GetBailoutReason(reason);
4472 intptr_t p1 = reinterpret_cast<intptr_t>(msg); 4472 intptr_t p1 = reinterpret_cast<intptr_t>(msg);
4473 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag; 4473 intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag;
4474 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi()); 4474 ASSERT(reinterpret_cast<Object*>(p0)->IsSmi());
4475 #ifdef DEBUG 4475 #ifdef DEBUG
4476 if (msg != NULL) { 4476 if (msg != NULL) {
4477 RecordComment("Abort message: "); 4477 RecordComment("Abort message: ");
4478 RecordComment(msg); 4478 RecordComment(msg);
4479 } 4479 }
4480
4481 if (FLAG_trap_on_abort) {
4482 stop(msg);
4483 return;
4484 }
4480 #endif 4485 #endif
4481 4486
4482 li(a0, Operand(p0)); 4487 li(a0, Operand(p0));
4483 push(a0); 4488 push(a0);
4484 li(a0, Operand(Smi::FromInt(p1 - p0))); 4489 li(a0, Operand(Smi::FromInt(p1 - p0)));
4485 push(a0); 4490 push(a0);
4486 // Disable stub call restrictions to always allow calls to abort. 4491 // Disable stub call restrictions to always allow calls to abort.
4487 if (!has_frame_) { 4492 if (!has_frame_) {
4488 // We don't actually want to generate a pile of code for this, so just 4493 // We don't actually want to generate a pile of code for this, so just
4489 // claim there is a stack frame, without generating one. 4494 // claim there is a stack frame, without generating one.
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
5601 opcode == BGTZL); 5606 opcode == BGTZL);
5602 opcode = (cond == eq) ? BEQ : BNE; 5607 opcode = (cond == eq) ? BEQ : BNE;
5603 instr = (instr & ~kOpcodeMask) | opcode; 5608 instr = (instr & ~kOpcodeMask) | opcode;
5604 masm_.emit(instr); 5609 masm_.emit(instr);
5605 } 5610 }
5606 5611
5607 5612
5608 } } // namespace v8::internal 5613 } } // namespace v8::internal
5609 5614
5610 #endif // V8_TARGET_ARCH_MIPS 5615 #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