[PATCH] Move InterlockedBitTestAndSet into its own test file

Ehsan Akhgari ehsan.akhgari at gmail.com
Sun Jul 6 11:54:12 PDT 2014


Closed by commit rL212414 (authored by @ehsan).

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D4401

Files:
  cfe/trunk/test/Parser/MicrosoftExtensions.c
  cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c

Index: cfe/trunk/test/Parser/MicrosoftExtensions.c
===================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c
+++ cfe/trunk/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 @@
   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() {
 }
Index: cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c
===================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensionsInlineAsm.c
+++ cfe/trunk/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
+  };
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4401.11106.patch
Type: text/x-patch
Size: 1393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140706/de2d6d16/attachment.bin>


More information about the cfe-commits mailing list