| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 __ mov_b(Operand(dst, 0), eax); | 175 __ mov_b(Operand(dst, 0), eax); |
| 176 __ jmp(&backward_loop_1byte); | 176 __ jmp(&backward_loop_1byte); |
| 177 } | 177 } |
| 178 | 178 |
| 179 __ bind(&pop_and_return); | 179 __ bind(&pop_and_return); |
| 180 MemMoveEmitPopAndReturn(&masm); | 180 MemMoveEmitPopAndReturn(&masm); |
| 181 | 181 |
| 182 CodeDesc desc; | 182 CodeDesc desc; |
| 183 masm.GetCode(&desc); | 183 masm.GetCode(&desc); |
| 184 DCHECK(!RelocInfo::RequiresRelocation(desc)); | 184 DCHECK(!RelocInfo::RequiresRelocation(desc)); |
| 185 CpuFeatures::FlushICache(buffer, actual_size); | 185 Assembler::FlushICacheWithoutIsolate(buffer, actual_size); |
| 186 base::OS::ProtectCode(buffer, actual_size); | 186 base::OS::ProtectCode(buffer, actual_size); |
| 187 // TODO(jkummerow): It would be nice to register this code creation event | 187 // TODO(jkummerow): It would be nice to register this code creation event |
| 188 // with the PROFILE / GDBJIT system. | 188 // with the PROFILE / GDBJIT system. |
| 189 return FUNCTION_CAST<MemMoveFunction>(buffer); | 189 return FUNCTION_CAST<MemMoveFunction>(buffer); |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 #undef __ | 193 #undef __ |
| 194 | 194 |
| 195 // ------------------------------------------------------------------------- | 195 // ------------------------------------------------------------------------- |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 } | 610 } |
| 611 | 611 |
| 612 | 612 |
| 613 void Code::PatchPlatformCodeAge(Isolate* isolate, | 613 void Code::PatchPlatformCodeAge(Isolate* isolate, |
| 614 byte* sequence, | 614 byte* sequence, |
| 615 Code::Age age, | 615 Code::Age age, |
| 616 MarkingParity parity) { | 616 MarkingParity parity) { |
| 617 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); | 617 uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); |
| 618 if (age == kNoAgeCodeAge) { | 618 if (age == kNoAgeCodeAge) { |
| 619 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); | 619 isolate->code_aging_helper()->CopyYoungSequenceTo(sequence); |
| 620 CpuFeatures::FlushICache(sequence, young_length); | 620 Assembler::FlushICache(isolate, sequence, young_length); |
| 621 } else { | 621 } else { |
| 622 Code* stub = GetCodeAgeStub(isolate, age, parity); | 622 Code* stub = GetCodeAgeStub(isolate, age, parity); |
| 623 CodePatcher patcher(sequence, young_length); | 623 CodePatcher patcher(sequence, young_length); |
| 624 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 624 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
| 625 } | 625 } |
| 626 } | 626 } |
| 627 | 627 |
| 628 | 628 |
| 629 } // namespace internal | 629 } // namespace internal |
| 630 } // namespace v8 | 630 } // namespace v8 |
| 631 | 631 |
| 632 #endif // V8_TARGET_ARCH_X87 | 632 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |