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]

Re: patch to generate align 0 for packed attributes


  In message <Pine.SOL.3.91.1000726120707.23599I-100000@emperor.cygnus.com>you 
write:
  > Hi,
  > 
  > If a member of a struct has packed attribute and initialized, the compiler 
  > does not correct alignment for such variables. 
  > 
  > Here is the testcase which fails for mips architecture,
My first question, I'm guessing that the belief is that the MIPS assembler
is automatically aligning data to their natural boundary?

If so, how does an .align 0 stop that?  That seems like awful strange behavior
from an assembler.

Second, do all MIPS assemblers do this?  If not, then we need to test for
it using autoconf.

Third, you didn't include any documentation on the new target macros.

Fourth, I would be very leery of this code since it appears to be laying
out bitfields within structures.  If you do it wrong, you'll break ABI
compatibility.
jeff


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