This is the mail archive of the
mailing list for the GCC project.
Re: not too big an alignment
- From: Mike Stump <mikestump at comcast dot net>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 Nov 2013 13:42:00 -0800
- Subject: Re: not too big an alignment
- Authentication-results: sourceware.org; auth=none
- References: <29224C40-B124-4C42-BB57-F0E7604A9BF7 at comcast dot net> <20131112211608 dot GD27813 at tucnak dot zalov dot cz>
On Nov 12, 2013, at 1:16 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> On Tue, Nov 12, 2013 at 01:11:04PM -0800, Mike Stump wrote:
>> Alignments are stored in a byte, large alignments don't actually work nicely. This caps the alignment to 128, as most ports would define BIGGEST_ALIGNMENT to be smaller than this. The competing change would to be to make it a short, but, I'd be happy to punt that until such time as someone actually needs that.
>> Ports break down this way currently:
>> 12 #define BIGGEST_ALIGNMENT 64
>> 10 #define BIGGEST_ALIGNMENT 32
>> 6 #define BIGGEST_ALIGNMENT 128
>> 3 #define BIGGEST_ALIGNMENT 8
>> 8 #define BIGGEST_ALIGNMENT 16
> You are missing i386 that has BIGGEST_ALIGNMENT 512 (or less, depending on
> compiler options). So this doesn't look right.
And yet alignments for modes with sizes like 256 won't work and i386 has no mode with alignment bigger than 128 in this table.
So, do you prefer that we use short instead? I can do that patch, if you prefer. Just, there is no port that currently requires it in tree.