Index: kernel/genarch/include/softint/division.h
===================================================================
--- kernel/genarch/include/softint/division.h	(revision 8e893aeb5653f1350d4daa8ac443ec24ef6449cd)
+++ kernel/genarch/include/softint/division.h	(revision 44c1a48a86ef01c638eca0e96b94f3ccb68f8af7)
@@ -48,5 +48,8 @@
 extern unsigned long long __umoddi3(unsigned long long, unsigned long long);
 
+extern int __divmodsi3(int, int, int *);
 extern unsigned int __udivmodsi3(unsigned int, unsigned int, unsigned int *);
+
+extern long long __divmoddi3(long long, long long, long long *);
 extern unsigned long long __udivmoddi3(unsigned long long, unsigned long long,
     unsigned long long *);
Index: kernel/genarch/include/softint/multiplication.h
===================================================================
--- kernel/genarch/include/softint/multiplication.h	(revision 8e893aeb5653f1350d4daa8ac443ec24ef6449cd)
+++ kernel/genarch/include/softint/multiplication.h	(revision 44c1a48a86ef01c638eca0e96b94f3ccb68f8af7)
@@ -29,14 +29,14 @@
 /** @addtogroup genarch
  * @{
- */ 
+ */
 /**
  * @file
  */
 
-#ifndef __SOFTINT_MULTIPLICATION_H__
-#define __SOFTINT_MULTIPLICATION_H__
+#ifndef KERN_MULTIPLICATION_H_
+#define KERN_MULTIPLICATION_H_
 
 /* 64 bit multiplication */
-long long __muldi3(long long a, long long b);
+extern long long __muldi3(long long, long long);
 
 #endif
@@ -44,4 +44,2 @@
 /** @}
  */
-
-
Index: kernel/genarch/src/softint/division.c
===================================================================
--- kernel/genarch/src/softint/division.c	(revision 8e893aeb5653f1350d4daa8ac443ec24ef6449cd)
+++ kernel/genarch/src/softint/division.c	(revision 44c1a48a86ef01c638eca0e96b94f3ccb68f8af7)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genarch	
+/** @addtogroup genarch
  * @{
  */
@@ -186,4 +186,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)
@@ -192,4 +206,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)
Index: kernel/genarch/src/softint/multiplication.c
===================================================================
--- kernel/genarch/src/softint/multiplication.c	(revision 8e893aeb5653f1350d4daa8ac443ec24ef6449cd)
+++ kernel/genarch/src/softint/multiplication.c	(revision 44c1a48a86ef01c638eca0e96b94f3ccb68f8af7)
@@ -29,5 +29,5 @@
 /** @addtogroup genarch
  * @{
- */ 
+ */
 /**
  * @file
@@ -130,5 +130,5 @@
 
 	return result;
-}	
+}
 
 /** @}
