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

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