From: Saleem Abdulrasool Date: Sun, 23 Jun 2019 02:53:03 +0000 (+0000) Subject: Revert "builtins: relax __iso_volatile_{load,store}32" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4acc9d875226855a8a3f0e84caca40b97ea62eef;p=clang Revert "builtins: relax __iso_volatile_{load,store}32" This reverts commit SVN r364137. This seems to be cause problems with casting in C. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364147 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def index ce79d4ac96..a9ca9abf50 100644 --- a/include/clang/Basic/Builtins.def +++ b/include/clang/Basic/Builtins.def @@ -827,11 +827,11 @@ LANGBUILTIN(_interlockedbittestandset_nf, "UcNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(_interlockedbittestandset_rel, "UcNiD*Ni", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__iso_volatile_load8, "ccCD*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__iso_volatile_load16, "ssCD*", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(__iso_volatile_load32, "LiLiCD*", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(__iso_volatile_load32, "iiCD*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__iso_volatile_load64, "LLiLLiCD*", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__iso_volatile_store8, "vcD*c", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__iso_volatile_store16, "vsD*s", "n", ALL_MS_LANGUAGES) -LANGBUILTIN(__iso_volatile_store32, "vLiD*Li", "n", ALL_MS_LANGUAGES) +LANGBUILTIN(__iso_volatile_store32, "viD*i", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__iso_volatile_store64, "vLLiD*LLi", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__noop, "i.", "n", ALL_MS_LANGUAGES) LANGBUILTIN(__lzcnt16, "UsUs", "nc", ALL_MS_LANGUAGES) diff --git a/test/CodeGenCXX/ms-intrinsics.cpp b/test/CodeGenCXX/ms-intrinsics.cpp deleted file mode 100644 index 7afa39a97e..0000000000 --- a/test/CodeGenCXX/ms-intrinsics.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// RUN: %clang_cc1 -fms-compatibility -fsyntax-only %s -verify -// expected-no-diagnostics - -struct S { - mutable long _Spinlock = 0; - void _Unlock() { - __iso_volatile_store32(&_Spinlock, 0); - } - int _Reset() { - long v = __iso_volatile_load32(&_Spinlock); - __iso_volatile_store32(&_Spinlock, 0); - return v; - } -}; - -S s; -