Index: /trunk/src/VBox/Runtime/common/asm/asm-fake.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/asm/asm-fake.cpp	(revision 43681)
+++ /trunk/src/VBox/Runtime/common/asm/asm-fake.cpp	(revision 43682)
@@ -229,6 +229,6 @@
 RTDECL(void) ASMBitSet(volatile void *pvBitmap, int32_t iBit)
 {
-    uint32_t volatile *pau32Bitmap = (uint32_t volatile *)pvBitmap;
-    pau32Bitmap[iBit / 32] |= RT_BIT_32(iBit & 31);
+    uint8_t volatile *pau8Bitmap = (uint8_t volatile *)pvBitmap;
+    pau8Bitmap[iBit / 8] |= (uint8_t)RT_BIT_32(iBit & 7);
 }
 
@@ -240,6 +240,6 @@
 RTDECL(void) ASMBitClear(volatile void *pvBitmap, int32_t iBit)
 {
-    uint32_t volatile *pau32Bitmap = (uint32_t volatile *)pvBitmap;
-    pau32Bitmap[iBit / 32] &= ~RT_BIT_32(iBit & 31);
+    uint8_t volatile *pau8Bitmap = (uint8_t volatile *)pvBitmap;
+    pau8Bitmap[iBit / 8] &= ~((uint8_t)RT_BIT_32(iBit & 7));
 }
 
@@ -251,6 +251,6 @@
 RTDECL(void) ASMBitToggle(volatile void *pvBitmap, int32_t iBit)
 {
-    uint32_t volatile *pau32Bitmap = (uint32_t volatile *)pvBitmap;
-    pau32Bitmap[iBit / 32] ^= RT_BIT_32(iBit & 31);
+    uint8_t volatile *pau8Bitmap = (uint8_t volatile *)pvBitmap;
+    pau8Bitmap[iBit / 8] ^= (uint8_t)RT_BIT_32(iBit & 7);
 }
 
@@ -300,6 +300,6 @@
 RTDECL(bool) ASMBitTest(const volatile void *pvBitmap, int32_t iBit)
 {
-    uint32_t volatile *pau32Bitmap = (uint32_t volatile *)pvBitmap;
-    return pau32Bitmap[iBit / 32] & RT_BIT_32(iBit & 31) ? true : false;
+    uint8_t volatile *pau8Bitmap = (uint8_t volatile *)pvBitmap;
+    return  pau8Bitmap[iBit / 8] & (uint8_t)RT_BIT_32(iBit & 7) ? true : false;
 }
 
@@ -307,13 +307,14 @@
 {
     uint32_t           iBit = 0;
-    uint32_t volatile *pu32 = (uint32_t volatile *)pvBitmap;
+    uint8_t volatile *pu8 = (uint8_t volatile *)pvBitmap;
+
     while (iBit < cBits)
     {
-        uint32_t u32 = *pu32;
-        if (u32 != UINT32_MAX)
+        uint8_t u8 = *pu8;
+        if (u8 != UINT8_MAX)
         {
-            while (u32 & 1)
+            while (u8 & 1)
             {
-                u32 >>= 1;
+                u8 >>= 1;
                 iBit++;
             }
@@ -323,6 +324,6 @@
         }
 
-        iBit += 32;
-        pu32++;
+        iBit += 8;
+        pu8++;
     }
     return -1;
@@ -331,18 +332,18 @@
 RTDECL(int) ASMBitNextClear(const volatile void *pvBitmap, uint32_t cBits, uint32_t iBitPrev)
 {
-    const volatile uint32_t *pau32Bitmap = (const volatile uint32_t *)pvBitmap;
-    int                      iBit = ++iBitPrev & 31;
+    const volatile uint8_t *pau8Bitmap = (const volatile uint8_t *)pvBitmap;
+    int                      iBit = ++iBitPrev & 7;
     if (iBit)
     {
         /*
-         * Inspect the 32-bit word containing the unaligned bit.
+         * Inspect the byte containing the unaligned bit.
          */
-        uint32_t u32 = ~pau32Bitmap[iBitPrev / 32] >> iBit;
-        if (u32)
+        uint8_t u8 = ~pau8Bitmap[iBitPrev / 8] >> iBit;
+        if (u8)
         {
             iBit = 0;
-            while (!(u32 & 1))
+            while (!(u8 & 1))
             {
-                u32 >>= 1;
+                u8 >>= 1;
                 iBit++;
             }
@@ -353,14 +354,14 @@
          * Skip ahead and see if there is anything left to search.
          */
-        iBitPrev |= 31;
+        iBitPrev |= 7;
         iBitPrev++;
-        if (cBits <= (uint32_t)iBitPrev)
+        if (cBits <= iBitPrev)
             return -1;
     }
 
     /*
-     * 32-bit aligned search, let ASMBitFirstClear do the dirty work.
+     * Byte search, let ASMBitFirstClear do the dirty work.
      */
-    iBit = ASMBitFirstClear(&pau32Bitmap[iBitPrev / 32], cBits - iBitPrev);
+    iBit = ASMBitFirstClear(&pau8Bitmap[iBitPrev / 8], cBits - iBitPrev);
     if (iBit >= 0)
         iBit += iBitPrev;
@@ -371,13 +372,13 @@
 {
     uint32_t           iBit = 0;
-    uint32_t volatile *pu32 = (uint32_t volatile *)pvBitmap;
+    uint8_t volatile *pu8 = (uint8_t volatile *)pvBitmap;
     while (iBit < cBits)
     {
-        uint32_t u32 = *pu32;
-        if (u32 != 0)
+        uint8_t u8 = *pu8;
+        if (u8 != 0)
         {
-            while (!(u32 & 1))
+            while (!(u8 & 1))
             {
-                u32 >>= 1;
+                u8 >>= 1;
                 iBit++;
             }
@@ -387,6 +388,6 @@
         }
 
-        iBit += 32;
-        pu32++;
+        iBit += 8;
+        pu8++;
     }
     return -1;
@@ -395,18 +396,18 @@
 RTDECL(int) ASMBitNextSet(const volatile void *pvBitmap, uint32_t cBits, uint32_t iBitPrev)
 {
-    const volatile uint32_t *pau32Bitmap = (const volatile uint32_t *)pvBitmap;
-    int                      iBit = ++iBitPrev & 31;
+    const volatile uint8_t *pau8Bitmap = (const volatile uint8_t *)pvBitmap;
+    int                      iBit = ++iBitPrev & 7;
     if (iBit)
     {
         /*
-         * Inspect the 32-bit word containing the unaligned bit.
+         * Inspect the byte containing the unaligned bit.
          */
-        uint32_t u32 = pau32Bitmap[iBitPrev / 32] >> iBit;
-        if (u32)
+        uint8_t u8 = pau8Bitmap[iBitPrev / 8] >> iBit;
+        if (u8)
         {
             iBit = 0;
-            while (!(u32 & 1))
+            while (!(u8 & 1))
             {
-                u32 >>= 1;
+                u8 >>= 1;
                 iBit++;
             }
@@ -417,14 +418,14 @@
          * Skip ahead and see if there is anything left to search.
          */
-        iBitPrev |= 31;
+        iBitPrev |= 7;
         iBitPrev++;
-        if (cBits <= (uint32_t)iBitPrev)
+        if (cBits <= iBitPrev)
             return -1;
     }
 
     /*
-     * 32-bit aligned search, let ASMBitFirstSet do the dirty work.
+     * Byte search, let ASMBitFirstSet do the dirty work.
      */
-    iBit = ASMBitFirstSet(&pau32Bitmap[iBitPrev / 32], cBits - iBitPrev);
+    iBit = ASMBitFirstSet(&pau8Bitmap[iBitPrev / 8], cBits - iBitPrev);
     if (iBit >= 0)
         iBit += iBitPrev;
