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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 4907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4918 return load_address; | 4918 return load_address; |
4919 } | 4919 } |
4920 | 4920 |
4921 | 4921 |
4922 void BackEdgeTable::PatchAt(Code* unoptimized_code, | 4922 void BackEdgeTable::PatchAt(Code* unoptimized_code, |
4923 Address pc, | 4923 Address pc, |
4924 BackEdgeState target_state, | 4924 BackEdgeState target_state, |
4925 Code* replacement_code) { | 4925 Code* replacement_code) { |
4926 Address pc_immediate_load_address = GetInterruptImmediateLoadAddress(pc); | 4926 Address pc_immediate_load_address = GetInterruptImmediateLoadAddress(pc); |
4927 Address branch_address = pc_immediate_load_address - Assembler::kInstrSize; | 4927 Address branch_address = pc_immediate_load_address - Assembler::kInstrSize; |
4928 CodePatcher patcher(branch_address, 1); | 4928 CodePatcher patcher(unoptimized_code->GetIsolate(), branch_address, 1); |
4929 switch (target_state) { | 4929 switch (target_state) { |
4930 case INTERRUPT: | 4930 case INTERRUPT: |
4931 { | 4931 { |
4932 // <decrement profiling counter> | 4932 // <decrement profiling counter> |
4933 // bpl ok | 4933 // bpl ok |
4934 // ; load interrupt stub address into ip - either of (for ARMv7): | 4934 // ; load interrupt stub address into ip - either of (for ARMv7): |
4935 // ; <small cp load> | <extended cp load> | <immediate load> | 4935 // ; <small cp load> | <extended cp load> | <immediate load> |
4936 // ldr ip, [pc/pp, #imm] | movw ip, #imm | movw ip, #imm | 4936 // ldr ip, [pc/pp, #imm] | movw ip, #imm | movw ip, #imm |
4937 // | movt ip, #imm | movw ip, #imm | 4937 // | movt ip, #imm | movw ip, #imm |
4938 // | ldr ip, [pp, ip] | 4938 // | ldr ip, [pp, ip] |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5012 DCHECK(interrupt_address == | 5012 DCHECK(interrupt_address == |
5013 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5013 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5014 return OSR_AFTER_STACK_CHECK; | 5014 return OSR_AFTER_STACK_CHECK; |
5015 } | 5015 } |
5016 | 5016 |
5017 | 5017 |
5018 } // namespace internal | 5018 } // namespace internal |
5019 } // namespace v8 | 5019 } // namespace v8 |
5020 | 5020 |
5021 #endif // V8_TARGET_ARCH_ARM | 5021 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |