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] |
These patches are the machine independent changes needed to add IEEE 128-bit floating point to the PowerPC. The change is to add a new mode macro, SPECIAL_FLOATING_MODE, that is similar to FRACTIONAL_FLOATING_MODE, except that the normal widening functions skip SPECIAL_FLOATING_MODE's modes. In particular, on the PowerPC, the existing long double functions are faster, than the IEEE 128-bit emulation functions, so it is desirable that double widens to long double instead of __float128. As a consequence of the way I implemented SPECIAL_FLOATING_MODE, some of the changes involved code that starts at the narrowest type, and goes up by widening types, until an appropriate mode is found, or we find the mode itself. I needed to check whether the wider mode was VOIDmode as well as the original type. 2014-07-15 Michael Meissner <meissner@linux.vnet.ibm.com> * cse.c (cse_insn): When going through the list of smaller types, exit the loop if the type is VOIDmode in addition to the type we are looking at, to allow special modes that aren't normally considered when widening types. This is used by the PowerPC, so that floating point is widened from double to long double, and does not get converted to the slower __float128 (IEEE 128-bit floating point). * dse.c (find_shift_sequence): Likewise. * combine.c (simplify_comparison): Likewise. * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise. * machmode.h (GET_MODE_WIDER_MODE_SPECIAL): New macro to get the wider types, including special modes that are normally skipped in looking for a wider type. * machmode.def (SPECIAL_FLOAT_MODE): Document the use of SPECIAL_FLOAT_MODE in comments. * expr.c (init_expr_target): Use the GET_MODE_WIDER_MODE_SPECIAL macro to include special modes in doing the initialization. (compress_float_constant): Likewise. * genmodes.c (struct mode_data): Add support for SPECIAL_FLOAT_MODE that creates floating point modes that are normally skipped in widening types, but are available if the user explicitly uses the type. (complete_mode): Likewise. (FLOAT_MODE): Likewise. (FRACTIONAL_FLOAT_MODE): Likewise. (SPECIAL_FLOAT_MODE): Likewise. (FLOAT_MODE_INTERNAL): Likewise. (make_float_mode): Likewise. (emit_mode_wider): Likewise. * emit-rtl.c (init_derived_machine_modes): Use the GET_MODE_WIDER_MODE_SPECIAL macro to include special modes in doing the initialization. (init_emit_once): 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-power8.patch115e
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |