sysmacros.h (302408) | sysmacros.h (327470) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 374 unchanged lines hidden (view full) --- 383 * High order bit is 31 (or 63 in _LP64 kernel). 384 */ 385static __inline int 386highbit(ulong_t i) 387{ 388#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) 389 return (flsl(i)); 390#else | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 374 unchanged lines hidden (view full) --- 383 * High order bit is 31 (or 63 in _LP64 kernel). 384 */ 385static __inline int 386highbit(ulong_t i) 387{ 388#if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) 389 return (flsl(i)); 390#else |
391 register int h = 1; | 391 int h = 1; |
392 393 if (i == 0) 394 return (0); 395#ifdef _LP64 396 if (i & 0xffffffff00000000ul) { 397 h += 32; i >>= 32; 398 } 399#endif --- 60 unchanged lines hidden --- | 392 393 if (i == 0) 394 return (0); 395#ifdef _LP64 396 if (i & 0xffffffff00000000ul) { 397 h += 32; i >>= 32; 398 } 399#endif --- 60 unchanged lines hidden --- |