This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/3] Add multiple branches to single step through atomic sequence testcase
- From: Anton Blanchard <anton at samba dot org>
- To: gdb-patches at sourceware dot org, brobecker at adacore dot com, emachado at linux dot vnet dot ibm dot com, luis_gustavo at mentor dot com
- Date: Mon, 29 Jul 2013 17:40:42 +1000
- Subject: [PATCH 3/3] Add multiple branches to single step through atomic sequence testcase
- References: <20130729173838 dot 36f370a6 at kryten>
Test 3 conditional branches in an atomic sequence, 2 to the same
destination.
Anton
--
2013-07-29 Anton Blanchard <anton@samba.org>
* gdb.arch/ppc64-atomic-inst.s: Add second and third branch
inside atomic sequence.
Index: b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s
===================================================================
--- a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s
+++ b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.s
@@ -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