From: "Fu, Chao-Ying" <fu@mips.com>
To: "Mark Mitchell" <mark@codesourcery.com>,
"Stephens, Nigel" <nigel@mips.com>
Cc: <gcc-patches@gcc.gnu.org>, "Thekkath, Radhika" <radhika@mips.com>
Subject: RE: [ping][patch] Fixed-point patch 2/10
Date: Mon, 06 Aug 2007 23:20:00 -0000 [thread overview]
Message-ID: <3CB54817FDF733459B230DD27C690CEC03EE8F00@Exchange.mips.com> (raw)
In-Reply-To: <3CB54817FDF733459B230DD27C690CEC03EE8EFF@Exchange.mips.com>
>
> Mark Mitchell wrote:
> >
> > Nigel Stephens wrote:
> > >
> > >
> > > Mark Mitchell wrote:
> > >> Fu, Chao-Ying wrote:
> > >>
> > >>
> > >>> Ex 2: (A and B are negative. )
> > >>> A.high = 0xffffffffffffffff and A.low = 0x8000000000000000
> > >>> B.high = 0xffffffffffffffff and B.low = 0x0000000000000001
> > >>> => A > B, because A.high == B.high and
> > >>> (unsigned HOST_WIDE_INT) a.low > (unsigned HOST_WIDE_INT) b.low
> > >>>
> > >>
> > >> Yes, I see; two's complement is set up so that after
> > masking the sign
> > >> bit, you can do an unsigned compare. Thank you for explaining.
> > >>
> > >
> > > Since double_int is already declared with low unsigned, like this:
> > >
> > > typedef struct
> > > {
> > > unsigned HOST_WIDE_INT low;
> > > HOST_WIDE_INT high;
> > > } double_int;
> > >
> > >
> > > Would it be more obvious to simply remove the casts
> altogether, e.g.
> >
> > 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
> > the casts are
> > OK -- but I think omitting them is also OK. Chao-Ying, you
> may decide
> > that as you please.
> >
>
> Ok. I will omit them. Thanks!
>
This patch (2/10) is applied. Thanks a lot!
Regards,
Chao-ying
prev parent reply other threads:[~2007-08-06 23:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 23:24 Fu, Chao-Ying
2007-08-06 3:50 ` Mark Mitchell
2007-08-06 17:35 ` Fu, Chao-Ying
2007-08-06 18:08 ` Mark Mitchell
2007-08-06 19:17 ` Nigel Stephens
2007-08-06 19:56 ` Mark Mitchell
2007-08-06 22:04 ` Fu, Chao-Ying
2007-08-06 23:20 ` Fu, Chao-Ying [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CB54817FDF733459B230DD27C690CEC03EE8F00@Exchange.mips.com \
--to=fu@mips.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mark@codesourcery.com \
--cc=nigel@mips.com \
--cc=radhika@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).