linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John David Anglin <dave.anglin@bell.net>
To: Helge Deller <deller@gmx.de>,
	linux-parisc@vger.kernel.org,
	James Bottomley <James.Bottomley@hansenpartnership.com>
Subject: Re: [PATCH] parisc: Add static branch and JUMP_LABEL feature (v2)
Date: Fri, 3 May 2019 18:31:33 -0400	[thread overview]
Message-ID: <ce170758-ec9a-7f30-64ea-e153ed27242b@bell.net> (raw)
In-Reply-To: <20190503214006.GA25013@ls3530.dellerweb.de>

On 2019-05-03 5:40 p.m., Helge Deller wrote:
> +		void *target = (void *)jump_entry_target(entry);
> +		int distance = target - addr;
> +		/*
> +		 * Encode the PA1.1 "b,n" instruction with a 17-bit
> +		 * displacement.  In case we hit the BUG(), we could use
> +		 * another branch instruction with a 22-bit displacement on
> +		 * 64-bit CPUs instead. But this seems sufficient for now.
> +		 */
Just a note on the comment.  The branch instruction with 22-bit displacement uses
the return pointer register %rp.  It is available on 32 and 64-bit PA 2.0 machines but
one would have to clobber %rp, or save and restore it on stack. The former would cause
%rp to be saved and restored in the function's prologue and epilogue, respectively.

Dave

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


      reply	other threads:[~2019-05-03 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 20:02 [PATCH] parisc: Add static branch / JUMP_LABEL feature Helge Deller
2019-05-02  5:05 ` Sven Schnelle
2019-05-03 21:40   ` [PATCH] parisc: Add static branch and JUMP_LABEL feature (v2) Helge Deller
2019-05-03 22:31     ` John David Anglin [this message]

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=ce170758-ec9a-7f30-64ea-e153ed27242b@bell.net \
    --to=dave.anglin@bell.net \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=deller@gmx.de \
    --cc=linux-parisc@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;
as well as URLs for NNTP newsgroup(s).