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

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