klib,int64: fix dead recursion for riscv64-mycpu
* symbols inside int64.c are local to __udivmoddi4
This commit is contained in:
parent
96f2923137
commit
3364f57d0b
1 changed files with 12 additions and 10 deletions
|
@ -363,6 +363,7 @@ uint32_t __inline __builtin_clzll(uint64_t value) {
|
||||||
|
|
||||||
#include <am.h>
|
#include <am.h>
|
||||||
|
|
||||||
|
#if !defined(__riscv) || defined(__riscv_m)
|
||||||
/* Returns: a / b */
|
/* Returns: a / b */
|
||||||
|
|
||||||
COMPILER_RT_ABI di_int
|
COMPILER_RT_ABI di_int
|
||||||
|
@ -410,6 +411,17 @@ __udivdi3(du_int a, du_int b)
|
||||||
return __udivmoddi4(a, b, 0);
|
return __udivmoddi4(a, b, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns: a % b */
|
||||||
|
|
||||||
|
COMPILER_RT_ABI du_int
|
||||||
|
__umoddi3(du_int a, du_int b)
|
||||||
|
{
|
||||||
|
du_int r;
|
||||||
|
__udivmoddi4(a, b, &r);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
COMPILER_RT_ABI du_int
|
COMPILER_RT_ABI du_int
|
||||||
__udivmoddi4(du_int a, du_int b, du_int* rem)
|
__udivmoddi4(du_int a, du_int b, du_int* rem)
|
||||||
|
@ -621,16 +633,6 @@ __udivmoddi4(du_int a, du_int b, du_int* rem)
|
||||||
return q.all;
|
return q.all;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns: a % b */
|
|
||||||
|
|
||||||
COMPILER_RT_ABI du_int
|
|
||||||
__umoddi3(du_int a, du_int b)
|
|
||||||
{
|
|
||||||
du_int r;
|
|
||||||
__udivmoddi4(a, b, &r);
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns: the number of leading 0-bits
|
// Returns: the number of leading 0-bits
|
||||||
|
|
||||||
// Precondition: a != 0
|
// Precondition: a != 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue