diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-14 07:50:36 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-14 07:50:36 -0500 |
commit | 6e8d2b654656830877937ba02bb8ea1c4945a1fc (patch) | |
tree | 1e5cbe1ecf5352eb607321b580ff997ef6035721 | |
parent | bd5c51ee6c4f1c79cae5ad2516d711a27b4ea8ec (diff) | |
parent | 56bbc2f967ce185fa1c5c39e1aeb5b68b26242e9 (diff) | |
download | qemu-6e8d2b654656830877937ba02bb8ea1c4945a1fc.zip qemu-6e8d2b654656830877937ba02bb8ea1c4945a1fc.tar.gz qemu-6e8d2b654656830877937ba02bb8ea1c4945a1fc.tar.bz2 |
Merge remote-tracking branch 'rth/tcg-for-anthony' into staging
# 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>
-rw-r--r-- | include/exec/cpu-defs.h | 2 | ||||
-rw-r--r-- | tcg/arm/tcg-target.c | 6 | ||||
-rw-r--r-- | tcg/i386/tcg-target.c | 6 | ||||
-rw-r--r-- | tcg/s390/tcg-target.c | 7 |
4 files changed, 1 insertions, 20 deletions
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index d8c64e9..2e5a9ba 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -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. */ \ diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 3d43412..6be736b 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -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) | diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 9eec06c..9e95477 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -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); diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 7d6f777..f229f1c 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s390/tcg-target.c @@ -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); |