summaryrefslogtreecommitdiffstats
path: root/include/hw
diff options
context:
space:
mode:
authorLuis Pires2021-10-25 21:11:38 +0200
committerRichard Henderson2021-10-28 02:10:00 +0200
commit40f3e79a862554553811d0681c05e00a4705e91c (patch)
tree4fc15b4a02f1d6354a28486c6f91d9fc1dd0f1aa /include/hw
parenthost-utils: move udiv_qrnnd() to host-utils (diff)
downloadqemu-40f3e79a862554553811d0681c05e00a4705e91c.tar.gz
qemu-40f3e79a862554553811d0681c05e00a4705e91c.tar.xz
qemu-40f3e79a862554553811d0681c05e00a4705e91c.zip
host-utils: add 128-bit quotient support to divu128/divs128
These will be used to implement new decimal floating point instructions from Power ISA 3.1. The remainder is now returned directly by divu128/divs128, freeing up phigh to receive the high 64 bits of the quotient. Signed-off-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211025191154.350831-4-luis.pires@eldorado.org.br> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/clock.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/hw/clock.h b/include/hw/clock.h
index 7443e6c4ab..5c927cee7f 100644
--- a/include/hw/clock.h
+++ b/include/hw/clock.h
@@ -323,11 +323,7 @@ static inline uint64_t clock_ns_to_ticks(const Clock *clk, uint64_t ns)
if (clk->period == 0) {
return 0;
}
- /*
- * BUG: when CONFIG_INT128 is not defined, the current implementation of
- * divu128 does not return a valid truncated quotient, so the result will
- * be wrong.
- */
+
divu128(&lo, &hi, clk->period);
return lo;
}