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: RFA: fix gcc/20371


Richard Henderson wrote:

It looks generally ok. I wish someone who knew about and/or cared

about ms bitfield issues would double-check it. But if you can't
find such an individual, it's fine by me.


Thanks for the review. I don't know anyone who specializes in this,
so I checked the patch in now.
Most of the issues really arose from unforseen interactions between MS bitfields
and the packed / aligned attributes, so that is mainly a matter of defining what this
should do. The way I made packed bitfields interact with MS bitfields is basically
that packed bitfields are packed as if the MS bitfield insanity was not present, but
MS bitfields still adhere to their peculiar rules, treating a packed bitfield either as
part of a run if it fits in underlying type size and alignment, or as a non-bitfield if
it doesn't.
It would be posible to get higher packing if a packed bitfield was re-interpreted as
having a different underlying type size to agree with an following MS bitfield, and
where a packed bit field is not suitably aligned, pretend that only the latter part of it
forms the start of a run if it straddles a boundary. It would also possible to include
packed non-bitfields in a run... but this would all greatly complicate the code.


If we want to allow users to mix packed and non-packed structure members in an
efficient way, it would be better to provide an attribute to switch off MS bitfield
rules for a given structure. (IIRC there is already a port where this is controlled
with a machine dependent attribute).



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