This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[trans-mem] fix trydropreference() failure for ia32
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Jul 2010 17:11:26 -0400
- Subject: [trans-mem] fix trydropreference() failure for ia32
Brain fart.
We're not going to go very far if we src==dst and we try to copy from
'src' to 'dst' :). We need to copy from the actual cache line.
Committed as obvious. Dunno why the testcase (dropref-2.c) worked on
x86-64. Don't care. We now work on both 32 and 64 bits.
One more ia32 failure to go (libitm.c++/eh-1.C).
* method-wbetl.cc (trydropreference): Fix source line.
Index: method-wbetl.cc
===================================================================
--- method-wbetl.cc (revision 161512)
+++ method-wbetl.cc (working copy)
@@ -580,7 +580,7 @@ wbetl_dispatch::trydropreference (void *
{
pair = this->write_lock(src, WaW);
*pair.mask = 0;
- memcpy (dst, src, CACHELINE_SIZE);
+ memcpy (dst, pair.line, CACHELINE_SIZE);
dst += CACHELINE_SIZE;
src++;
size -= CACHELINE_SIZE;