2 * arm arch v7 routines other than cache-related ones.
4 * calling this arch-v7.c would confuse the mk scripts,
5 * to which a filename arch*.c is magic.
8 #include "../port/lib.h"
12 #include "../port/error.h"
17 * these routines should be cheap enough that there will
18 * be no hesitation to use them.
20 * once 5c in-lines vlong ops, just use the vlong versions.
23 /* see Hacker's Delight if this isn't obvious */
24 #define ISPOW2(i) (((i) & ((i) - 1)) == 0)
29 /* see Hacker's Delight if this isn't obvious */
34 isulpow2(ulong ul) /* temporary speed hack */
40 * return exponent of smallest power of 2 ≥ n
47 i = BI2BY*BY2WD - 1 - clz(n);
48 if (n == 0 || !ISPOW2(n))