]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
patch #5278
authorAleksey Demakov <ademakov@gmail.com>
Sun, 26 Nov 2006 16:34:26 +0000 (16:34 +0000)
committerAleksey Demakov <ademakov@gmail.com>
Sun, 26 Nov 2006 16:34:26 +0000 (16:34 +0000)
ChangeLog
jit/jit-rules-x86.ins

index df1ec09b327c8d9453f1ffb54d62dca9747b1403..e92ee7c469395611f2b1bb26ef095caf8c31d332 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-26  Kirill Kononenko  <Kirill.Kononenko@gmail.com>
+
+       * jit/jit-rules-x86.ins: if JIT_USE_SIGNALS is defined do not emit
+       explicit division by zero check (patch #5278).
+
 2006-11-26  Aleksey Demakov  <ademakov@gmail.com>
 
        * jit/jit-reg-alloc.c (choose_output_register): fix global register
        * jit/Makefile.am: add jit/jit-signal.c;
        * jit/jit-signal.c, jit/jit-internal.h: add _jit_signal_init();
        * jit/jit-init.c: call _jit_signal_init() if JIT_USE_SIGNALS is
-       defined.
+       defined. (patch #5278.)
 
 2006-08-11  Thomas Cort  <linuxgeek@gmail.com>
 
index f69d9f503bc6b18154bac7487aac407b9ffd97d2..3a3bf479ebd9d50f61c0fa7e1eb709add0a11d28 100644 (file)
@@ -550,11 +550,13 @@ JIT_OP_IDIV: more_space
        }
        [reg("eax"), reg, scratch("edx")] -> {
                unsigned char *patch, *patch2;
+#ifndef JIT_USE_SIGNALS
                x86_alu_reg_reg(inst, X86_OR, $2, $2);
                patch = inst;
                x86_branch8(inst, X86_CC_NE, 0, 0);
                inst = throw_builtin(inst, func, JIT_RESULT_DIVISION_BY_ZERO);
                x86_patch(patch, inst);
+#endif
                x86_alu_reg_imm(inst, X86_CMP, $2, -1);
                patch = inst;
                x86_branch8(inst, X86_CC_NE, 0, 0);
@@ -589,12 +591,14 @@ JIT_OP_IDIV_UN: more_space
                x86_div_reg(inst, $3, 0);
        }
        [reg("eax"), reg, scratch("edx")] -> {
+#ifndef JIT_USE_SIGNALS
                unsigned char *patch;
                x86_alu_reg_reg(inst, X86_OR, $2, $2);
                patch = inst;
                x86_branch8(inst, X86_CC_NE, 0, 0);
                inst = throw_builtin(inst, func, JIT_RESULT_DIVISION_BY_ZERO);
                x86_patch(patch, inst);
+#endif
                x86_clear_reg(inst, X86_EDX);
                x86_div_reg(inst, $2, 0);
        }
@@ -624,11 +628,13 @@ JIT_OP_IREM: more_space
        }
        [=reg("edx"), *reg("eax"), reg, scratch("edx")] -> {
                unsigned char *patch, *patch2;
+#ifndef JIT_USE_SIGNALS
                x86_alu_reg_reg(inst, X86_OR, $3, $3);
                patch = inst;
                x86_branch8(inst, X86_CC_NE, 0, 0);
                inst = throw_builtin(inst, func, JIT_RESULT_DIVISION_BY_ZERO);
                x86_patch(patch, inst);
+#endif
                x86_alu_reg_imm(inst, X86_CMP, $3, -1);
                patch = inst;
                x86_branch8(inst, X86_CC_NE, 0, 0);
@@ -659,12 +665,14 @@ JIT_OP_IREM_UN: more_space
                x86_div_reg(inst, $4, 0);
        }
        [=reg("edx"), *reg("eax"), reg, scratch("edx")] -> {
+#ifndef JIT_USE_SIGNALS
                unsigned char *patch;
                x86_alu_reg_reg(inst, X86_OR, $3, $3);
                patch = inst;
                x86_branch8(inst, X86_CC_NE, 0, 0);
                inst = throw_builtin(inst, func, JIT_RESULT_DIVISION_BY_ZERO);
                x86_patch(patch, inst);
+#endif
                x86_clear_reg(inst, X86_EDX);
                x86_div_reg(inst, $3, 0);
        }