* rs6000.c (rs6000_function_value): Simplify REAL_TYPE logic.

From-SVN: r66906
This commit is contained in:
David Edelsohn 2003-05-17 16:57:17 +00:00 committed by David Edelsohn
parent 6508bdd590
commit 2a8fa26cf4
2 changed files with 8 additions and 9 deletions

View File

@ -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.

View File

@ -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;