2015-01-09 12:22 GMT+00:00 Peter Maydell peter.mayd...@linaro.org:
On 9 January 2015 at 11:25, Frediano Ziglio fredd...@gmail.com wrote:
As this platform can do multiply/divide using 128 bit precision use
these instructions to implement it.
Signed-off-by: Frediano Ziglio
On 9 January 2015 at 16:08, Frediano Ziglio fredd...@gmail.com wrote:
I agree (after some digging) we are not sure we won't get that
overflow. Agree to drop the second patch. However I would retain the
first. Compiler can use it to optimize much easier. For instance if
compiler understand that
On 9 January 2015 at 15:41, Frediano Ziglio fredd...@gmail.com wrote:
2015-01-09 12:22 GMT+00:00 Peter Maydell peter.mayd...@linaro.org:
+/* Optimised x64 version. This assume that a*b/c fits in 64 bit */
This assumption isn't necessarily true, and this implementation
will dump core on
2015-01-09 15:52 GMT+00:00 Peter Maydell peter.mayd...@linaro.org:
On 9 January 2015 at 15:41, Frediano Ziglio fredd...@gmail.com wrote:
2015-01-09 12:22 GMT+00:00 Peter Maydell peter.mayd...@linaro.org:
+/* Optimised x64 version. This assume that a*b/c fits in 64 bit */
This assumption isn't
2015-01-09 11:43 GMT+00:00 Paolo Bonzini pbonz...@redhat.com:
On 09/01/2015 12:25, Frediano Ziglio wrote:
/* compute with 96 bit intermediate result: (a*b)/c */
-#ifdef CONFIG_INT128
+#if defined(CONFIG_INT128) !defined(__x86_64__)
static inline uint64_t muldiv64(uint64_t a, uint32_t b,
On 9 January 2015 at 11:25, Frediano Ziglio fredd...@gmail.com wrote:
As this platform can do multiply/divide using 128 bit precision use
these instructions to implement it.
Signed-off-by: Frediano Ziglio frediano.zig...@huawei.com
---
include/qemu-common.h | 14 +-
1 file
As this platform can do multiply/divide using 128 bit precision use
these instructions to implement it.
Signed-off-by: Frediano Ziglio frediano.zig...@huawei.com
---
include/qemu-common.h | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/qemu-common.h
On 09/01/2015 12:25, Frediano Ziglio wrote:
/* compute with 96 bit intermediate result: (a*b)/c */
-#ifdef CONFIG_INT128
+#if defined(CONFIG_INT128) !defined(__x86_64__)
static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
{
return (__int128)a * b / c;
}
+#elif