[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp a04c960 1/3: * src/comp.c (emit_FIXNUMP): Don't emit
From: |
Andrea Corallo |
Subject: |
feature/native-comp a04c960 1/3: * src/comp.c (emit_FIXNUMP): Don't emit a shift when unnecessary. |
Date: |
Mon, 6 Apr 2020 13:11:35 -0400 (EDT) |
branch: feature/native-comp
commit a04c960a358811b598434c62528d2cac8a2a1cb7
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* src/comp.c (emit_FIXNUMP): Don't emit a shift when unnecessary.
---
src/comp.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/comp.c b/src/comp.c
index 0a80354..32fc7f2 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -936,13 +936,14 @@ emit_FIXNUMP (gcc_jit_rvalue *obj)
emit_comment ("FIXNUMP");
gcc_jit_rvalue *sh_res =
- emit_binary_op (
- GCC_JIT_BINARY_OP_RSHIFT,
- comp.emacs_int_type,
- emit_XLI (obj),
- gcc_jit_context_new_rvalue_from_int (comp.ctxt,
- comp.emacs_int_type,
- (USE_LSB_TAG ? 0 : FIXNUM_BITS)));
+ USE_LSB_TAG ? obj
+ : emit_binary_op (GCC_JIT_BINARY_OP_RSHIFT,
+ comp.emacs_int_type,
+ emit_XLI (obj),
+ gcc_jit_context_new_rvalue_from_int (
+ comp.ctxt,
+ comp.emacs_int_type,
+ FIXNUM_BITS));
gcc_jit_rvalue *minus_res =
emit_binary_op (