summaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_asm_x86.h')
-rw-r--r--src/lj_asm_x86.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index c89bc521..e5bc4a0e 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -1651,6 +1651,16 @@ static void asm_arith64(ASMState *as, IRIns *ir, IRCallID id)
1651} 1651}
1652#endif 1652#endif
1653 1653
1654static void asm_intmod(ASMState *as, IRIns *ir)
1655{
1656 const CCallInfo *ci = &lj_ir_callinfo[IRCALL_lj_vm_modi];
1657 IRRef args[2];
1658 args[0] = ir->op1;
1659 args[1] = ir->op2;
1660 asm_setupresult(as, ir, ci);
1661 asm_gencall(as, ci, args);
1662}
1663
1654static int asm_swapops(ASMState *as, IRIns *ir) 1664static int asm_swapops(ASMState *as, IRIns *ir)
1655{ 1665{
1656 IRIns *irl = IR(ir->op1); 1666 IRIns *irl = IR(ir->op1);
@@ -2499,11 +2509,12 @@ static void asm_ir(ASMState *as, IRIns *ir)
2499 break; 2509 break;
2500 case IR_MOD: 2510 case IR_MOD:
2501#if LJ_64 && LJ_HASFFI 2511#if LJ_64 && LJ_HASFFI
2502 asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 : 2512 if (!irt_isint(ir->t))
2503 IRCALL_lj_carith_modu64); 2513 asm_arith64(as, ir, irt_isi64(ir->t) ? IRCALL_lj_carith_modi64 :
2504#else 2514 IRCALL_lj_carith_modu64);
2505 lua_assert(0); 2515 else
2506#endif 2516#endif
2517 asm_intmod(as, ir);
2507 break; 2518 break;
2508 2519
2509 case IR_NEG: 2520 case IR_NEG: