Changeset 36849 in vbox for trunk/include/VBox
- Timestamp:
- Apr 26, 2011 3:41:32 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71419
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/x86.h
r36793 r36849 1922 1922 1923 1923 /** 1924 * FPU state (aka FSAVE/FRSTOR Memory Region). 1924 * 32-bit FPU state (aka FSAVE/FRSTOR Memory Region). 1925 * @todo verify this... 1925 1926 */ 1926 1927 #pragma pack(1) 1927 1928 typedef struct X86FPUSTATE 1928 1929 { 1929 /** Control word. */1930 /** 0x00 - Control word. */ 1930 1931 uint16_t FCW; 1931 /** Alignment word */1932 /** 0x02 - Alignment word */ 1932 1933 uint16_t Dummy1; 1933 /** Status word. */1934 /** 0x04 - Status word. */ 1934 1935 uint16_t FSW; 1935 /** Alignment word */1936 /** 0x06 - Alignment word */ 1936 1937 uint16_t Dummy2; 1937 /** Tag word */1938 /** 0x08 - Tag word */ 1938 1939 uint16_t FTW; 1939 /** Alignment word */1940 /** 0x0a - Alignment word */ 1940 1941 uint16_t Dummy3; 1941 1942 1942 /** Instruction pointer. */1943 /** 0x0c - Instruction pointer. */ 1943 1944 uint32_t FPUIP; 1944 /** Code selector. */1945 /** 0x10 - Code selector. */ 1945 1946 uint16_t CS; 1946 /** Opcode. */1947 /** 0x12 - Opcode. */ 1947 1948 uint16_t FOP; 1948 /** FOO. */1949 /** 0x14 - FOO. */ 1949 1950 uint32_t FPUOO; 1950 /** FOS. */1951 /** 0x18 - FOS. */ 1951 1952 uint32_t FPUOS; 1952 /* - offset 32 -*/1953 /** 0x1c */ 1953 1954 union 1954 1955 { … … 1983 1984 typedef struct X86FXSTATE 1984 1985 { 1985 /** Control word. */1986 /** 0x00 - Control word. */ 1986 1987 uint16_t FCW; 1987 /** Status word. */1988 /** 0x02 - Status word. */ 1988 1989 uint16_t FSW; 1989 /** Tag word. (The upper byte is always zero.) */1990 /** 0x04 - Tag word. (The upper byte is always zero.) */ 1990 1991 uint16_t FTW; 1991 /** Opcode. */1992 /** 0x06 - Opcode. */ 1992 1993 uint16_t FOP; 1993 /** Instruction pointer. */1994 /** 0x08 - Instruction pointer. */ 1994 1995 uint32_t FPUIP; 1995 /** Code selector. */1996 /** 0x0c - Code selector. */ 1996 1997 uint16_t CS; 1997 1998 uint16_t Rsvrd1; 1998 /* - offset 16 - */ 1999 /** Data pointer. */ 1999 /** 0x10 - Data pointer. */ 2000 2000 uint32_t FPUDP; 2001 /** Data segment */2001 /** 0x14 - Data segment */ 2002 2002 uint16_t DS; 2003 /** 0x16 */ 2003 2004 uint16_t Rsrvd2; 2005 /** 0x18 */ 2004 2006 uint32_t MXCSR; 2007 /** 0x1c */ 2005 2008 uint32_t MXCSR_MASK; 2006 /* - offset 32 -*/2009 /** 0x20 */ 2007 2010 union 2008 2011 { … … 2048 2051 /** Pointer to a const FPU Extended state. */ 2049 2052 typedef 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 /** @} */ 2050 2091 2051 2092
Note:
See TracChangeset
for help on using the changeset viewer.