VirtualBox

Changeset 55469 in vbox


Ignore:
Timestamp:
Apr 28, 2015 12:27:43 AM (10 years ago)
Author:
vboxsync
Message:

cpumctx.h: Fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpumctx.h

    r55467 r55469  
    432432 *
    433433 */
    434 #if defined(VBOX_STRICT) && defined(RT_COMPILER_SUPPORTS_LAMDA)
     434#if defined(VBOX_STRICT) && defined(RT_COMPILER_SUPPORTS_LAMBDA)
    435435# define CPUMCTX_XSAVE_C_PTR(a_pCtx, a_iCompBit, a_PtrType) \
    436     ([](PCCPUMCTX pCtx) -> a_PtrType \
     436    ([](PCCPUMCTX a_pLambdaCtx) -> a_PtrType \
    437437    { \
    438438        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)]); \
    442442    }(a_pCtx))
    443443#elif defined(VBOX_STRICT) && defined(__GNUC__)
    444444# 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    })
    451452#else
    452453# 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)]))
    454455#endif
    455456
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