VirtualBox

Ignore:
Timestamp:
Jun 30, 2016 5:42:31 PM (8 years ago)
Author:
vboxsync
Message:

IEM: Fixed setjmp bug (still disabled). Made IEMExecLots execute lots of instructions instead of just one, forcing us to return an instruction count and add proper flushing of the prefetch buffer.

File:
1 edited

Legend:

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

    r61636 r61968  
    759759    pCtx->rip = uNewPC;
    760760    pCtx->eflags.Bits.u1RF = 0;
     761
     762    /* Flush the prefetch buffer. */
     763    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    761764    return VINF_SUCCESS;
    762765}
     
    782785    pCtx->rip = uNewPC;
    783786    pCtx->eflags.Bits.u1RF = 0;
     787
     788    /* Flush the prefetch buffer. */
     789    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    784790    return VINF_SUCCESS;
    785791}
     
    823829    pCtx->rip = uNewPC;
    824830    pCtx->eflags.Bits.u1RF = 0;
     831
     832    /* Flush the prefetch buffer. */
     833    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    825834    return VINF_SUCCESS;
    826835}
     
    846855    pCtx->rip = uNewPC;
    847856    pCtx->eflags.Bits.u1RF = 0;
     857
     858    /* Flush the prefetch buffer. */
     859    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    848860    return VINF_SUCCESS;
    849861}
     
    870882    pCtx->rip = uNewPC;
    871883    pCtx->eflags.Bits.u1RF = 0;
     884
     885    /* Flush the prefetch buffer. */
     886    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    872887    return VINF_SUCCESS;
    873888}
     
    893908    pCtx->rip = uNewPC;
    894909    pCtx->eflags.Bits.u1RF = 0;
     910
     911    /* Flush the prefetch buffer. */
     912    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     913
    895914    return VINF_SUCCESS;
    896915}
     
    16251644    }
    16261645    pCtx->eflags.Bits.u1RF = 0;
     1646
     1647    /* Flush the prefetch buffer. */
     1648    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    16271649    return VINF_SUCCESS;
    16281650#endif
     
    18471869    /** @todo check if the hidden bits are loaded correctly for 64-bit
    18481870     *        mode.  */
     1871
     1872    /* Flush the prefetch buffer. */
     1873    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     1874
    18491875    return VINF_SUCCESS;
    18501876}
     
    20662092    /** @todo check if the hidden bits are loaded correctly for 64-bit
    20672093     *        mode.  */
     2094
     2095    /* Flush the prefetch buffer. */
     2096    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     2097
    20682098    return VINF_SUCCESS;
    20692099}
     
    24662496        pCtx->eflags.Bits.u1RF = 0;
    24672497    }
     2498
     2499    /* Flush the prefetch buffer. */
     2500    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    24682501    return VINF_SUCCESS;
    24692502}
     
    25362569    pCtx->rsp = NewRsp.u;
    25372570    pCtx->eflags.Bits.u1RF = 0;
     2571
     2572    /* Flush the prefetch buffer. */
     2573    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    25382574
    25392575    return VINF_SUCCESS;
     
    28572893    IEMMISC_SET_EFL(pIemCpu, pCtx, uNewFlags);
    28582894
     2895    /* Flush the prefetch buffer. */
     2896    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     2897
    28592898    return VINF_SUCCESS;
    28602899}
     
    29322971    pCtx->rsp      = uNewEsp; /** @todo check this out! */
    29332972    pIemCpu->uCpl  = 3;
     2973
     2974    /* Flush the prefetch buffer. */
     2975    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    29342976
    29352977    return VINF_SUCCESS;
     
    33643406        /* Done! */
    33653407    }
     3408
     3409    /* Flush the prefetch buffer. */
     3410    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     3411
    33663412    return VINF_SUCCESS;
    33673413}
     
    36613707    }
    36623708
     3709    /* Flush the prefetch buffer. */
     3710    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     3711
    36633712    return VINF_SUCCESS;
    36643713}
     
    37853834    pCtx->ss.fFlags     = CPUMSELREG_FLAGS_VALID;
    37863835
     3836    /* Flush the prefetch buffer. */
     3837    pIemCpu->cbOpcode = pIemCpu->offOpcode;
     3838
    37873839    return VINF_SUCCESS;
    37883840}
     
    38853937    /** @todo Testcase: verify that SS.u1Long and SS.u1DefBig are left unchanged
    38863938     *        on sysret. */
     3939
     3940    /* Flush the prefetch buffer. */
     3941    pIemCpu->cbOpcode = pIemCpu->offOpcode;
    38873942
    38883943    return VINF_SUCCESS;
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