Logo
Explore Help
Sign In
mirrors/llvm-project
0
0
Fork 0
You've already forked llvm-project
mirror of https://github.com/llvm/llvm-project.git synced 2025-05-15 06:56:08 +00:00
Code Issues Projects Releases Wiki Activity
llvm-project/clang/test/CodeGen/ms-volatile-arm.c

14 lines
411 B
C
Raw Normal View History

[MS] Implement __iso_volatile loads/stores as builtins These are supposed to produce the same as normal volatile pointer loads/stores. When -volatile:ms is specified, normal volatile pointers are forced to have atomic semantics (as is the default on x86 in MSVC mode). In that case, these builtins should still produce non-atomic volatile loads/stores without acquire/release semantics, which the new test verifies. These are only available on ARM (and on AArch64, although clang doesn't support AArch64/Windows yet). This implements what is missing for PR30394, making it possible to compile C++ for ARM in MSVC mode with MSVC headers. Differential Revision: https://reviews.llvm.org/D24986 llvm-svn: 282900
2016-09-30 19:13:46 +00:00
// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumbv7-win32 -emit-llvm -fms-extensions -fms-volatile -o - < %s | FileCheck %s
void test1(int volatile *p, int v) {
__iso_volatile_store32(p, v);
// CHECK-LABEL: @test1
// CHECK: store volatile {{.*}}, {{.*}}
}
int test2(const int volatile *p) {
return __iso_volatile_load32(p);
// CHECK-LABEL: @test2
// CHECK: load volatile {{.*}}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 1254ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API