OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 case PcDescriptors::kIcCall: { | 54 case PcDescriptors::kIcCall: { |
55 int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); | 55 int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); |
56 ASSERT((offset > 0) && ((offset % 8) == 7)); | 56 ASSERT((offset > 0) && ((offset % 8) == 7)); |
57 saved_value_ = static_cast<uword>(offset); | 57 saved_value_ = static_cast<uword>(offset); |
58 const int32_t stub_offset = | 58 const int32_t stub_offset = |
59 InstructionPattern::OffsetFromPPIndex( | 59 InstructionPattern::OffsetFromPPIndex( |
60 Assembler::kBreakpointDynamicCPIndex); | 60 Assembler::kBreakpointDynamicCPIndex); |
61 CodePatcher::SetPoolOffsetAt(pc_, stub_offset); | 61 CodePatcher::SetPoolOffsetAt(pc_, stub_offset); |
62 break; | 62 break; |
63 } | 63 } |
64 case PcDescriptors::kUnoptStaticCall: { | 64 case PcDescriptors::kUnoptStaticCall: |
65 int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); | |
66 ASSERT((offset > 0) && ((offset % 8) == 7)); | |
67 saved_value_ = static_cast<uword>(offset); | |
68 const uint32_t stub_offset = | |
69 InstructionPattern::OffsetFromPPIndex( | |
70 Assembler::kBreakpointStaticCPIndex); | |
71 CodePatcher::SetPoolOffsetAt(pc_, stub_offset); | |
72 break; | |
73 } | |
74 case PcDescriptors::kRuntimeCall: | 65 case PcDescriptors::kRuntimeCall: |
75 case PcDescriptors::kClosureCall: | 66 case PcDescriptors::kClosureCall: |
76 case PcDescriptors::kReturn: { | 67 case PcDescriptors::kReturn: { |
77 int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); | 68 int32_t offset = CodePatcher::GetPoolOffsetAt(pc_); |
78 ASSERT((offset > 0) && ((offset % 8) == 7)); | 69 ASSERT((offset > 0) && ((offset % 8) == 7)); |
79 saved_value_ = static_cast<uword>(offset); | 70 saved_value_ = static_cast<uword>(offset); |
80 const uint32_t stub_offset = | 71 const uint32_t stub_offset = |
81 InstructionPattern::OffsetFromPPIndex( | 72 InstructionPattern::OffsetFromPPIndex( |
82 Assembler::kBreakpointRuntimeCPIndex); | 73 Assembler::kBreakpointRuntimeCPIndex); |
83 CodePatcher::SetPoolOffsetAt(pc_, stub_offset); | 74 CodePatcher::SetPoolOffsetAt(pc_, stub_offset); |
(...skipping 20 matching lines...) Expand all Loading... |
104 default: | 95 default: |
105 UNREACHABLE(); | 96 UNREACHABLE(); |
106 } | 97 } |
107 is_enabled_ = false; | 98 is_enabled_ = false; |
108 } | 99 } |
109 | 100 |
110 | 101 |
111 } // namespace dart | 102 } // namespace dart |
112 | 103 |
113 #endif // defined TARGET_ARCH_X64 | 104 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |