From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wjzwg-0004lW-1D for qemu-devel@nongnu.org; Mon, 12 May 2014 19:47:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjzwW-0002OM-Vz for qemu-devel@nongnu.org; Mon, 12 May 2014 19:47:45 -0400 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]:37737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjzwW-0002OH-Pm for qemu-devel@nongnu.org; Mon, 12 May 2014 19:47:36 -0400 Received: by mail-qc0-f170.google.com with SMTP id i8so8922344qcq.1 for ; Mon, 12 May 2014 16:47:36 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 12 May 2014 16:46:54 -0700 Message-Id: <1399938424-6703-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 00/10] tcg cleanup and optimization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net Two unrelated changes here, but the first consists of only one patch and I'm too lazy to do two patch sets. The first change improves code for 64-bit guests on 32-bit hosts. If we can prove that one half of a 64-bit comparison is constant, we can simplify to only comparing the other half. This is most common with zero-extended values such that 0:x == 0:y can be simplified to x == y. The second change is a series of patches tidies the way helper.h is arranged. This cleanup reduces the number of files that must be recompiled when the old def-helper.h needed to be changed. In the process, it moves some data from arguments to tcg_callN into const static data within tcg.c. This change is a pre-requisite to being able to use libffi in the interpreter, but I think the cleanups are nice enough to justify separate inclusion. r~ Richard Henderson (10): tcg: Optimize brcond2 and setcond2 ne/eq tcg: Invert the inclusion of helper.h tcg: Push tcg-runtime routines into exec/helper-* tcg: Use helper-gen.h in tcg-op.h tcg: Inline tcg_gen_helperN tcg: Move side effects out of dh_sizemask tcg: Register the helper info struct rather than the name tcg: Save flags and computed sizemask in TCGHelperInfo tcg: Remove sizemask and flags arguments to tcg_gen_callN tcg: Move size effects out of dh_arg include/exec/def-helper.h | 274 ------------------------------------- include/exec/helper-gen.h | 70 ++++++++++ include/exec/helper-head.h | 134 ++++++++++++++++++ include/exec/helper-proto.h | 39 ++++++ include/exec/helper-tcg.h | 48 +++++++ target-alpha/fpu_helper.c | 2 +- target-alpha/helper.c | 2 +- target-alpha/helper.h | 4 - target-alpha/int_helper.c | 2 +- target-alpha/mem_helper.c | 2 +- target-alpha/sys_helper.c | 2 +- target-alpha/translate.c | 5 +- target-arm/crypto_helper.c | 2 +- target-arm/helper-a64.c | 2 +- target-arm/helper.c | 2 +- target-arm/helper.h | 4 - target-arm/iwmmxt_helper.c | 2 +- target-arm/neon_helper.c | 2 +- target-arm/op_helper.c | 2 +- target-arm/translate-a64.c | 5 +- target-arm/translate.c | 5 +- target-cris/helper.h | 4 - target-cris/op_helper.c | 2 +- target-cris/translate.c | 5 +- target-i386/cc_helper.c | 2 +- target-i386/excp_helper.c | 2 +- target-i386/fpu_helper.c | 2 +- target-i386/helper.h | 4 - target-i386/int_helper.c | 2 +- target-i386/mem_helper.c | 2 +- target-i386/misc_helper.c | 2 +- target-i386/seg_helper.c | 2 +- target-i386/smm_helper.c | 2 +- target-i386/svm_helper.c | 2 +- target-i386/translate.c | 5 +- target-lm32/helper.h | 4 - target-lm32/op_helper.c | 2 +- target-lm32/translate.c | 5 +- target-m68k/helper.c | 2 +- target-m68k/helper.h | 4 - target-m68k/op_helper.c | 2 +- target-m68k/translate.c | 5 +- target-microblaze/helper.h | 4 - target-microblaze/op_helper.c | 2 +- target-microblaze/translate.c | 6 +- target-mips/dsp_helper.c | 2 +- target-mips/helper.h | 6 - target-mips/lmi_helper.c | 2 +- target-mips/op_helper.c | 2 +- target-mips/translate.c | 5 +- target-moxie/helper.c | 2 +- target-moxie/helper.h | 4 - target-moxie/translate.c | 5 +- target-openrisc/exception_helper.c | 2 +- target-openrisc/fpu_helper.c | 2 +- target-openrisc/helper.h | 4 - target-openrisc/int_helper.c | 2 +- target-openrisc/interrupt_helper.c | 2 +- target-openrisc/sys_helper.c | 2 +- target-openrisc/translate.c | 5 +- target-ppc/excp_helper.c | 2 +- target-ppc/fpu_helper.c | 2 +- target-ppc/helper.h | 4 - target-ppc/int_helper.c | 2 +- target-ppc/mem_helper.c | 2 +- target-ppc/misc_helper.c | 2 +- target-ppc/mmu-hash32.c | 2 +- target-ppc/mmu-hash64.c | 2 +- target-ppc/mmu_helper.c | 2 +- target-ppc/timebase_helper.c | 2 +- target-ppc/translate.c | 5 +- target-s390x/cc_helper.c | 2 +- target-s390x/fpu_helper.c | 2 +- target-s390x/helper.h | 4 - target-s390x/int_helper.c | 2 +- target-s390x/mem_helper.c | 2 +- target-s390x/misc_helper.c | 2 +- target-s390x/translate.c | 5 +- target-sh4/helper.h | 4 - target-sh4/op_helper.c | 2 +- target-sh4/translate.c | 5 +- target-sparc/cc_helper.c | 2 +- target-sparc/fop_helper.c | 2 +- target-sparc/helper.c | 2 +- target-sparc/helper.h | 4 - target-sparc/int64_helper.c | 2 +- target-sparc/ldst_helper.c | 2 +- target-sparc/translate.c | 5 +- target-sparc/vis_helper.c | 2 +- target-sparc/win_helper.c | 2 +- target-unicore32/helper.c | 2 +- target-unicore32/helper.h | 3 - target-unicore32/op_helper.c | 2 +- target-unicore32/translate.c | 5 +- target-unicore32/ucf64_helper.c | 2 +- target-xtensa/helper.h | 4 - target-xtensa/op_helper.c | 2 +- target-xtensa/translate.c | 5 +- target-xtensa/xtensa-semi.c | 2 +- tcg-runtime.c | 40 ++++-- tcg/optimize.c | 94 +++++++++++++ tcg/tcg-op.h | 169 +++-------------------- tcg/tcg-runtime.h | 30 ++-- tcg/tcg.c | 50 +++---- tcg/tcg.h | 6 +- 105 files changed, 559 insertions(+), 668 deletions(-) delete mode 100644 include/exec/def-helper.h create mode 100644 include/exec/helper-gen.h create mode 100644 include/exec/helper-head.h create mode 100644 include/exec/helper-proto.h create mode 100644 include/exec/helper-tcg.h -- 1.9.0