On 04/30/2016 06:00 PM, Segher Boessenkool wrote:
On Fri, Apr 29, 2016 at 04:51:27PM -0400, Michael Meissner wrote:
2016-04-29 Michael Meissner <meiss...@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add
support for __float128 complex datatypes.
(rs6000_hard_regno_mode_ok): Likewise.
(rs6000_setup_reg_addr_masks): Likewise.
(rs6000_complex_function_value): Likewise.
* config/rs6000/rs6000.h (FLOAT128_IEEE_P): Likewise.
__float128 and __ibm128 complex.
(FLOAT128_IBM_P): Likewise.
(ALTIVEC_ARG_MAX_RETURN): Likewise.
* doc/extend.texi (Additional Floating Types): Document that
-mfloat128 must be used to enable __float128. Document complex
__float128 and __ibm128 support.
[gcc/testsuite]
2016-04-29 Michael Meissner <meiss...@linux.vnet.ibm.com>
* gcc.target/powerpc/float128-complex-1.c: New tests for complex
__float128.
* gcc.target/powerpc/float128-complex-2.c: Likewise.
The powerpc parts are okay for trunk. Thank you!
Ok for the other parts as well. Although I wonder:
+ /* build_complex_type has set the expected mode to allow having multiple
+ complex types for multiple floating point types that have the same
+ size such as the PowerPC with __ibm128 and __float128. If this was
+ not set, figure out the mode manually. */
+ if (TYPE_MODE (type) == VOIDmode)
+ {
+ unsigned int precision = TYPE_PRECISION (TREE_TYPE (type));
+ enum mode_class mclass = (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE
+ ? MODE_COMPLEX_FLOAT : MODE_COMPLEX_INT);
+ SET_TYPE_MODE (type, mode_for_size (2 * precision, mclass, 0));
+ }
What happens if you assert that it isn't VOIDmode?
Bernd