Skip to contentSkip to conversation

fix compile of denx rtai ppc with gcc 3.3.2

PATCH In review Andrew Dennison 2 participants 2 messages Mar 22, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix compile of denx rtai ppc with gcc 3.3.2

I had a few problems compiling Denx RTAI for ppc with gcc 3.3.2. Attached patches seem to fix this - at least the examples run on my MPC5200. Changes still compile ok on 2.95.4.

For linuxppc_devel patched with patch-denx-linuxppc_2_4_devel-LABEL_2003_12_22_1500-ltt:

Change formatting of __asm__ in ltt_clear_bit to be similar to ltt_set_bit to fix compile error.

For rtai-24.1.12-denx.tar.bz2:

Fix clobber list to fix compile error on gcc 3.3.2.

Andrew

include/asm-ppc/rtai_srq.h +1 -2
diff -ur rtai-24.1.12.orig/include/asm-ppc/rtai_srq.h rtai-24.1.12/include/asm-ppc/rtai_srq.h
@@ -33,8 +33,7 @@
 		("trap         \n\t"
 		: "=&r" (__sc_3), "=&r" (__sc_4)
 		: "0"   (__sc_3), "1"   (__sc_4),
-	          "r"   (__sc_0)
-		: "r0", "r3", "r4" );
+	          "r"   (__sc_0));
 	((unsigned long *)&retval)[0] = __sc_3;
 	((unsigned long *)&retval)[1] = __sc_4;
 	return retval;
trace/tracer.h renamed from trace/tracer.h.orig +8 -8
@@ -176,14 +176,14 @@
 	unsigned long mask = 1 << (24 - (nr & 0x18) + (nr & 0x7));
 	volatile unsigned long *p = ((volatile unsigned long *)addr) + (nr >> 5);
 
-	__asm__ __volatile__("\n\
-1:	lwarx	%0,0,%3
-	andc	%1,%0,%2
-	stwcx.	%1,0,%3
-	bne	1b"
-	: "=&r" (old), "=&r" (t)	/*, "=m" (*p)*/
-	: "r" (mask), "r" (p)
-      /*: "cc"*/);
+	__asm__ __volatile__(
+		"1:lwarx	%0,0,%3 \n\t"
+		"andc	%1,%0,%2 \n\t"
+		"stwcx.	%1,0,%3 \n\t"
+		"bne	1b \n\t"
+		: "=&r" (old), "=&r" (t)	/*, "=m" (*p)*/
+		: "r" (mask), "r" (p)
+      		/*: "cc"*/);
 
 	return (old & mask) != 0;
 }
#1 lore raw
Quoted 15 lines

-- Original Message --
From: "Andrew Dennison" <[email protected]>
To: <[email protected]>
Subject: [PATCH] fix compile of denx rtai ppc with gcc 3.3.2
Date: Mon, 22 Mar 2004 14:38:35 +1100

I had a few problems compiling Denx RTAI for ppc with gcc 3.3.2. Attached patches seem to fix this - at least the examples run on my MPC5200. Changes still compile ok on 2.95.4.

For linuxppc_devel patched with patch-denx-linuxppc_2_4_devel-LABEL_2003_12_22_1500-ltt:

Quoted 6 lines

Change formatting of __asm__ in ltt_clear_bit to be similar to ltt_set_bit to fix compile error.

For rtai-24.1.12-denx.tar.bz2:

Fix clobber list to fix compile error on gcc 3.3.2.

Thanks for the patches. I'm going to verify and commit them into the RTAI 24.x and 3.x CVS repositories a.s.a.p.

This issue is off-topic on this list. Please send RTAI related mails to [email protected].

Wolfgang.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/