diff options
Diffstat (limited to 'generic/lib/integer/clz.inc')
-rw-r--r-- | generic/lib/integer/clz.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/lib/integer/clz.inc b/generic/lib/integer/clz.inc new file mode 100644 index 0000000..2fa1ad9 --- /dev/null +++ b/generic/lib/integer/clz.inc @@ -0,0 +1,9 @@ +_CLC_OVERLOAD _CLC_DEF GENTYPE clz(GENTYPE x) { +#if (GENTYPE == 'int') || (GENTYPE == 'uint') + //Doesn't seem to actually work. + return __builtin_clz(x); +#else + //BAh! + return 0; +#endif +} |