Print this page
4374 dn_free_ranges should use range_tree_t
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>

@@ -20,10 +20,11 @@
  */
 
 /*
  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright (c) 2014 by Delphix. All rights reserved.
  */
 
 /*
  *  Copyright (c) 1990, 1991 UNIX System Laboratories, Inc.
  *  Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T

@@ -2843,10 +2844,47 @@
         incl    %eax
         ret
         SET_SIZE(highbit)
 
 #endif  /* __i386 */
+#endif  /* __lint */
+
+#if defined(__lint)
+
+/*ARGSUSED*/
+int
+highbit64(uint64_t i)
+{ return (0); }
+
+#else   /* __lint */
+
+#if defined(__amd64)
+
+        ENTRY(highbit64)
+        movl    $-1, %eax
+        bsrq    %rdi, %rax
+        incl    %eax
+        ret
+        SET_SIZE(highbit64)
+
+#elif defined(__i386)
+
+        ENTRY(highbit64)
+        bsrl    8(%esp), %eax
+        jz      .lowbit
+        addl    $32, %eax
+        jmp     .done
+
+.lowbit:
+        movl    $-1, %eax
+        bsrl    4(%esp), %eax
+.done:
+        incl    %eax
+        ret
+        SET_SIZE(highbit64)
+
+#endif  /* __i386 */
 #endif  /* __lint */
 
 #if defined(__lint)
 
 /*ARGSUSED*/