MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / opCallback

Function opCallback

source/kernel/kmemory.cpp:543–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541
542#if defined(BOXEDWINE_JIT)
543static void opCallback(U32 address, DecodedOp* op, void* p) {
544 KMemory* memory = (KMemory*)p;
545 if (op->blockStart) {
546 // Normal and JIT cpu's don't need to track eip on an op except for this case, but I don't think it's really worth increasing
547 // the size of DecodedOp just for this
548 DecodedOp* nextOp = op->blockStart;
549 U32 len = 0;
550 while (nextOp != op) {
551 len += nextOp->len;
552 nextOp = nextOp->next;
553 }
554 U32 blockAddress = address - len;
555 memory->removeCodeBlock(blockAddress, op->blockStart, true);
556 }
557}
558#endif
559void KMemory::removeCode(KThread* thread, U32 address, U32 len, bool becauseOfWrite) {
560 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(mutex)

Callers

nothing calls this directly

Calls 1

removeCodeBlockMethod · 0.80

Tested by

no test coverage detected