From: Aleksey Demakov Date: Sun, 7 Oct 2007 14:01:02 +0000 (+0000) Subject: fix jump table code generation X-Git-Tag: before.move.to.git~136 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9975a64c6ae52abf51a5287620b91ca205cbaedd;p=francis%2Flibjit.git fix jump table code generation --- 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) {