From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31786 invoked by alias); 6 Aug 2007 23:20:58 -0000 Received: (qmail 31628 invoked by uid 22791); 6 Aug 2007 23:20:56 -0000 X-Spam-Check-By: sourceware.org Received: from mx.mips.com (HELO dns0.mips.com) (63.167.95.198) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 23:20:53 +0000 Received: from mercury.mips.com (mercury [192.168.64.101]) by dns0.mips.com (8.12.11/8.12.11) with ESMTP id l76NKhVF009009; Mon, 6 Aug 2007 16:20:43 -0700 (PDT) Received: from exchange.MIPS.COM (exchange [192.168.20.29]) by mercury.mips.com (8.13.5/8.13.5) with ESMTP id l76NKnd6024233; Mon, 6 Aug 2007 16:20:49 -0700 (PDT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [ping][patch] Fixed-point patch 2/10 Date: Mon, 06 Aug 2007 23:20:00 -0000 Message-ID: <3CB54817FDF733459B230DD27C690CEC03EE8F00@Exchange.mips.com> In-Reply-To: <3CB54817FDF733459B230DD27C690CEC03EE8EFF@Exchange.mips.com> From: "Fu, Chao-Ying" To: "Mark Mitchell" , "Stephens, Nigel" Cc: , "Thekkath, Radhika" X-IsSubscribed: yes 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: 2007-08/txt/msg00401.txt.bz2 >=20 > Mark Mitchell wrote: > >=20 > > Nigel Stephens wrote: > > >=20 > > >=20 > > > Mark Mitchell wrote: > > >> Fu, Chao-Ying wrote: > > >> > > >>=20=20 > > >>> Ex 2: (A and B are negative. ) > > >>> A.high =3D 0xffffffffffffffff and A.low =3D 0x8000000000000000 > > >>> B.high =3D 0xffffffffffffffff and B.low =3D 0x0000000000000001 > > >>> =3D> A > B, because A.high =3D=3D B.high and > > >>> (unsigned HOST_WIDE_INT) a.low > (unsigned HOST_WIDE_INT) b.low > > >>>=20=20=20=20=20 > > >> > > >> Yes, I see; two's complement is set up so that after=20 > > masking the sign > > >> bit, you can do an unsigned compare. Thank you for explaining. > > >>=20=20=20 > > >=20 > > > Since double_int is already declared with low unsigned, like this: > > >=20 > > > typedef struct > > > { > > > unsigned HOST_WIDE_INT low; > > > HOST_WIDE_INT high; > > > } double_int; > > >=20 > > >=20 > > > Would it be more obvious to simply remove the casts=20 > altogether, e.g. > >=20 > > There's a comment in double-int.h that suggests that the=20 > signedness of > > low/high is historical and subject to change. So, I think=20 > > the casts are > > OK -- but I think omitting them is also OK. Chao-Ying, you=20 > may decide > > that as you please. > >=20 >=20=20 > Ok. I will omit them. Thanks! >=20 This patch (2/10) is applied. Thanks a lot! Regards, Chao-ying