VirtualBox

Changeset 10276 in vbox


Ignore:
Timestamp:
Jul 5, 2008 1:47:48 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
32888
Message:

Handle 64 bits index (SIB).

Location:
trunk/src/VBox/Disassembler
Files:
2 edited

Legend:

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

    r10272 r10276  
    562562        if (pParam->flags & USE_INDEX)
    563563        {
    564             uint32_t val32;
    565 
    566             pParamVal->flags |= PARAM_VAL32;
    567             if (VBOX_FAILURE(DISFetchReg32(pCtx, pParam->index.reg_gen, &val32))) return VERR_INVALID_PARAMETER;
     564            uint64_t val64;
     565
     566            if (pParam->flags & USE_REG_GEN32)
     567            {
     568                uint32_t val32;
     569
     570                pParamVal->flags |= PARAM_VAL32;
     571                if (VBOX_FAILURE(DISFetchReg32(pCtx, pParam->index.reg_gen, &val32))) return VERR_INVALID_PARAMETER;
     572
     573                val64 = val32;
     574            }
     575            else
     576            if (pParam->flags & USE_REG_GEN64)
     577            {
     578                pParamVal->flags |= PARAM_VAL64;
     579                if (VBOX_FAILURE(DISFetchReg64(pCtx, pParam->index.reg_gen, &val64))) return VERR_INVALID_PARAMETER;
     580            }
    568581
    569582            if (pParam->flags & USE_SCALE)
    570                 val32 *= pParam->scale;
    571 
    572             pParamVal->val.val32 += val32;
     583                val64 *= pParam->scale;
     584
     585            pParamVal->val.val64 += val64;
    573586        }
    574587
  • trunk/src/VBox/Disassembler/DisasmTest.cpp

    r10275 r10276  
    7878            char         szOutput[256];
    7979
    80 __debugbreak();
    8180            memset(&cpu, 0, sizeof(cpu));
    8281            cpu.mode = CPUMODE_64BIT;
Note: See TracChangeset for help on using the changeset viewer.

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