tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITS
authorRichard Henderson <rth@twiddle.net>
Tue, 4 Jun 2013 16:51:59 +0000 (09:51 -0700)
committerRichard Henderson <rth@twiddle.net>
Wed, 5 Jun 2013 12:54:00 +0000 (05:54 -0700)
Rather than a hand-coded version of the same thing.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
include/exec/cpu-defs.h

index d8c64e9..2e5a9ba 100644 (file)
@@ -99,7 +99,7 @@ typedef struct CPUTLBEntry {
                    sizeof(uintptr_t))];
 } CPUTLBEntry;
 
-extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1];
+QEMU_BUILD_BUG_ON(sizeof(CPUTLBEntry) != (1 << CPU_TLB_ENTRY_BITS));
 
 #define CPU_COMMON_TLB \
     /* The meaning of the MMU modes is defined in the target code. */   \