]> git.proxmox.com Git - qemu.git/commitdiff
Merge remote-tracking branch 'rth/tcg-for-anthony' into staging
authorAnthony Liguori <aliguori@us.ibm.com>
Fri, 14 Jun 2013 12:50:36 +0000 (07:50 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 14 Jun 2013 12:50:36 +0000 (07:50 -0500)
# By Richard Henderson
# Via Richard Henderson
* rth/tcg-for-anthony:
  tcg: Remove redundant tcg_target_init checks
  tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITS

Message-id: 1370437167-11278-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
include/exec/cpu-defs.h
tcg/arm/tcg-target.c
tcg/i386/tcg-target.c
tcg/s390/tcg-target.c

index d8c64e9278146aa6021fbd4f6b2e46adcb253d46..2e5a9bab3c821c0b70e013413ad81d7584330214 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. */   \
index 3d434124a052b70be2db8de0bed95f4f90eb6f1a..6be736b75e084c9a2fe16359470c3c6edbcf6d66 100644 (file)
@@ -2053,12 +2053,6 @@ static const TCGTargetOpDef arm_op_defs[] = {
 
 static void tcg_target_init(TCGContext *s)
 {
-#if !defined(CONFIG_USER_ONLY)
-    /* fail safe */
-    if ((1 << CPU_TLB_ENTRY_BITS) != sizeof(CPUTLBEntry))
-        tcg_abort();
-#endif
-
     tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffff);
     tcg_regset_set32(tcg_target_call_clobber_regs, 0,
                      (1 << TCG_REG_R0) |
index 9eec06c8a43333b9e9a88b2b81e681e8bd3de059..9e95477ef4c1b4e3df8612b96b5005605c630c09 100644 (file)
@@ -2283,12 +2283,6 @@ static void tcg_target_init(TCGContext *s)
     }
 #endif
 
-#if !defined(CONFIG_USER_ONLY)
-    /* fail safe */
-    if ((1 << CPU_TLB_ENTRY_BITS) != sizeof(CPUTLBEntry))
-        tcg_abort();
-#endif
-
     if (TCG_TARGET_REG_BITS == 64) {
         tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffff);
         tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffff);
index 7d6f777081b0df7f268c5ba3164f816502d5df52..f229f1c3463a75fc6d55df55de5280b8966e9ffa 100644 (file)
@@ -2324,13 +2324,6 @@ static void query_facilities(void)
 
 static void tcg_target_init(TCGContext *s)
 {
-#if !defined(CONFIG_USER_ONLY)
-    /* fail safe */
-    if ((1 << CPU_TLB_ENTRY_BITS) != sizeof(CPUTLBEntry)) {
-        tcg_abort();
-    }
-#endif
-
     query_facilities();
 
     tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xffff);