VirtualBox

Changeset 41782 in vbox for trunk/src/VBox/Disassembler


Ignore:
Timestamp:
Jun 16, 2012 7:11:27 PM (12 years ago)
Author:
vboxsync
Message:

Missing copy & past fixups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r41781 r41782  
    313313    }
    314314
    315     if (off <= pCpu->cbCachedInstr)
    316         disReadMore(pCpu, off, 1);
    317 
     315    disReadMore(pCpu, off, 1);
    318316    return pCpu->abInstr[off];
    319317}
     
    368366    }
    369367
    370     if (off + 2 < pCpu->cbCachedInstr)
    371         disReadMore(pCpu, off, 2);
    372 
     368    disReadMore(pCpu, off, 2);
    373369#ifdef DIS_HOST_UNALIGNED_ACCESS_OK
    374370    return *(uint16_t const *)&pCpu->abInstr[off];
     
    422418DECL_NO_INLINE(static, uint32_t) disReadDWordSlow(PDISCPUSTATE pCpu, RTUINTPTR off)
    423419{
    424     if (RT_UNLIKELY(off + 2 > DIS_MAX_INSTR_LENGTH))
     420    if (RT_UNLIKELY(off + 4 > DIS_MAX_INSTR_LENGTH))
    425421    {
    426422        Log(("disReadDWord: too long instruction...\n"));
     
    438434    }
    439435
    440     if (off + 2 < pCpu->cbCachedInstr)
    441         disReadMore(pCpu, off, 2);
    442 
     436    disReadMore(pCpu, off, 4);
    443437#ifdef DIS_HOST_UNALIGNED_ACCESS_OK
    444438    return *(uint32_t const *)&pCpu->abInstr[off];
     
    458452DECLINLINE(uint32_t) disReadDWordByOff(PDISCPUSTATE pCpu, RTUINTPTR off)
    459453{
    460     if (RT_UNLIKELY(off + 2 > pCpu->cbCachedInstr))
     454    if (RT_UNLIKELY(off + 4 > pCpu->cbCachedInstr))
    461455        return disReadDWordSlow(pCpu, off);
    462456
     
    492486DECL_NO_INLINE(static, uint64_t) disReadQWordSlow(PDISCPUSTATE pCpu, RTUINTPTR off)
    493487{
    494     if (RT_UNLIKELY(off + 2 > DIS_MAX_INSTR_LENGTH))
     488    if (RT_UNLIKELY(off + 8 > DIS_MAX_INSTR_LENGTH))
    495489    {
    496490        Log(("disReadQWord: too long instruction...\n"));
     
    517511    }
    518512
    519     if (off + 2 < pCpu->cbCachedInstr)
    520         disReadMore(pCpu, off, 2);
    521 
     513    disReadMore(pCpu, off, 8);
    522514#ifdef DIS_HOST_UNALIGNED_ACCESS_OK
    523515    return *(uint64_t const *)&pCpu->abInstr[off];
     
    538530DECLINLINE(uint64_t) disReadQWordByOff(PDISCPUSTATE pCpu, RTUINTPTR off)
    539531{
    540     if (RT_UNLIKELY(off + 2 > pCpu->cbCachedInstr))
     532    if (RT_UNLIKELY(off + 8 > pCpu->cbCachedInstr))
    541533        return disReadQWordSlow(pCpu, off);
    542534
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