tags 408701 patch

thanks

On Wed, 07 Feb 2007 the mental interface of
Mark Andrews via RT told:

> Looking at the assembly it looks like we are using a different
> syntax.  We are using "r#" where # is the register number.  The
> rest of the code just uses # (no "r" in front).
> 
> IBM shows code without the "r"
> http://www.ibm.com/developerworks/library/l-ppc/
> 
> This guide for the Mac show code with the "r".
> http://www.lightsoft.co.uk/Fantasm/Beginners/begin1.html
> 
> Anyway please try the attached patch and let us know how it goes.
> I don't have access to a powerpc running Linux.

Built without errors and warnings ;) But I can't test the IBM's RISC
ones, as I have none handy :(

Patch attached again for Debian BTS.

Thanks

Elimar


-- 
  Excellent day for drinking heavily. 
  Spike the office water cooler;-)
Index: lib/isc/powerpc/include/isc/atomic.h
===================================================================
RCS file: /proj/cvs/prod/bind9/lib/isc/powerpc/include/isc/atomic.h,v
retrieving revision 1.1.6.3
diff -u -r1.1.6.3 atomic.h
--- lib/isc/powerpc/include/isc/atomic.h        1 Sep 2005 03:39:13 -0000       
1.1.6.3
+++ lib/isc/powerpc/include/isc/atomic.h        7 Feb 2007 03:35:12 -0000
@@ -74,10 +74,10 @@
 
        __asm__ volatile (
                "1:"
-               "lwarx r6, 0, %1\n"
-               "mr %0, r6\n"
-               "add r6, r6, %2\n"
-               "stwcx. r6, 0, %1\n"
+               "lwarx 6, 0, %1\n"
+               "mr %0, 6\n"
+               "add 6, 6, %2\n"
+               "stwcx. 6, 0, %1\n"
                "bne- 1b"
                : "=&r"(orig)
                : "r"(p), "r"(val)
@@ -91,9 +91,9 @@
 isc_atomic_store(void *p, isc_int32_t val) {
        __asm__ volatile (
                "1:"
-               "lwarx r6, 0, %0\n"
-               "lwz r6, %1\n"
-               "stwcx. r6, 0, %0\n"
+               "lwarx 6, 0, %0\n"
+               "lwz 6, %1\n"
+               "stwcx. 6, 0, %0\n"
                "bne- 1b"
                :
                : "r"(p), "m"(val)
@@ -107,12 +107,12 @@
 
        __asm__ volatile (
                "1:"
-               "lwarx r6, 0, %1\n"
-               "mr %0,r6\n"
-               "cmpw r6, %2\n"
+               "lwarx 6, 0, %1\n"
+               "mr %0,6\n"
+               "cmpw 6, %2\n"
                "bne 2f\n"
-               "mr r6, %3\n"
-               "stwcx. r6, 0, %1\n"
+               "mr 6, %3\n"
+               "stwcx. 6, 0, %1\n"
                "bne- 1b\n"
                "2:"
                : "=&r" (orig)

Reply via email to