This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR
- From: Michael Matz <matz at suse dot de>
- To: "William J. Schmidt" <wschmidt at linux dot vnet dot ibm dot com>
- Cc: Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Jun 2011 15:36:26 +0200 (CEST)
- Subject: Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR
- References: <alpine.LNX.2.00.1106161328310.810@zhemvz.fhfr.qr> <1308526874.8025.5.camel@gnopaine>
Hi,
On Sun, 19 Jun 2011, William J. Schmidt wrote:
> At the risk of being obvious...it seems you could easily combine C1 and
> C2 into a single "bitfield descriptor" TREE_INT_CST operand by using
> both the high and low portions of the constant. Accessor macros could
> be used to hide the slight hackishness of the solution. I didn't see
> anything in either patch where this would look particularly ugly.
Agreed. I don't even see it as hackish, it's quite normal that the
implementation of data structures actually uses a different layout than a
completely orthogonal one. As long as the accessors are looking
orthogonal.
Ciao,
Michael.