On 9/2/24 07:34, Richard Henderson wrote:
@@ -158,7 +158,7 @@ static uint64_t m5208_sys_read(void *opaque, hwaddr addr,
          {
              int n;
              for (n = 0; n < 32; n++) {
-                if (current_machine->ram_size < (2u << n)) {
+                if (current_machine->ram_size < (2ULL << n)) {
                      break;
                  }
              }

   31 - clz32(ram_size)

We might could do with lg2_pow2ceil() in host-utils.h, if that's clearer.


r~

Reply via email to