-rw-r--r-- | lib/jit_x86.c | 20 |
diff --git a/lib/jit_x86.c b/lib/jit_x86.c index dc386be..747741d 100644 --- a/lib/jit_x86.c +++ b/lib/jit_x86.c @@ -1668,15 +1668,19 @@ _emit_code(jit_state_t *_jit) jmpr(rn(node->u.w)); break; case jit_code_jmpi: - temp = node->u.n; - assert(temp->code == jit_code_label || - temp->code == jit_code_epilog); - if (temp->flag & jit_flag_patch) - jmpi(temp->u.w); - else { - word = jmpi(_jit->pc.w); - patch(word, node); + if (node->flag & jit_flag_node) { + temp = node->u.n; + assert(temp->code == jit_code_label || + temp->code == jit_code_epilog); + if (temp->flag & jit_flag_patch) + jmpi(temp->u.w); + else { + word = jmpi(_jit->pc.w); + patch(word, node); + } } + else + jmpi(node->u.w); break; case jit_code_callr: callr(rn(node->u.w)); |