Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision 973be38782462a672111ff6833f8dbb40d2a44bf)
+++ boot/Makefile.common	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -238,4 +238,5 @@
 	$(USPACE_PATH)/lib/label/test-liblabel \
 	$(USPACE_PATH)/lib/posix/test-libposix \
+	$(USPACE_PATH)/lib/softint/test-libsoftint \
 	$(USPACE_PATH)/lib/uri/test-liburi \
 	$(USPACE_PATH)/drv/bus/usb/xhci/test-xhci \
Index: uspace/lib/pcut/include/pcut/asserts.h
===================================================================
--- uspace/lib/pcut/include/pcut/asserts.h	(revision 973be38782462a672111ff6833f8dbb40d2a44bf)
+++ uspace/lib/pcut/include/pcut/asserts.h	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -186,8 +186,8 @@
 #define PCUT_ASSERT_INT_EQUALS(expected, actual) \
 	do {\
-		long pcut_expected_eval = (expected); \
-		long pcut_actual_eval = (actual); \
+		long long pcut_expected_eval = (expected); \
+		long long pcut_actual_eval = (actual); \
 		if (pcut_expected_eval != pcut_actual_eval) { \
-			PCUT_ASSERTION_FAILED("Expected <%ld> but got <%ld> (%s != %s)", \
+			PCUT_ASSERTION_FAILED("Expected <%lld> but got <%lld> (%s != %s)", \
 				pcut_expected_eval, pcut_actual_eval, \
 				#expected, #actual); \
Index: uspace/lib/softint/Makefile
===================================================================
--- uspace/lib/softint/Makefile	(revision 973be38782462a672111ff6833f8dbb40d2a44bf)
+++ uspace/lib/softint/Makefile	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -39,3 +39,7 @@
 	generic/shift.c
 
+TEST_SOURCES = \
+	test/main.c \
+	test/multiplication.c
+
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/softint/generic/multiplication.c
===================================================================
--- uspace/lib/softint/generic/multiplication.c	(revision 973be38782462a672111ff6833f8dbb40d2a44bf)
+++ uspace/lib/softint/generic/multiplication.c	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -64,8 +64,13 @@
 }
 
+long __muldi3(long a, long b)
+{
+	return (long) __multi3(a, b);
+}
+
 /** Emulate multiplication of two 64-bit long long integers.
  *
  */
-long long __muldi3 (long long a, long long b)
+long long __multi3(long long a, long long b)
 {
 	char neg = 0;
Index: uspace/lib/softint/include/multiplication.h
===================================================================
--- uspace/lib/softint/include/multiplication.h	(revision 973be38782462a672111ff6833f8dbb40d2a44bf)
+++ uspace/lib/softint/include/multiplication.h	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -37,6 +37,8 @@
 #define __SOFTINT_MULTIPLICATION_H__
 
+extern long __muldi3(long, long);
+
 /* 64 bit multiplication */
-extern long long __muldi3(long long, long long);
+extern long long __multi3(long long, long long);
 
 #endif
Index: uspace/lib/softint/test/main.c
===================================================================
--- uspace/lib/softint/test/main.c	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
+++ uspace/lib/softint/test/main.c	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2014 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdio.h>
+#include <pcut/pcut.h>
+
+PCUT_INIT
+
+PCUT_IMPORT(multiplication);
+
+PCUT_MAIN()
Index: uspace/lib/softint/test/multiplication.c
===================================================================
--- uspace/lib/softint/test/multiplication.c	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
+++ uspace/lib/softint/test/multiplication.c	(revision a24df004f2a83bc8ec1353f6f2d9387f175d71cf)
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2018 Jakub Jermar
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <multiplication.h>
+#include <pcut/pcut.h>
+
+PCUT_INIT
+
+PCUT_TEST_SUITE(multiplication);
+
+PCUT_TEST(__muldi3) {
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(0L, 0L));
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(0L, 1L));
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(0L, -1L));
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(1L, 0L));
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(-1L, 0L));
+
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(0x45600000L, 0L));
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(-0x45600000L, 0L));
+	PCUT_ASSERT_INT_EQUALS(0L, __muldi3(0x0L, -0x45600000L));
+
+	PCUT_ASSERT_INT_EQUALS(1L, __muldi3(1L, 1L));
+	PCUT_ASSERT_INT_EQUALS(-1L, __muldi3(1L, -1L));
+	PCUT_ASSERT_INT_EQUALS(-1L, __muldi3(-1L, 1L));
+	PCUT_ASSERT_INT_EQUALS(1L, __muldi3(-1L, -1L));
+
+	PCUT_ASSERT_INT_EQUALS(0x45600000L, __muldi3(0x45600000L, 1L));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000L, __muldi3(-0x45600000L, 1L));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000L, __muldi3(0x45600000L, -1L));
+	PCUT_ASSERT_INT_EQUALS(0x45600000L, __muldi3(-0x45600000L, -1L));
+	PCUT_ASSERT_INT_EQUALS(0x45600000L, __muldi3(1L, 0x45600000L));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000L, __muldi3(-1L, 0x45600000L));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000L, __muldi3(1L, -0x45600000L));
+	PCUT_ASSERT_INT_EQUALS(0x45600000L, __muldi3(-1L, -0x45600000L));
+
+	PCUT_ASSERT_INT_EQUALS(0x6260060L, __muldi3(0x1234, 0x5678));
+	PCUT_ASSERT_INT_EQUALS(-0x6260060L, __muldi3(-0x1234, 0x5678));
+	PCUT_ASSERT_INT_EQUALS(-0x6260060L, __muldi3(0x1234, -0x5678));
+	PCUT_ASSERT_INT_EQUALS(0x6260060L, __muldi3(-0x1234, -0x5678));
+	PCUT_ASSERT_INT_EQUALS(0x6260060L, __muldi3(0x5678, 0x1234));
+	PCUT_ASSERT_INT_EQUALS(-0x6260060L, __muldi3(-0x5678, 0x1234));
+	PCUT_ASSERT_INT_EQUALS(-0x6260060L, __muldi3(0x5678, -0x1234));
+	PCUT_ASSERT_INT_EQUALS(0x6260060L, __muldi3(-0x5678, -0x1234));
+}
+
+PCUT_TEST(__multi3) {
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0LL, 0LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0LL, -1LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(1LL, 0LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(-1LL, 0LL));
+
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0x45600000LL, 0LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(-0x45600000LL, 0LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0x0LL, -0x45600000LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0x12300000000LL, 0LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(-0x12300000000LL, 0LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0LL, 0x12300000000LL));
+	PCUT_ASSERT_INT_EQUALS(0LL, __multi3(0LL, -0x12300000000LL));
+
+	PCUT_ASSERT_INT_EQUALS(1LL, __multi3(1LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(-1LL, __multi3(1LL, -1LL));
+	PCUT_ASSERT_INT_EQUALS(-1LL, __multi3(-1LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(1LL, __multi3(-1LL, -1LL));
+
+	PCUT_ASSERT_INT_EQUALS(0x45600000LL, __multi3(0x45600000LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000LL, __multi3(-0x45600000LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000LL, __multi3(0x45600000LL, -1LL));
+	PCUT_ASSERT_INT_EQUALS(0x45600000LL, __multi3(-0x45600000LL, -1LL));
+	PCUT_ASSERT_INT_EQUALS(0x45600000LL, __multi3(1LL, 0x45600000LL));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000LL, __multi3(-1LL, 0x45600000LL));
+	PCUT_ASSERT_INT_EQUALS(-0x45600000LL, __multi3(1LL, -0x45600000LL));
+	PCUT_ASSERT_INT_EQUALS(0x45600000LL, __multi3(-1LL, -0x45600000LL));
+
+	PCUT_ASSERT_INT_EQUALS(0x12300000000LL, __multi3(0x12300000000LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(-0x12300000000LL,
+	    __multi3(-0x12300000000LL, 1LL));
+	PCUT_ASSERT_INT_EQUALS(-0x12300000000LL,
+	    __multi3(0x12300000000LL, -1LL));
+	PCUT_ASSERT_INT_EQUALS(0x12300000000LL,
+	    __multi3(-0x12300000000LL, -1LL));
+	PCUT_ASSERT_INT_EQUALS(0x12300000000LL,
+	    __multi3(1LL, 0x12300000000LL));
+	PCUT_ASSERT_INT_EQUALS(-0x12300000000LL,
+	    __multi3(-1LL, 0x12300000000LL));
+	PCUT_ASSERT_INT_EQUALS(-0x12300000000LL,
+	    __multi3(1LL, -0x12300000000LL));
+	PCUT_ASSERT_INT_EQUALS(0x12300000000LL,
+	    __multi3(-1LL, -0x12300000000LL));
+
+	PCUT_ASSERT_INT_EQUALS(0x3100000000000000LL,
+	    __multi3(0x70000000LL, 0x70000000LL));
+	PCUT_ASSERT_INT_EQUALS(-0x3100000000000000LL,
+	    __multi3(-0x70000000LL, 0x70000000LL));
+	PCUT_ASSERT_INT_EQUALS(-0x3100000000000000LL,
+	    __multi3(0x70000000LL, -0x70000000LL));
+	PCUT_ASSERT_INT_EQUALS(0x3100000000000000LL,
+	    __multi3(-0x70000000LL, -0x70000000LL));
+
+	PCUT_ASSERT_INT_EQUALS(0x3FFFFFFF00000001LL,
+	    __multi3(0x7FFFFFFFLL, 0x7FFFFFFFLL));
+	PCUT_ASSERT_INT_EQUALS(-0x3FFFFFFF00000001LL,
+	    __multi3(-0x7FFFFFFFLL, 0x7FFFFFFFLL));
+	PCUT_ASSERT_INT_EQUALS(-0x3FFFFFFF00000001LL,
+	    __multi3(0x7FFFFFFFLL, -0x7FFFFFFFLL));
+	PCUT_ASSERT_INT_EQUALS(0x3FFFFFFF00000001LL,
+	    __multi3(-0x7FFFFFFFLL, -0x7FFFFFFFLL));
+
+	PCUT_ASSERT_INT_EQUALS(0x7FFFFFFF00000000LL,
+	    __multi3(0x100000000LL, 0x7FFFFFFFLL));
+	PCUT_ASSERT_INT_EQUALS(-0x7FFFFFFF00000000LL,
+	    __multi3(-0x100000000LL, 0x7FFFFFFFLL));
+	PCUT_ASSERT_INT_EQUALS(-0x7FFFFFFF00000000LL,
+	    __multi3(0x100000000LL, -0x7FFFFFFFLL));
+	PCUT_ASSERT_INT_EQUALS(0x7FFFFFFF00000000LL,
+	    __multi3(-0x100000000LL, -0x7FFFFFFFLL));
+}
+
+PCUT_EXPORT(multiplication);
