Chromium Code Reviews| Index: src/x64/assembler-x64-inl.h |
| =================================================================== |
| --- src/x64/assembler-x64-inl.h (revision 15486) |
| +++ src/x64/assembler-x64-inl.h (working copy) |
| @@ -51,11 +51,26 @@ |
| } |
| +#ifdef V8_TARGET_ARCH_X32 |
| +void Assembler::emitl(uint32_t x, RelocInfo::Mode rmode) { |
| + Memory::uint32_at(pc_) = x; |
| + if (!RelocInfo::IsNone(rmode)) { |
| + RecordRelocInfo(rmode, x); |
| + } |
| + pc_ += sizeof(uint32_t); |
| +} |
| +#endif |
| + |
| + |
| void Assembler::emitq(uint64_t x, RelocInfo::Mode rmode) { |
|
danno
2013/07/17 13:33:21
does it make sense to turn this into emit(intptr_t
|
| Memory::uint64_at(pc_) = x; |
| +#ifndef V8_TARGET_ARCH_X32 |
| if (!RelocInfo::IsNone(rmode)) { |
| RecordRelocInfo(rmode, x); |
| } |
| +#else |
| + ASSERT(RelocInfo::IsNone(rmode)); |
| +#endif |
| pc_ += sizeof(uint64_t); |
| } |
| @@ -369,8 +384,18 @@ |
| // The 11th byte is int3 (0xCC) in the return sequence and |
| // REX.WB (0x48+register bit) for the call sequence. |
| #ifdef ENABLE_DEBUGGER_SUPPORT |
| +#ifndef V8_TARGET_ARCH_X32 |
| return pc_[10] != 0xCC; |
|
danno
2013/07/17 13:33:21
Cant this be one version with pc_[2 + kRegisterSiz
|
| #else |
| + // The recognized call sequence is: |
| + // movl(kScratchRegister, immediate32); call(kScratchRegister); |
| + // It only needs to be distinguished from a return sequence |
| + // movl(rsp, rbp); pop(rbp); ret(n); int3 *3 |
| + // The 7th byte is int3 (0xCC) in the return sequence and |
| + // call (0x41) for the call sequence. |
| + return pc_[6] != 0xCC; |
| +#endif |
| +#else |
| return false; |
| #endif |
| } |