sanity.h revision b4f03aea544c9a58d8959658b31f7bd716a3f097
/* $Id$ */
/** @file
* InnoTek Portable Runtime - Setup Sanity Checks, C and C++.
*/
/*
* Copyright (c) 2007 InnoTek Systemberatung GmbH
*
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*
*/
/*
* Check that the IN_[RING3|RING0|GC] and [|R3_|R0_|GC_]ARCH_BITS
* match up correctly.
*
* IPRT assumes r0 and r3 to has the same bit count.
*/
# error "defined(IN_RING3) && ARCH_BITS != R3_ARCH_BITS"
#endif
# error "defined(IN_RING0) && ARCH_BITS != R0_ARCH_BITS"
#endif
# error "defined(IN_GC) && ARCH_BITS != GC_ARCH_BITS"
#endif
# error "(defined(IN_RING0) || defined(IN_RING3)) && HC_ARCH_BITS != ARCH_BITS"
#endif
# error "defined(IN_GC) && GC_ARCH_BITS != ARCH_BITS"
#endif
/*
*/
#if HC_ARCH_BITS == 64
/*AssertCompileSize(RTHCINTREG, 8);*/
/*AssertCompileSize(RTR0INT, 4);*/
/*AssertCompileSize(RTR0UINT, 4);*/
/*AssertCompileSize(RTR3PTR, 8);*/
/*AssertCompileSize(RTR3INT, 4);*/
/*AssertCompileSize(RTR3UINT, 4);*/
/*AssertCompileSize(RTCCINTREG, 8);*/
# endif
#else
/*AssertCompileSize(RTHCINTPTR, 4);*/
/*AssertCompileSize(RTR0INT, 4);*/
/*AssertCompileSize(RTR0UINT, 4);*/
/*AssertCompileSize(RTR3PTR, 4);*/
/*AssertCompileSize(RTR3INT, 4);*/
/*AssertCompileSize(RTR3UINT, 4);*/
# if GC_ARCH_BITS == 64
# else
# endif
/*AssertCompileSize(RTCCINTREG, 4);*/
# endif
#endif
/*
* Check basic guest context types.
*/
#if GC_ARCH_BITS == 64
/*AssertCompileSize(RTGCINTREG, 8);*/
# ifdef IN_GC
/*AssertCompileSize(RTCCINTREG, 8);*/
# endif
#else
/*AssertCompileSize(RTGCINTREG, 4);*/
# ifdef IN_GC
/*AssertCompileSize(RTCCINTREG, 4);*/
# endif
#endif
/*
* Check basic current context types.
*/
#if ARCH_BITS == 64
AssertCompileSize(void *, 8);
#else
AssertCompileSize(void *, 4);
#endif