VirtualBox

Changeset 94512 in vbox


Ignore:
Timestamp:
Apr 7, 2022 1:21:28 PM (2 years ago)
Author:
vboxsync
Message:

IPRT: Added RTUInt128MulEx and RTUInt128MulU64Ex as well as a limited RTUInt256Xxx Api. [build fix] bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm-math.h

    r93115 r94512  
    121121
    122122
    123 #if ARCH_BITS == 64
    124123DECLINLINE(uint64_t) ASMMult2xU64Ret2xU64(uint64_t u64F1, uint64_t u64F2, uint64_t *pu64ProdHi)
    125124{
    126 # if defined(RT_ARCH_AMD64) && (RT_INLINE_ASM_GNU_STYLE || RT_INLINE_ASM_USES_INTRIN)
    127 #  if RT_INLINE_ASM_GNU_STYLE
     125#if defined(RT_ARCH_AMD64) && (RT_INLINE_ASM_GNU_STYLE || RT_INLINE_ASM_USES_INTRIN)
     126# if RT_INLINE_ASM_GNU_STYLE
    128127    uint64_t u64Low, u64High;
    129128    __asm__ __volatile__("mulq %%rdx"
     
    132131    *pu64ProdHi = u64High;
    133132    return u64Low;
    134 #  elif RT_INLINE_ASM_USES_INTRIN
     133# elif RT_INLINE_ASM_USES_INTRIN
    135134    return _umul128(u64F1, u64F2, pu64ProdHi);
    136 #  else
    137  error "hmm"
    138 #  endif
    139 # else  /* generic: */
     135# else
     136error "hmm"
     137# endif
     138#else  /* generic: */
    140139    /*
    141140     *   F1 * F2 = Prod
     
    176175    *pu64ProdHi  = Prod.s.Hi;
    177176    return Prod.s.Lo;
    178 # endif
    179 }
    180 #endif
     177#endif
     178}
    181179
    182180
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