Skip to content

Commit

Permalink
Merge pull request #623 from MasterDuke17/jit_pow_I
Browse files Browse the repository at this point in the history
JIT pow_I
  • Loading branch information
jnthn committed Aug 3, 2017
2 parents 0df98ee + af52fca commit f1bfca0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/jit/graph.c
Expand Up @@ -365,6 +365,7 @@ static void * op_to_func(MVMThreadContext *tc, MVMint16 opcode) {
case MVM_OP_acos_n: return acos;
case MVM_OP_atan_n: return atan;
case MVM_OP_atan2_n: return atan2;
case MVM_OP_pow_I: return MVM_bigint_pow;
case MVM_OP_pow_n: return pow;
case MVM_OP_time_n: return MVM_proc_time_n;
case MVM_OP_randscale_n: return MVM_proc_randscale_n;
Expand Down Expand Up @@ -2507,6 +2508,21 @@ static MVMint32 jgb_consume_ins(MVMThreadContext *tc, JitGraphBuilder *jgb,
MVM_JIT_RV_PTR, dst);
break;
}
case MVM_OP_pow_I: {
MVMint16 src_a = ins->operands[1].reg.orig;
MVMint16 src_b = ins->operands[2].reg.orig;
MVMint16 type_n = ins->operands[3].reg.orig;
MVMint16 type_I = ins->operands[4].reg.orig;
MVMint16 dst = ins->operands[0].reg.orig;
MVMJitCallArg args[] = { { MVM_JIT_INTERP_VAR, { MVM_JIT_INTERP_TC } },
{ MVM_JIT_REG_VAL, { src_a } },
{ MVM_JIT_REG_VAL, { src_b } },
{ MVM_JIT_REG_VAL, { type_n } },
{ MVM_JIT_REG_VAL, { type_I } } };
jgb_append_call_c(tc, jgb, op_to_func(tc, op), 5, args,
MVM_JIT_RV_PTR, dst);
break;
}
case MVM_OP_div_In: {
MVMint16 dst = ins->operands[0].reg.orig;
MVMint16 src_a = ins->operands[1].reg.orig;
Expand Down

0 comments on commit f1bfca0

Please sign in to comment.