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

Side by Side Diff: src/arm/assembler-arm-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/arm/assembler-arm.h ('k') | src/arm64/assembler-arm64.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return candidate; 451 return candidate;
452 } else { 452 } else {
453 candidate = pc - 3 * Assembler::kInstrSize; 453 candidate = pc - 3 * Assembler::kInstrSize;
454 ASSERT(IsMovW(Memory::int32_at(candidate)) && 454 ASSERT(IsMovW(Memory::int32_at(candidate)) &&
455 IsMovT(Memory::int32_at(candidate + kInstrSize))); 455 IsMovT(Memory::int32_at(candidate + kInstrSize)));
456 return candidate; 456 return candidate;
457 } 457 }
458 } 458 }
459 459
460 460
461 Address Assembler::break_address_from_return_address(Address pc) {
462 return pc - Assembler::kPatchDebugBreakSlotReturnOffset;
463 }
464
465
461 Address Assembler::return_address_from_call_start(Address pc) { 466 Address Assembler::return_address_from_call_start(Address pc) {
462 if (IsLdrPcImmediateOffset(Memory::int32_at(pc)) | 467 if (IsLdrPcImmediateOffset(Memory::int32_at(pc)) |
463 IsLdrPpImmediateOffset(Memory::int32_at(pc))) { 468 IsLdrPpImmediateOffset(Memory::int32_at(pc))) {
464 // Load from constant pool, small section. 469 // Load from constant pool, small section.
465 return pc + kInstrSize * 2; 470 return pc + kInstrSize * 2;
466 } else { 471 } else {
467 ASSERT(IsMovW(Memory::int32_at(pc))); 472 ASSERT(IsMovW(Memory::int32_at(pc)));
468 ASSERT(IsMovT(Memory::int32_at(pc + kInstrSize))); 473 ASSERT(IsMovT(Memory::int32_at(pc + kInstrSize)));
469 if (IsLdrPpRegOffset(Memory::int32_at(pc + kInstrSize))) { 474 if (IsLdrPpRegOffset(Memory::int32_at(pc + kInstrSize))) {
470 // Load from constant pool, extended section. 475 // Load from constant pool, extended section.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 574 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
570 CpuFeatures::FlushICache(pc, 2 * kInstrSize); 575 CpuFeatures::FlushICache(pc, 2 * kInstrSize);
571 } 576 }
572 } 577 }
573 } 578 }
574 579
575 580
576 } } // namespace v8::internal 581 } } // namespace v8::internal
577 582
578 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ 583 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm64/assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698