The following patch fixes an issue Sebastian ran into trying to build Ada for a new 64-bit PowerPC RTEMS target using the ELFv2 ABI. As I discussed in the bug, the rs6000 backend has certain assumptions that 64-bit targets expect that we have FP hardware in the cases where we are using explicit FP types, so using -msoft-float for 64-bit compiles might have problems. That said, the following patch does allow Sebastian's build to complete.
This has been bootstrapped and regtested on powerpc64le-linux with no regressions and Segher has approved it offline. Committed. Peter PR target/83387 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not allow arguments in FP registers if TARGET_HARD_FLOAT is false. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 256178) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -11097,7 +11097,8 @@ rs6000_discover_homogeneous_aggregate (m homogeneous aggregates; these types are handled via the targetm.calls.split_complex_arg mechanism. Complex types can be elements of homogeneous aggregates, however. */ - if (DEFAULT_ABI == ABI_ELFv2 && type && AGGREGATE_TYPE_P (type)) + if (TARGET_HARD_FLOAT && DEFAULT_ABI == ABI_ELFv2 && type + && AGGREGATE_TYPE_P (type)) { machine_mode field_mode = VOIDmode; int field_count = rs6000_aggregate_candidate (type, &field_mode);