r245929 - Revert r245923 since it breaks mingw.

Michael Kuperstein via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 25 04:42:32 PDT 2015


Author: mkuper
Date: Tue Aug 25 06:42:31 2015
New Revision: 245929

URL: http://llvm.org/viewvc/llvm-project?rev=245929&view=rev
Log:
Revert r245923 since it breaks mingw.

Removed:
    cfe/trunk/test/CodeGen/x86-rot-intrinsics.c
Modified:
    cfe/trunk/lib/Headers/Intrin.h
    cfe/trunk/lib/Headers/immintrin.h

Modified: cfe/trunk/lib/Headers/Intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=245929&r1=245928&r2=245929&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/Intrin.h (original)
+++ cfe/trunk/lib/Headers/Intrin.h Tue Aug 25 06:42:31 2015
@@ -463,6 +463,26 @@ _rotr16(unsigned short _Value, unsigned
   _Shift &= 0xf;
   return _Shift ? (_Value >> _Shift) | (_Value << (16 - _Shift)) : _Value;
 }
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_rotl(unsigned int _Value, int _Shift) {
+  _Shift &= 0x1f;
+  return _Shift ? (_Value << _Shift) | (_Value >> (32 - _Shift)) : _Value;
+}
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_rotr(unsigned int _Value, int _Shift) {
+  _Shift &= 0x1f;
+  return _Shift ? (_Value >> _Shift) | (_Value << (32 - _Shift)) : _Value;
+}
+static __inline__ unsigned long __DEFAULT_FN_ATTRS
+_lrotl(unsigned long _Value, int _Shift) {
+  _Shift &= 0x1f;
+  return _Shift ? (_Value << _Shift) | (_Value >> (32 - _Shift)) : _Value;
+}
+static __inline__ unsigned long __DEFAULT_FN_ATTRS
+_lrotr(unsigned long _Value, int _Shift) {
+  _Shift &= 0x1f;
+  return _Shift ? (_Value >> _Shift) | (_Value << (32 - _Shift)) : _Value;
+}
 static
 __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
 _rotl64(unsigned __int64 _Value, int _Shift) {

Modified: cfe/trunk/lib/Headers/immintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/immintrin.h?rev=245929&r1=245928&r2=245929&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/immintrin.h (original)
+++ cfe/trunk/lib/Headers/immintrin.h Tue Aug 25 06:42:31 2015
@@ -148,58 +148,4 @@ _writegsbase_u64(unsigned long long __V)
  * whereas others are also available at all times. */
 #include <adxintrin.h>
 
-static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__))
-_rotwl(unsigned short _Value, int _Shift) {
-  _Shift &= 0xf;
-  return _Shift ? (_Value << _Shift) | (_Value >> (16 - _Shift)) : _Value;
-}
-
-static __inline__ unsigned short __attribute__((__always_inline__, __nodebug__))
-_rotwr(unsigned short _Value, int _Shift) {
-  _Shift &= 0xf;
-  return _Shift ? (_Value >> _Shift) | (_Value << (16 - _Shift)) : _Value;
-}
-
-static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
-_rotl(unsigned int _Value, int _Shift) {
-  _Shift &= 0x1f;
-  return _Shift ? (_Value << _Shift) | (_Value >> (32 - _Shift)) : _Value;
-}
-
-static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__))
-_rotr(unsigned int _Value, int _Shift) {
-  _Shift &= 0x1f;
-  return _Shift ? (_Value >> _Shift) | (_Value << (32 - _Shift)) : _Value;
-}
-
-/* 
- * MS defines _lrotl/_lrotr in a slightly incompatible way, since 
- * unsigned long is always 32-bit in MSVC. 
- */
-#ifdef _MSC_VER
-static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
-_lrotl(unsigned long _Value, int _Shift) {
-  _Shift &= 0x1f;
-  return _Shift ? (_Value << _Shift) | (_Value >> (32 - _Shift)) : _Value;
-}
-
-static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
-_lrotr(unsigned long _Value, int _Shift) {
-  _Shift &= 0x1f;
-  return _Shift ? (_Value >> _Shift) | (_Value << (32 - _Shift)) : _Value;
-}
-#else
-static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
-_lrotl(unsigned long _Value, int _Shift) {
-  _Shift &= 0x3f;
-  return _Shift ? (_Value << _Shift) | (_Value >> (64 - _Shift)) : _Value;
-}
-
-static __inline__ unsigned long __attribute__((__always_inline__, __nodebug__))
-_lrotr(unsigned long _Value, int _Shift) {
-  _Shift &= 0x3f;
-  return _Shift ? (_Value >> _Shift) | (_Value << (64 - _Shift)) : _Value;
-}
-#endif
-
 #endif /* __IMMINTRIN_H */

Removed: cfe/trunk/test/CodeGen/x86-rot-intrinsics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/x86-rot-intrinsics.c?rev=245928&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/x86-rot-intrinsics.c (original)
+++ cfe/trunk/test/CodeGen/x86-rot-intrinsics.c (removed)
@@ -1,89 +0,0 @@
-// RUN: %clang_cc1 %s -triple=i686-pc-linux -emit-llvm -o - | FileCheck %s 
-// RUN: %clang_cc1 -ffreestanding -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
-// RUN:            -triple i686--windows -emit-llvm %s -o - \ 
-// RUN:   | FileCheck %s -check-prefix CHECK  -check-prefix MSC
-
-// Don't include mm_malloc.h, it's system specific.
-#define __MM_MALLOC_H
-
-#ifdef _MSC_VER
-#include <Intrin.h>
-#else
-#include <immintrin.h>
-#endif
-
-#ifdef _MSC_VER
-unsigned char test_rotl8(unsigned char v, unsigned char s) {
-  //MSC-LABEL: test_rotl8
-  //MSC-NOT: call
-  return _rotl8(v, s);
-}
-
-unsigned char test_rotr8(unsigned char v, unsigned char s) {
-  //MSC-LABEL: test_rotr8
-  //MSC-NOT: call
-  return _rotr8(v, s);
-}
-
-unsigned short test_rotl16(unsigned short v, unsigned char s) {
-  //MSC-LABEL: test_rotl16
-  //MSC-NOT: call
-  return _rotl16(v, s);
-}
-
-unsigned short test_rotr16(unsigned short v, unsigned char s) {
-  //MSC-LABEL: test_rotr16
-  //MSC-NOT: call
-  return _rotr16(v, s);
-}
-
-unsigned __int64 test_rotl64(unsigned __int64 v, int s) {
-  //MSC-LABEL: test_rotl64
-  //MSC-NOT: call
-  return _rotl64(v, s);
-}
-
-unsigned __int64 test_rotr64(unsigned __int64 v, int s) {
-  //MSC-LABEL: test_rotr64
-  //MSC-NOT: call
-  return _rotr64(v, s);
-}
-#endif
-
-unsigned short test_rotwl(unsigned short v, unsigned short s) {
-  //CHECK-LABEL: test_rotwl
-  //CHECK-NOT: call
-  return _rotwl(v, s);
-}
-
-unsigned short test_rotwr(unsigned short v, unsigned short s) {
-  //CHECK-LABEL: test_rotwr
-  //CHECK-NOT: call
-  return _rotwr(v, s);
-}
-
-unsigned int test_rotl(unsigned int v, int s) {
-  //CHECK-LABEL: test_rotl
-  //CHECK-NOT: call
-  return _rotl(v, s);
-}
-
-unsigned int test_rotr(unsigned int v, int s) {
-  //CHECK-LABEL: test_rotr
-  //CHECK-NOT: call
-  return _rotr(v, s);
-}
-
-unsigned long test_lrotl(unsigned long v, int s) {
-  //CHECK-LABEL: test_lrotl
-  //CHECK-NOT: call
-  return _lrotl(v, s);
-}
-
-unsigned long test_lrotr(unsigned long v, int s) {
-  //CHECK-LABEL: test_lrotr
-  //CHECK-NOT: call
-  return _lrotr(v, s);
-}
-
-//CHECK-LABEL: attributes




More information about the cfe-commits mailing list