sparc: Enable __clzsi2() and __clzdi2()
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>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
This commit is contained in:
parent
9c4c933f05
commit
d422df6711
2 changed files with 4 additions and 4 deletions
|
@ -420,7 +420,7 @@ __aeabi_llsl (grub_uint64_t u, int b)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__mips__) || defined(__riscv)
|
#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
|
||||||
/* Based on libgcc from gcc suite. */
|
/* Based on libgcc from gcc suite. */
|
||||||
int
|
int
|
||||||
__clzsi2 (grub_uint32_t val)
|
__clzsi2 (grub_uint32_t val)
|
||||||
|
@ -448,7 +448,7 @@ __clzsi2 (grub_uint32_t val)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __riscv
|
#if defined(__riscv) || defined(__sparc__)
|
||||||
int
|
int
|
||||||
__clzdi2 (grub_uint64_t val)
|
__clzdi2 (grub_uint64_t val)
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,12 +110,12 @@ EXPORT_FUNC (__aeabi_llsr) (grub_uint64_t u, int b);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__mips__) || defined(__riscv)
|
#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
|
||||||
int
|
int
|
||||||
EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
|
EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __riscv
|
#if defined(__riscv) || defined(__sparc__)
|
||||||
int
|
int
|
||||||
EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
|
EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue