Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 427863003: Abstract out fetching of break_address in debug mode (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address formatting comment Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x87/assembler-x87.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_
6 #define V8_X64_ASSEMBLER_X64_INL_H_ 6 #define V8_X64_ASSEMBLER_X64_INL_H_
7 7
8 #include "src/x64/assembler-x64.h" 8 #include "src/x64/assembler-x64.h"
9 9
10 #include "src/base/cpu.h" 10 #include "src/base/cpu.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 CpuFeatures::FlushICache(pc, sizeof(int32_t)); 199 CpuFeatures::FlushICache(pc, sizeof(int32_t));
200 } 200 }
201 } 201 }
202 202
203 203
204 Address Assembler::target_address_from_return_address(Address pc) { 204 Address Assembler::target_address_from_return_address(Address pc) {
205 return pc - kCallTargetAddressOffset; 205 return pc - kCallTargetAddressOffset;
206 } 206 }
207 207
208 208
209 Address Assembler::break_address_from_return_address(Address pc) {
210 return pc - Assembler::kPatchDebugBreakSlotReturnOffset;
211 }
212
213
209 Handle<Object> Assembler::code_target_object_handle_at(Address pc) { 214 Handle<Object> Assembler::code_target_object_handle_at(Address pc) {
210 return code_targets_[Memory::int32_at(pc)]; 215 return code_targets_[Memory::int32_at(pc)];
211 } 216 }
212 217
213 218
214 Address Assembler::runtime_entry_at(Address pc) { 219 Address Assembler::runtime_entry_at(Address pc) {
215 return Memory::int32_at(pc) + isolate()->code_range()->start(); 220 return Memory::int32_at(pc) + isolate()->code_range()->start();
216 } 221 }
217 222
218 // ----------------------------------------------------------------------------- 223 // -----------------------------------------------------------------------------
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 ASSERT(len_ == 1 || len_ == 2); 554 ASSERT(len_ == 1 || len_ == 2);
550 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); 555 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]);
551 *p = disp; 556 *p = disp;
552 len_ += sizeof(int32_t); 557 len_ += sizeof(int32_t);
553 } 558 }
554 559
555 560
556 } } // namespace v8::internal 561 } } // namespace v8::internal
557 562
558 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 563 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x87/assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698