This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH [FSF mainline] darwin patch to fix size problem with genericvectors
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Fariborz Jahanian <fjahanian at apple dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 01 Sep 2004 19:59:50 +0200
- Subject: Re: PATCH [FSF mainline] darwin patch to fix size problem with genericvectors
> && TARGET_ALIGN_NATURAL == 0 \
> ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
> ! : (TARGET_ALTIVEC && TREE_CODE (STRUCT) == VECTOR_TYPE \
> ! && ALTIVEC_VECTOR_MODE (TYPE_MODE (STRUCT))) \
No! This is wrong, because it would not enforce the alignment when
-maltivec is not used, because in that case the mode would not be a
vector mode.
This would introduce another occurrence of the same bug that is fixed by
my patch at http://gcc.gnu.org/ml/gcc-patches/2004-07/msg02197.html
where the i386 part has gone in and the AltiVec part has not. Quoting
from the thread in July:
rth> Paolo> The only way I see to fix this, is to use V4SImode again for
rth> Paolo> such vectors.
rth>
rth> Huh? You can also look at TREE_CODE (type) == VECTOR_TYPE etc.
So you need "int_size_for_bytes (STRUCT) == 16".
Paolo