[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix __clzsi2 logic
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] Fix __clzsi2 logic |
Date: |
Mon, 3 Oct 2022 17:26:00 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Sep 29, 2022 at 03:00:26PM -0700, Tuan Phan wrote:
> Fix the incorrect return value of __clzsi2 function.
>
> Fixes: e795b90 ("RISC-V: Add libgcc helpers for clz")
> Signed-off-by: Tuan Phan <tphan@ventanamicro.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> but...
> ---
> grub-core/kern/compiler-rt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c
> index 2057c2e0c..55ae9f97e 100644
> --- a/grub-core/kern/compiler-rt.c
> +++ b/grub-core/kern/compiler-rt.c
> @@ -431,7 +431,7 @@ __clzsi2 (grub_uint32_t val)
>
> for (; j; j >>= 1)
> {
> - if ((temp = val) >> j)
> + if ((temp = (val >> j)))
... I will drop redundant brackets from here to be in line with things
in the libgcc...
Daniel
- Re: [PATCH] Fix __clzsi2 logic,
Daniel Kiper <=