Changeset 85075 in vbox for trunk/src/VBox/Runtime/common/string
- Timestamp:
- Jul 6, 2020 5:17:30 PM (5 years ago)
- Location:
- trunk/src/VBox/Runtime/common/string
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/memchr.cpp
r82968 r85075 51 51 #endif 52 52 { 53 registeruint8_t const *pu8 = (uint8_t const *)pv;54 registersize_t cb2 = cb;53 uint8_t const *pu8 = (uint8_t const *)pv; 54 size_t cb2 = cb; 55 55 while (cb2-- > 0) 56 56 { -
trunk/src/VBox/Runtime/common/string/memcmp.cpp
r82968 r85075 54 54 #endif 55 55 { 56 registerunion56 union 57 57 { 58 58 uint8_t const *pu8; … … 64 64 65 65 /* 32-bit word compare. */ 66 registersize_t c = cb >> 2;66 size_t c = cb >> 2; 67 67 while (c-- > 0) 68 68 { 69 69 /* ASSUMES int is at least 32-bit! */ 70 registerint32_t iDiff = *uDst.pu32++ - *uSrc.pu32++;70 int32_t iDiff = *uDst.pu32++ - *uSrc.pu32++; 71 71 if (iDiff) 72 72 return iDiff; … … 77 77 while (c-- > 0) 78 78 { 79 registerint8_t iDiff = *uDst.pu8++ - *uSrc.pu8++;79 int8_t iDiff = *uDst.pu8++ - *uSrc.pu8++; 80 80 if (iDiff) 81 81 return iDiff; -
trunk/src/VBox/Runtime/common/string/memcpy.cpp
r82968 r85075 50 50 #endif 51 51 { 52 registerunion52 union 53 53 { 54 54 uint8_t *pu8; … … 58 58 uTrg.pv = pvDst; 59 59 60 registerunion60 union 61 61 { 62 62 uint8_t const *pu8; … … 67 67 68 68 /* 32-bit word moves. */ 69 registersize_t c = cb >> 2;69 size_t c = cb >> 2; 70 70 while (c-- > 0) 71 71 *uTrg.pu32++ = *uSrc.pu32++; -
trunk/src/VBox/Runtime/common/string/memset.cpp
r82968 r85075 50 50 #endif 51 51 { 52 registerunion52 union 53 53 { 54 54 uint8_t *pu8; … … 59 59 60 60 /* 32-bit word moves. */ 61 registeruint32_t u32 = ch | (ch << 8);61 uint32_t u32 = ch | (ch << 8); 62 62 u32 |= u32 << 16; 63 registersize_t c = cb >> 2;63 size_t c = cb >> 2; 64 64 while (c-- > 0) 65 65 *u.pu32++ = u32; -
trunk/src/VBox/Runtime/common/string/strcpy.cpp
r82968 r85075 39 39 * @param pszSrc Zero terminated string. 40 40 */ 41 char* strcpy(char *pszDst, registerconst char *pszSrc)41 char* strcpy(char *pszDst, const char *pszSrc) 42 42 { 43 registerchar *psz = pszDst;43 char *psz = pszDst; 44 44 while ((*psz++ = *pszSrc++)) 45 45 ; -
trunk/src/VBox/Runtime/common/string/strlen.cpp
r82968 r85075 48 48 #endif 49 49 { 50 registerconst char *psz = pszString;50 const char *psz = pszString; 51 51 while (*psz) 52 52 psz++;
Note:
See TracChangeset
for help on using the changeset viewer.