Pavan Nikhilesh wrote Sunday, April 14, 2019 7:22 AM:
From: Pavan Nikhilesh
Fix large multiple calculation in 64 bit reciprocal division.
This "fix" has a SERIOUS bug, it needs yet another fix.
I recommend to understand code first before you copy it!
[...]
+ int64_t i;
uint i = 64;
On Sun, 14 Apr 2019 10:52:59 +0530
wrote:
> + int64_t i;
Since i only does 1..64 it can be int.
> + uint64_t t;
> +
> + for (i = 1; i <= 64; i++) {
> + t = x >> 63;
> + x = (x << 1) | (y >> 63);
> + y = y << 1;
> + if ((x | t) >= z) {
>
From: Pavan Nikhilesh
Fix large multiple calculation in 64 bit reciprocal division.
Fixes: 6d45659eacb8 ("eal: add u64-bit variant for reciprocal divide")
Cc: sta...@dpdk.org
Reported-by: Stefan Kanthak
Signed-off-by: Pavan Nikhilesh
---
lib/librte_eal/common/rte_reciprocal.c | 76 ++
3 matches
Mail list logo