This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Committed, Fix rest of PR target/19065; an autoincrement-free mem constraint for CRIS atomicity.h
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 28 Feb 2005 03:37:24 +0100
- Subject: Committed, Fix rest of PR target/19065; an autoincrement-free mem constraint for CRIS atomicity.h
The "real" fix for PR target PR target/19065 (which I see
mentions 'R' but I meant 'Q'). See also earlier gcc-patches
mail. Not included in this patch is the copyright note update.
PR target/19065
* config/cpu/cris/atomicity.h (__exchange_and_add): In asm, use
'Q' constraint, not 'm'.
Index: libstdc++-v3/config/cpu/cris/atomicity.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/cris/atomicity.h,v
retrieving revision 1.6
diff -c -p -r1.6 atomicity.h
*** libstdc++-v3/config/cpu/cris/atomicity.h 22 Mar 2004 01:37:04 -0000 1.6
--- libstdc++-v3/config/cpu/cris/atomicity.h 26 Feb 2005 15:23:36 -0000
*************** namespace __gnu_cxx
*** 47,54 ****
" move.d %2,[%3] \n"
" bwf 0b \n"
" clearf \n"
! : "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
! : "r" (__mem), "g" (__val), "m" (*__mem)
/* The memory clobber must stay, regardless of
current uses of this function. */
: "memory");
--- 47,54 ----
" move.d %2,[%3] \n"
" bwf 0b \n"
" clearf \n"
! : "=&r" (__result), "=Q" (*__mem), "=&r" (__tmp)
! : "r" (__mem), "g" (__val), "Q" (*__mem)
/* The memory clobber must stay, regardless of
current uses of this function. */
: "memory");
*************** namespace __gnu_cxx
*** 60,67 ****
" add.d %0,%2 \n"
" move.d %2,[%3] \n"
" move $r9,$ccr \n"
! : "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
! : "r" (__mem), "g" (__val), "m" (*__mem)
: "r9",
/* The memory clobber must stay, regardless of
current uses of this function. */
--- 60,67 ----
" add.d %0,%2 \n"
" move.d %2,[%3] \n"
" move $r9,$ccr \n"
! : "=&r" (__result), "=Q" (*__mem), "=&r" (__tmp)
! : "r" (__mem), "g" (__val), "Q" (*__mem)
: "r9",
/* The memory clobber must stay, regardless of
current uses of this function. */
brgds, H-P