in_be64() assembly

Jake Moilanen moilanen at austin.ibm.com
Wed Jan 5 09:13:54 EST 2005


I'm trying to use in_be64() and when I build, I get a compile errors:

{standard input}: Assembler messages:
{standard input}:5534: Error: syntax error; found `(' but expected `)'
{standard input}:5534: Error: junk at end of line: `(3))'
make[1]: *** [arch/ppc64/xmon/xmon.o] Error 1
make: *** [arch/ppc64/xmon] Error 2
make: *** Waiting for unfinished jobs....

Olof pointed out that in/out_le64 use a "b" operand for the addr.

In in_be64(), when changed the "m" operand to a "b", the kernel built
fine (although I haven't tried running it yet).  What does the "b"
operand mean?

Patch used below.

Thanks,
Jake

---


diff -puN include/asm-ppc64/io.h~in_be64-fix include/asm-ppc64/io.h
--- linux-2.6-bk/include/asm-ppc64/io.h~in_be64-fix	Tue Jan  4 15:33:22 2005
+++ linux-2.6-bk-moilanen/include/asm-ppc64/io.h	Tue Jan  4 15:59:50 2005
@@ -372,7 +372,7 @@ static inline unsigned long in_be64(cons
 	unsigned long ret;
 
 	__asm__ __volatile__("ld %0,0(%1); twi 0,%0,0; isync"
-			     : "=r" (ret) : "m" (*addr));
+			     : "=r" (ret) : "b" (*addr));
 	return ret;
 }
 

_




More information about the Linuxppc64-dev mailing list