Linux PARISC architecture development
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: Helge Deller <deller@gmx.de>,
	Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>,
	Richard Henderson <rth@twiddle.net>
Cc: linux-parisc@vger.kernel.org
Subject: Re: Testing the lws_compare_and_swap_2 syscall
Date: Tue, 7 Nov 2017 16:31:29 -0500	[thread overview]
Message-ID: <c7568c02-daba-fdcb-3885-dea2d0746e15@bell.net> (raw)
In-Reply-To: <0746fb62-659b-da79-07a0-5ff469543c09@bell.net>

On 2017-11-06 5:45 PM, John David Anglin wrote:
> On 2017-11-06 4:27 PM, Helge Deller wrote:
>>       /* Check the validity of the size pointer */
>> -    subi,>>= 4, %r23, %r0
>> -    b,n    lws_exit_nosys
>> +    cmpib,COND(<<),n 3, %r23, lws_exit_nosys
> I don't believe that we want to use COND here (i.e., we want a 32-bit 
> check).  We might not
> need to trim the upper 32-bits r23.
>
> The reason the code uses nullification is the fast path occurs when 
> the "b,n" is nullified.   So we
> avoid the branch prediction penalty.  I'd have to check whether the 
> fast path with the cmpib instruction
> is the taken branch or not.
For cmpib with "<<" condition, the hint for a backward branch is likely 
taken.  The branch to
lws_exit_nosys is backward.

Dave

-- 
John David Anglin  dave.anglin@bell.net


  reply	other threads:[~2017-11-07 21:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 20:03 Testing the lws_compare_and_swap_2 syscall Christoph Biedl
2017-10-25  1:48 ` John David Anglin
2017-10-26  0:22   ` Christoph Biedl
2017-10-26 14:06     ` John David Anglin
2017-11-06 21:27     ` Helge Deller
2017-11-06 22:45       ` John David Anglin
2017-11-07 21:31         ` John David Anglin [this message]
2017-11-07 21:46       ` Christoph Biedl

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=c7568c02-daba-fdcb-3885-dea2d0746e15@bell.net \
    --to=dave.anglin@bell.net \
    --cc=deller@gmx.de \
    --cc=linux-kernel.bfrz@manchmal.in-ulm.de \
    --cc=linux-parisc@vger.kernel.org \
    --cc=rth@twiddle.net \
    /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