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

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