VirtualBox

Changeset 59747 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 19, 2016 11:18:18 PM (9 years ago)
Author:
vboxsync
Message:

iprt/asm.h: Cleaned up the ASMMemIsAll8/U32 mess and implmeneted the former in assembly. (Found inverted usage due to bad naming in copyUtf8Block, but it is fortunately an unused method.) Replaces the complicated ASMBitFirstSet based scanning in RTSgBufIsZero with a simple call to the new ASMMemIsZero function.

Location:
trunk/src/VBox/Devices
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/BiosCommonCode/MakeAlternativeSource.cpp

    r57358 r59747  
    612612                     "  ; Padding %#x bytes at %#x\n", cbPadding, uFlatAddr);
    613613    uint8_t const  *pb = &g_pbImg[uFlatAddr - g_uBiosFlatBase];
    614     if (!ASMMemIsAll8(pb, cbPadding, 0))
     614    if (ASMMemIsZero(pb, cbPadding))
    615615        return outputPrintf("  times %u db 0\n", cbPadding);
    616616
     
    955955        /* Trailing zero padding detection. */
    956956        if (   *pb == '\0'
    957             && ASMMemIsAll8(pb, RT_MIN(cb, 8), 0) == NULL)
    958         {
    959             void    *pv      = ASMMemIsAll8(pb, cb, 0);
     957            && ASMMemIsZero(pb, RT_MIN(cb, 8)))
     958        {
     959            void    *pv      = ASMMemFirstNonZero(pb, cb);
    960960            uint32_t cbZeros = pv ? (uint32_t)((uint8_t const *)pv - pb) : cb;
    961961            if (!outputPrintf("    times %#x db 0\n", cbZeros))
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-info.cpp

    r57358 r59747  
    18781878                if (pSurface->pMipmapLevels[iMipmap].pSurfaceData)
    18791879                {
    1880                     if (  ASMMemIsAll8(pSurface->pMipmapLevels[iMipmap].pSurfaceData,
    1881                                        pSurface->pMipmapLevels[iMipmap].cbSurface, 0) == NULL)
     1880                    if (ASMMemIsZero(pSurface->pMipmapLevels[iMipmap].pSurfaceData,
     1881                                     pSurface->pMipmapLevels[iMipmap].cbSurface))
    18821882                        pHlp->pfnPrintf(pHlp, "--- Face #%u, mipmap #%u[%u]: all zeros ---\n", iFace, iLevel, iMipmap);
    18831883                    else
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