VirtualBox

Changeset 9713 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 16, 2008 11:53:37 AM (17 years ago)
Author:
vboxsync
Message:

More eip -> rip changes.

Location:
trunk/src/VBox/VMM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/EM.cpp

    r9712 r9713  
    12401240            if (VBOX_SUCCESS(rc))
    12411241            {
    1242                 pCtx->eip += Cpu.opsize;
     1242                pCtx->rip += Cpu.opsize;
    12431243                STAM_PROFILE_STOP(&pVM->em.s.StatMiscEmu, a);
    12441244                return rc;
     
    12951295     */
    12961296    DISCPUSTATE Cpu;
    1297     rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &Cpu, "IO EMU");
     1297    rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &Cpu, "IO EMU");
    12981298    if (VBOX_SUCCESS(rc))
    12991299    {
     
    13471347        if (IOM_SUCCESS(rc))
    13481348        {
    1349             pCtx->eip += Cpu.opsize;
     1349            pCtx->rip += Cpu.opsize;
    13501350            STAM_PROFILE_STOP(&pVM->em.s.StatIOEmu, a);
    13511351            return rc;
     
    14191419
    14201420        /* If MONITOR & MWAIT are supported, then interpret them here. */
    1421         rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &cpu, "Guest Trap (#UD): ");
     1421        rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &cpu, "Guest Trap (#UD): ");
    14221422        if (    VBOX_SUCCESS(rc)
    14231423            && (cpu.pCurInstr->opcode == OP_MONITOR || cpu.pCurInstr->opcode == OP_MWAIT))
     
    14351435                if (VBOX_SUCCESS(rc))
    14361436                {
    1437                     pCtx->eip += cpu.opsize;
     1437                    pCtx->rip += cpu.opsize;
    14381438                    return rc;
    14391439                }
     
    14461446        DISCPUSTATE cpu;
    14471447
    1448         rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &cpu, "Guest Trap: ");
     1448        rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &cpu, "Guest Trap: ");
    14491449        if (VBOX_SUCCESS(rc) && (cpu.pCurInstr->optype & OPTYPE_PORTIO))
    14501450        {
     
    15001500     * sysenter, syscall & callgate
    15011501     */
    1502     rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &Cpu, "RSWITCH: ");
     1502    rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &Cpu, "RSWITCH: ");
    15031503    if (VBOX_SUCCESS(rc))
    15041504    {
     
    17851785    int         rc;
    17861786
    1787     rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->eip, &Cpu, "PRIV: ");
     1787    rc = CPUMR3DisasmInstrCPU(pVM, pCtx, pCtx->rip, &Cpu, "PRIV: ");
    17881788    if (VBOX_SUCCESS(rc))
    17891789    {
     
    18001800            case OP_CLI:
    18011801                STAM_COUNTER_INC(&pStats->StatCli);
    1802                 emR3RecordCli(pVM, pCtx->eip);
     1802                emR3RecordCli(pVM, pCtx->rip);
    18031803                break;
    18041804            case OP_STI:
     
    18761876                    pCtx->eflags.u32 &= ~X86_EFL_IF;
    18771877                    Assert(Cpu.opsize == 1);
    1878                     pCtx->eip += Cpu.opsize;
     1878                    pCtx->rip += Cpu.opsize;
    18791879                    STAM_PROFILE_STOP(&pVM->em.s.StatPrivEmu, a);
    18801880                    return VINF_EM_RESCHEDULE_REM; /* must go to the recompiler now! */
     
    18821882                case OP_STI:
    18831883                    pCtx->eflags.u32 |= X86_EFL_IF;
    1884                     EMSetInhibitInterruptsPC(pVM, pCtx->eip + Cpu.opsize);
     1884                    EMSetInhibitInterruptsPC(pVM, pCtx->rip + Cpu.opsize);
    18851885                    Assert(Cpu.opsize == 1);
    1886                     pCtx->eip += Cpu.opsize;
     1886                    pCtx->rip += Cpu.opsize;
    18871887                    STAM_PROFILE_STOP(&pVM->em.s.StatPrivEmu, a);
    18881888                    return VINF_SUCCESS;
     
    19241924                    if (VBOX_SUCCESS(rc))
    19251925                    {
    1926                         pCtx->eip += Cpu.opsize;
     1926                        pCtx->rip += Cpu.opsize;
    19271927                        STAM_PROFILE_STOP(&pVM->em.s.StatPrivEmu, a);
    19281928
     
    23702370        /* Prefetch pages for EIP and ESP */
    23712371        /** @todo This is rather expensive. Should investigate if it really helps at all. */
    2372         rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip));
     2372        rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip));
    23732373        if (rc == VINF_SUCCESS)
    2374             rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp));
     2374            rc = PGMPrefetchPage(pVM, SELMToFlat(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->rsp));
    23752375        if (rc != VINF_SUCCESS)
    23762376        {
     
    26352635    PCPUMCTX pCtx = pVM->em.s.pCtx;
    26362636
    2637     LogFlow(("emR3HwAccExecute: (cs:eip=%04x:%08x)\n", pCtx->cs, pCtx->eip));
     2637    LogFlow(("emR3HwAccExecute: (cs:eip=%04x:%VGv)\n", pCtx->cs, pCtx->rip));
    26382638    *pfFFDone = false;
    26392639
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r9675 r9713  
    143143{
    144144    RTGCPTR GCPtrInstr;
    145     int rc = SELMValidateAndConvertCSAddr(pVM, pCtxCore->eflags, pCtxCore->ss, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid, (RTGCPTR)pCtxCore->eip, &GCPtrInstr);
     145    int rc = SELMValidateAndConvertCSAddr(pVM, pCtxCore->eflags, pCtxCore->ss, pCtxCore->cs, (PCPUMSELREGHID)&pCtxCore->csHid, (RTGCPTR)pCtxCore->rip, &GCPtrInstr);
    146146    if (VBOX_FAILURE(rc))
    147147    {
    148         Log(("EMInterpretDisasOne: Failed to convert %RTsel:%RX32 (cpl=%d) - rc=%Vrc !!\n",
    149              pCtxCore->cs, pCtxCore->eip, pCtxCore->ss & X86_SEL_RPL, rc));
     148        Log(("EMInterpretDisasOne: Failed to convert %RTsel:%VGv (cpl=%d) - rc=%Vrc !!\n",
     149             pCtxCore->cs, pCtxCore->rip, pCtxCore->ss & X86_SEL_RPL, rc));
    150150        return rc;
    151151    }
     
    203203    RTGCPTR pbCode;
    204204
    205     LogFlow(("EMInterpretInstruction %VRv fault %VGv\n", pRegFrame->eip, pvFault));
    206     int rc = SELMValidateAndConvertCSAddr(pVM, pRegFrame->eflags, pRegFrame->ss, pRegFrame->cs, &pRegFrame->csHid, (RTGCPTR)pRegFrame->eip, &pbCode);
     205    LogFlow(("EMInterpretInstruction %VGv fault %VGv\n", pRegFrame->rip, pvFault));
     206    int rc = SELMValidateAndConvertCSAddr(pVM, pRegFrame->eflags, pRegFrame->ss, pRegFrame->cs, &pRegFrame->csHid, (RTGCPTR)pRegFrame->rip, &pbCode);
    207207    if (VBOX_SUCCESS(rc))
    208208    {
     
    217217            if (VBOX_SUCCESS(rc))
    218218            {
    219                 pRegFrame->eip += cbOp; /* Move on to the next instruction. */
     219                pRegFrame->rip += cbOp; /* Move on to the next instruction. */
    220220            }
    221221            return rc;
     
    281281    int rc = IOMGCIOPortHandler(pVM, pCtxCore, pCpu);
    282282    if (IOM_SUCCESS(rc))
    283         pCtxCore->eip += cbOp;
     283        pCtxCore->rip += cbOp;
    284284    return rc;
    285285#else
     
    731731                if (pCpu->param1.size < pCpu->param2.size)
    732732                {
    733                     AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame->eip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */
     733                    AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame->rip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */
    734734                    return VERR_EM_INTERPRETER;
    735735                }
     
    747747#ifdef IN_GC
    748748                /* Safety check (in theory it could cross a page boundary and fault there though) */
    749                 AssertMsgReturn(pParam1 == pvFault, ("eip=%VGv, pParam1=%VGv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);
     749                AssertMsgReturn(pParam1 == pvFault, ("eip=%VGv, pParam1=%VGv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER);
    750750#endif
    751751                rc = emRamRead(pVM,  &valpar1, pParam1, param1.size);
     
    816816    {
    817817        AssertMsgReturn(pCpu->param1.size >= pCpu->param2.size, /* should never happen! */
    818                         ("%s at %VGv parameter mismatch %d vs %d!!\n", emGetMnemonic(pCpu), pRegFrame->eip, pCpu->param1.size, pCpu->param2.size),
     818                        ("%s at %VGv parameter mismatch %d vs %d!!\n", emGetMnemonic(pCpu), pRegFrame->rip, pCpu->param1.size, pCpu->param2.size),
    819819                        VERR_EM_INTERPRETER);
    820820
     
    833833    Assert(   TRPMHasTrap(pVM)
    834834           && (TRPMGetErrorCode(pVM) & X86_TRAP_PF_RW));
    835     AssertMsgReturn(GCPtrPar1 == pvFault, ("eip=%VGv, GCPtrPar1=%VGv pvFault=%VGv\n", pRegFrame->eip, GCPtrPar1, pvFault), VERR_EM_INTERPRETER);
     835    AssertMsgReturn(GCPtrPar1 == pvFault, ("eip=%VGv, GCPtrPar1=%VGv pvFault=%VGv\n", pRegFrame->rip, GCPtrPar1, pvFault), VERR_EM_INTERPRETER);
    836836# endif
    837837
     
    905905                if (pCpu->param1.size < pCpu->param2.size)
    906906                {
    907                     AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame->eip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */
     907                    AssertMsgFailed(("%s at %VGv parameter mismatch %d vs %d!!\n", pszInstr, pRegFrame->rip, pCpu->param1.size, pCpu->param2.size)); /* should never happen! */
    908908                    return VERR_EM_INTERPRETER;
    909909                }
     
    11941194
    11951195            default:
    1196                 Log(("emInterpretMov: unexpected type=%d eip=%VRv\n", param2.type, pRegFrame->eip));
     1196                Log(("emInterpretMov: unexpected type=%d eip=%VGv\n", param2.type, pRegFrame->rip));
    11971197                return VERR_EM_INTERPRETER;
    11981198            }
    11991199#ifdef LOG_ENABLED
    12001200            if (pCpu->mode == CPUMODE_64BIT)
    1201                 LogFlow(("EMInterpretInstruction at %08x: OP_MOV %VGv <- %RX64 (%d) &val32=%08x\n", pRegFrame->eip, pDest, val64, param2.size, &val64));
     1201                LogFlow(("EMInterpretInstruction at %VGv: OP_MOV %VGv <- %RX64 (%d) &val32=%08x\n", pRegFrame->rip, pDest, val64, param2.size, &val64));
    12021202            else
    1203                 LogFlow(("EMInterpretInstruction at %08x: OP_MOV %VGv <- %08X  (%d) &val32=%08x\n", pRegFrame->eip, pDest, (uint32_t)val64, param2.size, &val64));
     1203                LogFlow(("EMInterpretInstruction at %VGv: OP_MOV %VGv <- %08X  (%d) &val32=%08x\n", pRegFrame->rip, pDest, (uint32_t)val64, param2.size, &val64));
    12041204#endif
    12051205
     
    12091209#ifdef IN_GC
    12101210            /* Safety check (in theory it could cross a page boundary and fault there though) */
    1211             AssertMsgReturn(pDest == pvFault, ("eip=%VGv pDest=%VGv pvFault=%VGv\n", pRegFrame->eip, pDest, pvFault), VERR_EM_INTERPRETER);
     1211            AssertMsgReturn(pDest == pvFault, ("eip=%VGv pDest=%VGv pvFault=%VGv\n", pRegFrame->rip, pDest, pvFault), VERR_EM_INTERPRETER);
    12121212#endif
    12131213#endif
     
    13281328
    13291329                /* Safety check (in theory it could cross a page boundary and fault there though) */
    1330                 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VRv pParam1=%VRv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);
     1330                AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VGv pParam1=%VRv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER);
    13311331                break;
    13321332
     
    14101410
    14111411                /* Safety check (in theory it could cross a page boundary and fault there though) */
    1412                 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VRv pParam1=%VRv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);
     1412                AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VGv pParam1=%VRv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER);
    14131413                break;
    14141414
     
    14851485
    14861486                /* Safety check (in theory it could cross a page boundary and fault there though) */
    1487                 AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VRv pParam1=%VRv pvFault=%VGv\n", pRegFrame->eip, pParam1, pvFault), VERR_EM_INTERPRETER);
     1487                AssertMsgReturn(pParam1 == (RTRCPTR)pvFault, ("eip=%VGv pParam1=%VRv pvFault=%VGv\n", pRegFrame->rip, pParam1, pvFault), VERR_EM_INTERPRETER);
    14881488                break;
    14891489
     
    20292029
    20302030    Assert(pRegFrame->eflags.u32 & X86_EFL_IF);
    2031     Assert(pvFault == SELMToFlat(pVM, DIS_SELREG_CS, pRegFrame, (RTGCPTR)pRegFrame->eip));
     2031    Assert(pvFault == SELMToFlat(pVM, DIS_SELREG_CS, pRegFrame, (RTGCPTR)pRegFrame->rip));
    20322032
    20332033    pVM->em.s.GCPtrInhibitInterrupts = pRegFrame->eip + pCpu->opsize;
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r9678 r9713  
    945945{
    946946    STAM_PROFILE_START(&pVM->iom.s.StatGCMMIOHandler, a);
    947     Log3(("IOMMMIOHandler: GCPhys=%RGp uErr=%#x pvFault=%VGv eip=%RGv\n",
    948           GCPhysFault, (uint32_t)uErrorCode, pvFault, pCtxCore->eip));
     947    Log3(("IOMMMIOHandler: GCPhys=%RGp uErr=%#x pvFault=%VGv eip=%VGv\n",
     948          GCPhysFault, (uint32_t)uErrorCode, pvFault, pCtxCore->rip));
    949949
    950950    PIOMMMIORANGE pRange = (PIOMMMIORANGE)pvUser;
     
    10781078     */
    10791079    if (rc == VINF_SUCCESS)
    1080         pCtxCore->eip += cbOp;
     1080        pCtxCore->rip += cbOp;
    10811081    else
    10821082    {
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r9649 r9713  
    9898                     * adding this kind of detection to DIS or EM. */
    9999                    case OP_MOV:
    100                         pRegFrame->eip += cbOp;
     100                        pRegFrame->rip += cbOp;
    101101                        STAM_COUNTER_INC(&pVM->pgm.s.StatGCGuestROMWriteHandled);
    102102                        return VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r9699 r9713  
    618618    int rc2 = EMInterpretInstructionCPU(pVM, pCpu, pRegFrame, pvFault, &cbWritten);
    619619    if (VBOX_SUCCESS(rc2))
    620         pRegFrame->eip += pCpu->opsize;
     620        pRegFrame->rip += pCpu->opsize;
    621621    else if (rc2 == VERR_EM_INTERPRETER)
    622622    {
     
    690690        pRegFrame->ecx--;
    691691    }
    692     pRegFrame->eip += pCpu->opsize;
     692    pRegFrame->rip += pCpu->opsize;
    693693
    694694    /* See use in pgmPoolAccessHandlerSimple(). */
     
    733733    int rc = EMInterpretInstructionCPU(pVM, pCpu, pRegFrame, pvFault, &cb);
    734734    if (VBOX_SUCCESS(rc))
    735         pRegFrame->eip += pCpu->opsize;
     735        pRegFrame->rip += pCpu->opsize;
    736736    else if (rc == VERR_EM_INTERPRETER)
    737737    {
    738738        LogFlow(("pgmPoolAccessHandlerPTWorker: Interpretation failed for patch code %04x:%RGv - opcode=%d\n",
    739                   pRegFrame->cs, (RTGCPTR)pRegFrame->eip, pCpu->pCurInstr->opcode));
     739                  pRegFrame->cs, (RTGCPTR)pRegFrame->rip, pCpu->pCurInstr->opcode));
    740740        rc = VINF_EM_RAW_EMULATE_INSTR;
    741741        STAM_COUNTER_INC(&pPool->CTXMID(StatMonitor,EmulateInstr));
     
    836836        /* REP prefix, don't bother. */
    837837        STAM_COUNTER_INC(&pPool->CTXMID(StatMonitor,RepPrefix));
    838         Log4(("pgmPoolAccessHandler: eax=%#x ecx=%#x edi=%#x esi=%#x eip=%#x opcode=%d prefix=%#x\n",
    839               pRegFrame->eax, pRegFrame->ecx, pRegFrame->edi, pRegFrame->esi, pRegFrame->eip, Cpu.pCurInstr->opcode, Cpu.prefix));
     838        Log4(("pgmPoolAccessHandler: eax=%#x ecx=%#x edi=%#x esi=%#x eip=%VGv opcode=%d prefix=%#x\n",
     839              pRegFrame->eax, pRegFrame->ecx, pRegFrame->edi, pRegFrame->esi, pRegFrame->rip, Cpu.pCurInstr->opcode, Cpu.prefix));
    840840    }
    841841
  • trunk/src/VBox/VMM/VMMGC/TRPMGCHandlersA.asm

    r9300 r9713  
    271271    mov     eax, [esp + 08h + ESPOFF]           ; eip
    272272    mov     [esp + CPUMCTXCORE.eip], eax
     273%if GC_ARCH_BITS == 64
     274    ; zero out the high dword
     275    mov     dword [esp + CPUMCTXCORE.eip + 4], 0
     276%endif
    273277    mov     eax, [esp + 10h + ESPOFF]           ; eflags
    274278    mov     [esp + CPUMCTXCORE.eflags], eax
     
    750754    mov     eax, [esp + 04h + ESPOFF]           ; eip
    751755    mov     [esp + CPUMCTXCORE.eip], eax
     756%if GC_ARCH_BITS == 64
     757    ; zero out the high dword
     758    mov     dword [esp + CPUMCTXCORE.eip + 4], 0
     759%endif
    752760    mov     eax, dword [esp + 08h + ESPOFF]     ; cs
    753761    mov     [esp + CPUMCTXCORE.cs], eax
     
    10491057    mov     eax, [ecx + VBOXTSS.eip]
    10501058    mov     [esp + CPUMCTXCORE.eip], eax
     1059%if GC_ARCH_BITS == 64
     1060    ; zero out the high dword
     1061    mov     dword [esp + CPUMCTXCORE.eip + 4], 0
     1062%endif
    10511063    mov     eax, [ecx + VBOXTSS.eflags]
    10521064    mov     [esp + CPUMCTXCORE.eflags], eax
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