FFI: Split up 64 bit x^k helper into signed/unsigned.

This commit is contained in:
Mike Pall
2011-01-28 02:15:30 +01:00
parent cd9b8f90e2
commit 07d8a53b39
4 changed files with 34 additions and 20 deletions

View File

@@ -689,8 +689,8 @@ static TRef crec_arith_int64(jit_State *J, TRef *sp, CType **s, MMS mm)
J->postproc = LJ_POST_FIXGUARD;
return TREF_TRUE;
} else if (mm == MM_pow) {
tr = lj_ir_call(J, IRCALL_lj_carith_powi64, sp[0], sp[1],
lj_ir_kint(J, (int)dt-(int)IRT_I64));
tr = lj_ir_call(J, dt == IRT_I64 ? IRCALL_lj_carith_powi64 :
IRCALL_lj_carith_powu64, sp[0], sp[1]);
} else {
if (mm == MM_div || mm == MM_mod)
return 0; /* NYI: integer div, mod. */