This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]