This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH #2], Fix _Complex when there are multiple FP types the same size


Here is the updated patch.

I eliminated the blank lines in the ChangeLog files.

I eliminated ALTIVEC_COMPLEX, and folded the result into
ALTIVEC_ARG_MAX_RETURN. Note, due to being able to return homogeneous
aggregates, Elf v2 did not need the change, but Elf v1 needs it to return
complex values in V2 and V3 (V3 is volatile).

I eliminated the change for PRINT_OPERAND_PUNCT_VALID_P, which will be part of
another patch to update the min/max support for ISA 3.0.

I combined the tests and PowerPC specific back end changes into a single
attachment. I added a second complex test, to test whether ISA 3.0 will
generate the xsaddqp instruction for complex add instead of call __addkf3.

These patches bootstrap and have no regressions. Are they ok to install into
the tree?

Assuming there is no fallout from other ports with the machine independent
changes, can I install these patches into the GCC 6.2 tree as well?

Attachment gcc-stage7.patch002b is the machine independent changes, and
gcc-stage7.patch002c are the PowerPC specific backend and testsuite changes.

[gcc]
2016-04-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* machmode.h (mode_complex): Add support to give the complex mode
	for a given mode.
	(GET_MODE_COMPLEX_MODE): Likewise.
	* stor-layout.c (layout_type): For COMPLEX_TYPE, use the mode
	stored by build_complex_type instead of trying to figure out the
	appropriate mode based on the size.
	* genmodes.c (struct mode_data): Add field for the complex type of
	the given type.
	(blank_mode): Likewise.
	(make_complex_modes): Remember the complex mode created in the
	base type.
	(emit_mode_complex): Write out the mode_complex array to map a
	type mode to the complex version.
	(emit_insn_modes_c): Likewise.
	* tree.c (build_complex_type): Set the complex type to use before
	calling layout_type.
	* 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  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/float128-complex-1.c: New tests for complex
	__float128.
	* gcc.target/powerpc/float128-complex-2.c: Likewise.


-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

Attachment: gcc-stage7.patch002b
Description: Text document

Attachment: gcc-stage7.patch002c
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]