Date: Thu, 8 May 2003 21:46:27 -0700 (PDT) From: Juli Mallett <jmallett@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30831 for review Message-ID: <200305090446.h494kR5k018221@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30831 Change 30831 by jmallett@jmallett_dalek on 2003/05/08 21:46:20 Properly refer to input and output arguments, as to make these work. This fixes atomic_cmpset_ptr most notably for witness such that it gets past that point now. Inspired by Alpha & PowerPC. Affected files ... .. //depot/projects/mips/sys/mips/include/atomic.h#14 edit Differences ... ==== //depot/projects/mips/sys/mips/include/atomic.h#14 (text+ko) ==== @@ -103,12 +103,12 @@ \ __asm __volatile ( \ "1:\n\t" \ - "ll %[temp], (%[p])\n\t" \ + "ll %[temp], %[p]\n\t" \ asmop "\n\t" \ - "sc %[temp], (%[p])\n\t" \ + "sc %[temp], %[p]\n\t" \ "beqz %[temp], 1b\n\t" \ - : [val] "=r"(val) \ - : [temp] "r"(temp), [p] "r"(p) \ + : [val] "=&r"(val), [p] "+m"(*p) \ + : [temp] "r"(temp) \ : "memory" \ ); \ } @@ -139,15 +139,15 @@ __asm __volatile ( "1:\n\t" "move %[res], $0\n\t" - "ll %[temp], (%[p])\n\t" + "ll %[temp], %[p]\n\t" "bne %[temp], %[old], 2f\n\t" "move %[temp], %[val]\n\t" "li %[res], 1\n\t" - "sc %[temp], (%[p])\n\t" + "sc %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" "2:\n\t" - : [old] "=r"(old), [val] "=r"(val) - : [res] "r"(res), [temp] "r"(temp), [p] "r"(p) + : [res] "=&r"(res), [p] "+m"(*p) + : [old] "r"(old), [val] "r"(val), [temp] "r"(temp) : "memory" ); @@ -164,13 +164,13 @@ __asm __volatile ( "1:\n\t" - "ll %[temp], (%[p])\n\t" + "ll %[temp], %[p]\n\t" "move %[res], %[temp]\n\t" "move %[temp], $0\n\t" - "sc %[temp], (%[p])\n\t" + "sc %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" - : - : [temp] "r"(temp), [p] "r"(p), [res] "r"(res) + : [res] "=&r"(res), [p] "+m"(*p) + : [temp] "r"(temp) : "memory" ); @@ -191,12 +191,12 @@ \ __asm __volatile ( \ "1:\n\t" \ - "lld %[temp], (%[p])\n\t" \ + "lld %[temp], %[p]\n\t" \ asmop "\n\t" \ - "scd %[temp], (%[p])\n\t" \ + "scd %[temp], %[p]\n\t" \ "beqz %[temp], 1b\n\t" \ - : [val] "=r"(val) \ - : [temp] "r"(temp), [p] "r"(p) \ + : [val] "=&r"(val), [p] "+m"(*p) \ + : [temp] "r"(temp) \ : "memory" \ ); \ } @@ -227,15 +227,15 @@ __asm __volatile ( "1:\n\t" "move %[res], $0\n\t" - "lld %[temp], (%[p])\n\t" + "lld %[temp], %[p]\n\t" "bne %[temp], %[old], 2f\n\t" "move %[temp], %[val]\n\t" "li %[res], 1\n\t" - "scd %[temp], (%[p])\n\t" + "scd %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" "2:\n\t" - : [old] "=r"(old), [val] "=r"(val) - : [res] "r"(res), [temp] "r"(temp), [p] "r"(p) + : [res] "=&r"(res), [p] "+m"(*p) + : [old] "r"(old), [val] "r"(val), [temp] "r"(temp) : "memory" ); @@ -252,13 +252,13 @@ __asm __volatile ( "1:\n\t" - "lld %[temp], (%[p])\n\t" + "lld %[temp], %[p]\n\t" "move %[res], %[temp]\n\t" "move %[temp], $0\n\t" - "scd %[temp], (%[p])\n\t" + "scd %[temp], %[p]\n\t" "beqz %[temp], 1b\n\t" - : - : [temp] "r"(temp), [p] "r"(p), [res] "r"(res) + : [res] "=&r"(res), [p] "+m"(*p) + : [temp] "r"(temp) : "memory" );
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305090446.h494kR5k018221>