| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/x87/codegen-x87.h" | 5 #include "src/x87/codegen-x87.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 __ bind(&done); | 586 __ bind(&done); |
| 587 } | 587 } |
| 588 | 588 |
| 589 | 589 |
| 590 #undef __ | 590 #undef __ |
| 591 | 591 |
| 592 | 592 |
| 593 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { | 593 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
| 594 USE(isolate); | 594 USE(isolate); |
| 595 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 595 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
| 596 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); | 596 CodePatcher patcher(isolate, young_sequence_.start(), |
| 597 young_sequence_.length()); |
| 597 patcher.masm()->push(ebp); | 598 patcher.masm()->push(ebp); |
| 598 patcher.masm()->mov(ebp, esp); | 599 patcher.masm()->mov(ebp, esp); |
| 599 patcher.masm()->push(esi); | 600 patcher.masm()->push(esi); |
| 600 patcher.masm()->push(edi); | 601 patcher.masm()->push(edi); |
| 601 } | 602 } |
| 602 | 603 |
| 603 | 604 |
| 604 #ifdef DEBUG | 605 #ifdef DEBUG |
| 605 bool CodeAgingHelper::IsOld(byte* candidate) const { | 606 bool CodeAgingHelper::IsOld(byte* candidate) const { |
| 606 return *candidate == kCallOpcode; | 607 return *candidate == kCallOpcode; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 633 void Code::PatchPlatformCodeAge(Isolate* isolate, | 634 void Code::PatchPlatformCodeAge(Isolate* isolate, |
| 634 byte* sequence, | 635 byte* sequence, |
| 635 Code::Age age, | 636 Code::Age age, |
| 636 MarkingParity parity) { | 637 MarkingParity parity) { |
| 637 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); | 638 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); |
| 638 if (age == kNoAgeCodeAge) { | 639 if (age == kNoAgeCodeAge) { |
| 639 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); | 640 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); |
| 640 Assembler::FlushICache(isolate, sequence, young_length); | 641 Assembler::FlushICache(isolate, sequence, young_length); |
| 641 } else { | 642 } else { |
| 642 Code* stub = GetCodeAgeStub(isolate, age, parity); | 643 Code* stub = GetCodeAgeStub(isolate, age, parity); |
| 643 CodePatcher patcher(sequence, young_length); | 644 CodePatcher patcher(isolate, sequence, young_length); |
| 644 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 645 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
| 645 } | 646 } |
| 646 } | 647 } |
| 647 | 648 |
| 648 | 649 |
| 649 } // namespace internal | 650 } // namespace internal |
| 650 } // namespace v8 | 651 } // namespace v8 |
| 651 | 652 |
| 652 #endif // V8_TARGET_ARCH_X87 | 653 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |