[PATCH] D24286: Add MS __nop intrinsic to intrin.h

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 7 10:03:37 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL280826: Add MS __nop intrinsic to intrin.h (authored by rnk).

Changed prior to commit:
  https://reviews.llvm.org/D24286?vs=70495&id=70555#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24286

Files:
  cfe/trunk/lib/Headers/intrin.h
  cfe/trunk/test/Headers/ms-intrin.cpp

Index: cfe/trunk/test/Headers/ms-intrin.cpp
===================================================================
--- cfe/trunk/test/Headers/ms-intrin.cpp
+++ cfe/trunk/test/Headers/ms-intrin.cpp
@@ -52,6 +52,7 @@
   __cpuidex(info, 0, 0);
   _xgetbv(0);
   __halt();
+  __nop();
   __readmsr(0);
 
   // FIXME: Call these in 64-bit too once the intrinsics have been fixed to
Index: cfe/trunk/lib/Headers/intrin.h
===================================================================
--- cfe/trunk/lib/Headers/intrin.h
+++ cfe/trunk/lib/Headers/intrin.h
@@ -97,6 +97,7 @@
 void __movsd(unsigned long *, unsigned long const *, size_t);
 static __inline__
 void __movsw(unsigned short *, unsigned short const *, size_t);
+static __inline__
 void __nop(void);
 void __nvreg_restore_fence(void);
 void __nvreg_save_fence(void);
@@ -918,6 +919,10 @@
 __halt(void) {
   __asm__ volatile ("hlt");
 }
+static __inline__ void __DEFAULT_FN_ATTRS
+__nop(void) {
+  __asm__ volatile ("nop");
+}
 #endif
 
 /*----------------------------------------------------------------------------*\


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24286.70555.patch
Type: text/x-patch
Size: 1071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160907/95c0463b/attachment.bin>


More information about the cfe-commits mailing list