linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew Dennison" <andrew.dennison@motec.com.au>
To: <linuxppc-embedded@lists.linuxppc.org>
Subject: [PATCH] fix compile of denx rtai ppc with gcc 3.3.2
Date: Mon, 22 Mar 2004 14:38:35 +1100	[thread overview]
Message-ID: <005a01c40fbf$27f738a0$ee00a8c0@CAT> (raw)

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

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

[-- Attachment #2: rtai-24.1.12-denx.patch --]
[-- Type: application/octet-stream, Size: 547 bytes --]

diff -ur rtai-24.1.12.orig/include/asm-ppc/rtai_srq.h rtai-24.1.12/include/asm-ppc/rtai_srq.h
--- rtai-24.1.12.orig/include/asm-ppc/rtai_srq.h	Tue Oct 24 11:32:28 2000
+++ rtai-24.1.12/include/asm-ppc/rtai_srq.h	Thu Mar 18 14:38:35 2004
@@ -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;

[-- Attachment #3: LABEL_2003_12_22_1500-ltt.patch --]
[-- Type: application/octet-stream, Size: 711 bytes --]

--- drivers/trace/tracer.h.orig	Fri Mar 19 17:41:14 2004
+++ drivers/trace/tracer.h	Mon Mar 22 10:03:58 2004
@@ -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;
 }

             reply	other threads:[~2004-03-22  3:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22  3:38 Andrew Dennison [this message]
2004-03-22 10:02 ` [PATCH] fix compile of denx rtai ppc with gcc 3.3.2 Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='005a01c40fbf$27f738a0$ee00a8c0@CAT' \
    --to=andrew.dennison@motec.com.au \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).