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

Method isAddressDynamic

source/emulation/softmmu/codePageData.cpp:294–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294bool DecodedOpCache::isAddressDynamic(U32 address, U32 len) {
295 U32 pageIndex = address >> K_PAGE_SHIFT;
296 U8* pageWriteCounts = getWriteCounts(pageIndex, false);
297 if (!pageWriteCounts) {
298 return false;
299 }
300 U32 offset = address & K_PAGE_MASK;
301 U32 end = offset + len;
302 if (end > K_PAGE_SIZE) {
303 U32 pageIndex = address >> K_PAGE_SHIFT;
304 U32 todo = K_PAGE_SIZE - offset;
305 if (isAddressDynamic((pageIndex + 1) << K_PAGE_SHIFT, len - todo)) {
306 return true;
307 }
308 end = K_PAGE_SIZE;
309 }
310 for (U32 i = offset; i < end; i++) {
311 if (pageWriteCounts[i] == MAX_DYNAMIC_COUNT) {
312 return true;
313 }
314 }
315 return false;
316}
317
318DecodedOpPageCache* DecodedOpCache::getPageCache(U32 pageIndex, bool create) {
319 U32 firstIndex = GET_FIRST_INDEX_FROM_PAGE(pageIndex);

Callers 1

getOpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected