From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21819 invoked by alias); 17 Feb 2008 07:27:42 -0000 Received: (qmail 21809 invoked by uid 22791); 17 Feb 2008 07:27:41 -0000 X-Spam-Check-By: sourceware.org Received: from fg-out-1718.google.com (HELO fg-out-1718.google.com) (72.14.220.159) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 17 Feb 2008 07:27:22 +0000 Received: by fg-out-1718.google.com with SMTP id d23so927371fga.28 for ; Sat, 16 Feb 2008 23:27:19 -0800 (PST) Received: by 10.86.90.2 with SMTP id n2mr4501316fgb.66.1203233239226; Sat, 16 Feb 2008 23:27:19 -0800 (PST) Received: from ?194.249.6.148? ( [194.249.6.148]) by mx.google.com with ESMTPS id 3sm8396193fge.7.2008.02.16.23.27.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 16 Feb 2008 23:27:18 -0800 (PST) Message-ID: <47B7E1C7.6080200@gmail.com> Date: Sun, 17 Feb 2008 10:08:00 -0000 From: Uros Bizjak User-Agent: Thunderbird 1.5.0.7 (X11/20061008) MIME-Version: 1.0 To: Jakub Jelinek CC: Richard Guenther , "Kaveh R. Ghazi" , gcc-patches@gcc.gnu.org, David Edelsohn Subject: Re: [PATCH] Re: Mainline Regression in gcc.target/i386/pr32268.c References: <84fc9c000802161030g4fb6553er35d3135c0ca6af9e@mail.gmail.com> <001301c870ce$64e87930$6401a8c0@glap> <84fc9c000802161106y4cc4d99fh72000e7035a47855@mail.gmail.com> <003101c870d0$db0c8b40$6401a8c0@glap> <84fc9c000802161145s452c6e1bo79fe9654ec4f47d9@mail.gmail.com> <47B759A7.7090207@gmail.com> <20080216232915.GI24887@devserv.devel.redhat.com> In-Reply-To: <20080216232915.GI24887@devserv.devel.redhat.com> Content-Type: multipart/mixed; boundary="------------050404010705040700000403" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg00648.txt.bz2 This is a multi-part message in MIME format. --------------050404010705040700000403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1191 Jakub Jelinek wrote: >> Please don't. The fix is to change soft-float/soft-fp.h a bit. Jakub, is >> this change acceptable for glibc? >> > > No. You should IMHO instead > #define CMPtype int __attribute__ ((mode (__libgcc_cmp_return__))) > in config/i386/sfp-machine.h. > There is nothing libc specific on having a default CMPtype definition. > Hm, this won't fly. But following will: typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); #define CMPtype __gcc_CMPtype Attached patch adds this construct to i386/sfp-machine.h and rs6000/sfp-machine.h. It also changes test as Kaveh suggested. 2008-02-17 Uros Bizjak * config/i386/sfp-machine.h (__gcc_CPMtype): Rename from CMPtype. (CMPtype): Define as __gcc_CMPtype. * config/rs6000/sfp-machine.h (__gcc_CMPtype): New typedef. (CMPtype): Define as __gcc_CMPtype. testsuite/ChangeLog: 2008-02-17 Uros Bizjak * gcc.target/i386/pr32268.c (test_lt): Add noinline attribute. (test_gt): Ditto. The patch was tested on x86_64-pc-linux-gnu. OK for mainline (patch needs rs6000 maintainer approval)? Thanks, Uros. --------------050404010705040700000403 Content-Type: text/plain; name="p.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p.diff.txt" Content-length: 1837 Index: config/i386/sfp-machine.h =================================================================== --- config/i386/sfp-machine.h (revision 132376) +++ config/i386/sfp-machine.h (working copy) @@ -10,9 +10,9 @@ /* 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 -typedef int CMPtype __attribute__ ((mode (__libgcc_cmp_return__))); - #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 132376) +++ 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: testsuite/gcc.target/i386/pr32268.c =================================================================== --- testsuite/gcc.target/i386/pr32268.c (revision 132376) +++ testsuite/gcc.target/i386/pr32268.c (working copy) @@ -4,12 +4,14 @@ extern void abort(void); -int test_lt(__float128 x, __float128 y) +int __attribute__ ((__noinline__)) +test_lt(__float128 x, __float128 y) { return x < y; } -int test_gt (__float128 x, __float128 y) +int __attribute__ ((__noinline__)) +test_gt (__float128 x, __float128 y) { return x > y; } --------------050404010705040700000403--