Changeset 35490 in vbox for trunk/include/iprt
- Timestamp:
- Jan 11, 2011 3:17:10 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69370
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/uint128.h
r35488 r35490 269 269 270 270 /** 271 * Performs a bitwise AND of a 128-bit unsigned integer value and a mask made 272 * up of the first N bits, assigning the result to the the 128-bit value. 273 * 274 * @returns pValueResult. 275 * @param pValueResult The value and result. 276 * @param cBits The number of bits to AND (counting from the first 277 * bit). 278 */ 279 DECLINLINE(PRTUINT128U) RTUInt128AssignAndNFirstBits(PRTUINT128U pValueResult, unsigned cBits) 280 { 281 if (cBits <= 64) 282 { 283 if (cBits != 64) 284 pValueResult->s.Lo &= (RT_BIT_64(cBits) - 1); 285 pValueResult->s.Hi = 0; 286 } 287 else if (cBits < 128) 288 pValueResult->s.Hi &= (RT_BIT_64(cBits - 64) - 1); 289 /** @todo #if ARCH_BITS >= 64 */ 290 return pValueResult; 291 } 292 293 294 /** 271 295 * Performs a bitwise OR of two 128-bit unsigned integer values and assigned 272 296 * the result to the first one.
Note:
See TracChangeset
for help on using the changeset viewer.