Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ndnlf-00071Z-SG for qemu-devel@nongnu.org; Sat, 06 Feb 2010 11:44:23 -0500 Received: from [199.232.76.173] (port=59321 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ndnle-00071K-Ix for qemu-devel@nongnu.org; Sat, 06 Feb 2010 11:44:22 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdnlZ-00056Y-Va for qemu-devel@nongnu.org; Sat, 06 Feb 2010 11:44:22 -0500 Received: from mx20.gnu.org ([199.232.41.8]:39493) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdnlX-00051V-5J for qemu-devel@nongnu.org; Sat, 06 Feb 2010 11:44:17 -0500 Received: from hall.aurel32.net ([88.191.82.174]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NdnlD-0005k7-14 for qemu-devel@nongnu.org; Sat, 06 Feb 2010 11:43:55 -0500 From: Aurelien Jarno Date: Sat, 6 Feb 2010 17:43:41 +0100 Message-Id: <1265474623-23367-7-git-send-email-aurelien@aurel32.net> In-Reply-To: <1265474623-23367-1-git-send-email-aurelien@aurel32.net> References: <1265474623-23367-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH 6/8] target-sh4: MMU: reduce the size of a TLB entry List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno Reduce the size of the TLB entry from 32 to 16 bytes, reorganising members and using a bit field. Signed-off-by: Aurelien Jarno --- target-sh4/cpu.h | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h index 015d598..85f221d 100644 --- a/target-sh4/cpu.h +++ b/target-sh4/cpu.h @@ -72,21 +72,20 @@ * The use of DELAY_SLOT_TRUE flag makes us accept such SR_T modification. */ -/* XXXXX The structure could be made more compact */ typedef struct tlb_t { - uint8_t asid; /* address space identifier */ uint32_t vpn; /* virtual page number */ - uint8_t v; /* validity */ uint32_t ppn; /* physical page number */ - uint8_t sz; /* page size */ - uint32_t size; /* cached page size in bytes */ - uint8_t sh; /* share status */ - uint8_t c; /* cacheability */ - uint8_t pr; /* protection key */ - uint8_t d; /* dirty */ - uint8_t wt; /* write through */ - uint8_t sa; /* space attribute (PCMCIA) */ - uint8_t tc; /* timing control */ + uint32_t size; /* mapped page size in bytes */ + uint8_t asid; /* address space identifier */ + uint8_t v:1; /* validity */ + uint8_t sz:2; /* page size */ + uint8_t sh:1; /* share status */ + uint8_t c:1; /* cacheability */ + uint8_t pr:2; /* protection key */ + uint8_t d:1; /* dirty */ + uint8_t wt:1; /* write through */ + uint8_t sa:3; /* space attribute (PCMCIA) */ + uint8_t tc:1; /* timing control */ } tlb_t; #define UTLB_SIZE 64 -- 1.6.6.1