Browse Source

fix jump table code generation

cache-refactoring
Aleksey Demakov 17 years ago
parent
commit
9975a64c6a
  1. 5
      ChangeLog
  2. 4
      jit/jit-rules-x86.ins

5
ChangeLog

@ -1,3 +1,8 @@
2007-10-07 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins (JIT_OP_JUMP_TABLE): fix jump table code
generation.
2007-06-11 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (accumulate_relative_offset): remove.

4
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)
{

Loading…
Cancel
Save