From 9975a64c6ae52abf51a5287620b91ca205cbaedd Mon Sep 17 00:00:00 2001 From: Aleksey Demakov Date: Sun, 7 Oct 2007 14:01:02 +0000 Subject: [PATCH] fix jump table code generation --- ChangeLog | 5 +++++ jit/jit-rules-x86.ins | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ad612d..2554779 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-07 Aleksey Demakov + + * jit/jit-rules-x86.ins (JIT_OP_JUMP_TABLE): fix jump table code + generation. + 2007-06-11 Aleksey Demakov * jit/jit-insn.c (accumulate_relative_offset): remove. diff --git a/jit/jit-rules-x86.ins b/jit/jit-rules-x86.ins index 8e84119..ad2c141 100644 --- a/jit/jit-rules-x86.ins +++ b/jit/jit-rules-x86.ins @@ -2508,7 +2508,7 @@ JIT_OP_ALLOCA: } JIT_OP_JUMP_TABLE: ternary, branch - [reg, imm, imm, space("32 + sizeof(void) * $3")] -> { + [reg, imm, imm, space("32 + sizeof(void *) * $3")] -> { unsigned char *patch_jump_table; unsigned char *patch_fall_through; int index; @@ -2521,7 +2521,7 @@ JIT_OP_JUMP_TABLE: ternary, branch x86_alu_reg_imm(inst, X86_CMP, $1, num_labels); patch_fall_through = inst; - x86_branch32(inst, X86_CC_GE, 0, 1); + x86_branch32(inst, X86_CC_AE, 0, 0); if(func->builder->position_independent) { -- 2.47.3