Skip to content

Commit

Permalink
JIT Compile coerce_sI Op
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Nov 28, 2018
1 parent 86c41e3 commit c2952f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/jit/graph.c
Expand Up @@ -116,6 +116,7 @@ static void * op_to_func(MVMThreadContext *tc, MVMint16 opcode) {
case MVM_OP_coerce_sn: return MVM_coerce_s_n;
case MVM_OP_coerce_In: return MVM_bigint_to_num;
case MVM_OP_coerce_nI: return MVM_bigint_from_num;
case MVM_OP_coerce_sI: return MVM_coerce_sI;
case MVM_OP_coerce_II: return MVM_bigint_from_bigint;
case MVM_OP_iterkey_s: return MVM_iterkey_s;
case MVM_OP_iter: return MVM_iter;
Expand Down Expand Up @@ -2615,6 +2616,17 @@ static MVMint32 consume_ins(MVMThreadContext *tc, MVMJitGraph *jg,
jg_append_call_c(tc, jg, op_to_func(tc, op), 3, args, MVM_JIT_RV_PTR, dst);
break;
}
case MVM_OP_coerce_sI: {
MVMint16 src = ins->operands[1].reg.orig;
MVMint16 dst = ins->operands[0].reg.orig;
MVMint16 typ = ins->operands[2].reg.orig;
MVMJitCallArg args[] = {{ MVM_JIT_INTERP_VAR, { MVM_JIT_INTERP_TC } },
{ MVM_JIT_REG_VAL, { src } },
{ MVM_JIT_REG_VAL, { typ } }};

jg_append_call_c(tc, jg, op_to_func(tc, op), 3, args, MVM_JIT_RV_PTR, dst);
break;
}
case MVM_OP_coerce_II: {
MVMint16 src = ins->operands[1].reg.orig;
MVMint16 dst = ins->operands[0].reg.orig;
Expand Down

0 comments on commit c2952f9

Please sign in to comment.