<rdar://problem/8914924> implement udivmodsi4 and divmodsi4 for ARM

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@127778 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/divmodsi4.c b/lib/divmodsi4.c
new file mode 100644
index 0000000..2ec3dd4
--- /dev/null
+++ b/lib/divmodsi4.c
@@ -0,0 +1,30 @@
+/*===-- divmodsi4.c - Implement __divmodsi4 --------------------------------===
+ *
+ *                    The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __divmodsi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#include "int_lib.h"
+
+extern si_int __divsi3(si_int a, si_int b);
+
+
+/* Returns: a / b, *rem = a % b  */
+
+si_int
+__divmodsi4(si_int a, si_int b, si_int* rem)
+{
+  si_int d = __divsi3(a,b);
+  *rem = a - (d*b);
+  return d; 
+}
+
+