Home | History | Annotate | Download | only in X86

Lines Matching refs:RetAddr

306   static void X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr);
352 X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
354 assert(*RetAddrLoc == RetAddr &&
358 bool isStub = ((unsigned char*)RetAddr)[0] == 0xCE;
362 RetAddr--; // Backtrack to the reference itself...
364 RetAddr -= 4; // Backtrack to the reference itself...
368 DEBUG(dbgs() << "In callback! Addr=" << (void*)RetAddr
371 << TheVM->getFunctionReferencedName((void*)RetAddr) << "\n");
376 assert(((unsigned char*)RetAddr)[-2] == 0x41 &&"Not a call instr!");
377 assert(((unsigned char*)RetAddr)[-1] == 0xFF &&"Not a call instr!");
379 assert(((unsigned char*)RetAddr)[-1] == 0xE8 &&"Not a call instr!");
382 intptr_t NewVal = (intptr_t)JITCompilerFunction((void*)RetAddr);
391 *(intptr_t *)RetAddr = (intptr_t)(NewVal-RetAddr-4);
404 intptr_t diff = NewVal-RetAddr+7;
406 *(unsigned char*)(RetAddr-0xc) = 0xE9;
407 *(intptr_t *)(RetAddr-0xb) = diff & 0xffffffff;
409 *(intptr_t *)(RetAddr - 0xa) = NewVal;
410 ((unsigned char*)RetAddr)[0] = (2 | (4 << 3) | (3 << 6));
412 sys::ValgrindDiscardTranslations((void*)(RetAddr-0xc), 0xd);
414 ((unsigned char*)RetAddr)[-1] = 0xE9;
415 sys::ValgrindDiscardTranslations((void*)(RetAddr-1), 5);