[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/pxa27x pxa27xhardware.h, 1.1, 1.2

Philip Buonadonna philipb at users.sourceforge.net
Wed Mar 9 15:45:57 PST 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20716

Modified Files:
	pxa27xhardware.h 
Log Message:
- Added function _pxa27x_clzui() to take advantage of ARM instruction for bit vvector scans


Index: pxa27xhardware.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/pxa27xhardware.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pxa27xhardware.h	13 Nov 2004 01:12:40 -0000	1.1
--- pxa27xhardware.h	9 Mar 2005 23:45:54 -0000	1.2
***************
*** 134,137 ****
--- 134,146 ----
  }
  
+ inline uint32_t _pxa27x_clzui(uint32_t i) {
+   uint32_t count;
+   asm volatile ("clz %0,%1"
+ 		: "=r" (count)
+ 		: "r" (i)
+ 		);
+   return count;
+ }
+ 
  typedef uint32_t __nesc_atomic_t;
  
***************
*** 181,184 ****
  }
  
- 
  #endif //TOSH_HARDWARE_H
--- 190,192 ----



More information about the Tinyos-beta-commits mailing list