VirtualBox

Changeset 36849 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Apr 26, 2011 3:41:32 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71419
Message:

IEM: Some more bits.

File:
1 edited

Legend:

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

    r36793 r36849  
    19221922
    19231923/**
    1924  * FPU state (aka FSAVE/FRSTOR Memory Region).
     1924 * 32-bit FPU state (aka FSAVE/FRSTOR Memory Region).
     1925 * @todo verify this...
    19251926 */
    19261927#pragma pack(1)
    19271928typedef struct X86FPUSTATE
    19281929{
    1929     /** Control word. */
     1930    /** 0x00 - Control word. */
    19301931    uint16_t    FCW;
    1931     /** Alignment word */
     1932    /** 0x02 - Alignment word */
    19321933    uint16_t    Dummy1;
    1933     /** Status word. */
     1934    /** 0x04 - Status word. */
    19341935    uint16_t    FSW;
    1935     /** Alignment word */
     1936    /** 0x06 - Alignment word */
    19361937    uint16_t    Dummy2;
    1937     /** Tag word */
     1938    /** 0x08 - Tag word */
    19381939    uint16_t    FTW;
    1939     /** Alignment word */
     1940    /** 0x0a - Alignment word */
    19401941    uint16_t    Dummy3;
    19411942
    1942     /** Instruction pointer. */
     1943    /** 0x0c - Instruction pointer. */
    19431944    uint32_t    FPUIP;
    1944     /** Code selector. */
     1945    /** 0x10 - Code selector. */
    19451946    uint16_t    CS;
    1946     /** Opcode. */
     1947    /** 0x12 - Opcode. */
    19471948    uint16_t    FOP;
    1948     /** FOO. */
     1949    /** 0x14 - FOO. */
    19491950    uint32_t    FPUOO;
    1950     /** FOS. */
     1951    /** 0x18 - FOS. */
    19511952    uint32_t    FPUOS;
    1952     /* - offset 32 - */
     1953    /** 0x1c */
    19531954    union
    19541955    {
     
    19831984typedef struct X86FXSTATE
    19841985{
    1985     /** Control word. */
     1986    /** 0x00 - Control word. */
    19861987    uint16_t    FCW;
    1987     /** Status word. */
     1988    /** 0x02 - Status word. */
    19881989    uint16_t    FSW;
    1989     /** Tag word. (The upper byte is always zero.) */
     1990    /** 0x04 - Tag word. (The upper byte is always zero.) */
    19901991    uint16_t    FTW;
    1991     /** Opcode. */
     1992    /** 0x06 - Opcode. */
    19921993    uint16_t    FOP;
    1993     /** Instruction pointer. */
     1994    /** 0x08 - Instruction pointer. */
    19941995    uint32_t    FPUIP;
    1995     /** Code selector. */
     1996    /** 0x0c - Code selector. */
    19961997    uint16_t    CS;
    19971998    uint16_t    Rsvrd1;
    1998     /* - offset 16 - */
    1999     /** Data pointer. */
     1999    /** 0x10 - Data pointer. */
    20002000    uint32_t    FPUDP;
    2001     /** Data segment */
     2001    /** 0x14 - Data segment */
    20022002    uint16_t    DS;
     2003    /** 0x16 */
    20032004    uint16_t    Rsrvd2;
     2005    /** 0x18 */
    20042006    uint32_t    MXCSR;
     2007    /** 0x1c */
    20052008    uint32_t    MXCSR_MASK;
    2006     /* - offset 32 - */
     2009    /** 0x20 */
    20072010    union
    20082011    {
     
    20482051/** Pointer to a const FPU Extended state. */
    20492052typedef const X86FXSTATE *PCX86FXSTATE;
     2053
     2054/** @name FPU status word flags.
     2055 * @{ */
     2056/** Exception Flag: Invalid operation.  */
     2057#define X86_FSW_IE          RT_BIT(0)
     2058/** Exception Flag: Denormalized operand.  */
     2059#define X86_FSW_DE          RT_BIT(1)
     2060/** Exception Flag: Zero divide.  */
     2061#define X86_FSW_ZE          RT_BIT(2)
     2062/** Exception Flag: Overflow.  */
     2063#define X86_FSW_OE          RT_BIT(3)
     2064/** Exception Flag: Underflow.  */
     2065#define X86_FSW_UE          RT_BIT(4)
     2066/** Exception Flag: Precision.  */
     2067#define X86_FSW_PE          RT_BIT(5)
     2068/** Stack fault. */
     2069#define X86_FSW_SF          RT_BIT(6)
     2070/** Error summary status. */
     2071#define X86_FSW_ES          RT_BIT(7)
     2072/** Condition code 0. */
     2073#define X86_FSW_C0          RT_BIT(8)
     2074/** Condition code 1. */
     2075#define X86_FSW_C1          RT_BIT(9)
     2076/** Condition code 2. */
     2077#define X86_FSW_C2          RT_BIT(10)
     2078/** Top of the stack mask. */
     2079#define X86_FSW_TOP_MASK    UINT16_C(0x3800)
     2080/** TOP shift value. */
     2081#define X86_FSW_TOP_SHIFT   11
     2082/** Mask for getting TOP value after shifting it right. */
     2083#define X86_FSW_TOP_SMASK   UINT16_C(0x0007)
     2084/** Get the TOP value. */
     2085#define X86_FSW_TOP_GET(a_uFsw) (((a_uFsw) >> X86_FSW_TOP_SHIFT) & X86_FSW_TOP_SMASK)
     2086/** Condition code 3. */
     2087#define X86_FSW_C3          RT_BIT(14)
     2088/** FPU busy. */
     2089#define X86_FSW_B           RT_BIT(15)
     2090/** @} */
    20502091
    20512092
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette