Changeset 106561 in vbox for trunk/src/VBox/Runtime/common/asm/ASMBitFirstClear-generic.cpp
- Timestamp:
- Oct 21, 2024 12:29:15 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/asm/ASMBitFirstClear-generic.cpp
r106559 r106561 59 59 { 60 60 size_t const iBaseBit = ((uintptr_t)pu - (uintptr_t)pvBitmap) * 8; 61 return iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1;61 return (int32_t)(iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1); 62 62 } 63 63 pu = (const volatile size_t RT_FAR *)((uintptr_t)pu + sizeof(uint32_t)); … … 76 76 size_t const iBaseBit = ((uintptr_t)pu - (uintptr_t)pvBitmap) * 8; 77 77 #if ARCH_BITS == 32 78 return iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u)) - 1;78 return (int32_t)(iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u)) - 1); 79 79 #elif ARCH_BITS == 64 80 return iBaseBit + ASMBitFirstSetU64(~RT_LE2H_U64(u)) - 1;80 return (int32_t)(iBaseBit + ASMBitFirstSetU64(~RT_LE2H_U64(u)) - 1); 81 81 #else 82 82 # error "ARCH_BITS is not supported" … … 98 98 { 99 99 size_t const iBaseBit = ((uintptr_t)pu - (uintptr_t)pvBitmap) * 8; 100 return iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1;100 return (int32_t)(iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1); 101 101 } 102 102 }
Note:
See TracChangeset
for help on using the changeset viewer.