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: [PATCH] IA-32 bitfields (was Re: libgcc_s, Linux, andPT_GNU_EH_FRAME, and binutils)




--On Wednesday, August 07, 2002 12:16:48 AM +0200 Jakub Jelinek <jakub@redhat.com> wrote:

On Tue, Aug 06, 2002 at 01:33:33PM -0700, Mark Mitchell wrote:
> So what do we do?  Personally I'm for fixing the bug.

Blech.  I don't like that we broke the C ABI, but I'm not sure I like
breaking it again in the name of fixing it, some two years later.

I guess the fact that nobody noticed until now suggests that maybe
the problem isn't very common, which makes either decision less
important.

If we *do* want to fix it, we need to look everywhere.  For example,
place_union_field gives the union the alignment of the type of the bit
field in the PCC_BITFIELD_TYPE_MATTERS case.  So, I think a union with
a long long bit field will get 8-byte aligned, which is weird.

And place_field gates the alignment by maximum_field_alignment -- but
not by desired_field_alignment.  Again, in the PCC_BITFIELD_TYPE_MATTERS
case, which is the usual case on x86.
This worked for me and IMHO shouldn't make a difference anywhere but
on IA-32 (since ADJUST_FIELD_ALIGN is defined on IA-32 and PPC only
and on PPC it only changes something if the field's type is DFmode,
but bitfields cannot have DFmode TYPE_MODE).
I think this patch is very good, in a technical sense.

Now we just need to decide whether we want to break the x86 C ABI again,
having already broken it once before a couple of years back.

Richard is in favor of doing that; you are in favor of doing that.

I'm neutral; I'm going to be most swayed by what x86 OS distributors say.

So, right now that means I'm leaning towards the patch -- Red Hat is a
distributor.

I want to decide by tomorrow.

If you're someone who cares about this, speak up soon. :-)

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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