Author: tkreuzer
Date: Wed Mar 18 19:17:53 2009
New Revision: 40088
URL:
http://svn.reactos.org/svn/reactos?rev=40088&view=rev
Log:
implement __mulh and __umulh
Modified:
branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h
Modified: branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Wed
Mar 18 19:17:53 2009
@@ -974,6 +974,23 @@
return retval;
}
+#ifdef _M_AMD64
+
+static __inline__ __attribute__((always_inline)) __int64 __mulh(__int64 a, __int64 b)
+{
+ __int64 retval;
+ __asm__("imulq %[b]" : "=d" (retval) : [a] "a" (a), [b]
"rm" (b));
+ return retval;
+}
+
+static __inline__ __attribute__((always_inline)) unsigned __int64 __umulh(unsigned
__int64 a, unsigned __int64 b)
+{
+ unsigned __int64 retval;
+ __asm__("mulq %[b]" : "=d" (retval) : [a] "a" (a), [b]
"rm" (b));
+ return retval;
+}
+
+#endif
/*** Port I/O ***/
static __inline__ __attribute__((always_inline)) unsigned char __inbyte(const unsigned
short Port)