aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-22 20:25:31 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-22 20:25:31 +0000
commitd9f345e59345268bd0c6c92259396c4166c3591f (patch)
tree2df35654f89ce0d7e3e37a52bd7979931b4d360d /gcc
parent54a9357d2c16e45b3c6738310aee18edabae0710 (diff)
2004-11-22 David Edelsohn <edelsohn@gnu.org>
Fariborz Jahanian <fjahanian@apple.com> * config/rs6000/rs6000.c (rs6000_return_in_memory): Test TARGET_ALTIVEC_ABI. (function_arg_boundary): Align 8 to 16 byte vectors like SPE. Align 16 byte and larger vectors like Altivec. (function_arg_advance): Pass any 16 byte vector like Altivec vector. (function_arg): Same. (rs6000_pass_by_references): Test TARGET_ALTIVEC_ABI. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91025 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/rs6000/rs6000.c26
2 files changed, 30 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d46e06afd3d..f46c34b01b1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2004-11-22 David Edelsohn <edelsohn@gnu.org>
+ Fariborz Jahanian <fjahanian@apple.com>
+
+ * config/rs6000/rs6000.c (rs6000_return_in_memory): Test
+ TARGET_ALTIVEC_ABI.
+ (function_arg_boundary): Align 8 to 16 byte vectors like SPE.
+ Align 16 byte and larger vectors like Altivec.
+ (function_arg_advance): Pass any 16 byte vector like Altivec vector.
+ (function_arg): Same.
+ (rs6000_pass_by_references): Test TARGET_ALTIVEC_ABI.
+
2004-11-22 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/18572
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 7e30f925dee..63623f15b87 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4643,12 +4643,12 @@ rs6000_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
/* Return synthetic vectors in memory. */
if (TREE_CODE (type) == VECTOR_TYPE
- && int_size_in_bytes (type) > (TARGET_ALTIVEC ? 16 : 8))
+ && int_size_in_bytes (type) > (TARGET_ALTIVEC_ABI ? 16 : 8))
{
static bool warned_for_return_big_vectors = false;
if (!warned_for_return_big_vectors)
{
- warning ("synthetic vectors returned by reference: "
+ warning ("synthetic vector returned by reference: "
"non-standard ABI extension with no compatibility guarantee");
warned_for_return_big_vectors = true;
}
@@ -4657,6 +4657,7 @@ rs6000_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
if (DEFAULT_ABI == ABI_V4 && TYPE_MODE (type) == TFmode)
return true;
+
return false;
}
@@ -4808,9 +4809,14 @@ function_arg_boundary (enum machine_mode mode, tree type)
{
if (DEFAULT_ABI == ABI_V4 && GET_MODE_SIZE (mode) == 8)
return 64;
- else if (SPE_VECTOR_MODE (mode))
+ else if (SPE_VECTOR_MODE (mode)
+ || (type && TREE_CODE (type) == VECTOR_TYPE
+ && int_size_in_bytes (type) >= 8
+ && int_size_in_bytes (type) < 16))
return 64;
- else if (ALTIVEC_VECTOR_MODE (mode))
+ else if (ALTIVEC_VECTOR_MODE (mode)
+ || (type && TREE_CODE (type) == VECTOR_TYPE
+ && int_size_in_bytes (type) >= 16))
return 128;
else if (type && TREE_CODE (type) == VECTOR_TYPE
&& int_size_in_bytes (type) > 16)
@@ -4895,7 +4901,10 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
if (depth == 0)
cum->nargs_prototype--;
- if (TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
+ if (TARGET_ALTIVEC_ABI
+ && (ALTIVEC_VECTOR_MODE (mode)
+ || (type && TREE_CODE (type) == VECTOR_TYPE
+ && int_size_in_bytes (type) == 16)))
{
bool stack = false;
@@ -5396,7 +5405,10 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
}
else
return gen_rtx_REG (mode, cum->vregno);
- else if (TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (mode))
+ else if (TARGET_ALTIVEC_ABI
+ && (ALTIVEC_VECTOR_MODE (mode)
+ || (type && TREE_CODE (type) == VECTOR_TYPE
+ && int_size_in_bytes (type) == 16)))
{
if (named || abi == ABI_V4)
return NULL_RTX;
@@ -5664,7 +5676,7 @@ rs6000_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
/* Pass synthetic vectors in memory. */
if (type && TREE_CODE (type) == VECTOR_TYPE
- && int_size_in_bytes (type) > (TARGET_ALTIVEC ? 16 : 8))
+ && int_size_in_bytes (type) > (TARGET_ALTIVEC_ABI ? 16 : 8))
{
static bool warned_for_pass_big_vectors = false;
if (TARGET_DEBUG_ARG)