| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 | 363 |
| 364 bool RelocInfo::IsPatchedReturnSequence() { | 364 bool RelocInfo::IsPatchedReturnSequence() { |
| 365 // The recognized call sequence is: | 365 // The recognized call sequence is: |
| 366 // movq(kScratchRegister, immediate64); call(kScratchRegister); | 366 // movq(kScratchRegister, immediate64); call(kScratchRegister); |
| 367 // It only needs to be distinguished from a return sequence | 367 // It only needs to be distinguished from a return sequence |
| 368 // movq(rsp, rbp); pop(rbp); ret(n); int3 *6 | 368 // movq(rsp, rbp); pop(rbp); ret(n); int3 *6 |
| 369 // The 11th byte is int3 (0xCC) in the return sequence and | 369 // The 11th byte is int3 (0xCC) in the return sequence and |
| 370 // REX.WB (0x48+register bit) for the call sequence. | 370 // REX.WB (0x48+register bit) for the call sequence. |
| 371 #ifdef ENABLE_DEBUGGER_SUPPORT | 371 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 372 return pc_[10] != 0xCC; | 372 return pc_[2 + kPointerSize] != 0xCC; |
| 373 #else | 373 #else |
| 374 return false; | 374 return false; |
| 375 #endif | 375 #endif |
| 376 } | 376 } |
| 377 | 377 |
| 378 | 378 |
| 379 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { | 379 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { |
| 380 return !Assembler::IsNop(pc()); | 380 return !Assembler::IsNop(pc()); |
| 381 } | 381 } |
| 382 | 382 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 ASSERT(len_ == 1 || len_ == 2); | 529 ASSERT(len_ == 1 || len_ == 2); |
| 530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 530 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
| 531 *p = disp; | 531 *p = disp; |
| 532 len_ += sizeof(int32_t); | 532 len_ += sizeof(int32_t); |
| 533 } | 533 } |
| 534 | 534 |
| 535 | 535 |
| 536 } } // namespace v8::internal | 536 } } // namespace v8::internal |
| 537 | 537 |
| 538 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 538 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
| OLD | NEW |