From: Ian Lance Taylor Date: Tue, 22 Oct 1996 22:28:41 +0000 (+0000) Subject: Fix mips_function_value for TARGET_SINGLE_FLOAT. X-Git-Tag: misc/cutover-egcs-0~1338 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efcedf427c50b5eb03f37647034d8eb505b5c2df;p=thirdparty%2Fgcc.git Fix mips_function_value for TARGET_SINGLE_FLOAT. From-SVN: r12996 --- diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 3bfd940c7952..e2b99c77f1fe 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -5894,7 +5894,15 @@ mips_function_value (valtype, func) /* ??? How should we return complex float? */ if (mclass == MODE_FLOAT || mclass == MODE_COMPLEX_FLOAT) - reg = FP_RETURN; + { + if (TARGET_SINGLE_FLOAT + && (mclass == MODE_FLOAT + ? GET_MODE_SIZE (mode) > 4 + : GET_MODE_SIZE (mode) / 2 > 4)) + reg = GP_RETURN; + else + reg = FP_RETURN; + } else if (TREE_CODE (valtype) == RECORD_TYPE && mips_abi != ABI_32 && mips_abi != ABI_EABI) {