r212414 - Move InterlockedBitTestAndSet into its own test file
Ehsan Akhgari
ehsan.akhgari at gmail.com
Sun Jul 6 11:45:45 PDT 2014
Author: ehsan
Date: Sun Jul 6 13:45:44 2014
New Revision: 212414
URL: http://llvm.org/viewvc/llvm-project?rev=212414&view=rev
Log:
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
Added:
cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c
Modified:
cfe/trunk/test/Parser/MicrosoftExtensions.c
Modified: cfe/trunk/test/Parser/MicrosoftExtensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.c?rev=212414&r1=212413&r2=212414&view=diff
==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.c Sun Jul 6 13:45:44 2014
@@ -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() {
}
Added: cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c?rev=212414&view=auto
==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c (added)
+++ cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c Sun Jul 6 13:45:44 2014
@@ -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
+ };
+}
More information about the cfe-commits
mailing list