Module: xenomai-3
Branch: next
Commit: 6d55a7ae02ca390c92f98e75b9110aa01e3f345d
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=6d55a7ae02ca390c92f98e75b9110aa01e3f345d

Author: Dmitriy Cherkasov <dmit...@mperpetuo.com>
Date:   Mon Jun 15 17:10:37 2015 -0700

cobalt/arm64: machine.h: Add 64-bit ffnz implementation. This fixes crash when 
running xddp-echo.

---

 kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h 
b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h
index e078564..417a7b0 100644
--- a/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h
+++ b/kernel/cobalt/arch/arm64/include/asm/xenomai/machine.h
@@ -43,9 +43,7 @@
 
 static inline __attribute_const__ unsigned long ffnz(unsigned long ul)
 {
-       int __r;
-       __asm__("clz\t%0, %1" : "=r" (__r) : "r"(ul & (-ul)) : "cc");
-       return 31 - __r;
+       return __builtin_ffsl(ul) - 1;
 }
 
 #include <asm-generic/xenomai/machine.h>


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to