]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
kern/compiler-rt: Fix __clzsi2() logic
authorTuan Phan <tphan@ventanamicro.com>
Mon, 3 Oct 2022 18:29:21 +0000 (11:29 -0700)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 4 Oct 2022 16:10:18 +0000 (18:10 +0200)
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>
grub-core/kern/compiler-rt.c

index 2057c2e0c6383599f5027897b39527590d2963d8..8948fdf772781e5d100666bb568fd66fe7f792a8 100644 (file)
@@ -431,7 +431,7 @@ __clzsi2 (grub_uint32_t val)
 
   for (; j; j >>= 1)
     {
-      if ((temp = val) >> j)
+      if ((temp = val >> j))
         {
           if (j == 1)
             {