Re: [PATCH] parisc: Add static branch and JUMP_LABEL feature (v2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux