From: Ehsan Akhgari Date: Sun, 6 Jul 2014 18:45:44 +0000 (+0000) Subject: Move InterlockedBitTestAndSet into its own test file X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e36a19b20b8e97ae4d1805208f40f881b0e25ab;p=platform%2Fupstream%2Fllvm.git Move InterlockedBitTestAndSet into its own test file Summary: This gives us back the test coverage we lost when I made MicrosoftExtensions.c x86-only. Reviewers: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4401 llvm-svn: 212414 --- diff --git a/clang/test/Parser/MicrosoftExtensions.c b/clang/test/Parser/MicrosoftExtensions.c index e41028c..6ffb0ea 100644 --- a/clang/test/Parser/MicrosoftExtensions.c +++ b/clang/test/Parser/MicrosoftExtensions.c @@ -1,4 +1,3 @@ -// REQUIRES: x86-registered-target // RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions -Wno-missing-declarations -x objective-c++ %s __stdcall int func0(); int __stdcall func(); @@ -19,16 +18,6 @@ void * __ptr32 PtrToPtr32(const void *p) return((void * __ptr32) (unsigned __int32) (ULONG_PTR)p ); } -void __forceinline InterlockedBitTestAndSet (long *Base, long Bit) -{ - __asm { - mov eax, Bit - mov ecx, Base - lock bts [ecx], eax - setc al - }; -} - // Both inline and __forceinline is OK. inline void __forceinline pr8264() { } diff --git a/clang/test/Parser/MicrosoftExtensionsInlineAsm.c b/clang/test/Parser/MicrosoftExtensionsInlineAsm.c new file mode 100644 index 0000000..2f5648f --- /dev/null +++ b/clang/test/Parser/MicrosoftExtensionsInlineAsm.c @@ -0,0 +1,13 @@ +// REQUIRES: x86-registered-target +// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions -Wno-missing-declarations -x objective-c++ %s +// expected-no-diagnostics + +void __forceinline InterlockedBitTestAndSet (long *Base, long Bit) +{ + __asm { + mov eax, Bit + mov ecx, Base + lock bts [ecx], eax + setc al + }; +}