This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000, C/C++] Fix PR target/86324: divkc3-1.c FAILs when compiling with -mabi=ieeelongdouble
- From: Peter Bergner <bergner at linux dot ibm dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Jonathan Wakely <jwakely at redhat dot com>, Bill Schmidt <wschmidt at linux dot ibm dot com>, Michael Meissner <meissner at linux dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 27 Jun 2018 18:33:48 -0500
- Subject: Re: [PATCH, rs6000, C/C++] Fix PR target/86324: divkc3-1.c FAILs when compiling with -mabi=ieeelongdouble
- References: <bcca27f4-571b-025a-bc8f-fec4944f3ba4@linux.ibm.com> <20180627213523.GS16221@gate.crashing.org>
On 6/27/18 4:35 PM, Segher Boessenkool wrote:
>> +DEFHOOK
>> +(translate_mode_attribute,
>> + "Define this hook if the port should translate machine_mode @var{mode}\n\
>> +to another mode. For example, rs6000's @code{KFmode}, when it is the same\n\
>> +as @code{TFmode}.\n\
>> +\n\
>> +The default version of the hook returns that mode that was passed in.",
>> + machine_mode, (machine_mode mode),
>> + default_translate_mode_attribute)
>
> It isn't clear here when this hook is called. Is the idea to use it
> everywhere where modes are created, or only where it is used now (the arg
> to a "mode" attribute)? Probably the latter, but it's not really clear
> from the text.
The latter and good idea. How about this wording instead?
Peter
Index: gcc/target.def
===================================================================
--- gcc/target.def (revision 262159)
+++ gcc/target.def (working copy)
@@ -3310,6 +3310,16 @@ constants can be done inline. The funct
HOST_WIDE_INT, (const_tree constant, HOST_WIDE_INT basic_align),
default_constant_alignment)
+DEFHOOK
+(translate_mode_attribute,
+ "Define this hook if during mode attribute processing, the port should\n\
+translate machine_mode @var{mode} to another mode. For example, rs6000's\n\
+@code{KFmode}, when it is the same as @code{TFmode}.\n\
+\n\
+The default version of the hook returns that mode that was passed in.",
+ machine_mode, (machine_mode mode),
+ default_translate_mode_attribute)
+
/* True if MODE is valid for the target. By "valid", we mean able to
be manipulated in non-trivial ways. In particular, this means all
the arithmetic is supported. */