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

Side by Side Diff: src/ia32/assembler-ia32.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: update to catch 2nd usage 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
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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // and the return address 526 // and the return address
527 static const int kCallTargetAddressOffset = kPointerSize; 527 static const int kCallTargetAddressOffset = kPointerSize;
528 // Distance between start of patched return sequence and the emitted address 528 // Distance between start of patched return sequence and the emitted address
529 // to jump to. 529 // to jump to.
530 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. 530 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32.
531 531
532 // Distance between start of patched debug break slot and the emitted address 532 // Distance between start of patched debug break slot and the emitted address
533 // to jump to. 533 // to jump to.
534 static const int kPatchDebugBreakSlotAddressOffset = 1; // JMP imm32. 534 static const int kPatchDebugBreakSlotAddressOffset = 1; // JMP imm32.
535 535
536 // Return the code target address of the patch debug break slot
537 inline static Address break_address_from_break_address(Address pc);
538
536 static const int kCallInstructionLength = 5; 539 static const int kCallInstructionLength = 5;
537 static const int kPatchDebugBreakSlotReturnOffset = kPointerSize; 540 static const int kPatchDebugBreakSlotReturnOffset = kPointerSize;
538 static const int kJSReturnSequenceLength = 6; 541 static const int kJSReturnSequenceLength = 6;
539 542
540 // The debug break slot must be able to contain a call instruction. 543 // The debug break slot must be able to contain a call instruction.
541 static const int kDebugBreakSlotLength = kCallInstructionLength; 544 static const int kDebugBreakSlotLength = kCallInstructionLength;
542 545
543 // One byte opcode for test al, 0xXX. 546 // One byte opcode for test al, 0xXX.
544 static const byte kTestAlByte = 0xA8; 547 static const byte kTestAlByte = 0xA8;
545 // One byte opcode for nop. 548 // One byte opcode for nop.
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 private: 1163 private:
1161 Assembler* assembler_; 1164 Assembler* assembler_;
1162 #ifdef DEBUG 1165 #ifdef DEBUG
1163 int space_before_; 1166 int space_before_;
1164 #endif 1167 #endif
1165 }; 1168 };
1166 1169
1167 } } // namespace v8::internal 1170 } } // namespace v8::internal
1168 1171
1169 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1172 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« src/arm/assembler-arm.h ('K') | « src/debug.cc ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698