Author: tkreuzer
Date: Sat Jun 20 23:52:29 2009
New Revision: 41494
URL:
http://svn.reactos.org/svn/reactos?rev=41494&view=rev
Log:
Add back the stuff I accidentilly removed with the last sync
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] Sat
Jun 20 23:52:29 2009
@@ -74,6 +74,10 @@
#define _AddressOfReturnAddress() (&(((void **)(__builtin_frame_address(0)))[1]))
/* TODO: __getcallerseflags but how??? */
+/* Maybe the same for x86? */
+#ifdef _x86_64
+#define _alloca(s) __builtin_alloca(s)
+#endif
/*** Atomic operations ***/
@@ -970,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 ***/
__INTRIN_INLINE unsigned char __inbyte(const unsigned short Port)