[PATCH] D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb

Mandeep Singh Grang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 31 13:28:32 PDT 2017


mgrang created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

https://reviews.llvm.org/D36111

Files:
  include/clang/Basic/BuiltinsAArch64.def
  test/CodeGen/builtins-arm64.c


Index: test/CodeGen/builtins-arm64.c
===================================================================
--- test/CodeGen/builtins-arm64.c
+++ test/CodeGen/builtins-arm64.c
@@ -30,6 +30,9 @@
 }
 
 void barriers() {
+  __dmb(1);  //CHECK: call {{.*}} @llvm.aarch64.dmb(i32 1)
+  __dsb(2);  //CHECK: call {{.*}} @llvm.aarch64.dsb(i32 2)
+  __isb(3);  //CHECK: call {{.*}} @llvm.aarch64.isb(i32 3)
   __builtin_arm_dmb(1);  //CHECK: call {{.*}} @llvm.aarch64.dmb(i32 1)
   __builtin_arm_dsb(2);  //CHECK: call {{.*}} @llvm.aarch64.dsb(i32 2)
   __builtin_arm_isb(3);  //CHECK: call {{.*}} @llvm.aarch64.isb(i32 3)
Index: include/clang/Basic/BuiltinsAArch64.def
===================================================================
--- include/clang/Basic/BuiltinsAArch64.def
+++ include/clang/Basic/BuiltinsAArch64.def
@@ -46,6 +46,9 @@
 BUILTIN(__builtin_arm_crc32cd, "UiUiLUi", "nc")
 
 // Memory barrier
+BUILTIN(__dmb, "vUi", "nc")
+BUILTIN(__dsb, "vUi", "nc")
+BUILTIN(__isb, "vUi", "nc")
 BUILTIN(__builtin_arm_dmb, "vUi", "nc")
 BUILTIN(__builtin_arm_dsb, "vUi", "nc")
 BUILTIN(__builtin_arm_isb, "vUi", "nc")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36111.108987.patch
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170731/13b0a21d/attachment.bin>


More information about the cfe-commits mailing list