VirtualBox

Changeset 100740 in vbox for trunk


Ignore:
Timestamp:
Jul 30, 2023 8:08:25 PM (17 months ago)
Author:
vboxsync
Message:

VMM/IEM: Split up IEMAllInstInterpretOnly.cpp into four files to speed up compilation. This requires making all the tables public. It also requires duplicating the common functions in IEMAllInstCommon.cpp.h, but that shouldn't be a big deal of code. bugref:10369

Location:
trunk/src/VBox/VMM
Files:
12 edited
3 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r100736 r100740  
    192192        VMMAll/HMVMXAll.cpp \
    193193        VMMAll/IEMAll.cpp \
    194         VMMAll/IEMAllInstInterpretOnly.cpp \
     194        VMMAll/IEMAllIntprTables1.cpp \
     195        VMMAll/IEMAllIntprTables2.cpp \
     196        VMMAll/IEMAllIntprTables3.cpp \
     197        VMMAll/IEMAllIntprTables4.cpp \
    195198        VMMAll/IEMAllAImplC.cpp \
    196199        VMMAll/IEMAllCImpl.cpp \
     
    310313if "$(USERNAME)" == "bird" && "$(KBUILD_TARGET)" == "win"
    311314 VBoxVMM_VMMAll/IEMAll.cpp_CXXFLAGS                  = /FAcs /Fa$(subst /,\\,$(outbase).cod)
    312  VBoxVMM_VMMAll/IEMAllInstInterpretOnly.cpp_CXXFLAGS = /FAcs /Fa$(subst /,\\,$(outbase).cod)
     315 VBoxVMM_VMMAll/IEMAllIntprTables1.cpp_CXXFLAGS      = /FAcs /Fa$(subst /,\\,$(outbase).cod)
     316 VBoxVMM_VMMAll/IEMAllIntprTables2.cpp_CXXFLAGS      = /FAcs /Fa$(subst /,\\,$(outbase).cod)
     317 VBoxVMM_VMMAll/IEMAllIntprTables3.cpp_CXXFLAGS      = /FAcs /Fa$(subst /,\\,$(outbase).cod)
     318 VBoxVMM_VMMAll/IEMAllIntprTables4.cpp_CXXFLAGS      = /FAcs /Fa$(subst /,\\,$(outbase).cod)
    313319 VBoxVMM_VMMAll/IEMAllAImplC.cpp_CXXFLAGS            = /FAcs /Fa$(subst /,\\,$(outbase).cod)
    314320 VBoxVMM_VMMAll/PGMAll.cpp_CXXFLAGS                  = /FAcs /Fa$(subst /,\\,$(outbase).cod)
     
    773779        VMMAll/HMVMXAll.cpp \
    774780        VMMAll/IEMAll.cpp \
    775         VMMAll/IEMAllInstInterpretOnly.cpp \
     781        VMMAll/IEMAllIntprTables1.cpp \
     782        VMMAll/IEMAllIntprTables2.cpp \
     783        VMMAll/IEMAllIntprTables3.cpp \
     784        VMMAll/IEMAllIntprTables4.cpp \
    776785        $(if-expr !defined(IEM_WITHOUT_ASSEMBLY),VMMAll/IEMAllAImpl.asm,) \
    777786        VMMAll/IEMAllAImplC.cpp \
     
    985994  VMMAll/IEMAllCImplSvmInstr.cpp_CXXFLAGS           += -noover -O2xy
    986995  VMMAll/IEMAllCImplVmxInstr.cpp_CXXFLAGS           += -noover -O2xy
    987   VMMAll/IEMAllInstInterpretOnly.cpp_CXXFLAGS       += -noover -O2xy
     996  VMMAll/IEMAllIntprTables1.cpp_CXXFLAGS            += -noover -O2xy
     997  VMMAll/IEMAllIntprTables2.cpp_CXXFLAGS            += -noover -O2xy
     998  VMMAll/IEMAllIntprTables3.cpp_CXXFLAGS            += -noover -O2xy
     999  VMMAll/IEMAllIntprTables4.cpp_CXXFLAGS            += -noover -O2xy
    9881000 else
    9891001  # Omitting the frame pointer results in larger code, but it might be worth it. (esp addressing vs ebp?)
     
    9921004  VMMAll/IEMAllCImplSvmInstr.cpp_CXXFLAGS           += -O2 -fomit-frame-pointer
    9931005  VMMAll/IEMAllCImplVmxInstr.cpp_CXXFLAGS           += -O2 -fomit-frame-pointer
    994   VMMAll/IEMAllInstInterpretOnly.cpp_CXXFLAGS       += -O2 -fomit-frame-pointer
     1006  VMMAll/IEMAllIntprTables1.cpp_CXXFLAGS            += -O2 -fomit-frame-pointer
     1007  VMMAll/IEMAllIntprTables2.cpp_CXXFLAGS            += -O2 -fomit-frame-pointer
     1008  VMMAll/IEMAllIntprTables3.cpp_CXXFLAGS            += -O2 -fomit-frame-pointer
     1009  VMMAll/IEMAllIntprTables4.cpp_CXXFLAGS            += -O2 -fomit-frame-pointer
    9951010 endif
    9961011endif # bird wants good stacks (aeichner as well)
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstCommon.cpp.h

    r100734 r100740  
    2626 */
    2727
     28#ifndef VMM_INCLUDED_SRC_VMMAll_IEMAllInstCommon_cpp_h
     29#define VMM_INCLUDED_SRC_VMMAll_IEMAllInstCommon_cpp_h
     30#ifndef RT_WITHOUT_PRAGMA_ONCE
     31# pragma once
     32#endif
     33
    2834
    2935/*********************************************************************************************************************************
     
    708714
    709715
     716#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_ONE_BYTE_TABLE) || defined(IEM_WITH_TWO_BYTE_TABLE)
    710717/** Opcodes 0xf1, 0xd6. */
    711718FNIEMOP_DEF(iemOp_Invalid)
     
    714721    IEMOP_RAISE_INVALID_OPCODE_RET();
    715722}
    716 
    717 
     723#endif
     724
     725
     726#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE) || defined(IEM_WITH_VEX_TABLES)
    718727/** Invalid with RM byte . */
    719728FNIEMOPRM_DEF(iemOp_InvalidWithRM)
     
    723732    IEMOP_RAISE_INVALID_OPCODE_RET();
    724733}
    725 
    726 
     734#endif
     735
     736
     737#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE)
    727738/** Invalid with RM byte where intel decodes any additional address encoding
    728739 *  bytes. */
     
    735746    IEMOP_RAISE_INVALID_OPCODE_RET();
    736747}
    737 
    738 
     748#endif
     749
     750
     751#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE)
    739752/** Invalid with RM byte where both AMD and Intel decodes any additional
    740753 *  address encoding bytes. */
     
    747760    IEMOP_RAISE_INVALID_OPCODE_RET();
    748761}
    749 
    750 
     762#endif
     763
     764
     765#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE) || defined(IEM_WITH_VEX_TABLES)
    751766/** Invalid with RM byte where intel requires 8-byte immediate.
    752767 * Intel will also need SIB and displacement if bRm indicates memory. */
     
    763778    IEMOP_RAISE_INVALID_OPCODE_RET();
    764779}
    765 
    766 
     780#endif
     781
     782
     783#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE)
    767784/** Invalid with RM byte where intel requires 8-byte immediate.
    768785 * Both AMD and Intel also needs SIB and displacement according to bRm. */
     
    776793    IEMOP_RAISE_INVALID_OPCODE_RET();
    777794}
    778 
    779 
     795#endif
     796
     797
     798#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE) || defined(IEM_WITH_THREE_BYTE_TABLES) || defined(IEM_WITH_VEX_TABLES)
    780799/** Invalid opcode where intel requires Mod R/M sequence. */
    781800FNIEMOP_DEF(iemOp_InvalidNeedRM)
     
    791810    IEMOP_RAISE_INVALID_OPCODE_RET();
    792811}
    793 
    794 
     812#endif
     813
     814
     815#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_ONE_BYTE_TABLE)
    795816/** Invalid opcode where both AMD and Intel requires Mod R/M sequence. */
    796817FNIEMOP_DEF(iemOp_InvalidAllNeedRM)
     
    803824    IEMOP_RAISE_INVALID_OPCODE_RET();
    804825}
    805 
    806 
     826#endif
     827
     828
     829#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE) || defined(IEM_WITH_THREE_BYTE_TABLES) || defined(IEM_WITH_VEX_TABLES)
    807830/** Invalid opcode where intel requires Mod R/M sequence and 8-byte
    808831 *  immediate. */
     
    820843    IEMOP_RAISE_INVALID_OPCODE_RET();
    821844}
    822 
    823 
     845#endif
     846
     847
     848#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE)
    824849/** Invalid opcode where intel requires a 3rd escape byte and a Mod R/M
    825850 *  sequence. */
     
    837862    IEMOP_RAISE_INVALID_OPCODE_RET();
    838863}
    839 
    840 
     864#endif
     865
     866
     867#if defined(TST_IEM_CHECK_MC) || defined(IEM_WITH_TWO_BYTE_TABLE)
    841868/** Invalid opcode where intel requires a 3rd escape byte, Mod R/M sequence, and
    842869 *  a 8-byte immediate. */
     
    855882    IEMOP_RAISE_INVALID_OPCODE_RET();
    856883}
    857 
     884#endif
     885
     886#if defined(IEM_WITH_ONE_BYTE_TABLE) || defined(IEM_WITH_TWO_BYTE_TABLE)
     887
     888/**
     889 * Common 'push segment-register' helper.
     890 */
     891FNIEMOP_DEF_1(iemOpCommonPushSReg, uint8_t, iReg)
     892{
     893    Assert(iReg < X86_SREG_FS || !IEM_IS_64BIT_CODE(pVCpu));
     894    IEMOP_HLP_DEFAULT_64BIT_OP_SIZE();
     895
     896    switch (pVCpu->iem.s.enmEffOpSize)
     897    {
     898        case IEMMODE_16BIT:
     899            IEM_MC_BEGIN(0, 1);
     900            IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     901            IEM_MC_LOCAL(uint16_t, u16Value);
     902            IEM_MC_FETCH_SREG_U16(u16Value, iReg);
     903            IEM_MC_PUSH_U16(u16Value);
     904            IEM_MC_ADVANCE_RIP_AND_FINISH();
     905            IEM_MC_END();
     906            break;
     907
     908        case IEMMODE_32BIT:
     909            IEM_MC_BEGIN(0, 1);
     910            IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     911            IEM_MC_LOCAL(uint32_t, u32Value);
     912            IEM_MC_FETCH_SREG_ZX_U32(u32Value, iReg);
     913            IEM_MC_PUSH_U32_SREG(u32Value);
     914            IEM_MC_ADVANCE_RIP_AND_FINISH();
     915            IEM_MC_END();
     916            break;
     917
     918        case IEMMODE_64BIT:
     919            IEM_MC_BEGIN(0, 1);
     920            IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     921            IEM_MC_LOCAL(uint64_t, u64Value);
     922            IEM_MC_FETCH_SREG_ZX_U64(u64Value, iReg);
     923            IEM_MC_PUSH_U64(u64Value);
     924            IEM_MC_ADVANCE_RIP_AND_FINISH();
     925            IEM_MC_END();
     926            break;
     927
     928        IEM_NOT_REACHED_DEFAULT_CASE_RET();
     929    }
     930}
     931
     932
     933FNIEMOP_DEF_2(iemOpCommonLoadSRegAndGreg, uint8_t, iSegReg, uint8_t, bRm)
     934{
     935    Assert(IEM_IS_MODRM_MEM_MODE(bRm)); /* Caller checks this */
     936    uint8_t const iGReg = IEM_GET_MODRM_REG(pVCpu, bRm);
     937
     938    switch (pVCpu->iem.s.enmEffOpSize)
     939    {
     940        case IEMMODE_16BIT:
     941            IEM_MC_BEGIN(5, 1);
     942            IEM_MC_ARG(uint16_t,        uSel,                                    0);
     943            IEM_MC_ARG(uint16_t,        offSeg,                                  1);
     944            IEM_MC_ARG_CONST(uint8_t,   iSegRegArg,/*=*/iSegReg,                 2);
     945            IEM_MC_ARG_CONST(uint8_t,   iGRegArg,  /*=*/iGReg,                   3);
     946            IEM_MC_ARG_CONST(IEMMODE,   enmEffOpSize,/*=*/pVCpu->iem.s.enmEffOpSize, 4);
     947            IEM_MC_LOCAL(RTGCPTR,       GCPtrEff);
     948            IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0);
     949            IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     950            IEM_MC_FETCH_MEM_U16(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
     951            IEM_MC_FETCH_MEM_U16_DISP(uSel, pVCpu->iem.s.iEffSeg, GCPtrEff, 2);
     952            if (iSegReg >= X86_SREG_FS || !IEM_IS_32BIT_CODE(pVCpu))
     953                IEM_MC_CALL_CIMPL_5(               0, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
     954            else
     955                IEM_MC_CALL_CIMPL_5(IEM_CIMPL_F_MODE, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
     956            IEM_MC_END();
     957
     958        case IEMMODE_32BIT:
     959            IEM_MC_BEGIN(5, 1);
     960            IEM_MC_ARG(uint16_t,        uSel,                                    0);
     961            IEM_MC_ARG(uint32_t,        offSeg,                                  1);
     962            IEM_MC_ARG_CONST(uint8_t,   iSegRegArg,/*=*/iSegReg,                 2);
     963            IEM_MC_ARG_CONST(uint8_t,   iGRegArg,  /*=*/iGReg,                   3);
     964            IEM_MC_ARG_CONST(IEMMODE,   enmEffOpSize,/*=*/pVCpu->iem.s.enmEffOpSize, 4);
     965            IEM_MC_LOCAL(RTGCPTR,       GCPtrEff);
     966            IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0);
     967            IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     968            IEM_MC_FETCH_MEM_U32(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
     969            IEM_MC_FETCH_MEM_U16_DISP(uSel, pVCpu->iem.s.iEffSeg, GCPtrEff, 4);
     970            if (iSegReg >= X86_SREG_FS || !IEM_IS_32BIT_CODE(pVCpu))
     971                IEM_MC_CALL_CIMPL_5(               0, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
     972            else
     973                IEM_MC_CALL_CIMPL_5(IEM_CIMPL_F_MODE, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
     974            IEM_MC_END();
     975
     976        case IEMMODE_64BIT:
     977            IEM_MC_BEGIN(5, 1);
     978            IEM_MC_ARG(uint16_t,        uSel,                                    0);
     979            IEM_MC_ARG(uint64_t,        offSeg,                                  1);
     980            IEM_MC_ARG_CONST(uint8_t,   iSegRegArg,/*=*/iSegReg,                 2);
     981            IEM_MC_ARG_CONST(uint8_t,   iGRegArg,  /*=*/iGReg,                   3);
     982            IEM_MC_ARG_CONST(IEMMODE,   enmEffOpSize,/*=*/pVCpu->iem.s.enmEffOpSize, 4);
     983            IEM_MC_LOCAL(RTGCPTR,       GCPtrEff);
     984            IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0);
     985            IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
     986            if (IEM_IS_GUEST_CPU_AMD(pVCpu)) /** @todo testcase: rev 3.15 of the amd manuals claims it only loads a 32-bit greg. */
     987                IEM_MC_FETCH_MEM_U32_SX_U64(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
     988            else
     989                IEM_MC_FETCH_MEM_U64(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
     990            IEM_MC_FETCH_MEM_U16_DISP(uSel, pVCpu->iem.s.iEffSeg, GCPtrEff, 8);
     991            IEM_MC_CALL_CIMPL_5(0, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
     992            IEM_MC_END();
     993
     994        IEM_NOT_REACHED_DEFAULT_CASE_RET();
     995    }
     996}
     997
     998#endif
     999
     1000#endif /* !VMM_INCLUDED_SRC_VMMAll_IEMAllInstCommon_cpp_h */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstOneByte.cpp.h

    r100735 r100740  
    763763FNIEMOP_DEF(iemOp_2byteEscape)
    764764{
    765 #ifdef VBOX_STRICT
     765#if 0 /// @todo def VBOX_STRICT
    766766    /* Sanity check the table the first time around. */
    767767    static bool s_fTested = false;
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstThree0f38.cpp.h

    r100733 r100740  
    22152215 * @sa      g_apfnVexMap2
    22162216 */
    2217 IEM_STATIC const PFNIEMOP g_apfnThreeByte0f38[] =
     2217const PFNIEMOP g_apfnThreeByte0f38[] =
    22182218{
    22192219    /*          no prefix,                  066h prefix                 f3h prefix,                 f2h prefix */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstThree0f3a.cpp.h

    r100733 r100740  
    16661666 * @sa      g_apfnVexMap2
    16671667 */
    1668 IEM_STATIC const PFNIEMOP g_apfnThreeByte0f3a[] =
     1668const PFNIEMOP g_apfnThreeByte0f3a[] =
    16691669{
    16701670    /*          no prefix,                  066h prefix                 f3h prefix,                 f2h prefix */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h

    r100734 r100740  
    88898889        IEM_MC_ADVANCE_RIP_AND_FINISH();
    88908890        IEM_MC_END();
    8891     }
    8892 }
    8893 
    8894 
    8895 /**
    8896  * Common 'push segment-register' helper.
    8897  */
    8898 FNIEMOP_DEF_1(iemOpCommonPushSReg, uint8_t, iReg)
    8899 {
    8900     Assert(iReg < X86_SREG_FS || !IEM_IS_64BIT_CODE(pVCpu));
    8901     IEMOP_HLP_DEFAULT_64BIT_OP_SIZE();
    8902 
    8903     switch (pVCpu->iem.s.enmEffOpSize)
    8904     {
    8905         case IEMMODE_16BIT:
    8906             IEM_MC_BEGIN(0, 1);
    8907             IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
    8908             IEM_MC_LOCAL(uint16_t, u16Value);
    8909             IEM_MC_FETCH_SREG_U16(u16Value, iReg);
    8910             IEM_MC_PUSH_U16(u16Value);
    8911             IEM_MC_ADVANCE_RIP_AND_FINISH();
    8912             IEM_MC_END();
    8913             break;
    8914 
    8915         case IEMMODE_32BIT:
    8916             IEM_MC_BEGIN(0, 1);
    8917             IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
    8918             IEM_MC_LOCAL(uint32_t, u32Value);
    8919             IEM_MC_FETCH_SREG_ZX_U32(u32Value, iReg);
    8920             IEM_MC_PUSH_U32_SREG(u32Value);
    8921             IEM_MC_ADVANCE_RIP_AND_FINISH();
    8922             IEM_MC_END();
    8923             break;
    8924 
    8925         case IEMMODE_64BIT:
    8926             IEM_MC_BEGIN(0, 1);
    8927             IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
    8928             IEM_MC_LOCAL(uint64_t, u64Value);
    8929             IEM_MC_FETCH_SREG_ZX_U64(u64Value, iReg);
    8930             IEM_MC_PUSH_U64(u64Value);
    8931             IEM_MC_ADVANCE_RIP_AND_FINISH();
    8932             IEM_MC_END();
    8933             break;
    8934 
    8935         IEM_NOT_REACHED_DEFAULT_CASE_RET();
    89368891    }
    89378892}
     
    1033310288
    1033410289
    10335 FNIEMOP_DEF_2(iemOpCommonLoadSRegAndGreg, uint8_t, iSegReg, uint8_t, bRm)
    10336 {
    10337     Assert(IEM_IS_MODRM_MEM_MODE(bRm)); /* Caller checks this */
    10338     uint8_t const iGReg = IEM_GET_MODRM_REG(pVCpu, bRm);
    10339 
    10340     switch (pVCpu->iem.s.enmEffOpSize)
    10341     {
    10342         case IEMMODE_16BIT:
    10343             IEM_MC_BEGIN(5, 1);
    10344             IEM_MC_ARG(uint16_t,        uSel,                                    0);
    10345             IEM_MC_ARG(uint16_t,        offSeg,                                  1);
    10346             IEM_MC_ARG_CONST(uint8_t,   iSegRegArg,/*=*/iSegReg,                 2);
    10347             IEM_MC_ARG_CONST(uint8_t,   iGRegArg,  /*=*/iGReg,                   3);
    10348             IEM_MC_ARG_CONST(IEMMODE,   enmEffOpSize,/*=*/pVCpu->iem.s.enmEffOpSize, 4);
    10349             IEM_MC_LOCAL(RTGCPTR,       GCPtrEff);
    10350             IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0);
    10351             IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
    10352             IEM_MC_FETCH_MEM_U16(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
    10353             IEM_MC_FETCH_MEM_U16_DISP(uSel, pVCpu->iem.s.iEffSeg, GCPtrEff, 2);
    10354             if (iSegReg >= X86_SREG_FS || !IEM_IS_32BIT_CODE(pVCpu))
    10355                 IEM_MC_CALL_CIMPL_5(               0, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
    10356             else
    10357                 IEM_MC_CALL_CIMPL_5(IEM_CIMPL_F_MODE, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
    10358             IEM_MC_END();
    10359 
    10360         case IEMMODE_32BIT:
    10361             IEM_MC_BEGIN(5, 1);
    10362             IEM_MC_ARG(uint16_t,        uSel,                                    0);
    10363             IEM_MC_ARG(uint32_t,        offSeg,                                  1);
    10364             IEM_MC_ARG_CONST(uint8_t,   iSegRegArg,/*=*/iSegReg,                 2);
    10365             IEM_MC_ARG_CONST(uint8_t,   iGRegArg,  /*=*/iGReg,                   3);
    10366             IEM_MC_ARG_CONST(IEMMODE,   enmEffOpSize,/*=*/pVCpu->iem.s.enmEffOpSize, 4);
    10367             IEM_MC_LOCAL(RTGCPTR,       GCPtrEff);
    10368             IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0);
    10369             IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
    10370             IEM_MC_FETCH_MEM_U32(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
    10371             IEM_MC_FETCH_MEM_U16_DISP(uSel, pVCpu->iem.s.iEffSeg, GCPtrEff, 4);
    10372             if (iSegReg >= X86_SREG_FS || !IEM_IS_32BIT_CODE(pVCpu))
    10373                 IEM_MC_CALL_CIMPL_5(               0, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
    10374             else
    10375                 IEM_MC_CALL_CIMPL_5(IEM_CIMPL_F_MODE, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
    10376             IEM_MC_END();
    10377 
    10378         case IEMMODE_64BIT:
    10379             IEM_MC_BEGIN(5, 1);
    10380             IEM_MC_ARG(uint16_t,        uSel,                                    0);
    10381             IEM_MC_ARG(uint64_t,        offSeg,                                  1);
    10382             IEM_MC_ARG_CONST(uint8_t,   iSegRegArg,/*=*/iSegReg,                 2);
    10383             IEM_MC_ARG_CONST(uint8_t,   iGRegArg,  /*=*/iGReg,                   3);
    10384             IEM_MC_ARG_CONST(IEMMODE,   enmEffOpSize,/*=*/pVCpu->iem.s.enmEffOpSize, 4);
    10385             IEM_MC_LOCAL(RTGCPTR,       GCPtrEff);
    10386             IEM_MC_CALC_RM_EFF_ADDR(GCPtrEff, bRm, 0);
    10387             IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX();
    10388             if (IEM_IS_GUEST_CPU_AMD(pVCpu)) /** @todo testcase: rev 3.15 of the amd manuals claims it only loads a 32-bit greg. */
    10389                 IEM_MC_FETCH_MEM_U32_SX_U64(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
    10390             else
    10391                 IEM_MC_FETCH_MEM_U64(offSeg, pVCpu->iem.s.iEffSeg, GCPtrEff);
    10392             IEM_MC_FETCH_MEM_U16_DISP(uSel, pVCpu->iem.s.iEffSeg, GCPtrEff, 8);
    10393             IEM_MC_CALL_CIMPL_5(0, iemCImpl_load_SReg_Greg, uSel, offSeg, iSegRegArg, iGRegArg, enmEffOpSize);
    10394             IEM_MC_END();
    10395 
    10396         IEM_NOT_REACHED_DEFAULT_CASE_RET();
    10397     }
    10398 }
    10399 
    10400 
    1040110290/** Opcode 0x0f 0xb2. */
    1040210291FNIEMOP_DEF(iemOp_lss_Gv_Mp)
     
    1385813747 *          check if it needs updating as well when making changes.
    1385913748 */
    13860 IEM_STATIC const PFNIEMOP g_apfnTwoByteMap[] =
     13749const PFNIEMOP g_apfnTwoByteMap[] =
    1386113750{
    1386213751    /*          no prefix,                  066h prefix                 f3h prefix,                 f2h prefix */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap1.cpp.h

    r100734 r100740  
    54295429 * @sa  g_apfnTwoByteMap
    54305430 */
    5431 IEM_STATIC const PFNIEMOP g_apfnVexMap1[] =
     5431const PFNIEMOP g_apfnVexMap1[] =
    54325432{
    54335433    /*          no prefix,                  066h prefix                 f3h prefix,                 f2h prefix */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap2.cpp.h

    r100733 r100740  
    23572357 * @sa      g_apfnThreeByte0f38
    23582358 */
    2359 IEM_STATIC const PFNIEMOP g_apfnVexMap2[] =
     2359const PFNIEMOP g_apfnVexMap2[] =
    23602360{
    23612361    /*          no prefix,                  066h prefix                 f3h prefix,                 f2h prefix */
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap3.cpp.h

    r100733 r100740  
    11951195 * @sa      g_apfnThreeByte0f3a
    11961196 */
    1197 IEM_STATIC const PFNIEMOP g_apfnVexMap3[] =
     1197const PFNIEMOP g_apfnVexMap3[] =
    11981198{
    11991199    /*          no prefix,                  066h prefix                 f3h prefix,                 f2h prefix */
  • trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables.h

    r100739 r100740  
    2525 * SPDX-License-Identifier: GPL-3.0-only
    2626 */
     27
     28#ifndef VMM_INCLUDED_SRC_VMMAll_IEMAllIntprTables_h
     29#define VMM_INCLUDED_SRC_VMMAll_IEMAllIntprTables_h
     30#ifndef RT_WITHOUT_PRAGMA_ONCE
     31# pragma once
     32#endif
    2733
    2834
     
    7884*********************************************************************************************************************************/
    7985#define g_apfnOneByteMap    g_apfnIemInterpretOnlyOneByteMap
     86#define g_apfnTwoByteMap    g_apfnIemInterpretOnlyTwoByteMap
     87#define g_apfnThreeByte0f3a g_apfnIemInterpretOnlyThreeByte0f3a
     88#define g_apfnThreeByte0f38 g_apfnIemInterpretOnlyThreeByte0f38
     89#define g_apfnVexMap1       g_apfnIemInterpretOnlyVecMap1
     90#define g_apfnVexMap2       g_apfnIemInterpretOnlyVecMap2
     91#define g_apfnVexMap3       g_apfnIemInterpretOnlyVecMap3
    8092
    8193
     
    8799#include "IEMAllInstCommon.cpp.h"
    88100
     101#endif /* !VMM_INCLUDED_SRC_VMMAll_IEMAllIntprTables_h */
  • trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables1.cpp

    r100739 r100740  
    11/* $Id$ */
    22/** @file
    3  * IEM - Instruction Decoding and Emulation.
     3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - One Byte.
    44 */
    55
     
    2626 */
    2727
     28#define IEM_WITH_ONE_BYTE_TABLE
    2829#include "IEMAllIntprTables.h"
    29 
    30 /*
    31  * Include the tables.
    32  */
    33 #ifdef IEM_WITH_3DNOW
    34 # include "IEMAllInst3DNow.cpp.h"
    35 #endif
    36 
    37 #ifdef IEM_WITH_THREE_0F_38
    38 # include "IEMAllInstThree0f38.cpp.h"
    39 #endif
    40 
    41 #ifdef IEM_WITH_THREE_0F_3A
    42 # include "IEMAllInstThree0f3a.cpp.h"
    43 #endif
    44 
    45 #include "IEMAllInstTwoByte0f.cpp.h"
    46 
    47 #ifdef IEM_WITH_VEX
    48 # include "IEMAllInstVexMap1.cpp.h"
    49 # include "IEMAllInstVexMap2.cpp.h"
    50 # include "IEMAllInstVexMap3.cpp.h"
    51 #endif
    52 
    5330#include "IEMAllInstOneByte.cpp.h"
    5431
  • trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables2.cpp

    r100739 r100740  
    11/* $Id$ */
    22/** @file
    3  * IEM - Instruction Decoding and Emulation.
     3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - Two byte & 3DNow!
    44 */
    55
     
    2626 */
    2727
     28#define IEM_WITH_TWO_BYTE_TABLE
     29#define IEM_WITH_3DNOW_TABLE
    2830#include "IEMAllIntprTables.h"
    29 
    30 /*
    31  * Include the tables.
    32  */
    3331#ifdef IEM_WITH_3DNOW
    3432# include "IEMAllInst3DNow.cpp.h"
    3533#endif
    36 
    37 #ifdef IEM_WITH_THREE_0F_38
    38 # include "IEMAllInstThree0f38.cpp.h"
    39 #endif
    40 
    41 #ifdef IEM_WITH_THREE_0F_3A
    42 # include "IEMAllInstThree0f3a.cpp.h"
    43 #endif
    44 
    4534#include "IEMAllInstTwoByte0f.cpp.h"
    4635
    47 #ifdef IEM_WITH_VEX
    48 # include "IEMAllInstVexMap1.cpp.h"
    49 # include "IEMAllInstVexMap2.cpp.h"
    50 # include "IEMAllInstVexMap3.cpp.h"
    51 #endif
    52 
    53 #include "IEMAllInstOneByte.cpp.h"
    54 
  • trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables3.cpp

    r100739 r100740  
    11/* $Id$ */
    22/** @file
    3  * IEM - Instruction Decoding and Emulation.
     3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - Three byte.
    44 */
    55
     
    2626 */
    2727
     28#define IEM_WITH_THREE_BYTE_TABLES
    2829#include "IEMAllIntprTables.h"
    29 
    30 /*
    31  * Include the tables.
    32  */
    33 #ifdef IEM_WITH_3DNOW
    34 # include "IEMAllInst3DNow.cpp.h"
    35 #endif
    36 
    3730#ifdef IEM_WITH_THREE_0F_38
    3831# include "IEMAllInstThree0f38.cpp.h"
    3932#endif
    40 
    4133#ifdef IEM_WITH_THREE_0F_3A
    4234# include "IEMAllInstThree0f3a.cpp.h"
    4335#endif
    4436
    45 #include "IEMAllInstTwoByte0f.cpp.h"
    46 
    47 #ifdef IEM_WITH_VEX
    48 # include "IEMAllInstVexMap1.cpp.h"
    49 # include "IEMAllInstVexMap2.cpp.h"
    50 # include "IEMAllInstVexMap3.cpp.h"
    51 #endif
    52 
    53 #include "IEMAllInstOneByte.cpp.h"
    54 
  • trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables4.cpp

    r100739 r100740  
    11/* $Id$ */
    22/** @file
    3  * IEM - Instruction Decoding and Emulation.
     3 * IEM - Instruction Decoding and Emulation, Interpreter Tables - VEX.
    44 */
    55
     
    2626 */
    2727
     28#define IEM_WITH_VEX_TABLES
    2829#include "IEMAllIntprTables.h"
    29 
    30 /*
    31  * Include the tables.
    32  */
    33 #ifdef IEM_WITH_3DNOW
    34 # include "IEMAllInst3DNow.cpp.h"
    35 #endif
    36 
    37 #ifdef IEM_WITH_THREE_0F_38
    38 # include "IEMAllInstThree0f38.cpp.h"
    39 #endif
    40 
    41 #ifdef IEM_WITH_THREE_0F_3A
    42 # include "IEMAllInstThree0f3a.cpp.h"
    43 #endif
    44 
    45 #include "IEMAllInstTwoByte0f.cpp.h"
    46 
    4730#ifdef IEM_WITH_VEX
    4831# include "IEMAllInstVexMap1.cpp.h"
     
    5134#endif
    5235
    53 #include "IEMAllInstOneByte.cpp.h"
    54 
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r100736 r100740  
    49494949
    49504950extern const PFNIEMOP g_apfnIemInterpretOnlyOneByteMap[256];
     4951extern const PFNIEMOP g_apfnIemInterpretOnlyTwoByteMap[1024];
     4952extern const PFNIEMOP g_apfnIemInterpretOnlyThreeByte0f3a[1024];
     4953extern const PFNIEMOP g_apfnIemInterpretOnlyThreeByte0f38[1024];
     4954extern const PFNIEMOP g_apfnIemInterpretOnlyVecMap1[1024];
     4955extern const PFNIEMOP g_apfnIemInterpretOnlyVecMap2[1024];
     4956extern const PFNIEMOP g_apfnIemInterpretOnlyVecMap3[1024];
    49514957
    49524958/*
  • trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp

    r100734 r100740  
    10241024/** @}  */
    10251025
    1026 #include "../VMMAll/IEMAllInstInterpretOnly.cpp"
     1026#include "../VMMAll/IEMAllIntprTables1.cpp"
     1027#include "../VMMAll/IEMAllIntprTables2.cpp"
     1028#include "../VMMAll/IEMAllIntprTables3.cpp"
     1029#include "../VMMAll/IEMAllIntprTables4.cpp"
    10271030
    10281031
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