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

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