<div dir="ltr">On Sat, Jul 12, 2014 at 3:48 PM, Yi Kong <span dir="ltr"><<a href="mailto:Yi.Kong@arm.com" target="_blank">Yi.Kong@arm.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: kongyi<br>
Date: Sat Jul 12 17:48:13 2014<br>
New Revision: 212887<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=212887&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=212887&view=rev</a><br>
Log:<br>
Improve comments of ARM ACLE header file and tests<br>
<br>
Include section number in ARM ACLE specification for easier navigation.<br></blockquote><div><br></div><div>Thanks for doing this, I had a similar change that I was going to push.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Modified:<br>
cfe/trunk/lib/Headers/arm_acle.h<br>
cfe/trunk/test/CodeGen/arm_acle.c<br>
<br>
Modified: cfe/trunk/lib/Headers/arm_acle.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/arm_acle.h?rev=212887&r1=212886&r2=212887&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/arm_acle.h?rev=212887&r1=212886&r2=212887&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Headers/arm_acle.h (original)<br>
+++ cfe/trunk/lib/Headers/arm_acle.h Sat Jul 12 17:48:13 2014<br>
@@ -34,8 +34,8 @@<br>
extern "C" {<br>
#endif<br>
<br>
-/* Miscellaneous data-processing intrinsics */<br>
-<br>
+/* 9 DATA-PROCESSING INTRINSICS */<br>
+/* 9.2 Miscellaneous data-processing intrinsics */<br>
static __inline__ uint32_t __attribute__((always_inline, nodebug))<br>
__clz(uint32_t t) {<br>
return __builtin_clz(t);<br>
@@ -74,17 +74,20 @@ static __inline__ uint64_t __attribute__<br>
return __builtin_bswap64(t);<br>
}<br>
<br>
-<br>
/*<br>
- * Saturating intrinsics<br>
+ * 9.4 Saturating intrinsics<br>
*<br>
* FIXME: Change guard to their corrosponding __ARM_FEATURE flag when Q flag<br>
* intrinsics are implemented and the flag is enabled.<br>
*/<br>
+/* 9.4.1 Width-specified saturation intrinsics */<br>
#if __ARM_32BIT_STATE<br>
#define __ssat(x, y) __builtin_arm_ssat(x, y)<br>
#define __usat(x, y) __builtin_arm_usat(x, y)<br>
+#endif<br>
<br>
+/* 9.4.2 Saturating addition and subtraction intrinsics */<br>
+#if __ARM_32BIT_STATE<br>
static __inline__ int32_t __attribute__((always_inline, nodebug))<br>
__qadd(int32_t t, int32_t v) {<br>
return __builtin_arm_qadd(t, v);<br>
@@ -101,7 +104,7 @@ __qdbl(int32_t t) {<br>
}<br>
#endif<br>
<br>
-/* CRC32 intrinsics */<br>
+/* 9.7 CRC32 intrinsics */<br>
#if __ARM_FEATURE_CRC32<br>
static __inline__ uint32_t __attribute__((always_inline, nodebug))<br>
__crc32b(uint32_t a, uint8_t b) {<br>
<br>
Modified: cfe/trunk/test/CodeGen/arm_acle.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm_acle.c?rev=212887&r1=212886&r2=212887&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm_acle.c?rev=212887&r1=212886&r2=212887&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/arm_acle.c (original)<br>
+++ cfe/trunk/test/CodeGen/arm_acle.c Sat Jul 12 17:48:13 2014<br>
@@ -3,7 +3,8 @@<br>
<br>
#include <arm_acle.h><br>
<br>
-/* Miscellaneous data-processing intrinsics */<br>
+/* 9 DATA-PROCESSING INTRINSICS */<br>
+/* 9.2 Miscellaneous data-processing intrinsics */<br>
// ARM-LABEL: test_rev<br>
// ARM: call i32 @llvm.bswap.i32(i32 %t)<br>
uint32_t test_rev(uint32_t t) {<br>
@@ -42,8 +43,10 @@ uint64_t test_clzll(uint64_t t) {<br>
return __clzll(t);<br>
}<br>
<br>
-/* Saturating intrinsics */<br>
+/* 9.4 Saturating intrinsics */<br>
#ifdef __ARM_32BIT_STATE<br>
+<br>
+/* 9.4.1 Width-specified saturation intrinsics */<br>
// AArch32-LABEL: test_ssat<br>
// AArch32: call i32 @llvm.arm.ssat(i32 %t, i32 1)<br>
int32_t test_ssat(int32_t t) {<br>
@@ -55,6 +58,8 @@ int32_t test_ssat(int32_t t) {<br>
int32_t test_usat(int32_t t) {<br>
return __usat(t, 2);<br>
}<br>
+<br>
+/* 9.4.2 Saturating addition and subtraction intrinsics */<br>
// AArch32-LABEL: test_qadd<br>
// AArch32: call i32 @llvm.arm.qadd(i32 %a, i32 %b)<br>
int32_t test_qadd(int32_t a, int32_t b) {<br>
@@ -77,7 +82,7 @@ int32_t test_qdbl() {<br>
}<br>
#endif<br>
<br>
-/* CRC32 intrinsics */<br>
+/* 9.7 CRC32 intrinsics */<br>
// ARM-LABEL: test_crc32b<br>
// AArch32: call i32 @llvm.arm.crc32b<br>
// AArch64: call i32 @llvm.aarch64.crc32b<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>