aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2006-07-04 03:35:48 +0000
committerAlan Modra <amodra@gcc.gnu.org>2006-07-04 13:05:48 +0930
commit84e9ad15fabafedf6815d5a6c90d65c7774c7792 (patch)
tree662adc5cc3c412bfcd452889181b4776cf134b81
parent60410f3ad211bbbf59b5a1b08f92e30b941b1814 (diff)
downloadgcc-84e9ad15fabafedf6815d5a6c90d65c7774c7792.zip
gcc-84e9ad15fabafedf6815d5a6c90d65c7774c7792.tar.gz
gcc-84e9ad15fabafedf6815d5a6c90d65c7774c7792.tar.bz2
re PR target/28207 (128-bit IBM long double misaligned on stack)
PR target/28207 * config/rs6000/rs6000.c (function_arg_boundary): Double-word align 128-bit IBM long doubles for ABI_V4. From-SVN: r115170
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d88546..dbc201e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-07-04 Alan Modra <amodra@bigpond.net.au>
+
+ PR target/28207
+ * config/rs6000/rs6000.c (function_arg_boundary): Double-word align
+ 128-bit IBM long doubles for ABI_V4.
+
2006-07-03 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (range_in_array_bounds_p): New predicate.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 6d78f84..a212611 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4485,7 +4485,12 @@ function_arg_padding (enum machine_mode mode, tree type)
of an argument with the specified mode and type. If it is not defined,
PARM_BOUNDARY is used for all arguments.
- V.4 wants long longs to be double word aligned.
+ V.4 wants long longs and doubles to be double word aligned. Just
+ testing the mode size is a boneheaded way to do this as it means
+ that other types such as complex int are also double word aligned.
+ However, we're stuck with this because changing the ABI might break
+ existing library interfaces.
+
Doubleword align SPE vectors.
Quadword align Altivec vectors.
Quadword align large synthetic vector types. */
@@ -4493,7 +4498,11 @@ function_arg_padding (enum machine_mode mode, tree type)
int
function_arg_boundary (enum machine_mode mode, tree type)
{
- if (DEFAULT_ABI == ABI_V4 && GET_MODE_SIZE (mode) == 8)
+ if (DEFAULT_ABI == ABI_V4
+ && (GET_MODE_SIZE (mode) == 8
+ || (TARGET_HARD_FLOAT
+ && TARGET_FPRS
+ && mode == TFmode)))
return 64;
else if (SPE_VECTOR_MODE (mode)
|| (type && TREE_CODE (type) == VECTOR_TYPE