| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index 2bf4d157c3fc55f81c0dfb7eff60013c8141bc45..9291e20fa6ff36eeb8b4aefcbff2a6f958619809 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -4460,7 +4460,7 @@ void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
|
| Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| } else {
|
| PredictableCodeSizeScope predictible_code_size_scope(
|
| - this, kNoCodeAgeSequenceLength * Assembler::kInstrSize);
|
| + this, kNoCodeAgeSequenceLength);
|
| // The following three instructions must remain together and unmodified
|
| // for code aging to work properly.
|
| if (isolate()->IsCodePreAgingActive()) {
|
| @@ -5664,10 +5664,13 @@ bool AreAliased(Register r1, Register r2, Register r3, Register r4) {
|
| }
|
|
|
|
|
| -CodePatcher::CodePatcher(byte* address, int instructions)
|
| +CodePatcher::CodePatcher(byte* address,
|
| + int instructions,
|
| + FlushICache flush_cache)
|
| : address_(address),
|
| size_(instructions * Assembler::kInstrSize),
|
| - masm_(NULL, address, size_ + Assembler::kGap) {
|
| + masm_(NULL, address, size_ + Assembler::kGap),
|
| + flush_cache_(flush_cache) {
|
| // Create a new macro assembler pointing to the address of the code to patch.
|
| // The size is adjusted with kGap on order for the assembler to generate size
|
| // bytes of instructions without failing with buffer size constraints.
|
| @@ -5677,7 +5680,9 @@ CodePatcher::CodePatcher(byte* address, int instructions)
|
|
|
| CodePatcher::~CodePatcher() {
|
| // Indicate that code has changed.
|
| - CPU::FlushICache(address_, size_);
|
| + if (flush_cache_ == FLUSH) {
|
| + CPU::FlushICache(address_, size_);
|
| + }
|
|
|
| // Check that the code was patched as expected.
|
| ASSERT(masm_.pc_ == address_ + size_);
|
|
|