summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-09-17 07:37:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-09-17 07:37:40 -0700
commit01628a8244053ced7dd0f20e13e4ce3ff3e81481 (patch)
treef92cca343580e6d1f6035482f3eaa8c2aae6a3cf /lib.h
parente27921f29d6b78d5c868d9160e5c12e9a49b4f97 (diff)
downloadtxr-01628a8244053ced7dd0f20e13e4ce3ff3e81481.tar.gz
txr-01628a8244053ced7dd0f20e13e4ce3ff3e81481.tar.bz2
txr-01628a8244053ced7dd0f20e13e4ce3ff3e81481.zip
* arith.c (highest_significant_bit): New static function.
(comp_clamp): Bugfix: avoid shifting left into sign bit. Function renamed to comp_trunc. (logtrunc, ash): New functions. * eval.c (eval_init): Registered logtrunc and ash intrinsics. * lib.h (logtrunc, ash): Declared. * mpi-patches/add-bitops (s_highest_bit_mp): Forward declaration for added. (mp_clamp_comp): Bugfix in handling remainder bits. Function renamed to mp_trunc_comp. (mp_trunc, mp_shift): New functions.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 91cca628..2f49d347 100644
--- a/lib.h
+++ b/lib.h
@@ -475,6 +475,8 @@ val logand(val, val);
val logior(val, val);
val logxor(val, val);
val logcomp(val, val);
+val logtrunc(val a, val bits);
+val ash(val a, val bits);
val string_own(wchar_t *str);
val string(const wchar_t *str);
val string_utf8(const char *str);