From 4263f2fd15e8439b8e8676ebeb6ab2f7f9339025 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 5 Apr 2020 20:42:49 +0100 Subject: [PATCH] * src/comp.c (emit_XFIXNUM): Fix for LSB_TAG plus annotate a FIXME. --- src/comp.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/comp.c b/src/comp.c index 44de1f5fbcb..0a803545e59 100644 --- a/src/comp.c +++ b/src/comp.c @@ -985,16 +985,19 @@ emit_XFIXNUM (gcc_jit_rvalue *obj) i, comp.inttypebits); - return emit_binary_op (GCC_JIT_BINARY_OP_RSHIFT, - comp.emacs_int_type, - i, - comp.inttypebits); + return emit_coerce (comp.emacs_int_type, + emit_binary_op (GCC_JIT_BINARY_OP_RSHIFT, + comp.emacs_uint_type, + i, + comp.inttypebits)); } else - return emit_binary_op (GCC_JIT_BINARY_OP_LSHIFT, - comp.emacs_int_type, - i, - comp.inttypebits); + /* FIXME: Implementation dependent (wants arithmetic shift). */ + return emit_coerce (comp.emacs_int_type, + emit_binary_op (GCC_JIT_BINARY_OP_RSHIFT, + comp.emacs_int_type, + i, + comp.inttypebits)); } static gcc_jit_rvalue * -- 2.39.5