Received: from eggs.gnu.org ([2001:4830:134:3::10]:51500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTh7T-0006dU-2m for qemu-devel@nongnu.org; Fri, 28 Mar 2014 20:27:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTh7J-0006ge-PA for qemu-devel@nongnu.org; Fri, 28 Mar 2014 20:27:30 -0400 Received: from mail-qa0-x234.google.com ([2607:f8b0:400d:c00::234]:60187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTh7J-0006gX-Je for qemu-devel@nongnu.org; Fri, 28 Mar 2014 20:27:21 -0400 Received: by mail-qa0-f52.google.com with SMTP id m5so5868706qaj.25 for ; Fri, 28 Mar 2014 17:27:21 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 28 Mar 2014 17:27:06 -0700 Message-Id: <1396052834-26834-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, aurelien@aurel32.net Here's where I think we should go with the cleanup that Peter started. I've only converted a couple of the backends as examples. It's not 100% mechanical, since one has to be aware of the change in the semantics of pointer arithmetic (e.g. s->code_ptr - s->code_buf). Taking Sparc as an example, the before code size of tcg.o is 0xad60, and the after code size is 0xa200. A savings of a bit less than 3k. Thoughts? r~ Peter Maydell (3): exec-all.h: Use stl_p to avoid undefined behaviour patching x86 jumps tcg: Avoid stores to unaligned addresses tcg: Avoid undefined behaviour patching code at unaligned addresses Richard Henderson (5): tcg: Define tcg_itype for code pointers tcg-ppc64: Define TCG_TARGET_ITYPE_SIZE tcg-ppc: Define TCG_TARGET_ITYPE_SIZE tcg-aarch64: Define TCG_TARGET_ITYPE_SIZE tcg-sparc: Define TCG_TARGET_ITYPE_SIZE include/exec/exec-all.h | 4 +-- tcg/aarch64/tcg-target.c | 38 +++++++++------------ tcg/aarch64/tcg-target.h | 1 + tcg/i386/tcg-target.c | 12 +++---- tcg/i386/tcg-target.h | 1 + tcg/ppc/tcg-target.c | 55 +++++++++++++++--------------- tcg/ppc/tcg-target.h | 1 + tcg/ppc64/tcg-target.c | 46 +++++++++++++------------ tcg/ppc64/tcg-target.h | 1 + tcg/sparc/tcg-target.c | 57 +++++++++++++++---------------- tcg/sparc/tcg-target.h | 2 +- tcg/tcg-be-ldst.h | 4 +-- tcg/tcg.c | 87 ++++++++++++++++++++++++++++++++++++++---------- tcg/tcg.h | 37 +++++++++++++++----- translate-all.c | 6 ++-- 15 files changed, 209 insertions(+), 143 deletions(-) -- 1.9.0