diff options
author | Christopher Celio <celio@eecs.berkeley.edu> | 2012-09-10 19:11:55 -0700 |
---|---|---|
committer | Christopher Celio <celio@eecs.berkeley.edu> | 2012-09-10 19:11:55 -0700 |
commit | 93f6f1ff134333a61580677a685ad61718ad0726 (patch) | |
tree | 15596604a098f042879a836125a14f2f41533c43 /pk/int.c | |
parent | 79e238eff793adf04017519e10b30cc212f4c4bb (diff) | |
download | pk-93f6f1ff134333a61580677a685ad61718ad0726.zip pk-93f6f1ff134333a61580677a685ad61718ad0726.tar.gz pk-93f6f1ff134333a61580677a685ad61718ad0726.tar.bz2 |
Cleanup of div/divu/rem/remu.
Diffstat (limited to 'pk/int.c')
-rw-r--r-- | pk/int.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -46,7 +46,7 @@ int emulate_int(trapframe_t* tf) num_negative++; } - unsigned long res = softint_divu(xrs1, xrs2); + unsigned long res = softint_udivrem(xrs1, xrs2, 0); if (num_negative == 1) XRD = -res; else @@ -56,7 +56,7 @@ int emulate_int(trapframe_t* tf) { if(noisy) printk("emulating divu\n"); - XRD = softint_divu( xrs1, xrs2); + XRD = softint_udivrem( xrs1, xrs2, 0); } else if(IS_INSN(MUL)) { @@ -72,13 +72,13 @@ int emulate_int(trapframe_t* tf) if ((signed long) xrs1 < 0) {xrs1 = -xrs1;} if ((signed long) xrs2 < 0) {xrs2 = -xrs2;} - XRD = softint_remu(xrs1, xrs2); + XRD = softint_udivrem(xrs1, xrs2, 1); } else if(IS_INSN(REMU)) { if(noisy) printk("emulating remu\n"); - XRD = softint_remu(xrs1, xrs2); + XRD = softint_udivrem(xrs1, xrs2, 1); } else return -1; |