VirtualBox

Changeset 101141 in vbox


Ignore:
Timestamp:
Sep 18, 2023 11:09:27 AM (16 months ago)
Author:
vboxsync
Message:

iprt/x86.h: Added X86_MOD_MEM[014] and X86_MOD_REG for use with X86_MODRM_MAKE. bugref:10370

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/x86.h

    r101000 r101141  
    48764876#define X86_MODRM_MOD_SMASK     UINT8_C(0x03)
    48774877#define X86_MODRM_MOD_SHIFT     6
     4878
     4879#define X86_MOD_MEM0            0   /**< Indirect addressing without displacement (except RM=4 (SIB) and RM=5 (disp32)). */
     4880#define X86_MOD_MEM1            1   /**< Indirect addressing with 8-bit displacement. */
     4881#define X86_MOD_MEM4            2   /**< Indirect addressing with 32-bit displacement. */
     4882#define X86_MOD_REG             3   /**< Registers. */
     4883
    48784884#ifndef VBOX_FOR_DTRACE_LIB
    48794885AssertCompile((X86_MODRM_RM_MASK | X86_MODRM_REG_MASK | X86_MODRM_MOD_MASK) == 0xff);
     
    48814887AssertCompile((X86_MODRM_MOD_MASK >> X86_MODRM_MOD_SHIFT) == X86_MODRM_MOD_SMASK);
    48824888/** @def X86_MODRM_MAKE
    4883  * @param   a_Mod       The mod value (0..3).
     4889 * @param   a_Mod       The mod value (0..3) - X86_MOD_XXX.
    48844890 * @param   a_Reg       The register value (0..7).
    48854891 * @param   a_RegMem    The register or memory value (0..7). */
    48864892# define X86_MODRM_MAKE(a_Mod, a_Reg, a_RegMem) (((a_Mod) << X86_MODRM_MOD_SHIFT) | ((a_Reg) << X86_MODRM_REG_SHIFT) | (a_RegMem))
    48874893#endif
     4894
    48884895/** @} */
    48894896
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