From 2a8fa26cf40c70514db7b2cba1f167f8ac7ba54c Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Sat, 17 May 2003 16:57:17 +0000 Subject: * rs6000.c (rs6000_function_value): Simplify REAL_TYPE logic. From-SVN: r66906 --- gcc/ChangeLog | 4 ++++ gcc/config/rs6000/rs6000.c | 13 ++++--------- 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 + + * rs6000.c (rs6000_function_value): Simplify REAL_TYPE logic. + 2003-05-17 Neil Booth * 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; -- cgit v1.1