Skip to contentSkip to conversation

too lax asm constraints of __xn_rdtsc on bfin

Xenomai-core Jan Kiszka 1 participant 1 message Jun 12, 2007

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Sigh. Actually, I only wanted to give that shiny new BF537-STAMP board, kindly provided by ADI, a short try. Now I'm right in the middle of all this...

Changelog says it all. Problem appears with trunk and 2.3.x user space build (=>direct TSC).

Jan

ChangeLog +6 -0
Index: ChangeLog
===================================================================
@@ -1,3 +1,9 @@
+2007-06-12  Jan Kiszka  <[email protected]>
+
+	* include/asm-blackfin/syscall.h (__xn_rdtsc): Assure that CC only
+	works on data registers. Otherwise, bfin's as may pick a pointer reg
+	and crash during user land build (toolchain bug #3332).
+
 2007-06-09  Philippe Gerum  <[email protected]>
 
 	* ksrc/skins/native/pipe.c (rt_pipe_create): Keep the
asm-blackfin/syscall.h +3 -3
Index: include/asm-blackfin/syscall.h
===================================================================
@@ -249,9 +249,9 @@
 				"%2 = CYCLES2\n"
 				"CC = %2 == %0\n"
 				"if !cc jump 1b\n"
-				:"=r" (u.s.h),
-				"=r" (u.s.l),
-				"=r" (cy2)
+				:"=d" (u.s.h),
+				"=d" (u.s.l),
+				"=d" (cy2)
 				: /*no input*/ : "cc");
     return u.t;
 }