From: Andreas Schwab <schwab@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: bug in arch/ppc/kernel/misc.S: __ashrdi3?
Date: Sat, 16 Jul 2005 20:02:18 +0200 [thread overview]
Message-ID: <jeackmbped.fsf@sykes.suse.de> (raw)
In-Reply-To: <1121535588.14393.18.camel@gaston> (Benjamin Herrenschmidt's message of "Sun, 17 Jul 2005 03:39:47 +1000")
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 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 ?
r7 is count + 32, and ((count + 32) & 32) is equivalent to the expression
above if count < 64.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2005-07-16 18:02 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
2005-07-16 18:02 ` Andreas Schwab [this message]
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=jeackmbped.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=benh@kernel.crashing.org \
--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).