Changeset 55469 in vbox
- Timestamp:
- Apr 28, 2015 12:27:43 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpumctx.h
r55467 r55469 432 432 * 433 433 */ 434 #if defined(VBOX_STRICT) && defined(RT_COMPILER_SUPPORTS_LAM DA)434 #if defined(VBOX_STRICT) && defined(RT_COMPILER_SUPPORTS_LAMBDA) 435 435 # define CPUMCTX_XSAVE_C_PTR(a_pCtx, a_iCompBit, a_PtrType) \ 436 ([](PCCPUMCTX pCtx) -> a_PtrType \436 ([](PCCPUMCTX a_pLambdaCtx) -> a_PtrType \ 437 437 { \ 438 438 AssertCompile((a_iCompBit) < 64U); \ 439 AssertMsg( (pCtx)->fXStateMask & RT_BIT_64(a_iCompBit), (#a_iCompBit "\n")); \440 AssertMsg( (pCtx)->aoffXState[(a_iCompBit)] != UINT16_MAX, (#a_iCompBit "\n")); \441 return (a_PtrType)((uint8_t *) (pCtx)->CTX_SUFF(pXState) + pCtx->aoffXState[(a_iCompBit)]); \439 AssertMsg(a_pLambdaCtx->fXStateMask & RT_BIT_64(a_iCompBit), (#a_iCompBit "\n")); \ 440 AssertMsg(a_pLambdaCtx->aoffXState[(a_iCompBit)] != UINT16_MAX, (#a_iCompBit "\n")); \ 441 return (a_PtrType)((uint8_t *)a_pLambdaCtx->CTX_SUFF(pXState) + a_pLambdaCtx->aoffXState[(a_iCompBit)]); \ 442 442 }(a_pCtx)) 443 443 #elif defined(VBOX_STRICT) && defined(__GNUC__) 444 444 # define CPUMCTX_XSAVE_C_PTR(a_pCtx, a_iCompBit, a_PtrType) \ 445 __extension__ ({ \ 446 AssertCompile((a_iCompBit) < 64U); \ 447 AssertMsg((a_pCtx)->fXStateMask & RT_BIT_64(a_iCompBit), (#a_iCompBit "\n")); \ 448 AssertMsg((a_pCtx)->aoffXState[(a_iCompBit)] != UINT16_MAX, (#a_iCompBit "\n")); \ 449 (a_PtrType)((uint8_t *)(a_pCtx)->CTX_SUFF(pXState) + pCtx->aoffXState[(a_iCompBit)]); \ 450 }) 445 __extension__ (\ 446 { \ 447 AssertCompile((a_iCompBit) < 64U); \ 448 AssertMsg((a_pCtx)->fXStateMask & RT_BIT_64(a_iCompBit), (#a_iCompBit "\n")); \ 449 AssertMsg((a_pCtx)->aoffXState[(a_iCompBit)] != UINT16_MAX, (#a_iCompBit "\n")); \ 450 (a_PtrType)((uint8_t *)(a_pCtx)->CTX_SUFF(pXState) + (a_pCtx)->aoffXState[(a_iCompBit)]); \ 451 }) 451 452 #else 452 453 # define CPUMCTX_XSAVE_C_PTR(a_pCtx, a_iCompBit, a_PtrType) \ 453 ((a_PtrType)((uint8_t *)(a_pCtx)->CTX_SUFF(pXState) + pCtx->aoffXState[(a_iCompBit)]))454 ((a_PtrType)((uint8_t *)(a_pCtx)->CTX_SUFF(pXState) + (a_pCtx)->aoffXState[(a_iCompBit)])) 454 455 #endif 455 456
Note:
See TracChangeset
for help on using the changeset viewer.