summaryrefslogtreecommitdiffstats
path: root/eval.c
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 /eval.c
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 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 4050a2ea..ec5db76a 100644
--- a/eval.c
+++ b/eval.c
@@ -2235,6 +2235,8 @@ void eval_init(void)
reg_fun(intern(lit("logior"), user_package), func_n2(logior));
reg_fun(intern(lit("logxor"), user_package), func_n2(logxor));
reg_fun(intern(lit("logcomp"), user_package), func_n2o(logcomp, 1));
+ reg_fun(intern(lit("logtrunc"), user_package), func_n2(logtrunc));
+ reg_fun(intern(lit("ash"), user_package), func_n2(ash));
reg_fun(intern(lit("regex-compile"), user_package), func_n1(regex_compile));
reg_fun(intern(lit("regexp"), user_package), func_n1(regexp));