| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 if (mode == UPDATE_WRITE_BARRIER && | 363 if (mode == UPDATE_WRITE_BARRIER && |
| 364 host() != NULL) { | 364 host() != NULL) { |
| 365 // TODO(1550) We are passing NULL as a slot because cell can never be on | 365 // TODO(1550) We are passing NULL as a slot because cell can never be on |
| 366 // evacuation candidate. | 366 // evacuation candidate. |
| 367 host()->GetHeap()->incremental_marking()->RecordWrite( | 367 host()->GetHeap()->incremental_marking()->RecordWrite( |
| 368 host(), NULL, cell); | 368 host(), NULL, cell); |
| 369 } | 369 } |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 void RelocInfo::WipeOut() { |
| 374 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_)) { |
| 375 Memory::Address_at(pc_) = NULL; |
| 376 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
| 377 Assembler::set_target_address_at(pc_, pc_ + sizeof(int32_t)); |
| 378 } else { |
| 379 UNREACHABLE(); |
| 380 } |
| 381 } |
| 382 |
| 383 |
| 373 bool RelocInfo::IsPatchedReturnSequence() { | 384 bool RelocInfo::IsPatchedReturnSequence() { |
| 374 // The recognized call sequence is: | 385 // The recognized call sequence is: |
| 375 // movq(kScratchRegister, address); call(kScratchRegister); | 386 // movq(kScratchRegister, address); call(kScratchRegister); |
| 376 // It only needs to be distinguished from a return sequence | 387 // It only needs to be distinguished from a return sequence |
| 377 // movq(rsp, rbp); pop(rbp); ret(n); int3 *6 | 388 // movq(rsp, rbp); pop(rbp); ret(n); int3 *6 |
| 378 // The 11th byte is int3 (0xCC) in the return sequence and | 389 // The 11th byte is int3 (0xCC) in the return sequence and |
| 379 // REX.WB (0x48+register bit) for the call sequence. | 390 // REX.WB (0x48+register bit) for the call sequence. |
| 380 #ifdef ENABLE_DEBUGGER_SUPPORT | 391 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 381 return pc_[Assembler::kMoveAddressIntoScratchRegisterInstructionLength] != | 392 return pc_[Assembler::kMoveAddressIntoScratchRegisterInstructionLength] != |
| 382 0xCC; | 393 0xCC; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 ASSERT(len_ == 1 || len_ == 2); | 556 ASSERT(len_ == 1 || len_ == 2); |
| 546 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 557 int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); |
| 547 *p = disp; | 558 *p = disp; |
| 548 len_ += sizeof(int32_t); | 559 len_ += sizeof(int32_t); |
| 549 } | 560 } |
| 550 | 561 |
| 551 | 562 |
| 552 } } // namespace v8::internal | 563 } } // namespace v8::internal |
| 553 | 564 |
| 554 #endif // V8_X64_ASSEMBLER_X64_INL_H_ | 565 #endif // V8_X64_ASSEMBLER_X64_INL_H_ |
| OLD | NEW |