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] Re: Mainline Regression in gcc.target/i386/pr32268.c


On Feb 19, 2008 2:29 AM, David Edelsohn <dje@watson.ibm.com> wrote:
>         * config/rs6000/sfp-machine.h (__gcc_CMPtype): New typedef.
>         (CMPtype): Define as __gcc_CMPtype.
>
> Yes, please go ahead and apply the equivalent of whatever fix you and
> Jakub decide to apply to i386.

> > typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
> > #define CMPtype __gcc_CMPtype

> So would:
> typedef int CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
> #define CMPtype CMPtype

IMO, in the second version, the "#define X X" is a bit unusual. I
think that the first version describes the intention and avoids
unwanted cleanups in the future.

2008-02-19  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sfp-machine.h (__gcc_CMPtype): New typedef.
	(CMPtype): Define as __gcc_CMPtype.
	* config/rs6000/sfp-machine.h (__gcc_CMPtype): New typedef.
	(CMPtype): Define as __gcc_CMPtype.

The patch was bootstrapped and regression tested on
x86_64-pc-linux-gnu, committed to 4.4.

Uros.

Index: config/i386/sfp-machine.h
===================================================================
--- config/i386/sfp-machine.h   (revision 132412)
+++ config/i386/sfp-machine.h   (working copy)
@@ -10,7 +10,8 @@

 /* The type of the result of a floating point comparison.  This must
    match `__libgcc_cmp_return__' in GCC for the target.  */
-#define CMPtype                        long
+typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
+#define CMPtype __gcc_CMPtype

 #define _FP_MUL_MEAT_Q(R,X,Y)                           \
   _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
Index: config/rs6000/sfp-machine.h
===================================================================
--- config/rs6000/sfp-machine.h (revision 132412)
+++ config/rs6000/sfp-machine.h (working copy)
@@ -3,6 +3,11 @@
 #define _FP_WS_TYPE            signed long
 #define _FP_I_TYPE             long

+/* The type of the result of a floating point comparison.  This must
+   match `__libgcc_cmp_return__' in GCC for the target.  */
+typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
+#define CMPtype __gcc_CMPtype
+
 #define _FP_MUL_MEAT_S(R,X,Y)                          \
   _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
 #define _FP_MUL_MEAT_D(R,X,Y)                          \


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