diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-15 09:40:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-15 09:40:32 +0000 |
commit | 6a7786f08730a608aa12e8e26b6acf4434dd300e (patch) | |
tree | 87309bc0531e5d347d6e56846f817706fabd97f9 /gcc/ada/g-altive.ads | |
parent | 5b2f83bdfcb53a78bd7e58197ff68f2346703832 (diff) | |
download | gcc-6a7786f08730a608aa12e8e26b6acf4434dd300e.tar.gz |
2006-02-13 Olivier Hainque <hainque@adacore.com>
* g-altive.ads (VECTOR_ALIGNMENT): Set to Min (16, Max_Alignment),
to avoid useless and space inefficient overalignments on targets where
Max_Alignment is larger than 16.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111071 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-altive.ads')
-rw-r--r-- | gcc/ada/g-altive.ads | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ada/g-altive.ads b/gcc/ada/g-altive.ads index 4cb82edc3df..c9ee0577c18 100644 --- a/gcc/ada/g-altive.ads +++ b/gcc/ada/g-altive.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -236,7 +236,23 @@ package GNAT.Altivec is -- points to a 16-byte boundary. The compiler is responsible for aligning -- vector data types on 16-byte boundaries." - VECTOR_ALIGNMENT : constant := 16; + VECTOR_ALIGNMENT : constant := Natural'Min (16, Standard'Maximum_Alignment); + -- This value is used to set the alignment of vector datatypes in both the + -- hard and the soft binding implementations. + -- + -- We want this value to never be greater than 16, because none of the + -- binding implementations requires larger alignments and such a value + -- would cause useless space to be allocated/wasted for vector objects. + -- Furthermore, the alignment of 16 matches the hard binding leading to + -- a more faithful emulation. + -- + -- It needs to be exactly 16 for the hard binding, and the initializing + -- expression is just right for this purpose since Maximum_Alignment is + -- expected to be 16 for the real Altivec ABI. + -- + -- The soft binding doesn't rely on strict 16byte alignment, and we want + -- the value to be no greater than Standard'Maximum_Alignment in this case + -- to ensure it is supported on every possible target. ------------------------------------------------------- -- [PIM-2.1] Data Types - Interpretation of contents -- |