Blame SOURCES/gdb-rhbz1553104-s390x-arch12-test.patch

ed07ac
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
ed07ac
From: Jan Kratochvil <jan.kratochvil@redhat.com>
ed07ac
Date: Fri, 23 Mar 2018 20:42:44 +0100
ed07ac
Subject: gdb-rhbz1553104-s390x-arch12-test.patch
ed07ac
ed07ac
;; [s390x] Backport arch12 instructions decoding (RH BZ 1553104).
ed07ac
;; =fedoratest
ed07ac
ed07ac
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.S b/gdb/testsuite/gdb.arch/s390x-arch12.S
ed07ac
new file mode 100644
ed07ac
--- /dev/null
ed07ac
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.S
ed07ac
@@ -0,0 +1,4 @@
ed07ac
+.text
ed07ac
+.globl load_guarded
ed07ac
+load_guarded:
ed07ac
+.byte 0xeb,0xbf,0xf0,0x58,0x00,0x24,0xe3,0xf0,0xff,0x50,0xff,0x71,0xb9,0x04,0x00,0xbf,0xe3,0x20,0xb0,0xa0,0x00,0x24,0xe3,0x10,0xb0,0xa0,0x00,0x04,0xe3,0x10,0x10,0x00,0x00,0x4c,0xe3,0x10,0xb0,0xa8,0x00,0x24,0xe3,0x10,0xb0,0xa8,0x00,0x04,0xb9,0x04,0x00,0x21,0xe3,0x40,0xb1,0x20,0x00,0x04,0xeb,0xbf,0xb1,0x08,0x00,0x04,0x07,0xf4
ed07ac
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.exp b/gdb/testsuite/gdb.arch/s390x-arch12.exp
ed07ac
new file mode 100644
ed07ac
--- /dev/null
ed07ac
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.exp
ed07ac
@@ -0,0 +1,34 @@
ed07ac
+# Copyright 2018 Free Software Foundation, Inc.
ed07ac
+
ed07ac
+# This program is free software; you can redistribute it and/or modify
ed07ac
+# it under the terms of the GNU General Public License as published by
ed07ac
+# the Free Software Foundation; either version 3 of the License, or
ed07ac
+# (at your option) any later version.
ed07ac
+#
ed07ac
+# This program is distributed in the hope that it will be useful,
ed07ac
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
ed07ac
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ed07ac
+# GNU General Public License for more details.
ed07ac
+#
ed07ac
+# You should have received a copy of the GNU General Public License
ed07ac
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
ed07ac
+
ed07ac
+#if { ![istarget s390x-*linux-*] || ![is_lp64_target] } {
ed07ac
+#    verbose "Skipping s390x-prologue-skip.exp"
ed07ac
+#    return
ed07ac
+#}
ed07ac
+
ed07ac
+set testfile "s390x-arch12"
ed07ac
+set uufile "${srcdir}/${subdir}/${testfile}.o.uu"
ed07ac
+set ofile "${srcdir}/${subdir}/${testfile}.o"
ed07ac
+
ed07ac
+if { [catch "system \"uudecode -o ${ofile} ${uufile}\"" ] != 0 } {
ed07ac
+    untested "failed uudecode"
ed07ac
+    return -1
ed07ac
+}
ed07ac
+
ed07ac
+gdb_exit
ed07ac
+gdb_start
ed07ac
+gdb_load $ofile
ed07ac
+
ed07ac
+gdb_test "disas load_guarded" " <\\+28>:\tlgg\t%r1,0\\(%r1\\)\r\n\[^\r\n\]* <\\+34>:\tstg\t%r1,168\\(%r11\\)\r\n.*"
ed07ac
diff --git a/gdb/testsuite/gdb.arch/s390x-arch12.o.uu b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
ed07ac
new file mode 100644
ed07ac
--- /dev/null
ed07ac
+++ b/gdb/testsuite/gdb.arch/s390x-arch12.o.uu
ed07ac
@@ -0,0 +1,20 @@
ed07ac
+begin 644 s390x-arch12.o
ed07ac
+M?T5,1@("`0`````````````!`!8````!````````````````````````````
ed07ac
+M``$X``````!```````!```<`!.N_\%@`)./P_U#_<;D$`+_C(+"@`"3C$+"@
ed07ac
+M``3C$!```$SC$+"H`"3C$+"H``2Y!``AXT"Q(``$Z[^Q"``$!_0`+G-Y;71A
ed07ac
+M8@`N
ed07ac
+M`````````````````````````````````P```0``````````````````````
ed07ac
+M`````P```@```````````````````````````P```P``````````````````
ed07ac
+M```````!$````0``````````````````````;&]A9%]G=6%R9&5D````````
ed07ac
+M````````````````````````````````````````````````````````````
ed07ac
+M`````````````````````````!L````!``````````8`````````````````
ed07ac
+M``!``````````$`````````````````````$```````````````A`````0``
ed07ac
+M```````#````````````````````@```````````````````````````````
ed07ac
+M!```````````````)P````@``````````P```````````````````(``````
ed07ac
+M``````````````````````````0``````````````!$````#````````````
ed07ac
+M``````````````````"``````````"P````````````````````!````````
ed07ac
+M```````!`````@``````````````````````````````L`````````!X````
ed07ac
+M!@````0`````````"``````````8````"0````,`````````````````````
ed07ac
+H`````````2@`````````#@````````````````````$`````````````
ed07ac
+`
ed07ac
+end