OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/s390/codegen-s390.h" | 5 #include "src/s390/codegen-s390.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_S390 | 7 #if V8_TARGET_ARCH_S390 |
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/s390/simulator-s390.h" | 13 #include "src/s390/simulator-s390.h" |
12 | 14 |
13 namespace v8 { | 15 namespace v8 { |
14 namespace internal { | 16 namespace internal { |
15 | 17 |
16 #define __ masm. | 18 #define __ masm. |
17 | 19 |
18 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { | 20 UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { |
(...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(), CodePatcher::DONT_FLUSH)); | 473 young_sequence_.length(), CodePatcher::DONT_FLUSH)); |
472 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 474 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
473 patcher->masm()->PushStandardFrame(r3); | 475 patcher->masm()->PushStandardFrame(r3); |
474 } | 476 } |
475 | 477 |
476 #ifdef DEBUG | 478 #ifdef DEBUG |
477 bool CodeAgingHelper::IsOld(byte* candidate) const { | 479 bool CodeAgingHelper::IsOld(byte* candidate) const { |
478 return Assembler::IsNop(Assembler::instr_at(candidate)); | 480 return Assembler::IsNop(Assembler::instr_at(candidate)); |
479 } | 481 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 // (kNoCodeAgeSequenceLength - kCodeAgingSequenceLength) bytes. | 529 // (kNoCodeAgeSequenceLength - kCodeAgingSequenceLength) bytes. |
528 patcher.masm()->nop(); // 2-byte nops(). | 530 patcher.masm()->nop(); // 2-byte nops(). |
529 } | 531 } |
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_S390 | 538 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |