diff options
Diffstat (limited to 'renderscript/clang-include/bmi2intrin.h')
-rw-r--r-- | renderscript/clang-include/bmi2intrin.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/renderscript/clang-include/bmi2intrin.h b/renderscript/clang-include/bmi2intrin.h index c60b0c4..a05cfad 100644 --- a/renderscript/clang-include/bmi2intrin.h +++ b/renderscript/clang-include/bmi2intrin.h @@ -70,6 +70,25 @@ _pext_u64(unsigned long long __X, unsigned long long __Y) return __builtin_ia32_pext_di(__X, __Y); } +static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__)) +_mulx_u64 (unsigned long long __X, unsigned long long __Y, + unsigned long long *__P) +{ + unsigned __int128 __res = (unsigned __int128) __X * __Y; + *__P = (unsigned long long) (__res >> 64); + return (unsigned long long) __res; +} + +#else /* !__x86_64__ */ + +static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__)) +_mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P) +{ + unsigned long long __res = (unsigned long long) __X * __Y; + *__P = (unsigned int) (__res >> 32); + return (unsigned int) __res; +} + #endif /* !__x86_64__ */ #endif /* __BMI2INTRIN_H */ |