r212950 - ARM: Add NOP intrinsic mapping in arm_acle.h
Yi Kong
Yi.Kong at arm.com
Mon Jul 14 08:32:29 PDT 2014
Author: kongyi
Date: Mon Jul 14 10:32:29 2014
New Revision: 212950
URL: http://llvm.org/viewvc/llvm-project?rev=212950&view=rev
Log:
ARM: Add NOP intrinsic mapping in arm_acle.h
Modified:
cfe/trunk/lib/Headers/arm_acle.h
cfe/trunk/test/CodeGen/arm_acle.c
Modified: cfe/trunk/lib/Headers/arm_acle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/arm_acle.h?rev=212950&r1=212949&r2=212950&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/arm_acle.h (original)
+++ cfe/trunk/lib/Headers/arm_acle.h Mon Jul 14 10:32:29 2014
@@ -33,8 +33,9 @@
#if defined(__cplusplus)
extern "C" {
#endif
-
-/* 8.4 - Hints */
+
+/* 8 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */
+/* 8.4 Hints */
#if !defined(_MSC_VER)
static __inline__ void __attribute__((always_inline, nodebug)) __wfi(void) {
@@ -58,6 +59,11 @@ static __inline__ void __attribute__((al
}
#endif
+/* 8.7 NOP */
+static __inline__ void __attribute__((always_inline, nodebug)) __nop(void) {
+ __builtin_arm_nop();
+}
+
/* 9 DATA-PROCESSING INTRINSICS */
/* 9.2 Miscellaneous data-processing intrinsics */
static __inline__ uint32_t __attribute__((always_inline, nodebug))
Modified: cfe/trunk/test/CodeGen/arm_acle.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm_acle.c?rev=212950&r1=212949&r2=212950&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm_acle.c (original)
+++ cfe/trunk/test/CodeGen/arm_acle.c Mon Jul 14 10:32:29 2014
@@ -40,6 +40,14 @@ void test_sevl(void) {
__sevl();
}
+/* 8.7 NOP */
+// ARM-LABEL: test_nop
+// AArch32: call void @llvm.arm.hint(i32 0)
+// AArch64: call void @llvm.aarch64.hint(i32 0)
+void test_nop(void) {
+ __nop();
+}
+
/* 9 DATA-PROCESSING INTRINSICS */
/* 9.2 Miscellaneous data-processing intrinsics */
// ARM-LABEL: test_rev
More information about the cfe-commits
mailing list