| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ppc/codegen-ppc.h" | 5 #include "src/ppc/codegen-ppc.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 8 | 8 |
| 9 #include <memory> |
| 10 |
| 9 #include "src/codegen.h" | 11 #include "src/codegen.h" |
| 10 #include "src/macro-assembler.h" | 12 #include "src/macro-assembler.h" |
| 11 #include "src/ppc/simulator-ppc.h" | 13 #include "src/ppc/simulator-ppc.h" |
| 12 | 14 |
| 13 namespace v8 { | 15 namespace v8 { |
| 14 namespace internal { | 16 namespace internal { |
| 15 | 17 |
| 16 | 18 |
| 17 #define __ masm. | 19 #define __ masm. |
| 18 | 20 |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 461 |
| 460 #undef __ | 462 #undef __ |
| 461 | 463 |
| 462 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { | 464 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
| 463 USE(isolate); | 465 USE(isolate); |
| 464 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 466 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
| 465 // Since patcher is a large object, allocate it dynamically when needed, | 467 // Since patcher is a large object, allocate it dynamically when needed, |
| 466 // to avoid overloading the stack in stress conditions. | 468 // to avoid overloading the stack in stress conditions. |
| 467 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in | 469 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in |
| 468 // the process, before ARM simulator ICache is setup. | 470 // the process, before ARM simulator ICache is setup. |
| 469 base::SmartPointer<CodePatcher> patcher( | 471 std::unique_ptr<CodePatcher> patcher( |
| 470 new CodePatcher(isolate, young_sequence_.start(), | 472 new CodePatcher(isolate, young_sequence_.start(), |
| 471 young_sequence_.length() / Assembler::kInstrSize, | 473 young_sequence_.length() / Assembler::kInstrSize, |
| 472 CodePatcher::DONT_FLUSH)); | 474 CodePatcher::DONT_FLUSH)); |
| 473 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 475 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
| 474 patcher->masm()->PushStandardFrame(r4); | 476 patcher->masm()->PushStandardFrame(r4); |
| 475 for (int i = 0; i < kNoCodeAgeSequenceNops; i++) { | 477 for (int i = 0; i < kNoCodeAgeSequenceNops; i++) { |
| 476 patcher->masm()->nop(); | 478 patcher->masm()->nop(); |
| 477 } | 479 } |
| 478 } | 480 } |
| 479 | 481 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 patcher.masm()->Jump(r3); | 529 patcher.masm()->Jump(r3); |
| 528 for (int i = 0; i < kCodeAgingSequenceNops; i++) { | 530 for (int i = 0; i < kCodeAgingSequenceNops; i++) { |
| 529 patcher.masm()->nop(); | 531 patcher.masm()->nop(); |
| 530 } | 532 } |
| 531 } | 533 } |
| 532 } | 534 } |
| 533 } // namespace internal | 535 } // namespace internal |
| 534 } // namespace v8 | 536 } // namespace v8 |
| 535 | 537 |
| 536 #endif // V8_TARGET_ARCH_PPC | 538 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |