r250301 - Intrin.h: implement __emul and __emulu

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 14 09:24:29 PDT 2015


Author: hans
Date: Wed Oct 14 11:24:28 2015
New Revision: 250301

URL: http://llvm.org/viewvc/llvm-project?rev=250301&view=rev
Log:
Intrin.h: implement __emul and __emulu

Modified:
    cfe/trunk/lib/Headers/Intrin.h

Modified: cfe/trunk/lib/Headers/Intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=250301&r1=250300&r2=250301&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/Intrin.h (original)
+++ cfe/trunk/lib/Headers/Intrin.h Wed Oct 14 11:24:28 2015
@@ -432,6 +432,17 @@ __umulh(unsigned __int64 _Multiplier, un
 #endif /* __x86_64__ */
 
 /*----------------------------------------------------------------------------*\
+|* Multiplication
+\*----------------------------------------------------------------------------*/
+static __inline__ __int64 __DEFAULT_FN_ATTRS
+__emul(int __in1, int __in2) {
+  return (__int64)__in1 * (__int64)__in2;
+}
+static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
+__emulu(unsigned int __in1, unsigned int __in2) {
+  return (unsigned __int64)__in1 * (unsigned __int64)__in2;
+}
+/*----------------------------------------------------------------------------*\
 |* Bit Twiddling
 \*----------------------------------------------------------------------------*/
 static __inline__ unsigned char __DEFAULT_FN_ATTRS




More information about the cfe-commits mailing list