From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15562 invoked by alias); 6 Jun 2012 03:58:37 -0000 Received: (qmail 15554 invoked by uid 22791); 6 Jun 2012 03:58:36 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from ozlabs.org (HELO ozlabs.org) (203.10.76.45) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jun 2012 03:58:24 +0000 Received: from kryten (ppp121-45-170-72.lns20.syd6.internode.on.net [121.45.170.72]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPSA id 42781B6FA3 for ; Wed, 6 Jun 2012 13:58:23 +1000 (EST) Date: Wed, 06 Jun 2012 03:58:00 -0000 From: Anton Blanchard To: gdb-patches@sourceware.org Subject: [PATCH 3/3] Add multiple branches to single step through atomic sequence testcase Message-ID: <20120606135828.0d87f888@kryten> In-Reply-To: <20120606135557.7da37cbe@kryten> References: <20120606135557.7da37cbe@kryten> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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/msg00164.txt.bz2 Test 3 conditional branches in an atomic sequence, 2 to the same destination. Anton -- 2012-06-05 Anton Blanchard * gdb.arch/ppc64-atomic-inst.s: Add second and third branch inside atomic sequence. 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