Changeset 42407 in vbox for trunk/include/iprt
- Timestamp:
- Jul 26, 2012 11:41:35 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 79503
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/x86.h
r42337 r42407 2385 2385 * Return the base address of a descriptor. 2386 2386 */ 2387 #define X86DESC_BASE( desc) /*ASM-NOINC*/ \2388 ( ((uint32_t)(( desc).Gen.u8BaseHigh2) << 24) \2389 | ( ( desc).Gen.u8BaseHigh1 << 16) \2390 | ( ( desc).Gen.u16BaseLow ) )2387 #define X86DESC_BASE(a_pDesc) /*ASM-NOINC*/ \ 2388 ( ((uint32_t)((a_pDesc)->Gen.u8BaseHigh2) << 24) \ 2389 | ( (a_pDesc)->Gen.u8BaseHigh1 << 16) \ 2390 | ( (a_pDesc)->Gen.u16BaseLow ) ) 2391 2391 2392 2392 /** @def X86DESC_LIMIT 2393 2393 * Return the limit of a descriptor. 2394 2394 */ 2395 #define X86DESC_LIMIT(desc) /*ASM-NOINC*/ \ 2396 ( ((uint32_t)((desc).Gen.u4LimitHigh) << 16) \ 2397 | ( (desc).Gen.u16LimitLow ) ) 2395 #define X86DESC_LIMIT(a_pDesc) /*ASM-NOINC*/ \ 2396 ( ((uint32_t)((a_pDesc)->Gen.u4LimitHigh) << 16) \ 2397 | ( (a_pDesc)->Gen.u16LimitLow ) ) 2398 2399 /** @def X86DESC_LIMIT_G 2400 * Return the limit of a descriptor with the granularity bit taken into account. 2401 * @returns Selector limit (uint32_t). 2402 * @param a_pDesc Pointer to the descriptor. 2403 */ 2404 #define X86DESC_LIMIT_G(a_pDesc) /*ASM-NOINC*/ \ 2405 ( (a_pDesc)->Gen.u1Granularity \ 2406 ? ( ( ((uint32_t)(a_pDesc)->Gen.u4LimitHigh << 16) | (a_pDesc)->Gen.u16LimitLow ) << 12 ) | UINT32_C(0xfff) \ 2407 : ((uint32_t)(a_pDesc)->Gen.u4LimitHigh << 16) | (a_pDesc)->Gen.u16LimitLow \ 2408 ) 2398 2409 2399 2410 /** @def X86DESC_GET_HID_ATTR 2400 2411 * Get the descriptor attributes for the hidden register. 2401 2412 */ 2402 #define X86DESC_GET_HID_ATTR( desc) /*ASM-NOINC*/ \2403 ( ( desc.u >> (16+16+8)) & UINT32_C(0xf0ff) ) /** @todo do we have a define for 0xf0ff? */2413 #define X86DESC_GET_HID_ATTR(a_pDesc) /*ASM-NOINC*/ \ 2414 ( ((a_pDesc)->u >> (16+16+8)) & UINT32_C(0xf0ff) ) /** @todo do we have a define for 0xf0ff? */ 2404 2415 2405 2416 #ifndef VBOX_FOR_DTRACE_LIB … … 2578 2589 * Return the base of a 64-bit descriptor. 2579 2590 */ 2580 #define X86DESC64_BASE( desc) /*ASM-NOINC*/ \2581 ( ((uint64_t)(( desc).Gen.u32BaseHigh3) << 32) \2582 | ((uint32_t)(( desc).Gen.u8BaseHigh2) << 24) \2583 | ( ( desc).Gen.u8BaseHigh1 << 16) \2584 | ( ( desc).Gen.u16BaseLow ) )2591 #define X86DESC64_BASE(a_pDesc) /*ASM-NOINC*/ \ 2592 ( ((uint64_t)((a_pDesc)->Gen.u32BaseHigh3) << 32) \ 2593 | ((uint32_t)((a_pDesc)->Gen.u8BaseHigh2) << 24) \ 2594 | ( (a_pDesc)->Gen.u8BaseHigh1 << 16) \ 2595 | ( (a_pDesc)->Gen.u16BaseLow ) ) 2585 2596 2586 2597 … … 2947 2958 2948 2959 /** 2949 * The mask used to mask off the table indicator and CPL of an selector.2960 * The mask used to mask off the table indicator and RPL of an selector. 2950 2961 */ 2951 2962 #define X86_SEL_MASK 0xfff8U 2963 2964 /** 2965 * The mask used to mask off the RPL of an selector. 2966 */ 2967 #define X86_SEL_MASK_RPL 0xfffcU 2952 2968 2953 2969 /**
Note:
See TracChangeset
for help on using the changeset viewer.