tcg: Remove redundant tcg_target_init checks
Reviewing the tcg/aarch64 patch set, and comparing that to existing hosts made me remember that I've wanted to do this for quite some time.
Now with two reviews, please pull.
r~
The following changes since commit 8819c10b5d55d537d59a0ffd5d623f348fc36c47:
Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into staging (2013-06-04 14:58:58 -0500)
are available in the git repository at:
git://github.com/rth7680/qemu.git tcg-for-anthony
for you to fetch changes up to 56bbc2f967ce185fa1c5c39e1aeb5b68b26242e9:
tcg: Remove redundant tcg_target_init checks (2013-06-05 05:54:40 -0700)
----------------------------------------------------------------
Richard Henderson (2):
tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITS
tcg: Remove redundant tcg_target_init checks
include/exec/cpu-defs.h | 2 +- tcg/arm/tcg-target.c | 6 ------ tcg/i386/tcg-target.c | 6 ------ tcg/s390/tcg-target.c | 7 ------- 4 files changed, 1 insertion(+), 20 deletions(-)
Signature · 1 line
1.8.1.4
We've got a compile-time check for the condition in exec/cpu-defs.h.
--- tcg/arm/tcg-target.c | 6 ------ tcg/i386/tcg-target.c | 6 ------ tcg/s390/tcg-target.c | 7 ------- 3 files changed, 19 deletions(-)
tcg/arm/tcg-target.c +0 -6
@@ -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) |
tcg/i386/tcg-target.c +0 -6
@@ -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 );
tcg/s390/tcg-target.c +0 -7
@@ -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 );
Signature · 1 line
1.8.1.4
[Qemu-devel] [PULL 1/2] tcg: Use QEMU_BUILD_BUG_ON for CPU_TLB_ENTRY_BITS
In reply to Richard HendersonRather than a hand-coded version of the same thing.
--- include/exec/cpu-defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/cpu-defs.h +1 -1
@@ -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. */ \
Signature · 1 line
1.8.1.4
Ping.
Quoted 34 lines · Richard Henderson
Reviewing the tcg/aarch64 patch set, and comparing that to existing hosts made me remember that I've wanted to do this for quite some time.
Now with two reviews, please pull.
r~
The following changes since commit
8819c10b5d55d537d59a0ffd5d623f348fc36c47:Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into staging (2013-06-04 14:58:58 -0500)
are available in the git repository at:
git://github.com/rth7680/qemu.gittcg-for-anthonyfor you to fetch changes up to
56bbc2f967ce185fa1c5c39e1aeb5b68b26242e9:tcg: Remove redundant
tcg_target_initchecks (2013-06-05 05:54:40 -0700)----------------------------------------------------------------
Richard Henderson (2):
tcg: UseQEMU_BUILD_BUG_ONforCPU_TLB_ENTRY_BITS
tcg: Remove redundanttcg_target_initchecksinclude/exec/cpu-defs.h | 2 +- tcg/arm/tcg-target.c | 6 ------ tcg/i386/tcg-target.c | 6 ------ tcg/s390/tcg-target.c | 7 ------- 4 files changed, 1 insertion(+), 20 deletions(-)
Quoted 1 line · Richard Henderson
Ping.
Aurelien/Blue, can you pull this?
Regards,
Anthony Liguori
Quoted 37 lines · Richard Henderson
Quoted 34 lines
Reviewing the tcg/aarch64 patch set, and comparing that to existing hosts made me remember that I've wanted to do this for quite some time.
Now with two reviews, please pull.
r~
The following changes since commit
8819c10b5d55d537d59a0ffd5d623f348fc36c47:Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into staging (2013-06-04 14:58:58 -0500)
are available in the git repository at:
git://github.com/rth7680/qemu.gittcg-for-anthonyfor you to fetch changes up to
56bbc2f967ce185fa1c5c39e1aeb5b68b26242e9:tcg: Remove redundant
tcg_target_initchecks (2013-06-05 05:54:40 -0700)----------------------------------------------------------------
Richard Henderson (2):
tcg: UseQEMU_BUILD_BUG_ONforCPU_TLB_ENTRY_BITS
tcg: Remove redundanttcg_target_initchecksinclude/exec/cpu-defs.h | 2 +- tcg/arm/tcg-target.c | 6 ------ tcg/i386/tcg-target.c | 6 ------ tcg/s390/tcg-target.c | 7 ------- 4 files changed, 1 insertion(+), 20 deletions(-)
Pulled. Thanks.
Regards,
Anthony Liguori