aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-addpcis.exp14
-rw-r--r--gdb/testsuite/gdb.arch/powerpc-lnia.exp14
2 files changed, 26 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
index d1bc7f4..ff7052c 100644
--- a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
@@ -50,7 +50,19 @@ gdb_breakpoint $bp1
gdb_breakpoint $bp2
gdb_breakpoint $bp3
-gdb_test "stepi" "" "set r3 "
+set insn_supported 1
+gdb_test_multiple "stepi" "set r3" {
+ -re "Program received signal SIGILL, Illegal instruction\\..*" {
+ set insn_supported 0
+ }
+ -re -wrap "" {
+ pass $gdb_test_name
+ }
+}
+if { ! $insn_supported } {
+ unsupported "illegal instruction"
+ return
+}
set check_r3 [get_hexadecimal_valueof "\$r3" "default0"]
gdb_test "stepi" "" "set r4"
set check_r4 [get_hexadecimal_valueof "\$r4" "default0"]
diff --git a/gdb/testsuite/gdb.arch/powerpc-lnia.exp b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
index 0f56d83..4ab4f8d 100644
--- a/gdb/testsuite/gdb.arch/powerpc-lnia.exp
+++ b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
@@ -54,7 +54,19 @@ gdb_breakpoint $bp3
# single-step through the lnia instructions, and retrieve the
# register values as we proceed.
-gdb_test "stepi" "" "set r3"
+set insn_supported 1
+gdb_test_multiple "stepi" "set r3" {
+ -re "Program received signal SIGILL, Illegal instruction\\..*" {
+ set insn_supported 0
+ }
+ -re -wrap "" {
+ pass $gdb_test_name
+ }
+}
+if { ! $insn_supported } {
+ unsupported "illegal instruction"
+ return
+}
set check_r3 [get_hexadecimal_valueof "\$r3" "default0"]
gdb_test "stepi" "" "set r4"
set check_r4 [get_hexadecimal_valueof "\$r4" "default0"]