VirtualBox

Changeset 9349 in vbox for trunk/src


Ignore:
Timestamp:
Jun 3, 2008 11:56:19 AM (17 years ago)
Author:
vboxsync
Message:

More type fixes for GC execution.

File:
1 edited

Legend:

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

    r9345 r9349  
    5555typedef DECLCALLBACK(uint32_t) PFN_EMULATE_PARAM2(uint32_t *pu32Param1, size_t val2);
    5656typedef DECLCALLBACK(uint32_t) PFN_EMULATE_PARAM3(uint32_t *pu32Param1, uint32_t val2, size_t val3);
    57 typedef DECLCALLBACK(int)      FNEMULATELOCKPARAM2(RTGCPTR GCPtrParam1, RTGCUINTREG Val2, RTGCUINTREG32 *pf);
     57typedef DECLCALLBACK(int)      FNEMULATELOCKPARAM2(RTRCPTR GCPtrParam1, RTGCUINTREG32 Val2, RTGCUINTREG32 *pf);
    5858typedef FNEMULATELOCKPARAM2 *PFNEMULATELOCKPARAM2;
    59 typedef DECLCALLBACK(int)      FNEMULATELOCKPARAM3(RTGCPTR GCPtrParam1, RTGCUINTREG Val2, size_t cb, RTGCUINTREG32 *pf);
     59typedef DECLCALLBACK(int)      FNEMULATELOCKPARAM3(RTRCPTR GCPtrParam1, RTGCUINTREG32 Val2, size_t cb, RTGCUINTREG32 *pf);
    6060typedef FNEMULATELOCKPARAM3 *PFNEMULATELOCKPARAM3;
    6161
     
    367367    switch (pCpu->pCurInstr->opcode)
    368368    {
    369         case OP_XOR:        return "Xor";
     369        case OP_XCHG:       return "Xchg";
     370        case OP_DEC:        return "Dec";
     371        case OP_INC:        return "Inc";
     372        case OP_POP:        return "Pop";
    370373        case OP_OR:         return "Or";
    371374        case OP_AND:        return "And";
     375        case OP_MOV:        return "Mov";
     376        case OP_INVLPG:     return "InvlPg";
     377        case OP_CPUID:      return "CpuId";
     378        case OP_MOV_CR:     return "MovCRx";
     379        case OP_MOV_DR:     return "MovDRx";
     380        case OP_LLDT:       return "LLdt";
     381        case OP_CLTS:       return "Clts";
     382        case OP_MONITOR:    return "Monitor";
     383        case OP_MWAIT:      return "MWait";
     384        case OP_RDMSR:      return "Rdmsr";
     385        case OP_WRMSR:      return "Wrmsr";
     386        case OP_ADC:        return "Adc";
     387        case OP_BTC:        return "Btc";
     388        case OP_RDTSC:      return "Rdtsc";
     389        case OP_STI:        return "Sti";
     390        case OP_XADD:       return "XAdd";
     391        case OP_HLT:        return "Hlt";
     392        case OP_IRET:       return "Iret";
     393        case OP_CMPXCHG:    return "CmpXchg";
     394        case OP_CMPXCHG8B:  return "CmpXchg8b";
     395        case OP_MOVNTPS:    return "MovNTPS";
     396        case OP_STOSWD:     return "StosWD";
     397        case OP_WBINVD:     return "WbInvd";
     398        case OP_XOR:        return "Xor";
    372399        case OP_BTR:        return "Btr";
    373400        case OP_BTS:        return "Bts";
    374401        default:
    375             AssertMsgFailed(("%d\n", pCpu->pCurInstr->opcode));
     402            Log(("Unknown opcode %d\n", pCpu->pCurInstr->opcode));
    376403            return "???";
    377404    }
     
    813840    /* Register and immediate data == PARMTYPE_IMMEDIATE */
    814841    AssertReturn(param2.type == PARMTYPE_IMMEDIATE, VERR_EM_INTERPRETER);
    815     RTGCUINTREG ValPar2 = param2.val.val32;
     842    RTGCUINTREG32 ValPar2 = param2.val.val32;
    816843
    817844    /* Try emulate it with a one-shot #PF handler in place. */
     
    820847    RTGCUINTREG32 eflags = 0;
    821848    MMGCRamRegisterTrapHandler(pVM);
    822     rc = pfnEmulate(GCPtrPar1, ValPar2, pCpu->param2.size, &eflags);
     849    rc = pfnEmulate((RTRCPTR)GCPtrPar1, ValPar2, pCpu->param2.size, &eflags);
    823850    MMGCRamDeregisterTrapHandler(pVM);
    824851
     
    10591086                                  uint32_t *pcbSize, PFNEMULATELOCKPARAM2 pfnEmulate)
    10601087{
     1088        return VERR_EM_INTERPRETER;
    10611089    OP_PARAMVAL param1, param2;
    10621090    int rc = DISQueryParamVal(pRegFrame, pCpu, &pCpu->param1, &param1, PARAM_DEST);
     
    10771105    /* Register and immediate data == PARMTYPE_IMMEDIATE */
    10781106    AssertReturn(param2.type == PARMTYPE_IMMEDIATE, VERR_EM_INTERPRETER);
    1079     RTGCUINTREG ValPar2 = param2.val.val32;
     1107    RTGCUINTREG32 ValPar2 = param2.val.val32;
    10801108
    10811109    Log2(("emInterpretLockBitTest %s: pvFault=%VGv GCPtrPar1=%RGv imm=%RGr\n", emGetMnemonic(pCpu), pvFault, GCPtrPar1, ValPar2));
     
    10941122    RTGCUINTREG32 eflags = 0;
    10951123    MMGCRamRegisterTrapHandler(pVM);
    1096     rc = pfnEmulate(GCPtrPar1, ValPar2, &eflags);
     1124    rc = pfnEmulate((RTRCPTR)GCPtrPar1, ValPar2, &eflags);
    10971125    MMGCRamDeregisterTrapHandler(pVM);
    10981126
     
    22892317
    22902318    int rc;
     2319#if defined(IN_GC) && (defined(VBOX_STRICT) || defined(LOG_ENABLED))
     2320    LogFlow(("emInterpretInstructionCPU %s\n", emGetMnemonic(pCpu)));
     2321#endif
    22912322    switch (pCpu->pCurInstr->opcode)
    22922323    {
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