From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 325 invoked by alias); 4 May 2005 12:22:26 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31767 invoked from network); 4 May 2005 12:21:45 -0000 Received: from unknown (HELO khan.acc.umu.se) (130.239.18.139) by sourceware.org with SMTP; 4 May 2005 12:21:45 -0000 Received: from localhost (localhost [127.0.0.1]) by amavisd-new (Postfix) with ESMTP id C7FAAD21D; Wed, 4 May 2005 14:21:44 +0200 (MEST) Received: from shaka.acc.umu.se (shaka.acc.umu.se [130.239.18.148]) by khan.acc.umu.se (Postfix) with ESMTP id 5EFA5D203; Wed, 4 May 2005 14:21:42 +0200 (MEST) Received: by shaka.acc.umu.se (Postfix, from userid 23846) id 3BF5617213; Wed, 4 May 2005 14:21:42 +0200 (MEST) Received: from localhost (localhost [127.0.0.1]) by shaka.acc.umu.se (Postfix) with ESMTP id 26060D3D1; Wed, 4 May 2005 14:21:42 +0200 (MEST) Date: Wed, 04 May 2005 12:25:00 -0000 From: Mattias Karlsson To: Nathan Sidwell Cc: Sam Lauber , gcc@gcc.gnu.org Subject: Re: Packing booleans? In-Reply-To: <4278A497.5040301@codesourcery.com> Message-ID: References: <20050504062627.3691C416118@ws5-2.us4.outblaze.com> <4278A497.5040301@codesourcery.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-SW-Source: 2005-05/txt/msg00153.txt.bz2 On Wed, 4 May 2005, Nathan Sidwell wrote: > Sam Lauber wrote: >> Would it be possible to have a -fpack-bools option that packs booleans into >> the smallest form possible (8 booleans -> 1 8-bit reg, etc.) into a >> register >> (or memory, as the case may be)? > > why would you want to do this? Seems to me you might save up to 7 bytes > of data memory at a vastly greater expansion of code size and reduction > in performance. Unless you are using an architecture with btst, bset, bclr instructions.