Changeset 41797 in vbox
- Timestamp:
- Jun 17, 2012 2:52:09 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
r41790 r41797 76 76 } 77 77 78 79 static DECLCALLBACK(int) testReadBytes(PDISSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead) 80 { 81 memcpy(&pDis->abInstr[offInstr], (void *)((uintptr_t)pDis->uInstrAddr + offInstr), cbMaxRead); 82 pDis->cbCachedInstr = offInstr + cbMaxRead; 83 return VINF_SUCCESS; 84 } 85 86 78 87 static void testPerformance(const char *pszSub, uint8_t const *pabInstrs, uintptr_t uEndPtr, DISCPUMODE enmDisCpuMode) 79 88 { … … 89 98 uint32_t cb = 1; 90 99 DISSTATE Dis; 91 DISInstr (&pabInstrs[off], enmDisCpuMode, &Dis, &cb);100 DISInstrWithReader((uintptr_t)&pabInstrs[off], enmDisCpuMode, testReadBytes, NULL, &Dis, &cb); 92 101 off += cb; 93 102 }
Note:
See TracChangeset
for help on using the changeset viewer.