[compiler-rt] r201909 - Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.

Hal Finkel hfinkel at anl.gov
Sun May 11 09:36:31 PDT 2014


----- Original Message -----
> From: "Joerg Sonnenberger" <joerg at bec.de>
> To: llvm-commits at cs.uiuc.edu
> Sent: Friday, February 21, 2014 5:53:04 PM
> Subject: [compiler-rt] r201909 - Introduce CRT_HAS_128BIT,	currently for all __LP64__ platforms.
> 
> Author: joerg
> Date: Fri Feb 21 17:53:03 2014
> New Revision: 201909
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=201909&view=rev
> Log:
> Introduce CRT_HAS_128BIT, currently for all __LP64__ platforms.
> Use it to enable the various functions for TI mode.

It seems that the logic behind this may not quite be right. On PPC32, for example, __int128 is not supported, but SROA can (and does) still form i128 variables at the IR level, and operations on those variables may turn into the associated runtime calls. As a result, we still need to compile __ashlti3, __ashrti3, __lshrti3, and perhaps others, on PPC32 (which is not __LP64__); I don't know about other platforms.

 -Hal

> 
> Modified:
>     compiler-rt/trunk/lib/builtins/absvti2.c
>     compiler-rt/trunk/lib/builtins/addvti3.c
>     compiler-rt/trunk/lib/builtins/ashlti3.c
>     compiler-rt/trunk/lib/builtins/ashrti3.c
>     compiler-rt/trunk/lib/builtins/clzti2.c
>     compiler-rt/trunk/lib/builtins/cmpti2.c
>     compiler-rt/trunk/lib/builtins/ctzti2.c
>     compiler-rt/trunk/lib/builtins/divti3.c
>     compiler-rt/trunk/lib/builtins/ffsti2.c
>     compiler-rt/trunk/lib/builtins/fixdfti.c
>     compiler-rt/trunk/lib/builtins/fixsfti.c
>     compiler-rt/trunk/lib/builtins/fixunsdfti.c
>     compiler-rt/trunk/lib/builtins/fixunssfti.c
>     compiler-rt/trunk/lib/builtins/fixunsxfti.c
>     compiler-rt/trunk/lib/builtins/fixxfti.c
>     compiler-rt/trunk/lib/builtins/floattidf.c
>     compiler-rt/trunk/lib/builtins/floattisf.c
>     compiler-rt/trunk/lib/builtins/floattixf.c
>     compiler-rt/trunk/lib/builtins/floatuntidf.c
>     compiler-rt/trunk/lib/builtins/floatuntisf.c
>     compiler-rt/trunk/lib/builtins/floatuntixf.c
>     compiler-rt/trunk/lib/builtins/int_types.h
>     compiler-rt/trunk/lib/builtins/lshrti3.c
>     compiler-rt/trunk/lib/builtins/modti3.c
>     compiler-rt/trunk/lib/builtins/muloti4.c
>     compiler-rt/trunk/lib/builtins/multi3.c
>     compiler-rt/trunk/lib/builtins/mulvti3.c
>     compiler-rt/trunk/lib/builtins/negti2.c
>     compiler-rt/trunk/lib/builtins/negvti2.c
>     compiler-rt/trunk/lib/builtins/parityti2.c
>     compiler-rt/trunk/lib/builtins/popcountti2.c
>     compiler-rt/trunk/lib/builtins/subvti3.c
>     compiler-rt/trunk/lib/builtins/ucmpti2.c
>     compiler-rt/trunk/lib/builtins/udivmodti4.c
>     compiler-rt/trunk/lib/builtins/udivti3.c
>     compiler-rt/trunk/lib/builtins/umodti3.c
> 
> Modified: compiler-rt/trunk/lib/builtins/absvti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/absvti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/absvti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/absvti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: absolute value */
>  
> @@ -30,4 +30,5 @@ __absvti2(ti_int a)
>      return (a ^ s) - s;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> +
> 
> Modified: compiler-rt/trunk/lib/builtins/addvti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/addvti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/addvti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/addvti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: a + b */
>  
> @@ -37,4 +37,4 @@ __addvti3(ti_int a, ti_int b)
>      return s;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/ashlti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ashlti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/ashlti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/ashlti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: a << b */
>  
> @@ -42,4 +42,4 @@ __ashlti3(ti_int a, si_int b)
>      return result.all;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/ashrti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ashrti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/ashrti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/ashrti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: arithmetic a >> b */
>  
> @@ -43,4 +43,4 @@ __ashrti3(ti_int a, si_int b)
>      return result.all;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/clzti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/clzti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/clzti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/clzti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: the number of leading 0-bits */
>  
> @@ -30,4 +30,4 @@ __clzti2(ti_int a)
>             ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/cmpti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/cmpti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/cmpti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/cmpti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns:  if (a <  b) returns 0
>   *           if (a == b) returns 1
> @@ -39,4 +39,4 @@ __cmpti2(ti_int a, ti_int b)
>      return 1;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/ctzti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ctzti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/ctzti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/ctzti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: the number of trailing 0-bits */
>  
> @@ -30,4 +30,4 @@ __ctzti2(ti_int a)
>                ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/divti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/divti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/divti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/divti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
>  
> @@ -32,4 +32,4 @@ __divti3(ti_int a, ti_int b)
>      return (__udivmodti4(a, b, (tu_int*)0) ^ s_a) - s_a;  /* negate
>      if s_a == -1 */
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/ffsti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ffsti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/ffsti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/ffsti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: the index of the least significant 1-bit in a, or
>   * the value zero if a is zero. The least significant bit is index
>   one.
> @@ -34,4 +34,4 @@ __ffsti2(ti_int a)
>      return __builtin_ctzll(x.s.low) + 1;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/fixdfti.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fixdfti.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/fixdfti.c (original)
> +++ compiler-rt/trunk/lib/builtins/fixdfti.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a signed long long, rounding toward zero.
>  */
>  
> @@ -42,4 +42,4 @@ __fixdfti(double a)
>      return (r ^ s) - s;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/fixsfti.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fixsfti.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/fixsfti.c (original)
> +++ compiler-rt/trunk/lib/builtins/fixsfti.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a signed long long, rounding toward zero.
>  */
>  
> @@ -42,4 +42,4 @@ __fixsfti(float a)
>      return (r ^ s) - s;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/fixunsdfti.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fixunsdfti.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/fixunsdfti.c (original)
> +++ compiler-rt/trunk/lib/builtins/fixunsdfti.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a unsigned long long, rounding toward zero.
>   *          Negative values all become zero.
> @@ -44,4 +44,4 @@ __fixunsdfti(double a)
>      return r;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/fixunssfti.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fixunssfti.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/fixunssfti.c (original)
> +++ compiler-rt/trunk/lib/builtins/fixunssfti.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a unsigned long long, rounding toward zero.
>   *          Negative values all become zero.
> @@ -44,4 +44,4 @@ __fixunssfti(float a)
>      return r;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/fixunsxfti.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fixunsxfti.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/fixunsxfti.c (original)
> +++ compiler-rt/trunk/lib/builtins/fixunsxfti.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a unsigned long long, rounding toward zero.
>   *          Negative values all become zero.
> @@ -46,4 +46,4 @@ __fixunsxfti(long double a)
>      return r;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/fixxfti.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/fixxfti.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/fixxfti.c (original)
> +++ compiler-rt/trunk/lib/builtins/fixxfti.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a signed long long, rounding toward zero.
>  */
>  
> @@ -44,4 +44,4 @@ __fixxfti(long double a)
>      return (r ^ s) - s;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/floattidf.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/floattidf.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/floattidf.c (original)
> +++ compiler-rt/trunk/lib/builtins/floattidf.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a double, rounding toward even.*/
>  
> @@ -82,4 +82,4 @@ __floattidf(ti_int a)
>      return fb.f;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/floattisf.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/floattisf.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/floattisf.c (original)
> +++ compiler-rt/trunk/lib/builtins/floattisf.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a float, rounding toward even. */
>  
> @@ -81,4 +81,4 @@ __floattisf(ti_int a)
>      return fb.f;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/floattixf.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/floattixf.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/floattixf.c (original)
> +++ compiler-rt/trunk/lib/builtins/floattixf.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a long double, rounding toward even. */
>  
> @@ -47,7 +47,7 @@ __floattixf(ti_int a)
>           *  P = bit LDBL_MANT_DIG-1 bits to the right of 1
>           *  Q = bit LDBL_MANT_DIG bits to the right of 1
>           *  R = "or" of all bits to the right of Q
> -	      */
> +         */
>          switch (sd)
>          {
>          case LDBL_MANT_DIG + 1:
> @@ -83,4 +83,4 @@ __floattixf(ti_int a)
>      return fb.f;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/floatuntidf.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/floatuntidf.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/floatuntidf.c (original)
> +++ compiler-rt/trunk/lib/builtins/floatuntidf.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a double, rounding toward even. */
>  
> @@ -43,7 +43,7 @@ __floatuntidf(tu_int a)
>           *  P = bit DBL_MANT_DIG-1 bits to the right of 1
>           *  Q = bit DBL_MANT_DIG bits to the right of 1
>           *  R = "or" of all bits to the right of Q
> -	 */
> +         */
>          switch (sd)
>          {
>          case DBL_MANT_DIG + 1:
> @@ -79,4 +79,4 @@ __floatuntidf(tu_int a)
>      return fb.f;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/floatuntisf.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/floatuntisf.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/floatuntisf.c (original)
> +++ compiler-rt/trunk/lib/builtins/floatuntisf.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a float, rounding toward even. */
>  
> @@ -78,4 +78,4 @@ __floatuntisf(tu_int a)
>      return fb.f;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/floatuntixf.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/floatuntixf.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/floatuntixf.c (original)
> +++ compiler-rt/trunk/lib/builtins/floatuntixf.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: convert a to a long double, rounding toward even. */
>  
> 
> Modified: compiler-rt/trunk/lib/builtins/int_types.h
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/int_types.h?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/int_types.h (original)
> +++ compiler-rt/trunk/lib/builtins/int_types.h Fri Feb 21 17:53:03
> 2014
> @@ -56,8 +56,11 @@ typedef union
>      }s;
>  } udwords;
>  
> -#if __x86_64
> +#if __LP64__
> +#define CRT_HAS_128BIT
> +#endif
>  
> +#ifdef CRT_HAS_128BIT
>  typedef int      ti_int __attribute__ ((mode (TI)));
>  typedef unsigned tu_int __attribute__ ((mode (TI)));
>  
> @@ -105,7 +108,7 @@ static inline tu_int make_tu(du_int h, d
>      return r.all;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
>  
>  typedef union
>  {
> 
> Modified: compiler-rt/trunk/lib/builtins/lshrti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/lshrti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/lshrti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/lshrti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: logical a >> b */
>  
> @@ -42,4 +42,4 @@ __lshrti3(ti_int a, si_int b)
>      return result.all;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/modti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/modti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/modti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/modti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
>  
> @@ -33,4 +33,4 @@ __modti3(ti_int a, ti_int b)
>      return (r ^ s) - s;                /* negate if s == -1 */
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/muloti4.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/muloti4.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/muloti4.c (original)
> +++ compiler-rt/trunk/lib/builtins/muloti4.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: a * b */
>  
> @@ -59,4 +59,4 @@ __muloti4(ti_int a, ti_int b, int* overf
>      return result;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/multi3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/multi3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/multi3.c (original)
> +++ compiler-rt/trunk/lib/builtins/multi3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: a * b */
>  
> @@ -55,4 +55,4 @@ __multi3(ti_int a, ti_int b)
>      return r.all;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/mulvti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/mulvti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/mulvti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/mulvti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: a * b */
>  
> @@ -57,4 +57,4 @@ __mulvti3(ti_int a, ti_int b)
>      return a * b;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/negti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/negti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/negti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/negti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: -a */
>  
> @@ -27,4 +27,4 @@ __negti2(ti_int a)
>      return -a;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/negvti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/negvti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/negvti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/negvti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: -a */
>  
> @@ -29,4 +29,4 @@ __negvti2(ti_int a)
>      return -a;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/parityti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/parityti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/parityti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/parityti2.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: 1 if number of bits is odd else returns 0 */
>  
> @@ -28,4 +28,4 @@ __parityti2(ti_int a)
>      return __paritydi2(x.s.high ^ x.s.low);
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/popcountti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/popcountti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/popcountti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/popcountti2.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: count of 1 bits */
>  
> @@ -41,4 +41,4 @@ __popcountti2(ti_int a)
>      return (x + (x >> 8)) & 0xFF;  /* (8 significant bits) */
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/subvti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/subvti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/subvti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/subvti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns: a - b */
>  
> @@ -37,4 +37,4 @@ __subvti3(ti_int a, ti_int b)
>      return s;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/ucmpti2.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/ucmpti2.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/ucmpti2.c (original)
> +++ compiler-rt/trunk/lib/builtins/ucmpti2.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Returns:  if (a <  b) returns 0
>   *           if (a == b) returns 1
> @@ -39,4 +39,4 @@ __ucmpti2(tu_int a, tu_int b)
>      return 1;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/udivmodti4.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/udivmodti4.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/udivmodti4.c (original)
> +++ compiler-rt/trunk/lib/builtins/udivmodti4.c Fri Feb 21 17:53:03
> 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  /* Effects: if rem != 0, *rem = a % b
>   * Returns: a / b
> @@ -253,4 +253,4 @@ __udivmodti4(tu_int a, tu_int b, tu_int*
>      return q.all;
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/udivti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/udivti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/udivti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/udivti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
>  
> @@ -26,4 +26,4 @@ __udivti3(tu_int a, tu_int b)
>      return __udivmodti4(a, b, 0);
>  }
>  
> -#endif /* __x86_64 */
> +#endif /* CRT_HAS_128BIT */
> 
> Modified: compiler-rt/trunk/lib/builtins/umodti3.c
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/umodti3.c?rev=201909&r1=201908&r2=201909&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/builtins/umodti3.c (original)
> +++ compiler-rt/trunk/lib/builtins/umodti3.c Fri Feb 21 17:53:03 2014
> @@ -14,7 +14,7 @@
>  
>  #include "int_lib.h"
>  
> -#if __x86_64
> +#ifdef CRT_HAS_128BIT
>  
>  tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
>  
> @@ -28,4 +28,4 @@ __umodti3(tu_int a, tu_int b)
>      return r;
>  }
>  
> -#endif
> +#endif /* CRT_HAS_128BIT */
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list