VirtualBox

Changeset 100701 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Jul 25, 2023 9:47:02 PM (19 months ago)
Author:
vboxsync
Message:

VMM/IEM: More IEM_CIMPL_F_XXX stuff. bugref:10369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMMc.h

    r100591 r100701  
    12301230/** @name IEM_CIMPL_F_XXX - State change clues for CIMPL calls.
    12311231 *
    1232  * These clues are mainly for the recompiler, so that it can
     1232 * These clues are mainly for the recompiler, so that it can emit correct code.
     1233 *
     1234 * They are processed by the python script and which also automatically
     1235 * calculates flags for MC blocks based on the statements, extending the use of
     1236 * these flags to describe MC block behavior to the recompiler core.  The python
     1237 * script pass the flags to the IEM_MC2_END_EMIT_CALLS macro, but mainly for
     1238 * error checking purposes.  The script emits the necessary fEndTb = true and
     1239 * similar statements as this reduces compile time a tiny bit.
    12331240 *
    12341241 * @{ */
    1235 #define IEM_CIMPL_F_MODE            RT_BIT_32(0)    /**< Execution flags may change (IEMCPU::fExec). */
    1236 #define IEM_CIMPL_F_BRANCH          RT_BIT_32(1)    /**< Branches (changes RIP, maybe CS). */
    1237 #define IEM_CIMPL_F_RFLAGS          RT_BIT_32(2)    /**< May change significant portions of RFLAGS. */
    1238 #define IEM_CIMPL_F_STATUS_FLAGS    RT_BIT_32(3)    /**< May change the status bits (X86_EFL_STATUS_BITS) in RFLAGS . */
    1239 #define IEM_CIMPL_F_VMEXIT          RT_BIT_32(4)    /**< May trigger a VM exit. */
    1240 #define IEM_CIMPL_F_FPU             RT_BIT_32(5)    /**< May modify FPU state. */
    1241 #define IEM_CIMPL_F_REP             RT_BIT_32(6)    /**< REP prefixed instruction which may yield before updating PC. */
    1242 #define IEM_CIMPL_F_END_TB          RT_BIT_32(7)
     1242/** Execution flags may change (IEMCPU::fExec). */
     1243#define IEM_CIMPL_F_MODE            RT_BIT_32(0)
     1244/** Unconditional direct branches (changes RIP, maybe CS). */
     1245#define IEM_CIMPL_F_BRANCH_UNCOND   RT_BIT_32(1)
     1246/** Conditional direct branch (may change RIP, maybe CS). */
     1247#define IEM_CIMPL_F_BRANCH_COND     RT_BIT_32(2)
     1248/** Indirect unconditional branch (changes RIP, maybe CS).
     1249 *
     1250 * This is used for all system control transfers (SYSCALL, SYSRET, INT, ++) as
     1251 * well as for return instructions (RET, IRET, RETF).
     1252 *
     1253 * Since the INTO instruction is currently the only indirect branch instruction
     1254 * that is conditional (depends on the overflow flag), that instruction will
     1255 * have both IEM_CIMPL_F_BRANCH_INDIR and IEM_CIMPL_F_BRANCH_COND set.  All
     1256 * other branch instructions will have exactly one of the branch flags set. */
     1257#define IEM_CIMPL_F_BRANCH_INDIR    RT_BIT_32(3)
     1258/** May change significant portions of RFLAGS. */
     1259#define IEM_CIMPL_F_RFLAGS          RT_BIT_32(4)
     1260/** May change the status bits (X86_EFL_STATUS_BITS) in RFLAGS . */
     1261#define IEM_CIMPL_F_STATUS_FLAGS    RT_BIT_32(5)
     1262/** May trigger a VM exit. */
     1263#define IEM_CIMPL_F_VMEXIT          RT_BIT_32(6)
     1264/** May modify FPU state. */
     1265#define IEM_CIMPL_F_FPU             RT_BIT_32(7)
     1266/** REP prefixed instruction which may yield before updating PC. */
     1267#define IEM_CIMPL_F_REP             RT_BIT_32(8)
     1268/** Force end of TB after the instruction.    */
     1269#define IEM_CIMPL_F_END_TB          RT_BIT_32(9)
    12431270/** Convenience: Raise exception (technically unnecessary, since it shouldn't return VINF_SUCCESS). */
    1244 #define IEM_CIMPL_F_XCPT            (IEM_CIMPL_F_MODE | IEM_CIMPL_F_BRANCH | IEM_CIMPL_F_RFLAGS | IEM_CIMPL_F_VMEXIT)
     1271#define IEM_CIMPL_F_XCPT            (IEM_CIMPL_F_MODE | IEM_CIMPL_F_BRANCH_UNCOND | IEM_CIMPL_F_RFLAGS | IEM_CIMPL_F_VMEXIT)
     1272/** Convenience: Testing any kind of branch. */
     1273#define IEM_CIMPL_F_BRANCH_ANY      (IEM_CIMPL_F_BRANCH_UNCOND | IEM_CIMPL_F_BRANCH_COND | IEM_CIMPL_F_BRANCH_INDIR)
    12451274/** @} */
    12461275
     
    12591288        if (rcStrictHlp == VINF_SUCCESS) \
    12601289        { \
    1261             AssertMsg(   ((a_fFlags) & IEM_CIMPL_F_BRANCH) \
     1290            AssertMsg(   ((a_fFlags) & IEM_CIMPL_F_BRANCH_ANY) \
    12621291                      || (   uRipBefore + cbInstr == pVCpu->cpum.GstCtx.rip \
    12631292                          && uCsBefore            == pVCpu->cpum.GstCtx.cs.Sel) \
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