forked from OSchip/llvm-project
don't compile modsi3 into an infinite loop, patch by Matt Johnson!
llvm-svn: 127429
This commit is contained in:
parent
339f7c3c58
commit
15bc34c7c2
|
|
@ -14,10 +14,12 @@
|
||||||
|
|
||||||
#include "int_lib.h"
|
#include "int_lib.h"
|
||||||
|
|
||||||
|
su_int __divsi3(si_int a, si_int b);
|
||||||
|
|
||||||
/* Returns: a % b */
|
/* Returns: a % b */
|
||||||
|
|
||||||
si_int
|
si_int
|
||||||
__modsi3(si_int a, si_int b)
|
__modsi3(si_int a, si_int b)
|
||||||
{
|
{
|
||||||
return a - (a / b) * b;
|
return a - __divsi3(a, b) * b;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue