Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision e6d670fd4926748dbee919b7e1014dcb33cb1748)
+++ boot/Makefile.common	(revision c6a17685590f909689510889f37768281dff86e6)
@@ -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/softint/Makefile
===================================================================
--- uspace/lib/softint/Makefile	(revision e6d670fd4926748dbee919b7e1014dcb33cb1748)
+++ uspace/lib/softint/Makefile	(revision c6a17685590f909689510889f37768281dff86e6)
@@ -39,3 +39,7 @@
 	generic/shift.c
 
+TEST_SOURCES = \
+	test/main.c \
+	test/multiplication.c
+
 include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/softint/test/main.c
===================================================================
--- uspace/lib/softint/test/main.c	(revision c6a17685590f909689510889f37768281dff86e6)
+++ uspace/lib/softint/test/main.c	(revision c6a17685590f909689510889f37768281dff86e6)
@@ -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 c6a17685590f909689510889f37768281dff86e6)
+++ uspace/lib/softint/test/multiplication.c	(revision c6a17685590f909689510889f37768281dff86e6)
@@ -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);
