VirtualBox

Changeset 9651 in vbox


Ignore:
Timestamp:
Jun 12, 2008 9:57:20 AM (17 years ago)
Author:
vboxsync
Message:

64 bits DRx move emulation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r9649 r9651  
    19051905    int rc = CPUMGetGuestDRx(pVM, SrcRegDrx, &val64);
    19061906    AssertMsgRCReturn(rc, ("CPUMGetGuestDRx %d failed\n", SrcRegDrx), VERR_EM_INTERPRETER);
    1907     rc = DISWriteReg32(pRegFrame, DestRegGen, (uint32_t)val64);
     1907    if (CPUMIsGuestInLongMode(pVM))
     1908    {
     1909        rc = DISWriteReg64(pRegFrame, DestRegGen, val64);
     1910    }
     1911    else
     1912        rc = DISWriteReg32(pRegFrame, DestRegGen, (uint32_t)val64);
     1913
    19081914    if (VBOX_SUCCESS(rc))
    19091915        return VINF_SUCCESS;
     1916
    19101917    return VERR_EM_INTERPRETER;
    19111918}
     
    19151922    int rc = VERR_EM_INTERPRETER;
    19161923
    1917     if(pCpu->param1.flags == USE_REG_GEN32 && pCpu->param2.flags == USE_REG_DBG)
     1924    if((pCpu->param1.flags == USE_REG_GEN32 || pCpu->param1.flags == USE_REG_GEN64) && pCpu->param2.flags == USE_REG_DBG)
    19181925    {
    19191926        rc = EMInterpretDRxRead(pVM, pRegFrame, pCpu->param1.base.reg_gen, pCpu->param2.base.reg_dbg);
    19201927    }
    19211928    else
    1922     if(pCpu->param1.flags == USE_REG_DBG && pCpu->param2.flags == USE_REG_GEN32)
     1929    if(pCpu->param1.flags == USE_REG_DBG && (pCpu->param2.flags == USE_REG_GEN32 || pCpu->param2.flags == USE_REG_GEN64))
    19231930    {
    19241931        rc = EMInterpretDRxWrite(pVM, pRegFrame, pCpu->param1.base.reg_dbg, pCpu->param2.base.reg_gen);
     
    19261933    else
    19271934        AssertMsgFailed(("Unexpected debug register move\n"));
     1935
    19281936    return rc;
    19291937}
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