From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4989 invoked by alias); 6 Aug 2007 22:04:48 -0000 Received: (qmail 4606 invoked by uid 22791); 6 Aug 2007 22:04:46 -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 22:04:44 +0000 Received: from mercury.mips.com (mercury [192.168.64.101]) by dns0.mips.com (8.12.11/8.12.11) with ESMTP id l76M4VY0008796; Mon, 6 Aug 2007 15:04:35 -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 l76M4cSY022297; Mon, 6 Aug 2007 15:04:38 -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 22:04:00 -0000 Message-ID: <3CB54817FDF733459B230DD27C690CEC03EE8EFF@Exchange.mips.com> In-Reply-To: <46B77CD9.4070107@codesourcery.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/msg00397.txt.bz2 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 altogether, e.g. >=20 > There's a comment in double-int.h that suggests that the 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 may decide > that as you please. >=20 =20 Ok. I will omit them. Thanks! Regards, Chao-ying