All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Kiper <daniel.kiper@oracle.com>
To: grub-devel@gnu.org
Cc: alexander.burmashev@oracle.com, eric.snowberg@oracle.com,
	leif.lindholm@linaro.org, phcoder@gmail.com,
	ross.philipson@oracle.com
Subject: [PATCH 5/5] sparc: Enable __clzsi2() and __clzdi2()
Date: Tue, 19 Mar 2019 13:39:18 +0100	[thread overview]
Message-ID: <20190319123918.19267-6-daniel.kiper@oracle.com> (raw)
In-Reply-To: <20190319123918.19267-1-daniel.kiper@oracle.com>

This patch is similiar to commit e795b9011 (RISC-V: Add libgcc helpers
for clz) but for SPARC target.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/kern/compiler-rt.c | 4 ++--
 include/grub/compiler-rt.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c
index 33e08fe06..a464200c6 100644
--- a/grub-core/kern/compiler-rt.c
+++ b/grub-core/kern/compiler-rt.c
@@ -420,7 +420,7 @@ __aeabi_llsl (grub_uint64_t u, int b)
 
 #endif
 
-#if defined(__mips__) || defined(__riscv)
+#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
 /* Based on libgcc from gcc suite. */
 int
 __clzsi2 (grub_uint32_t val)
@@ -448,7 +448,7 @@ __clzsi2 (grub_uint32_t val)
 }
 #endif
 
-#ifdef __riscv
+#if defined(__riscv) || defined(__sparc__)
 int
 __clzdi2 (grub_uint64_t val)
 {
diff --git a/include/grub/compiler-rt.h b/include/grub/compiler-rt.h
index 31c0fd750..7591980b4 100644
--- a/include/grub/compiler-rt.h
+++ b/include/grub/compiler-rt.h
@@ -110,12 +110,12 @@ EXPORT_FUNC (__aeabi_llsr) (grub_uint64_t u, int b);
 
 #endif
 
-#if defined(__mips__) || defined(__riscv)
+#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
 int
 EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
 #endif
 
-#ifdef __riscv
+#if defined(__riscv) || defined(__sparc__)
 int
 EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
 #endif
-- 
2.11.0



  parent reply	other threads:[~2019-03-19 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
2019-03-19 12:39 ` [PATCH 1/5] verifiers: IA-64 fallout cleanup Daniel Kiper
2019-03-19 12:39 ` [PATCH 2/5] verifiers: PowerPC " Daniel Kiper
2019-03-19 12:39 ` [PATCH 3/5] verifiers: MIPS " Daniel Kiper
2019-03-19 12:39 ` [PATCH 4/5] mips: Enable __clzsi2() Daniel Kiper
2019-03-19 12:39 ` Daniel Kiper [this message]
2019-03-19 15:16 ` [PATCH 0/5] Various GRUB build fixes Ross Philipson
2019-03-20 12:02   ` Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190319123918.19267-6-daniel.kiper@oracle.com \
    --to=daniel.kiper@oracle.com \
    --cc=alexander.burmashev@oracle.com \
    --cc=eric.snowberg@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=leif.lindholm@linaro.org \
    --cc=phcoder@gmail.com \
    --cc=ross.philipson@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.