OLD | NEW |
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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 // and the return address | 515 // and the return address |
516 static const int kCallTargetAddressOffset = kPointerSize; | 516 static const int kCallTargetAddressOffset = kPointerSize; |
517 // Distance between start of patched return sequence and the emitted address | 517 // Distance between start of patched return sequence and the emitted address |
518 // to jump to. | 518 // to jump to. |
519 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. | 519 static const int kPatchReturnSequenceAddressOffset = 1; // JMP imm32. |
520 | 520 |
521 // Distance between start of patched debug break slot and the emitted address | 521 // Distance between start of patched debug break slot and the emitted address |
522 // to jump to. | 522 // to jump to. |
523 static const int kPatchDebugBreakSlotAddressOffset = 1; // JMP imm32. | 523 static const int kPatchDebugBreakSlotAddressOffset = 1; // JMP imm32. |
524 | 524 |
| 525 // Return the code target address of the patch debug break slot |
| 526 inline static Address break_address_from_break_address(Address pc); |
| 527 |
525 static const int kCallInstructionLength = 5; | 528 static const int kCallInstructionLength = 5; |
526 static const int kPatchDebugBreakSlotReturnOffset = kPointerSize; | 529 static const int kPatchDebugBreakSlotReturnOffset = kPointerSize; |
527 static const int kJSReturnSequenceLength = 6; | 530 static const int kJSReturnSequenceLength = 6; |
528 | 531 |
529 // The debug break slot must be able to contain a call instruction. | 532 // The debug break slot must be able to contain a call instruction. |
530 static const int kDebugBreakSlotLength = kCallInstructionLength; | 533 static const int kDebugBreakSlotLength = kCallInstructionLength; |
531 | 534 |
532 // One byte opcode for test al, 0xXX. | 535 // One byte opcode for test al, 0xXX. |
533 static const byte kTestAlByte = 0xA8; | 536 static const byte kTestAlByte = 0xA8; |
534 // One byte opcode for nop. | 537 // One byte opcode for nop. |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 private: | 1025 private: |
1023 Assembler* assembler_; | 1026 Assembler* assembler_; |
1024 #ifdef DEBUG | 1027 #ifdef DEBUG |
1025 int space_before_; | 1028 int space_before_; |
1026 #endif | 1029 #endif |
1027 }; | 1030 }; |
1028 | 1031 |
1029 } } // namespace v8::internal | 1032 } } // namespace v8::internal |
1030 | 1033 |
1031 #endif // V8_X87_ASSEMBLER_X87_H_ | 1034 #endif // V8_X87_ASSEMBLER_X87_H_ |
OLD | NEW |