Re: Testing the lws_compare_and_swap_2 syscall

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

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux