diff options
Diffstat (limited to 'tcg/tcg-runtime.c')
-rw-r--r-- | tcg/tcg-runtime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tcg/tcg-runtime.c b/tcg/tcg-runtime.c index f41703ec8b..575da43022 100644 --- a/tcg/tcg-runtime.c +++ b/tcg/tcg-runtime.c @@ -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; } |