From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] include/asm-ARCH/page.h:get_order() Reorganize and op timize
Date: 14 Nov 2002 01:26:08 +0100 [thread overview]
Message-ID: <87u1ilov33.fsf@student.uni-tuebingen.de> (raw)
In-Reply-To: <A46BBDB345A7D5118EC90002A5072C7806CAC93A@orsmsx116.jf.intel.com>
"Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com> writes:
> > > s = --s >> PAGE_SHIFT;
> >
> > This code has undefined behaviour.
>
> Do you mean that this:
>
> s = (s-1) >> PAGE_SHIFT
>
> is more deterministic? If so, I agree -- if you mean something else,
> I am kind of lost.
I mean that this code violates the rule that you may modify a value
only once between two sequence points. Newer gccs have a warning for
this (-Wsequence-point), the info page tells more.
Also, did I understand it right that you want to use fls even on
architectures that don't have it as a builtin? I would guess that will
actually be noticeably slower, since generic_fls is so complicated.
--
Falk
next prev parent reply other threads:[~2002-11-14 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-13 23:44 Perez-Gonzalez, Inaky
2002-11-14 0:26 ` Falk Hueffner [this message]
2002-11-14 0:43 Perez-Gonzalez, Inaky
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=87u1ilov33.fsf@student.uni-tuebingen.de \
--to=falk.hueffner@student.uni-tuebingen.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=inaky.perez-gonzalez@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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®