RESUBMIT: PowerPC -- support single-precision FPU
Michael Eager
eager@eagercon.com
Thu Oct 2 19:29:00 GMT 2008
David Edelsohn wrote:
> I committed the attached patch to fixes the problems discovered so far.
>
> This patch adds the TARGET_SINGLE_FLOAT and TARGET_DOUBLE_FLOAT
> conditionals in function_arg and function_arg_advance with the correct grouping.
>
> It also reverts the conditionals that added tests for mode where there was
> none before, breaking support for other FP modes.
>
> * 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.
I'm not sure that removing the test for TARGET_SINGLE_FLOAT
in USE_FP_FOR_ARG_P is correct. On a target with a single-precision
FPU, only SFmode values can be passed in FP regs. This change says
that DFmode values are can be passed in FP regs, even if
TARGET_DOUBLE_FLOAT is false.
Removing the test in rs6000_function_value() means that
FP_ARG_RETURN will be used to return all FP values. That's
not correct on a single-precision FPU for DFmode values.
I'll admit to being confused about TFmode. This seems to
sneak in with DFmode.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Gcc-patches
mailing list