This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/22158] char global_var[] = "larger than 32 bytes"; uses silly amounts of alignment even with -Os
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2005 13:12:58 -0000
- Subject: [Bug target/22158] char global_var[] = "larger than 32 bytes"; uses silly amounts of alignment even with -Os
- References: <20050623060033.22158.vda@port.imtp.ilyichevsk.odessa.ua>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-23 13:12 -------
(In reply to comment #7)
> Oh, I did look at http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00860.html,
> I see 128 and 256 bit alignment added, but I don't immediately see where it is
> applied to byte arrays (strings) - patch is not so small, where should I look?
actually that did not add it, it was there before that patch, just moved it to the function.
The comment above DATA_ALIGNMENT in i386.h should explain why it was this is done:
One use of this macro is to increase alignment of medium-size
data to make it all fit in fewer cache lines. Another is to
cause character arrays to be word-aligned so that `strcpy' calls
that copy constants to character arrays can be done inline. */
Though this should be moved to i386.c so this question no longer is there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22158