From patchwork Tue Jul 13 21:11:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [trans-mem] fix trydropreference() failure for ia32 From: Aldy Hernandez X-Patchwork-Id: 58818 Message-Id: <20100713211124.GA1184@redhat.com> To: rth@redhat.com, gcc-patches@gcc.gnu.org Date: Tue, 13 Jul 2010 17:11:26 -0400 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;