Commit c7b76a0ae374e5ce38d85a859786c7c8c91028ee
1 parent
958fb4a9
Fix i64 remainder calculation copy-paste error.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4357 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
tcg/tcg-runtime.c
... | ... | @@ -53,7 +53,7 @@ int64_t tcg_helper_div_i64(int64_t arg1, int64_t arg2) |
53 | 53 | |
54 | 54 | int64_t tcg_helper_rem_i64(int64_t arg1, int64_t arg2) |
55 | 55 | { |
56 | - return arg1 / arg2; | |
56 | + return arg1 % arg2; | |
57 | 57 | } |
58 | 58 | |
59 | 59 | 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) |
63 | 63 | |
64 | 64 | uint64_t tcg_helper_remu_i64(uint64_t arg1, uint64_t arg2) |
65 | 65 | { |
66 | - return arg1 / arg2; | |
66 | + return arg1 % arg2; | |
67 | 67 | } |
68 | 68 | ... | ... |