This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: PATCH: Do not clear the DECL_BIT_FIELD flag (prelude to ObjC fix)
- From: Ziemowit Laski <zlaski at apple dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Aug 2002 15:59:49 -0700
- Subject: Re: PING: PATCH: Do not clear the DECL_BIT_FIELD flag (prelude to ObjC fix)
On Wednesday, Aug 14, 2002, at 13:06 US/Pacific, Richard Henderson
wrote:
On Wed, Aug 14, 2002 at 12:17:58PM -0700, Ziemowit Laski wrote:
Which leads to the painfully obvious question -- what and where are
the
other places?
The two places in which bit fields are read and written:
insert_bit_field and extract_bit_field.
I suggest you write some test cases and examine the code
generated with and without your clearing patch on at least
x86 and ppc.
I did, and indeed the code _is_ different with my patch in
place, and exactly how I was warned it would be. :-( (So yes,
thanks for holding me back on this one.) The
difference disappears at -O2, presumably because the
optimizer throws away the unecessary ANDs and ORs.
So now, it seems there are two possible approaches for me to
consider:
(1) Look at the logic in insert_bit_field and extract_bit_field
to see if I can make up for what I took away from layout_decl;
(2) Come up with a grody ObjC hack to work around the
whole DECL_BIT_FIELD issue.
Currently, I am of the opinion that (1) would be the cleaner of
the two approaches, so I'll try this first.
Thank you for your patience,
--Zem
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477