From 56f4cc0462cecc94611d11377c8aecc68485327e Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 2 Oct 2008 18:53:04 +0000 Subject: [PATCH] rs6000.c (USE_FP_FOR_ARG_P): Revert TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT. * config/rs6000/rs6000.c (USE_FP_FOR_ARG_P): Revert TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT. (function_arg_advance): Condition on TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT. Revert SCALAR_FLOAT_MODE_P condition. (function_arg): Condition on TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT. (rs6000_function_value): Revert TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT. From-SVN: r140838 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/rs6000/rs6000.c | 23 +++++++++-------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b15180544cd..10aab9ca08a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2008-10-02 David Edelsohn + + * config/rs6000/rs6000.c (USE_FP_FOR_ARG_P): Revert + TARGET_DOUBLE_FLOAT, TARGET_SINGLE_FLOAT. + (function_arg_advance): Condition on TARGET_DOUBLE_FLOAT, + TARGET_SINGLE_FLOAT. + Revert SCALAR_FLOAT_MODE_P condition. + (function_arg): Condition on TARGET_DOUBLE_FLOAT, + TARGET_SINGLE_FLOAT. + (rs6000_function_value): Revert TARGET_DOUBLE_FLOAT, + TARGET_SINGLE_FLOAT. + 2008-10-02 Daniel Jacobowitz * builtins.c (fold_builtin_pow): Check for 0 ** NEGATIVE. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6b9367b1570..e1e0d1c02f8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5249,9 +5249,7 @@ rs6000_emit_move (rtx dest, rtx source, enum machine_mode mode) #define USE_FP_FOR_ARG_P(CUM,MODE,TYPE) \ (SCALAR_FLOAT_MODE_P (MODE) \ && (CUM)->fregno <= FP_ARG_MAX_REG \ - && TARGET_HARD_FLOAT && TARGET_FPRS \ - && ((TARGET_DOUBLE_FLOAT && (MODE) == DFmode)\ - || (TARGET_SINGLE_FLOAT && (MODE) == SFmode))) + && TARGET_HARD_FLOAT && TARGET_FPRS) /* Nonzero if we can use an AltiVec register to pass this arg. */ #define USE_ALTIVEC_FOR_ARG_P(CUM,MODE,TYPE,NAMED) \ @@ -5728,9 +5726,10 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, else if (DEFAULT_ABI == ABI_V4) { if (TARGET_HARD_FLOAT && TARGET_FPRS - && (mode == SFmode || mode == DFmode - || mode == SDmode || mode == DDmode || mode == TDmode - || (mode == TFmode && !TARGET_IEEEQUAD))) + && ((TARGET_SINGLE_FLOAT && mode == SFmode) + || (TARGET_DOUBLE_FLOAT && mode == DFmode) + || (mode == TFmode && !TARGET_IEEEQUAD) + || mode == SDmode || mode == DDmode || mode == TDmode)) { /* _Decimal128 must use an even/odd register pair. This assumes that the register number is odd when fregno is odd. */ @@ -5796,9 +5795,7 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, cum->words = align_words + n_words; if (SCALAR_FLOAT_MODE_P (mode) - && TARGET_HARD_FLOAT && TARGET_FPRS - && ((TARGET_DOUBLE_FLOAT && mode == DFmode) - || (TARGET_SINGLE_FLOAT && mode == SFmode))) + && TARGET_HARD_FLOAT && TARGET_FPRS) { /* _Decimal128 must be passed in an even/odd float register pair. This assumes that the register number is odd when fregno is @@ -6292,7 +6289,8 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, else if (abi == ABI_V4) { if (TARGET_HARD_FLOAT && TARGET_FPRS - && (mode == SFmode || mode == DFmode + && ((TARGET_SINGLE_FLOAT && mode == SFmode) + || (TARGET_DOUBLE_FLOAT && mode == DFmode) || (mode == TFmode && !TARGET_IEEEQUAD) || mode == SDmode || mode == DDmode || mode == TDmode)) { @@ -22522,10 +22520,7 @@ rs6000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED) if (DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS) /* _Decimal128 must use an even/odd register pair. */ regno = (mode == TDmode) ? FP_ARG_RETURN + 1 : FP_ARG_RETURN; - else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_FPRS - && (TARGET_HARD_FLOAT - && ((TARGET_SINGLE_FLOAT && mode == SFmode) - || TARGET_DOUBLE_FLOAT))) + else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS) regno = FP_ARG_RETURN; else if (TREE_CODE (valtype) == COMPLEX_TYPE && targetm.calls.split_complex_arg)