Added missing sanity check.

The sanity check would help to detect real Bochs crash issue under Win x64 with MSDEV
configure script under Mingw env decided that SIZEOF_INT_P == 4 which is terribly wrong for 64-bit host.
This commit is contained in:
Stanislav Shwartsman 2014-11-04 19:00:20 +00:00
parent 9feed6d777
commit 6e254743c1

View File

@ -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));
}