[PATCH] Implement __clzdi2 and __clzsi2 for early ARM architectures that lack the clz instruction
Saleem Abdulrasool
compnerd at compnerd.org
Tue Jan 28 19:01:31 PST 2014
================
Comment at: lib/arm/clzdi2.S:36
@@ +35,3 @@
+#endif
+ bx lr
+#else
----------------
Should this bx also be handled similarly for uniformity? clz being present is indicative of ARMv5T+ so bx is obviously available, but, the uniformity might be nice (since the cost is 0).
================
Comment at: lib/arm/clzdi2.S:38
@@ +37,3 @@
+#else
+ /* Assumption: n != 0 */
+
----------------
I dont see how this assumption holds.
================
Comment at: lib/arm/clzdi2.S:64
@@ +63,3 @@
+ */
+#define IMM #
+
----------------
I believe that the IMM prefix unnecessary in unified syntax.
================
Comment at: lib/arm/clzdi2.S:66
@@ +65,3 @@
+
+#define block(shift) \
+ lsrs r2, r0, IMM shift; \
----------------
Can you change the name of block to upper case to indicate that it is a macro?
http://llvm-reviews.chandlerc.com/D2630
More information about the llvm-commits
mailing list