| 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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
| (...skipping 4883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4894 | 4894 |
| 4895 | 4895 |
| 4896 #undef __ | 4896 #undef __ |
| 4897 | 4897 |
| 4898 | 4898 |
| 4899 void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc, | 4899 void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc, |
| 4900 BackEdgeState target_state, | 4900 BackEdgeState target_state, |
| 4901 Code* replacement_code) { | 4901 Code* replacement_code) { |
| 4902 Address mov_address = Assembler::target_address_from_return_address(pc); | 4902 Address mov_address = Assembler::target_address_from_return_address(pc); |
| 4903 Address cmp_address = mov_address - 2 * Assembler::kInstrSize; | 4903 Address cmp_address = mov_address - 2 * Assembler::kInstrSize; |
| 4904 CodePatcher patcher(cmp_address, 1); | 4904 CodePatcher patcher(unoptimized_code->GetIsolate(), cmp_address, 1); |
| 4905 | 4905 |
| 4906 switch (target_state) { | 4906 switch (target_state) { |
| 4907 case INTERRUPT: { | 4907 case INTERRUPT: { |
| 4908 // <decrement profiling counter> | 4908 // <decrement profiling counter> |
| 4909 // cmpi r6, 0 | 4909 // cmpi r6, 0 |
| 4910 // bge <ok> ;; not changed | 4910 // bge <ok> ;; not changed |
| 4911 // mov r12, <interrupt stub address> | 4911 // mov r12, <interrupt stub address> |
| 4912 // mtlr r12 | 4912 // mtlr r12 |
| 4913 // blrl | 4913 // blrl |
| 4914 // <reset profiling counter> | 4914 // <reset profiling counter> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4960 return ON_STACK_REPLACEMENT; | 4960 return ON_STACK_REPLACEMENT; |
| 4961 } | 4961 } |
| 4962 | 4962 |
| 4963 DCHECK(interrupt_address == | 4963 DCHECK(interrupt_address == |
| 4964 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4964 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4965 return OSR_AFTER_STACK_CHECK; | 4965 return OSR_AFTER_STACK_CHECK; |
| 4966 } | 4966 } |
| 4967 } // namespace internal | 4967 } // namespace internal |
| 4968 } // namespace v8 | 4968 } // namespace v8 |
| 4969 #endif // V8_TARGET_ARCH_PPC | 4969 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |