Files
clang-p2996/clang/test/CodeGen/ms-volatile-aarch64.c
Simon Tatham 89e31fa7fc Support __iso_volatile_load8 etc on aarch64-win32.
These intrinsics are used by MSVC's header files on AArch64 Windows as
well as AArch32, so we should support them for both targets. I've
factored them out of CodeGenFunction::EmitARMBuiltinExpr into separate
functions that EmitAArch64BuiltinExpr can call as well.

Reviewers: javed.absar, mstorsjo

Reviewed By: mstorsjo

Subscribers: kristof.beyls, cfe-commits

Differential Revision: https://reviews.llvm.org/D47476

llvm-svn: 333513
2018-05-30 07:54:05 +00:00

14 lines
415 B
C

// REQUIRES: aarch64-registered-target
// RUN: %clang_cc1 -triple aarch64-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 {{.*}}
}