Index: boot/genarch/src/division.c
===================================================================
--- boot/genarch/src/division.c	(revision 5a6a42f4d0f7e33bc079117b49c6e2ad4840ea1c)
+++ boot/genarch/src/division.c	(revision 44c1a48a86ef01c638eca0e96b94f3ccb68f8af7)
@@ -183,4 +183,18 @@
 }
 
+int __divmodsi3(int a, int b, int *c)
+{
+	unsigned int rem;
+	int result = (int) divandmod32(ABSVAL(a), ABSVAL(b), &rem);
+	
+	if (SGN(a) == SGN(b)) {
+		*c = rem;
+		return result;
+	}
+	
+	*c = -rem;
+	return -result;
+}
+
 unsigned int __udivmodsi3(unsigned int a, unsigned int b,
     unsigned int *c)
@@ -189,4 +203,18 @@
 }
 
+long long __divmoddi3(long long a, long long b, long long *c)
+{
+	unsigned long long rem;
+	long long result = (int) divandmod64(ABSVAL(a), ABSVAL(b), &rem);
+	
+	if (SGN(a) == SGN(b)) {
+		*c = rem;
+		return result;
+	}
+	
+	*c = -rem;
+	return -result;
+}
+
 unsigned long long __udivmoddi3(unsigned long long a, unsigned long long b,
     unsigned long long *c)
