mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
implement __mulh and __umulh
svn path=/branches/ros-amd64-bringup/; revision=40088
This commit is contained in:
@@ -974,6 +974,23 @@ static __inline__ __attribute__((always_inline)) unsigned long long __emulu(cons
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user