From: Ehsan Akhgari Date: Sun, 6 Jul 2014 18:45:44 +0000 (+0000) Subject: Move InterlockedBitTestAndSet into its own test file X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82deeaf575800c56633e70b6397b0d44445f0c3d;p=clang 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212414 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index e41028c4af..6ffb0ea3ca 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/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/test/Parser/MicrosoftExtensionsInlineAsm.c b/test/Parser/MicrosoftExtensionsInlineAsm.c new file mode 100644 index 0000000000..2f5648f40c --- /dev/null +++ b/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 + }; +}