diff options
author | Chris Lattner <sabre@nondot.org> | 2011-03-10 22:11:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-03-10 22:11:46 +0000 |
commit | 15bc34c7c215ff05a8c51a679ea19cb28cd91d1a (patch) | |
tree | 7b3c4371d38f0023a03c10f81ed062293f6cdd26 /compiler-rt | |
parent | 339f7c3c5841bb3b534d5a504debf0ba2dd8b35b (diff) | |
download | bcm5719-llvm-15bc34c7c215ff05a8c51a679ea19cb28cd91d1a.tar.gz bcm5719-llvm-15bc34c7c215ff05a8c51a679ea19cb28cd91d1a.zip |
don't compile modsi3 into an infinite loop, patch by Matt Johnson!
llvm-svn: 127429
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/modsi3.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/modsi3.c b/compiler-rt/lib/modsi3.c index 388418a2a01..70d38a6b5d5 100644 --- a/compiler-rt/lib/modsi3.c +++ b/compiler-rt/lib/modsi3.c @@ -14,10 +14,12 @@ #include "int_lib.h" +su_int __divsi3(si_int a, si_int b); + /* Returns: a % b */ si_int __modsi3(si_int a, si_int b) { - return a - (a / b) * b; + return a - __divsi3(a, b) * b; } |