PERFORCE change 43331 for review
Peter Wemm
peter at FreeBSD.org
Tue Dec 2 17:16:38 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=43331
Change 43331 by peter at peter_overcee on 2003/12/02 17:16:27
add bsfq/bsrq functions that work on 64 bit quantities.
Affected files ...
.. //depot/projects/hammer/sys/amd64/include/cpufunc.h#12 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/include/cpufunc.h#12 (text+ko) ====
@@ -77,6 +77,15 @@
return (result);
}
+static __inline u_long
+bsfq(u_long mask)
+{
+ u_long result;
+
+ __asm __volatile("bsfq %1,%0" : "=r" (result) : "rm" (mask));
+ return (result);
+}
+
static __inline u_int
bsrl(u_int mask)
{
@@ -86,6 +95,15 @@
return (result);
}
+static __inline u_long
+bsrq(u_long mask)
+{
+ u_long result;
+
+ __asm __volatile("bsrl %1,%0" : "=r" (result) : "rm" (mask));
+ return (result);
+}
+
static __inline void
disable_intr(void)
{
More information about the p4-projects
mailing list