VirtualBox

Changeset 93794 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 16, 2022 2:34:18 PM (3 years ago)
Author:
vboxsync
Message:

VMM/IEM: Working on adding missing C version of IEMAllAImpl.asm functions. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r93792 r93794  
    14101410
    14111411# endif /* !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) */
    1412 
     1412#endif
     1413
     1414IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg16b_fallback,(PRTUINT128U pu128Dst, PRTUINT128U pu128RaxRdx,
     1415                                                      PRTUINT128U pu128RbxRcx, uint32_t *pEFlags))
     1416{
     1417    RTUINT128U u128Tmp = *pu128Dst;
     1418    if (   u128Tmp.s.Lo == pu128RaxRdx->s.Lo
     1419        && u128Tmp.s.Hi == pu128RaxRdx->s.Hi)
     1420    {
     1421        *pu128Dst = *pu128RbxRcx;
     1422        *pEFlags |= X86_EFL_ZF;
     1423    }
     1424    else
     1425    {
     1426        *pu128RaxRdx = u128Tmp;
     1427        *pEFlags &= ~X86_EFL_ZF;
     1428    }
     1429}
     1430
     1431#if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY)
    14131432
    14141433/*
     
    27112730# endif /* !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) */
    27122731
     2732
     2733
     2734# if defined(IEM_WITHOUT_ASSEMBLY)
     2735
     2736/*
     2737 * LFENCE, SFENCE & MFENCE.
     2738 */
     2739
     2740IEM_DECL_IMPL_DEF(void, iemAImpl_lfence,(void))
     2741{
     2742    ASMReadFence();
     2743}
     2744
     2745
     2746IEM_DECL_IMPL_DEF(void, iemAImpl_sfence,(void))
     2747{
     2748    ASMWriteFence();
     2749}
     2750
     2751
     2752IEM_DECL_IMPL_DEF(void, iemAImpl_mfence,(void))
     2753{
     2754    ASMMemoryFence();
     2755}
     2756
     2757# endif
     2758
    27132759#endif /* !RT_ARCH_AMD64 || IEM_WITHOUT_ASSEMBLY */
    27142760
     
    27252771    else
    27262772        *pfEFlags &= ~X86_EFL_ZF;
    2727 }
    2728 
    2729 
    2730 
    2731 IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg16b_fallback,(PRTUINT128U pu128Dst, PRTUINT128U pu128RaxRdx,
    2732                                                       PRTUINT128U pu128RbxRcx, uint32_t *pEFlags))
    2733 {
    2734     RTUINT128U u128Tmp = *pu128Dst;
    2735     if (   u128Tmp.s.Lo == pu128RaxRdx->s.Lo
    2736         && u128Tmp.s.Hi == pu128RaxRdx->s.Hi)
    2737     {
    2738         *pu128Dst = *pu128RbxRcx;
    2739         *pEFlags |= X86_EFL_ZF;
    2740     }
    2741     else
    2742     {
    2743         *pu128RaxRdx = u128Tmp;
    2744         *pEFlags &= ~X86_EFL_ZF;
    2745     }
    27462773}
    27472774
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