]> xenbits.xensource.com Git - qemu-xen-4.0-testing.git/commitdiff
Fix i64 remainder calculation copy-paste error.
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 6 May 2008 14:40:28 +0000 (14:40 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 6 May 2008 14:40:28 +0000 (14:40 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4357 c046a42c-6fe2-441c-8c8c-71466251a162

tcg/tcg-runtime.c

index f41703ec8ba8e466735207fa0885dbbf0fc3dbd8..575da430229bd7ad1ce89c274791a79291c4dcd8 100644 (file)
@@ -53,7 +53,7 @@ int64_t tcg_helper_div_i64(int64_t arg1, int64_t arg2)
 
 int64_t tcg_helper_rem_i64(int64_t arg1, int64_t arg2)
 {
-    return arg1 / arg2;
+    return arg1 % arg2;
 }
 
 uint64_t tcg_helper_divu_i64(uint64_t arg1, uint64_t arg2)
@@ -63,6 +63,6 @@ uint64_t tcg_helper_divu_i64(uint64_t arg1, uint64_t arg2)
 
 uint64_t tcg_helper_remu_i64(uint64_t arg1, uint64_t arg2)
 {
-    return arg1 / arg2;
+    return arg1 % arg2;
 }