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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 // TODO(1550) We are passing NULL as a slot because cell can never be on | 366 // TODO(1550) We are passing NULL as a slot because cell can never be on |
367 // evacuation candidate. | 367 // evacuation candidate. |
368 host()->GetHeap()->incremental_marking()->RecordWrite( | 368 host()->GetHeap()->incremental_marking()->RecordWrite( |
369 host(), NULL, cell); | 369 host(), NULL, cell); |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 | 373 |
374 bool RelocInfo::IsPatchedReturnSequence() { | 374 bool RelocInfo::IsPatchedReturnSequence() { |
375 // The recognized call sequence is: | 375 // The recognized call sequence is: |
376 // movq(kScratchRegister, immediate64); call(kScratchRegister); | 376 // movq(kScratchRegister, address); call(kScratchRegister); |
377 // It only needs to be distinguished from a return sequence | 377 // It only needs to be distinguished from a return sequence |
378 // movq(rsp, rbp); pop(rbp); ret(n); int3 *6 | 378 // movq(rsp, rbp); pop(rbp); ret(n); int3 *6 |
379 // The 11th byte is int3 (0xCC) in the return sequence and | 379 // The 11th byte is int3 (0xCC) in the return sequence and |
380 // REX.WB (0x48+register bit) for the call sequence. | 380 // REX.WB (0x48+register bit) for the call sequence. |
381 #ifdef ENABLE_DEBUGGER_SUPPORT | 381 #ifdef ENABLE_DEBUGGER_SUPPORT |
382 return pc_[2 + kPointerSize] != 0xCC; | 382 return pc_[Assembler::kMoveAddressIntoScratchRegisterInstructionSize] != 0xCC; |
383 #else | 383 #else |
384 return false; | 384 return false; |
385 #endif | 385 #endif |
386 } | 386 } |
387 | 387 |
388 | 388 |
389 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { | 389 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { |
390 return !Assembler::IsNop(pc()); | 390 return !Assembler::IsNop(pc()); |
391 } | 391 } |
392 | 392 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 ASSERT(len_ == 1 || len_ == 2); | 539 ASSERT(len_ == 1 || len_ == 2); |
540 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 540 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
541 *p = disp; | 541 *p = disp; |
542 len_ += sizeof(int32_t); | 542 len_ += sizeof(int32_t); |
543 } | 543 } |
544 | 544 |
545 | 545 |
546 } } // namespace v8::internal | 546 } } // namespace v8::internal |
547 | 547 |
548 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 548 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
OLD | NEW |