From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24813 invoked by alias); 15 Sep 2008 02:50:08 -0000 Received: (qmail 24804 invoked by uid 22791); 15 Sep 2008 02:50:07 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out3.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 Sep 2008 02:49:25 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out3.google.com with ESMTP id m8F2nJD0024631 for ; Mon, 15 Sep 2008 03:49:20 +0100 Received: from rv-out-0506.google.com (rvbk40.prod.google.com [10.140.87.40]) by wpaz5.hot.corp.google.com with ESMTP id m8F2nIuR005629 for ; Sun, 14 Sep 2008 19:49:18 -0700 Received: by rv-out-0506.google.com with SMTP id k40so1870886rvb.13 for ; Sun, 14 Sep 2008 19:49:18 -0700 (PDT) Received: by 10.140.249.20 with SMTP id w20mr4452039rvh.103.1221446958249; Sun, 14 Sep 2008 19:49:18 -0700 (PDT) Received: by 10.141.99.20 with HTTP; Sun, 14 Sep 2008 19:49:18 -0700 (PDT) Message-ID: Date: Mon, 15 Sep 2008 02:50:00 -0000 From: "Doug Evans" To: "GDB Patches" Subject: Re: [RFA] small size reduction to struct die_info In-Reply-To: <20080914022132.GA24834@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080914022132.GA24834@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00330.txt.bz2 On Sat, Sep 13, 2008 at 7:21 PM, Daniel Jacobowitz wrote: > On Sat, Sep 13, 2008 at 06:25:36PM -0700, Doug Evans wrote: >> This reduces the size of struct die_info for 32 bit hosts. >> >> Ok to check in? >> >> 2008-09-13 Doug Evans >> >> * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits. > > OK, though I wonder if GCC generates better code for short than int : > 16? There's no difference in generated code. I went with short just in case some other compiler had issues. This patch does the same thing for structs attr_abbrev, attribute. Ok to check in? 2008-09-14 Doug Evans * dwarf2read.c (struct abbrev_info): Make members name, form 16 bits. (struct attribute): Ditto. Index: dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.282 diff -u -p -r1.282 dwarf2read.c --- dwarf2read.c 15 Sep 2008 01:22:02 -0000 1.282 +++ dwarf2read.c 15 Sep 2008 02:19:52 -0000 @@ -513,15 +513,15 @@ struct abbrev_info struct attr_abbrev { - enum dwarf_attribute name; - enum dwarf_form form; + ENUM_BITFIELD(dwarf_attribute) name : 16; + ENUM_BITFIELD(dwarf_form) form : 16; }; /* Attributes have a name and a value */ struct attribute { - enum dwarf_attribute name; - enum dwarf_form form; + ENUM_BITFIELD(dwarf_attribute) name : 16; + ENUM_BITFIELD(dwarf_form) form : 16; union { char *str;