From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Frank van Maarseveen <frankvm@frankvm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: bug in arch/ppc/kernel/misc.S: __ashrdi3?
Date: Sun, 17 Jul 2005 03:39:47 +1000 [thread overview]
Message-ID: <1121535588.14393.18.camel@gaston> (raw)
In-Reply-To: <20050715160115.GA22990@janus>
On Fri, 2005-07-15 at 18:01 +0200, Frank van Maarseveen wrote:
> I don't really grok the code but an operand seems to be missing and the
> assembler makes something out of it I don't trust:
>
> _GLOBAL(__ashrdi3)
> ...
> rlwinm r8,r7,0,32 # t3 = (count < 32) ? 32 : 0
This is equivalent to r8 = r7 & 32. It will definitely not do what the
comment says though. If (count < 64), however, it will do something
like r8 = (r7 < 32) ? 0 : 32. Paul, maybe we should dbl check what's
going in there ?
> 0: 54 e8 06 b4 rlwinm r8,r7,0,26,26
This is the same.
The assembler, when provided with only one argument after the shift
count, will generate ME and MB to represent the mask whose value is
given in argument. (If you give an argument which doesn't contain a
single contiguous range of 1 bits, I suppose it will error out).
Ben.
next prev parent reply other threads:[~2005-07-16 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-15 16:01 bug in arch/ppc/kernel/misc.S: __ashrdi3? Frank van Maarseveen
2005-07-15 18:22 ` Andreas Schwab
2005-07-16 17:39 ` Benjamin Herrenschmidt [this message]
2005-07-16 18:02 ` Andreas Schwab
2005-07-16 18:24 ` Benjamin Herrenschmidt
2005-07-18 12:14 ` Gabriel Paubert
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=1121535588.14393.18.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=frankvm@frankvm.com \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).