From patchwork Tue Jul 13 21:11:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 58818 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 91F1FB6EDD for ; Wed, 14 Jul 2010 07:11:39 +1000 (EST) Received: (qmail 1252 invoked by alias); 13 Jul 2010 21:11:37 -0000 Received: (qmail 1244 invoked by uid 22791); 13 Jul 2010 21:11:37 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_CP, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Jul 2010 21:11:33 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6DLBTW8001127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Jul 2010 17:11:30 -0400 Received: from redhat.com (vpn-10-180.rdu.redhat.com [10.11.10.180]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6DLBRcN001308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 13 Jul 2010 17:11:29 -0400 Date: Tue, 13 Jul 2010 17:11:26 -0400 From: Aldy Hernandez To: rth@redhat.com, gcc-patches@gcc.gnu.org Subject: [trans-mem] fix trydropreference() failure for ia32 Message-ID: <20100713211124.GA1184@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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;