VirtualBox

Ignore:
Timestamp:
Jul 6, 2014 6:09:40 PM (10 years ago)
Author:
vboxsync
Message:

Documented another bswap experiment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/checksum/alt-sha256.cpp

    r51884 r51885  
    210210       in the processing loop. */
    211211# ifdef RT_LITTLE_ENDIAN
    212 #  if ARCH_BITS == 64
     212#  if 0 /* Just an idea... very little gain as this isn't the expensive code. */
     213    __m128i const  uBSwapConst = { 3, 2, 1, 0,  7, 6, 5, 4,  11, 10, 9, 8,  15, 14, 13, 12 };
     214    __m128i const *puSrc = (__m128i const *)pbBlock;
     215    __m128i       *puDst = (__m128i *)&pCtx->AltPrivate.auW[0];
     216
     217    _mm_storeu_si128(puDst, _mm_shuffle_epi8(_mm_loadu_si128(puSrc), uBSwapConst)); puDst++; puSrc++;
     218    _mm_storeu_si128(puDst, _mm_shuffle_epi8(_mm_loadu_si128(puSrc), uBSwapConst)); puDst++; puSrc++;
     219    _mm_storeu_si128(puDst, _mm_shuffle_epi8(_mm_loadu_si128(puSrc), uBSwapConst)); puDst++; puSrc++;
     220    _mm_storeu_si128(puDst, _mm_shuffle_epi8(_mm_loadu_si128(puSrc), uBSwapConst)); puDst++; puSrc++;
     221
     222#  elif ARCH_BITS == 64
    213223    uint64_t const *puSrc = (uint64_t const *)pbBlock;
    214224    uint64_t       *puW   = (uint64_t *)&pCtx->AltPrivate.auW[0];
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