diff --git a/bochs/cpu/init.cc b/bochs/cpu/init.cc index 2c8ae956f..9b3e5d372 100644 --- a/bochs/cpu/init.cc +++ b/bochs/cpu/init.cc @@ -1081,6 +1081,12 @@ void BX_CPU_C::sanity_checks(void) if (sizeof(Bit64u) != 8 || sizeof(Bit64s) != 8) BX_PANIC(("data type Bit64u or Bit64u is not of length 8 bytes!")); + if (sizeof(void*) != sizeof(bx_ptr_equiv_t)) + BX_PANIC(("data type bx_ptr_equiv_t is not equivalent to 'void*' pointer")); + + if (sizeof(int) < 4) + BX_PANIC(("Bochs assumes that 'int' type is at least 4 bytes wide!")); + BX_DEBUG(("#(%u)all sanity checks passed!", BX_CPU_ID)); }