VirtualBox

Changeset 106994 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Nov 13, 2024 4:43:36 PM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165930
Message:

IPRT/memset.cpp: Try prevent the compiler from optimizing anything into a memset call. jiraref:VBP-1442

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/memset.cpp

    r106061 r106994  
    7878
    7979    /* Remaining byte moves. */
    80     c = cb & 3;
    81     while (c-- > 0)
    82         *u.pu8++ = (uint8_t)u32;
     80    switch (cb & 3)
     81    {
     82        case 0:
     83            break;
     84        case 3:
     85            *u.pu8++ = (uint8_t)u32;
     86            RT_FALL_THRU();
     87        case 2:
     88            *u.pu8++ = (uint8_t)u32;
     89            RT_FALL_THRU();
     90        case 1:
     91            *u.pu8++ = (uint8_t)u32;
     92            break;
     93    }
    8394
    8495    return pvDst;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette