VirtualBox

Changeset 41797 in vbox


Ignore:
Timestamp:
Jun 17, 2012 2:52:09 AM (13 years ago)
Author:
vboxsync
Message:

tstDisasm-1: use out own callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp

    r41790 r41797  
    7676}
    7777
     78
     79static 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
    7887static void testPerformance(const char *pszSub, uint8_t const *pabInstrs, uintptr_t uEndPtr, DISCPUMODE enmDisCpuMode)
    7988{
     
    8998            uint32_t    cb = 1;
    9099            DISSTATE    Dis;
    91             DISInstr(&pabInstrs[off], enmDisCpuMode, &Dis, &cb);
     100            DISInstrWithReader((uintptr_t)&pabInstrs[off], enmDisCpuMode, testReadBytes, NULL, &Dis, &cb);
    92101            off += cb;
    93102        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette