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

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