Merge from amd64 branch:
[reactos.git] / reactos / include / crt / mingw32 / intrin_x86.h
index bab8e96..84c1e66 100644 (file)
@@ -968,6 +968,23 @@ __INTRIN_INLINE unsigned long long __emulu(const unsigned int a, const unsigned
        return retval;
 }
 
+#ifdef _M_AMD64
+
+__INTRIN_INLINE __int64 __mulh(__int64 a, __int64 b)
+{
+       __int64 retval;
+       __asm__("imulq %[b]" : "=d" (retval) : [a] "a" (a), [b] "rm" (b));
+       return retval;
+}
+
+__INTRIN_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 ***/
 __INTRIN_INLINE unsigned char __inbyte(const unsigned short Port)