From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16066 invoked by alias); 3 Aug 2012 14:21:48 -0000 Received: (qmail 16057 invoked by uid 22791); 3 Aug 2012 14:21:46 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,MSGID_FROM_MTA_HEADER,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_IB,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e06smtp10.uk.ibm.com (HELO e06smtp10.uk.ibm.com) (195.75.94.106) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Aug 2012 14:21:33 +0000 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Aug 2012 15:21:31 +0100 Received: from d06nrmr1806.portsmouth.uk.ibm.com (9.149.39.193) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 3 Aug 2012 15:21:29 +0100 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q73ELSIV2838772 for ; Fri, 3 Aug 2012 15:21:28 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q73ELRrO004709 for ; Fri, 3 Aug 2012 08:21:27 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id q73ELQ6k004569; Fri, 3 Aug 2012 08:21:26 -0600 Message-Id: <201208031421.q73ELQ6k004569@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 03 Aug 2012 16:21:26 +0200 Subject: Re: [PATCH 0/2] Convert s390 to atomic optabs, v2 To: rth@redhat.com Date: Fri, 03 Aug 2012 14:21:00 -0000 From: "Ulrich Weigand" Cc: gcc-patches@gcc.gnu.org In-Reply-To: <201208031219.q73CJoli001378@d06av02.portsmouth.uk.ibm.com> from "Ulrich Weigand" at Aug 03, 2012 02:19:50 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-cbid: 12080314-4966-0000-0000-0000032087A2 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg00170.txt.bz2 I wrote: > Just a quick heads-up that something still must be broken; > I get extra test suite failures: > > FAIL: gcc.dg/atomic-compare-exchange-1.c execution test > FAIL: gcc.dg/atomic-compare-exchange-2.c execution test > FAIL: gcc.dg/atomic-compare-exchange-3.c execution test > WARNING: program timed out. > FAIL: gcc.dg/atomic-op-3.c execution test > FAIL: gcc.dg/ia64-sync-2.c execution test > FAIL: gcc.dg/ia64-sync-3.c execution test > FAIL: gcc.dg/sync-3.c execution test > FAIL: gcc.dg/simulate-thread/atomic-other-int.c -O0 -g thread simulation test > FAIL: gcc.dg/simulate-thread/atomic-other-int.c -O2 -g thread simulation test > FAIL: gcc.dg/simulate-thread/atomic-other-int.c -O3 -g thread simulation test > FAIL: gcc.dg/simulate-thread/atomic-other-short.c -O3 -g thread simulation test > FAIL: libatomic.c/atomic-compare-exchange-3.c execution test > WARNING: program timed out. > FAIL: libatomic.c/atomic-op-3.c execution test > FAIL: libatomic.c/generic-2.c execution test > > and just about all libgomp tests and many libjava tests seem > to hang and time out ... > > I'll have a look what's going on here. Richard Henderson wrote: > +(define_expand "atomic_compare_and_swap" > + [(match_operand:SI 0 "register_operand") ;; bool success output > + (match_operand:DGPR 1 "register_operand") ;; oldval output > + (match_operand:DGPR 2 "s_operand") ;; memory > + (match_operand:DGPR 3 "register_operand") ;; expected intput > + (match_operand:DGPR 4 "register_operand") ;; newval intput > + (match_operand:SI 5 "const_int_operand") ;; is_weak > + (match_operand:SI 6 "const_int_operand") ;; success model > + (match_operand:SI 7 "const_int_operand")] ;; failure model > + "" > +{ > + rtx cc, cmp; > + emit_insn (gen_atomic_compare_and_swap_internal > + (operands[1], operands[2], operands[3], operands[4])); > + cc = gen_rtx_REG (CCZ1mode, CC_REGNUM); > + cmp = gen_rtx_NE (SImode, cc, const0_rtx); > + emit_insn (gen_cstorecc4 (operands[0], cmp, cc, const0_rtx)); This needs to be an EQ instead of NE comparison here ... > + if (is_weak) > { > - cmpv = force_reg (SImode, val); > - store_bit_field (cmpv, GET_MODE_BITSIZE (mode), 0, > - 0, 0, SImode, cmp); > + cc = s390_emit_compare_and_swap (NE, res, ac.memsi, cmpv, newv); > + emit_insn (gen_cstorecc4 (btarget, cc, XEXP (cc, 0), XEXP (cc, 1))); > } ... and here. This fixes the main atomic test failures I was seeing. I've restarted the full bootstrap / regression test now ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com