From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22288 invoked by alias); 13 Jun 2012 16:06:32 -0000 Received: (qmail 22264 invoked by uid 22791); 13 Jun 2012 16:06:30 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 16:06:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DAB8B1C6FDA; Wed, 13 Jun 2012 12:06:17 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gqsFsV797LLc; Wed, 13 Jun 2012 12:06:17 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3F62E1C6FF3; Wed, 13 Jun 2012 12:06:16 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 64919145616; Wed, 13 Jun 2012 09:06:13 -0700 (PDT) Date: Wed, 13 Jun 2012 16:06:00 -0000 From: Joel Brobecker To: Anton Blanchard Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] Add multiple branches to single step through atomic sequence testcase Message-ID: <20120613160613.GI18729@adacore.com> References: <20120606135557.7da37cbe@kryten> <20120606135828.0d87f888@kryten> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120606135828.0d87f888@kryten> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00422.txt.bz2 > Test 3 conditional branches in an atomic sequence, 2 to the same > destination. [...] > 2012-06-05 Anton Blanchard > > * gdb.arch/ppc64-atomic-inst.s: Add second and third branch > inside atomic sequence. I won't pretend I understand PowerPC code all that well, I only know the basics. My only concern with this change is whether you might have reduced the number of conditions being tested. I would have expected this patch to *add* more code, and associated changes in the .exp file. But apparently, the code update is sufficient. How does the change work? I see two labels used twice, for instance? Thanks. > > Index: gdb/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s > =================================================================== > --- gdb.orig/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s 2012-06-06 12:59:56.697580862 +1000 > +++ gdb/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s 2012-06-06 13:46:08.258410718 +1000 > @@ -10,17 +10,29 @@ gdbasm_declare main > 1: lwarx 5,0,4 > cmpwi 5,0 > bne 2f > + cmpwi 5,1 > + beq 3f > + cmpwi 5,2 > + beq 3f /* branch to same destination */ > addi 5,5,1 > stwcx. 5,0,4 > bne 1b > > - std 0,0(4) > -2: ldarx 5,0,4 > +2: nop > + > +3: std 0,0(4) > +1: ldarx 5,0,4 > cmpdi 5,0 > - bne 3f > + bne 2f > + cmpdi 5,1 > + beq 3f > + cmpwi 5,2 > + beq 3f /* branch to same destination */ > addi 5,5,1 > stdcx. 5,0,4 > bne 1b > > +2: nop > + > 3: li 3,0 > blr -- Joel