Changeset 58791 in vbox
- Timestamp:
- Nov 20, 2015 3:39:54 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104241
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r58773 r58791 4411 4411 { 4412 4412 volatile uint32_t *pu32 = (volatile uint32_t *)pvBitmap + (iBitStart >> 5); 4413 int iStart = iBitStart & ~31;4414 int iEnd = iBitEnd & ~31;4413 int32_t iStart = iBitStart & ~31; 4414 int32_t iEnd = iBitEnd & ~31; 4415 4415 if (iStart == iEnd) 4416 *pu32 &= (( 1U << (iBitStart & 31)) - 1) | ~((1U<< (iBitEnd & 31)) - 1);4416 *pu32 &= ((UINT32_C(1) << (iBitStart & 31)) - 1) | ~((UINT32_C(1) << (iBitEnd & 31)) - 1); 4417 4417 else 4418 4418 { … … 4420 4420 if (iBitStart & 31) 4421 4421 { 4422 *pu32 &= ( 1U<< (iBitStart & 31)) - 1;4422 *pu32 &= (UINT32_C(1) << (iBitStart & 31)) - 1; 4423 4423 pu32++; 4424 4424 iBitStart = iStart + 32; … … 4433 4433 { 4434 4434 pu32 = (volatile uint32_t *)pvBitmap + (iBitEnd >> 5); 4435 *pu32 &= ~(( 1U<< (iBitEnd & 31)) - 1);4435 *pu32 &= ~((UINT32_C(1) << (iBitEnd & 31)) - 1); 4436 4436 } 4437 4437 } … … 4452 4452 { 4453 4453 volatile uint32_t *pu32 = (volatile uint32_t *)pvBitmap + (iBitStart >> 5); 4454 int iStart = iBitStart & ~31;4455 int iEnd = iBitEnd & ~31;4454 int32_t iStart = iBitStart & ~31; 4455 int32_t iEnd = iBitEnd & ~31; 4456 4456 if (iStart == iEnd) 4457 *pu32 |= (( 1U<< (iBitEnd - iBitStart)) - 1) << (iBitStart & 31);4457 *pu32 |= ((UINT32_C(1) << (iBitEnd - iBitStart)) - 1) << (iBitStart & 31); 4458 4458 else 4459 4459 { … … 4461 4461 if (iBitStart & 31) 4462 4462 { 4463 *pu32 |= ~(( 1U<< (iBitStart & 31)) - 1);4463 *pu32 |= ~((UINT32_C(1) << (iBitStart & 31)) - 1); 4464 4464 pu32++; 4465 4465 iBitStart = iStart + 32; … … 4474 4474 { 4475 4475 pu32 = (volatile uint32_t *)pvBitmap + (iBitEnd >> 5); 4476 *pu32 |= ( 1U<< (iBitEnd & 31)) - 1;4476 *pu32 |= (UINT32_C(1) << (iBitEnd & 31)) - 1; 4477 4477 } 4478 4478 }
Note:
See TracChangeset
for help on using the changeset viewer.