diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-05-21 17:51:31 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-05-22 21:54:02 +0100 |
commit | 0a2ac47909c497d299e5d5cc111cf77206dcda9b (patch) | |
tree | 90c84039cf05dd016feb43094ec7d9397d36d33f /src/comp.c | |
parent | f036ec97cecc8d7ec2cd36741bbe2619cda1207b (diff) | |
download | emacs-0a2ac47909c497d299e5d5cc111cf77206dcda9b.tar.gz emacs-0a2ac47909c497d299e5d5cc111cf77206dcda9b.tar.bz2 emacs-0a2ac47909c497d299e5d5cc111cf77206dcda9b.zip |
* src/comp.c: Fix 32bit wide-int.
* src/comp.c (emit_XFIXNUM): Make right shift for MSB_TAG
arithmetic too to preserve sign bit.
Diffstat (limited to 'src/comp.c')
-rw-r--r-- | src/comp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/comp.c b/src/comp.c index 6371757487c..994bd7db934 100644 --- a/src/comp.c +++ b/src/comp.c @@ -1066,6 +1066,8 @@ emit_XFIXNUM (gcc_jit_rvalue *obj) emit_comment ("XFIXNUM"); gcc_jit_rvalue *i = emit_coerce (comp.emacs_uint_type, emit_XLI (obj)); + /* FIXME: Implementation dependent (both RSHIFT are arithmetics). */ + if (!USE_LSB_TAG) { i = emit_binary_op (GCC_JIT_BINARY_OP_LSHIFT, @@ -1073,14 +1075,12 @@ emit_XFIXNUM (gcc_jit_rvalue *obj) 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)); + return emit_binary_op (GCC_JIT_BINARY_OP_RSHIFT, + comp.emacs_int_type, + i, + comp.inttypebits); } else - /* 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, |