From e4ca3dc393298aebbf839437bde76a7e8c5afaef Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 19 Oct 2004 12:15:31 -0700 Subject: [PATCH] re PR target/17962 (small fp vector uses sse/mmx vectors and is not aligned) PR 17962 * stor-layout.c (layout_type): Set TYPE_ALIGN for vectors. From-SVN: r89284 --- gcc/ChangeLog | 5 +++++ gcc/stor-layout.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e9587a73a23..c7616e12600 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-10-19 Richard Hendeson + + PR 17962 + * stor-layout.c (layout_type): Set TYPE_ALIGN for vectors. + 2004-10-19 Richard Hendeson * builtins.c (expand_builtin_memmove): If fold_builtin_memmove diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index c86dd549700..10496b875ee 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1576,6 +1576,10 @@ layout_type (tree type) nunits_tree, 0); TYPE_SIZE (type) = int_const_binop (MULT_EXPR, TYPE_SIZE (innertype), nunits_tree, 0); + + /* Always natually align vectors. This prevents ABI changes + depending on whether or not native vector modes are supported. */ + TYPE_ALIGN (type) = tree_low_cst (TYPE_SIZE (type), 0); break; } -- 2.30.2