From cb4ce8b31c53a927f8ec8b542ad90acd14e951de Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 15 Jun 2019 18:34:18 +0200 Subject: [PATCH] add emit_BIGNUMP --- src/comp.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/comp.c b/src/comp.c index e74e67d1175..a18ed07391b 100644 --- a/src/comp.c +++ b/src/comp.c @@ -503,13 +503,6 @@ emit_CONSP (gcc_jit_rvalue *obj) return emit_TAGGEDP(obj, Lisp_Cons); } -/* static gcc_jit_rvalue * */ -/* emit_BIGNUMP (gcc_jit_rvalue *obj) */ -/* { */ - -/* } */ - - /* Declare a substitute for PSEUDOVECTORP as inline function. */ static void @@ -576,6 +569,21 @@ declare_PSEUDOVECTORP (void) args)); } +static gcc_jit_rvalue * +emit_BIGNUMP (gcc_jit_rvalue *obj) +{ + gcc_jit_rvalue *args[2] = { + obj, + gcc_jit_context_new_rvalue_from_int (comp.ctxt, + comp.int_type, + PVEC_BIGNUM) }; + + return emit_call ("PSEUDOVECTORP", + comp.bool_type, + 2, + args); +} + static gcc_jit_rvalue * emit_FIXNUMP (gcc_jit_rvalue *obj) { -- 2.39.5