aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2003-05-17 16:57:17 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2003-05-17 12:57:17 -0400
commit2a8fa26cf40c70514db7b2cba1f167f8ac7ba54c (patch)
tree39c60e6fc82854f4f4d7c44a842b486ddeabca5b /gcc
parent6508bdd59050e70ff09002a6059f80cfd1406efb (diff)
downloadgcc-2a8fa26cf40c70514db7b2cba1f167f8ac7ba54c.zip
gcc-2a8fa26cf40c70514db7b2cba1f167f8ac7ba54c.tar.gz
gcc-2a8fa26cf40c70514db7b2cba1f167f8ac7ba54c.tar.bz2
* rs6000.c (rs6000_function_value): Simplify REAL_TYPE logic.
From-SVN: r66906
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/rs6000/rs6000.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d15fadc..23b8ff1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2003-05-17 David Edelsohn <edelsohn@gnu.org>
+
+ * rs6000.c (rs6000_function_value): Simplify REAL_TYPE logic.
+
2003-05-17 Neil Booth <neil@daikokuya.co.uk>
* config/sol2.h: Add TARGET_SUB_OS_CPP_BUILTINS.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index adfa5cb..dc25005 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -14352,7 +14352,7 @@ rtx
rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
{
enum machine_mode mode;
- unsigned int regno = GP_ARG_RETURN;
+ unsigned int regno;
if ((INTEGRAL_TYPE_P (valtype)
&& TYPE_PRECISION (valtype) < BITS_PER_WORD)
@@ -14361,14 +14361,9 @@ rs6000_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
else
mode = TYPE_MODE (valtype);
- if (TREE_CODE (valtype) == REAL_TYPE)
- {
- if (TARGET_HARD_FLOAT && TARGET_FPRS)
- regno = FP_ARG_RETURN;
- else if (TARGET_SPE_ABI && !TARGET_FPRS)
- regno = GP_ARG_RETURN;
- }
- else if (TARGET_ALTIVEC && TREE_CODE (valtype) == VECTOR_TYPE)
+ if (TREE_CODE (valtype) == REAL_TYPE && TARGET_HARD_FLOAT && TARGET_FPRS)
+ regno = FP_ARG_RETURN;
+ else if (TREE_CODE (valtype) == VECTOR_TYPE && TARGET_ALTIVEC)
regno = ALTIVEC_ARG_RETURN;
else
regno = GP_ARG_RETURN;