This is the mail archive of the 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: libgcc_s, Linux, and PT_GNU_EH_FRAME, and binutils

Jakub, this patch looks right.
No, there is something wrong with that patch.

In particular, the test case wants this structure:

+struct A
+  char a;
+  int b : 224;	// { dg-warning "exceeds its type" "" }
+  char c;
+} a, a4[4];

to have size 36.  That is incorrect.

 int b: 224;

should be treated exactly like:

 long long: 64;

followed by 160 bits (20 bytes) of padding.

In the C ABI, a 64-bit long long bit field gets aligned at an 8-byte
boundary.  So, b goes at offset 8.  We then get 28 bytes for the
bitfield.  That puts c at offset 36.  The structure is 8-byte aligned,
for a total size of 40.

Jakub, what is the bug that you are trying to fix?

The fact that something changed in 3.1 doesn't prove that it's a bug. :-)

Hum.  The patch I remember doesn't seem to have been written. :-(
As discussed on the thread, __m64 needs to be a vector type so
that the x86-64 calling conventions put it in the right set of
registers.  Which means a large repetitious patch to mmintrin.h.
Well, I'm not too concerned about x86-64 just yet.  There still isn't
any hardware out there.  I can't see holding the release for this.

Mark Mitchell      
CodeSourcery, LLC  

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