summaryrefslogtreecommitdiffstats
path: root/lib/modsi3.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-03-17 19:47:28 +0000
committered <ed@FreeBSD.org>2011-03-17 19:47:28 +0000
commitcbbb7af7461cc897920c5924c6bdc1fe3b86a7e5 (patch)
tree875c98489b0419eb321390a6093da33c5116f79a /lib/modsi3.c
parent653bb6745595746d04ad4acacaaab66caaaeb69b (diff)
downloadFreeBSD-src-cbbb7af7461cc897920c5924c6bdc1fe3b86a7e5.zip
FreeBSD-src-cbbb7af7461cc897920c5924c6bdc1fe3b86a7e5.tar.gz
Import compiler-rt r127823.
Changes: - License change; now it's also dual licensed under the MIT licence. - Addition of divmodsi4 and udivmodsi4.
Diffstat (limited to 'lib/modsi3.c')
-rw-r--r--lib/modsi3.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/modsi3.c b/lib/modsi3.c
index c9214a2..70d38a6 100644
--- a/lib/modsi3.c
+++ b/lib/modsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -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;
}
OpenPOWER on IntegriCloud