mips: Enable __clzsi2()
This patch is similiar to commit e795b9011
(RISC-V: Add libgcc helpers
for clz) but for MIPS target.
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
This commit is contained in:
parent
c7bdb8273c
commit
e42b0d97ec
2 changed files with 6 additions and 3 deletions
|
@ -420,8 +420,7 @@ __aeabi_llsl (grub_uint64_t u, int b)
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef __riscv
|
||||
|
||||
#if defined(__mips__) || defined(__riscv)
|
||||
/* Based on libgcc from gcc suite. */
|
||||
int
|
||||
__clzsi2 (grub_uint32_t val)
|
||||
|
@ -447,7 +446,9 @@ __clzsi2 (grub_uint32_t val)
|
|||
}
|
||||
return (i - val);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __riscv
|
||||
int
|
||||
__clzdi2 (grub_uint64_t val)
|
||||
{
|
||||
|
|
|
@ -110,10 +110,12 @@ EXPORT_FUNC (__aeabi_llsr) (grub_uint64_t u, int b);
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef __riscv
|
||||
#if defined(__mips__) || defined(__riscv)
|
||||
int
|
||||
EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
|
||||
#endif
|
||||
|
||||
#ifdef __riscv
|
||||
int
|
||||
EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue