1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix JIT compilation of call-with-prompt

* libguile/jit.c (compile_prompt): Actually push the MRA arg.
  (analyze): Mark call continuations as entries, as both FP and SP are
  set then, and also mark prompt handlers as entries (and blocks).
This commit is contained in:
Andy Wingo 2018-08-29 20:00:03 +02:00
parent 66fb76db2b
commit c02c89d533

View file

@ -2142,6 +2142,7 @@ compile_prompt (scm_jit_state *j, uint32_t tag, uint8_t escape_only_p,
jit_pushargr (FP); jit_pushargr (FP);
jit_pushargi ((uintptr_t) vcode); jit_pushargi ((uintptr_t) vcode);
mra = emit_movi (j, T2, 0); mra = emit_movi (j, T2, 0);
jit_pushargr (T2);
jit_finishi (scm_vm_intrinsics.push_prompt); jit_finishi (scm_vm_intrinsics.push_prompt);
clear_scratch_register_state (j); clear_scratch_register_state (j);
emit_reload_sp (j); emit_reload_sp (j);
@ -4278,11 +4279,22 @@ analyze (scm_jit_state *j)
break; break;
case scm_op_j: case scm_op_j:
attrs |= OP_ATTR_BLOCK;
target = j->ip + (((int32_t)j->ip[0]) >> 8); target = j->ip + (((int32_t)j->ip[0]) >> 8);
j->op_attrs[target - j->start] |= OP_ATTR_BLOCK; j->op_attrs[target - j->start] |= OP_ATTR_BLOCK;
break; break;
case scm_op_call:
case scm_op_call_label:
attrs = OP_ATTR_BLOCK;
target = j->next_ip;
j->op_attrs[target - j->start] |= OP_ATTR_BLOCK | OP_ATTR_ENTRY;
break;
case scm_op_prompt:
target = j->ip + (((int32_t) j->ip[2]) >> 8);
j->op_attrs[target - j->start] |= OP_ATTR_BLOCK | OP_ATTR_ENTRY;
break;
default: default:
break; break;
} }