From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWAgt-0005H9-OW for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWAgp-0005hA-0J for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:35 -0400 Received: from mail-qc0-x22e.google.com ([2607:f8b0:400d:c01::22e]:61611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWAgo-0005fj-Se for qemu-devel@nongnu.org; Mon, 22 Sep 2014 16:58:30 -0400 Received: by mail-qc0-f174.google.com with SMTP id x3so814146qcv.33 for ; Mon, 22 Sep 2014 13:58:25 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 22 Sep 2014 13:57:37 -0700 Message-Id: <1411419461-24390-8-git-send-email-rth@twiddle.net> In-Reply-To: <1411419461-24390-1-git-send-email-rth@twiddle.net> References: <1411419461-24390-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 07/11] tcg: Compress TCGLabelQemuLdst List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Use 1 32-bit word instead of 6. Reviewed-by: Claudio Fontana Signed-off-by: Richard Henderson --- tcg/tcg-be-ldst.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tcg/tcg-be-ldst.h b/tcg/tcg-be-ldst.h index 49b3de6..904eeda 100644 --- a/tcg/tcg-be-ldst.h +++ b/tcg/tcg-be-ldst.h @@ -23,14 +23,19 @@ #ifdef CONFIG_SOFTMMU #define TCG_MAX_QEMU_LDST 640 +QEMU_BUILD_BUG_ON(TCG_TARGET_NB_REGS > 32); +QEMU_BUILD_BUG_ON(NB_MMU_MODES > 8); + typedef struct TCGLabelQemuLdst { - bool is_ld:1; /* qemu_ld: true, qemu_st: false */ - TCGMemOp opc:4; - TCGReg addrlo_reg; /* reg index for low word of guest virtual addr */ - TCGReg addrhi_reg; /* reg index for high word of guest virtual addr */ - TCGReg datalo_reg; /* reg index for low word to be loaded or stored */ - TCGReg datahi_reg; /* reg index for high word to be loaded or stored */ - int mem_index; /* soft MMU memory index */ + TCGMemOp opc : 4; + bool is_ld : 1; /* qemu_ld: true, qemu_st: false */ + TCGReg addrlo_reg : 5; /* reg index for low word of guest virtual addr */ + TCGReg addrhi_reg : 5; /* reg index for high word of guest virtual addr */ + TCGReg datalo_reg : 5; /* reg index for low word to be loaded or stored */ + TCGReg datahi_reg : 5; /* reg index for high word to be loaded or stored */ + unsigned mem_index : 3; /* soft MMU memory index */ + /* 4 bits unused in 32-bit word */ + tcg_insn_unit *raddr; /* gen code addr of the next IR of qemu_ld/st IR */ tcg_insn_unit *label_ptr[2]; /* label pointers to be updated */ } TCGLabelQemuLdst; -- 1.9.3