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: [C++0x] contiguous bitfields race implementation


On 05/27/11 14:18, Jason Merrill wrote:
On 05/26/2011 02:37 PM, Aldy Hernandez wrote:
The narrowest integer mode containing the bit field is still 32, so we
access the bitfield with an SI instruction as expected.

OK, then:


struct A
{
int i: 4;
int j: 4;
int k: 8;
int l: 8;
int m: 8;
};

now the narrowest mode containing 'j' is QI/8, but it would still be
safe to use SI.

Hi Jason.


Sorry to have dropped the ball on this. Your last review coincided with me going on vacation.

Here is another stab at it. I am now taking into account alignment, which I believe addresses your issue. I have also added the new testcase above, which the patch also fixes.

Tested on x86-64 Linux.

How is this?

Aldy

Attachment: curr
Description: Text document


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