diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-09-17 07:37:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-09-17 07:37:40 -0700 |
commit | 01628a8244053ced7dd0f20e13e4ce3ff3e81481 (patch) | |
tree | f92cca343580e6d1f6035482f3eaa8c2aae6a3cf /lib.h | |
parent | e27921f29d6b78d5c868d9160e5c12e9a49b4f97 (diff) | |
download | txr-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |