From: Andreas Schwab <schwab@suse.de>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: William Lee Irwin III <wli@holomorphy.com>,
Linus Torvalds <torvalds@transmeta.com>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
bjorn_helgaas@hp.com
Subject: Re: [PATCH] Fix CPU bitmask truncation
Date: Fri, 20 Dec 2002 21:00:23 +0100 [thread overview]
Message-ID: <je3cosxxyg.fsf@sykes.suse.de> (raw)
In-Reply-To: <1040408597.1867.24.camel@ixodes.goop.org> (Jeremy Fitzhardinge's message of "20 Dec 2002 10:23:17 -0800")
Jeremy Fitzhardinge <jeremy@goop.org> writes:
|> On Fri, 2002-12-20 at 04:17, Andreas Schwab wrote:
|> > This is useless. Assigning -1 to any unsigned type is garanteed to give
|> > you all bits one, and with two's complement this also holds for any signed
|> > type.
|>
|> Only if the -1 is the same size as the unsigned type. Otherwise it will
|> be 0-extended.
Wrong. Unsigned arithmetics is defined as modulo MAX+1, and -1 equals MAX
modulo MAX+1 for every MAX.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2002-12-20 19:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-16 19:13 Bjorn Helgaas
2002-12-20 10:30 ` William Lee Irwin III
2002-12-20 11:15 ` William Lee Irwin III
2002-12-20 17:00 ` Bjorn Helgaas
2002-12-25 21:43 ` Alan Cox
2002-12-25 21:54 ` Linus Torvalds
2002-12-20 12:17 ` Andreas Schwab
2002-12-20 17:12 ` William Lee Irwin III
2002-12-20 18:23 ` Jeremy Fitzhardinge
2002-12-20 20:00 ` Andreas Schwab [this message]
2002-12-20 22:57 ` Anton Blanchard
2002-12-20 23:36 ` William Lee Irwin III
2002-12-20 23:42 ` Anton Blanchard
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=je3cosxxyg.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=bjorn_helgaas@hp.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=wli@holomorphy.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
all inboxes | Powered by JetHome®