Lines Matching refs:pc

80 static uint32_t GetInstructionSize(const uint8_t* pc) {  in GetInstructionSize()  argument
83 ssize_t bytes = SafeCopy(buf, pc, sizeof(buf)); in GetInstructionSize()
94 pc = reinterpret_cast<uint8_t*>(buf); in GetInstructionSize()
99 pc++; \ in GetInstructionSize()
100 if (pc - startpc > bytes) { \ in GetInstructionSize()
111 const uint8_t* startpc = pc; in GetInstructionSize()
113 uint8_t opcode = *pc; in GetInstructionSize()
146 opcode = *pc; in GetInstructionSize()
157 opcode = *pc; in GetInstructionSize()
164 opcode = *pc; in GetInstructionSize()
178 modrm = *pc; in GetInstructionSize()
198 modrm = *pc; in GetInstructionSize()
206 modrm = *pc; in GetInstructionSize()
214 modrm = *pc; in GetInstructionSize()
222 modrm = *pc; in GetInstructionSize()
271 pc += displacement_size + immediate_size; in GetInstructionSize()
273 VLOG(signals) << "x86 instruction length calculated as " << (pc - startpc); in GetInstructionSize()
274 if (pc - startpc > bytes) { in GetInstructionSize()
277 return pc - startpc; in GetInstructionSize()
310 uint8_t* pc = reinterpret_cast<uint8_t*>(uc->CTX_EIP); in GetMethodAndReturnPcAndSp() local
311 VLOG(signals) << HexDump(pc, 32, true, "PC "); in GetMethodAndReturnPcAndSp()
313 if (pc == nullptr) { in GetMethodAndReturnPcAndSp()
319 uint32_t instr_size = GetInstructionSize(pc); in GetMethodAndReturnPcAndSp()
325 *out_return_pc = reinterpret_cast<uintptr_t>(pc + instr_size); in GetMethodAndReturnPcAndSp()
333 uint8_t* pc = reinterpret_cast<uint8_t*>(uc->CTX_EIP); in Action() local
336 uint32_t instr_size = GetInstructionSize(pc); in Action()
348 uintptr_t retaddr = reinterpret_cast<uintptr_t>(pc + instr_size); in Action()
389 uint8_t* pc = reinterpret_cast<uint8_t*>(uc->CTX_EIP); in Action() local
392 if (pc[0] != checkinst2[0] || pc[1] != checkinst2[1]) { in Action()
400 uint8_t* limit = pc - 100; // Compiler will hoist to a max of 20 instructions. in Action()
401 uint8_t* ptr = pc - sizeof(checkinst1); in Action()
420 uintptr_t retaddr = reinterpret_cast<uintptr_t>(pc + 2); in Action()