MCPcopy Create free account
hub / github.com/WheretIB/nullc / MemFind

Function MemFind

NULLC/CodeGen_X86.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 unsigned int mCacheEntries = 0;
41
42 unsigned MemFind(const x86Argument &address)
43 {
44 for(unsigned int i = 0; i < MEMORY_STATE_SIZE; i++)
45 {
46 if(mCache[i].value.type != x86Argument::argNone && mCache[i].address.type != x86Argument::argNone &&
47 mCache[i].address.ptrSize == address.ptrSize && mCache[i].address.ptrNum == address.ptrNum &&
48 mCache[i].address.ptrBase == address.ptrBase && mCache[i].address.ptrIndex == address.ptrIndex)
49 {
50 return i;
51 }
52 }
53 return ~0u;
54 }
55 void MemWrite(const x86Argument &address, const x86Argument &value)
56 {
57 unsigned int index = MemFind(address);

Callers 3

MemWriteFunction · 0.85
EMIT_OP_RPTRFunction · 0.85
EMIT_OP_REG_RPTRFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected