diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-04-04 23:53:43 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2013-04-04 23:53:43 +0000 |
commit | d1b33945f3254de9b02063cd203374856492ed02 (patch) | |
tree | 206926a103897f67225a0698575e73875fec2257 /test/Preprocessor | |
parent | 648cb71625a2ab3164b2cacac9e9cb3d22b03bd7 (diff) |
Add support for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_{1,2,4,8} on x86.
This fixes std::thread with libstdc++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178816 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/predefined-macros.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Preprocessor/predefined-macros.c b/test/Preprocessor/predefined-macros.c index 2c193018b5..94671f3335 100644 --- a/test/Preprocessor/predefined-macros.c +++ b/test/Preprocessor/predefined-macros.c @@ -26,3 +26,21 @@ // RUN: %clang_cc1 %s -E -dM -o - \ // RUN: | FileCheck %s --check-prefix=CHECK-FINITE-MATH-FLAG-UNDEFINED // CHECK-FINITE-MATH-FLAG-UNDEFINED: #define __FINITE_MATH_ONLY__ 0 +// +// RUN: %clang_cc1 %s -E -dM -o - -triple i686 -target-cpu i386 \ +// RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_I386 +// CHECK-SYNC_CAS_I386-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP +// +// RUN: %clang_cc1 %s -E -dM -o - -triple i686 -target-cpu i486 \ +// RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_I486 +// CHECK-SYNC_CAS_I486: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 +// CHECK-SYNC_CAS_I486: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 +// CHECK-SYNC_CAS_I486: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +// CHECK-SYNC_CAS_I486-NOT: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +// +// RUN: %clang_cc1 %s -E -dM -o - -triple i686 -target-cpu i586 \ +// RUN: | FileCheck %s --check-prefix=CHECK-SYNC_CAS_I586 +// CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 +// CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 +// CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 +// CHECK-SYNC_CAS_I586: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 |